@@ -26,7 +26,7 @@ export class Commands {
2626 private readonly vscodeProposed : typeof vscode ,
2727 private readonly restClient : Api ,
2828 private readonly storage : Storage ,
29- ) { }
29+ ) { }
3030
3131 /**
3232 * Find the requested agent if specified, otherwise return the agent if there
@@ -424,20 +424,20 @@ export class Commands {
424424 cancellable : false
425425 } , async ( ) => {
426426 const terminal = vscode . window . createTerminal ( app . status )
427-
427+
428428 // If workspace_name is provided, run coder ssh before the command
429-
430- let url = this . storage . getUrl ( )
431- if ( ! url ) {
432- throw new Error ( "No coder url found for sidebar" ) ;
433- }
434- let binary = await this . storage . fetchBinary ( this . restClient , toSafeHost ( url ) )
435- const escape = ( str : string ) : string => `"${ str . replace ( / " / g, '\\"' ) } "`
436- terminal . sendText ( `${ escape ( binary ) } ssh --global-config ${ escape (
437- path . dirname ( this . storage . getSessionTokenPath ( toSafeHost ( url ) ) ) ,
438- ) } ${ app . workspace_name } `)
439- await new Promise ( ( resolve ) => setTimeout ( resolve , 5000 ) )
440- terminal . sendText ( app . command ?? "" )
429+
430+ let url = this . storage . getUrl ( )
431+ if ( ! url ) {
432+ throw new Error ( "No coder url found for sidebar" ) ;
433+ }
434+ let binary = await this . storage . fetchBinary ( this . restClient , toSafeHost ( url ) )
435+ const escape = ( str : string ) : string => `"${ str . replace ( / " / g, '\\"' ) } "`
436+ terminal . sendText ( `${ escape ( binary ) } ssh --global-config ${ escape (
437+ path . dirname ( this . storage . getSessionTokenPath ( toSafeHost ( url ) ) ) ,
438+ ) } ${ app . workspace_name } `)
439+ await new Promise ( ( resolve ) => setTimeout ( resolve , 5000 ) )
440+ terminal . sendText ( app . command ?? "" )
441441 terminal . show ( false )
442442 } ) ;
443443 }
0 commit comments