mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(tui): render inline diffs inside assistant completion
Follow-up for #13729: segment-level system artifacts still looked detached in real flow.\n\nInstead of appending inline_diff as a standalone segment/system row, queue sanitized diffs during tool.complete and append them as a fenced diff block to the assistant completion text on message.complete. This keeps the diff in the same message flow as the assistant response.
This commit is contained in:
parent
bddf0cd61e
commit
31b3b09ea4
3 changed files with 30 additions and 40 deletions
|
|
@ -272,12 +272,10 @@ export function createGatewayEventHandler(ctx: GatewayEventHandlerContext): (ev:
|
|||
return
|
||||
}
|
||||
|
||||
// Push into the active turn's segment stream so the diff renders
|
||||
// inline with the assistant's output. Routing through `sys()`
|
||||
// lands it in the completed-history section above the streaming
|
||||
// bubble — which is why blitz testers saw diffs "appear at the
|
||||
// top, out of sequence" with the rest of the turn.
|
||||
turnController.appendSegmentMessage({ role: 'system', text: diffText })
|
||||
// Keep inline diffs attached to the assistant completion body so
|
||||
// they render in the same message flow, not as a standalone system
|
||||
// artifact that can look out-of-place around tool rows.
|
||||
turnController.queueInlineDiff(diffText)
|
||||
}
|
||||
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue