@@ -175,8 +175,9 @@ export async function handle(
175175 text : JSON . stringify (
176176 {
177177 status : 'error' ,
178- message : `Auto-heal retry failed: ${ retryError instanceof Error ? retryError . message : String ( retryError )
179- } `
178+ message : `Auto-heal retry failed: ${
179+ retryError instanceof Error ? retryError . message : String ( retryError )
180+ } `
180181 } ,
181182 null ,
182183 2
@@ -312,7 +313,8 @@ export async function handle(
312313 function buildRelationshipHints ( result : SearchResult ) : RelationshipHints {
313314 const rPath = result . filePath ;
314315 // Graph keys are relative paths with forward slashes; normalize for comparison
315- const rPathNorm = path . relative ( ctx . rootPath , rPath ) . replace ( / \\ / g, '/' ) || rPath . replace ( / \\ / g, '/' ) ;
316+ const rPathNorm =
317+ path . relative ( ctx . rootPath , rPath ) . replace ( / \\ / g, '/' ) || rPath . replace ( / \\ / g, '/' ) ;
316318
317319 // importedBy: files that import this result (reverse lookup), collect with counts
318320 const importedByMap = new Map < string , number > ( ) ;
@@ -394,7 +396,6 @@ export async function handle(
394396 const resultPaths = results . map ( ( r ) => r . filePath ) ;
395397 const impactCandidates = computeImpactCandidates ( resultPaths ) ;
396398
397-
398399 // Use existing pattern intelligence for evidenceLock scoring, but keep the output payload lite.
399400 const preferredPatternsForEvidence : Array < { pattern : string ; example ?: string } > = [ ] ;
400401 const patterns = intelligence . patterns || { } ;
@@ -410,7 +411,6 @@ export async function handle(
410411 }
411412 }
412413
413-
414414 let riskLevel : 'low' | 'medium' | 'high' = 'low' ;
415415 if ( impactCandidates . length > 10 ) {
416416 riskLevel = 'high' ;
@@ -620,8 +620,12 @@ export async function handle(
620620 }
621621
622622 // Add patterns (do/avoid, capped at 3 each, with adoption %)
623- const doPatterns = preferredPatternsForOutput . slice ( 0 , 3 ) . map ( ( p ) => `${ p . pattern } — ${ p . adoption ? ` ${ p . adoption } % adoption` : '' } ` ) ;
624- const avoidPatterns = avoidPatternsForOutput . slice ( 0 , 3 ) . map ( ( p ) => `${ p . pattern } — ${ p . adoption ? ` ${ p . adoption } % adoption` : '' } (declining)` ) ;
623+ const doPatterns = preferredPatternsForOutput
624+ . slice ( 0 , 3 )
625+ . map ( ( p ) => `${ p . pattern } — ${ p . adoption ? ` ${ p . adoption } % adoption` : '' } ` ) ;
626+ const avoidPatterns = avoidPatternsForOutput
627+ . slice ( 0 , 3 )
628+ . map ( ( p ) => `${ p . pattern } — ${ p . adoption ? ` ${ p . adoption } % adoption` : '' } (declining)` ) ;
625629 if ( doPatterns . length > 0 || avoidPatterns . length > 0 ) {
626630 decisionCard . patterns = {
627631 ...( doPatterns . length > 0 && { do : doPatterns } ) ,
@@ -720,8 +724,8 @@ export async function handle(
720724 confidence : searchQuality . confidence ,
721725 ...( searchQuality . status === 'low_confidence' &&
722726 searchQuality . nextSteps ?. [ 0 ] && {
723- hint : searchQuality . nextSteps [ 0 ]
724- } )
727+ hint : searchQuality . nextSteps [ 0 ]
728+ } )
725729 } ,
726730 ...( preflightPayload && { preflight : preflightPayload } ) ,
727731 results : results . map ( ( r ) => {
@@ -737,7 +741,9 @@ export async function handle(
737741 ...( r . componentType && r . layer && { type : `${ r . componentType } :${ r . layer } ` } ) ,
738742 ...( r . trend && r . trend !== 'Stable' && { trend : r . trend } ) ,
739743 ...( r . patternWarning && { patternWarning : r . patternWarning } ) ,
740- ...( relationshipsAndHints . relationships && { relationships : relationshipsAndHints . relationships } ) ,
744+ ...( relationshipsAndHints . relationships && {
745+ relationships : relationshipsAndHints . relationships
746+ } ) ,
741747 ...( relationshipsAndHints . hints && { hints : relationshipsAndHints . hints } ) ,
742748 ...( enrichedSnippet && { snippet : enrichedSnippet } )
743749 } ;
0 commit comments