summaryrefslogtreecommitdiff
path: root/packages/cli/src/services/prompt-processors/shellProcessor.ts
diff options
context:
space:
mode:
authorGal Zahavi <[email protected]>2025-08-19 16:03:51 -0700
committerGitHub <[email protected]>2025-08-19 23:03:51 +0000
commitf1575f6d8de2f4efa0805a2d11a4a421a1a8228f (patch)
tree8977235b9a42983de3e76189f25ff055e9d28a83 /packages/cli/src/services/prompt-processors/shellProcessor.ts
parent0cc2a1e7ef904294fff982a4d75bf098b5b262f7 (diff)
feat(core): refactor shell execution to use node-pty (#6491)
Co-authored-by: Jacob Richman <[email protected]>
Diffstat (limited to 'packages/cli/src/services/prompt-processors/shellProcessor.ts')
-rw-r--r--packages/cli/src/services/prompt-processors/shellProcessor.ts13
1 files changed, 3 insertions, 10 deletions
diff --git a/packages/cli/src/services/prompt-processors/shellProcessor.ts b/packages/cli/src/services/prompt-processors/shellProcessor.ts
index 7acf2415..5242fa7a 100644
--- a/packages/cli/src/services/prompt-processors/shellProcessor.ts
+++ b/packages/cli/src/services/prompt-processors/shellProcessor.ts
@@ -137,11 +137,12 @@ export class ShellProcessor implements IPromptProcessor {
// Execute the resolved command (which already has ESCAPED input).
if (injection.resolvedCommand) {
- const { result } = ShellExecutionService.execute(
+ const { result } = await ShellExecutionService.execute(
injection.resolvedCommand,
config.getTargetDir(),
() => {},
new AbortController().signal,
+ config.getShouldUseNodePtyShell(),
);
const executionResult = await result;
@@ -154,15 +155,7 @@ export class ShellProcessor implements IPromptProcessor {
}
// Append the output, making stderr explicit for the model.
- if (executionResult.stdout) {
- processedPrompt += executionResult.stdout;
- }
- if (executionResult.stderr) {
- if (executionResult.stdout) {
- processedPrompt += '\n';
- }
- processedPrompt += `--- STDERR ---\n${executionResult.stderr}`;
- }
+ processedPrompt += executionResult.output;
// Append a status message if the command did not succeed.
if (executionResult.aborted) {