MCPcopy Create free account
hub / github.com/Noumena-Network/code / appendToFile

Function appendToFile

src/services/api/dumpPrompts.ts:69–76  ·  view source on GitHub ↗
(filePath: string, entries: string[])

Source from the content-addressed store, hash-verified

67}
68
69function appendToFile(filePath: string, entries: string[]): void {
70 if (entries.length === 0 || disabledDumpPromptPaths.has(filePath)) return
71 fs.mkdir(dirname(filePath), { recursive: true })
72 .then(() => fs.appendFile(filePath, entries.join('\n') + '\n'))
73 .catch(() => {
74 disabledDumpPromptPaths.add(filePath)
75 })
76}
77
78function initFingerprint(req: Record<string, unknown>): string {
79 const tools = req.tools as Array<{ name?: string }> | undefined

Callers 1

dumpRequestFunction · 0.85

Calls 2

hasMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected