Refresh SSH hosts without restart

This commit is contained in:
Gerben Meijer
2026-05-16 00:20:00 +02:00
parent 0bfea39f3c
commit 694f5e9a54
13 changed files with 352 additions and 13 deletions
@@ -204,6 +204,7 @@ export class SSHCommandController {
if (compat) hostConfig.compat = true;
await addSSHHost(filePath, name, hostConfig);
await this.ctx.session.refreshSshTool({ activateIfAvailable: true });
const scopeLabel = scope === "user" ? "user" : "project";
const lines = [
@@ -364,6 +365,7 @@ export class SSHCommandController {
}
await removeSSHHost(filePath, name);
await this.ctx.session.refreshSshTool();
this.#showMessage(
["", theme.fg("success", `✓ Removed SSH host "${name}" from ${scope} config`), ""].join("\n"),