diff --git a/app/MindWork AI Studio/Components/Workspaces.razor.cs b/app/MindWork AI Studio/Components/Workspaces.razor.cs index 498c5a37..efb53511 100644 --- a/app/MindWork AI Studio/Components/Workspaces.razor.cs +++ b/app/MindWork AI Studio/Components/Workspaces.razor.cs @@ -275,6 +275,15 @@ public partial class Workspaces : ComponentBase await this.LoadTreeItems(); this.StateHasChanged(); } + + public async Task LoadChat(LoadChat loadChat) + { + var chatPath = loadChat.WorkspaceId == Guid.Empty + ? Path.Join(SettingsManager.DataDirectory, "tempChats", loadChat.ChatId.ToString()) + : Path.Join(SettingsManager.DataDirectory, "workspaces", loadChat.WorkspaceId.ToString(), loadChat.ChatId.ToString()); + + await this.LoadChat(chatPath, switchToChat: true); + } private async Task LoadChat(string? chatPath, bool switchToChat) {