From b3be2f30bce1df08f030055a57651fcdedfe0fe6 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Thu, 18 Dec 2025 15:31:41 +0100 Subject: [PATCH] Optimized path handling --- .../Components/AttachDocuments.razor | 4 ++-- .../Components/AttachDocuments.razor.cs | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/MindWork AI Studio/Components/AttachDocuments.razor b/app/MindWork AI Studio/Components/AttachDocuments.razor index bcc3f9d7..aea32e75 100644 --- a/app/MindWork AI Studio/Components/AttachDocuments.razor +++ b/app/MindWork AI Studio/Components/AttachDocuments.razor @@ -68,9 +68,9 @@ else
- @foreach (var fileInfo in this.DocumentPaths.Select(file => new FileInfo(file))) + @foreach (var filePath in this.DocumentPaths) { - + }
diff --git a/app/MindWork AI Studio/Components/AttachDocuments.razor.cs b/app/MindWork AI Studio/Components/AttachDocuments.razor.cs index 0b16d5d2..942ce861 100644 --- a/app/MindWork AI Studio/Components/AttachDocuments.razor.cs +++ b/app/MindWork AI Studio/Components/AttachDocuments.razor.cs @@ -199,9 +199,9 @@ public partial class AttachDocuments : MSGComponentBase this.StateHasChanged(); } - private async Task RemoveDocumentPathFromDocumentPaths(FileInfo file) + private async Task RemoveDocument(string filePath) { - this.DocumentPaths.Remove(file.ToString()); + this.DocumentPaths.Remove(filePath); await this.DocumentPathsChanged.InvokeAsync(this.DocumentPaths); await this.OnChange(this.DocumentPaths); @@ -210,12 +210,12 @@ public partial class AttachDocuments : MSGComponentBase /// /// The user might want to check what we actually extract from his file and therefore give the LLM as an input. /// - /// The file to check. - private async Task InvestigateFile(FileInfo file) + /// The file to check. + private async Task InvestigateFile(string filePath) { var dialogParameters = new DialogParameters { - { x => x.FilePath, file.FullName }, + { x => x.FilePath, filePath }, }; await this.DialogService.ShowAsync(T("Document Preview"), dialogParameters, DialogOptions.FULLSCREEN);