fix(coding-agent): prevent full re-renders during write tool streaming

Move line count from header to footer to avoid changing the first line
during streaming, which was triggering full screen re-renders in the
TUI's differential rendering logic.
This commit is contained in:
Mario Zechner 2026-01-02 01:11:06 +01:00
parent 91c52de8be
commit d51770a63d
11 changed files with 208 additions and 8 deletions

View file

@ -95,6 +95,7 @@ function createNoOpUIContext(): HookUIContext {
custom: async () => undefined as never,
setEditorText: () => {},
getEditorText: () => "",
editor: async () => undefined,
get theme() {
return theme;
},

View file

@ -52,6 +52,7 @@ const noOpUIContext: HookUIContext = {
custom: async () => undefined as never,
setEditorText: () => {},
getEditorText: () => "",
editor: async () => undefined,
get theme() {
return theme;
},

View file

@ -119,6 +119,15 @@ export interface HookUIContext {
*/
getEditorText(): string;
/**
* Show a multi-line editor for text editing.
* Supports Ctrl+G to open external editor ($VISUAL or $EDITOR).
* @param title - Title describing what is being edited
* @param prefill - Optional initial text
* @returns Edited text, or undefined if cancelled (Escape)
*/
editor(title: string, prefill?: string): Promise<string | undefined>;
/**
* Get the current theme for styling text with ANSI codes.
* Use theme.fg() and theme.bg() to style status text.