mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 23:01:30 +00:00
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:
parent
91c52de8be
commit
d51770a63d
11 changed files with 208 additions and 8 deletions
|
|
@ -124,6 +124,14 @@ export default function (pi: HookAPI) {
|
|||
return;
|
||||
}
|
||||
|
||||
// Let user edit the generated prompt
|
||||
const editedPrompt = await ctx.ui.editor("Edit handoff prompt (ctrl+enter to submit, esc to cancel)", result);
|
||||
|
||||
if (editedPrompt === undefined) {
|
||||
ctx.ui.notify("Cancelled", "info");
|
||||
return;
|
||||
}
|
||||
|
||||
// Create new session with parent tracking
|
||||
const newSessionResult = await ctx.newSession({
|
||||
parentSession: currentSessionFile,
|
||||
|
|
@ -134,9 +142,9 @@ export default function (pi: HookAPI) {
|
|||
return;
|
||||
}
|
||||
|
||||
// Set the generated prompt as a draft in the editor
|
||||
ctx.ui.setEditorText(result);
|
||||
ctx.ui.notify("Handoff ready. Review the prompt and submit when ready.", "info");
|
||||
// Set the edited prompt in the main editor for submission
|
||||
ctx.ui.setEditorText(editedPrompt);
|
||||
ctx.ui.notify("Handoff ready. Submit when ready.", "info");
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue