update
This commit is contained in:
@@ -1,20 +0,0 @@
|
|||||||
import { tool, type Plugin } from "@opencode-ai/plugin"
|
|
||||||
|
|
||||||
export const MyPlugin: Plugin = async ({ project, client, $, directory, worktree }) => {
|
|
||||||
console.log("Plugin initialized!")
|
|
||||||
|
|
||||||
return {
|
|
||||||
// Hook implementations go here
|
|
||||||
tool: {
|
|
||||||
mytool: tool({
|
|
||||||
description: "获取foo的问候语",
|
|
||||||
args: {
|
|
||||||
foo: tool.schema.string(),
|
|
||||||
},
|
|
||||||
async execute(args, ctx) {
|
|
||||||
return `Hello ${args.foo}!`
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
---
|
|
||||||
name: '启动项目'
|
|
||||||
description: '使用 pnpm 启动项目'
|
|
||||||
tags:
|
|
||||||
- 'pnpm'
|
|
||||||
---
|
|
||||||
|
|
||||||
# 启动项目
|
|
||||||
|
|
||||||
在使用 pnpm 进行项目管理时,启动项目通常是通过运行定义在 `package.json` 文件中的脚本来完成的。以下是使用 pnpm 启动项目的基本步骤:
|
|
||||||
|
|
||||||
pnpm dev
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
import { tool } from "@opencode-ai/plugin"
|
|
||||||
|
|
||||||
export default tool({
|
|
||||||
description: "获取当前会话信息",
|
|
||||||
args: {},
|
|
||||||
async execute(args, context) {
|
|
||||||
// Access context information
|
|
||||||
const { agent, sessionID, messageID } = context
|
|
||||||
return `智能体: ${agent}, 会话ID: ${sessionID}, 消息ID: ${messageID}`
|
|
||||||
},
|
|
||||||
})
|
|
||||||
0
opencode.json
Normal file
0
opencode.json
Normal file
Reference in New Issue
Block a user