| 22 | |
| 23 | describe('/bash slash command handler', () => { |
| 24 | const createMockParams = ( |
| 25 | overrides: Partial<RouterParams> = {}, |
| 26 | ): RouterParams => ({ |
| 27 | abortControllerRef: { current: null }, |
| 28 | agentMode: 'DEFAULT', |
| 29 | inputRef: { current: null }, |
| 30 | inputValue: '/bash', |
| 31 | isChainInProgressRef: { current: false }, |
| 32 | isStreaming: false, |
| 33 | logoutMutation: {} as RouterParams['logoutMutation'], |
| 34 | streamMessageIdRef: { current: null }, |
| 35 | addToQueue: mock(() => {}), |
| 36 | clearMessages: mock(() => {}), |
| 37 | saveToHistory: mock(() => {}), |
| 38 | scrollToLatest: mock(() => {}), |
| 39 | sendMessage: mock(async () => {}), |
| 40 | setCanProcessQueue: mock(() => {}), |
| 41 | setInputFocused: mock(() => {}), |
| 42 | setInputValue: mock(() => {}), |
| 43 | setIsAuthenticated: mock(() => {}), |
| 44 | setMessages: mock(() => {}), |
| 45 | setUser: mock(() => {}), |
| 46 | stopStreaming: mock(() => {}), |
| 47 | ...overrides, |
| 48 | }) |
| 49 | |
| 50 | test('/bash command exists in registry', () => { |
| 51 | const bashCommand = findCommand('bash') |