462bf7b277
Per reviewer feedback (code-yeongyu), keep the 'skill' tool as the main tool and merge slashcommand functionality INTO it, rather than the reverse. Changes: - skill/tools.ts: Add command discovery (discoverCommandsSync) support; handle both SKILL.md skills and .omo/commands/ slash commands in a single tool; show combined listing in tool description - skill/types.ts: Add 'commands' option to SkillLoadOptions - skill/constants.ts: Update description to mention both skills and commands - plugin/tool-registry.ts: Replace createSlashcommandTool with createSkillTool; register tool as 'skill' instead of 'slashcommand' - tools/index.ts: Export createSkillTool instead of createSlashcommandTool - plugin/tool-execute-before.ts: Update tool name checks from 'slashcommand' to 'skill'; update arg name from 'command' to 'name' - agents/dynamic-agent-prompt-builder.ts: Categorize 'skill' tool as 'command' - tools/skill-mcp/tools.ts: Update hint message to reference 'skill' tool - hooks/auto-slash-command/executor.ts: Update error message The slashcommand/ module files are kept (they provide shared utilities used by the skill tool), but the slashcommand tool itself is no longer registered.
65 lines
1.9 KiB
TypeScript
65 lines
1.9 KiB
TypeScript
import {
|
|
lsp_goto_definition,
|
|
lsp_find_references,
|
|
lsp_symbols,
|
|
lsp_diagnostics,
|
|
lsp_prepare_rename,
|
|
lsp_rename,
|
|
lspManager,
|
|
} from "./lsp"
|
|
|
|
export { lspManager }
|
|
|
|
export { createAstGrepTools } from "./ast-grep"
|
|
export { createGrepTools } from "./grep"
|
|
export { createGlobTools } from "./glob"
|
|
export { createSkillTool } from "./skill"
|
|
export { discoverCommandsSync } from "./slashcommand"
|
|
export { createSessionManagerTools } from "./session-manager"
|
|
|
|
export { sessionExists } from "./session-manager/storage"
|
|
|
|
export { interactive_bash, startBackgroundCheck as startTmuxCheck } from "./interactive-bash"
|
|
export { createSkillMcpTool } from "./skill-mcp"
|
|
|
|
import {
|
|
createBackgroundOutput,
|
|
createBackgroundCancel,
|
|
type BackgroundOutputManager,
|
|
type BackgroundCancelClient,
|
|
} 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 { createDelegateTask } from "./delegate-task"
|
|
export {
|
|
createTaskCreateTool,
|
|
createTaskGetTool,
|
|
createTaskList,
|
|
createTaskUpdateTool,
|
|
} from "./task"
|
|
export { createHashlineEditTool } from "./hashline-edit"
|
|
|
|
export function createBackgroundTools(manager: BackgroundManager, client: OpencodeClient): Record<string, ToolDefinition> {
|
|
const outputManager: BackgroundOutputManager = manager
|
|
const cancelClient: BackgroundCancelClient = client
|
|
return {
|
|
background_output: createBackgroundOutput(outputManager, client),
|
|
background_cancel: createBackgroundCancel(manager, cancelClient),
|
|
}
|
|
}
|
|
|
|
export const builtinTools: Record<string, ToolDefinition> = {
|
|
lsp_goto_definition,
|
|
lsp_find_references,
|
|
lsp_symbols,
|
|
lsp_diagnostics,
|
|
lsp_prepare_rename,
|
|
lsp_rename,
|
|
}
|