MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / toRuntimeMessage

Function toRuntimeMessage

src/stores/aiChat.ts:259–268  ·  view source on GitHub ↗
(msg: PersistedAIMessage)

Source from the content-addressed store, hash-verified

257}
258
259function 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
270function createAIChatBuffer(assistantId: string | null = null): AIChatBuffer {
271 return {

Callers 3

loadAIChatFunction · 0.85
saveAIChatMessagesFunction · 0.85
editCurrentRoundOnlyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected