Skip to content

Commit 54b695e

Browse files
authored
Add windowsUseConptyDll setting to runInTerminal tests (#307185)
1 parent ffa6b68 commit 54b695e

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

extensions/vscode-api-tests/src/singlefolder-tests/chat.runInTerminal.test.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ function extractTextContent(result: vscode.LanguageModelToolResult): string {
2828

2929
let disposables: vscode.Disposable[] = [];
3030
let originalShellIntegrationEnabled: boolean | undefined;
31+
let windowsUseConptyDll: boolean | undefined;
3132

3233
setup(async () => {
3334
disposables = [];
@@ -38,6 +39,11 @@ function extractTextContent(result: vscode.LanguageModelToolResult): string {
3839
originalShellIntegrationEnabled = terminalConfig.get<boolean>('shellIntegration.enabled');
3940
await terminalConfig.update('shellIntegration.enabled', true, vscode.ConfigurationTarget.Global);
4041

42+
if (isWindows) {
43+
windowsUseConptyDll = terminalConfig.get<boolean>('windowsUseConptyDll');
44+
await terminalConfig.update('windowsUseConptyDll', true, vscode.ConfigurationTarget.Global);
45+
}
46+
4147
// Register a dummy default model required for participant requests
4248
disposables.push(vscode.lm.registerLanguageModelChatProvider('copilot', {
4349
async provideLanguageModelChatInformation(_options, _token) {
@@ -80,9 +86,13 @@ function extractTextContent(result: vscode.LanguageModelToolResult): string {
8086
await chatToolsConfig.update('autoApprove', undefined, vscode.ConfigurationTarget.Global);
8187
await vscode.commands.executeCommand('setContext', 'vscode.chat.tools.global.autoApprove.testMode', undefined);
8288

83-
// Restore shell integration setting
89+
// Restore terminal settings
8490
const terminalConfig = vscode.workspace.getConfiguration('terminal.integrated');
8591
await terminalConfig.update('shellIntegration.enabled', originalShellIntegrationEnabled, vscode.ConfigurationTarget.Global);
92+
93+
if (isWindows) {
94+
await terminalConfig.update('windowsUseConptyDll', windowsUseConptyDll, vscode.ConfigurationTarget.Global);
95+
}
8696
});
8797

8898
/**

0 commit comments

Comments
 (0)