Skip to content

Commit a3990cb

Browse files
committed
Merge branch 'dev'
2 parents 415ab1b + e5bbb30 commit a3990cb

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

‎packages/vscode/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "gemini-coder",
33
"displayName": "Code Web Chat",
44
"description": "Blazing fast AI pair programming for production-grade code. Select context as you go for pro accuracy and game-changing speed. (CWC)",
5-
"version": "1.498.0",
5+
"version": "1.499.0",
66
"scripts": {
77
"build": "npx vsce package --no-dependencies",
88
"vscode:prepublish": "rimraf out && npm run compile",

‎packages/vscode/src/context/providers/workspace-provider.ts‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,14 +744,23 @@ export class WorkspaceProvider
744744
private async _calculate_directory_selected_tokens(
745745
dir_path: string
746746
): Promise<number> {
747+
if (!dir_path) {
748+
return 0
749+
}
747750
if (this.directory_selected_token_counts.has(dir_path)) {
748751
return this.directory_selected_token_counts.get(dir_path)!
749752
}
750753

751754
let selected_tokens = 0
752755
try {
753756
const workspace_root = this.get_workspace_root_for_file(dir_path)
754-
if (!workspace_root) return 0
757+
if (!workspace_root || workspace_root === '') {
758+
Logger.warn({
759+
function_name: '_calculate_directory_selected_tokens',
760+
message: `No workspace root found for directory ${dir_path}`
761+
})
762+
return 0
763+
}
755764

756765
const relative_dir_path = path.relative(workspace_root, dir_path)
757766
if (this.is_excluded(relative_dir_path)) {

0 commit comments

Comments
 (0)