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

Function readUpdateCache

apps/kimi-code/src/cli/update/cache.ts:23–31  ·  view source on GitHub ↗
(
  filePath: string = getUpdateStateFile(),
)

Source from the content-addressed store, hash-verified

21 .strict();
22
23export async function readUpdateCache(
24 filePath: string = getUpdateStateFile(),
25): Promise<UpdateCache> {
26 try {
27 return await readJsonFile(filePath, UpdateCacheSchema, emptyUpdateCache());
28 } catch {
29 return emptyUpdateCache();
30 }
31}
32
33export async function writeUpdateCache(
34 value: UpdateCache,

Callers 2

cache.test.tsFile · 0.90
runUpdatePreflightFunction · 0.90

Calls 3

getUpdateStateFileFunction · 0.90
readJsonFileFunction · 0.90
emptyUpdateCacheFunction · 0.90

Tested by

no test coverage detected