mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-17 04:31:55 +00:00
fix(tui): auto-expand Activity on error
The Activity accordion in ToolTrail tints red (via metaTone) when an error item is present, but stays collapsed — the error is invisible until the user clicks. Track the latest error id and force-open openMeta whenever it advances. Users can still manually collapse; a new error re-opens.
This commit is contained in:
parent
4a424f1fbb
commit
93b47d962a
1 changed files with 11 additions and 0 deletions
|
|
@ -596,6 +596,17 @@ export const ToolTrail = memo(function ToolTrail({
|
||||||
}
|
}
|
||||||
}, [detailsMode])
|
}, [detailsMode])
|
||||||
|
|
||||||
|
const latestErrorId = useMemo(
|
||||||
|
() => activity.reduce((max, i) => (i.tone === 'error' && i.id > max ? i.id : max), -1),
|
||||||
|
[activity]
|
||||||
|
)
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (latestErrorId >= 0) {
|
||||||
|
setOpenMeta(true)
|
||||||
|
}
|
||||||
|
}, [latestErrorId])
|
||||||
|
|
||||||
const cot = useMemo(() => thinkingPreview(reasoning, 'full', THINKING_COT_MAX), [reasoning])
|
const cot = useMemo(() => thinkingPreview(reasoning, 'full', THINKING_COT_MAX), [reasoning])
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue