MCPcopy Create free account
hub / github.com/cortexkit/magic-context / dispatchDoctor

Function dispatchDoctor

packages/cli/src/commands/doctor.ts:70–88  ·  view source on GitHub ↗
(adapter: HarnessAdapter, options: RunDoctorOptions)

Source from the content-addressed store, hash-verified

68}
69
70async function dispatchDoctor(adapter: HarnessAdapter, options: RunDoctorOptions): Promise<number> {
71 switch (adapter.kind) {
72 // v22 backfill flags are handled once in runDoctor (shared DB), so the
73 // per-harness doctors below are NOT forwarded them — that's what
74 // prevented the doubled-output bug when both harnesses are installed.
75 case "opencode": {
76 return runOpenCodeDoctor({
77 force: options.force,
78 issue: options.issue,
79 });
80 }
81 case "pi": {
82 const piArgs: string[] = [];
83 if (options.force) piArgs.push("--force");
84 if (options.issue) piArgs.push("--issue");
85 return runPiDoctor(piArgs);
86 }
87 }
88}
89
90/**
91 * Interactive cache-clear flow. Presents one combined picker showing

Callers 1

runDoctorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected