Files
oh-my-openagent/src/tools/index.ts
YeonGyu-Kim 15419d74c2 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)
2025-12-30 11:47:50 +09:00

79 lines
1.8 KiB
TypeScript

import {
lsp_hover,
lsp_goto_definition,
lsp_find_references,
lsp_document_symbols,
lsp_workspace_symbols,
lsp_diagnostics,
lsp_servers,
lsp_prepare_rename,
lsp_rename,
lsp_code_actions,
lsp_code_action_resolve,
} from "./lsp"
import {
ast_grep_search,
ast_grep_replace,
} from "./ast-grep"
import { grep } from "./grep"
import { glob } from "./glob"
import { slashcommand } from "./slashcommand"
import {
session_list,
session_read,
session_search,
session_info,
} from "./session-manager"
export { interactive_bash, startBackgroundCheck as startTmuxCheck } from "./interactive-bash"
export { createSkillTool } from "./skill"
export { getTmuxPath } from "./interactive-bash/utils"
import {
createBackgroundTask,
createBackgroundOutput,
createBackgroundCancel,
} from "./background-task"
import type { PluginInput, ToolDefinition } from "@opencode-ai/plugin"
import type { BackgroundManager } from "../features/background-agent"
type OpencodeClient = PluginInput["client"]
export { createCallOmoAgent } from "./call-omo-agent"
export { createLookAt } from "./look-at"
export function createBackgroundTools(manager: BackgroundManager, client: OpencodeClient): Record<string, ToolDefinition> {
return {
background_task: createBackgroundTask(manager),
background_output: createBackgroundOutput(manager, client),
background_cancel: createBackgroundCancel(manager, client),
}
}
export const builtinTools: Record<string, ToolDefinition> = {
lsp_hover,
lsp_goto_definition,
lsp_find_references,
lsp_document_symbols,
lsp_workspace_symbols,
lsp_diagnostics,
lsp_servers,
lsp_prepare_rename,
lsp_rename,
lsp_code_actions,
lsp_code_action_resolve,
ast_grep_search,
ast_grep_replace,
grep,
glob,
slashcommand,
session_list,
session_read,
session_search,
session_info,
}