mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-05-03 06:39:47 +00:00
Added another load chat method
This commit is contained in:
parent
75ec7a2e0f
commit
ce7029f019
@ -276,6 +276,15 @@ public partial class Workspaces : ComponentBase
|
|||||||
this.StateHasChanged();
|
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)
|
private async Task<ChatThread?> LoadChat(string? chatPath, bool switchToChat)
|
||||||
{
|
{
|
||||||
if(string.IsNullOrWhiteSpace(chatPath))
|
if(string.IsNullOrWhiteSpace(chatPath))
|
||||||
|
Loading…
Reference in New Issue
Block a user