feat: update package dependencies and add new routes for CNB environment management

- Updated package.json and pnpm-lock.yaml with new dependencies and versions.
- Removed outdated readme files from requirements.
- Enhanced CNB environment configuration in cnb-env.ts with new VS Code remote SSH settings.
- Modified KnowledgeBase class to return structured results.
- Updated Workspace class to return structured results.
- Implemented new routes for managing CNB cookies and VS Code proxy URIs.
- Added AI chat functionality for querying knowledge base.
- Created skills for cleaning up closed workspaces.
This commit is contained in:
xiongxiao
2026-01-27 04:02:34 +08:00
parent da7b06e519
commit 50332fe2f4
23 changed files with 665 additions and 201 deletions

View File

@@ -10,7 +10,7 @@ export class KnowledgeBase extends CNBCore {
score_threshold?: number,
top_k?: number,
metadata_filtering_conditions?: MetadataFilteringConditions
}): Promise<any> {
}): Promise<Result<QueryRag[]>> {
const url = `/${repo}/-/knowledge/base/query`;
let postData = {
query: data.query,
@@ -43,4 +43,17 @@ type MetadataFilteringConditions = {
value?: string
}>
logical_operator?: 'adn' | 'or'
}
type QueryRag = {
chunk: string;
score: number;
metadata: {
hash: string;
name: string;
path: string;
position: string;
type: string; // code, text
url: string;
}
}