Added another load chat method

This commit is contained in:
Thorsten Sommer 2024-10-27 20:19:21 +01:00
parent 75ec7a2e0f
commit ce7029f019
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -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<ChatThread?> LoadChat(string? chatPath, bool switchToChat)
{