Table of Contents

Class ChatThreadRepository

Namespace
Oscova.Agents.Conversations
Assembly
Oscova.Agents.dll

Persists conversation threads beneath a caller-selected users root.

public sealed class ChatThreadRepository : IChatThreadRepository

Inheritance

Implements

Inherited Members

Constructors

ChatThreadRepository(Func<string>, FileSessionIndexCoordinator, IRedactionService, IContentProtector, ILogger<ChatThreadRepository>)

Persists conversation threads beneath a caller-selected users root.

Methods

ClearCurrentAsync(string, string, string?, CancellationToken)

Clears the current thread selection for an agent.

CreateThreadAsync(string, ChatThread, bool, CancellationToken)

Persists a chat thread and optionally marks it current.

DeleteAllThreadsAsync(string, CancellationToken)

Deletes all persisted chat threads for a user.

DeleteSessionElementAsync(string, string, CancellationToken)

Deletes the serialized framework session state for a thread.

DeleteThreadAsync(string, string, CancellationToken)

Deletes one persisted chat thread.

DeleteThreadsByAgentAsync(string, string, CancellationToken)

Deletes all persisted chat threads for an agent.

GetIncognitoThreadsAsync(string, CancellationToken)

Returns the user's in-memory incognito threads.

GetProjectThreadIdsAsync(string, string, CancellationToken)

Returns owned project thread identities from unlocked summaries and in-memory incognito entries.

GetSessionElementAsync(string, string, CancellationToken)

Returns the serialized framework session state for a thread.

GetThreadAsync(string, string, CancellationToken, int?, string?, string?)

Returns an owned thread, optionally paging complete display exchanges without trimming its model session.

GetThreadsAsync(string, CancellationToken)

Returns the user's persisted chat-thread summaries. Incognito threads are excluded.

GetThreadsWithMessagesAsync(string, CancellationToken)

Returns owned persisted conversations with display messages, excluding model session state.

MarkCurrentAsync(string, string, string, CancellationToken)

Marks a thread as current for an agent.

SaveSessionElementAsync(string, string, JsonElement, string?, CancellationToken)

Persists serialized framework session state for a thread.

SaveThreadAsync(string, ChatThread, bool, CancellationToken)

Updates a conversation that still exists without recreating deleted state.

ThreadExistsAsync(string, string, CancellationToken)

Checks ownership using unlocked persisted summaries or in-memory incognito entries.

TryMarkThreadReadAsync(string, string, CancellationToken)

Marks an existing conversation read without rewriting its contents.

TryRenameThreadAsync(string, string, string, CancellationToken)

Renames an existing chat thread without creating missing state.

TryReplaceDisplayMessageAsync(string, string, ChatDisplayMessage, CancellationToken)

Replaces one existing display message without changing its model session.

UpdateWatermarksAsync(string, string, int?, int?, CancellationToken, int?, int?, int?)

Updates the persisted processing watermarks for a thread.