MCPcopy Index your code
hub / github.com/simstudioai/sim / normalizeMessages

Function normalizeMessages

apps/sim/hooks/queries/mothership-chats.ts:114–120  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

112}
113
114function normalizeMessages(value: unknown): PersistedMessage[] {
115 if (!Array.isArray(value)) {
116 return []
117 }
118
119 return value.filter(isRecordLike).map((message) => normalizeMessage(message))
120}
121
122function parseResource(value: unknown, context: string): MothershipResource {
123 assertValid(isRecordLike(value), `${context} must be an object`)

Callers 1

parseChatHistoryFunction · 0.85

Calls 1

normalizeMessageFunction · 0.90

Tested by

no test coverage detected