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);