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

Function hashMessage

src/utils/telemetry/betaSessionTracing.ts:137–140  ·  view source on GitHub ↗

* Generate a hash for a message based on its content.

(message: APIMessage)

Source from the content-addressed store, hash-verified

135 * Generate a hash for a message based on its content.
136 */
137function hashMessage(message: APIMessage): string {
138 const content = jsonStringify(message.message.content)
139 return `msg_${shortHash(content)}`
140}
141
142// Regex to detect content wrapped in <system-reminder> tags
143const SYSTEM_REMINDER_REGEX =

Callers 1

Calls 2

jsonStringifyFunction · 0.85
shortHashFunction · 0.85

Tested by

no test coverage detected