Skip to content

Commit 9b8f8c2

Browse files
authored
Merge pull request microsoft#258992 from microsoft/tyriar/258989
Avoid ctrl+c when no shell integration is active
2 parents 0b25736 + ed73092 commit 9b8f8c2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,11 @@ export class NoneExecuteStrategy implements ITerminalExecuteStrategy {
5656
}));
5757

5858
// Execute the command
59+
// IMPORTANT: This uses `sendText` not `runCommand` since when no shell integration
60+
// is used as sending ctrl+c before a shell is initialized (eg. PSReadLine) can result
61+
// in failure (https://github.com/microsoft/vscode/issues/258989)
5962
this._log(`Executing command line \`${commandLine}\``);
60-
this._instance.runCommand(commandLine, true);
63+
this._instance.sendText(commandLine, true);
6164

6265
// Assume the command is done when it's idle
6366
this._log('Waiting for idle');

0 commit comments

Comments
 (0)