From 75ba33604a9edcc08a41c6a242cc6d52a53f204d Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sun, 8 Feb 2026 17:26:52 +0100 Subject: [PATCH] Fixed manual chat saving during streaming --- app/MindWork AI Studio/Components/ChatComponent.razor | 2 +- app/MindWork AI Studio/Components/ChatComponent.razor.cs | 4 ++++ app/MindWork AI Studio/wwwroot/changelog/v26.2.2.md | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/MindWork AI Studio/Components/ChatComponent.razor b/app/MindWork AI Studio/Components/ChatComponent.razor index 38409675..52b82b9b 100644 --- a/app/MindWork AI Studio/Components/ChatComponent.razor +++ b/app/MindWork AI Studio/Components/ChatComponent.razor @@ -66,7 +66,7 @@ @if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_MANUALLY) { - + } diff --git a/app/MindWork AI Studio/Components/ChatComponent.razor.cs b/app/MindWork AI Studio/Components/ChatComponent.razor.cs index ed37e54d..c7bd4dce 100644 --- a/app/MindWork AI Studio/Components/ChatComponent.razor.cs +++ b/app/MindWork AI Studio/Components/ChatComponent.razor.cs @@ -912,6 +912,10 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable break; case Event.CHAT_STREAMING_DONE: + // Streaming mutates the last AI block over time. + // In manual storage mode, a save during streaming must not + // mark the final streamed state as already persisted. + this.hasUnsavedChanges = true; if(this.autoSaveEnabled) await this.SaveThread(); break; diff --git a/app/MindWork AI Studio/wwwroot/changelog/v26.2.2.md b/app/MindWork AI Studio/wwwroot/changelog/v26.2.2.md index 0e024e75..598bb828 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v26.2.2.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v26.2.2.md @@ -5,4 +5,5 @@ - Added an option in the app settings to create an encryption secret, which is required to encrypt values (for example, API keys) in configuration plugins. This feature only shows up when administration options are enabled. - Improved the document analysis assistant (in beta) by hiding the export functionality by default. Enable the administration options in the app settings to show and use the export functionality. This streamlines the usage for regular users. - Improved the workspaces experience by using a different color for the delete button to avoid confusion. +- Fixed an issue where manually saving chats in workspace manual-storage mode could appear unreliable during response streaming. The save button is now disabled while streaming to prevent partial saves. - Upgraded dependencies. \ No newline at end of file