A desktop coding agent with free access to frontier models.
TypeScript
fix: no third-party icons for search sources
Samrat Talukdar8f4aaa9a468d
diff --git a/apps/app/src/components/tools/websearch.tsx b/apps/app/src/components/tools/websearch.tsxindex c39c1aba..247808dc 100644--- a/apps/app/src/components/tools/websearch.tsx+++ b/apps/app/src/components/tools/websearch.tsx@@ -15,7 +15,7 @@ import {import type { HostedWebSearchToolPart, WebSearchToolPart } from "@/lib/build-in-tools"import { Tool } from "@/components/ui/tool"import { parseWebSearchResults } from "@/lib/websearch-results"-import { hostedWebSearchSummary } from "@/lib/hosted-web-search"+import { hostedWebSearchSummary, shortPageAddress } from "@/lib/hosted-web-search"interface WebsearchToolProps {part: WebSearchToolPart@@ -107,7 +107,7 @@ export function HostedWebSearchTool({ part }: HostedWebSearchToolProps) {{sources.map((url) => (<Source href={url} key={url}><SourceTrigger />- <SourceContent title={url} />+ <SourceContent title={shortPageAddress(url)} description={url} showFavicon={false} /></Source>))}</div>diff --git a/apps/app/src/components/ui/source.tsx b/apps/app/src/components/ui/source.tsxindex 59d127c5..6099f4f2 100644--- a/apps/app/src/components/ui/source.tsx+++ b/apps/app/src/components/ui/source.tsx@@ -78,12 +78,15 @@ export type SourceContentProps = {title: stringdescription?: stringclassName?: string+ /** Off: no favicon (it would be fetched from a third-party service). */+ showFavicon?: boolean}export function SourceContent({title,description,className,+ showFavicon = true,}: SourceContentProps) {const { href, domain } = useSourceContext()@@ -96,15 +99,17 @@ export function SourceContent({className="flex flex-col gap-2 p-3"><div className="flex items-center gap-1.5">- <img- src={`https://www.google.com/s2/favicons?sz=64&domain_url=${encodeURIComponent(- href- )}`}- alt="favicon"- className="size-4 rounded-full"- width={16}- height={16}- />+ {showFavicon && (+ <img+ src={`https://www.google.com/s2/favicons?sz=64&domain_url=${encodeURIComponent(+ href+ )}`}+ alt="favicon"+ className="size-4 rounded-full"+ width={16}+ height={16}+ />+ )}<div className="text-primary truncate text-sm">{domain.replace("www.", "")}</div>