test env
This commit is contained in:
@@ -1,12 +1,22 @@
|
||||
import { app, cnb } from '../../app.ts';
|
||||
|
||||
import { createSkill, Skill } from '@kevisual/router'
|
||||
import { tool } from "@opencode-ai/plugin/tool"
|
||||
app.route({
|
||||
path: 'cnb',
|
||||
key: 'repo-create',
|
||||
key: 'create-repo',
|
||||
description: '创建代码仓库, 参数name, visibility, description',
|
||||
middleware: ['auth'],
|
||||
metadata: {
|
||||
tags: ['opencode']
|
||||
tags: ['opencode'],
|
||||
...createSkill({
|
||||
skill: 'create-repo',
|
||||
title: '创建代码仓库',
|
||||
args: {
|
||||
name: tool.schema.string().describe('代码仓库名称'),
|
||||
description: tool.schema.string().describe('代码仓库描述'),
|
||||
},
|
||||
summary: '创建一个新的代码仓库',
|
||||
})
|
||||
}
|
||||
}).define(async (ctx) => {
|
||||
const name = ctx.query?.name;
|
||||
@@ -27,11 +37,22 @@ app.route({
|
||||
|
||||
app.route({
|
||||
path: 'cnb',
|
||||
key: 'repo-create-file',
|
||||
key: 'create-repo-file',
|
||||
description: '在代码仓库中创建文件, 参数repoName, path, content, encoding',
|
||||
middleware: ['auth'],
|
||||
metadata: {
|
||||
tags: ['opencode']
|
||||
tags: ['opencode'],
|
||||
...createSkill({
|
||||
skill: 'create-repo-file',
|
||||
title: '在代码仓库中创建文件',
|
||||
args: {
|
||||
repoName: tool.schema.string().describe('代码仓库名称'),
|
||||
path: tool.schema.string().describe('文件路径, 如 src/index.ts'),
|
||||
content: tool.schema.string().describe('文件内容'),
|
||||
encoding: tool.schema.string().describe('编码方式, 默认为 raw').optional(),
|
||||
},
|
||||
summary: '在代码仓库中创建文件',
|
||||
})
|
||||
}
|
||||
}).define(async (ctx) => {
|
||||
const repoName = ctx.query?.repoName;
|
||||
|
||||
Reference in New Issue
Block a user