From c1308ebf3f0f5b6a13363836420b6d078d04da61 Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Wed, 10 Jun 2026 03:41:55 -0500 Subject: [PATCH] style(desktop): filled SVG glyphs for in-thread tool icons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the earlier text-stroke approach (which only bolds outline codicons — a font glyph has no fillable region) with dedicated solid SVG glyphs for tool rows. Adds ToolIcon, keyed by the same names as TOOL_META, with a codicon fallback for uncovered tools. --- .../components/assistant-ui/tool-fallback.tsx | 4 +- .../desktop/src/components/chat/code-card.tsx | 3 +- apps/desktop/src/components/ui/codicon.tsx | 12 +--- apps/desktop/src/components/ui/tool-icon.tsx | 65 +++++++++++++++++++ apps/desktop/src/styles.css | 8 --- 5 files changed, 70 insertions(+), 22 deletions(-) create mode 100644 apps/desktop/src/components/ui/tool-icon.tsx diff --git a/apps/desktop/src/components/assistant-ui/tool-fallback.tsx b/apps/desktop/src/components/assistant-ui/tool-fallback.tsx index 1a1087f55f18..391510f71bfc 100644 --- a/apps/desktop/src/components/assistant-ui/tool-fallback.tsx +++ b/apps/desktop/src/components/assistant-ui/tool-fallback.tsx @@ -13,9 +13,9 @@ import { DisclosureRow } from '@/components/chat/disclosure-row' import { PreviewAttachment } from '@/components/chat/preview-attachment' import { ZoomableImage } from '@/components/chat/zoomable-image' import { BrailleSpinner } from '@/components/ui/braille-spinner' -import { Codicon } from '@/components/ui/codicon' import { CopyButton } from '@/components/ui/copy-button' import { FadeText } from '@/components/ui/fade-text' +import { ToolIcon } from '@/components/ui/tool-icon' import { useI18n } from '@/i18n' import { PrettyLink, LinkifiedText as SharedLinkifiedText, urlSlugTitleLabel } from '@/lib/external-link' import { AlertCircle, CheckCircle2 } from '@/lib/icons' @@ -136,7 +136,7 @@ function ToolGlyph({ copy, icon, status }: { copy: ToolStatusCopy; icon?: string const node = status ? ( statusGlyph(status, copy) ) : icon ? ( - + ) : null return node ? {node} : null diff --git a/apps/desktop/src/components/chat/code-card.tsx b/apps/desktop/src/components/chat/code-card.tsx index 02df72ea5734..46997caa4d78 100644 --- a/apps/desktop/src/components/chat/code-card.tsx +++ b/apps/desktop/src/components/chat/code-card.tsx @@ -46,12 +46,11 @@ function CodeCardTitle({ className, children, ...props }: React.ComponentProps<' ) } -function CodeCardIcon({ className, filled = true, ...props }: CodiconProps) { +function CodeCardIcon({ className, ...props }: CodiconProps) { return ( ) diff --git a/apps/desktop/src/components/ui/codicon.tsx b/apps/desktop/src/components/ui/codicon.tsx index daacd625b8aa..b079216884c6 100644 --- a/apps/desktop/src/components/ui/codicon.tsx +++ b/apps/desktop/src/components/ui/codicon.tsx @@ -3,24 +3,16 @@ import type * as React from 'react' import { cn } from '@/lib/utils' export interface CodiconProps extends React.HTMLAttributes { - /** Thickens outline glyphs so they read as filled at small sizes (tool rows). */ - filled?: boolean name: string size?: number | string spinning?: boolean } -export function Codicon({ className, filled, name, size, spinning, style, ...props }: CodiconProps) { +export function Codicon({ className, name, size, spinning, style, ...props }: CodiconProps) { return (