(parent: Command, deps?: Partial<DoctorDeps>)
| 79 | } |
| 80 | |
| 81 | export 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 | |
| 106 | async function runDoctorCommand( |
| 107 | deps: Partial<DoctorDeps> | undefined, |
no test coverage detected