Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/frontend/workspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,13 @@ function _wsPaneForCwd(cwd) {
return hit;
}

// Click a running-agent row: jump to its Workspace pane if one exists here,
// otherwise open the session in a new pane (best-effort) or just show Workspace.
// Click a running-agent row: jump to its Workspace pane if one is open here,
// otherwise open a plain terminal in the project folder. The agent is ALREADY
// running, so we must NOT prefill a resume command — that would spawn a second
// instance. (sessionId/kind are accepted for signature stability but unused.)
function jumpToRunningAgent(cwd, sessionId, kind) {
var hit = _wsPaneForCwd(cwd);
if (hit) { jumpToWorkspacePane(hit.tab.id, hit.pane.id); return; }
if (sessionId && typeof openSessionInWorkspace === 'function') {
openSessionInWorkspace(sessionId); return;
}
if (cwd && typeof openInWorkspace === 'function') {
openInWorkspace({ name: _wsProjectBasename(cwd), cwd: cwd });
}
Expand All @@ -210,7 +209,7 @@ function _wsRenderRunningTree() {
if (!el) return;
var groups = _wsRunningByProject();
var sig = groups.map(function (g) {
return g.name + ':' + g.items.map(function (a) {
return g.cwd + ':' + g.items.map(function (a) {
return (a.sessionId || a.pid) + '=' + a.kind + '/' + a.status;
}).join(',');
}).join('|');
Expand Down
Loading