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

Function parseIdleGraceMs

apps/kimi-code/src/cli/sub/server/shared.ts:109–116  ·  view source on GitHub ↗
(raw: string | undefined)

Source from the content-addressed store, hash-verified

107}
108
109function parseIdleGraceMs(raw: string | undefined): number {
110 if (raw === undefined) return DEFAULT_IDLE_GRACE_MS;
111 const n = Number.parseInt(raw, 10);
112 if (!Number.isFinite(n) || n < 0) {
113 throw new Error(`error: invalid --idle-grace-ms value: ${raw}`);
114 }
115 return n;
116}
117
118export function parsePort(raw: string | undefined, label: string, fallback: number): number {
119 if (raw === undefined) return fallback;

Callers 1

parseServerOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected