WP15: Create InteractiveMode using AgentSession

This commit is contained in:
Mario Zechner 2025-12-09 00:34:44 +01:00
parent e9f6de7cb8
commit 0020de8518
3 changed files with 1527 additions and 18 deletions

View file

@ -1461,24 +1461,24 @@ constructor(
5. Manual test: Bash execution works 5. Manual test: Bash execution works
6. Manual test: Model/thinking cycling works 6. Manual test: Model/thinking cycling works
- [ ] Create `src/modes/interactive/` directory - [x] Create `src/modes/interactive/` directory
- [ ] Copy tui-renderer.ts to interactive-mode.ts - [x] Copy tui-renderer.ts to interactive-mode.ts
- [ ] Rename class to `InteractiveMode` - [x] Rename class to `InteractiveMode`
- [ ] Change constructor to accept AgentSession - [x] Change constructor to accept AgentSession
- [ ] Update all agent access to go through session - [x] Update all agent access to go through session
- [ ] Remove `subscribeToAgent()` method (use session.subscribe) - [x] Remove `subscribeToAgent()` method (use session.subscribe)
- [ ] Remove `checkAutoCompaction()` method (handled by session) - [x] Remove `checkAutoCompaction()` method (handled by session)
- [ ] Update `cycleThinkingLevel()` to use session method - [x] Update `cycleThinkingLevel()` to use session method
- [ ] Update `cycleModel()` to use session method - [x] Update `cycleModel()` to use session method
- [ ] Update bash execution to use session.executeBash() - [x] Update bash execution to use session.executeBash()
- [ ] Update compaction to use session.compact() - [x] Update compaction to use session.compact()
- [ ] Update reset logic to use session.reset() - [x] Update reset logic to use session.reset()
- [ ] Update session switching to use session.switchSession() - [x] Update session switching to use session.switchSession()
- [ ] Update branch logic to use session.branch() - [x] Update branch logic to use session.branch()
- [ ] Remove all direct sessionManager access - [x] Remove all direct sessionManager access (use convenience getters for remaining access)
- [ ] Update imports to point to `../../tui/` for components (keep old components in place for now) - [x] Update imports to point to `../../tui/` for components (keep old components in place for now)
- [ ] Update modes/index.ts to export InteractiveMode - [x] Update modes/index.ts to export InteractiveMode
- [ ] Verify with `npm run check` - [x] Verify with `npm run check`
- [ ] Manual test interactive mode via cli-new.ts - [ ] Manual test interactive mode via cli-new.ts
--- ---

View file

@ -2,6 +2,7 @@
* Run modes for the coding agent. * Run modes for the coding agent.
*/ */
export { InteractiveMode } from "./interactive/interactive-mode.js";
export { runPrintMode } from "./print-mode.js"; export { runPrintMode } from "./print-mode.js";
export { runRpcMode } from "./rpc-mode.js"; export { runRpcMode } from "./rpc-mode.js";
// InteractiveMode will be added in WP15 // InteractiveMode will be added in WP15

File diff suppressed because it is too large Load diff