mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-08-11 01:36:35 +00:00
* fix(cli): keep exit_plan_mode plan visible inside the pending viewport clamp (#6867) The exit_plan_mode confirmation dialog rendered its plan body via MarkdownDisplay with isPending={false}, which skipped fitPendingSlice. The full plan then rendered inside MainContent's maxHeight + overflow="hidden" wrapper (re-added by #6421 as an Ink backstop for the scroll-to-top lock), and Ink clipped the bottom — silently dropping the tail of a long plan and, in narrower terminals, the option buttons. Add an opt-in enforceHeightBudget flag on MarkdownDisplay so callers that render inside a bounded parent can share the streaming path's rendered-height slice. Pass enforceHeightBudget from ToolConfirmationMessage's plan body. Committed non-pending renders (transcript, tool result markdown, PlanSummaryDisplay) keep the default uncapped behavior. Fixes #6867 * fix(cli): render truncation cue when exit_plan_mode plan is clipped Address bot review on #6882: when `enforceHeightBudget && !isPending` and the pre-slice actually dropped lines, render a dim single-line cue naming the count of dropped source lines. Without a visible cue, a model-authored plan could hide dangerous steps past the viewport budget and users would approve them blind — the streaming path deliberately omits the cue because the tail is still on its way, but a complete plan inside the confirmation dialog has no such promise. The cue is gated so it only appears in the exact scenario it's needed: enforceHeightBudget on (only exit_plan_mode opts in today), non-streaming, and something actually got dropped. Three regression tests pin each gate. |
||
|---|---|---|
| .. | ||
| src | ||
| index.ts | ||
| package.json | ||
| test-setup.ts | ||
| tsconfig.json | ||
| vitest.config.ts | ||