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