Skip to content

Commit def522d

Browse files
authored
fix: projectRoot passed to vecLib was malformed (#1250)
## Problem workspace folder was not being correctly parsed, which caused incorrect projectRoot to be sent to vector index This caused the relativePaths in relevantTextDocuments to be incorrect ## Solution Parse workspaceFolder URI Tested on Mac and Windows
1 parent 78c12c8 commit def522d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/aws-lsp-codewhisperer/src/shared/localProjectContextController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export class LocalProjectContextController {
218218
this.maxIndexSizeMB
219219
)
220220

221-
const projectRoot = this.workspaceFolders.sort()[0].uri
221+
const projectRoot = URI.parse(this.workspaceFolders.sort()[0].uri).fsPath
222222
await this._vecLib?.buildIndex(sourceFiles, projectRoot, 'all')
223223
this.log.info('Context index built successfully')
224224
}

0 commit comments

Comments
 (0)