feat(tui): anchor todo panel above streaming output
This commit is contained in:
@@ -537,9 +537,14 @@ export function createGatewayEventHandler(ctx: GatewayEventHandlerContext): (ev:
|
||||
const { finalMessages, finalText, wasInterrupted } = turnController.recordMessageComplete(ev.payload ?? {})
|
||||
|
||||
if (!wasInterrupted) {
|
||||
// Archive the todo list FIRST so it sits above the final assistant
|
||||
// text in the transcript — same position it held during streaming.
|
||||
// Otherwise the panel would visibly jump from "above live answer" to
|
||||
// "below final answer" at message.complete.
|
||||
archiveTodosAtTurnEnd().forEach(appendMessage)
|
||||
|
||||
const msgs: Msg[] = finalMessages.length ? finalMessages : [{ role: 'assistant', text: finalText }]
|
||||
msgs.forEach(appendMessage)
|
||||
archiveTodosAtTurnEnd().forEach(appendMessage)
|
||||
|
||||
if (bellOnComplete && stdout?.isTTY) {
|
||||
stdout.write('\x07')
|
||||
|
||||
Reference in New Issue
Block a user