-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Add build/serve MCP tools #31667
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
base: main
Are you sure you want to change the base?
Add build/serve MCP tools #31667
Conversation
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.
Thanks for putting this together @amishne! Hopefully my comments should be internally consistent, but there might be a few which you addressed in later commits.
I know I left a lot of feedback, feel free to ack and ignore any comments you don't agree with or would rather follow up on separately from this PR. We definitely don't need to expand the scope any more than it already is.
I think probably my most important concern is just about whether we can reduce the dependency on specific log output and hopefully make this a little more durable to internal changes there.
| timeout: z | ||
| .number() | ||
| .optional() | ||
| .default(30000) |
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.
Question: @clydin, I'm curious to know what you think a good timeout would be here. I wonder if 30s might be too short such that some larger projects will hit this 100% of the time and the AI might not know to configure it.
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.
Waiting for feedback from @clydin but changing to 3 minutes for now.
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.
We can leave it at 3 minutes for now and adjust as we perform more testing on various size projects.
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.
Don't forget to squash or switch to fixup! commits before merging, so "Address review comments" doesn't end up in our permanent history (it's fine for a PR, just don't want it being merged to main).
| if (configuration.args) { | ||
| args.push(configuration.args); | ||
| } | ||
| args.push(`-c ${input.configuration ?? DEFAULT_CONFIGURATION}`); |
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.
Bug: I think we want -c and input.configuration to be two different arguments?
args.push('-c', input.configuration ?? DEFAULT_CONFIGURATION);| stderr = e.stderr; | ||
| } else if (e instanceof Error) { | ||
| stderr = e.message; | ||
| } |
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.
I think this might have gotten dropped?
| timeout: z | ||
| .number() | ||
| .default(30000) | ||
| .default(180000) |
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.
Suggestion: Use an underscore separator to make the zeroes a little easier to read. I also suggest including units somewhere like:
z.default(180_000 /* ms */)| return p === join(projectDir, 'angular.json'); | ||
| }), | ||
| } as Partial<Host> as Host; | ||
| } as Partial<MockHost> as MockHost; |
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.
Consider: Is it worth using MockHost here?
New MCP experimental tools:
ng build.Notes: