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:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user