feat: 更新端口默认值为51515,添加useKey以获取默认仓库ID,更新创建文件描述信息

This commit is contained in:
2026-03-06 02:39:45 +08:00
parent 841ed6ffa7
commit 8465ba7182
4 changed files with 7 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
import { createSkill, tool } from '@kevisual/router';
import { app, cnb } from '../../app.ts';
import { CNBChat } from '@kevisual/ai/browser'
import { useKey } from '@kevisual/context';
/**
@@ -107,7 +108,7 @@ app.route({
ctx.body = { content: '请提供有效的消息内容' };
return;
}
let repo = ctx.query?.repo;
let repo = ctx.query?.repo || useKey('CNB_REPO_SLUG_LOWERCASE');
if (!repo) {
// 如果未指定知识库仓库ID则使用默认知识库
const res = await cnb.repo.getRepoList({ flags: 'KnowledgeBase' });