Skip to content

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

Draft
VS Code PR Bot (vscodebot-pr) wants to merge 1 commit into
microsoft:mainfrom
vscodebot-pr:fix/dup-unified-workspace-picker-import-aw-33939488838
Draft

fix: remove duplicate UNIFIED_WORKSPACE_PICKER_SETTING import (build fix for vscode-engineering#3803)#334686
VS Code PR Bot (vscodebot-pr) wants to merge 1 commit into
microsoft:mainfrom
vscodebot-pr:fix/dup-unified-workspace-picker-import-aw-33939488838

Conversation

@vscodebot-pr

Copy link
Copy Markdown
Contributor

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 ·

…fix for vscode-engineering#3803)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The mechanical removals resolve the reported build errors while preserving all symbol usages.

Pull request overview

Removes duplicate imports that caused TS2300 compilation failures without changing runtime behavior.

Changes:

  • Retains one valid UNIFIED_WORKSPACE_PICKER_SETTING import in each affected file.
  • Removes the redundant duplicate imports.
File summaries
File Description
copilotChatSessionsProvider.ts Removes duplicate production import.
copilotChatSessionsProvider.test.ts Removes duplicate test import.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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

Labels

vscode-build VS Code build process issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants