(conversationId: string, message: Message)
| 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] |
no outgoing calls
no test coverage detected