also looking at this
feat: let a text switch one thread between Claude and Codex
#52
16 files
+316
-27
| @@ -3,7 +3,7 @@ | ||
| 3 | 3 | * message matches ("stop", "/stop", "Stop."), so "stop the dev server in |
| 4 | 4 | * ~/Code/x" still reaches the agent as a task. |
| 5 | 5 | */ |
| 6 | export type ControlCommand = 'help' | 'status' | 'stop' | 'new' | 'more' | 'ping' | |
| 6 | export type ControlCommand = 'help' | 'status' | 'stop' | 'new' | 'more' | 'ping' | 'claude' | 'codex' | |
| 7 | 7 | |
| 8 | 8 | const ALIASES: Record<string, ControlCommand> = { |
| 9 | 9 | 'help': 'help', |
| @@ -19,6 +19,10 @@ const ALIASES: Record<string, ControlCommand> = { | ||
| 19 | 19 | 'more': 'more', |
| 20 | 20 | 'continue reply': 'more', |
| 21 | 21 | 'ping': 'ping', |
| 22 | // Switching engines is a whole-message word like the rest, so "codex keeps | |
| 23 | // timing out on ~/Code/x" is still a task and not a switch. | |
| 24 | 'claude': 'claude', | |
| 25 | 'codex': 'codex', | |
| 22 | 26 | } |
| 23 | 27 | |
| 24 | 28 | export function parseControl(text: string): ControlCommand | null { |
| @@ -33,4 +37,5 @@ export const HELP_TEXT = [ | ||
| 33 | 37 | 'new - start a fresh conversation', |
| 34 | 38 | 'more - rest of a long reply', |
| 35 | 39 | 'ping - check I am alive', |
| 40 | 'claude / codex - switch this thread to that agent', | |
| 36 | 41 | ].join('\n') |