feat: shell can open a saved host's editor for plugins (Plugin-SSH-Terminal#36)

This commit is contained in:
LukeGus committed 2026-10-29 13:24:01 -05:00
1 parent cc2223d69e
commit 8da88b906b
4 files changed
+10

No files matched your search

@@ -173,6 +173,10 @@ export function ShellControllerProvider({
},
openHostEditor: (draft) =>
requestManage({ kind: "host", hostId: null, draft }),
editHost: (hostId) => {
requestManage({ kind: "host", hostId });
if (isMobile) regions.left.setOpen(false);
},
saveQuickConnect: tabsState.saveQuickConnectHost,
confirm: (options) =>
confirmRef.current ? confirmRef.current(options) : Promise.resolve(false),
@@ -196,6 +200,7 @@ export function ShellControllerProvider({
closeRailView: (...args) => shellImplRef.current.closeRailView(...args),
openHostEditor: (...args) =>
shellImplRef.current.openHostEditor?.(...args),
editHost: (...args) => shellImplRef.current.editHost?.(...args),
saveQuickConnect: (...args) =>
shellImplRef.current.saveQuickConnect!(...args),
confirm: (...args) => shellImplRef.current.confirm!(...args),
+2
View File
@@ -33,6 +33,8 @@ export interface TabShellCallbacks {
closeRailView: (id: string) => void;
/** Opens the host editor for a new host with these fields filled in. */
openHostEditor?: (draft?: HostDraft) => void;
/** Opens the editor of a saved host. */
editHost?: (hostId: number) => void;
/** Saves a quick-connect tab's host. Core terminal only. */
saveQuickConnect?: (tab: Tab, host: Host) => Promise<void>;
/** Asks a yes or no question over the main area. */