File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff 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 ) ) {
You can’t perform that action at this time.
0 commit comments