This commit is contained in:
2026-01-13 20:20:56 +08:00
parent 0c4be1af43
commit 49388a07fc
4 changed files with 0 additions and 43 deletions

View File

@@ -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}!`
},
}),
}
}
}

View File

@@ -1,12 +0,0 @@
---
name: '启动项目'
description: '使用 pnpm 启动项目'
tags:
- 'pnpm'
---
# 启动项目
在使用 pnpm 进行项目管理时,启动项目通常是通过运行定义在 `package.json` 文件中的脚本来完成的。以下是使用 pnpm 启动项目的基本步骤:
pnpm dev

View File

@@ -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
View File