mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-29 06:31:32 +00:00
test(tui): regression test for /q alias resolving to queue (#31983)
Adapted from @hclsys's test in PR #31985. Asserts findSlashCommand('q') resolves to the queue command, not quit.
This commit is contained in:
parent
064ac28cbd
commit
85a0b3424e
1 changed files with 11 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ import { fileURLToPath } from 'node:url'
|
|||
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import { SLASH_COMMANDS } from '../app/slash/registry.js'
|
||||
import { findSlashCommand, SLASH_COMMANDS } from '../app/slash/registry.js'
|
||||
|
||||
type CommandRoute = 'fallback' | 'local' | 'native'
|
||||
|
||||
|
|
@ -110,4 +110,14 @@ describe('slash parity matrix', () => {
|
|||
expect(routes[name], `mutating command must not fallback: ${name}`).not.toBe('fallback')
|
||||
}
|
||||
})
|
||||
|
||||
it('/q alias resolves to queue, not quit (#31983)', () => {
|
||||
// Regression for #31983: the TUI `quit` command used to carry alias `q`,
|
||||
// which collided with the Python-side `/queue` alias. TUI-local commands
|
||||
// dispatch before the backend, so `/q` resolved to /quit (session.die)
|
||||
// instead of queueing a prompt.
|
||||
const cmd = findSlashCommand('q')
|
||||
expect(cmd, '/q must resolve to a command').toBeDefined()
|
||||
expect(cmd!.name).toBe('queue')
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue