Skip to content

Conversation

@BABA983
Copy link
Contributor

@BABA983 BABA983 commented Aug 8, 2024

Close #205073

accept-all-combination-demo.1.mp4
@hediet
Copy link
Member

hediet commented Aug 9, 2024

Thanks for the PR!

Using ActionsSource looks quite weird though.
Can you use a single transaction to set the state of all hunks?

transaction((tx) => {
	model.setState(
		modifiedBaseRange,
		state.withInputValue(1, false),// modify to include both
		true,
		tx
	);
	model.telemetry.reportRemoveInvoked(1, state.includesInput(2));
});
@BABA983
Copy link
Contributor Author

BABA983 commented Aug 10, 2024

I have some updates on this PR.

Using ActionsSource looks quite weird though.

At first, my idea was that this command would just like simulate the user clicking on these accept combination buttons, so I just reusedActionsSource.

Now we do it in a single transaction.

model.telemetry.reportRemoveInvoked(1, state.includesInput(2));

The telemetry report I change to the same one in ActionSource

model.telemetry.reportSmartCombinationInvoked(state.includesInput(2));

hediet
hediet previously approved these changes Aug 12, 2024
@hediet hediet marked this pull request as ready for review August 12, 2024 11:00
@hediet hediet enabled auto-merge (squash) August 12, 2024 11:00
@hediet hediet added this to the August 2024 milestone Aug 12, 2024
@hediet
Copy link
Member

hediet commented Aug 12, 2024

Thanks!

@Hugothms
Copy link

Hugothms commented Aug 19, 2024

Hey Baba,
Great job thanks for that ! 🙏
Do you think you could add a command to apply the "accept all combination" command to ALL files with merge conflicts ? (in another PR maybe 😇)
Thanks & have a great day ☀️

@BABA983
Copy link
Contributor Author

BABA983 commented Aug 19, 2024

Hey Baba, Great job thanks for that ! 🙏 Do you think you could add a command to apply the "accept all combination" command to ALL files with merge conflicts ? (in another PR maybe 😇) Thanks & have a great day ☀️

Thank you for your kind words!

I think adding a command to apply the "accept all combination" to all files with merge conflicts is cool.

But that is not something I can decide. It's better to let VSCode team decide if we should add this into it.

You can fire a feature request.

@SafariMonkey
Copy link

Rather than adding a command, I think it would make more sense to add it to the right-click menu on the source control pane, alongside the existing menu entries called something like "Accept All Current" and "Accept All Incoming". Then, accepting all combination can be done by selecting all files, right-clicking, and selecting the option. Files with conflicts not resolvable with "Accept Combination" should have those conflicts left unresolved, and should still be in the "Merge Changes" section.

@hediet hediet modified the milestones: August 2024, September 2024 Aug 29, 2024
auto-merge was automatically disabled September 3, 2024 14:13

Head branch was pushed to by a user without write access

@BABA983 BABA983 force-pushed the feature/accept-all-combination branch from 760ffce to 4ab5747 Compare September 3, 2024 14:13
@BABA983 BABA983 requested a review from hediet September 23, 2024 06:53
@hediet hediet modified the milestones: September 2024, October 2024 Sep 25, 2024
@hediet hediet modified the milestones: October 2024, November 2024 Oct 24, 2024
@hediet hediet modified the milestones: November 2024, January 2025 Dec 5, 2024
@mia-petkovic
Copy link

It would really be great to have this feature. How come there are not enough reviewers?

@BABA983
Copy link
Contributor Author

BABA983 commented Dec 10, 2024

It would really be great to have this feature. How come there are not enough reviewers?

This PR was approved previously however, after VSCode shipped with the ESM module, I pushed some code to fix the conflict, I guess this will get merged into january?

@hediet hediet modified the milestones: February 2025, Backlog Feb 7, 2025
@BABA983
Copy link
Contributor Author

BABA983 commented Feb 11, 2025

@hediet Maybe we can merge into the main branch in February?

@Trass3r
Copy link

Trass3r commented Apr 1, 2025

Any updates?

@hediet hediet modified the milestones: Backlog, April 2025 Apr 11, 2025
@hediet hediet added the feature-request Request for new features or functionality label Apr 11, 2025
@hediet hediet force-pushed the feature/accept-all-combination branch from 1d16da3 to 68ea46a Compare April 11, 2025 12:42
@hediet hediet enabled auto-merge (squash) April 11, 2025 12:42
@hediet hediet merged commit be37d18 into microsoft:main Apr 11, 2025
7 checks passed
@hediet hediet added the verification-needed Verification of issue is requested label Apr 29, 2025
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators May 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

feature-request Request for new features or functionality merge-editor verification-needed Verification of issue is requested

8 participants