Skip to content

Commit 26e6231

Browse files
authored
Merge branch 'sourcegit-scm:develop' into develop
2 parents f31dc74 + a7e254c commit 26e6231

24 files changed

+292
-56
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
4848
## Translation Status
4949

50-
[![en_US](https://img.shields.io/badge/en__US-%E2%88%9A-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-99.60%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-97.35%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-92.18%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-97.61%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-91.91%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-99.47%25-yellow)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-%E2%88%9A-brightgreen)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-%E2%88%9A-brightgreen)](TRANSLATION.md)
50+
[![en_US](https://img.shields.io/badge/en__US-%E2%88%9A-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-99.21%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-99.60%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-91.81%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-97.23%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-91.55%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-99.08%25-yellow)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-%E2%88%9A-brightgreen)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-%E2%88%9A-brightgreen)](TRANSLATION.md)
5151

5252
> [!NOTE]
5353
> You can find the missing keys in [TRANSLATION.md](TRANSLATION.md)
@@ -132,7 +132,7 @@ For **Linux** users:
132132

133133
## OpenAI
134134

135-
This software supports using OpenAI or other AI service that has an OpenAI comaptible HTTP API to generate commit message. You need configurate the service in `Preference` window.
135+
This software supports using OpenAI or other AI service that has an OpenAI compatible HTTP API to generate commit message. You need configurate the service in `Preference` window.
136136

137137
For `OpenAI`:
138138

TRANSLATION.md

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,31 @@
1-
### de_DE.axaml: 99.60%
1+
### de_DE.axaml: 99.21%
22

33

44
<details>
55
<summary>Missing Keys</summary>
66

77
- Text.BranchUpstreamInvalid
88
- Text.Configure.CustomAction.WaitForExit
9+
- Text.Diff.First
10+
- Text.Diff.Last
911
- Text.Preferences.AI.Streaming
12+
- Text.StashCM.SaveAsPatch
1013

1114
</details>
1215

13-
### es_ES.axaml: 97.35%
16+
### es_ES.axaml: 99.60%
1417

1518

1619
<details>
1720
<summary>Missing Keys</summary>
1821

19-
- Text.AIAssistant.Regen
20-
- Text.AIAssistant.Use
21-
- Text.ApplyStash
22-
- Text.ApplyStash.DropAfterApply
23-
- Text.ApplyStash.RestoreIndex
24-
- Text.ApplyStash.Stash
25-
- Text.BranchCM.CustomAction
26-
- Text.BranchUpstreamInvalid
27-
- Text.Clone.RecurseSubmodules
28-
- Text.Configure.CustomAction.Scope.Branch
29-
- Text.Configure.CustomAction.WaitForExit
30-
- Text.CreateBranch.Name.WarnSpace
31-
- Text.DeleteRepositoryNode.Path
32-
- Text.DeleteRepositoryNode.TipForGroup
33-
- Text.DeleteRepositoryNode.TipForRepository
34-
- Text.Preferences.AI.Streaming
35-
- Text.Repository.Notifications.Clear
36-
- Text.Stash.AutoRestore
37-
- Text.Stash.AutoRestore.Tip
38-
- Text.WorkingCopy.SignOff
22+
- Text.Diff.First
23+
- Text.Diff.Last
24+
- Text.StashCM.SaveAsPatch
3925

4026
</details>
4127

42-
### fr_FR.axaml: 92.18%
28+
### fr_FR.axaml: 91.81%
4329

4430

4531
<details>
@@ -60,6 +46,8 @@
6046
- Text.DeleteRepositoryNode.Path
6147
- Text.DeleteRepositoryNode.TipForGroup
6248
- Text.DeleteRepositoryNode.TipForRepository
49+
- Text.Diff.First
50+
- Text.Diff.Last
6351
- Text.InProgress.CherryPick.Head
6452
- Text.InProgress.Merge.Operating
6553
- Text.InProgress.Rebase.StoppedAt
@@ -102,12 +90,13 @@
10290
- Text.SHALinkCM.NavigateTo
10391
- Text.Stash.AutoRestore
10492
- Text.Stash.AutoRestore.Tip
93+
- Text.StashCM.SaveAsPatch
10594
- Text.WorkingCopy.CommitToEdit
10695
- Text.WorkingCopy.SignOff
10796

10897
</details>
10998

110-
### it_IT.axaml: 97.61%
99+
### it_IT.axaml: 97.23%
111100

112101

113102
<details>
@@ -127,14 +116,17 @@
127116
- Text.DeleteRepositoryNode.Path
128117
- Text.DeleteRepositoryNode.TipForGroup
129118
- Text.DeleteRepositoryNode.TipForRepository
119+
- Text.Diff.First
120+
- Text.Diff.Last
130121
- Text.Preferences.AI.Streaming
131122
- Text.Repository.Notifications.Clear
132123
- Text.Stash.AutoRestore
133124
- Text.Stash.AutoRestore.Tip
125+
- Text.StashCM.SaveAsPatch
134126

135127
</details>
136128

137-
### pt_BR.axaml: 91.91%
129+
### pt_BR.axaml: 91.55%
138130

139131

140132
<details>
@@ -162,6 +154,8 @@
162154
- Text.DeleteRepositoryNode.Path
163155
- Text.DeleteRepositoryNode.TipForGroup
164156
- Text.DeleteRepositoryNode.TipForRepository
157+
- Text.Diff.First
158+
- Text.Diff.Last
165159
- Text.Diff.UseBlockNavigation
166160
- Text.Fetch.Force
167161
- Text.FileCM.ResolveUsing
@@ -199,12 +193,13 @@
199193
- Text.SHALinkCM.NavigateTo
200194
- Text.Stash.AutoRestore
201195
- Text.Stash.AutoRestore.Tip
196+
- Text.StashCM.SaveAsPatch
202197
- Text.WorkingCopy.CommitToEdit
203198
- Text.WorkingCopy.SignOff
204199

205200
</details>
206201

207-
### ru_RU.axaml: 99.47%
202+
### ru_RU.axaml: 99.08%
208203

209204

210205
<details>
@@ -213,7 +208,10 @@
213208
- Text.BranchCM.CustomAction
214209
- Text.BranchUpstreamInvalid
215210
- Text.Configure.CustomAction.Scope.Branch
211+
- Text.Diff.First
212+
- Text.Diff.Last
216213
- Text.Preferences.AI.Streaming
214+
- Text.StashCM.SaveAsPatch
217215

218216
</details>
219217

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025.05
1+
2025.06

src/Commands/SaveChangesAsPatch.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,19 @@ public static bool ProcessRevisionCompareChanges(string repo, List<Models.Change
3737
return true;
3838
}
3939

40+
public static bool ProcessStashChanges(string repo, List<Models.DiffOption> opts, string saveTo)
41+
{
42+
using (var sw = File.Create(saveTo))
43+
{
44+
foreach (var opt in opts)
45+
{
46+
if (!ProcessSingleChange(repo, opt, sw))
47+
return false;
48+
}
49+
}
50+
return true;
51+
}
52+
4053
private static bool ProcessSingleChange(string repo, Models.DiffOption opt, FileStream writer)
4154
{
4255
var starter = new ProcessStartInfo();

src/Models/OpenAI.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public void Append(string text)
3636
{
3737
if (startIdx > 0)
3838
OnReceive(buffer.Substring(0, startIdx));
39-
39+
4040
var endIdx = buffer.IndexOf(">", startIdx + 1, StringComparison.Ordinal);
4141
if (endIdx <= startIdx)
4242
{

src/Native/Linux.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,16 @@ public void OpenTerminal(string workdir)
6565
{
6666
var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
6767
var cwd = string.IsNullOrEmpty(workdir) ? home : workdir;
68+
var terminal = OS.ShellOrTerminal;
6869

6970
var startInfo = new ProcessStartInfo();
7071
startInfo.WorkingDirectory = cwd;
71-
startInfo.FileName = OS.ShellOrTerminal;
72+
startInfo.FileName = terminal;
7273

73-
if (OS.ShellOrTerminal.EndsWith("wezterm", StringComparison.OrdinalIgnoreCase))
74+
if (terminal.EndsWith("wezterm", StringComparison.OrdinalIgnoreCase))
7475
startInfo.Arguments = $"start --cwd \"{cwd}\"";
76+
else if (terminal.EndsWith("ptyxis", StringComparison.OrdinalIgnoreCase))
77+
startInfo.Arguments = $"--working-directory=\"{cwd}\"";
7578

7679
try
7780
{

src/Resources/Icons.axaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<StreamGeometry x:Key="Icons.Binary">M71 1024V0h661L953 219V1024H71zm808-731-220-219H145V951h735V293zM439 512h-220V219h220V512zm-74-219H292v146h74v-146zm0 512h74v73h-220v-73H292v-146H218V585h147v219zm294-366h74V512H512v-73h74v-146H512V219h147v219zm74 439H512V585h220v293zm-74-219h-74v146h74v-146z</StreamGeometry>
66
<StreamGeometry x:Key="Icons.Blame">M128 256h192a64 64 0 110 128H128a64 64 0 110-128zm576 192h192a64 64 0 010 128h-192a64 64 0 010-128zm-576 192h192a64 64 0 010 128H128a64 64 0 010-128zm576 0h192a64 64 0 010 128h-192a64 64 0 010-128zm0-384h192a64 64 0 010 128h-192a64 64 0 010-128zM128 448h192a64 64 0 110 128H128a64 64 0 110-128zm384-320a64 64 0 0164 64v640a64 64 0 01-128 0V192a64 64 0 0164-64z</StreamGeometry>
77
<StreamGeometry x:Key="Icons.Bookmark">M832 64H192c-18 0-32 14-32 32v832c0 18 14 32 32 32h640c18 0 32-14 32-32V96c0-18-14-32-32-32zM736 596 624 502 506 596V131h230v318z</StreamGeometry>
8+
<StreamGeometry x:Key="Icons.Bottom">M509 546 780 275 871 366 509 728 147 366 238 275zM509 728h-362v128h724v-128z</StreamGeometry>
89
<StreamGeometry x:Key="Icons.Branch">M757 226a143 143 0 00-55 276 96 96 0 01-88 59h-191a187 187 0 00-96 27V312a143 143 0 10-96 0v399a143 143 0 10103 2 96 96 0 0188-59h191a191 191 0 00187-151 143 143 0 00-43-279zM280 130a48 48 0 110 96 48 48 0 010-96zm0 764a48 48 0 110-96 48 48 0 010 96zM757 417a48 48 0 110-96 48 48 0 010 96z</StreamGeometry>
910
<StreamGeometry x:Key="Icons.Branch.Add">M896 128h-64V64c0-35-29-64-64-64s-64 29-64 64v64h-64c-35 0-64 29-64 64s29 64 64 64h64v64c0 35 29 64 64 64s64-29 64-64V256h64c35 0 64-29 64-64s-29-64-64-64zm-204 307C673 481 628 512 576 512H448c-47 0-90 13-128 35V372C394 346 448 275 448 192c0-106-86-192-192-192S64 86 64 192c0 83 54 154 128 180v280c-74 26-128 97-128 180c0 106 86 192 192 192s192-86 192-192c0-67-34-125-84-159c22-20 52-33 84-33h128c122 0 223-85 249-199c-19 4-37 7-57 7c-26 0-51-5-76-13zM256 128c35 0 64 29 64 64s-29 64-64 64s-64-29-64-64s29-64 64-64zm0 768c-35 0-64-29-64-64s29-64 64-64s64 29 64 64s-29 64-64 64z</StreamGeometry>
1011
<StreamGeometry x:Key="Icons.Check">M512 597m-1 0a1 1 0 103 0a1 1 0 10-3 0ZM810 393 732 315 448 600 293 444 214 522l156 156 78 78 362-362z</StreamGeometry>
@@ -119,6 +120,7 @@
119120
<StreamGeometry x:Key="Icons.Tags">M996 452 572 28A96 96 0 00504 0H96C43 0 0 43 0 96v408a96 96 0 0028 68l424 424c37 37 98 37 136 0l408-408c37-37 37-98 0-136zM224 320c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96zm1028 268L844 996c-37 37-98 37-136 0l-1-1L1055 647c34-34 53-79 53-127s-19-93-53-127L663 0h97a96 96 0 0168 28l424 424c37 37 37 98 0 136z</StreamGeometry>
120121
<StreamGeometry x:Key="Icons.Target">M765 118 629 239l-16 137-186 160 54 59 183-168 144 4 136-129 47-43-175-12L827 67zM489 404c-66 0-124 55-124 125s54 121 124 121c66 0 120-55 120-121H489l23-121c-8-4-16-4-23-4zM695 525c0 114-93 207-206 207s-206-94-206-207 93-207 206-207c16 0 27 0 43 4l43-207c-27-4-54-8-85-8-229 0-416 188-416 419s187 419 416 419c225 0 408-180 416-403v-12l-210-4z</StreamGeometry>
121122
<StreamGeometry x:Key="Icons.Terminal">M144 112h736c18 0 32 14 32 32v736c0 18-14 32-32 32H144c-18 0-32-14-32-32V144c0-18 14-32 32-32zm112 211v72a9 9 0 003 7L386 509 259 615a9 9 0 00-3 7v72a9 9 0 0015 7L493 516a9 9 0 000-14l-222-186a9 9 0 00-15 7zM522 624a10 10 0 00-10 10v60a10 10 0 0010 10h237a10 10 0 0010-10v-60a10 10 0 00-10-10H522z</StreamGeometry>
123+
<StreamGeometry x:Key="Icons.Top">M170 831 513 489 855 831 960 726 512 278 64 726 170 831zM512 278h448v-128h-896v128h448z</StreamGeometry>
122124
<StreamGeometry x:Key="Icons.Track">M897 673v13c0 51-42 93-93 93h-10c-1 0-2 0-2 0H220c-23 0-42 19-42 42v13c0 23 19 42 42 42h552c14 0 26 12 26 26 0 14-12 26-26 26H220c-51 0-93-42-93-93v-13c0-51 42-93 93-93h20c1-0 2-0 2-0h562c23 0 42-19 42-42v-13c0-11-5-22-13-29-8-7-17-11-28-10H660c-14 0-26-12-26-26 0-14 12-26 26-26h144c24-1 47 7 65 24 18 17 29 42 29 67zM479 98c-112 0-203 91-203 203 0 44 14 85 38 118l132 208c15 24 50 24 66 0l133-209c23-33 37-73 37-117 0-112-91-203-203-203zm0 327c-68 0-122-55-122-122s55-122 122-122 122 55 122 122-55 122-122 122z</StreamGeometry>
123125
<StreamGeometry x:Key="Icons.Tree">M912 800a48 48 0 1 1 0 96h-416a48 48 0 1 1 0-96h416z m-704-704A112 112 0 0 1 256 309.184V480h80a48 48 0 0 1 0 96H256v224h81.664a48 48 0 1 1 0 96H256a96 96 0 0 1-96-96V309.248A112 112 0 0 1 208 96z m704 384a48 48 0 1 1 0 96h-416a48 48 0 0 1 0-96h416z m0-320a48 48 0 1 1 0 96h-416a48 48 0 0 1 0-96h416z</StreamGeometry>
124126
<StreamGeometry x:Key="Icons.TriangleLeft">M30 0 30 30 0 15z</StreamGeometry>

src/Resources/Locales/en_US.axaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,9 @@
250250
<x:String x:Key="Text.Diff.Binary.Old" xml:space="preserve">OLD</x:String>
251251
<x:String x:Key="Text.Diff.Copy" xml:space="preserve">Copy</x:String>
252252
<x:String x:Key="Text.Diff.FileModeChanged" xml:space="preserve">File Mode Changed</x:String>
253+
<x:String x:Key="Text.Diff.First" xml:space="preserve">First Difference</x:String>
253254
<x:String x:Key="Text.Diff.IgnoreWhitespace" xml:space="preserve">Ignore Whitespace Change</x:String>
255+
<x:String x:Key="Text.Diff.Last" xml:space="preserve">Last Difference</x:String>
254256
<x:String x:Key="Text.Diff.LFS" xml:space="preserve">LFS OBJECT CHANGE</x:String>
255257
<x:String x:Key="Text.Diff.Next" xml:space="preserve">Next Difference</x:String>
256258
<x:String x:Key="Text.Diff.NoChange" xml:space="preserve">NO CHANGES OR ONLY EOL CHANGES</x:String>
@@ -667,6 +669,7 @@
667669
<x:String x:Key="Text.StashCM.Apply" xml:space="preserve">Apply</x:String>
668670
<x:String x:Key="Text.StashCM.Drop" xml:space="preserve">Drop</x:String>
669671
<x:String x:Key="Text.StashCM.Pop" xml:space="preserve">Pop</x:String>
672+
<x:String x:Key="Text.StashCM.SaveAsPatch" xml:space="preserve">Save as Patch...</x:String>
670673
<x:String x:Key="Text.StashDropConfirm" xml:space="preserve">Drop Stash</x:String>
671674
<x:String x:Key="Text.StashDropConfirm.Label" xml:space="preserve">Drop:</x:String>
672675
<x:String x:Key="Text.Stashes" xml:space="preserve">STASHES</x:String>

src/Resources/Locales/zh_CN.axaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,9 @@
253253
<x:String x:Key="Text.Diff.Binary.Old" xml:space="preserve">原始大小</x:String>
254254
<x:String x:Key="Text.Diff.Copy" xml:space="preserve">复制</x:String>
255255
<x:String x:Key="Text.Diff.FileModeChanged" xml:space="preserve">文件权限已变化</x:String>
256+
<x:String x:Key="Text.Diff.First" xml:space="preserve">首个差异</x:String>
256257
<x:String x:Key="Text.Diff.IgnoreWhitespace" xml:space="preserve">忽略空白符号变化</x:String>
258+
<x:String x:Key="Text.Diff.Last" xml:space="preserve">最后一个差异</x:String>
257259
<x:String x:Key="Text.Diff.LFS" xml:space="preserve">LFS对象变更</x:String>
258260
<x:String x:Key="Text.Diff.Next" xml:space="preserve">下一个差异</x:String>
259261
<x:String x:Key="Text.Diff.NoChange" xml:space="preserve">没有变更或仅有换行符差异</x:String>
@@ -671,6 +673,7 @@
671673
<x:String x:Key="Text.StashCM.Apply" xml:space="preserve">应用(apply)</x:String>
672674
<x:String x:Key="Text.StashCM.Drop" xml:space="preserve">删除(drop)</x:String>
673675
<x:String x:Key="Text.StashCM.Pop" xml:space="preserve">应用并删除(pop)</x:String>
676+
<x:String x:Key="Text.StashCM.SaveAsPatch" xml:space="preserve">另存为补丁...</x:String>
674677
<x:String x:Key="Text.StashDropConfirm" xml:space="preserve">丢弃贮藏确认</x:String>
675678
<x:String x:Key="Text.StashDropConfirm.Label" xml:space="preserve">丢弃贮藏 :</x:String>
676679
<x:String x:Key="Text.Stashes" xml:space="preserve">贮藏列表</x:String>

src/Resources/Locales/zh_TW.axaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,9 @@
253253
<x:String x:Key="Text.Diff.Binary.Old" xml:space="preserve">原始大小</x:String>
254254
<x:String x:Key="Text.Diff.Copy" xml:space="preserve">複製</x:String>
255255
<x:String x:Key="Text.Diff.FileModeChanged" xml:space="preserve">檔案權限已變更</x:String>
256+
<x:String x:Key="Text.Diff.First" xml:space="preserve">第一個差異</x:String>
256257
<x:String x:Key="Text.Diff.IgnoreWhitespace" xml:space="preserve">忽略空白符號變化</x:String>
258+
<x:String x:Key="Text.Diff.Last" xml:space="preserve">最後一個差異</x:String>
257259
<x:String x:Key="Text.Diff.LFS" xml:space="preserve">LFS 物件變更</x:String>
258260
<x:String x:Key="Text.Diff.Next" xml:space="preserve">下一個差異</x:String>
259261
<x:String x:Key="Text.Diff.NoChange" xml:space="preserve">沒有變更或僅有換行字元差異</x:String>
@@ -670,6 +672,7 @@
670672
<x:String x:Key="Text.StashCM.Apply" xml:space="preserve">套用 (apply)</x:String>
671673
<x:String x:Key="Text.StashCM.Drop" xml:space="preserve">刪除 (drop)</x:String>
672674
<x:String x:Key="Text.StashCM.Pop" xml:space="preserve">套用並刪除 (pop)</x:String>
675+
<x:String x:Key="Text.StashCM.SaveAsPatch" xml:space="preserve">另存為修補檔 (patch)...</x:String>
673676
<x:String x:Key="Text.StashDropConfirm" xml:space="preserve">捨棄擱置變更確認</x:String>
674677
<x:String x:Key="Text.StashDropConfirm.Label" xml:space="preserve">捨棄擱置變更:</x:String>
675678
<x:String x:Key="Text.Stashes" xml:space="preserve">擱置變更</x:String>

0 commit comments

Comments
 (0)