mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-15 11:08:27 +00:00
Moved the chats of the BeyondFacts Lab to the embedded chat of assistants (#1203)
This commit is contained in:
1 parent
dc97db256e
commit
cb54ad297d
27 files changed
+1023
-743
No files matched your search
@@ -26,6 +26,12 @@ public sealed class InMemoryEmbeddedChatStore : IEmbeddedChatStore
|
||||
/// <param name="chatId">The ID of the chat.</param>
|
||||
public IReadOnlyList<ContentBlock> StoredBlocks(Guid chatId) => this.threads.TryGetValue(chatId, out var thread) ? thread.Blocks : [];
|
||||
|
||||
/// <summary>
|
||||
/// Tells whether a chat is stored.
|
||||
/// </summary>
|
||||
/// <param name="chatId">The ID of the chat.</param>
|
||||
public bool IsStored(Guid chatId) => this.threads.ContainsKey(chatId);
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<ChatThread?> LoadThreadAsync(Guid chatId, CancellationToken token = default)
|
||||
{
|
||||
@@ -43,4 +49,11 @@ public sealed class InMemoryEmbeddedChatStore : IEmbeddedChatStore
|
||||
this.SaveCount++;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task DeleteThreadAsync(Guid chatId, CancellationToken token = default)
|
||||
{
|
||||
this.threads.Remove(chatId);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user