@@ -73,23 +73,28 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
7373  vscode . window . registerTreeDataProvider ( "myWorkspaces" ,  myWorkspacesProvider ) 
7474  vscode . window . registerTreeDataProvider ( "allWorkspaces" ,  allWorkspacesProvider ) 
7575
76-   getAuthenticatedUser ( ) 
77-     . then ( async  ( user )  =>  { 
78-       if  ( user )  { 
79-         vscode . commands . executeCommand ( "setContext" ,  "coder.authenticated" ,  true ) 
80-         if  ( user . roles . find ( ( role )  =>  role . name  ===  "owner" ) )  { 
81-           await  vscode . commands . executeCommand ( "setContext" ,  "coder.isOwner" ,  true ) 
76+   const  url  =  storage . getURL ( ) 
77+   if  ( url )  { 
78+     getAuthenticatedUser ( ) 
79+       . then ( async  ( user )  =>  { 
80+         if  ( user )  { 
81+           vscode . commands . executeCommand ( "setContext" ,  "coder.authenticated" ,  true ) 
82+           if  ( user . roles . find ( ( role )  =>  role . name  ===  "owner" ) )  { 
83+             await  vscode . commands . executeCommand ( "setContext" ,  "coder.isOwner" ,  true ) 
84+           } 
8285        } 
83-       } 
84-     } ) 
85-     . catch ( ( error )  =>  { 
86-       // This should be a failure to make the request, like the header command 
87-       // errored. 
88-       vscodeProposed . window . showErrorMessage ( "Failed to check user authentication: "  +  error . message ) 
89-     } ) 
90-     . finally ( ( )  =>  { 
91-       vscode . commands . executeCommand ( "setContext" ,  "coder.loaded" ,  true ) 
92-     } ) 
86+       } ) 
87+       . catch ( ( error )  =>  { 
88+         // This should be a failure to make the request, like the header command 
89+         // errored. 
90+         vscodeProposed . window . showErrorMessage ( "Failed to check user authentication: "  +  error . message ) 
91+       } ) 
92+       . finally ( ( )  =>  { 
93+         vscode . commands . executeCommand ( "setContext" ,  "coder.loaded" ,  true ) 
94+       } ) 
95+   }  else  { 
96+     vscode . commands . executeCommand ( "setContext" ,  "coder.loaded" ,  true ) 
97+   } 
9398
9499  vscode . window . registerUriHandler ( { 
95100    handleUri : async  ( uri )  =>  { 
0 commit comments