From a9d4283923dbf3846f9e727277b7e28624e1140a Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sat, 23 Nov 2024 12:55:13 +0100 Subject: [PATCH] Fix the visual state of auto-save when workspaces are visible --- app/MindWork AI Studio/Pages/Chat.razor.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/MindWork AI Studio/Pages/Chat.razor.cs b/app/MindWork AI Studio/Pages/Chat.razor.cs index 9e754f30..4a4d7ed0 100644 --- a/app/MindWork AI Studio/Pages/Chat.razor.cs +++ b/app/MindWork AI Studio/Pages/Chat.razor.cs @@ -115,7 +115,12 @@ public partial class Chat : MSGComponentBase, IAsyncDisposable if (firstRender && this.chatThread is not null && this.mustStoreChat) { this.mustStoreChat = false; - await WorkspaceBehaviour.StoreChat(this.chatThread); + + if(this.workspaces is not null) + await this.workspaces.StoreChat(this.chatThread); + else + await WorkspaceBehaviour.StoreChat(this.chatThread); + this.currentWorkspaceId = this.chatThread.WorkspaceId; this.currentWorkspaceName = await WorkspaceBehaviour.LoadWorkspaceName(this.chatThread.WorkspaceId); }