Skip to content

Switch writeFileReplacement to V2 Replacer#16815

Merged
JonasHelming merged 1 commit intomasterfrom
v2replacement-agent-mode
Jan 12, 2026
Merged

Switch writeFileReplacement to V2 Replacer#16815
JonasHelming merged 1 commit intomasterfrom
v2replacement-agent-mode

Conversation

@JonasHelming
Copy link
Copy Markdown
Contributor

What it does

Use the V2 Replacer for "writeFileReplacement" function. The new replacer was already used for the "suggestFileReplacement" for quite a while and works more efficiently.

How to test

Use Theia Coder agent mode and observe the file replacement function calls. They should generally work. It will be hard to identify a difference while testing probably.

Follow-ups

Breaking changes

  • This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the changelog has been updated.

Attribution

Review checklist

Reminder for reviewers

@JonasHelming JonasHelming requested a review from ndoschek January 10, 2026 14:32
@github-project-automation github-project-automation Bot moved this to Waiting on reviewers in PR Backlog Jan 10, 2026
Copy link
Copy Markdown
Member

@ndoschek ndoschek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM 👍
I added a small nit, but I leave it up to you whether you want to address it.

expect(jsonResponse.error).to.equal('Operation cancelled by user');
});

it('WriteFileReplacements should have correct ID', () => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this test does not add much value, since it effectively asserts the same static string constant twice, so I'd prefer removing it.

@github-project-automation github-project-automation Bot moved this from Waiting on reviewers to Needs merge in PR Backlog Jan 12, 2026
@JonasHelming JonasHelming merged commit 196515b into master Jan 12, 2026
10 checks passed
@JonasHelming JonasHelming deleted the v2replacement-agent-mode branch January 12, 2026 11:11
@github-project-automation github-project-automation Bot moved this from Needs merge to Done in PR Backlog Jan 12, 2026
@github-actions github-actions Bot added this to the 1.68.0 milestone Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants