Rework of the file export (#894)

Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
nilskruthoffandThorsten Sommer authored and GitHub committed 2026-08-31 08:40:50 +02:00
1 parent f14c69b938
commit c66a61713d
33 files changed
+1212 -266

No files matched your search

@@ -5,6 +5,7 @@ using AIStudio.Chat;
using AIStudio.Dialogs;
using AIStudio.Dialogs.Settings;
using AIStudio.Tools.AssistantSessions;
using AIStudio.Tools.Services;
using Microsoft.AspNetCore.Components;
#if !DEBUG
@@ -28,6 +29,9 @@ public partial class AssistantPromptOptimizer : AssistantBaseCore<SettingsDialog
[Inject]
private IDialogService DialogService { get; init; } = null!;
[Inject]
private PandocAvailabilityService PandocAvailability { get; init; } = null!;
protected override Tools.Components Component => Tools.Components.PROMPT_OPTIMIZER_ASSISTANT;
protected override string Title => T("Prompt Optimizer");
@@ -581,7 +585,7 @@ public partial class AssistantPromptOptimizer : AssistantBaseCore<SettingsDialog
this.isLoadingCustomPromptGuide = true;
// A failure was already reported by UserFile.LoadFileData, so we only keep the content:
var extraction = await UserFile.LoadFileData(fileAttachment.FilePath, this.RustService, this.DialogService);
var extraction = await UserFile.LoadFileData(fileAttachment.FilePath, this.RustService, this.PandocAvailability);
this.customPromptingGuidelineContent = extraction.HasUsableContent ? extraction.Content : string.Empty;
}
catch