Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions test/smoke/extensions/vscode-smoketest-ext-host/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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');
Expand All @@ -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');
Expand Down
Loading