mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-11 03:31:55 +00:00
chore(tui): tighten todo-fix comments, drop dead archive call
- gateway handler: turnController always archives in recordMessageComplete, so the post-complete archiveTodosAtTurnEnd().forEach is dead code. Drop it and the now-unused import. - turnController: collapse archive prepend into a single spread expression. - gateway server: one-line comment for the tool.start todo skip.
This commit is contained in:
parent
c2ca02fcff
commit
635948d0e0
3 changed files with 10 additions and 22 deletions
|
|
@ -469,12 +469,13 @@ class TurnController {
|
|||
...(tools.length && { tools })
|
||||
}
|
||||
|
||||
// Archive todos FIRST so the trail msg sits right after the user prompt,
|
||||
// not between thinking/tools and the final assistant text. Keeps the
|
||||
// panel visually anchored where it lived during streaming.
|
||||
const archived = archiveDoneTodos()
|
||||
const body = hasDetails(finalDetails) ? [...segments, finalDetails] : segments
|
||||
const finalMessages: Msg[] = [...archived, ...body]
|
||||
// Archive prepended so the trail msg anchors under the user prompt,
|
||||
// not between thinking/tools and final assistant text.
|
||||
const finalMessages: Msg[] = [
|
||||
...archiveDoneTodos(),
|
||||
...segments,
|
||||
...(hasDetails(finalDetails) ? [finalDetails] : [])
|
||||
]
|
||||
|
||||
if (finalText) {
|
||||
finalMessages.push({ role: 'assistant', text: finalText })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue