MCPcopy
hub / github.com/Zleap-AI/SAG / getMessageCitations

Function getMessageCitations

web/src/App.tsx:3551–3560  ·  view source on GitHub ↗
(message: McpMessageRecord)

Source from the content-addressed store, hash-verified

3549}
3550
3551function getMessageCitations(message: McpMessageRecord): AnswerCitation[] {
3552 const value = message.metadata.citations;
3553 if (!Array.isArray(value)) {
3554 return [];
3555 }
3556 return value
3557 .map(normalizeAnswerCitation)
3558 .filter((citation): citation is AnswerCitation => citation !== null)
3559 .slice(0, 5);
3560}
3561
3562function normalizeAnswerCitation(value: unknown): AnswerCitation | null {
3563 if (!isPlainRecord(value)) {

Callers 1

ConversationWorkspaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected