KI-Backend: Antwortretten - Funktion
CI / build-and-test (push) Canceled after 0s

This commit is contained in:
2026-09-04 12:10:42 +02:00
parent 7ef0c95a73
commit fedfceb81d
10 changed files with 435 additions and 14 deletions
@@ -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))