Class AgentConversationControls
- Namespace
- MailFathom.Application.Agent.Conversations
- Assembly
- MailFathom.Application.dll
What a person does to a conversation: ask, steer the answer being composed, stop it, and decline a proposal.
public sealed class AgentConversationControls
- Inheritance
-
AgentConversationControls
- Inherited Members
Remarks
Each of these writes into the conversation and then says so over the signal channel, naming the conversation, the run where the write belongs to one, and the place reached — and nothing of what was written, which is read back over the conversation's own route. ADR 0035 is that shape. The signal is best effort: every write here is durable before it is announced, and a client that never hears the announcement reads the same rows on its next read.
Every control works from any replica. Nothing here reaches the process composing an answer: stopping one ends it in the record, and the run meets that as the first write the store refuses, wherever it is executing. That is also what lets these stay ordinary requests that work while the hub does not — which is exactly when spending most needs stopping.
Nothing here carries out a proposal, so accepting one is not here either: an acceptance is recorded by AgentProposalAcceptance together with carrying the act out, and never apart from it.
Constructors
- AgentConversationControls(IAgentConversationStore, ClientSignals, IUserLanguages, TimeProvider)
Initializes the controls over the conversation store and the channel that announces each write.
Methods
- AskAsync(AgentConversationId, UserId, AgentMessageId, PresentationText, AgentMessageScope?, CancellationToken)
Asks a question, opening the answer to it and starting the conversation where it is new.
- DeclineProposalAsync(AgentConversationId, UserId, long, CancellationToken)
Records that a person declined a proposal the agent made.
- SteerAsync(AgentConversationId, UserId, AgentMessageId, AgentMessageId, PresentationText, CancellationToken)
Adds an instruction to the answer being composed, which takes it from its next turn without starting over.
- StopAsync(AgentConversationId, UserId, AgentMessageId, CancellationToken)
Ends the answer being composed where it stands, and has the agent say so.