From cb6ec0a564cfc332e7af3c844157e145c1d86a60 Mon Sep 17 00:00:00 2001 From: R44VC0RP Date: Sat, 31 Jan 2026 12:11:30 -0500 Subject: [PATCH] fix(app): hide badge for builtin slash commands Add source: 'command' to builtin and config-defined commands so they don't show a 'custom' badge. Only MCP and skill commands show badges. --- packages/app/src/components/prompt-input.tsx | 2 +- packages/opencode/src/command/index.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/app/src/components/prompt-input.tsx b/packages/app/src/components/prompt-input.tsx index 9a9d589a7..2b63b6f5f 100644 --- a/packages/app/src/components/prompt-input.tsx +++ b/packages/app/src/components/prompt-input.tsx @@ -1728,7 +1728,7 @@ export const PromptInput: Component = (props) => {
- + {cmd.source === "skill" ? language.t("prompt.slash.badge.skill") diff --git a/packages/opencode/src/command/index.ts b/packages/opencode/src/command/index.ts index 14dbeb679..dce7ac8bb 100644 --- a/packages/opencode/src/command/index.ts +++ b/packages/opencode/src/command/index.ts @@ -63,6 +63,7 @@ export namespace Command { [Default.INIT]: { name: Default.INIT, description: "create/update AGENTS.md", + source: "command", get template() { return PROMPT_INITIALIZE.replace("${path}", Instance.worktree) }, @@ -71,6 +72,7 @@ export namespace Command { [Default.REVIEW]: { name: Default.REVIEW, description: "review changes [commit|branch|pr], defaults to uncommitted", + source: "command", get template() { return PROMPT_REVIEW.replace("${path}", Instance.worktree) }, @@ -85,6 +87,7 @@ export namespace Command { agent: command.agent, model: command.model, description: command.description, + source: "command", get template() { return command.template },