/** * Code chunker — turns Methods/Types into embedding-ready text. * * Strategy: * Tier A: Signature * Tier B: Doc-Comment (if any) * Tier C: Weighted identifier bag (top-100 by frequency, repeated as weight) * plus alphanumeric string literals >5 chars from the body. * * The weighting embeds the heavy hitters (errorCount used 3x → appears 3x in * the text) so the embedding model picks them up as the dominant theme. */ export interface CodeChunkInput { name: string; signature: string; docComment?: string | null; bodyText?: string | null; /** Identifiers used in the method/type body, with usage counts. */ identifiers?: Map; } export interface ChunkOutput { /** * Backwards-compatible field: equals `embeddingText`. * Callers that don't care about the display/embedding split can keep using this. */ text: string; /** Text fed to the embedding model (with weighted identifier repetition). */ embeddingText: string; /** Human-readable text stored in source_text and shown in the viewer. */ displayText: string; /** Hash of the embedding-relevant text — used for skip-on-no-change. */ contentHash: string; } /** Public for testing. */ export declare function extractStringLiterals(body: string): string[]; /** Public for testing — returns the weighted, repetition-based identifier list (for the model). */ export declare function buildIdentifierBag(identifiers: Map): string[]; /** Public for testing — returns "name (count), name (count), ..." for display. */ export declare function buildIdentifierBagDisplay(identifiers: Map): string; export declare function chunkCode(input: CodeChunkInput): ChunkOutput; //# sourceMappingURL=chunker.d.ts.map