also looking at this
feat: let a text switch one thread between Claude and Codex
#52
16 files
+316
-27
| @@ -8,7 +8,7 @@ import { homedir } from 'node:os' | ||
| 8 | 8 | import { join } from 'node:path' |
| 9 | 9 | import process from 'node:process' |
| 10 | 10 | import { loadConfig } from './config' |
| 11 | import { allEngines, selectedEngine } from './engines' | |
| 11 | import { allEngines, engineFor, selectedEngine } from './engines' | |
| 12 | 12 | import { formatDuration, truncate } from './format' |
| 13 | 13 | import { MessagesAccessError, MessagesDb } from './messages-db' |
| 14 | 14 | import { AppleScriptSender } from './sender' |
| @@ -300,7 +300,9 @@ export async function startDesktopAgent(options: { version: string }): Promise<D | ||
| 300 | 300 | // license. |
| 301 | 301 | if (!isLicensed(license)) |
| 302 | 302 | return |
| 303 | uplink = new Uplink({ config, messages, sender, engine: selectedEngine(config), store }) | |
| 303 | // `engineFor` as well as `engine`, so a thread that texts "codex" can | |
| 304 | // reach the other one without restarting the agent. | |
| 305 | uplink = new Uplink({ config, messages, sender, engine: selectedEngine(config), engineFor: id => engineFor(id, config), store }) | |
| 304 | 306 | await uplink.start() |
| 305 | 307 | } |
| 306 | 308 | |