feat: two new global state variable( localSystemName, localSSHConfigPath) used to support first connect in remote environment

This commit is contained in:
Levi Yan
2025-05-06 23:00:03 +08:00
parent d5487fa6b7
commit c15b8919ca
2 changed files with 14 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ import * as https from 'https';
import * as vscode from 'vscode';
import * as os from 'os';
import { exec } from 'child_process';
import * as path from 'path';
const {
generateKeyPairSync,
@@ -125,4 +126,12 @@ export function updateLocalSystemName(context: vscode.ExtensionContext) {
export function getLocalSystemName(context: vscode.ExtensionContext): string | undefined {
return context.globalState.get('localSystemName')
}
export function updateLocalSSHConfigPath(context: vscode.ExtensionContext) {
context.globalState.update('localSSHConfigPath', path.join(os.homedir(), '.ssh', 'config'))
}
export function getLocalSSHConfigPath(context: vscode.ExtensionContext): undefined | string{
return context.globalState.get('localSSHConfigPath')
}