From 86b2fae4e2ccc253b30893192092b8c55c62860e Mon Sep 17 00:00:00 2001 From: "vs-code-engineering[bot]" Date: Mon, 8 Jun 2026 09:47:36 +0000 Subject: [PATCH] [cherry-pick] Revert "smoke: wait for copilot-chat extension before writing its settings" --- .../vscode-smoketest-ext-host/extension.js | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/test/smoke/extensions/vscode-smoketest-ext-host/extension.js b/test/smoke/extensions/vscode-smoketest-ext-host/extension.js index 4509c795ed219a..fa0a5837867ee2 100644 --- a/test/smoke/extensions/vscode-smoketest-ext-host/extension.js +++ b/test/smoke/extensions/vscode-smoketest-ext-host/extension.js @@ -29,28 +29,6 @@ async function waitForCommand(command, timeoutMs) { throw new Error(`Timed out waiting for command '${command}'`); } -/** - * Wait for an extension to be installed and activated so its contributed - * configuration keys are registered and its commands are available. - * @param {string} extensionId - * @param {number} timeoutMs - */ -async function waitForExtension(extensionId, timeoutMs) { - const started = Date.now(); - while (Date.now() - started < timeoutMs) { - const ext = vscode.extensions.getExtension(extensionId); - if (ext) { - if (!ext.isActive) { - await ext.activate(); - } - return ext; - } - await new Promise(resolve => setTimeout(resolve, 250)); - } - - throw new Error(`Timed out waiting for extension '${extensionId}'`); -} - /** * @param {vscode.ExtensionContext} context */ @@ -116,9 +94,6 @@ function activate(context) { context.subscriptions.push( vscode.commands.registerCommand('smoketest.openCopilotCliChat', async () => { const command = 'workbench.action.chat.openNewSessionEditor.copilotcli'; - // Wait for copilot-chat extension to be installed & activated so its - // contributed configuration keys are registered before we write them. - await waitForExtension('GitHub.copilot-chat', 60_000); await vscode.workspace.getConfiguration('chat').update('disableAIFeatures', false, vscode.ConfigurationTarget.Global); await vscode.workspace.getConfiguration('github.copilot.chat').update('backgroundAgent.enabled', true, vscode.ConfigurationTarget.Global); await vscode.commands.executeCommand('github.copilot.debug.extensionState'); @@ -131,9 +106,6 @@ function activate(context) { context.subscriptions.push( vscode.commands.registerCommand('smoketest.openClaudeChat', async () => { const command = 'workbench.action.chat.openNewSessionEditor.claude-code'; - // Wait for copilot-chat extension to be installed & activated so its - // contributed configuration keys are registered before we write them. - await waitForExtension('GitHub.copilot-chat', 60_000); await vscode.workspace.getConfiguration('chat').update('disableAIFeatures', false, vscode.ConfigurationTarget.Global); await vscode.workspace.getConfiguration('github.copilot.chat').update('claudeAgent.enabled', true, vscode.ConfigurationTarget.Global); await vscode.commands.executeCommand('github.copilot.debug.extensionState');