MCPcopy Index your code
hub / github.com/TanStack/ai / normalizeMessageInput

Method normalizeMessageInput

packages/ai-client/src/chat-client.ts:800–808  ·  view source on GitHub ↗

* Normalize the message input to extract content and optional id. * Trims string content automatically.

(input: string | MultimodalContent)

Source from the content-addressed store, hash-verified

798 * Trims string content automatically.
799 */
800 private normalizeMessageInput(input: string | MultimodalContent): {
801 content: string | Array<ContentPart>
802 id?: string
803 } {
804 if (typeof input === 'string') {
805 return { content: input.trim() }
806 }
807 return { content: input.content, id: input.id }
808 }
809
810 /**
811 * Append a message and stream the response

Callers 1

sendMessageMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected