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

Function hasFreshActiveInstall

apps/kimi-code/src/cli/update/preflight.ts:334–340  ·  view source on GitHub ↗
(state: UpdateInstallState, target: UpdateTarget)

Source from the content-addressed store, hash-verified

332}
333
334function hasFreshActiveInstall(state: UpdateInstallState, target: UpdateTarget): boolean {
335 const active = state.active;
336 if (active === null || active.version !== target.version) return false;
337 const startedAt = Date.parse(active.startedAt);
338 if (!Number.isFinite(startedAt)) return false;
339 return Date.now() - startedAt < AUTO_INSTALL_ACTIVE_TTL_MS;
340}
341
342async function showPendingBackgroundInstallNotice(
343 state: UpdateInstallState,

Callers 2

startBackgroundInstallFunction · 0.85

Calls 1

nowMethod · 0.65

Tested by

no test coverage detected