Add support for change sets via tool functions #14715
Open
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.
fixed #14678
What it does
Introduce a set of tool functions, which allow agents to create file based change sets. Change sets collect changes, an agent wants to conduct, the user can review them and then decide to apply them.
ChangeSets are managed in a service that supports generic operations to apply the changes. This allows to implement various strategies, e.g. replace content or to work with diffs. To support a new strategy, you need to:
The current PR contains a simple strategy to replace files completely.
The PR introduces also a new agent 'coder' that uses the new tool functions.
The PR renames the workspace functions and template to 'workspace-'
How to test
Ask something like this in the chat:
@Coder I want to add a property "autostart" to the mcp server preferences (packages/ai-mcp/src/browser/mcp-preferences.ts).
Then ask to apply the changes.
Follow-ups
Breaking changes
Attribution
Review checklist
Reminder for reviewers