Table of Contents

Method AddThreadStateAgent

Namespace
MailFathom.AI
Assembly
MailFathom.AI.dll

AddThreadStateAgent(IServiceCollection, bool)

Registers the one way a conversation becomes the state drawn beside it, in whichever of its two states the deployment is in.

public static IServiceCollection AddThreadStateAgent(this IServiceCollection services, bool isActivated)

Parameters

services IServiceCollection

The service collection to add to.

isActivated bool

Whether the deployment declared a chat endpoint and asked for its conversations to be read into a state.

Returns

IServiceCollection

The same service collection, so registration reads as one expression.

Remarks

Registered on the same terms as enrichment beside it, and for the same reason: the port answers with a reason rather than with an absence, so the pass records why a conversation carries no state and the screen draws that absence as a state of its own instead of as a failure.

Which of the two is registered is decided once, at composition, so an instance that did not ask for this never resolves a chat client and never composes a turn out of somebody's mail.

Exceptions

ArgumentNullException

Thrown when services is null.