WasmMentorStateService class
The WasmMentorStateService class of Novior.MentorAgent.Blazor.Services: WASM implementation of IMentorStateService. Subscribes to the SignalR hub callbacks…
On this page
WASM implementation of IMentorStateService. Subscribes to the SignalR hub callbacks from MentorHubClient and raises the corresponding events so ChatWidget works identically to Blazor Server.
Definition
Section titled “Definition”Namespace: Novior.MentorAgent.Blazor.Services. Package: Novior.MentorAgent.Blazor.
public sealed class WasmMentorStateService : IAsyncDisposable, IMentorStateService
Implements IMentorStateService.
dotnet add package Novior.MentorAgent.BlazorConstructors
Section titled “Constructors”public WasmMentorStateService(MentorHubClient hub, WasmMentorPageContext pageContext, ILogger<WasmMentorStateService> logger, HttpClient http, MentorAgentBlazorOptions? options = null)
Methods
Section titled “Methods”Cancel
Section titled “Cancel”public void Cancel(Guid actionId)
ConfirmAsync
Section titled “ConfirmAsync”public Task ConfirmAsync(Guid actionId)
DisposeAsync
Section titled “DisposeAsync”public ValueTask DisposeAsync()
NotifyActionCompleted
Section titled “NotifyActionCompleted”public void NotifyActionCompleted(string toolName)
NotifyActionExecuting
Section titled “NotifyActionExecuting”public void NotifyActionExecuting(string toolName, string? displayName = null)
NotifyActionFailed
Section titled “NotifyActionFailed”public void NotifyActionFailed(string toolName, string error)
NotifyBusyChanged
Section titled “NotifyBusyChanged”public void NotifyBusyChanged(bool isBusy)
NotifyCardsReady
Section titled “NotifyCardsReady”public void NotifyCardsReady(IReadOnlyList<MentorCard> cards)
NotifyConfirmationRequired
Section titled “NotifyConfirmationRequired”public void NotifyConfirmationRequired(ConfirmationRequest req)
NotifyError
Section titled “NotifyError”public void NotifyError(string message)
NotifyGeneratedImages
Section titled “NotifyGeneratedImages”public void NotifyGeneratedImages(IReadOnlyList<string> imageSources)
NotifyHostedToolsDeclared
Section titled “NotifyHostedToolsDeclared”public void NotifyHostedToolsDeclared(MentorHostedTools tools)
NotifyMcpServerStatusChanged
Section titled “NotifyMcpServerStatusChanged”public void NotifyMcpServerStatusChanged(string name, bool connected)
NotifyNavigationRequested
Section titled “NotifyNavigationRequested”public void NotifyNavigationRequested(string url)
NotifyRagSourcesReady
Section titled “NotifyRagSourcesReady”public void NotifyRagSourcesReady(IReadOnlyList<MentorRagResult> sources)
NotifyStreamingChunk
Section titled “NotifyStreamingChunk”public void NotifyStreamingChunk(string chunk)
NotifyStreamingCompleted
Section titled “NotifyStreamingCompleted”public void NotifyStreamingCompleted()
NotifyTeamMemberSpeaking
Section titled “NotifyTeamMemberSpeaking”public void NotifyTeamMemberSpeaking(string team, string member)
NotifyUIActionCompleted
Section titled “NotifyUIActionCompleted”public void NotifyUIActionCompleted(string actionName)
NotifyUIActionExecuting
Section titled “NotifyUIActionExecuting”public void NotifyUIActionExecuting(string actionName)
Events
Section titled “Events”OnActionCompleted
Section titled “OnActionCompleted”public event Action<string>? OnActionCompleted
OnActionExecuting
Section titled “OnActionExecuting”public event Action<string>? OnActionExecuting
OnActionFailed
Section titled “OnActionFailed”public event Action<string>? OnActionFailed
OnApprovalResponse
Section titled “OnApprovalResponse”public event Action<ConfirmationRequest, bool>? OnApprovalResponse
OnBusyChanged
Section titled “OnBusyChanged”public event Action<bool>? OnBusyChanged
OnCardsReady
Section titled “OnCardsReady”public event Action<IReadOnlyList<MentorCard>>? OnCardsReady
OnConfirmationRequired
Section titled “OnConfirmationRequired”public event Action<ConfirmationRequest>? OnConfirmationRequired
OnError
Section titled “OnError”public event Action<string>? OnError
OnGeneratedImages
Section titled “OnGeneratedImages”public event Action<IReadOnlyList<string>>? OnGeneratedImages
OnHostedToolsDeclared
Section titled “OnHostedToolsDeclared”public event Action<MentorHostedTools>? OnHostedToolsDeclared
OnMcpServerStatusChanged
Section titled “OnMcpServerStatusChanged”public event Action<string, bool>? OnMcpServerStatusChanged
OnNavigationRequested
Section titled “OnNavigationRequested”public event Action<string>? OnNavigationRequested
OnRagSourcesReady
Section titled “OnRagSourcesReady”public event Action<IReadOnlyList<MentorRagResult>>? OnRagSourcesReady
OnStreamingChunk
Section titled “OnStreamingChunk”public event Action<string>? OnStreamingChunk
OnStreamingCompleted
Section titled “OnStreamingCompleted”public event Action? OnStreamingCompleted
OnTeamMemberSpeaking
Section titled “OnTeamMemberSpeaking”public event Action<string, string>? OnTeamMemberSpeaking
OnUIActionCompleted
Section titled “OnUIActionCompleted”public event Action<string>? OnUIActionCompleted
OnUIActionExecuting
Section titled “OnUIActionExecuting”public event Action<string>? OnUIActionExecuting
