From b96e318355c6c68669a1721cb2e19c870fbc99e6 Mon Sep 17 00:00:00 2001 From: Levi Yan Date: Sun, 2 Mar 2025 23:22:51 +0800 Subject: [PATCH] style: formatting --- src/main.ts | 4 ++-- src/remote-container.ts | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main.ts b/src/main.ts index a3d72cd..7d583dd 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,7 +1,7 @@ import * as vscode from 'vscode'; import QuickAccessTreeProvider from './views/quick-access-tree'; import DSHome from './home'; -import RemoteContainer, {openProjectWithoutLogging} from './remote-container'; +import RemoteContainer, { openProjectWithoutLogging } from './remote-container'; import User from './user'; export class DevStarExtension { @@ -56,7 +56,7 @@ export class DevStarExtension { } else { // 如果不是同用户,可以选择切换用户,或者不切换登录用户,直接打开容器 const selection = await vscode.window.showWarningMessage(`已登录用户:${this.user.getUsernameFromLocal()},是否切换用户?`, - 'Yes', 'No',); + 'Yes', 'No',); if (selection === 'Yes') { this.user.setUserTokenToLocal(access_token); this.user.setUsernameToLocal(devstar_username); diff --git a/src/remote-container.ts b/src/remote-container.ts index 6f3df14..f21552f 100644 --- a/src/remote-container.ts +++ b/src/remote-container.ts @@ -60,7 +60,7 @@ export default class RemoteContainer { vscode.window.showInformationMessage('安装完成!'); } - await ssh.dispose(); + await ssh.dispose(); } else { // connect with password (deprecate in future) await ssh.connect({ @@ -108,7 +108,7 @@ export default class RemoteContainer { }); } - async storeHostInfo(host:string, port:number, username:string): Promise { + async storeHostInfo(host: string, port: number, username: string): Promise { const sshConfigPath = path.join(os.homedir(), '.ssh', 'config'); // check if the host and related info exist in local ssh config file before saving var canAppendSSHConfig = true @@ -149,8 +149,8 @@ export default class RemoteContainer { export async function openProjectWithoutLogging(host: string, port: number, username: string, path: string): Promise { - const command = `code --remote ssh-remote+${username}@${host}:${port} ${path} --reuse-window` - let terminal = vscode.window.activeTerminal || vscode.window.createTerminal(`Ext Terminal`); - terminal.show(true); - terminal.sendText(command); - } \ No newline at end of file + const command = `code --remote ssh-remote+${username}@${host}:${port} ${path} --reuse-window` + let terminal = vscode.window.activeTerminal || vscode.window.createTerminal(`Ext Terminal`); + terminal.show(true); + terminal.sendText(command); +} \ No newline at end of file