Changesets · Branches · Tags · Compare
| Changeset | d1aa4d88968159ab0c55a1b2afd9aa2862317afa9aefc5af807bd7ee3251ee4c |
|---|---|
| Author | Dallin Romney <dallinromney@gmail.com> · 2025-09-08 16:27 -07:00 |
| Committer | GitHub <noreply@github.com> · 2025-09-08 16:27 -07:00 |
| Parents | 41d2e879b49a, f004f777ead7 |
4 files changed
modified extensions/cli/src/ui/hooks/useChat.clear.test.ts +0 −6
| @@ -15,7 +15,6 @@ | ||
| 15 | 15 | |
| 16 | 16 | describe("useChat clear command", () => { |
| 17 | 17 | let mockSetChatHistory: ReturnType<typeof vi.fn>; |
| 18 | - let mockExit: ReturnType<typeof vi.fn>; | |
| 19 | 18 | let mockOnClear: ReturnType<typeof vi.fn>; |
| 20 | 19 | |
| 21 | 20 | beforeEach(() => { |
| @@ -23,7 +22,6 @@ | ||
| 23 | 22 | vi.clearAllMocks(); |
| 24 | 23 | |
| 25 | 24 | mockSetChatHistory = vi.fn(); |
| 26 | - mockExit = vi.fn(); | |
| 27 | 25 | mockOnClear = vi.fn(); |
| 28 | 26 | }); |
| 29 | 27 | |
| @@ -44,7 +42,6 @@ | ||
| 44 | 42 | result, |
| 45 | 43 | chatHistory, |
| 46 | 44 | setChatHistory: mockSetChatHistory, |
| 47 | - exit: mockExit, | |
| 48 | 45 | onShowConfigSelector: vi.fn(), |
| 49 | 46 | onClear: mockOnClear, |
| 50 | 47 | }); |
| @@ -91,7 +88,6 @@ | ||
| 91 | 88 | result, |
| 92 | 89 | chatHistory, |
| 93 | 90 | setChatHistory: mockSetChatHistory, |
| 94 | - exit: mockExit, | |
| 95 | 91 | onShowConfigSelector: vi.fn(), |
| 96 | 92 | // onClear is not provided |
| 97 | 93 | }); |
| @@ -127,7 +123,6 @@ | ||
| 127 | 123 | result, |
| 128 | 124 | chatHistory, |
| 129 | 125 | setChatHistory: mockSetChatHistory, |
| 130 | - exit: mockExit, | |
| 131 | 126 | onShowConfigSelector: vi.fn(), |
| 132 | 127 | onClear: mockOnClear, |
| 133 | 128 | }); |
| @@ -149,7 +144,6 @@ | ||
| 149 | 144 | result, |
| 150 | 145 | chatHistory, |
| 151 | 146 | setChatHistory: mockSetChatHistory, |
| 152 | - exit: mockExit, | |
| 153 | 147 | onShowConfigSelector: vi.fn(), |
| 154 | 148 | onClear: mockOnClear, |
| 155 | 149 | }); |
modified extensions/cli/src/ui/hooks/useChat.helpers.ts +1 −4
| @@ -46,7 +46,6 @@ | ||
| 46 | 46 | result: SlashCommandResult; |
| 47 | 47 | chatHistory: ChatHistoryItem[]; |
| 48 | 48 | setChatHistory: React.Dispatch<React.SetStateAction<ChatHistoryItem[]>>; |
| 49 | - exit: () => void; | |
| 50 | 49 | onShowConfigSelector: () => void; |
| 51 | 50 | onShowModelSelector?: () => void; |
| 52 | 51 | onShowMCPSelector?: () => void; |
| @@ -61,7 +60,6 @@ | ||
| 61 | 60 | result, |
| 62 | 61 | chatHistory, |
| 63 | 62 | setChatHistory, |
| 64 | - exit, | |
| 65 | 63 | onShowConfigSelector, |
| 66 | 64 | onShowModelSelector, |
| 67 | 65 | onShowMCPSelector, |
| @@ -69,8 +67,7 @@ | ||
| 69 | 67 | onClear, |
| 70 | 68 | }: ProcessSlashCommandResultOptions): string | null { |
| 71 | 69 | if (result.exit) { |
| 72 | - exit(); | |
| 73 | - return null; | |
| 70 | + process.exit(0); | |
| 74 | 71 | } |
| 75 | 72 | |
| 76 | 73 | if (result.openMcpSelector) { |
modified extensions/cli/src/ui/hooks/useChat.ts +0 −1
| @@ -370,7 +370,6 @@ | ||
| 370 | 370 | result: commandResult, |
| 371 | 371 | chatHistory, |
| 372 | 372 | setChatHistory, |
| 373 | - exit, | |
| 374 | 373 | onShowConfigSelector, |
| 375 | 374 | onShowModelSelector, |
| 376 | 375 | onShowMCPSelector, |
modified extensions/cli/src/ui/hooks/useUserInput.ts +1 −1
| @@ -76,7 +76,7 @@ | ||
| 76 | 76 | // Handle Ctrl+D to exit |
| 77 | 77 | if (key.ctrl && input === "d") { |
| 78 | 78 | exit(); |
| 79 | - return true; | |
| 79 | + process.exit(0); | |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | // Handle Ctrl+L to refresh screen (clear terminal artifacts) |