(msg: PersistedAIMessage)
| 257 | } |
| 258 | |
| 259 | function toRuntimeMessage(msg: PersistedAIMessage): ChatMessage { |
| 260 | return { |
| 261 | id: msg.id, |
| 262 | role: msg.role, |
| 263 | content: msg.content, |
| 264 | timestamp: msg.timestamp * 1000, |
| 265 | parentId: msg.parentId, |
| 266 | contentBlocks: msg.contentBlocks as ContentBlock[] | undefined, |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | function createAIChatBuffer(assistantId: string | null = null): AIChatBuffer { |
| 271 | return { |
no outgoing calls
no test coverage detected