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

Function loadWorkdirs

packages/migration-legacy/src/sessions/index.ts:225–233  ·  view source on GitHub ↗
(sourceHome: string)

Source from the content-addressed store, hash-verified

223}
224
225async function loadWorkdirs(sourceHome: string): Promise<WorkdirMeta[]> {
226 try {
227 const text = await readFile(sourceKimiJson(sourceHome), 'utf-8');
228 const parsed = OldKimiJsonSchema.parse(JSON.parse(text));
229 return parsed.work_dirs.map((w) => ({ path: w.path, kaos: w.kaos }));
230 } catch {
231 return [];
232 }
233}
234
235async function readWireMtime(sessionDir: string): Promise<number> {
236 try {

Callers 1

migrateSessionsStepFunction · 0.85

Calls 2

sourceKimiJsonFunction · 0.85
readFileFunction · 0.50

Tested by

no test coverage detected