MCPcopy Create free account
hub / github.com/simstudioai/sim / parseChatResourcesResponse

Function parseChatResourcesResponse

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

Source from the content-addressed store, hash-verified

179}
180
181function parseChatResourcesResponse(value: unknown): { resources: MothershipResource[] } {
182 assertValid(isRecordLike(value), 'Invalid chat resources response: body must be an object')
183
184 return {
185 resources: parseResources(value.resources, 'Invalid chat resources response: resources'),
186 }
187}
188
189export function mapChat(chat: MothershipChat): MothershipChatMetadata {
190 const updatedAt = new Date(chat.updatedAt)

Callers 3

addChatResourceFunction · 0.85
reorderChatResourcesFunction · 0.85
removeChatResourceFunction · 0.85

Calls 3

isRecordLikeFunction · 0.90
assertValidFunction · 0.85
parseResourcesFunction · 0.85

Tested by

no test coverage detected