feat: add mcpapps experiment flag and helper#10265
Open
joehan wants to merge 2 commits intomcp-sse-supportfrom
Open
feat: add mcpapps experiment flag and helper#10265joehan wants to merge 2 commits intomcp-sse-supportfrom
joehan wants to merge 2 commits intomcp-sse-supportfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces the applyAppMeta utility function to conditionally add MCP App metadata to CallToolResult objects, controlled by a new mcpapps experiment flag. The review feedback highlights a potential bug where existing metadata could be overwritten, suggests grouping the new experiment with related features for better maintainability, and identifies violations of the repository's style guide regarding the use of as any in unit tests.
70135dd to
c2a9818
Compare
### Description - Adds mcpapps experiment flag to src/experiments.ts. - Adds applyAppMeta helper function to src/mcp/util.ts to conditionally add UI metadata. - Adds unit tests for applyAppMeta in src/mcp/util.spec.ts. ### Scenarios Tested - Unit tests passed. - Build succeeds.
### Description - Fixes applyAppMeta to preserve existing metadata. - Moves mcpapps flag to be grouped with other MCP experiments. - Removes as any in util.spec.ts by importing CallToolResult. ### Scenarios Tested - Build succeeds. - Lint passes for modified files (ignoring pre-existing warnings). - Unit tests for applyAppMeta pass.
c2a9818 to
6c30145
Compare
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.
Adds
mcpappsexperiment flag and applyAppMeta helper function, which will be used later to omit the_meta.ui.reourceUrifield when the experiment is disabled.