mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-09 03:11:58 +00:00
fix: keep tui /quit behavior aligned with cli exit flow
This commit is contained in:
parent
0ec052ca24
commit
6f7b698a08
1 changed files with 8 additions and 0 deletions
|
|
@ -26,6 +26,14 @@ describe('createSlashHandler', () => {
|
|||
expect(ctx.transcript.sys).toHaveBeenCalledWith('ui redrawn')
|
||||
})
|
||||
|
||||
it('exits locally for /quit', () => {
|
||||
const ctx = buildCtx()
|
||||
|
||||
expect(createSlashHandler(ctx)('/quit')).toBe(true)
|
||||
expect(ctx.session.die).toHaveBeenCalledTimes(1)
|
||||
expect(ctx.gateway.gw.request).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('routes /status to live session.status instead of slash worker', async () => {
|
||||
patchUiState({ sid: 'sid-abc' })
|
||||
const rpc = vi.fn(() => Promise.resolve({ output: 'Hermes TUI Status' }))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue