mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-16 20:11:08 +00:00
Introduce workspace-aware System side panel with remote process/tmux/Docker management, terminal popup for interactive attach, capability warmup, review-hardened IPC, performance optimizations, toast action errors, and SSH channel recovery on reconnect.
27 lines
844 B
TypeScript
27 lines
844 B
TypeScript
import { canReuseTerminalConnection } from '../../application/state/terminalConnectionReuse';
|
|
import type { TerminalSession } from '../../types';
|
|
import type { useSystemManagerBackend } from '../../application/state/useSystemManagerBackend';
|
|
|
|
type Backend = ReturnType<typeof useSystemManagerBackend>;
|
|
|
|
export async function openInteractiveTerminal(
|
|
backend: Backend,
|
|
parentSession: TerminalSession,
|
|
title: string,
|
|
startupCommand: string,
|
|
): Promise<{ success: boolean; error?: string }> {
|
|
const result = await backend.openTerminalPopup({
|
|
title,
|
|
parentSessionId: parentSession.id,
|
|
startupCommand,
|
|
sourceSession: {
|
|
...parentSession,
|
|
startupCommand,
|
|
reuseConnectionFromSessionId: canReuseTerminalConnection(parentSession)
|
|
? parentSession.id
|
|
: undefined,
|
|
},
|
|
});
|
|
return result;
|
|
}
|