Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit92b1788

Browse files
committed
Show Remote SSH Output panel on workspace start
1 parentf9b1f25 commit92b1788

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

‎src/extension.ts‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
353353
}),
354354
);
355355

356+
letshouldShowSshOutput=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

465471
asyncfunctionshowTreeViewSearch(id:string):Promise<void>{
466472
awaitvscode.commands.executeCommand(`${id}.focus`);
467473
awaitvscode.commands.executeCommand("list.find");
468474
}
475+
476+
functionshowSshOutput():void{
477+
for(constcommandof[
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+
voidvscode.commands.executeCommand(command);
487+
}
488+
}

‎src/remote/remote.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ import { computeSSHProperties, sshSupportsSetEnv } from "./sshSupport";
5151
exportinterfaceRemoteDetailsextendsvscode.Disposable{
5252
url:string;
5353
token:string;
54+
startedWorkspace:boolean;
5455
}
5556

5657
exportclassRemote{
@@ -415,6 +416,7 @@ export class Remote {
415416
}
416417
}
417418

419+
letstartedWorkspace=false;
418420
constdisposables:vscode.Disposable[]=[];
419421
try{
420422
// Register before connection so the label still displays!
@@ -442,6 +444,7 @@ export class Remote {
442444
awaitthis.closeRemote();
443445
return;
444446
}
447+
startedWorkspace=true;
445448
workspace=updatedWorkspace;
446449
}
447450
this.commands.workspace=workspace;
@@ -681,6 +684,7 @@ export class Remote {
681684
return{
682685
url:baseUrlRaw,
683686
token,
687+
startedWorkspace,
684688
dispose:()=>{
685689
disposables.forEach((d)=>d.dispose());
686690
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp