File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -653,14 +653,14 @@ class CodeIndexerMcpServer {
653
653
654
654
// Format results
655
655
const formattedResults = searchResults . map ( ( result : any , index : number ) => {
656
- const location = `${ result . relativePath } :${ result . startLine } ` ;
657
- const context = this . truncateContent ( result . content , 150 ) ;
656
+ const location = `${ result . relativePath } :${ result . startLine } - ${ result . endLine } ` ;
657
+ const context = this . truncateContent ( result . content , 5000 ) ;
658
658
const codebaseInfo = path . basename ( absolutePath ) ;
659
659
660
660
return `${ index + 1 } . Code snippet (${ result . language } ) [${ codebaseInfo } ]\n` +
661
661
` Location: ${ location } \n` +
662
662
` Score: ${ result . score . toFixed ( 3 ) } \n` +
663
- ` Context: ${ context } \n` ;
663
+ ` Context: \n\`\`\` ${ result . language } \n ${ context } \n\`\`\` \n` ;
664
664
} ) . join ( '\n' ) ;
665
665
666
666
return {
You can’t perform that action at this time.
0 commit comments