Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.
TypeScript adhdagent-orchestrationai-agentscanvasclaude-codecodexcoding-agentsdeveloper-toolselectrongeminilinuxmacosmultiplexeropencodeparallel-agentsterminalterminal-emulatorterminal-multiplexertmuxworkspace-manager
feat(ssh): drop a file on a remote terminal uploads it + pastes the remote path
enes92b770f6afd5
diff --git a/src/renderer/nodes/TerminalNode.tsx b/src/renderer/nodes/TerminalNode.tsxindex 439e6d28c..4c22dfa9c 100644--- a/src/renderer/nodes/TerminalNode.tsx+++ b/src/renderer/nodes/TerminalNode.tsx@@ -478,19 +478,34 @@ export function TerminalNode({ id, data, selected, parentId }: NodeProps<CanvasNconst rt = e.relatedTarget as Node | nullif (!rt || !(e.currentTarget as HTMLElement).contains(rt)) setDropping(false)}- const onBodyDrop = (e: React.DragEvent) => {+ const onBodyDrop = async (e: React.DragEvent) => {const files = Array.from(e.dataTransfer.files)setDropping(false)if (!files.length) returne.preventDefault()e.stopPropagation()- const paths = files- .map((f) => window.nodeTerminal.getPathForFile(f))- .filter(Boolean)- .map(escapeDroppedPath)- if (!paths.length) returnconst term = termRef.currentif (!term) return++ let paths: string[]+ if (data.sshRemoteTmux) {+ // Remote terminal: a local path is useless on the remote host. Upload each file over the+ // project's ControlMaster and paste the REMOTE absolute path instead. Fail-open: skip nulls.+ const projectId = useProjects.getState().activeProjectId+ const uploaded = await Promise.all(+ files.map((f) => {+ const lp = window.nodeTerminal.getPathForFile(f)+ return lp ? window.nodeTerminal.sshProject.uploadFile(projectId, lp, f.name) : Promise.resolve(null)+ })+ )+ paths = uploaded.filter((p): p is string => !!p).map(escapeDroppedPath)+ } else {+ paths = files+ .map((f) => window.nodeTerminal.getPathForFile(f))+ .filter(Boolean)+ .map(escapeDroppedPath)+ }+ if (!paths.length) return// Enter the terminal and paste the path(s) like a real drop (trailing space to continue).if (dwellRef.current) clearTimeout(dwellRef.current)setArmed(false)