From 047e19029daaabf47392bf6e5c46b99c9f22ebd5 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 1 Dec 2026 16:15:52 +0000 Subject: [PATCH] Draw commands that run Claude or Codex with their own marks Co-Authored-By: Claude Opus 5.5 --- web/src/components/HarnessIcon.tsx | 7 +++++++ web/src/pages/GalleryPage.tsx | 2 ++ web/src/session/toolIcons.test.ts | 4 +++- web/src/session/toolIcons.tsx | 5 +++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/web/src/components/HarnessIcon.tsx b/web/src/components/HarnessIcon.tsx index 342c99c..f359077 100644 --- a/web/src/components/HarnessIcon.tsx +++ b/web/src/components/HarnessIcon.tsx @@ -25,6 +25,13 @@ function HarnessMark({ harness, px }: { harness: Harness; px: number }) { return mark.dark === mark.light ? img(mark.dark) : <>{img(mark.light, 'dark:hidden')}{img(mark.dark, 'hidden dark:block')} } +/** An agent's own mark, sized by className, for drawing a step that runs that agent. */ +export function HarnessGlyph({ harness, className }: { harness: Harness; className?: string }) { + const mark = MARK[harness] + const img = (name: string, cls = '') => + return mark.dark === mark.light ? img(mark.dark) : <>{img(mark.light, 'dark:hidden')}{img(mark.dark, 'hidden dark:block')} +} + export function HarnessLabel({ harness }: { harness: Harness }) { return ( diff --git a/web/src/pages/GalleryPage.tsx b/web/src/pages/GalleryPage.tsx index c346c1c..21a75ce 100644 --- a/web/src/pages/GalleryPage.tsx +++ b/web/src/pages/GalleryPage.tsx @@ -280,6 +280,8 @@ const GEM = 'data:image/svg+xml;base64,' + btoa(' +const Codex: IconComponent = ({ className }) => const Python = brand(siPython) const Git = brand(siGit) const GitHub = brand(siGithub) @@ -29,6 +32,8 @@ const WEB: ToolIcon = { key: 'globe', Icon: Globe } // What a command is, by the program it runs. Anything not listed is a terminal. const PROGRAMS: [RegExp, ToolIcon][] = [ [/^(python\d*(\.\d+)?|pip\d*|uv|uvx|pytest|poetry)$/, { key: 'python', Icon: Python }], + [/^claude$/, { key: 'claude', Icon: Claude }], + [/^codex$/, { key: 'codex', Icon: Codex }], [/^git$/, { key: 'git', Icon: Git }], [/^gh$/, { key: 'github', Icon: GitHub }], [/^(grep|egrep|fgrep|rg|ag|sed|awk)$/, SEARCH],