fix: implement disabled skills functionality in skill resolution

This commit is contained in:
Muhammad Noor Misyuari
2026-01-26 14:21:28 +07:00
parent c1e08c939a
commit c67f8bde43
8 changed files with 151 additions and 31 deletions
+5 -2
View File
@@ -157,6 +157,7 @@ export function createConfigHandler(deps: ConfigHandlerDeps) {
// config.model represents the currently active model in OpenCode (including UI selection)
// Pass it as uiSelectedModel so it takes highest priority in model resolution
const currentModel = config.model as string | undefined;
const disabledSkills = new Set<string>(pluginConfig.disabled_skills ?? []);
const builtinAgents = await createBuiltinAgents(
migratedDisabledAgents,
pluginConfig.agents,
@@ -167,7 +168,8 @@ export function createConfigHandler(deps: ConfigHandlerDeps) {
allDiscoveredSkills,
ctx.client,
browserProvider,
currentModel // uiSelectedModel - takes highest priority
currentModel, // uiSelectedModel - takes highest priority
disabledSkills
);
// Claude Code agents: Do NOT apply permission migration
@@ -358,7 +360,8 @@ export function createConfigHandler(deps: ConfigHandlerDeps) {
: {};
const planDemoteConfig = shouldDemotePlan
? { mode: "subagent" as const }
? { mode: "subagent" as const
}
: undefined;
config.agent = {