Self-hosted workflows for coding-agent delivery. Orchestrate CodeBuddy, Codex and Claude Code with scripts and human approval gates. Includes Local workflows for coding assistants.
JavaScript agent-orchestrationagentic-workflowai-agentsai-codingclaude-codecode-reviewcodebuddycodexcoding-agentscursordeveloper-toolshuman-on-the-loopllmmcpmulti-agentsdlcself-hostedsopworkflow-automationworkflow-engine
fix: show the Pi mark in the chat CLI selector (#143)
crispinhu27ca7708722386
diff --git a/chatbot/src/App.jsx b/chatbot/src/App.jsxindex 42f259c5..ec80f4af 100644--- a/chatbot/src/App.jsx+++ b/chatbot/src/App.jsx@@ -68,7 +68,9 @@ import SessionContextMenu from "./SessionContextMenu";import { usePanelPresence } from "./usePanelPresence";import HomeWelcome from "./HomeWelcome";import ModelPicker from "./ModelPicker";+import ModelProviderIcon, { hasProviderLogo } from "./ModelProviderIcon";import PermissionPicker from "./PermissionPicker";+import { engineBrand } from "./engines.js";import { effortOptions } from "./effort.js";import QuickAccessWizard from "./QuickAccessWizard";import HarnessSelect from "./HarnessSelect";@@ -1976,7 +1978,15 @@ export default function App() {/><PermissionPickerlabel="CLI"- options={chat.executors}+ options={chat.executors.map((executor) => {+ const brand = engineBrand(executor.id);+ return {+ ...executor,+ glyph: hasProviderLogo(brand)+ ? <ModelProviderIcon brand={brand} size={16} />+ : null,+ };+ })}value={chat.executor}onSelect={(id) => {chat.setExecutor(id);diff --git a/chatbot/src/ModelProviderIcon.jsx b/chatbot/src/ModelProviderIcon.jsxindex d1a1e864..48c5463d 100644--- a/chatbot/src/ModelProviderIcon.jsx+++ b/chatbot/src/ModelProviderIcon.jsx@@ -2,8 +2,8 @@ import React, { useEffect, useId, useRef, useState } from "react";import HarnessIcon from "./HarnessIcon";import "./model-provider-icon.css";-// Trusted, bundled brand artwork copied unchanged from Grasp. Source and license-// notices are retained beside the SVGs in assets/provider-logos/README.md.+// Trusted, bundled brand artwork from Grasp and local assets. Source and+// license notices are retained beside the SVGs in assets/provider-logos/README.md.const brandSources = import.meta.glob("./assets/provider-logos/*.svg", {eager: true,query: "?raw",@@ -50,6 +50,10 @@ export function modelProviderFor(model) {.find((value) => fallbackBrands.has(value)) || "";}+export function hasProviderLogo(name) {+ return Boolean(brandSources[`./assets/provider-logos/${name}.svg`]);+}+function artwork(name, prefix) {const raw = brandSources[`./assets/provider-logos/${name}.svg`];if (!raw) return null;@@ -107,11 +111,12 @@ function BrandSvg({ name, identity, motionKey, className = "" }) {);}-export default function ModelProviderIcon({ model, size = 20, className = "" }) {+/** `brand` names a bundled logo directly, for example a CLI rather than a model. */+export default function ModelProviderIcon({ model, brand: named = "", size = 20, className = "" }) {const host = useRef(null);const identity = `model-provider-${useId().replace(/[^\w-]/g, "")}`;const [motionKey, setMotionKey] = useState(0);- const brand = modelProviderFor(model);+ const brand = named || modelProviderFor(model);useEffect(() => {const element = host.current;diff --git a/chatbot/src/PermissionPicker.jsx b/chatbot/src/PermissionPicker.jsxindex 5efb2702..07f463ed 100644--- a/chatbot/src/PermissionPicker.jsx+++ b/chatbot/src/PermissionPicker.jsx@@ -10,6 +10,7 @@ const modes = [{ id: "auto", icon: "priority-bolt", label: "完全权限", tone: "danger", detail: "使用当前账号权限直接执行模型提出的平台操作。" },];+// `glyph` is a rendered brand mark. Options that only set `icon` keep the Harness icon.export default function PermissionPicker({ value, onSelect, open, onOpenChange, label = "操作确认方式", icon, options = modes }) {const trigger = useRef(null);const panel = useRef(null);@@ -170,7 +171,7 @@ export default function PermissionPicker({ value, onSelect, open, onOpenChange,} else if (open && ["Escape", "Tab"].includes(event.key)) keyDown(event);}}>- <HarnessIcon name={icon || current.icon} size={16} aria-hidden="true" />+ {current.glyph || <HarnessIcon name={icon || current.icon} size={16} aria-hidden="true" />}<span>{current.label}</span><HarnessIcon name="chevron-down" size={12} aria-hidden="true" /></button>@@ -201,7 +202,7 @@ export default function PermissionPicker({ value, onSelect, open, onOpenChange,tabIndex={mode.id === current.id ? 0 : -1}onClick={() => choose(mode.id)}>- <HarnessIcon name={mode.icon} size={16} aria-hidden="true" />+ {mode.glyph || <HarnessIcon name={mode.icon} size={16} aria-hidden="true" />}<span className="permission-menu-copy"><strong>{mode.label}</strong><small id={`${identity}-${mode.id}-detail`}>{mode.detail}</small>diff --git a/chatbot/src/assets/provider-logos/README.md b/chatbot/src/assets/provider-logos/README.mdindex e0d1fee2..bdf305b0 100644--- a/chatbot/src/assets/provider-logos/README.md+++ b/chatbot/src/assets/provider-logos/README.md@@ -10,6 +10,9 @@ requests to an image host.[Simple Icons repository](https://github.com/simple-icons/simple-icons),and the pinned assets were downloaded from the corresponding`cdn.jsdelivr.net/npm/simple-icons@v16/icons/<slug>.svg` URLs.+- `pi.svg` is a plain π glyph drawn locally, not from Grasp. It is the same+ mark as `web/images/credentials/pi.svg`, bundled here for the chat CLI+ selector.- `openai.svg` comes from the [OpenAI 2025 logo package](https://cdn.openai.com/brand/OpenAI-Logos-2025.zip).`codex.svg` uses the same official OpenAI blossom because OpenAI does notpublish a separate Codex mark in that package or in the official Codex CLIdiff --git a/chatbot/src/assets/provider-logos/SOURCE.md b/chatbot/src/assets/provider-logos/SOURCE.mdindex 32621af6..5d1994e7 100644--- a/chatbot/src/assets/provider-logos/SOURCE.md+++ b/chatbot/src/assets/provider-logos/SOURCE.md@@ -1,7 +1,9 @@# Bundled model brand artwork-These SVGs and the accompanying README.md and LICENSE.lobe-icons were copied-unchanged from the Grasp repository, web/src/assets/provider-logos. The original Grasp+Except for `pi.svg`, these SVGs and the accompanying README.md and+LICENSE.lobe-icons were originally copied from the Grasp repository,+web/src/assets/provider-logos. `pi.svg` reuses the local π glyph from+`web/images/credentials/pi.svg`; README.md records this addition. The original GraspMIT notice is retained as LICENSE.grasp. README.md records each artwork's ownsource and applicable license, including official brand artwork and Simple Icons.diff --git a/chatbot/src/assets/provider-logos/pi.svg b/chatbot/src/assets/provider-logos/pi.svgnew file mode 100644index 00000000..6c81d7e2--- /dev/null+++ b/chatbot/src/assets/provider-logos/pi.svg@@ -0,0 +1 @@+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Pi</title><path d="M3 4.5h18v3h-3.2v8.6c0 .9.4 1.3 1.1 1.3.5 0 .9-.1 1.3-.3l.6 2.8c-.7.4-1.7.6-2.8.6-2.4 0-3.6-1.4-3.6-4V7.5H9.6V20H6.4V7.5H3z"/></svg>diff --git a/chatbot/tests/app-render.test.jsx b/chatbot/tests/app-render.test.jsxindex 299bf57c..41bfa9e7 100644--- a/chatbot/tests/app-render.test.jsx+++ b/chatbot/tests/app-render.test.jsx@@ -316,8 +316,14 @@ describe("App", () => {const user = userEvent.setup();const previous = { ...chat };chat.setExecutor = vi.fn();+ chat.executors = [+ ...previous.executors,+ { id: "pi", icon: "terminal", label: "Pi", detail: "Pi" },+ ];const view = render(<App />);await user.click(screen.getByRole("button", { name: "CLI" }));+ const pi = await screen.findByRole("menuitemradio", { name: "Pi" });+ expect(pi.querySelector('[data-model-provider="pi"] svg')).not.toBeNull();await user.click(await screen.findByRole("menuitemradio", { name: "Codex" }));expect(chat.setExecutor).toHaveBeenCalledWith("codex");expect(screen.getByRole("button", { name: "思考强度" })).toBeInTheDocument();