mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-04 22:02:16 +02:00
Revert "Merge pull request #1523 from CREDO23/fix/chat-citations"
This reverts commitcd2242147a, reversing changes made toa4bb0a5253.
This commit is contained in:
parent
fb955d3201
commit
a08de01cc7
53 changed files with 410 additions and 1788 deletions
|
|
@ -1,7 +1,7 @@
|
|||
"use client";
|
||||
|
||||
import type { ReactNode } from "react";
|
||||
import { InlineCitation, LineCitation, UrlCitation } from "@/components/assistant-ui/inline-citation";
|
||||
import { InlineCitation, UrlCitation } from "@/components/assistant-ui/inline-citation";
|
||||
import {
|
||||
type CitationToken,
|
||||
type CitationUrlMap,
|
||||
|
|
@ -21,16 +21,6 @@ export function renderCitationToken(token: CitationToken, ordinalKey: number): R
|
|||
if (token.kind === "url") {
|
||||
return <UrlCitation key={`citation-url-${ordinalKey}`} url={token.url} />;
|
||||
}
|
||||
if (token.kind === "line") {
|
||||
return (
|
||||
<LineCitation
|
||||
key={`citation-line-${token.documentId}-${token.startLine}-${ordinalKey}`}
|
||||
documentId={token.documentId}
|
||||
startLine={token.startLine}
|
||||
endLine={token.endLine}
|
||||
/>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<InlineCitation
|
||||
key={`citation-${token.isDocsChunk ? "doc-" : ""}${token.chunkId}-${ordinalKey}`}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue