Skip to content

Commit 3542f3e

Browse files
committed
Revert "feat: make skills invokable as slash commands in the TUI"
This reverts commit 8512655.
1 parent 8512655 commit 3542f3e

File tree

4 files changed

+1
-27
lines changed

4 files changed

+1
-27
lines changed

packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,8 @@ export function Autocomplete(props: {
345345
const results: AutocompleteOption[] = [...command.slashes()]
346346

347347
for (const serverCommand of sync.data.command) {
348-
const label = serverCommand.mcp ? " (MCP)" : serverCommand.skill ? " (Skill)" : ""
349348
results.push({
350-
display: "/" + serverCommand.name + label,
349+
display: "/" + serverCommand.name + (serverCommand.mcp ? " (MCP)" : ""),
351350
description: serverCommand.description,
352351
onSelect: () => {
353352
const newText = "/" + serverCommand.name + " "

packages/opencode/src/command/index.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { Identifier } from "../id/id"
66
import PROMPT_INITIALIZE from "./template/initialize.txt"
77
import PROMPT_REVIEW from "./template/review.txt"
88
import { MCP } from "../mcp"
9-
import { Skill } from "../skill"
109

1110
export namespace Command {
1211
export const Event = {
@@ -28,7 +27,6 @@ export namespace Command {
2827
agent: z.string().optional(),
2928
model: z.string().optional(),
3029
mcp: z.boolean().optional(),
31-
skill: z.boolean().optional(),
3230
// workaround for zod not supporting async functions natively so we use getters
3331
// https://zod.dev/v4/changelog?id=zfunction
3432
template: z.promise(z.string()).or(z.string()),
@@ -120,21 +118,6 @@ export namespace Command {
120118
}
121119
}
122120

123-
// Add skills as invokable commands
124-
for (const skill of await Skill.all()) {
125-
// Skip if a command with this name already exists
126-
if (result[skill.name]) continue
127-
result[skill.name] = {
128-
name: skill.name,
129-
description: skill.description,
130-
skill: true,
131-
get template() {
132-
return Skill.content(skill.name).then((content) => content ?? "")
133-
},
134-
hints: [],
135-
}
136-
}
137-
138121
return result
139122
})
140123

packages/opencode/src/skill/skill.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,4 @@ export namespace Skill {
153153
export async function all() {
154154
return state().then((x) => Object.values(x))
155155
}
156-
157-
export async function content(name: string) {
158-
const info = await get(name)
159-
if (!info) return undefined
160-
const md = await ConfigMarkdown.parse(info.location)
161-
return md.content
162-
}
163156
}

packages/sdk/js/src/v2/gen/types.gen.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2117,7 +2117,6 @@ export type Command = {
21172117
agent?: string
21182118
model?: string
21192119
mcp?: boolean
2120-
skill?: boolean
21212120
template: string
21222121
subtask?: boolean
21232122
hints: Array<string>

0 commit comments

Comments
 (0)