From cb9dfaec05f17c2c9080f36a0435e9969e3330c9 Mon Sep 17 00:00:00 2001 From: Valerii Kovalskii Date: Mon, 20 Jul 2026 20:48:03 +0300 Subject: [PATCH] feat(cards): launch a session in the native terminal from its card MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Session cards had only the in-app "Open here" (▶) action. Added a terminal-icon button that launches in the OS terminal (iTerm2/Terminal.app/ … via /api/launch, reusing resumeLastProjectSession): - CLI agents (claude/codex/qwen/opencode/kiro/kilo/gemini/pi): resume in the native terminal - Cursor: "Open in Cursor" (per the Cursor convention — never Focus Terminal) - Copilot Chat: hidden (VS Code-only, no terminal to resume into) The ▶ in-app button stays; its title now says "in-app terminal" to distinguish the two. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/frontend/app.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/frontend/app.js b/src/frontend/app.js index eec57c8..fbaeb04 100644 --- a/src/frontend/app.js +++ b/src/frontend/app.js @@ -1441,10 +1441,20 @@ function renderCard(s, idx) { html += '' + tagHtml; html += ''; html += ''; - // Open the session's project folder in the in-app terminal with the agent's - // resume command prefilled (awaiting Enter). + // Two launch actions for a session with a known project folder: + // • native terminal (iTerm2/Terminal.app/…) via /api/launch — a terminal + // icon; resumes CLI agents, "open in Cursor" for Cursor, hidden for the + // VS Code-only Copilot Chat (no terminal to resume into). + // • in-app Workspace terminal (▶) with the resume command prefilled. if (s.git_root || s.project) { - html += ''; + var _projPath = s.git_root || s.project; + var _termIcon = ''; + if (s.tool === 'cursor') { + html += ''; + } else if (s.tool !== 'copilot-chat') { + html += ''; + } + html += ''; } if (s.has_detail) { var btnTitle = sessionTitles[s.id] ? 'Regenerate AI title' : 'Generate AI title';