feat: 添加getRepo方法到Repo类以获取仓库信息,并更新相关导入
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { createSkill } from '@kevisual/router'
|
||||
import { createSkill, tool } from '@kevisual/router'
|
||||
import { app } from '../../app.ts'
|
||||
import { tool } from '@opencode-ai/plugin/tool'
|
||||
|
||||
if (!app.hasRoute('call')) {
|
||||
// "调用 path: cnb key: list-repos"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { createSkill } from '@kevisual/router';
|
||||
import { createSkill, tool } from '@kevisual/router';
|
||||
import { app, cnb } from '../../app.ts';
|
||||
import { tool } from "@opencode-ai/plugin/tool"
|
||||
|
||||
// "列出我的代码仓库,search blog"
|
||||
// 列出我的知识库的代码仓库
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { app, cnb } from '../../app.ts';
|
||||
import { createSkill, Skill } from '@kevisual/router'
|
||||
import { tool } from "@opencode-ai/plugin/tool"
|
||||
import { createSkill, Skill, tool } from '@kevisual/router'
|
||||
|
||||
// 创建一个仓库 kevisual/test-repo
|
||||
app.route({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@kevisual/cnb",
|
||||
"version": "0.0.24",
|
||||
"version": "0.0.25",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -108,6 +108,10 @@ export class Repo extends CNBCore {
|
||||
const url = `/${repo}`;
|
||||
return this.patch({ url, data: params });
|
||||
}
|
||||
getRepo(repo: string): Promise<Result<RepoItem>> {
|
||||
const url = `/${repo}`;
|
||||
return this.get({ url });
|
||||
}
|
||||
}
|
||||
type UpdateRepoInfo = {
|
||||
description?: string;
|
||||
|
||||
Reference in New Issue
Block a user