MCPcopy Create free account
hub / github.com/TanStack/ai / normalizeMessageSource

Function normalizeMessageSource

packages/ai-devtools/src/store/ai-context.tsx:788–793  ·  view source on GitHub ↗
(
    source: unknown,
    fallback: 'client' | 'server',
  )

Source from the content-addressed store, hash-verified

786 }
787
788 function normalizeMessageSource(
789 source: unknown,
790 fallback: 'client' | 'server',
791 ): 'client' | 'server' {
792 return source === 'client' || source === 'server' ? source : fallback
793 }
794
795 function stringifyToolArguments(value: unknown): string {
796 if (typeof value === 'string') return value

Callers 2

AIProviderFunction · 0.85
recordStructuredOutputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected