(command: ParsedGraphCommand, idleMs: number)
| 2275 | }; |
| 2276 | |
| 2277 | const runGraphCommand = (command: ParsedGraphCommand, idleMs: number) => { |
| 2278 | if (command.kind === 'status') { |
| 2279 | showGraphStatus(); |
| 2280 | return; |
| 2281 | } |
| 2282 | if (command.kind === 'set_mode') { |
| 2283 | void runControl(() => setGraphMode(command.mode)); |
| 2284 | return; |
| 2285 | } |
| 2286 | if (input.firstRun) { |
| 2287 | void showSetupWizard(); |
| 2288 | return; |
| 2289 | } |
| 2290 | lastActivityAt = Date.now(); |
| 2291 | promptSeq += 1; |
| 2292 | maybeTriggerAutoRecap(idleMs); |
| 2293 | state.entries.push({ |
| 2294 | kind: 'notice', |
| 2295 | level: 'info', |
| 2296 | text: 'Using Graph Mode for this turn only.', |
| 2297 | }); |
| 2298 | void runAgentTurn({ |
| 2299 | kind: 'external', |
| 2300 | prompt: command.task, |
| 2301 | sessionId: input.driver.getSessionId(), |
| 2302 | turnOrchestration: { mode: 'graph', source: 'slash_command' }, |
| 2303 | }); |
| 2304 | }; |
| 2305 | |
| 2306 | const moveSession = async (targetCwd: string): Promise<void> => { |
| 2307 | if (!input.driver.moveSession) { |
no test coverage detected