mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-05-21 17:20:07 +02:00
parent
61facfb0a8
commit
fce81ebb60
@ -54,6 +54,7 @@ export const SourceCard: React.FC<{
|
|||||||
|
|
||||||
<div className="flex items-center gap-1 mt-1">
|
<div className="flex items-center gap-1 mt-1">
|
||||||
<ResultIcon doc={document} size={18} />
|
<ResultIcon doc={document} size={18} />
|
||||||
|
|
||||||
<div className="text-text-700 text-xs leading-tight truncate flex-1 min-w-0">
|
<div className="text-text-700 text-xs leading-tight truncate flex-1 min-w-0">
|
||||||
{truncatedIdentifier}
|
{truncatedIdentifier}
|
||||||
</div>
|
</div>
|
||||||
|
@ -49,7 +49,7 @@ export function SearchResultIcon({ url }: { url: string }) {
|
|||||||
if (!faviconUrl) {
|
if (!faviconUrl) {
|
||||||
return <SourceIcon sourceType={ValidSources.Web} iconSize={18} />;
|
return <SourceIcon sourceType={ValidSources.Web} iconSize={18} />;
|
||||||
}
|
}
|
||||||
if (url.includes("docs.onyx.app")) {
|
if (url.includes("onyx.app")) {
|
||||||
return <OnyxIcon size={18} className="dark:text-[#fff] text-[#000]" />;
|
return <OnyxIcon size={18} className="dark:text-[#fff] text-[#000]" />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,12 +17,11 @@ export function WebResultIcon({
|
|||||||
try {
|
try {
|
||||||
hostname = new URL(url).hostname;
|
hostname = new URL(url).hostname;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// console.log(e);
|
hostname = "onyx.app";
|
||||||
hostname = "docs.onyx.app";
|
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{hostname == "docs.onyx.app" ? (
|
{hostname.includes("onyx.app") ? (
|
||||||
<OnyxIcon size={size} className="dark:text-[#fff] text-[#000]" />
|
<OnyxIcon size={size} className="dark:text-[#fff] text-[#000]" />
|
||||||
) : !error ? (
|
) : !error ? (
|
||||||
<img
|
<img
|
||||||
|
@ -26,35 +26,6 @@ export const ResultIcon = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
// export default function SourceCard({
|
|
||||||
// doc,
|
|
||||||
// setPresentingDocument,
|
|
||||||
// }: {
|
|
||||||
// doc: OnyxDocument;
|
|
||||||
// setPresentingDocument?: (document: OnyxDocument) => void;
|
|
||||||
// }) {
|
|
||||||
// return (
|
|
||||||
// <div
|
|
||||||
// key={doc.document_id}
|
|
||||||
// onClick={() => openDocument(doc, setPresentingDocument)}
|
|
||||||
// className="cursor-pointer h-[80px] text-left overflow-hidden flex flex-col gap-0.5 rounded-lg px-3 py-2 bg-accent-background hover:bg-accent-background-hovered w-[200px]"
|
|
||||||
// >
|
|
||||||
// <div className="line-clamp-1 font-semibold text-ellipsis text-text-900 flex h-6 items-center gap-2 text-sm">
|
|
||||||
// {doc.is_internet || doc.source_type === "web" ? (
|
|
||||||
// <WebResultIcon url={doc.link} />
|
|
||||||
// ) : (
|
|
||||||
// <SourceIcon sourceType={doc.source_type} iconSize={18} />
|
|
||||||
// )}
|
|
||||||
// <p>{truncateString(doc.semantic_identifier || doc.document_id, 20)}</p>
|
|
||||||
// </div>
|
|
||||||
// <div className="line-clamp-2 text-sm font-semibold"></div>
|
|
||||||
// <div className="line-clamp-2 text-sm font-normal leading-snug text-text-700">
|
|
||||||
// {doc.blurb}
|
|
||||||
// </div>
|
|
||||||
// </div>
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
interface SeeMoreBlockProps {
|
interface SeeMoreBlockProps {
|
||||||
toggleDocumentSelection: () => void;
|
toggleDocumentSelection: () => void;
|
||||||
docs: OnyxDocument[];
|
docs: OnyxDocument[];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user