feat: 添加getRepo方法到Repo类以获取仓库信息,并更新相关导入

This commit is contained in:
2026-02-14 18:12:37 +08:00
parent 9bb9f447ec
commit d231f3748a
5 changed files with 8 additions and 7 deletions

View File

@@ -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"

View File

@@ -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"
// 列出我的知识库的代码仓库

View File

@@ -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({

View File

@@ -1,6 +1,6 @@
{
"name": "@kevisual/cnb",
"version": "0.0.24",
"version": "0.0.25",
"description": "",
"main": "index.js",
"scripts": {

View File

@@ -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;