Skip to content

Commit abe2747

Browse files
rekram1-nodePhuc Le
authored andcommitted
fix(opencode): avoid duplicate skill catalog (anomalyco#31269)
(cherry picked from commit aacdb34)
1 parent 13cfa90 commit abe2747

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

packages/opencode/src/tool/registry.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ const baseLayer: Layer.Layer<
144144
const config = yield* Config.Service
145145
const plugin = yield* Plugin.Service
146146
const agents = yield* Agent.Service
147-
const skill = yield* Skill.Service
148147
const truncate = yield* Truncate.Service
149148
const flags = yield* RuntimeFlags.Service
150149

@@ -377,25 +376,6 @@ const baseLayer: Layer.Layer<
377376
return (yield* all()).map((tool) => tool.id)
378377
})
379378

380-
const describeSkill = Effect.fn("ToolRegistry.describeSkill")(function* (agent: Agent.Info) {
381-
const list = yield* skill.available(agent)
382-
if (list.length === 0) return "No skills are currently available."
383-
return [
384-
"Load a specialized skill that provides domain-specific instructions and workflows.",
385-
"",
386-
"When you recognize that a task matches one of the available skills listed below, use this tool to load the full skill instructions.",
387-
"",
388-
"The skill will inject detailed instructions, workflows, and access to bundled resources (scripts, references, templates) into the conversation context.",
389-
"",
390-
'Tool output includes a `<skill_content name="...">` block with the loaded content.',
391-
"",
392-
"The following skills provide specialized sets of instructions for particular tasks",
393-
"Invoke this tool to load a skill when a task matches one of the available skills listed below:",
394-
"",
395-
Skill.fmt(list, { verbose: false }),
396-
].join("\n")
397-
})
398-
399379
const describeTask = Effect.fn("ToolRegistry.describeTask")(function* (agent: Agent.Info) {
400380
const items = (yield* agents.list()).filter((item) => item.mode !== "primary")
401381
const filtered = items.filter(
@@ -444,7 +424,6 @@ const baseLayer: Layer.Layer<
444424
description: [
445425
output.description,
446426
tool.id === TaskTool.id ? yield* describeTask(input.agent) : undefined,
447-
tool.id === SkillTool.id ? yield* describeSkill(input.agent) : undefined,
448427
]
449428
.filter(Boolean)
450429
.join("\n"),

0 commit comments

Comments
 (0)