refactor(coding-agent): simplify InteractiveMode API

- Replace 11-param runInteractiveMode with InteractiveModeOptions
- Add InteractiveMode.run() that handles init, warnings, prompts, and loop
- Move version check, changelog loading, fdPath discovery inside InteractiveMode
- Detect resumed sessions via session.state.messages.length
- Export InteractiveModeOptions from modes/index.ts
This commit is contained in:
Mario Zechner 2026-01-08 01:38:12 +01:00
parent cb3ac0ba9e
commit 5d39074a35
3 changed files with 162 additions and 141 deletions

View file

@ -2,7 +2,7 @@
* Run modes for the coding agent.
*/
export { InteractiveMode } from "./interactive/interactive-mode.js";
export { InteractiveMode, type InteractiveModeOptions } from "./interactive/interactive-mode.js";
export { runPrintMode } from "./print-mode.js";
export { type ModelInfo, RpcClient, type RpcClientOptions, type RpcEventListener } from "./rpc/rpc-client.js";
export { runRpcMode } from "./rpc/rpc-mode.js";