MCPcopy
hub / github.com/claude-code-best/claude-code / cleanupTaskOutput

Function cleanupTaskOutput

src/utils/task/diskOutput.ts:378–394  ·  view source on GitHub ↗
(taskId: string)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected