mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-02 02:09:03 +08:00
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.
This commit is contained in:
parent
7407bb335d
commit
69252f6177
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user