Changesets · Branches · Tags · Compare
| Changeset | 4f736e53a39ab288c167d1812e42ba3201a38a8632d2f3fa3f39ccdb52130793 |
|---|---|
| Author | chezsmithy <chezsmithy@me.com> · 2025-08-08 00:07 -07:00 |
| Committer | chezsmithy <chezsmithy@me.com> · 2025-08-08 00:07 -07:00 |
| Parents | 75e49a3d2f15 |
1 file changed
modified core/tools/implementations/runTerminalCommand.ts +15 −24
| @@ -96,36 +96,27 @@ | ||
| 96 | 96 | return new Promise((resolve, reject) => { |
| 97 | 97 | let terminalOutput = ""; |
| 98 | 98 | |
| 99 | - if (!waitForCompletion) { | |
| 100 | - const status = "Command is running in the background..."; | |
| 101 | - if (extras.onPartialOutput) { | |
| 102 | - extras.onPartialOutput({ | |
| 103 | - toolCallId, | |
| 104 | - contextItems: [ | |
| 105 | - { | |
| 106 | - name: "Terminal", | |
| 107 | - description: "Terminal command output", | |
| 108 | - content: "", | |
| 109 | - status: status, | |
| 110 | - }, | |
| 111 | - ], | |
| 112 | - }); | |
| 113 | - } | |
| 114 | - } | |
| 115 | - | |
| 116 | - // Use spawn with color environment | |
| 117 | - const { shell, args } = getShellCommand(command); | |
| 118 | - const childProc = childProcess.spawn(shell, args, { | |
| 119 | - cwd, | |
| 120 | - env: getColorEnv(), // Add enhanced environment for colors | |
| 99 | + if (!waitForCompletion) { | |
| 100 | + const status = "Command is running in the background..."; | |
| 101 | + if (extras.onPartialOutput) { | |
| 102 | + extras.onPartialOutput({ | |
| 103 | + toolCallId, | |
| 104 | + contextItems: [ | |
| 105 | + { | |
| 106 | + name: "Terminal", | |
| 107 | + description: "Terminal command output", | |
| 108 | + content: "", | |
| 109 | + status: status, | |
| 110 | + }, | |
| 111 | + ], | |
| 121 | 112 | }); |
| 122 | 113 | } |
| 123 | 114 | } |
| 124 | 115 | |
| 125 | 116 | // Use spawn with color environment |
| 126 | - const childProc = childProcess.spawn(command, { | |
| 117 | + const { shell, args } = getShellCommand(command); | |
| 118 | + const childProc = childProcess.spawn(shell, args, { | |
| 127 | 119 | cwd, |
| 128 | - shell: true, | |
| 129 | 120 | env: getColorEnv(), // Add enhanced environment for colors |
| 130 | 121 | }); |
| 131 | 122 |