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

Function createDefaultUpgradeDeps

apps/kimi-code/src/cli/sub/upgrade.ts:175–188  ·  view source on GitHub ↗
(overrides: Partial<UpgradeDeps>)

Source from the content-addressed store, hash-verified

173}
174
175function createDefaultUpgradeDeps(overrides: Partial<UpgradeDeps>): UpgradeDeps {
176 return {
177 refreshUpdateCache: overrides.refreshUpdateCache ?? (() => refreshUpdateCache()),
178 detectInstallSource: overrides.detectInstallSource ?? (() => detectInstallSource()),
179 installUpdate: overrides.installUpdate ?? installUpdateForeground,
180 promptForInstallChoice: overrides.promptForInstallChoice ?? promptForInstallChoice,
181 platform: overrides.platform ?? process.platform,
182 stdout: overrides.stdout ?? process.stdout,
183 stderr: overrides.stderr ?? process.stderr,
184 isInteractive: overrides.isInteractive ?? (process.stdin.isTTY && process.stdout.isTTY),
185 track: overrides.track ?? trackTelemetry,
186 logger: overrides.logger ?? log,
187 };
188}
189
190function formatDisplayVersion(version: string): string {
191 return version.startsWith('v') ? version : `v${version}`;

Callers 1

handleUpgradeFunction · 0.85

Calls 2

refreshUpdateCacheFunction · 0.90
detectInstallSourceFunction · 0.90

Tested by

no test coverage detected