summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src/components
diff options
context:
space:
mode:
authorR44VC0RP <[email protected]>2026-01-31 10:27:27 -0500
committerDax Raad <[email protected]>2026-02-01 19:26:23 -0500
commit12b8c4238768d4fc3aa57c7023c9724c4f705db2 (patch)
treeb7b9708b5f677a78df4ca8aed52ff73d13390c6c /packages/app/src/components
parentfa75d922ed9e9c7e11ae43baec933674d5d3012d (diff)
downloadopencode-12b8c4238768d4fc3aa57c7023c9724c4f705db2.tar.gz
opencode-12b8c4238768d4fc3aa57c7023c9724c4f705db2.zip
feat(app): show skill/mcp badges for slash commands
Display 'skill' or 'mcp' badge instead of 'custom' for slash commands based on their source type. This provides better clarity to users about where each command comes from.
Diffstat (limited to 'packages/app/src/components')
-rw-r--r--packages/app/src/components/prompt-input.tsx8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/app/src/components/prompt-input.tsx b/packages/app/src/components/prompt-input.tsx
index c175824de..9a9d589a7 100644
--- a/packages/app/src/components/prompt-input.tsx
+++ b/packages/app/src/components/prompt-input.tsx
@@ -115,6 +115,7 @@ interface SlashCommand {
description?: string
keybind?: string
type: "builtin" | "custom"
+ source?: "command" | "mcp" | "skill"
}
export const PromptInput: Component<PromptInputProps> = (props) => {
@@ -520,6 +521,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
title: cmd.name,
description: cmd.description,
type: "custom" as const,
+ source: cmd.source,
}))
return [...custom, ...builtin]
@@ -1728,7 +1730,11 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
<div class="flex items-center gap-2 shrink-0">
<Show when={cmd.type === "custom"}>
<span class="text-11-regular text-text-subtle px-1.5 py-0.5 bg-surface-base rounded">
- {language.t("prompt.slash.badge.custom")}
+ {cmd.source === "skill"
+ ? language.t("prompt.slash.badge.skill")
+ : cmd.source === "mcp"
+ ? language.t("prompt.slash.badge.mcp")
+ : language.t("prompt.slash.badge.custom")}
</span>
</Show>
<Show when={command.keybind(cmd.id)}>