Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
fix(open-knowledge): show per-CLI brand icons in Ask AI agent picker (#2173)
Andrew Mikofalvy0e53b94148a7
diff --git a/.changeset/ask-ai-terminal-cli-brand-icons.md b/.changeset/ask-ai-terminal-cli-brand-icons.mdnew file mode 100644index 000000000..1a9a8535f--- /dev/null+++ b/.changeset/ask-ai-terminal-cli-brand-icons.md@@ -0,0 +1,5 @@+---+"@inkeep/open-knowledge-app": patch+---++The "Ask AI" composer's agent picker now shows each terminal CLI's own brand icon (Claude, Codex, Cursor, OpenCode) instead of a generic terminal glyph, matching the "Open with AI" menus. OpenCode is terminal-only, so this is the first place its brand mark appears in the picker — both the dropdown row and the primary "Ask OpenCode (CLI)" button.diff --git a/packages/app/src/components/BottomComposer.tsx b/packages/app/src/components/BottomComposer.tsxindex 5f5f6e1ef..d50c3e5e3 100644--- a/packages/app/src/components/BottomComposer.tsx+++ b/packages/app/src/components/BottomComposer.tsx@@ -1,12 +1,13 @@import { type TargetData, TERMINAL_CLI_IDS, type TerminalCli } from '@inkeep/open-knowledge-core';import { Trans, useLingui } from '@lingui/react/macro';-import { ChevronDown, Loader2, SquareTerminal, TextQuote, X } from 'lucide-react';+import { ChevronDown, Loader2, TextQuote, X } from 'lucide-react';import { useEffect, useRef, useState } from 'react';import { toast } from 'sonner';import { ComposerContextChips } from '@/components/ComposerContextChips';import { AgentSplitButton } from '@/components/handoff/AgentSplitButton';import { TargetIcon } from '@/components/handoff/OpenInAgentMenuItem';import { useTerminalLaunch } from '@/components/handoff/TerminalLaunchContext';+import { cliIconTargetId } from '@/components/handoff/terminal-cli-display';import {buildComposerHandoffInput,useHandoffDispatch,@@ -546,7 +547,7 @@ export function BottomComposer({primary={<>{selectedCli !== null ? (- <SquareTerminal className="size-4" aria-hidden />+ <TargetIcon id={cliIconTargetId(selectedCli)} className="size-4" aria-hidden />) : resolvedTarget ? (<TargetIcon id={resolvedTarget.id} className="size-4" aria-hidden />) : null}diff --git a/packages/app/src/components/handoff/AgentSplitButton.tsx b/packages/app/src/components/handoff/AgentSplitButton.tsxindex 36515687e..5ede8e020 100644--- a/packages/app/src/components/handoff/AgentSplitButton.tsx+++ b/packages/app/src/components/handoff/AgentSplitButton.tsx@@ -1,8 +1,9 @@import type { HandoffTarget, TargetData, TerminalCli } from '@inkeep/open-knowledge-core';import { Trans, useLingui } from '@lingui/react/macro';-import { Check, ChevronDown, SquareTerminal } from 'lucide-react';+import { Check, ChevronDown } from 'lucide-react';import type { ReactNode } from 'react';import { TargetIcon } from '@/components/handoff/OpenInAgentMenuItem';+import { cliIconTargetId } from '@/components/handoff/terminal-cli-display';import { Button } from '@/components/ui/button';import { ButtonGroup } from '@/components/ui/button-group';import {@@ -134,7 +135,17 @@ export function AgentSplitButton({data-testid={terminalTestId(row.cli)}aria-label={row.ariaLabel}>- <SquareTerminal className="size-4" aria-hidden="true" />+ {/* Per-CLI brand icon (same source of truth the "Open+ with AI" surfaces use via `cliIconTargetId`), so each+ row is identifiable at a glance — OpenCode is+ terminal-only and would otherwise show no brand mark.+ The "Terminal" section header + the "(CLI)" label+ already convey that these launch a terminal. */}+ <TargetIcon+ id={cliIconTargetId(row.cli)}+ className="size-4"+ aria-hidden="true"+ /><span className="flex-1">{row.label}</span>{row.selected ? (<Check aria-hidden="true" className="size-4 text-muted-foreground" />@@ -147,7 +158,11 @@ export function AgentSplitButton({data-testid={terminalTestId('claude')}aria-label={t`Claude CLI`}>- <SquareTerminal className="size-4" aria-hidden="true" />+ <TargetIcon+ id={cliIconTargetId('claude')}+ className="size-4"+ aria-hidden="true"+ /><span className="flex-1"><Trans>Claude</Trans></span>