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:
@@ -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");
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user