@@ -21,11 +21,7 @@ import {
2121import { assessSearchQuality } from '../core/search-quality.js' ;
2222import { getRerankerStatus } from '../core/reranker.js' ;
2323import { IndexCorruptedError } from '../errors/index.js' ;
24- import {
25- formatMemoryScopeText ,
26- readMemoriesFile ,
27- withConfidence
28- } from '../memory/store.js' ;
24+ import { formatMemoryScopeText , readMemoriesFile , withConfidence } from '../memory/store.js' ;
2925import type { MemoryWithConfidence } from '../memory/store.js' ;
3026import { indexHealthByFile , normalizeHealthLookupKey , readHealthFile } from '../health/store.js' ;
3127import { InternalFileGraph } from '../utils/usage-tracker.js' ;
@@ -359,7 +355,8 @@ export async function handle(
359355 }
360356
361357 function getMemoryTextMatchCount ( memory : MemoryWithConfidence ) : number {
362- const haystack = `${ memory . memory } ${ memory . reason } ${ formatMemoryScopeText ( memory . scope ) } ` . toLowerCase ( ) ;
358+ const haystack =
359+ `${ memory . memory } ${ memory . reason } ${ formatMemoryScopeText ( memory . scope ) } ` . toLowerCase ( ) ;
363360 return queryTerms . filter ( ( term ) => haystack . includes ( term ) ) . length ;
364361 }
365362
@@ -638,9 +635,9 @@ export async function handle(
638635 . slice ( 0 , 2 ) ;
639636 }
640637
641- function getResultHealth ( filePath : string ) :
642- | { level : 'low' | 'medium' | 'high' ; reasons ?: string [ ] }
643- | undefined {
638+ function getResultHealth (
639+ filePath : string
640+ ) : { level : 'low' | 'medium' | 'high' ; reasons ?: string [ ] } | undefined {
644641 const fileHealth = healthByFile . get ( normalizeHealthLookupKey ( filePath , ctx . rootPath ) ) ;
645642 if ( ! fileHealth || fileHealth . level === 'low' ) {
646643 return undefined ;
@@ -651,9 +648,9 @@ export async function handle(
651648 } ;
652649 }
653650
654- function summarizeResultHealth ( resultPaths : string [ ] ) :
655- | { level : 'low' | 'medium' | 'high' ; reasons ?: string [ ] }
656- | undefined {
651+ function summarizeResultHealth (
652+ resultPaths : string [ ]
653+ ) : { level : 'low' | 'medium' | 'high' ; reasons ?: string [ ] } | undefined {
657654 const matched = resultPaths
658655 . map ( ( filePath ) => healthByFile . get ( normalizeHealthLookupKey ( filePath , ctx . rootPath ) ) )
659656 . filter ( ( entry ) : entry is NonNullable < typeof entry > => Boolean ( entry ) ) ;
0 commit comments