Skip to content

Conversation

@samhvw8
Copy link
Contributor

@samhvw8 samhvw8 commented May 8, 2025

Related GitHub Issue

This pr will fix this issues https://discord.com/channels/1332146336664915968/1367897808249819157

Closes: #2362

Description

Convert to xml tag for all params and support multiple write file

Test Procedure

Type of Change

  • 🐛 Bug Fix: Non-breaking change that fixes an issue.
  • New Feature: Non-breaking change that adds functionality.
  • 💥 Breaking Change: Fix or feature that would cause existing functionality to not work as expected.
  • ♻️ Refactor: Code change that neither fixes a bug nor adds a feature.
  • 💅 Style: Changes that do not affect the meaning of the code (white-space, formatting, etc.).
  • 📚 Documentation: Updates to documentation files.
  • ⚙️ Build/CI: Changes to the build process or CI configuration.
  • 🧹 Chore: Other changes that don't modify src or test files.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Code Quality:
    • My code adheres to the project's style guidelines.
    • There are no new linting errors or warnings (npm run lint).
    • All debug code (e.g., console.log) has been removed.
  • Testing:
    • New and/or updated tests have been added to cover my changes.
    • All tests pass locally (npm test).
    • The application builds successfully with my changes.
  • Branch Hygiene: My branch is up-to-date (rebased) with the main branch.
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Changeset: A changeset has been created using npm run changeset if this PR includes user-facing changes or dependency updates.
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

Documentation Updates

Additional Notes


Important

Enhance apply_diff with XML support for multi-file/multi-diff operations and introduce batch UI for improved user interaction.

  • Behavior:
    • apply_diff function now supports XML for multi-file/multi-diff operations in multiApplyDiffTool.ts.
    • Batch UI for multi-file operations added in BatchDiffApproval.tsx.
    • Legacy applyDiffTool renamed to applyDiffToolLegacy.
  • Experiments:
    • New experiment MULTI_FILE_APPLY_DIFF added to experiments.ts and related files.
    • Dynamic strategy selection based on experiment state in Task.ts and generateSystemPrompt.ts.
  • Tests:
    • Added tests for new multi-file diff functionality in applyDiffTool.experiment.spec.ts and Task.test.ts.
  • UI:
    • Added batch diff approval UI component in BatchDiffApproval.tsx.
    • Updated i18n files for new batch operation messages.
  • Misc:
    • Minor refactoring and renaming for clarity and consistency.

This description was created by Ellipsis for b7e3202. You can customize this summary. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented May 8, 2025

⚠️ No Changeset found

Latest commit: 669ba24

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. bug Something isn't working enhancement New feature or request labels May 8, 2025
@samhvw8 samhvw8 changed the title feat: enhance multi-search-replace feat: enhance multi-search-replace for apply_diff May 8, 2025
@samhvw8 samhvw8 force-pushed the feat/xml-apply-diff branch from 9b489b7 to 9daa8c9 Compare May 8, 2025 17:46
@samhvw8
Copy link
Contributor Author

samhvw8 commented May 8, 2025

example of test

roo_task_may-9-2025_12-45-30-am.md

@samhvw8 samhvw8 force-pushed the feat/xml-apply-diff branch 2 times, most recently from ba38031 to c764126 Compare May 8, 2025 18:13
@KJ7LNW
Copy link
Contributor

KJ7LNW commented May 8, 2025

Neat! Can writes be confirmed individually?

@samhvw8
Copy link
Contributor Author

samhvw8 commented May 8, 2025

Neat! Can writes be confirmed individually?

Yes, it confirm in each file ( i group diff into each file )

@KJ7LNW
Copy link
Contributor

KJ7LNW commented May 10, 2025

This 3342 PR is going to conflict heavily with #3055

any ideas on how to prevent that?

@samhvw8
Copy link
Contributor Author

samhvw8 commented May 11, 2025

This 3342 PR is going to conflict heavily with #3055

any ideas on how to prevent that?

i will try make a branch merge conflict for you

@samhvw8 samhvw8 force-pushed the feat/xml-apply-diff branch 2 times, most recently from 036aecc to b4638b6 Compare May 12, 2025 12:44
@samhvw8 samhvw8 force-pushed the feat/xml-apply-diff branch 4 times, most recently from 32c49f7 to 6292539 Compare May 15, 2025 13:28
@samhvw8 samhvw8 force-pushed the feat/xml-apply-diff branch from 462f9a0 to 0572b50 Compare June 9, 2025 16:30
- Introduced a new component `BatchDiffApproval` to handle the approval of batch changes across multiple files.
- Integrated the `BatchDiffApproval` component into `ChatRow` to display batch diff requests.
- Updated experimental settings to include a toggle for multi-file apply diff functionality.
- Enhanced localization files to support new strings related to batch changes in multiple languages.
- Updated tests to cover the new multi-file apply diff feature.
@samhvw8 samhvw8 force-pushed the feat/xml-apply-diff branch from 0572b50 to 1c5bd66 Compare June 12, 2025 02:46
@daniel-lxs daniel-lxs marked this pull request as ready for review June 12, 2025 15:12
Copy link
Member

@daniel-lxs daniel-lxs left a comment

Choose a reason for hiding this comment

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

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 12, 2025
daniel-lxs and others added 2 commits June 12, 2025 10:15
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
@daniel-lxs daniel-lxs moved this from PR [Draft / In Progress] to PR [Needs Review] in Roo Code Roadmap Jun 12, 2025
@mrubens mrubens merged commit 7bed944 into RooCodeInc:main Jun 12, 2025
10 checks passed
@github-project-automation github-project-automation bot moved this from PR [Pre Approval Review] to Done in Roo Code Roadmap Jun 12, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Jun 12, 2025
@samhvw8
Copy link
Contributor Author

samhvw8 commented Jun 13, 2025

@daniel-lxs Thank You So Much <3 <3

cte pushed a commit that referenced this pull request Jun 24, 2025
…s & batch UI (#3342)

* feat: add BatchDiffApproval component for multi-file diff application

- Introduced a new component `BatchDiffApproval` to handle the approval of batch changes across multiple files.
- Integrated the `BatchDiffApproval` component into `ChatRow` to display batch diff requests.
- Updated experimental settings to include a toggle for multi-file apply diff functionality.
- Enhanced localization files to support new strings related to batch changes in multiple languages.
- Updated tests to cover the new multi-file apply diff feature.

* revert this

* fix: update applyDiff parameter type to accept string or DiffItem

* refactor: keep original file name for apply diff tool

* revert this

* Update src/core/webview/__tests__/ClineProvider.test.ts

* revert this

* fix: keep the original path if the experiment is disabled

* test: add dynamic strategy selection tests for MultiSearchReplaceDiffStrategy and MultiFileSearchReplaceDiffStrategy

* fix: mock applyDiffTool module and ensure legacy tool resolves successfully in tests

* remove this

* ellipsis suggestion

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* refactor: mirror concurrent file reads

---------

Co-authored-by: Daniel Riccio <[email protected]>
Co-authored-by: Daniel <[email protected]>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request lgtm This PR has been approved by a maintainer PR - Needs Review size:XXL This PR changes 1000+ lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Save Tokens: Give AI model tools to read and write multiple files at once

6 participants