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

Function retrievePastedText

source code/utils/pasteStore.ts:61–72  ·  view source on GitHub ↗
(hash: string)

Source from the content-addressed store, hash-verified

59 * Returns null if not found or on error.
60 */
61export async function retrievePastedText(hash: string): Promise<string | null> {
62 try {
63 const pastePath = getPastePath(hash)
64 return await readFile(pastePath, { encoding: 'utf8' })
65 } catch (error) {
66 // ENOENT is expected when paste doesn't exist
67 if (!isENOENT(error)) {
68 logForDebugging(`Failed to retrieve paste ${hash}: ${error}`)
69 }
70 return null
71 }
72}
73
74/**
75 * Clean up old paste files that are no longer referenced.

Callers 1

Calls 4

getPastePathFunction · 0.85
readFileFunction · 0.85
isENOENTFunction · 0.85
logForDebuggingFunction · 0.85

Tested by

no test coverage detected