Skip to content

A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.

feat(web): show the desktop's agent marks in the Agents panel

RoversXf6e28f08d110
diff --git a/thinkterm-web/src/agents.rs b/thinkterm-web/src/agents.rs
index 2f43eacd..614f1e15 100644
--- a/thinkterm-web/src/agents.rs
+++ b/thinkterm-web/src/agents.rs
@@ -212,11 +212,17 @@ pub fn display_name(agent_id: &str) -> String {
}
}
-/// Brand icons the page has (simple-icons: claude, githubcopilot); `bot` otherwise.
+/// The mark the page draws for an agent, as the desktop picks it
+/// (`agent_status::brand_icon`, lobe-icons); `bot` for one with no logo.
pub fn icon(agent_id: &str) -> &'static str {
match agent_id {
"claude" => "brand-claude",
"copilot" => "brand-copilot",
+ "kimi" => "brand-kimi",
+ "codex" => "brand-codex",
+ "cursor" => "brand-cursor",
+ "opencode" => "brand-opencode",
+ "pi" => "brand-pi",
_ => "bot",
}
}
@@ -365,6 +371,8 @@ mod tests {
assert_eq!(display_name("claude"), "Claude Code");
assert_eq!(display_name("gemini"), "Gemini");
assert_eq!(icon("claude"), "brand-claude");
+ assert_eq!(icon("codex"), "brand-codex");
+ assert_eq!(icon("kimi"), "brand-kimi");
assert_eq!(icon("gemini"), "bot");
}
diff --git a/thinkterm-web/ui/src/icons.ts b/thinkterm-web/ui/src/icons.ts
index d2e7e1a2..4143e24b 100644
--- a/thinkterm-web/ui/src/icons.ts
+++ b/thinkterm-web/ui/src/icons.ts
@@ -85,11 +85,18 @@ import gitBranch from '../../../third_party/lucide/icons/git-branch.svg?raw';
import gitCompare from '../../../third_party/lucide/icons/git-compare.svg?raw';
import listTodo from '../../../third_party/lucide/icons/list-todo.svg?raw';
import puzzle from '../../../third_party/lucide/icons/puzzle.svg?raw';
-// The two brand marks the Agents panel draws (simple-icons): a single
-// fill-less path, so they take their colour from CSS `fill: currentColor`
-// rather than from `stroke` as the lucide icons above do.
-import brandClaude from '../../../third_party/simple-icons/icons/claude.svg?raw';
-import brandCopilot from '../../../third_party/simple-icons/icons/githubcopilot.svg?raw';
+// The Agents panel's marks, the desktop's (lobe-icons, as
+// `agent_status::brand_icon` picks them): Claude, Copilot and Kimi in their
+// own colours, the others single-colour (`fill="currentColor"`), as their
+// makers publish them.
+import brandClaude from '../../../third_party/lobe-icons/claude-color.svg?raw';
+import brandCopilot from '../../../third_party/lobe-icons/copilot-color.svg?raw';
+import brandKimi from '../../../third_party/lobe-icons/kimi-color.svg?raw';
+import brandKimiMono from '../../../third_party/lobe-icons/kimi.svg?raw';
+import brandCodex from '../../../third_party/lobe-icons/openai.svg?raw';
+import brandCursor from '../../../third_party/lobe-icons/cursor.svg?raw';
+import brandOpenCode from '../../../third_party/lobe-icons/opencode.svg?raw';
+import brandPi from '../../../third_party/lobe-icons/pi.svg?raw';
export {
archive,
@@ -107,8 +114,6 @@ export {
bell,
bot,
braces,
- brandClaude,
- brandCopilot,
check,
chevronDown,
chevronRight,
@@ -245,14 +250,29 @@ const PANEL_ICONS: Record<string, string> = {
// An agent row names its mark the way `agents.rs` does: a brand when the
// page has one, `bot` otherwise. Kept apart from `BY_NAME` above, which is
-// lucide's names and nothing else.
+// lucide's names and nothing else. Kimi's coloured mark is a white glyph
+// that all but vanishes on a light page, so it comes with its single-colour
+// one and the theme shows one of the two (tokens.css), as on the desktop.
const AGENT_ICONS: Record<string, string> = {
'brand-claude': brandClaude,
'brand-copilot': brandCopilot,
+ 'brand-kimi': `<span class="dark-only">${brandKimi}</span><span class="light-only">${brandKimiMono}</span>`,
+ 'brand-codex': brandCodex,
+ 'brand-cursor': brandCursor,
+ 'brand-opencode': brandOpenCode,
+ 'brand-pi': brandPi,
bot,
};
-/** An agent row's icon by its name; the bot for one the page has not inlined. */
+let copies = 0;
+
+/** An agent row's icon by its name; the bot for one the page has not inlined.
+ Every copy gets ids of its own: Copilot's gradients are referenced by
+ id, which resolves to the first in the page, and that one may be in a
+ list that is hidden. */
export function agentIcon(name: string): string {
- return AGENT_ICONS[name] ?? bot;
+ const svg = AGENT_ICONS[name] ?? bot;
+ if (!svg.includes(' id="')) return svg;
+ const n = ++copies;
+ return svg.replace(/ id="([^"]+)"/g, ` id="$1-${n}"`).replace(/url\(#([^)]+)\)/g, `url(#$1-${n})`);
}
diff --git a/thinkterm-web/ui/src/model.ts b/thinkterm-web/ui/src/model.ts
index 1bf90f64..16ab5500 100644
--- a/thinkterm-web/ui/src/model.ts
+++ b/thinkterm-web/ui/src/model.ts
@@ -190,7 +190,7 @@ export type AgentRow = {
state_label: string;
/** "Project \u00b7 Thread", or the workspace when no thread claims it. */
place: string;
- /** `brand-claude`, `brand-copilot` or `bot`. */
+ /** `brand-<agent>` for an agent with a logo (agents.rs `icon`), else `bot`. */
icon: string;
/** What the program said about itself (OSC 7501), when it did. */
kind: string | null;
diff --git a/thinkterm-web/ui/src/tokens.css b/thinkterm-web/ui/src/tokens.css
index 9131ec54..05f626a0 100644
--- a/thinkterm-web/ui/src/tokens.css
+++ b/thinkterm-web/ui/src/tokens.css
@@ -263,8 +263,9 @@ body[data-side=off]:not([data-mobile]) #side .list { top: var(--tabs); }
#agents .ag.elsewhere { opacity: .62; }
#agents .ic { display: inline-flex; width: 20px; height: 20px; flex: none; align-items: center; justify-content: center; color: var(--text2); }
#agents .ic svg { width: 20px; height: 20px; }
-/* The brand marks carry no stroke and no fill of their own. */
-#agents .ic svg[role=img] { fill: currentColor; }
+/* Kimi's mark per theme (icons.ts): coloured on dark, single-colour on light. */
+#agents .ic .dark-only, #agents .ic .light-only { display: inline-flex; }
+[data-theme=light] #agents .ic .dark-only, :root:not([data-theme=light]) #agents .ic .light-only { display: none; }
#agents .tx { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; min-width: 0; }
#agents .n { color: var(--text); line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#agents .n .d { color: var(--muted); }