MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / deserializeMessage

Method deserializeMessage

server/src/db/si-db.ts:783–801  ·  view source on GitHub ↗
(row: Record<string, unknown>)

Source from the content-addressed store, hash-verified

781 }
782
783 private deserializeMessage(row: Record<string, unknown>): SiSessionMessage {
784 return {
785 id: row.id as string,
786 session_id: row.session_id as string,
787 role: row.role as "user" | "brand_agent" | "system",
788 content: row.content as string,
789 ui_elements: row.ui_elements
790 ? typeof row.ui_elements === "string"
791 ? JSON.parse(row.ui_elements as string)
792 : row.ui_elements
793 : null,
794 action_response: row.action_response
795 ? typeof row.action_response === "string"
796 ? JSON.parse(row.action_response as string)
797 : row.action_response
798 : null,
799 created_at: new Date(row.created_at as string),
800 };
801 }
802
803 private deserializeRelationship(
804 row: Record<string, unknown>

Callers 2

addMessageMethod · 0.95
getSessionMessagesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected