MentorAgent Docs
Menu

Questa pagina non è ancora tradotta in italiano: qui la trovi in inglese.

ReferencePackage: Novior.MentorAgent.Blazor

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.

Namespace: Novior.MentorAgent.Blazor.Services. Package: Novior.MentorAgent.Blazor.

public sealed class WasmMentorStateService : IAsyncDisposable, IMentorStateService

Implements IMentorStateService.

Terminal
dotnet add package Novior.MentorAgent.Blazor

public WasmMentorStateService(MentorHubClient hub, WasmMentorPageContext pageContext, ILogger<WasmMentorStateService> logger, HttpClient http, MentorAgentBlazorOptions? options = null)

public void Cancel(Guid actionId)

public Task ConfirmAsync(Guid actionId)

public ValueTask DisposeAsync()

public void NotifyActionCompleted(string toolName)

public void NotifyActionExecuting(string toolName, string? displayName = null)

public void NotifyActionFailed(string toolName, string error)

public void NotifyBusyChanged(bool isBusy)

public void NotifyCardsReady(IReadOnlyList<MentorCard> cards)

public void NotifyConfirmationRequired(ConfirmationRequest req)

public void NotifyError(string message)

public void NotifyGeneratedImages(IReadOnlyList<string> imageSources)

public void NotifyHostedToolsDeclared(MentorHostedTools tools)

public void NotifyMcpServerStatusChanged(string name, bool connected)

public void NotifyNavigationRequested(string url)

public void NotifyRagSourcesReady(IReadOnlyList<MentorRagResult> sources)

public void NotifyStreamingChunk(string chunk)

public void NotifyStreamingCompleted()

public void NotifyTeamMemberSpeaking(string team, string member)

public void NotifyUIActionCompleted(string actionName)

public void NotifyUIActionExecuting(string actionName)

public event Action<string>? OnActionCompleted

public event Action<string>? OnActionExecuting

public event Action<string>? OnActionFailed

public event Action<ConfirmationRequest, bool>? OnApprovalResponse

public event Action<bool>? OnBusyChanged

public event Action<IReadOnlyList<MentorCard>>? OnCardsReady

public event Action<ConfirmationRequest>? OnConfirmationRequired

public event Action<string>? OnError

public event Action<IReadOnlyList<string>>? OnGeneratedImages

public event Action<MentorHostedTools>? OnHostedToolsDeclared

public event Action<string, bool>? OnMcpServerStatusChanged

public event Action<string>? OnNavigationRequested

public event Action<IReadOnlyList<MentorRagResult>>? OnRagSourcesReady

public event Action<string>? OnStreamingChunk

public event Action? OnStreamingCompleted

public event Action<string, string>? OnTeamMemberSpeaking

public event Action<string>? OnUIActionCompleted

public event Action<string>? OnUIActionExecuting