Files
orca/src/shared/tui-agent-selection.test.ts
T
Neil a6f9a5826e Add Command Code agent status tracking
Adds Command Code hook installation, status normalization, launch seeding, and terminal-output fallback detection for working/done sidebar status. Includes review hardening for long-running tool repaint cadence and prompt sanitization across split ANSI chunks.
2026-05-26 14:45:34 -07:00

19 lines
712 B
TypeScript

import { describe, expect, it } from 'vitest'
import { pickTuiAgent } from './tui-agent-selection'
describe('pickTuiAgent', () => {
it('uses an installed preferred agent', () => {
expect(pickTuiAgent('codex', ['claude', 'codex'])).toBe('codex')
})
it('falls back in desktop catalog order when the preference is absent or stale', () => {
expect(pickTuiAgent(null, ['cursor', 'codex'])).toBe('codex')
expect(pickTuiAgent('gemini', ['cursor', 'codex'])).toBe('codex')
expect(pickTuiAgent(null, ['continue', 'command-code'])).toBe('command-code')
})
it('respects the explicit blank terminal preference', () => {
expect(pickTuiAgent('blank', ['cursor', 'claude'])).toBeNull()
})
})