Fix Mangler TS compilation errors in ClaudeAgent and XaaAuthProvider - #328117
Open
Casey Flynn (caseyflynn-google) wants to merge 1 commit into
Open
Fix Mangler TS compilation errors in ClaudeAgent and XaaAuthProvider#328117Casey Flynn (caseyflynn-google) wants to merge 1 commit into
Casey Flynn (caseyflynn-google) wants to merge 1 commit into
Conversation
Copilot started reviewing on behalf of
Casey Flynn (caseyflynn-google)
July 29, 2026 22:04
View session
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Anthony Kim (@anthonykim1)Matched files:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Unblocks minified Remote Extension Host builds by addressing TypeScript mangler and esbuild optimizer failures.
Changes:
- Preserves dynamically imported class names during mangling.
- Works around mixin and private-field mangling conflicts.
- Escapes non-ASCII terminal prompt characters.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
runInTerminalConfirmationTool.ts |
Excludes a dynamically referenced class from export mangling. |
outputMonitor.ts |
Replaces raw Unicode chevrons with escapes. |
terminalInstance.test.ts |
Adjusts private service access for mangled compilation. |
extHostXaaAuthProvider.ts |
Prevents mixin member mangling collisions. |
mockAgent.ts |
Preserves the dynamically imported mock agent name. |
claudeAgent.test.ts |
Adjusts private session access for mangled compilation. |
Comments suppressed due to low confidence (1)
src/vs/workbench/contrib/terminal/test/browser/terminalInstance.test.ts:303
- This duplicates the untyped private-service access above and is also flagged by
local/code-no-any-casts. Use the same typedunknownassertion withIKeybindingServiceso changes tosoftDispatchremain type-checked.
const keybindingService = (instance as any)['_keybindingService'];
| const { ctx, canUseTool, sessionUri } = await materialize(); | ||
|
|
||
| const session = ctx.agent['_sessions'].get(AgentSession.id(sessionUri))?.defaultChat; | ||
| const session = (ctx.agent as any)['_sessions'].get(AgentSession.id(sessionUri))?.defaultChat; |
| test('custom key event handler should handle commands in DEFAULT_COMMANDS_TO_SKIP_SHELL in VS Code and not xterm when sendKeybindingsToShell is disabled', async () => { | ||
| const instance = await createTerminalInstance(); | ||
| const keybindingService = instance['_keybindingService']; | ||
| const keybindingService = (instance as any)['_keybindingService']; |
Casey Flynn (caseyflynn-google)
force-pushed
the
fix/mangler-breakages
branch
2 times, most recently
from
July 29, 2026 22:15
47d1810 to
d121387
Compare
Casey Flynn (caseyflynn-google)
marked this pull request as draft
July 29, 2026 22:44
Casey Flynn (caseyflynn-google)
force-pushed
the
fix/mangler-breakages
branch
from
July 30, 2026 18:06
d121387 to
45b64f9
Compare
Casey Flynn (caseyflynn-google)
marked this pull request as ready for review
July 30, 2026 18:07
Author
|
@microsoft-github-policy-service agree company="Google" |
Bryan Chen (bryanchen-d)
approved these changes
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #328113
This PR unblocks the
vscode-reh-web-*-minbuild targets, which are currently crashing inmainduring both the AST Mangler phase and the tail-end esbuild optimizer check.Fixes:
_sessions,_keybindingService, etc.) interminalInstance.test.ts,voiceSessionController.test.ts, andcodexPrewarmEviction.test.ts.claudeAgent.test.tsto correctly utilize the publicgetSessionForTesting(sessionUri)helper method./** @skipMangle */toConfirmTerminalCommandToolandScriptedMockAgentbecause they are imported via dynamic string paths, escaping the Mangler's internal export-compression dictionary.XaaAuthenticationProviderto public. The AST mangler physically cannot calculate inheritance limits on dynamic anonymous Mixins, causing its properties to falsely collide with mangled parent variables during compilation.updateCheckedandgetTooltipinsessionChangesEditor.tstoprotectedto properly constrain the AST inheritance mangler and bypass collision errors.[›❯▸▶]to their standard Unicode escape-sequences[\u203A\u276F\u25B8\u25B6]inoutputMonitor.ts. Did the same for unescaped Em-Dashes (—) and Ellipses (…) rendering as\u2014and\u2026inchatGoalSummaryService.ts. Unescaped non-ASCII characters inside strings and RegEx blocks violently crash the minifier.NewChatVoiceTargetServiceinvoiceBridge.test.ts.