From 54b695e02e47a37ded9ca68a32bb0d00d4560030 Mon Sep 17 00:00:00 2001 From: Anthony Kim <62267334+anthonykim1@users.noreply.github.com> Date: Wed, 1 Apr 2026 10:49:44 -0700 Subject: [PATCH] Add windowsUseConptyDll setting to runInTerminal tests (#307185) --- .../singlefolder-tests/chat.runInTerminal.test.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/chat.runInTerminal.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/chat.runInTerminal.test.ts index 59ad596516a..abc3cd4f3d3 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/chat.runInTerminal.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/chat.runInTerminal.test.ts @@ -28,6 +28,7 @@ function extractTextContent(result: vscode.LanguageModelToolResult): string { let disposables: vscode.Disposable[] = []; let originalShellIntegrationEnabled: boolean | undefined; + let windowsUseConptyDll: boolean | undefined; setup(async () => { disposables = []; @@ -38,6 +39,11 @@ function extractTextContent(result: vscode.LanguageModelToolResult): string { originalShellIntegrationEnabled = terminalConfig.get('shellIntegration.enabled'); await terminalConfig.update('shellIntegration.enabled', true, vscode.ConfigurationTarget.Global); + if (isWindows) { + windowsUseConptyDll = terminalConfig.get('windowsUseConptyDll'); + await terminalConfig.update('windowsUseConptyDll', true, vscode.ConfigurationTarget.Global); + } + // Register a dummy default model required for participant requests disposables.push(vscode.lm.registerLanguageModelChatProvider('copilot', { async provideLanguageModelChatInformation(_options, _token) { @@ -80,9 +86,13 @@ function extractTextContent(result: vscode.LanguageModelToolResult): string { await chatToolsConfig.update('autoApprove', undefined, vscode.ConfigurationTarget.Global); await vscode.commands.executeCommand('setContext', 'vscode.chat.tools.global.autoApprove.testMode', undefined); - // Restore shell integration setting + // Restore terminal settings const terminalConfig = vscode.workspace.getConfiguration('terminal.integrated'); await terminalConfig.update('shellIntegration.enabled', originalShellIntegrationEnabled, vscode.ConfigurationTarget.Global); + + if (isWindows) { + await terminalConfig.update('windowsUseConptyDll', windowsUseConptyDll, vscode.ConfigurationTarget.Global); + } }); /**