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

Function decideUpdateAction

apps/kimi-code/src/cli/update/preflight.ts:654–662  ·  view source on GitHub ↗
(
  target: UpdateTarget | null,
  isInteractive: boolean,
  source: InstallSource,
  platform: NodeJS.Platform,
)

Source from the content-addressed store, hash-verified

652}
653
654export function decideUpdateAction(
655 target: UpdateTarget | null,
656 isInteractive: boolean,
657 source: InstallSource,
658 platform: NodeJS.Platform,
659): UpdateDecision {
660 if (target === null || !isInteractive) return 'none';
661 return canAutoInstall(source, platform) ? 'prompt-install' : 'manual-command';
662}
663
664export async function runUpdatePreflight(
665 currentVersion: string,

Callers 1

runUpdatePreflightFunction · 0.85

Calls 1

canAutoInstallFunction · 0.85

Tested by

no test coverage detected