mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
fix(tui): ignore hidden reasoning stream segments
Only keep the live progress area mounted for stream segments that can render under the current detail section visibility.
This commit is contained in:
parent
d8afafd22b
commit
f7abcb4f01
1 changed files with 11 additions and 1 deletions
|
|
@ -712,6 +712,7 @@ export function useMainApp(gw: GatewayClient) {
|
|||
s => sectionMode(s, ui.detailsMode, ui.sections, ui.detailsModeCommandOverride) !== 'hidden'
|
||||
)
|
||||
const thinkingPanelVisible = sectionMode('thinking', ui.detailsMode, ui.sections, ui.detailsModeCommandOverride) !== 'hidden'
|
||||
const toolsPanelVisible = sectionMode('tools', ui.detailsMode, ui.sections, ui.detailsModeCommandOverride) !== 'hidden'
|
||||
|
||||
const showProgressArea = useTurnSelector(state =>
|
||||
anyPanelVisible
|
||||
|
|
@ -719,7 +720,16 @@ export function useMainApp(gw: GatewayClient) {
|
|||
ui.busy ||
|
||||
state.outcome ||
|
||||
state.streamPendingTools.length ||
|
||||
state.streamSegments.length ||
|
||||
state.streamSegments.some(segment => {
|
||||
const thinking = Boolean(segment.thinking?.trim())
|
||||
const tools = Boolean(segment.tools?.length)
|
||||
|
||||
if (segment.kind === 'trail' && !segment.text) {
|
||||
return (thinkingPanelVisible && thinking) || (toolsPanelVisible && tools)
|
||||
}
|
||||
|
||||
return Boolean(segment.text?.trim()) || (thinkingPanelVisible && thinking) || (toolsPanelVisible && tools)
|
||||
}) ||
|
||||
state.subagents.length ||
|
||||
state.tools.length ||
|
||||
state.todos.length ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue