agentHost: give the injected MCP server names their own module#327571
Open
connor4312 wants to merge 2 commits into
Open
agentHost: give the injected MCP server names their own module#327571connor4312 wants to merge 2 commits into
connor4312 wants to merge 2 commits into
Conversation
- `isHostInjectedMcpServerName` was parked in `claudeSdkOptions.ts`, which never used it, so customization discovery had to reach into the SDK-options module for a bare name check. Moving it to its own leaf module keeps the layering honest and leaves `claudeSdkOptions.ts` untouched by this change. - `waitForAssert` takes an options bag instead of a positional `beforeAttempt`. Slotting a callback in ahead of the numeric parameters meant a future `waitForAssert(assertion, timeoutMs)` would silently be read as a callback; the bag removes that trap and leaves every existing call site as-is. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
connor4312
enabled auto-merge (squash)
July 27, 2026 03:28
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @TylerLeonhardtMatched files:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Refactors agentHost Claude MCP server name handling into a dedicated leaf module and updates a test helper API to use an options bag (avoiding ambiguous positional arguments), with no intended behavior change.
Changes:
- Introduces
claudeMcpServerNames.tsand movesisHostInjectedMcpServerNameinto it. - Updates customization discovery to import
isHostInjectedMcpServerNamefrom the new module. - Refactors
waitForAssertin an integration test to accept an options object (and updates the local call site).
Show a summary per file
| File | Description |
|---|---|
| src/vs/platform/agentHost/test/node/providerIntegration/copilotCustomizations.integrationTest.ts | Refactors waitForAssert to an options-bag API and updates usage. |
| src/vs/platform/agentHost/node/claude/customizations/claudeSessionCustomizationDiscovery.ts | Updates import to the new MCP server names module. |
| src/vs/platform/agentHost/node/claude/claudeSdkOptions.ts | Removes host-injected MCP server name logic from SDK options module. |
| src/vs/platform/agentHost/node/claude/claudeMcpServerNames.ts | Adds new module encapsulating host-injected MCP server name set and predicate. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Low
connor4312
disabled auto-merge
July 27, 2026 03:45
- Moving the injected-name check into its own module dropped the constraint that motivated it. Spell out again that an SDK-reported server under one of these names must never surface as a customization, and why, so the next reader does not relax the check. - `beforeAttempt` accepts a sync callback like `assertion` does, so call sites are not forced to wrap in `async` for no reason. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
digitarald
approved these changes
Jul 27, 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.
Follow-up to #327560, which auto-merged as soon as CI went green — these two review-comment fixes missed the merge.
isHostInjectedMcpServerNamewas parked inclaudeSdkOptions.ts, whichnever used it, so customization discovery had to reach into the SDK-options
module for a bare name check. Moving it to its own leaf module keeps the
layering honest and leaves
claudeSdkOptions.tsuntouched by this change.waitForAsserttakes an options bag instead of a positionalbeforeAttempt. Slotting a callback in ahead of the numeric parametersmeant a future
waitForAssert(assertion, timeoutMs)would silently be readas a callback; the bag removes that trap and leaves every existing call
site as-is.
No behaviour change: pure refactor of code already shipped in #327560.
(Commit message generated by Copilot)