mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-03-26 01:31:51 +01:00
parent
61facfb0a8
commit
fce81ebb60
@ -54,6 +54,7 @@ export const SourceCard: React.FC<{
|
||||
|
||||
<div className="flex items-center gap-1 mt-1">
|
||||
<ResultIcon doc={document} size={18} />
|
||||
|
||||
<div className="text-text-700 text-xs leading-tight truncate flex-1 min-w-0">
|
||||
{truncatedIdentifier}
|
||||
</div>
|
||||
|
@ -49,7 +49,7 @@ export function SearchResultIcon({ url }: { url: string }) {
|
||||
if (!faviconUrl) {
|
||||
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]" />;
|
||||
}
|
||||
|
||||
|
@ -17,12 +17,11 @@ export function WebResultIcon({
|
||||
try {
|
||||
hostname = new URL(url).hostname;
|
||||
} catch (e) {
|
||||
// console.log(e);
|
||||
hostname = "docs.onyx.app";
|
||||
hostname = "onyx.app";
|
||||
}
|
||||
return (
|
||||
<>
|
||||
{hostname == "docs.onyx.app" ? (
|
||||
{hostname.includes("onyx.app") ? (
|
||||
<OnyxIcon size={size} className="dark:text-[#fff] text-[#000]" />
|
||||
) : !error ? (
|
||||
<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 {
|
||||
toggleDocumentSelection: () => void;
|
||||
docs: OnyxDocument[];
|
||||
|
Loading…
x
Reference in New Issue
Block a user