-
Notifications
You must be signed in to change notification settings - Fork 48.8k
[mcp] Make tool more reliable and fix integration issues with babel #33074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -356,7 +356,7 @@ Server Components - Shift data-heavy logic to the server whenever possible. Brea | |||
|
|||
server.tool( | |||
'review-react-runtime', | |||
'Review the runtime of the code and get performance data to evaluate the proposed solution, the react code that is passed into this tool MUST contain an App component.', | |||
'Review the runtime of the code and get performance data to evaluate the proposed solution, the react code that is passed into this tool MUST contain an App functional component without arrow function. And DO NOT export anything', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add something like "run this tool every time you propose a performance related change to verify if your suggestion actually improves performance"
@@ -48,10 +45,10 @@ export async function measurePerformance(code: any) { | |||
* @param {Object} opts - Transformation options | |||
* @returns {Promise<string>} - The transpiled code | |||
*/ | |||
async function transformAsync(ast: babel.types.Node) { | |||
async function transformAsync(ast: babel.types.Node, options: any) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can fix the any
here by just removing this function and parseAsync
. You can inline it directly into measurePerformance
so everything is typed correctly.
…acebook#33074) ## Summary Fix babel presets, and add a bit more context to the tool so that it is more reliable ## How did you test this change? Manually tested the mcp integrated with claude desktop DiffTrain build for [d8074cb](facebook@d8074cb)
Summary
Fix babel presets, and add a bit more context to the tool so that it is more reliable
How did you test this change?
Manually tested the mcp integrated with claude desktop