Fixed manual chat saving during streaming

This commit is contained in:
Thorsten Sommer 2026-02-08 17:26:52 +01:00
parent 50d4e7e6dc
commit 75ba33604a
Signed by untrusted user who does not match committer: tsommer
GPG Key ID: 371BBA77A02C0108
3 changed files with 6 additions and 1 deletions

View File

@ -66,7 +66,7 @@
@if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_MANUALLY)
{
<MudTooltip Text="@T("Save chat")" Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
<MudIconButton Icon="@Icons.Material.Filled.Save" OnClick="@(() => this.SaveThread())" Disabled="@(!this.CanThreadBeSaved)"/>
<MudIconButton Icon="@Icons.Material.Filled.Save" OnClick="@(() => this.SaveThread())" Disabled="@(!this.CanThreadBeSaved || this.isStreaming)"/>
</MudTooltip>
}

View File

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

View File

@ -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.