This commit is contained in:
@@ -27,6 +27,22 @@ public partial class AiAssistDialog : Window
|
||||
await vm.SendCommand.ExecuteAsync(null);
|
||||
}
|
||||
|
||||
private async void OnRescue(object? s, RoutedEventArgs e)
|
||||
{
|
||||
if (DataContext is not AiAssistDialogViewModel { RawResponse: { } raw } vm) return;
|
||||
|
||||
var rescueVm = new AiResponseRescueDialogViewModel(
|
||||
App.Services.GetRequiredService<AiPlanningService>(),
|
||||
App.Services.GetRequiredService<LehrerApp.Core.Interfaces.ILessonRepository>(),
|
||||
vm.Unit, raw, vm.FocusLessonId);
|
||||
var rescue = new AiResponseRescueDialog { DataContext = rescueVm };
|
||||
if (await rescue.ShowDialog<bool>(this))
|
||||
{
|
||||
vm.MarkRescueImported();
|
||||
Close(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnApply(object? s, RoutedEventArgs e)
|
||||
{
|
||||
if (DataContext is AiAssistDialogViewModel vm && vm.ApplyCommand.CanExecute(null))
|
||||
|
||||
Reference in New Issue
Block a user