codevault
Version:
AI-powered semantic code search via Model Context Protocol
39 lines • 1.16 kB
TypeScript
import type { ModelProfile } from '../providers/base.js';
import type { TreeSitterNode } from '../types/ast.js';
interface LanguageRule {
subdivisionTypes?: Record<string, string[]>;
[key: string]: any;
}
interface NodeAnalysis {
node: TreeSitterNode;
size: number;
code: string;
}
interface SemanticGroup {
type: string;
containerType?: string;
nodes: TreeSitterNode[];
analyses: NodeAnalysis[];
parentNode: TreeSitterNode | null;
}
export interface NodeGroup {
nodes: TreeSitterNode[];
totalSize: number;
groupInfo: SemanticGroup[];
}
export declare function groupNodesForChunking(nodes: TreeSitterNode[], source: string, profile: ModelProfile, rule: LanguageRule): Promise<NodeGroup[]>;
export interface CombinedChunk {
code: string;
node: TreeSitterNode & {
type: string;
};
metadata: {
isGroup: boolean;
nodeCount: number;
totalSize: number;
groupTypes: string[];
};
}
export declare function createCombinedChunk(nodeGroup: NodeGroup, source: string, filerel: string): CombinedChunk | null;
export {};
//# sourceMappingURL=file-grouper.d.ts.map