@@ -353,6 +353,7 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
353353 } ) ,
354354 ) ;
355355
356+ let shouldShowSshOutput = false ;
356357 // Since the "onResolveRemoteAuthority:ssh-remote" activation event exists
357358 // in package.json we're able to perform actions before the authority is
358359 // resolved by the remote SSH extension.
@@ -370,6 +371,7 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
370371 ) ;
371372 if ( details ) {
372373 ctx . subscriptions . push ( details ) ;
374+ shouldShowSshOutput = details . startedWorkspace ;
373375 // Authenticate the plugin client which is used in the sidebar to display
374376 // workspaces belonging to this deployment.
375377 client . setHost ( details . url ) ;
@@ -460,9 +462,27 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
460462 }
461463 }
462464 }
465+
466+ if ( shouldShowSshOutput ) {
467+ showSshOutput ( ) ;
468+ }
463469}
464470
465471async function showTreeViewSearch ( id : string ) : Promise < void > {
466472 await vscode . commands . executeCommand ( `${ id } .focus` ) ;
467473 await vscode . commands . executeCommand ( "list.find" ) ;
468474}
475+
476+ function showSshOutput ( ) : void {
477+ for ( const command of [
478+ "opensshremotes.showLog" ,
479+ "windsurf-remote-openssh.showLog" ,
480+ ] ) {
481+ /**
482+ * We must not await this command because
483+ * 1) it may not exist
484+ * 2) it might cause the Remote SSH extension to be loaded synchronously
485+ */
486+ void vscode . commands . executeCommand ( command ) ;
487+ }
488+ }
0 commit comments