/** * Query Intent Detection Service * * Detects whether a search query is looking for implementation code * or documentation, and calculates appropriate boosts. */ /** Implementation-related query terms that boost source code files */ export declare const IMPLEMENTATION_TERMS: string[]; /** Documentation-related query terms that boost documentation files */ export declare const DOCUMENTATION_TERMS: string[]; /** Source code file extensions */ export declare const SOURCE_CODE_EXTENSIONS: string[]; /** Documentation file extensions */ export declare const DOC_EXTENSIONS: string[]; /** Data/config file extensions */ export declare const DATA_EXTENSIONS: string[]; /** Query intent types */ export type QueryIntent = "implementation" | "documentation" | "neutral"; /** * Detect query intent based on terms. * Returns: 'implementation' | 'documentation' | 'neutral' * * @param queryTerms - Array of query terms (lowercase) * @returns The detected intent */ export declare function detectQueryIntent(queryTerms: string[]): QueryIntent; /** * Extract query terms from a search query. * * @param query - The search query string * @returns Array of lowercase terms (length > 2) */ export declare function extractQueryTerms(query: string): string[]; /** * Determine if a file is a source code file based on extension. */ export declare function isSourceCodeFile(filepath: string): boolean; /** * Determine if a file is a documentation file based on extension. */ export declare function isDocFile(filepath: string): boolean; /** * Determine if a file is a data/config file based on extension. */ export declare function isDataFile(filepath: string): boolean; /** * Calculate boost based on file type and query context. * Bidirectional: boosts code for implementation queries, docs for documentation queries. * Only applies when query intent is clear. * * @param filepath - The file path * @param queryTerms - Array of query terms (lowercase) * @returns Boost value (0 to ~0.1) */ export declare function calculateFileTypeBoost(filepath: string, queryTerms: string[]): number;