MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / registerDoctorCommand

Function registerDoctorCommand

apps/kimi-code/src/cli/sub/doctor.ts:81–104  ·  view source on GitHub ↗
(parent: Command, deps?: Partial<DoctorDeps>)

Source from the content-addressed store, hash-verified

79}
80
81export function registerDoctorCommand(parent: Command, deps?: Partial<DoctorDeps>): void {
82 const doctor = parent
83 .command('doctor')
84 .description('Validate Kimi Code configuration files.')
85 .action(async () => {
86 await runDoctorCommand(deps, {});
87 });
88
89 doctor
90 .command('config')
91 .description('Validate config.toml.')
92 .argument('[path]', 'Validate this file as config.toml instead of the default path.')
93 .action(async (path: string | undefined) => {
94 await runDoctorCommand(deps, { target: 'config', path });
95 });
96
97 doctor
98 .command('tui')
99 .description('Validate tui.toml.')
100 .argument('[path]', 'Validate this file as tui.toml instead of the default path.')
101 .action(async (path: string | undefined) => {
102 await runDoctorCommand(deps, { target: 'tui', path });
103 });
104}
105
106async function runDoctorCommand(
107 deps: Partial<DoctorDeps> | undefined,

Callers 2

doctor.test.tsFile · 0.90
createProgramFunction · 0.90

Calls 1

runDoctorCommandFunction · 0.85

Tested by

no test coverage detected