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

Function makeWorkspace

packages/agent-core/test/skill/scanner.test.ts:1326–1339  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1324});
1325
1326async function makeWorkspace(): Promise<{
1327 readonly homeDir: string;
1328 readonly repoDir: string;
1329 readonly workDir: string;
1330}> {
1331 const tmp = await mkdtemp(path.join(tmpdir(), 'kimi-skill-scanner-'));
1332 tempDirs.push(tmp);
1333 const homeDir = path.join(tmp, 'home');
1334 const repoDir = path.join(tmp, 'repo');
1335 const workDir = path.join(repoDir, 'packages', 'app');
1336 await mkdir(path.join(repoDir, '.git'), { recursive: true });
1337 await mkdir(workDir, { recursive: true });
1338 return { homeDir, repoDir, workDir };
1339}
1340
1341describe('project root discovery (.git walk-up)', () => {
1342 it('walks up to the nearest .git ancestor for project-scope discovery', async () => {

Callers 1

scanner.test.tsFile · 0.85

Calls 3

mkdtempFunction · 0.85
mkdirFunction · 0.50
pushMethod · 0.45

Tested by

no test coverage detected