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.
This commit is contained in:
R44VC0RP
2026-01-31 12:11:30 -05:00
committed by Dax Raad
parent 12b8c42387
commit cb6ec0a564
2 changed files with 4 additions and 1 deletions

View File

@@ -1728,7 +1728,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
</Show> </Show>
</div> </div>
<div class="flex items-center gap-2 shrink-0"> <div class="flex items-center gap-2 shrink-0">
<Show when={cmd.type === "custom"}> <Show when={cmd.type === "custom" && cmd.source !== "command"}>
<span class="text-11-regular text-text-subtle px-1.5 py-0.5 bg-surface-base rounded"> <span class="text-11-regular text-text-subtle px-1.5 py-0.5 bg-surface-base rounded">
{cmd.source === "skill" {cmd.source === "skill"
? language.t("prompt.slash.badge.skill") ? language.t("prompt.slash.badge.skill")

View File

@@ -63,6 +63,7 @@ export namespace Command {
[Default.INIT]: { [Default.INIT]: {
name: Default.INIT, name: Default.INIT,
description: "create/update AGENTS.md", description: "create/update AGENTS.md",
source: "command",
get template() { get template() {
return PROMPT_INITIALIZE.replace("${path}", Instance.worktree) return PROMPT_INITIALIZE.replace("${path}", Instance.worktree)
}, },
@@ -71,6 +72,7 @@ export namespace Command {
[Default.REVIEW]: { [Default.REVIEW]: {
name: Default.REVIEW, name: Default.REVIEW,
description: "review changes [commit|branch|pr], defaults to uncommitted", description: "review changes [commit|branch|pr], defaults to uncommitted",
source: "command",
get template() { get template() {
return PROMPT_REVIEW.replace("${path}", Instance.worktree) return PROMPT_REVIEW.replace("${path}", Instance.worktree)
}, },
@@ -85,6 +87,7 @@ export namespace Command {
agent: command.agent, agent: command.agent,
model: command.model, model: command.model,
description: command.description, description: command.description,
source: "command",
get template() { get template() {
return command.template return command.template
}, },