mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-07 02:51:50 +00:00
fix(tui): stabilize live progress rendering
This commit is contained in:
parent
d4dde6b5f2
commit
a7831b63db
28 changed files with 619 additions and 154 deletions
27
ui-tui/src/__tests__/turnStore.test.ts
Normal file
27
ui-tui/src/__tests__/turnStore.test.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import {
|
||||
freezeTurnRendering,
|
||||
getRenderableTurnState,
|
||||
patchTurnState,
|
||||
resetTurnState,
|
||||
unfreezeTurnRendering
|
||||
} from '../app/turnStore.js'
|
||||
|
||||
describe('turn render freezing', () => {
|
||||
it('holds the render snapshot stable while live turn state keeps changing', () => {
|
||||
resetTurnState()
|
||||
patchTurnState({ streaming: 'before scroll' })
|
||||
freezeTurnRendering()
|
||||
|
||||
patchTurnState({ reasoning: 'new thinking', streaming: 'new streamed text' })
|
||||
|
||||
expect(getRenderableTurnState().streaming).toBe('before scroll')
|
||||
expect(getRenderableTurnState().reasoning).toBe('')
|
||||
|
||||
unfreezeTurnRendering()
|
||||
|
||||
expect(getRenderableTurnState().streaming).toBe('new streamed text')
|
||||
expect(getRenderableTurnState().reasoning).toBe('new thinking')
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue