Skip to content

Commit ea368db

Browse files
committed
Don't attempt to cancel command when basic SI is used
Because of the complications that arise when ^C is sent to the shell, this change disables that functionality when basic SI is used. That means that the command will probably fail if the user types into the terminal, but that's an edge case vs almost everything failing without this change Fixes microsoft#258294
1 parent 6a5e8b9 commit ea368db

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,12 @@ export class BasicExecuteStrategy implements ITerminalExecuteStrategy {
9191
}));
9292

9393
// Execute the command
94+
// IMPORTANT: This uses `sendText` not `runCommand` since when basic shell integration
95+
// is used as it's more common to not recognize the prompt input which would result in
96+
// ^C being sent and also to return the exit code of 130 when from the shell when that
97+
// occurs.
9498
this._log(`Executing command line \`${commandLine}\``);
95-
this._instance.runCommand(commandLine, true);
99+
this._instance.sendText(commandLine, true);
96100

97101
// Wait for the next end execution event - note that this may not correspond to the actual
98102
// execution requested

0 commit comments

Comments
 (0)