ReviewOS

also looking at this

stacks/uplink

feat: let a text switch one thread between Claude and Codex

#52
Merged glennmichael123 wants to merge feat/per-thread-engine into main
16 files +316 -27
app/Uplink/desktop-agent.tsmodified+4-2
Changes to app/Uplink/desktop-agent.ts
@@ -8,7 +8,7 @@ import { homedir } from 'node:os'
88import { join } from 'node:path'
99import process from 'node:process'
1010import { loadConfig } from './config'
11import { allEngines, selectedEngine } from './engines'
11import { allEngines, engineFor, selectedEngine } from './engines'
1212import { formatDuration, truncate } from './format'
1313import { MessagesAccessError, MessagesDb } from './messages-db'
1414import { AppleScriptSender } from './sender'
@@ -300,7 +300,9 @@ export async function startDesktopAgent(options: { version: string }): Promise<D
300300 // license.
301301 if (!isLicensed(license))
302302 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 })
304306 await uplink.start()
305307 }
306308