* remove unnecessary namespace using
* do NOT set tooltip currently, because CommitDetail.GetParent may cause UI lags and the tooltip DataTemplate is not provided.
* add translations for zh_CN and zh_TW
Signed-off-by: leo <longshuang@msn.cn>
* feat: context menu for a commit in commit message
When a commit message happens to contain a commit link and the user elects to right-click it, instead of navigating them to the commit, present a menu with options to navigate to it or to copy SHA.
* feat: show commit tooltip as well
`_lastHover` in the `if` is also swapped for `match`for consistency with the block body
* 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
* fix the exit code when start `SourceGit` as core editor (rebasing).
* redesign the layout of working copy page for in-progress states.
Signed-off-by: leo <longshuang@msn.cn>
* add hotkey `Ctrl+Down/⌘+Down` to fetch directly
* keep translation keys of en_US in order
* add translations for zh_CN and zh_TW
* do NOT using namespace under `SourceGit`
* use `⇧` instead of `Shift` in hotkey tips
* hotkey mismatch on macOS
* hotkeys to start fetch/pull/push directly not work on macOS
* remove the hotkey of `Create Branch` context menu item
- there are other objects (such as branch and tag) also have the `Create Branch` context menu item without hotkeys
- on macOS, we already use `⌘+B` to create branch with selected commit, not `Ctrl + B`
Signed-off-by: leo <longshuang@msn.cn>
* update localization for zh_CN and zh_TW
* change the icon for `Icons.Lines.All`
* reorder diff view toolbar buttons
* move private methods after protected
Signed-off-by: leo <longshuang@msn.cn>
* Renamed 1 of 2 SyncScrollOffset props, for clarity
The property "SyncScrollOffset" in TextDiff is distinct from the one with the same name in TwoSideTextDiff. These two properties are used in separate (though slightly related) ways and are not really connected.
The one in TwoSideTextDiff is mainly used to keep the scroll-pos of the two SingleSideTextDiffPresenter views in sync (aligned), while the one in TextDiff is used only to preserve/reset the scroll-pos in the single CombinedTextDiffPresenter view when (re)loading Diff Content (so not really syncing anything).
To clarify this and to make the two properties more distinguishable, I renamed the one in TextDiff to simply "ScrollOffset".
* Added icon and string for "Show All Lines"
New StreamGeometry "Icons.Lines.All" using SVG path from "text_line_spacing_regular" at https://avaloniaui.github.io/icons.html.
New String "Text.Diff.VisualLines.All" for en_US locale (no translations yet).
* Implemented new TextDiff feature "Show All Lines" (toggle)
* Added new ToggleButton in DiffView toolbar, visible when IsTextDiff, disabling the buttons "Increase/Decrease Number of Visible Lines" when on.
* Added new Preference property "UseFullTextDiff".
* Added StyledProperty "UseFullTextDiffProperty" in TextDiffView, with a DataTemplate binding to the corresponding preference property.
* When changed, UseFullTextDiffProperty is handled identically as UseSideBySideDiffProperty (via new helper method RefreshContent(), for unification with OnDataContextChanged()).
* Added new method DiffContext.ToggleFullTextDiff() for changing the preference property and reloading the diff content.
* Implemented the new feature by overriding the "unified" (number of context lines) for Commands.Diff() with a very high number.
NOTE: The number used (~1 billion) is supposed to be the highest one working on Mac, according to this forum comment: https://stackoverflow.com/questions/28727424/for-git-diff-is-there-a-uinfinity-option-to-show-the-whole-file#comment135202820_28846576
* use system chrome instead of custom caption button on macOS
* move `BeginMoveWindow` and `MaximizeOrRestoreWindow` to `ChromelessWindow`
* better supports for fullscreen mode on macOS
* redesign the layout of title bar for all windows
Signed-off-by: leo <longshuang@msn.cn>
* fix watcher stuck by pull
* make stage area resizeable
---------
Co-authored-by: yindf <yindf@mail.jj.cn>
(cherry picked from commit a842aca042a73cb5fa3995794aae2a2e3540b37f)
* If there is only one OpenAI service available, discard the setting of prefered OpenAI service. Instead, use it directly
* If there are multiple OpenAI service available, try to find the prefered one or show a context menu for users to choose the one they want to use
Signed-off-by: leo <longshuang@msn.cn>
- Refactor pt_BR localization strings for improved clarity and consistency in UI text across various components.
- Add password masking to the API key input field.
- 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.