File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ Unreleased]
99
10+ ### Fixed
11+ - Fixed invalid file and url MCP results for local indexed repos [ #718 ] ( https://github.com/sourcebot-dev/sourcebot/pull/718 )
12+
1013## [ 1.0.11] - 2025-12-03
1114
1215### Changed
Original file line number Diff line number Diff line change @@ -106,7 +106,8 @@ server.tool(
106106 ( acc , chunk ) => acc + chunk . matchRanges . length ,
107107 0 ,
108108 ) ;
109- let text = `file: ${ file . webUrl } \nnum_matches: ${ numMatches } \nrepository: ${ file . repository } \nlanguage: ${ file . language } ` ;
109+ const fileIdentifier = file . webUrl ?? file . fileName . text ;
110+ let text = `file: ${ fileIdentifier } \nnum_matches: ${ numMatches } \nrepository: ${ file . repository } \nlanguage: ${ file . language } ` ;
110111
111112 if ( includeCodeSnippets ) {
112113 const snippets = file . chunks . map ( chunk => {
@@ -200,9 +201,10 @@ server.tool(
200201
201202 // Format output
202203 const content : TextContent [ ] = paginated . map ( repo => {
204+ const repoUrl = repo . webUrl ?? repo . repoCloneUrl ;
203205 return {
204206 type : "text" ,
205- text : `id: ${ repo . repoName } \nurl: ${ repo . webUrl } ` ,
207+ text : `id: ${ repo . repoName } \nurl: ${ repoUrl } ` ,
206208 }
207209 } ) ;
208210
You can’t perform that action at this time.
0 commit comments