File tree Expand file tree Collapse file tree 2 files changed +18
-10
lines changed
Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,7 @@ export class Commands {
209209
210210 await this . deploymentManager . clearDeployment ( ) ;
211211
212- void vscode . window
212+ vscode . window
213213 . showInformationMessage ( "You've been logged out of Coder!" , "Login" )
214214 . then ( ( action ) => {
215215 if ( action === "Login" ) {
Original file line number Diff line number Diff line change @@ -71,17 +71,25 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
7171 const deployment = await secretsManager . getCurrentDeployment ( ) ;
7272
7373 // Shared handler for auth failures (used by interceptor + session manager)
74- const handleAuthFailure = async ( ) : Promise < void > => {
74+ const handleAuthFailure = ( ) : Promise < void > => {
7575 deploymentManager . suspendSession ( ) ;
76- const action = await vscode . window . showWarningMessage (
77- "Session expired. You have been signed out." ,
78- "Log In" ,
79- ) ;
80- if ( action === "Log In" ) {
81- await commands . login ( {
82- url : deploymentManager . getCurrentDeployment ( ) ?. url ,
76+ vscode . window
77+ . showWarningMessage (
78+ "Session expired. You have been signed out." ,
79+ "Log In" ,
80+ )
81+ . then ( async ( action ) => {
82+ if ( action === "Log In" ) {
83+ try {
84+ await commands . login ( {
85+ url : deploymentManager . getCurrentDeployment ( ) ?. url ,
86+ } ) ;
87+ } catch ( err ) {
88+ output . error ( "Login failed" , err ) ;
89+ }
90+ }
8391 } ) ;
84- }
92+ return Promise . resolve ( ) ;
8593 } ;
8694
8795 // Create OAuth session manager - callback handles background refresh failures
You can’t perform that action at this time.
0 commit comments