3 instantiations of ConversationTurn
Microsoft.AspNetCore.Components.AI (3)
Engine\AgentContext.cs (3)
85
var turn = new
ConversationTurn
();
115
currentTurn = new
ConversationTurn
();
123
currentTurn = new
ConversationTurn
();
18 references to ConversationTurn
Microsoft.AspNetCore.Components.AI (18)
Components\ConversationTurnRenderer.cs (2)
11
private readonly
ConversationTurn
_turn;
19
ConversationTurn
turn,
Components\MessageList.cs (2)
71
foreach (
var
turn in _agentContext.Turns)
86
private void OnTurnAdded(
ConversationTurn
turn)
Engine\AgentContext.cs (14)
23
private readonly List<
ConversationTurn
> _turns = new();
24
private readonly List<Action<
ConversationTurn
>> _turnAddedCallbacks = new();
26
private readonly List<Action<
ConversationTurn
, ContentBlock>> _blockAddedCallbacks = new();
44
public IReadOnlyList<
ConversationTurn
> Turns => _turns;
85
var
turn = new ConversationTurn();
110
ConversationTurn
? currentTurn = null;
145
var
turn = _turns[^1];
174
public IDisposable RegisterOnTurnAdded(Action<
ConversationTurn
> callback)
178
return new CallbackRegistration<Action<
ConversationTurn
>>(_turnAddedCallbacks, callback);
198
public IDisposable RegisterOnBlockAdded(Action<
ConversationTurn
, ContentBlock> callback)
202
return new CallbackRegistration<Action<
ConversationTurn
, ContentBlock>>(_blockAddedCallbacks, callback);
226
ConversationTurn
turn,
337
private void NotifyTurnAdded(
ConversationTurn
turn)
346
private void NotifyBlockAdded(
ConversationTurn
turn, ContentBlock block)