From d231f3748a0365dd23f1f6c22c4ea1d4420ab2e7 Mon Sep 17 00:00:00 2001 From: abearxiong Date: Sat, 14 Feb 2026 18:12:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0getRepo=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E5=88=B0Repo=E7=B1=BB=E4=BB=A5=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=BB=93=E5=BA=93=E4=BF=A1=E6=81=AF=EF=BC=8C=E5=B9=B6=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=9B=B8=E5=85=B3=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agent/routes/call/index.ts | 3 +-- agent/routes/repo/list.ts | 3 +-- agent/routes/repo/repo.ts | 3 +-- package.json | 2 +- src/repo/index.ts | 4 ++++ 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/agent/routes/call/index.ts b/agent/routes/call/index.ts index 83fcf98..e1a446d 100644 --- a/agent/routes/call/index.ts +++ b/agent/routes/call/index.ts @@ -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" diff --git a/agent/routes/repo/list.ts b/agent/routes/repo/list.ts index a61d7b7..7813bea 100644 --- a/agent/routes/repo/list.ts +++ b/agent/routes/repo/list.ts @@ -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" // 列出我的知识库的代码仓库 diff --git a/agent/routes/repo/repo.ts b/agent/routes/repo/repo.ts index 7b6455d..36af2fc 100644 --- a/agent/routes/repo/repo.ts +++ b/agent/routes/repo/repo.ts @@ -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({ diff --git a/package.json b/package.json index 8a71bcf..9fc6f54 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kevisual/cnb", - "version": "0.0.24", + "version": "0.0.25", "description": "", "main": "index.js", "scripts": { diff --git a/src/repo/index.ts b/src/repo/index.ts index be713c5..ca8b22d 100644 --- a/src/repo/index.ts +++ b/src/repo/index.ts @@ -108,6 +108,10 @@ export class Repo extends CNBCore { const url = `/${repo}`; return this.patch({ url, data: params }); } + getRepo(repo: string): Promise> { + const url = `/${repo}`; + return this.get({ url }); + } } type UpdateRepoInfo = { description?: string;