MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / cleanupTaskOutput

Function cleanupTaskOutput

source code/utils/task/diskOutput.ts:380–396  ·  view source on GitHub ↗
(taskId: string)

Source from the content-addressed store, hash-verified

378 * Clean up a task's output file and write queue.
379 */
380export async function cleanupTaskOutput(taskId: string): Promise<void> {
381 const output = outputs.get(taskId)
382 if (output) {
383 output.cancel()
384 outputs.delete(taskId)
385 }
386
387 try {
388 await unlink(getTaskOutputPath(taskId))
389 } catch (e) {
390 const code = getErrnoCode(e)
391 if (code === 'ENOENT') {
392 return
393 }
394 logError(e)
395 }
396}
397
398/**
399 * Initialize output file for a new task.

Callers

nothing calls this directly

Calls 7

unlinkFunction · 0.85
getTaskOutputPathFunction · 0.85
getErrnoCodeFunction · 0.85
cancelMethod · 0.80
deleteMethod · 0.80
logErrorFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected