diff --git a/web/src/app/chat/documentSidebar/ChatDocumentDisplay.tsx b/web/src/app/chat/documentSidebar/ChatDocumentDisplay.tsx index 6962cfc5cb2..bf48113769c 100644 --- a/web/src/app/chat/documentSidebar/ChatDocumentDisplay.tsx +++ b/web/src/app/chat/documentSidebar/ChatDocumentDisplay.tsx @@ -11,6 +11,7 @@ import { MetadataBadge } from "@/components/MetadataBadge"; import faviconFetch from "favicon-fetch"; import { useContext } from "react"; import { SettingsContext } from "@/components/settings/SettingsProvider"; +import { ResultSearchIcon } from "@/components/SearchIcon"; interface DocumentDisplayProps { document: DanswerDocument; @@ -72,11 +73,6 @@ export function ChatDocumentDisplay({ return null; } - const faviconUrl = - (isInternet || document.source_type === "web") && document.link - ? faviconFetch({ uri: document.link }) - : null; - return (
- {faviconUrl ? ( - Favicon + {document.is_internet || document.source_type === "web" ? ( + ) : ( )} diff --git a/web/src/app/chat/message/Messages.tsx b/web/src/app/chat/message/Messages.tsx index 94d0fecf13e..97383ac919c 100644 --- a/web/src/app/chat/message/Messages.tsx +++ b/web/src/app/chat/message/Messages.tsx @@ -43,6 +43,7 @@ import { GithubIcon, GlobeIcon, LikeFeedbackIcon, + SearchIcon, } from "@/components/icons/icons"; import { CustomTooltip, @@ -70,6 +71,7 @@ import FirstSourceCard, { SeeMoreBlock, } from "@/components/chat_search/sources/firstsourcecard"; import { getSourceMetadata, SOURCE_METADATA_MAP } from "@/lib/sources"; +import { ResultSearchIcon } from "@/components/SearchIcon"; const TOOLS_WITH_CUSTOM_HANDLING = [ SEARCH_TOOL_NAME, @@ -332,13 +334,7 @@ export const AIMessage = ({ const icon = associatedDoc?.source_type == "web" ? ( - favicon + ) : ( getIcon( associatedDoc?.source_type || "web", diff --git a/web/src/components/SearchIcon.tsx b/web/src/components/SearchIcon.tsx new file mode 100644 index 00000000000..3411a4adc91 --- /dev/null +++ b/web/src/components/SearchIcon.tsx @@ -0,0 +1,11 @@ +export function ResultSearchIcon({ url }: { url: string }) { + return ( + favicon + ); +} diff --git a/web/src/components/chat_search/sources/firstsourcecard.tsx b/web/src/components/chat_search/sources/firstsourcecard.tsx index ed69bf44fa6..3df7c207709 100644 --- a/web/src/components/chat_search/sources/firstsourcecard.tsx +++ b/web/src/components/chat_search/sources/firstsourcecard.tsx @@ -1,3 +1,4 @@ +import { ResultSearchIcon } from "@/components/SearchIcon"; import { SearchResultIcon } from "@/components/SearchResultIcon"; import { SourceIcon } from "@/components/SourceIcon"; import { DanswerDocument } from "@/lib/search/interfaces"; @@ -13,7 +14,7 @@ export default function FirstSourceCard({ doc }: { doc: DanswerDocument }) { >
{doc.is_internet || doc.source_type === "web" ? ( - + ) : ( )}