2 writes to _currentAssistantResponse
Aspire.Dashboard (2)
Model\Assistant\AssistantChatViewModel.cs (2)
510
_currentAssistantResponse
= callAssistantResponse = new ChatViewModel(isUserMessage: false);
692
_currentAssistantResponse
= null;
24 references to _currentAssistantResponse
Aspire.Dashboard (24)
Model\Assistant\AssistantChatViewModel.cs (24)
238
if (
_currentAssistantResponse
is not null)
511
_currentAssistantResponse
.AppendMarkdown(_loc[nameof(AIAssistant.ChatThinkingText)], _markdownProcessor);
513
_chatState.VisibleChatMessages.Add(
_currentAssistantResponse
);
519
await InvokeConversationChangedCallbackAsync(
_currentAssistantResponse
, _responseState, cancellationToken).ConfigureAwait(false);
530
_currentAssistantResponse
.PromptText = responseText.ToString();
537
await InvokeConversationChangedCallbackAsync(
_currentAssistantResponse
, _responseState, cancellationToken).ConfigureAwait(false);
554
if (
_currentAssistantResponse
!= null)
556
_currentAssistantResponse
.IsComplete = true;
582
Debug.Assert(
_currentAssistantResponse
!= null);
596
_currentAssistantResponse
.ErrorMessage = _loc[nameof(AIAssistant.ChatRequestErrorCanceled)];
623
DateTime.TryParse(
_currentAssistantResponse
.PromptText, CultureInfo.InvariantCulture, out var dateTime))
625
_currentAssistantResponse
.Html = string.Empty;
626
_currentAssistantResponse
.ErrorMessage = _loc[nameof(AIAssistant.ChatRequestErrorReachedLimit)];
627
_currentAssistantResponse
.LimitResetDate = dateTime;
671
_currentAssistantResponse
.ErrorMessage = errorMessage;
672
_currentAssistantResponse
.IsForbidden = isForbidden;
676
_currentAssistantResponse
.ErrorMessage = _loc[nameof(AIAssistant.ChatRequestErrorUnknown)];
683
Debug.Assert(
_currentAssistantResponse
!= null);
689
_currentAssistantResponse
.IsComplete = true;
713
_currentAssistantResponse
.AddChatMessage(message);
800
Debug.Assert(
_currentAssistantResponse
!= null);
806
_currentAssistantResponse
.ClearMarkdown();
812
Debug.Assert(
_currentAssistantResponse
!= null);
817
_currentAssistantResponse
.AppendMarkdown(responseTextChunk, _markdownProcessor, inCompleteDocument: inCompleteDocument);