authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-17 12:33:44-08:00
committergravatar for jmarminge@gmail.comJulius Marminge <jmarminge@gmail.com> 2026-02-17 19:47:09-08:00
log60ed67e5e1e5b983c0d6f0315baeb98b6372daea
treecabe996b2d94d44ce4934caf90be31daeaa9a40a
parentbd6a5c85e6f873997a3e0fc8dd3f773f9acc7893

Use bot icon for slash commands and normalize YAML file icons

- Replace slash-command menu glyph in ChatView with `BotIcon` - Map `yml`/`yaml` to base YAML language id to avoid overly specific icons - Add test coverage for GitHub workflow YAML icon selection

3 files changed, 9 insertions(+), 1 deletions(-)

apps/web/src/components/ChatView.tsx+2-1
......@@ -75,6 +75,7 @@ import ThreadTerminalDrawer from "./ThreadTerminalDrawer";
7575import { useNativeApi } from "../hooks/useNativeApi";
7676import { Alert, AlertAction, AlertDescription, AlertTitle } from "./ui/alert";
7777import {
78 BotIcon,
7879 ChevronDownIcon,
7980 CircleAlertIcon,
8081 FileIcon,
......@@ -259,7 +260,7 @@ const ComposerCommandMenuItem = memo(function ComposerCommandMenuItem(props: {
259260 />
260261 ) : null}
261262 {props.item.type === "slash-command" ? (
262 <CursorIcon className="size-4 text-muted-foreground/80" />
263 <BotIcon className="size-4 text-muted-foreground/80" />
263264 ) : null}
264265 {props.item.type === "model" ? (
265266 <Badge variant="outline" className="px-1.5 py-0 text-[10px]">
apps/web/src/vscode-icons.test.ts+2
......@@ -31,11 +31,13 @@ describe("getVscodeIconUrlForEntry", () => {
3131 const dockerfileUrl = getVscodeIconUrlForEntry("Dockerfile", "file", "dark");
3232 const shellUrl = getVscodeIconUrlForEntry("entrypoint.sh", "file", "dark");
3333 const cursorRulesUrl = getVscodeIconUrlForEntry("general.mdc", "file", "dark");
34 const githubWorkflowUrl = getVscodeIconUrlForEntry(".github/workflows/ci.yml", "file", "light");
3435
3536 assert.isTrue(tsxUrl.endsWith("/file_type_reactts.svg"));
3637 assert.isTrue(dockerfileUrl.endsWith("/file_type_docker.svg"));
3738 assert.isTrue(shellUrl.endsWith("/file_type_shell.svg"));
3839 assert.isTrue(cursorRulesUrl.endsWith("/file_type_markdown.svg"));
40 assert.isTrue(githubWorkflowUrl.endsWith("/file_type_light_yaml.svg"));
3941 });
4042
4143 it("falls back to defaults when there is no match", () => {
apps/web/src/vscode-icons.ts+5
......@@ -45,6 +45,11 @@ const languageIdByFileName = toLowercaseLookup(languageAssociations.fileNameToLa
4545const localLanguageIdByExtensionOverrides = {
4646 // Cursor rules files (*.mdc) are commonly treated as markdown in VSCode/Cursor.
4747 mdc: "markdown",
48 // Upstream languages.ts maps yml/yaml to specialized language ids that can produce
49 // non-generic YAML icons (for example cloudfoundry/esphome). Prefer the base YAML icon
50 // unless a more specific basename/extension match (e.g. azure-pipelines.yml) is found.
51 yml: "yaml",
52 yaml: "yaml",
4853} as const;
4954
5055const defaultDarkFileIconDefinition = manifest.file ?? "_file";