diff --git a/web/src/pages/index.tsx b/web/src/pages/index.tsx index 20511b3..80e3e03 100644 --- a/web/src/pages/index.tsx +++ b/web/src/pages/index.tsx @@ -24,7 +24,7 @@ type AssistantEntry = { role: "assistant"; content: string; display_content: string; - citations: Citation[]; + citations: Map; } type Entry = UserEntry | AssistantEntry; @@ -83,8 +83,8 @@ const ShowEntry: React.FC<{entry: Entry}> = ({entry}) => { return text.trim(); } i = parseInt(text) - 1; - if (i >= entry.citations.length) return `[${text}]`; - const citation = entry.citations[i]!; + if (!entry.citations.has(i)) return `[${text}]`; + const citation = entry.citations.get(i)!; return ( ); @@ -93,7 +93,7 @@ const ShowEntry: React.FC<{entry: Entry}> = ({entry}) => { }