Skip to content

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.

Merge origin/main into the native-tmux revert

enes0df2f8987601
diff --cc src/renderer/canvas/Canvas.tsx
index cae2b83a7,7b0510ee6..7d43dadab
--- a/src/renderer/canvas/Canvas.tsx
+++ b/src/renderer/canvas/Canvas.tsx
@@@ -1763,10 -1598,32 +1765,29 @@@ export function Canvas()
setReveal((r) => ({ path: relPath, nonce: (r?.nonce ?? 0) + 1 }))
}, [])
+ // Cmd+click file links inside terminal output (TerminalNode dispatches these — it has no
+ // direct line to the canvas). Files open as editor nodes; directories reveal in Explorer.
+ useEffect(() => {
+ const onOpen = (e: Event): void => {
+ const d = (e as CustomEvent<{ path: string; ssh?: boolean }>).detail
+ if (d?.path) openFile(d.path, undefined, d.ssh)
+ }
+ const onReveal = (e: Event): void => {
+ const d = (e as CustomEvent<{ path: string }>).detail
+ if (d?.path) revealProjectFile(d.path)
+ }
+ window.addEventListener('nodeterm:open-file', onOpen)
+ window.addEventListener('nodeterm:reveal-file', onReveal)
+ return () => {
+ window.removeEventListener('nodeterm:open-file', onOpen)
+ window.removeEventListener('nodeterm:reveal-file', onReveal)
+ }
+ }, [openFile, revealProjectFile])
+
/** Open a git diff editor node for a changed file (from Source Control). */
const openDiff = useCallback(
- (relPath: string, staged: boolean) => {
- const project = useProjects.getState().getProject(activeProjectId)
- // SSH project: the diff node operates on the remote repo, so its cwd must be the exact
- // remoteCwd (the git remote registry matches by exact string; same value passed to connect).
- const cwd = project?.ssh?.remoteCwd ?? project?.cwd
+ (relPath: string, staged: boolean, scopeCwd?: string) => {
+ const cwd = scmCwd(scopeCwd)
if (!cwd) return
setNodes((ns) => [...ns, createDiffNode(ns.length, cwd, relPath, staged, viewCenter())])
markDirty()
@@@ -3297,17 -2764,10 +3356,20 @@@
{ label: 'New sticky note', icon: <IconNote />, onClick: () => addSticky(at) },
{ label: 'New dino game', icon: <IconDino />, onClick: () => addDino(at) },
{ label: 'Open file…', icon: <IconEditor />, onClick: () => void openFileDialog(at) },
+ ...(hasCwd
+ ? [{ label: 'New file…', icon: <IconEditor />, onClick: () => void newProjectFile(at) }]
+ : []),
{ type: 'separator' },
+ // A worktree lands as a group frame bound to it; nodes created inside inherit its path.
+ // Disabled (with the reason) on an SSH project — see WORKTREE_SSH_HINT.
+ {
+ label: 'New worktree…',
+ icon: <IconBranch />,
+ disabled: isSshProject,
+ hint: isSshProject ? WORKTREE_SSH_HINT : undefined,
+ onClick: () => openWorktreeDialog(null, at)
+ },
+ { type: 'separator' },
// Canvas actions.
{ label: 'Select all', icon: <IconSelectAll />, onClick: selectAll },
{ label: 'Fit view', icon: <IconFit />, onClick: () => fitView({ padding: 0.2, duration: 300 }) }
@@@ -3322,9 -2783,8 +3385,10 @@@
addDino,
addBrowser,
openFileDialog,
+ newProjectFile,
openRemotePicker,
+ openWorktreeDialog,
+ isSshProject,
selectAll,
fitView
]
@@@ -4665,8 -4120,7 +4735,9 @@@
addWebView,
addBrowser,
openFileDialog,
+ openWorktreeDialog,
+ isSshProject,
+ newProjectFile,
addProject,
fitView,
persist,