* do NOT modify the existing merge, and add a new constructor for `Commands.Merge` instead
* rewrite `ViewModels.MergeMultiple`
- since `_histories.Commits.Find` may returns null, use `List<object>` instead of `List<Models.Commits>`
- supports display merge target as both `Models.Commit` and `Models.Branch`
* rename translation key `Text.MergeMultiple.Commit` to `Text.MergeMultiple.Targets`, and add translations for zh_CN and zh_TW
* some UI/UX changes
* change the name of this feature to `Enable Block-Navigation`
* change the icon of the toggle button used to enable this feature
* use a new class `BlockNavigation` to hold all the data about this feature
* create `BlockNavigation` data only when it is enabled
Signed-off-by: leo <longshuang@msn.cn>
* Corrected misspelled local variable nextHigh(t)light
* Implemented change-block navigation
* Modified behavior of the Prev/Next Change buttons in DiffView toolbar.
* Well-defined change-blocks are pre-calculated and can be navigated between.
* Current change-block is highlighted in the Diff panel(s).
* Prev/next at start/end of range (re-)scrolls to first/last change-block
(I.e when unset, or already at first/last change-block, or at the only one.)
* Current change-block is unset in RefreshContent().
* Added safeguards for edge cases
* Added indicator of current/total change-blocks in DiffView toolbar
* Added new Icon and String (en-US) for Highlighted Diff Navigation
* Added Preference and ToggleButton for diff navigation style
* use `--output=<file>` instead of `-o <dir>` to avoid failure because the directory cannot be created
* make generated patches in order when format multiple commits
Signed-off-by: leo <longshuang@msn.cn>
* SourceGit.Commands.* should not reference SourceGit.ViewModels.*
* remove unused namespace using
* update translations for zh_CN and zh_TW
* use WrapPanel instead of inner ScrollViewer
* some other UI/UX changes
Signed-off-by: leo <longshuang@msn.cn>
* feature: add children list to the commit base info view
Useful for navigation between the commits.
* feature: use repository filters to limit children search
* feature: execute children search asynchronously
* feature: respect global commit limit for a good measure
* fix: input lines may contain several commits
The first commit is always the immediate child, so take only 40 initial characters of the line
* fix: hide children behind the preference
* feature: make parents and children scrollable
* remove unnecessary namespace using
* move `Commands.Branch.HasRemote` to `Commands.Remote.HasBranch`
* remove `Commands.Branch.DeleteRemoteTracking` and check branch in `Commands.Branch.DeleteRemote` directly
Signed-off-by: leo <longshuang@msn.cn>
* feat: remove orphan remote-tracking branches
- Allow user remove local remote-tracking branches without remotes (ie. remote was removed on merge request).
- Included 'DeleteRemoteTracking' and 'HasRemote' util methods to handle this case.
* fix: delete both case (local & remote-tracking)
- We have local and remote-tracking but not a remote branch. We need to remove both or only the tracking based on the checkbox and on the 'hasRemote' condition
- Add `ViewModels.Preference.PrepareOpenAIPrompt()` method to generate default prompt instead of a const fallback value. Therefore, it is more convenient for us to modify the default value in the Preference dialog.
- Modify the default prompts. Rename `SubjectPrompt` to `GenerateSubjectPrompt`. Rename `SummaryPrompt` to `AnalyzeDiffPrompt`.
- Rewrite the way to build OpenAI user content for subject generation
Signed-off-by: leo <longshuang@msn.cn>
- Refactor the commit message generation process to utilize default prompts and enhance clarity while eliminating redundancy.
- Added new properties for subject and summary prompts, while improving cancellation support in async task handling.
- feat: add AI prompts for commit message generation.
- Updated the formatting of the package reference for consistency in the project file.
- Add properties for managing OpenAI subject and summary prompts in the Preference view model.
- Refactor layout and add new input fields for AI subject and summary prompts in the preferences view.