From 69252f6177009e5c066d2b30f86b9d209acbb36a Mon Sep 17 00:00:00 2001 From: beyondkmp Date: Thu, 28 Aug 2025 09:24:15 +0800 Subject: [PATCH] fix(CodeToolsService): open new terminal tab for command execution (#9610) Updated the terminal command execution logic to open a new tab in the Terminal application for running commands. This change enhances user experience by keeping the original tab available while executing commands in a separate tab. --- src/main/services/CodeToolsService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/services/CodeToolsService.ts b/src/main/services/CodeToolsService.ts index 28f1068b8f..6cc8a41b05 100644 --- a/src/main/services/CodeToolsService.ts +++ b/src/main/services/CodeToolsService.ts @@ -337,8 +337,9 @@ class CodeToolsService { terminalArgs = [ '-e', `tell application "Terminal" + set newTab to do script "cd '${directory.replace(/'/g, "\\'")}' && clear" activate - do script "cd '${directory.replace(/'/g, "\\'")}' && clear && ${command.replace(/"/g, '\\"')}" + do script "${command.replace(/"/g, '\\"')}" in newTab end tell` ] break