From 3f2dc26cabe3cff152ab2f717f7b5161e6828370 Mon Sep 17 00:00:00 2001 From: hart_s3 Date: Tue, 9 Dec 2025 15:10:51 +0100 Subject: [PATCH] Replace `fileAttachments` with `chatDocumentPaths` for consistency and cleanup. --- app/MindWork AI Studio/Components/ChatComponent.razor.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/MindWork AI Studio/Components/ChatComponent.razor.cs b/app/MindWork AI Studio/Components/ChatComponent.razor.cs index 4d192f4f..a82c3232 100644 --- a/app/MindWork AI Studio/Components/ChatComponent.razor.cs +++ b/app/MindWork AI Studio/Components/ChatComponent.razor.cs @@ -57,7 +57,6 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable private string currentWorkspaceName = string.Empty; private Guid currentWorkspaceId = Guid.Empty; private CancellationTokenSource? cancellationTokenSource; - private List fileAttachments = new(); private HashSet chatDocumentPaths = []; // Unfortunately, we need the input field reference to blur the focus away. Without @@ -464,7 +463,7 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable lastUserPrompt = new ContentText { Text = this.userInput, - FileAttachments = this.fileAttachments.ToList(), // Create a copy + FileAttachments = this.chatDocumentPaths.ToList(), // Create a copy }; // @@ -510,7 +509,7 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable // Clear the input field: await this.inputField.FocusAsync(); this.userInput = string.Empty; - this.fileAttachments.Clear(); + this.chatDocumentPaths.Clear(); await this.inputField.BlurAsync(); // Enable the stream state for the chat component: