feat: wire skill tool to plugin with claude_code.skills toggle
- Export createSkillTool from src/tools/index.ts for public use - Import and instantiate skill tool in OhMyOpenCodePlugin with configuration - Use claude_code?.skills toggle to control inclusion of Claude Code paths - When skills toggle is false, only OpenCode-specific paths are included - Add skill to tools object and register with plugin for Claude Code compatibility - Respects existing plugin configuration patterns and integration style 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
@@ -50,7 +50,7 @@ import {
|
|||||||
setMainSession,
|
setMainSession,
|
||||||
getMainSessionID,
|
getMainSessionID,
|
||||||
} from "./features/claude-code-session-state";
|
} from "./features/claude-code-session-state";
|
||||||
import { builtinTools, createCallOmoAgent, createBackgroundTools, createLookAt, interactive_bash, getTmuxPath } from "./tools";
|
import { builtinTools, createCallOmoAgent, createBackgroundTools, createLookAt, createSkillTool, interactive_bash, getTmuxPath } from "./tools";
|
||||||
import { BackgroundManager } from "./features/background-agent";
|
import { BackgroundManager } from "./features/background-agent";
|
||||||
import { createBuiltinMcps } from "./mcp";
|
import { createBuiltinMcps } from "./mcp";
|
||||||
import { OhMyOpenCodeConfigSchema, type OhMyOpenCodeConfig, type HookName } from "./config";
|
import { OhMyOpenCodeConfigSchema, type OhMyOpenCodeConfig, type HookName } from "./config";
|
||||||
@@ -322,6 +322,9 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
|
|||||||
|
|
||||||
const callOmoAgent = createCallOmoAgent(ctx, backgroundManager);
|
const callOmoAgent = createCallOmoAgent(ctx, backgroundManager);
|
||||||
const lookAt = createLookAt(ctx);
|
const lookAt = createLookAt(ctx);
|
||||||
|
const skillTool = createSkillTool({
|
||||||
|
opencodeOnly: pluginConfig.claude_code?.skills === false,
|
||||||
|
});
|
||||||
|
|
||||||
const googleAuthHooks = pluginConfig.google_auth !== false
|
const googleAuthHooks = pluginConfig.google_auth !== false
|
||||||
? await createGoogleAntigravityAuthPlugin(ctx)
|
? await createGoogleAntigravityAuthPlugin(ctx)
|
||||||
@@ -337,6 +340,7 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
|
|||||||
...backgroundTools,
|
...backgroundTools,
|
||||||
call_omo_agent: callOmoAgent,
|
call_omo_agent: callOmoAgent,
|
||||||
look_at: lookAt,
|
look_at: lookAt,
|
||||||
|
skill: skillTool,
|
||||||
...(tmuxAvailable ? { interactive_bash } : {}),
|
...(tmuxAvailable ? { interactive_bash } : {}),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import {
|
|||||||
} from "./session-manager"
|
} from "./session-manager"
|
||||||
|
|
||||||
export { interactive_bash, startBackgroundCheck as startTmuxCheck } from "./interactive-bash"
|
export { interactive_bash, startBackgroundCheck as startTmuxCheck } from "./interactive-bash"
|
||||||
|
export { createSkillTool } from "./skill"
|
||||||
export { getTmuxPath } from "./interactive-bash/utils"
|
export { getTmuxPath } from "./interactive-bash/utils"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|||||||
Reference in New Issue
Block a user