1 instantiation of ConversationTurn
Microsoft.AspNetCore.Components.AI (1)
Engine\AgentContext.cs (1)
84
var turn = new
ConversationTurn
();
17 references to ConversationTurn
Microsoft.AspNetCore.Components.AI (17)
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 (13)
22
private readonly List<
ConversationTurn
> _turns = new();
23
private readonly List<Action<
ConversationTurn
>> _turnAddedCallbacks = new();
25
private readonly List<Action<
ConversationTurn
, ContentBlock>> _blockAddedCallbacks = new();
43
public IReadOnlyList<
ConversationTurn
> Turns => _turns;
84
var
turn = new ConversationTurn();
107
var
turn = _turns[^1];
136
public IDisposable RegisterOnTurnAdded(Action<
ConversationTurn
> callback)
140
return new CallbackRegistration<Action<
ConversationTurn
>>(_turnAddedCallbacks, callback);
160
public IDisposable RegisterOnBlockAdded(Action<
ConversationTurn
, ContentBlock> callback)
164
return new CallbackRegistration<Action<
ConversationTurn
, ContentBlock>>(_blockAddedCallbacks, callback);
188
ConversationTurn
turn,
252
private void NotifyTurnAdded(
ConversationTurn
turn)
261
private void NotifyBlockAdded(
ConversationTurn
turn, ContentBlock block)