From 5f6dda9060ae6fcca632e9c849539aa5efd0573c Mon Sep 17 00:00:00 2001 From: centdix Date: Sat, 21 Feb 2026 15:34:02 +0000 Subject: [PATCH] feat: add shell pane alongside agent in agent-only/yolo profiles Split a 33% width shell pane on the right, using the worktree directory from pane 0 so it starts in the correct path. Co-Authored-By: Claude Opus 4.6 --- dev-dashboard/backend/src/workmux.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dev-dashboard/backend/src/workmux.ts b/dev-dashboard/backend/src/workmux.ts index d5a6930444..db2ca1d794 100644 --- a/dev-dashboard/backend/src/workmux.ts +++ b/dev-dashboard/backend/src/workmux.ts @@ -123,6 +123,16 @@ export async function addWorktree( for (const cmd of cmds) { Bun.spawnSync(["tmux", "send-keys", "-t", `${windowTarget}.0`, cmd, "Enter"]); } + // Get the worktree directory from pane 0 + const cwdResult = Bun.spawnSync( + ["tmux", "display-message", "-t", `${windowTarget}.0`, "-p", "#{pane_current_path}"], + { stdout: "pipe" } + ); + const wtDir = new TextDecoder().decode(cwdResult.stdout).trim(); + // Open a shell pane on the right (1/3 width) in the worktree dir + Bun.spawnSync(["tmux", "split-window", "-h", "-t", `${windowTarget}.0`, "-l", "33%", "-c", wtDir]); + // Keep focus on the agent pane (left) + Bun.spawnSync(["tmux", "select-pane", "-t", `${windowTarget}.0`]); } return result;