Files
Netcatty/domain/systemManager/tmuxShell.ts
T
陈大猫 36267717ac feat(terminal): add system manager side panel for processes, tmux, and Docker
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.
2026-06-11 04:19:21 +08:00

12 lines
437 B
TypeScript

/** POSIX single-quote escaping for remote shell commands built in the renderer. */
export function shQuote(str: string): string {
return `'${String(str).replace(/'/g, "'\"'\"'")}'`;
}
export function buildTmuxAttachCommand(sessionName: string, windowIndex?: number): string {
const target = windowIndex !== undefined
? `${shQuote(sessionName)}:${windowIndex}`
: shQuote(sessionName);
return `tmux attach -t ${target}`;
}