Skip to content

fix: remove duplicate UNIFIED_WORKSPACE_PICKER_SETTING import (build fix for vscode-engineering#3803) #334685

Description

@vs-code-engineering

Build failure

Every Compile task on main fails with tsgo TS2300 duplicate-identifier errors, cascading to all downstream Test/Publish/Verify jobs across the Linux, macOS, Windows and Quality stages:

src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.ts(33,10): error TS2300: Duplicate identifier 'UNIFIED_WORKSPACE_PICKER_SETTING'.
src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.ts(65,10): error TS2300: Duplicate identifier 'UNIFIED_WORKSPACE_PICKER_SETTING'.
src/vs/sessions/contrib/providers/copilotChatSessions/test/browser/copilotChatSessionsProvider.test.ts(47,10): error TS2300: Duplicate identifier 'UNIFIED_WORKSPACE_PICKER_SETTING'.
src/vs/sessions/contrib/providers/copilotChatSessions/test/browser/copilotChatSessionsProvider.test.ts(64,10): error TS2300: Duplicate identifier 'UNIFIED_WORKSPACE_PICKER_SETTING'.
Error: tsgo exited with code 1

Root cause

copilotChatSessionsProvider.ts and its test each imported UNIFIED_WORKSPACE_PICKER_SETTING from ../../../chat/common/constants.js twice — once mid-import-block and once appended at the end of the import list. TypeScript rejects a symbol imported twice into the same module scope (TS2300), so compilation aborts before any task can run.

How the fix works

Removes the redundant second import { UNIFIED_WORKSPACE_PICKER_SETTING } line in each of the two files, keeping a single import. The symbol is still available at all its use sites, so behavior is unchanged and typechecking passes.

Rollback evaluation

Recommendation: Do not roll back. Culprit: commit 291338d45a319004f26078f6b505745d62202f62 / PR #334674. A one-line duplicate-import deletion in each file lands faster and more safely than reverting a large model-picker PR touching many files. Owners to consult: @lramos15

Validation

Verified by source inspection that only one import of the symbol remains in each file (grep count = 1). Full tsgo/compile validation could not be run in this environment; the change is a mechanical duplicate-import removal that directly resolves the TS2300 errors.

Risk

Minimal — removes redundant imports only; no logic, telemetry, or runtime behavior changes.

Recommended reviewer

Recommended owner: @lramos15

Fixes microsoft/vscode-engineering#3803

Generated by build-fix · opus48 · 85 AIC · ⌖ 12.5 AIC · ⊞ 11.7K ·


Note

This was originally intended as a pull request, but PR creation failed. The changes have been pushed to the branch fix/dup-unified-workspace-picker-import-7d2b761921876ea3.

Original error: ERR_API: [2026-09-05T02:47:54.697Z] create pull request in microsoft/vscode failed (attempt 1)

Original error: Validation Failed: {"resource":"PullRequest","code":"custom","field":"fork_collab","message":"fork_collab Fork collab can't be granted by someone without permission"} - https://docs.github.com/rest/pulls/pulls#create-a-pull-request
Retryable: false
Suggestion: This error cannot be resolved by retrying. Please check the error details and fix the underlying issue.

To create the pull request manually:

gh pr create --title "fix: remove duplicate UNIFIED_WORKSPACE_PICKER_SETTING import (build fix for vscode-engineering#3803)" --base main --head vscodebot-pr:fix/dup-unified-workspace-picker-import-7d2b761921876ea3 --repo microsoft/vscode
Show patch preview (41 of 41 lines)
From 592c09c9e6422204978dbb2ca18b847a5daeaf8f Mon Sep 17 00:00:00 2001
X-GH-AW-Base-Commit: b67c3e103824033965ac749549ca9ea77b05ce9b
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Sat, 5 Sep 2026 02:41:11 +0000
Subject: [PATCH] fix: remove duplicate UNIFIED_WORKSPACE_PICKER_SETTING import
 (build fix for vscode-engineering#3803)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
 .../copilotChatSessions/browser/copilotChatSessionsProvider.ts   | 1 -
 .../test/browser/copilotChatSessionsProvider.test.ts             | 1 -
 2 files changed, 2 deletions(-)

diff --git a/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.ts b/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.ts
index 7df325ffb61..970f07531ae 100644
--- a/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.ts
+++ b/src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.ts
@@ -62,7 +62,6 @@ import { isCloudSandboxEnabled } from '../../../../../platform/agentHost/common/
 import { getWorkbenchContribution } from '../../../../../workbench/common/contributions.js';
 import { CloudSandboxAgentHostContribution, type ICloudSandboxProvisionedSession } from '../../remoteAgentHost/browser/cloudSandboxAgentHostContribution.js';
 import { IPathService } from '../../../../../workbench/services/path/common/pathService.js';
-import { UNIFIED_WORKSPACE_PICKER_SETTING } from '../../../chat/common/constants.js';
 
 /** Copilot Cloud session type - cloud-hosted agent. */
 export const CopilotCloudSessionType: ISessionType = {
diff --git a/src/vs/sessions/contrib/providers/copilotChatSessions/test/browser/copilotChatSessionsProvider.test.ts b/src/vs/sessions/contrib/providers/copilotChatSessions/test/browser/copilotChatSessionsProvider.test.ts
index 8d9e14578b2..2dbe7091b1d 100644
--- a/src/vs/sessions/contrib/providers
... (truncated)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions