fix: keep tui /quit behavior aligned with cli exit flow
This commit is contained in:
@@ -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' }))
|
||||
|
||||
Reference in New Issue
Block a user