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

Function registerKillCommand

apps/kimi-code/src/cli/sub/server/kill.ts:47–59  ·  view source on GitHub ↗
(server: Command)

Source from the content-addressed store, hash-verified

45}
46
47export function registerKillCommand(server: Command): void {
48 server
49 .command('kill')
50 .description('Stop the running Kimi server (graceful API + forced PID kill).')
51 .action(async () => {
52 try {
53 await handleKillCommand(DEFAULT_KILL_DEPS);
54 } catch (error) {
55 process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
56 process.exit(1);
57 }
58 });
59}
60
61export async function handleKillCommand(deps: KillCommandDeps): Promise<void> {
62 const lock = deps.getLiveLock();

Callers 1

registerServerCommandFunction · 0.90

Calls 3

handleKillCommandFunction · 0.85
writeMethod · 0.65
exitMethod · 0.65

Tested by

no test coverage detected