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 { app } from '../../app.ts'
|
||||||
import { tool } from '@opencode-ai/plugin/tool'
|
|
||||||
|
|
||||||
if (!app.hasRoute('call')) {
|
if (!app.hasRoute('call')) {
|
||||||
// "调用 path: cnb key: list-repos"
|
// "调用 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 { app, cnb } from '../../app.ts';
|
||||||
import { tool } from "@opencode-ai/plugin/tool"
|
|
||||||
|
|
||||||
// "列出我的代码仓库,search blog"
|
// "列出我的代码仓库,search blog"
|
||||||
// 列出我的知识库的代码仓库
|
// 列出我的知识库的代码仓库
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { app, cnb } from '../../app.ts';
|
import { app, cnb } from '../../app.ts';
|
||||||
import { createSkill, Skill } from '@kevisual/router'
|
import { createSkill, Skill, tool } from '@kevisual/router'
|
||||||
import { tool } from "@opencode-ai/plugin/tool"
|
|
||||||
|
|
||||||
// 创建一个仓库 kevisual/test-repo
|
// 创建一个仓库 kevisual/test-repo
|
||||||
app.route({
|
app.route({
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@kevisual/cnb",
|
"name": "@kevisual/cnb",
|
||||||
"version": "0.0.24",
|
"version": "0.0.25",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -108,6 +108,10 @@ export class Repo extends CNBCore {
|
|||||||
const url = `/${repo}`;
|
const url = `/${repo}`;
|
||||||
return this.patch({ url, data: params });
|
return this.patch({ url, data: params });
|
||||||
}
|
}
|
||||||
|
getRepo(repo: string): Promise<Result<RepoItem>> {
|
||||||
|
const url = `/${repo}`;
|
||||||
|
return this.get({ url });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
type UpdateRepoInfo = {
|
type UpdateRepoInfo = {
|
||||||
description?: string;
|
description?: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user