MCPcopy Create free account
hub / github.com/tiann/hapi / normalizeUserMessageText

Function normalizeUserMessageText

hub/src/sync/syncEngine.ts:86–89  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

84}
85
86function normalizeUserMessageText(value: string): string | undefined {
87 const text = value.trim().replace(/\s+/g, ' ')
88 return text.length > 0 ? text : undefined
89}
90
91function extractUserMessageText(content: unknown): string | undefined {
92 if (typeof content === 'string') {

Callers 1

extractUserMessageTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected