mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-09 08:21:50 +00:00
fix(desktop): prevent thinking block from closing mid-streaming
When reasoning text grows during streaming, new parts can be appended beyond endIndex. The pending check used slice(startIndex, endIndex) which excluded these new parts — if the original part completed, the block would close while new reasoning was still streaming. Fix: remove the endIndex cap from slice() so all parts from startIndex onward are checked. During non-streaming, the array is stable and all parts are within range anyway.
This commit is contained in:
parent
93b5df3189
commit
ea44011d15
1 changed files with 1 additions and 1 deletions
|
|
@ -438,7 +438,7 @@ const ReasoningAccordionGroup: FC<{ children?: ReactNode; endIndex: number; star
|
|||
s.thread.isRunning &&
|
||||
s.message.status?.type === 'running' &&
|
||||
s.message.parts
|
||||
.slice(Math.max(0, startIndex), Math.min(s.message.parts.length, endIndex))
|
||||
.slice(Math.max(0, startIndex))
|
||||
.some(p => p?.type === 'reasoning' && p.status?.type !== 'complete')
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue