Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
fix(ui): resolve original logos for every catalog plugin in @
rubenluetke10-beepb6557cc6b2d3
diff --git a/jarvis/ui/web/frontend/src/components/agentchat/toolIdentity.test.tsx b/jarvis/ui/web/frontend/src/components/agentchat/toolIdentity.test.tsxindex 015e927e3d..6bb951d138 100644--- a/jarvis/ui/web/frontend/src/components/agentchat/toolIdentity.test.tsx+++ b/jarvis/ui/web/frontend/src/components/agentchat/toolIdentity.test.tsx@@ -42,6 +42,21 @@ describe("tool visual identities", () => {expect(identity.logo).toBeTruthy();});+ it("uses original artwork for every raster and hyphenated catalog brand", () => {+ const cloud = toolIdentity(row({ id: "plugin:google_cloud", brand: "google_cloud", label: "Google Cloud" }));+ expect(cloud.logo).toBeTruthy();+ expect(cloud.mark).toBe("colour");+ const hyphen = toolIdentity(row({ id: "plugin:google-cloud", brand: "google-cloud", label: "Google Cloud" }));+ expect(hyphen.logo).toBeTruthy();+ const flare = toolIdentity(row({ id: "plugin:cloudflare", brand: "cloudflare", label: "Cloudflare" }));+ expect(flare.logo).toBeTruthy();+ expect(flare.mark).toBe("colour");+ const gitlab = toolIdentity(row({ id: "plugin:gitlab", brand: "gitlab", label: "GitLab" }));+ expect(gitlab.mark).toBe("colour");+ const figma = toolIdentity(row({ id: "plugin:figma", brand: "figma", label: "Figma" }));+ expect(figma.mark).toBe("colour");+ });+it("uses the bundled PNG for AgentMail and the AMD arrow for GPU status", () => {const mail = toolIdentity(row({ id: "plugin:agentmail", brand: "agentmail", label: "AgentMail" }));expect(mail.key).toBe("agentmail");diff --git a/jarvis/ui/web/frontend/src/components/agentchat/toolIdentity.ts b/jarvis/ui/web/frontend/src/components/agentchat/toolIdentity.tsindex 25e20d8a41..a06d0a51f3 100644--- a/jarvis/ui/web/frontend/src/components/agentchat/toolIdentity.ts+++ b/jarvis/ui/web/frontend/src/components/agentchat/toolIdentity.ts@@ -28,7 +28,7 @@ import {} from "lucide-react";import { McpLogo } from "@/components/extensions/McpLogo";import { CLI_VENDOR_LOGOS, cliVendor } from "@/lib/cliVendors";-import { bundledPluginLogo } from "@/lib/pluginLogos";+import { brandIdVariants, bundledPluginLogo, isRasterLogo } from "@/lib/pluginLogos";import type { ToolCategory, ToolChoice } from "./toolChoices";type Palette = readonly [string, string];@@ -70,10 +70,10 @@ const BRANDS: Record<string, Brand> = {todoist: { palette: ["#b12d27", "#ff9c92"] },vercel: { palette: NEUTRAL, mark: "mono" },youtube_music: { palette: ["#bb2424", "#ff9494"], aliases: ["youtube-music", "ytmusic", "youtube"] },- stripe: { palette: VIOLET, mark: "mono" },- cloudflare: { palette: ["#a84c14", "#ffb276"], mark: "mono", aliases: ["wrangler"] },- figma: { palette: ["#9c3a28", "#ffa18e"], mark: "mono" },- gitlab: { palette: ["#a8441a", "#ffad83"], mark: "mono", aliases: ["glab"] },+ stripe: { palette: VIOLET },+ cloudflare: { palette: ["#a84c14", "#ffb276"], aliases: ["wrangler"] },+ figma: { palette: ["#9c3a28", "#ffa18e"] },+ gitlab: { palette: ["#a8441a", "#ffad83"], aliases: ["glab"] },docker: { palette: BLUE, mark: "colour" },aws: { palette: ["#a15b00", "#f0b429"], mark: "mono" },azure: { palette: BLUE, aliases: ["az"] },@@ -94,7 +94,7 @@ const BRANDS: Record<string, Brand> = {openrouter: { palette: NEUTRAL, mark: "mono" },claude: { palette: ["#a04f31", "#e6aa89"], aliases: ["anthropic", "claude-code"] },gemini: { palette: BLUE },- "google-cloud": { palette: BLUE, aliases: ["gcloud", "vertex"] },+ "google-cloud": { palette: BLUE, aliases: ["gcloud", "vertex", "google_cloud"] },antigravity: { palette: BLUE, aliases: ["agy"] },ollama: { palette: NEUTRAL, mark: "mono" },nvidia: { palette: GREEN },@@ -124,19 +124,22 @@ const assets = import.meta.glob("../../assets/{brands,providers,tool-brands,clis}) as Record<string, string>;function assetFor(key: string, preferCli = false): string | undefined {- const cliFile = CLI_VENDOR_LOGOS[key]?.file ?? `${key}.svg`;- const cli = assets[`../../assets/clis/${cliFile}`] || assets[`../../assets/clis/${key}.svg`];- if (preferCli && cli) return cli;- return (- BRANDS[key]?.asset ||- bundledPluginLogo(key) ||- assets[`../../assets/brands/${key}.svg`] ||- assets[`../../assets/brands/${key}.png`] ||- assets[`../../assets/tool-brands/${key}.svg`] ||- assets[`../../assets/providers/${key}.svg`] ||- assets[`../../assets/providers/${key}.png`] ||- cli- );+ for (const id of brandIdVariants(key)) {+ const cliFile = CLI_VENDOR_LOGOS[id]?.file ?? `${id}.svg`;+ const cli = assets[`../../assets/clis/${cliFile}`] || assets[`../../assets/clis/${id}.svg`];+ if (preferCli && cli) return cli;+ const found =+ BRANDS[id]?.asset ||+ bundledPluginLogo(id) ||+ assets[`../../assets/brands/${id}.svg`] ||+ assets[`../../assets/brands/${id}.png`] ||+ assets[`../../assets/tool-brands/${id}.svg`] ||+ assets[`../../assets/providers/${id}.svg`] ||+ assets[`../../assets/providers/${id}.png`] ||+ cli;+ if (found) return found;+ }+ return undefined;}const normalize = (value: string) => value.toLowerCase().replace(/[^a-z0-9]/g, "");@@ -220,7 +223,7 @@ export function toolIdentity(row: ToolChoice) {(row.brand && brandFor(row.brand)) ||[row.id, row.group, row.skill, row.label].map((s) => brandFor(s || "")).find(Boolean) ||cliName;- const brand = key ? BRANDS[key] : undefined;+ const brand = key ? BRANDS[key] ?? BRANDS[key.replace(/-/g, "_")] ?? BRANDS[key.replace(/_/g, "-")] : undefined;const palette = brand?.palette ?? CATEGORY_PALETTES[row.category];const words = `${row.id} ${row.skill} ${row.label}`.toLowerCase().replace(/[_:-]/g, " ");const Glyph =@@ -228,10 +231,16 @@ export function toolIdentity(row: ToolChoice) {? McpLogo: (DETAIL_ICONS.find(([pattern]) => pattern.test(words))?.[1] ??CATEGORY_ICONS[row.category]);- const mark = preferCli && key && CLI_VENDOR_LOGOS[key] ? CLI_VENDOR_LOGOS[key].render : (brand?.mark ?? "colour");+ const logo = key ? assetFor(key, preferCli) : undefined;+ const mark =+ isRasterLogo(logo)+ ? "colour"+ : preferCli && key && CLI_VENDOR_LOGOS[key]+ ? CLI_VENDOR_LOGOS[key].render+ : (brand?.mark ?? "colour");return {key,- logo: key ? assetFor(key, preferCli) : undefined,+ logo,mark,palette,Glyph,diff --git a/jarvis/ui/web/frontend/src/lib/pluginLogos.test.ts b/jarvis/ui/web/frontend/src/lib/pluginLogos.test.tsindex fb5aaa08c1..4c2630c5ae 100644--- a/jarvis/ui/web/frontend/src/lib/pluginLogos.test.ts+++ b/jarvis/ui/web/frontend/src/lib/pluginLogos.test.ts@@ -13,7 +13,7 @@ it.each(catalog.plugins.map((plugin) => plugin.id))("ships local artwork for %s"expect(logo).not.toMatch(/^https?:/);});-it.each(["onenote", "onedrive", "azure", "google_cloud", "stripe", "cloudflare", "agentmail"])(+it.each(["onenote", "onedrive", "azure", "google_cloud", "google-cloud", "stripe", "cloudflare", "agentmail"])("never substitutes an external glyph for the reported missing %s brand", (id) => {expect(bundledPluginLogo(id)).toMatch(/(?:\.svg|\.png|\.ico|^data:)/);},diff --git a/jarvis/ui/web/frontend/src/lib/pluginLogos.ts b/jarvis/ui/web/frontend/src/lib/pluginLogos.tsindex 491289ce38..68c0d8da78 100644--- a/jarvis/ui/web/frontend/src/lib/pluginLogos.ts+++ b/jarvis/ui/web/frontend/src/lib/pluginLogos.ts@@ -5,10 +5,27 @@ const artwork = import.meta.glob("../assets/brands/*.{svg,png,ico}", {import: "default",}) as Record<string, string>;+/** Catalog ids use underscores (`google_cloud`); some lookups hyphenate them. */+export function brandIdVariants(id: string): string[] {+ const compact = id.replace(/-/g, "_");+ const hyphen = id.replace(/_/g, "-");+ return [...new Set([id, compact, hyphen].filter(Boolean))];+}+export function bundledPluginLogo(pluginId: string): string | undefined {- for (const extension of ["svg", "png", "ico"]) {- const url = artwork[`../assets/brands/${pluginId}.${extension}`];- if (url) return url;+ for (const id of brandIdVariants(pluginId)) {+ for (const extension of ["svg", "png", "ico"]) {+ const url = artwork[`../assets/brands/${id}.${extension}`];+ if (url) return url;+ }}return undefined;}++export function isRasterLogo(url: string | undefined): boolean {+ if (!url) return false;+ return (+ /\.(png|ico|jpe?g)(?:\?|$)/i.test(url) ||+ /^data:image\/(png|jpeg|gif|webp)/i.test(url)+ );+}