MCPcopy Create free account
hub / github.com/codeaashu/claude-code / initFingerprint

Function initFingerprint

src/services/api/dumpPrompts.ts:74–88  ·  view source on GitHub ↗
(req: Record<string, unknown>)

Source from the content-addressed store, hash-verified

72}
73
74function initFingerprint(req: Record<string, unknown>): string {
75 const tools = req.tools as Array<{ name?: string }> | undefined
76 const system = req.system as unknown[] | string | undefined
77 const sysLen =
78 typeof system === 'string'
79 ? system.length
80 : Array.isArray(system)
81 ? system.reduce(
82 (n: number, b) => n + ((b as { text?: string }).text?.length ?? 0),
83 0,
84 )
85 : 0
86 const toolNames = tools?.map(t => t.name ?? '').join(',') ?? ''
87 return `${req.model}|${toolNames}|${sysLen}`
88}
89
90function dumpRequest(
91 body: string,

Callers 1

dumpRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected