@@ -365,7 +365,7 @@ export class CodebaseIndexer {
365365
366366 console . error (
367367 `Incremental diff: ${ diff . added . length } added, ${ diff . changed . length } changed, ` +
368- `${ diff . deleted . length } deleted, ${ diff . unchanged . length } unchanged`
368+ `${ diff . deleted . length } deleted, ${ diff . unchanged . length } unchanged`
369369 ) ;
370370
371371 stats . incremental = {
@@ -440,9 +440,9 @@ export class CodebaseIndexer {
440440 // Build the set of files that need analysis + embedding (incremental: only added/changed)
441441 const filesToProcess = diff
442442 ? files . filter ( ( f ) => {
443- const rel = path . relative ( this . rootPath , f ) . replace ( / \\ / g, '/' ) ;
444- return diff ! . added . includes ( rel ) || diff ! . changed . includes ( rel ) ;
445- } )
443+ const rel = path . relative ( this . rootPath , f ) . replace ( / \\ / g, '/' ) ;
444+ return diff ! . added . includes ( rel ) || diff ! . changed . includes ( rel ) ;
445+ } )
446446 : files ;
447447
448448 // Phase 2: Analyzing & Parsing
@@ -549,8 +549,14 @@ export class CodebaseIndexer {
549549 // GENERIC PATTERN FORWARDING
550550 // Framework analyzers return detectedPatterns in metadata - we just forward them
551551 // This keeps the indexer framework-agnostic
552- if ( result . metadata ?. detectedPatterns && Array . isArray ( result . metadata . detectedPatterns ) ) {
553- for ( const pattern of result . metadata . detectedPatterns as Array < { category : string ; name : string } > ) {
552+ if (
553+ result . metadata ?. detectedPatterns &&
554+ Array . isArray ( result . metadata . detectedPatterns )
555+ ) {
556+ for ( const pattern of result . metadata . detectedPatterns as Array < {
557+ category : string ;
558+ name : string ;
559+ } > ) {
554560 // Try to extract a relevant snippet for the pattern
555561 // Ask analyzer registry for snippet pattern (framework-agnostic delegation)
556562 const analyzer = analyzerRegistry . findAnalyzer ( file ) ;
@@ -569,12 +575,12 @@ export class CodebaseIndexer {
569575 // Track file for Golden File scoring (framework-agnostic)
570576 // A golden file = file with patterns in ≥3 distinct categories
571577 const rawPatterns = result . metadata ?. detectedPatterns ;
572- const detectedPatterns : Array < { category : string ; name : string } > = Array . isArray ( rawPatterns )
578+ const detectedPatterns : Array < { category : string ; name : string } > = Array . isArray (
579+ rawPatterns
580+ )
573581 ? ( rawPatterns as Array < { category : string ; name : string } > )
574582 : [ ] ;
575- const uniqueCategories = new Set (
576- detectedPatterns . map ( ( p ) => p . category )
577- ) ;
583+ const uniqueCategories = new Set ( detectedPatterns . map ( ( p ) => p . category ) ) ;
578584 const patternScore = uniqueCategories . size ;
579585 if ( patternScore >= 3 ) {
580586 const patternFlags : Record < string , boolean > = { } ;
@@ -638,8 +644,8 @@ export class CodebaseIndexer {
638644 this . updateProgress ( 'embedding' , 50 ) ;
639645 console . error (
640646 `Creating embeddings for ${ chunksToEmbed . length } chunks` +
641- ( diff ? ` (${ allChunks . length } total, ${ chunksToEmbed . length } changed)` : '' ) +
642- '...'
647+ ( diff ? ` (${ allChunks . length } total, ${ chunksToEmbed . length } changed)` : '' ) +
648+ '...'
643649 ) ;
644650
645651 // Initialize embedding provider
@@ -685,7 +691,8 @@ export class CodebaseIndexer {
685691
686692 if ( ( i + batchSize ) % 100 === 0 || i + batchSize >= chunksToEmbed . length ) {
687693 console . error (
688- `Embedded ${ Math . min ( i + batchSize , chunksToEmbed . length ) } /${ chunksToEmbed . length
694+ `Embedded ${ Math . min ( i + batchSize , chunksToEmbed . length ) } /${
695+ chunksToEmbed . length
689696 } chunks`
690697 ) ;
691698 }
@@ -738,7 +745,7 @@ export class CodebaseIndexer {
738745 }
739746 console . error (
740747 `Incremental store: deleted chunks for ${ diff . changed . length + diff . deleted . length } files, ` +
741- `added ${ chunksWithEmbeddings . length } new chunks`
748+ `added ${ chunksWithEmbeddings . length } new chunks`
742749 ) ;
743750 } else {
744751 // Full rebuild: store to staging (no clear - fresh directory)
@@ -911,8 +918,8 @@ export class CodebaseIndexer {
911918 if ( diff ) {
912919 console . error (
913920 `Incremental indexing complete in ${ stats . duration } ms ` +
914- `(${ diff . added . length } added, ${ diff . changed . length } changed, ` +
915- `${ diff . deleted . length } deleted, ${ diff . unchanged . length } unchanged)`
921+ `(${ diff . added . length } added, ${ diff . changed . length } changed, ` +
922+ `${ diff . deleted . length } deleted, ${ diff . unchanged . length } unchanged)`
916923 ) ;
917924 } else {
918925 console . error ( `Indexing complete in ${ stats . duration } ms` ) ;
0 commit comments