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

Function formatDaemonBootFailure

apps/kimi-code/src/cli/sub/server/daemon.ts:371–380  ·  view source on GitHub ↗
(
  exit: { code: number | null; signal: NodeJS.Signals | null },
  logPath: string,
)

Source from the content-addressed store, hash-verified

369}
370
371function formatDaemonBootFailure(
372 exit: { code: number | null; signal: NodeJS.Signals | null },
373 logPath: string,
374): string {
375 const reason =
376 exit.signal === null
377 ? `exited with code ${String(exit.code)}`
378 : `was terminated by signal ${exit.signal}`;
379 return `Kimi server daemon ${reason} during startup.\n\n${formatLogTail(logPath)}`;
380}
381
382function formatLogTail(logPath: string): string {
383 const tail = tailFile(logPath, 30);

Callers 1

ensureDaemonFunction · 0.85

Calls 1

formatLogTailFunction · 0.85

Tested by

no test coverage detected