mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-07 02:51:50 +00:00
fix(tui): apply details mode live
This commit is contained in:
parent
6814646b36
commit
a8fcd1c742
12 changed files with 56 additions and 19 deletions
|
|
@ -119,6 +119,7 @@ describe('createSlashHandler', () => {
|
|||
expect(getUiState().detailsMode).toBe('collapsed')
|
||||
expect(createSlashHandler(ctx)('/details toggle')).toBe(true)
|
||||
expect(getUiState().detailsMode).toBe('expanded')
|
||||
expect(getUiState().detailsModeCommandOverride).toBe(true)
|
||||
expect(ctx.gateway.rpc).toHaveBeenCalledWith('config.set', {
|
||||
key: 'details_mode',
|
||||
value: 'expanded'
|
||||
|
|
|
|||
|
|
@ -78,19 +78,25 @@ describe('sectionMode', () => {
|
|||
expect(sectionMode('subagents', 'hidden', {})).toBe('hidden')
|
||||
})
|
||||
|
||||
it('streams thinking + tools expanded by default regardless of global mode', () => {
|
||||
it('streams thinking + tools expanded by default for persisted config values', () => {
|
||||
expect(sectionMode('thinking', 'collapsed', {})).toBe('expanded')
|
||||
expect(sectionMode('thinking', 'hidden', undefined)).toBe('expanded')
|
||||
expect(sectionMode('tools', 'collapsed', {})).toBe('expanded')
|
||||
expect(sectionMode('tools', 'hidden', undefined)).toBe('expanded')
|
||||
})
|
||||
|
||||
it('hides the activity panel by default regardless of global mode', () => {
|
||||
it('hides the activity panel by default for persisted config values', () => {
|
||||
expect(sectionMode('activity', 'collapsed', {})).toBe('hidden')
|
||||
expect(sectionMode('activity', 'expanded', undefined)).toBe('hidden')
|
||||
expect(sectionMode('activity', 'hidden', {})).toBe('hidden')
|
||||
})
|
||||
|
||||
it('applies in-session /details mode globally over built-in defaults', () => {
|
||||
expect(sectionMode('thinking', 'collapsed', {}, true)).toBe('collapsed')
|
||||
expect(sectionMode('tools', 'hidden', {}, true)).toBe('hidden')
|
||||
expect(sectionMode('activity', 'expanded', undefined, true)).toBe('expanded')
|
||||
})
|
||||
|
||||
it('honours per-section overrides over both the section default and global mode', () => {
|
||||
expect(sectionMode('thinking', 'collapsed', { thinking: 'collapsed' })).toBe('collapsed')
|
||||
expect(sectionMode('tools', 'collapsed', { tools: 'hidden' })).toBe('hidden')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue