code_style: mark event handled for after dialog closed

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo
2026-03-12 16:36:14 +08:00
parent 4f25a3581d
commit 94efd29509
2 changed files with 4 additions and 0 deletions

View File

@@ -568,6 +568,7 @@ namespace SourceGit.Views
if (vm.Staged == null || vm.Staged.Count == 0)
{
App.RaiseException(repo.FullPath, "No files added to commit!");
e.Handled = true;
return;
}
@@ -575,12 +576,14 @@ namespace SourceGit.Views
if (services.Count == 0)
{
App.RaiseException(repo.FullPath, "Bad configuration for OpenAI");
e.Handled = true;
return;
}
if (services.Count == 1)
{
await App.ShowDialog(new ViewModels.AIAssistant(repo, services[0], vm.Staged));
e.Handled = true;
return;
}

View File

@@ -179,6 +179,7 @@ namespace SourceGit.Views
if (e is { KeyModifiers: KeyModifiers.None, Key: Key.F1 })
{
await App.ShowDialog(new Hotkeys());
e.Handled = true;
return;
}