mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-05-02 08:39:46 +00:00
Added another load chat method
This commit is contained in:
parent
75ec7a2e0f
commit
ce7029f019
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user