fix: keep floating tabs local with active runtime
Keep the synthetic floating workspace local while a remote runtime is active, including terminal/browser creation, activation, close, and remote snapshot handling. Maintainer follow-ups: - require worktreeId for runtime-session terminal create payloads - add renderer-backed terminal create reply sender regression coverage - merge current main and keep the WSL readDir breadcrumb test aligned with main's Windows-only handler coverage
This commit is contained in:
@@ -268,6 +268,7 @@ import type {
|
||||
RuntimeStatus,
|
||||
RuntimeSyncWindowGraphResult,
|
||||
RuntimeSyncWindowGraph,
|
||||
RuntimeTerminalCreateRequestPayload,
|
||||
RuntimeTerminalDriverState,
|
||||
RuntimeTerminalPresentation
|
||||
} from '../shared/runtime-types'
|
||||
@@ -2591,21 +2592,7 @@ export type PreloadApi = {
|
||||
}) => void
|
||||
) => () => void
|
||||
onRequestTerminalCreate: (
|
||||
callback: (data: {
|
||||
requestId: string
|
||||
worktreeId?: string
|
||||
afterTabId?: string
|
||||
targetGroupId?: string
|
||||
command?: string
|
||||
env?: Record<string, string>
|
||||
launchConfig?: SleepingAgentLaunchConfig
|
||||
launchToken?: string
|
||||
launchAgent?: TuiAgent
|
||||
startupCommandDelivery?: StartupCommandDelivery
|
||||
title?: string
|
||||
activate?: boolean
|
||||
presentation?: RuntimeTerminalPresentation
|
||||
}) => void
|
||||
callback: (data: RuntimeTerminalCreateRequestPayload) => void
|
||||
) => () => void
|
||||
replyTerminalCreate: (reply: {
|
||||
requestId: string
|
||||
|
||||
+3
-30
@@ -65,6 +65,7 @@ import type {
|
||||
RuntimeStatus,
|
||||
RuntimeSyncWindowGraphResult,
|
||||
RuntimeSyncWindowGraph,
|
||||
RuntimeTerminalCreateRequestPayload,
|
||||
RuntimeTerminalDriverState,
|
||||
RuntimeTerminalPresentation
|
||||
} from '../shared/runtime-types'
|
||||
@@ -3228,39 +3229,11 @@ const api = {
|
||||
return () => ipcRenderer.removeListener('ui:createTerminal', listener)
|
||||
},
|
||||
onRequestTerminalCreate: (
|
||||
callback: (data: {
|
||||
requestId: string
|
||||
worktreeId?: string
|
||||
afterTabId?: string
|
||||
targetGroupId?: string
|
||||
command?: string
|
||||
env?: Record<string, string>
|
||||
launchConfig?: SleepingAgentLaunchConfig
|
||||
launchToken?: string
|
||||
launchAgent?: TuiAgent
|
||||
startupCommandDelivery?: StartupCommandDelivery
|
||||
title?: string
|
||||
activate?: boolean
|
||||
presentation?: RuntimeTerminalPresentation
|
||||
}) => void
|
||||
callback: (data: RuntimeTerminalCreateRequestPayload) => void
|
||||
): (() => void) => {
|
||||
const listener = (
|
||||
_event: Electron.IpcRendererEvent,
|
||||
data: {
|
||||
requestId: string
|
||||
worktreeId?: string
|
||||
afterTabId?: string
|
||||
targetGroupId?: string
|
||||
command?: string
|
||||
env?: Record<string, string>
|
||||
launchConfig?: SleepingAgentLaunchConfig
|
||||
launchToken?: string
|
||||
launchAgent?: TuiAgent
|
||||
startupCommandDelivery?: StartupCommandDelivery
|
||||
title?: string
|
||||
activate?: boolean
|
||||
presentation?: RuntimeTerminalPresentation
|
||||
}
|
||||
data: RuntimeTerminalCreateRequestPayload
|
||||
) => callback(data)
|
||||
ipcRenderer.on('terminal:requestTabCreate', listener)
|
||||
return () => ipcRenderer.removeListener('terminal:requestTabCreate', listener)
|
||||
|
||||
Reference in New Issue
Block a user