feat: add Claude Code plugin support (#240)

This commit is contained in:
Lukin
2025-12-27 17:56:40 +08:00
committed by GitHub
parent 1fc7fe7122
commit 2246d1c5ef
18 changed files with 748 additions and 49 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { tool } from "@opencode-ai/plugin"
import { tool, type ToolDefinition } from "@opencode-ai/plugin"
import { existsSync, readdirSync, readFileSync } from "fs"
import { join, basename, dirname } from "path"
import { parseFrontmatter, resolveCommandsInText, resolveFileReferencesInText, sanitizeModelField } from "../../shared"
@@ -127,7 +127,7 @@ function formatCommandList(commands: CommandInfo[]): string {
return lines.join("\n")
}
export const slashcommand = tool({
export const slashcommand: ToolDefinition = tool({
description: `Execute a slash command within the main conversation.
When you use this tool, the slash command gets expanded to a full prompt that provides detailed instructions on how to complete the task.