MCPcopy Create free account
hub / github.com/apache/maka / runGraphCommand

Function runGraphCommand

packages/cli/src/pi-tui-runner.ts:2277–2304  ·  view source on GitHub ↗
(command: ParsedGraphCommand, idleMs: number)

Source from the content-addressed store, hash-verified

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) {

Callers 1

runMakaPiTuiFunction · 0.85

Calls 9

showGraphStatusFunction · 0.85
runControlFunction · 0.85
showSetupWizardFunction · 0.85
maybeTriggerAutoRecapFunction · 0.85
runAgentTurnFunction · 0.85
setGraphModeFunction · 0.70
nowMethod · 0.65
pushMethod · 0.65
getSessionIdMethod · 0.65

Tested by

no test coverage detected