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

Function selectUpdateTarget

apps/kimi-code/src/cli/update/select.ts:5–13  ·  view source on GitHub ↗
(
  currentVersion: string,
  latest: string | null,
)

Source from the content-addressed store, hash-verified

3import { type UpdateTarget } from './types';
4
5export function selectUpdateTarget(
6 currentVersion: string,
7 latest: string | null,
8): UpdateTarget | null {
9 if (latest === null) return null;
10 if (valid(currentVersion) === null || valid(latest) === null) return null;
11 if (!gt(latest, currentVersion)) return null;
12 return { version: latest };
13}

Callers 3

select.test.tsFile · 0.90
handleUpgradeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected