fix: wire host config.skills.paths into command skill discovery

Mirrors the agent-config-handler change: command-config-handler now also discovers skills from host config.skills.paths set by other plugins, making them available as slash commands.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-18 13:43:56 +09:00
parent 1412795825
commit ecb87608e6
2 changed files with 41 additions and 0 deletions
@@ -26,6 +26,7 @@ import {
log,
} from "../shared";
import type { PluginComponents } from "./plugin-components-loader";
import { adaptHostSkillConfig } from "../shared/host-skill-config";
export async function applyCommandConfig(params: {
config: Record<string, unknown>;
@@ -47,8 +48,10 @@ export async function applyCommandConfig(params: {
log(getSkillPluginConflictWarning(externalSkillPlugin.pluginName));
}
const hostSkillConfig = adaptHostSkillConfig(params.config.skills);
const [
configSourceSkills,
hostConfigSkills,
userCommands,
projectCommands,
opencodeGlobalCommands,
@@ -64,6 +67,10 @@ export async function applyCommandConfig(params: {
config: params.pluginConfig.skills,
configDir: params.ctx.directory,
}),
discoverConfigSourceSkills({
config: hostSkillConfig,
configDir: params.ctx.directory,
}),
includeClaudeCommands ? loadUserCommands() : Promise.resolve({}),
includeClaudeCommands ? loadProjectCommands(params.ctx.directory) : Promise.resolve({}),
loadOpencodeGlobalCommands(),
@@ -79,6 +86,7 @@ export async function applyCommandConfig(params: {
params.config.command = {
...builtinCommands,
...skillsToCommandDefinitionRecord(configSourceSkills),
...skillsToCommandDefinitionRecord(hostConfigSkills),
...userCommands,
...userSkills,
...globalAgentsSkills,