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

Function addMessage

packages/ai-devtools/src/store/ai-context.tsx:458–468  ·  view source on GitHub ↗
(conversationId: string, message: Message)

Source from the content-addressed store, hash-verified

456 }
457
458 function addMessage(conversationId: string, message: Message): void {
459 const conv = state.conversations[conversationId]
460 if (!conv) return
461 setState(
462 'conversations',
463 conversationId,
464 'messages',
465 conv.messages.length,
466 message,
467 )
468 }
469
470 function addChunkToMessage(conversationId: string, chunk: Chunk): void {
471 const conv = state.conversations[conversationId]

Callers 3

ensureMessageForChunkFunction · 0.85
AIProviderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected