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

Function removeTempDir

packages/node-sdk/test/session-prompt-events.test.ts:79–94  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

77}
78
79async function removeTempDir(dir: string): Promise<void> {
80 for (let attempt = 0; attempt < 10; attempt += 1) {
81 try {
82 await rm(dir, { recursive: true, force: true });
83 return;
84 } catch (error) {
85 const code = (error as NodeJS.ErrnoException).code;
86 if (code !== 'ENOTEMPTY' && code !== 'EBUSY' && code !== 'EPERM') {
87 throw error;
88 }
89 await delay(10);
90 }
91 }
92
93 await rm(dir, { recursive: true, force: true });
94}
95
96describe('Session.prompt events', () => {
97 it('persists sanitized prompt metadata without marking the title custom', async () => {

Callers 1

Calls 1

delayFunction · 0.85

Tested by

no test coverage detected