mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(tui): address Copilot round-2 on #14045
- delegate_task: use shared tool_error() for the paused-spawn early return so the error envelope matches the rest of the tool. - Disk snapshot label: treat orphaned nodes (parentId missing from the snapshot) as top-level, matching buildSubagentTree / summarizeLabel.
This commit is contained in:
parent
eda400d8a5
commit
7eae504d15
2 changed files with 9 additions and 8 deletions
|
|
@ -66,7 +66,12 @@ export function createGatewayEventHandler(ctx: GatewayEventHandlerContext): (ev:
|
|||
return min === 0 ? s.startedAt : Math.min(min, s.startedAt)
|
||||
}, 0)
|
||||
|
||||
const top = subagents.filter(s => !s.parentId).slice(0, 2)
|
||||
// Match buildSubagentTree semantics: an agent is top-level if it has
|
||||
// no parent OR its parent isn't in the snapshot (orphan). Otherwise
|
||||
// the disk label would fall back to `${N} subagents` for any turn
|
||||
// whose roots got pruned mid-flight.
|
||||
const ids = new Set(subagents.map(s => s.id))
|
||||
const top = subagents.filter(s => !s.parentId || !ids.has(s.parentId)).slice(0, 2)
|
||||
|
||||
const label = top.length
|
||||
? top
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue