feat: 更新依赖项,添加 OpenCode 支持,重构代理和路由逻辑,新增 AGENTS 文档
This commit is contained in:
27
assistant/agent/step.ts
Normal file
27
assistant/agent/step.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { createSkill } from '@kevisual/router'
|
||||
import { app } from './index.ts'
|
||||
import { tool } from '@opencode-ai/plugin/tool'
|
||||
|
||||
// "调用 path: test key: step"
|
||||
app.route({
|
||||
path: 'test',
|
||||
key: 'step',
|
||||
description: '测试步骤调用',
|
||||
metadata: {
|
||||
tags: ['opencode'],
|
||||
...createSkill({
|
||||
skill: 'test-step',
|
||||
title: '获取系统信息',
|
||||
summary: '根据步骤获取系统信息',
|
||||
args: {
|
||||
}
|
||||
})
|
||||
},
|
||||
}).define(async (ctx) => {
|
||||
ctx.body = {
|
||||
context: `执行步骤
|
||||
1. 调用 path: client key: system 获取系统信息
|
||||
2. 调用 path: client key: time 获取当前时间
|
||||
3. 返回结果`,
|
||||
};
|
||||
}).addTo(app)
|
||||
Reference in New Issue
Block a user