MentorAgent Docs
Menu

ReferencePackage: Novior.MentorAgent.Abstractions

MentorWidgetOptions class

The MentorWidgetOptions class of Novior.MentorAgent.Abstractions.Models: UI-only options for the MentorAgent chat widget. Registered in DI by both…

View as Markdown
On this page

UI-only options for the MentorAgent chat widget. Registered in DI by both AddMentorAgent() (Blazor Server) and AddMentorAgentBlazor() (Blazor WASM). ChatWidget injects IOptions<MentorWidgetOptions>.

Namespace: Novior.MentorAgent.Abstractions.Models. Package: Novior.MentorAgent.Abstractions.

public sealed class MentorWidgetOptions

Terminal
dotnet add package Novior.MentorAgent.Abstractions

public MentorWidgetOptions()

public string? AiDisclosureMessage { get; set; }

The notice's text, shown as written. If null, uses the localized default in MentorWidgetOptions.Language.

public List<string> AllowedImageTypes { get; set; }

Client-side MIME allow-list. Mirrors MentorOptions.AllowedImageTypes.

public string? AvatarUrl { get; set; }

Custom avatar URL. Falls back to the built-in MentorAgent icon.

public string BotName { get; set; }

Bot name shown in the widget header. Default: "Mentor AI".

public bool EnableImageInput { get; set; }

Show the image-attachment button and enable paste / drag-and-drop / URL input (roadmap #13 — multimodal). Mirrors MentorOptions.EnableImageInput; the server re-validates every attachment, so this only drives the UI.

public bool EnableOnboardingTour { get; set; }

Show the guided tour the first time this user opens the widget (roadmap #18). Mirrors MentorOptions.EnableOnboardingTour.

public bool EnableSuggestions { get; set; }

Show suggestion chips in the welcome panel.

public bool EnableVoiceInput { get; set; }

Show microphone button for voice input.

public bool EnableVoiceOutput { get; set; }

Enable text-to-speech for AI responses.

public bool HasMcpServers { get; set; }

True if at least one MCP server is configured (controls badge visibility).

public bool HasRemoteAgents { get; set; }

True if at least one remote agent is configured (controls badge visibility).

public MentorHostedTools HostedTools { get; set; }

Hosted tools actually active on the server (roadmap #15) — drives the badge contents. A tool the server had to drop (e.g. file search with no vector store) is not reported here, so the badge never claims a capability the model does not have.

public string? InputPlaceholder { get; set; }

Input box placeholder text. If null, uses the localized default in MentorWidgetOptions.Language.

public MentorLanguage Language { get; set; }

The application's language, copied from MentorOptions.Language at startup. Default: English. The widget speaks the language of its localizer instead: ChatWidget.Language when set, else the application's, read on every use.

public int MaxImageBytes { get; set; }

Client-side size cap per image, in bytes. Mirrors MentorOptions.MaxImageBytes. Default: 4 MB.

public int MaxImagesPerMessage { get; set; }

Client-side cap on images per message. Mirrors MentorOptions.MaxImagesPerMessage. Default: 4.

public int MaxMessageLength { get; set; }

Maximum message length in the input box. 0 = no limit (defaults to 4000).

public List<string> McpServerNames { get; set; }

Names of configured MCP client servers. Used by ChatWidget to pre-populate the MCP status badge in "connecting" state before the first message triggers lazy initialisation.

public ChatPosition Position { get; set; }

Widget position on screen. Default: BottomRight.

public string? PrimaryColor { get; set; }

Custom accent color (hex, e.g. "#7c3aed").

public List<AgentDisplayInfo> RemoteAgentDisplays { get; set; }

Remote agent display info for the A2A detail bar.

public bool ShowA2AStatus { get; set; }

Show A2A remote agent connection badge.

public bool ShowAiDisclosure { get; set; }

Shows, under the header, the notice that tells people they are talking to an AI assistant, for the whole conversation. Default: true. The marker on each reply (data-ai-generated) stays either way.

public bool ShowHostedToolsStatus { get; set; }

Show the provider-hosted tools badge in the widget header (roadmap #15). Mirrors MentorOptions.ShowHostedToolsStatus.

public bool ShowMcpStatus { get; set; }

Show MCP server connection badge.

public bool ShowRagSources { get; set; }

Show RAG source citations below AI responses.

public MentorTheme Theme { get; set; }

Visual theme. Default: Default.

public bool VoiceBargeIn { get; set; }

Stop playback as soon as the user takes the floor — presses the microphone or sends a message (roadmap #17). Default: true. This is press-to-interrupt barge-in, not acoustic: the browser cannot listen through its own playback without echo cancellation.

public bool VoiceHandsFree { get; set; }

Keep the conversation going by voice alone: the transcript is sent on silence and the microphone reopens once the spoken answer ends (roadmap #17). Default: false — it holds the microphone open across turns, which is not a reasonable default. Requires MentorWidgetOptions.EnableVoiceInput.

public double VoiceRate { get; set; }

Speech rate passed to SpeechSynthesisUtterance.rate. 1.0 is the browser default; the useful range is roughly 0.5–2.0. Default: 1.0.

public bool VoiceStreaming { get; set; }

Speak each sentence as it streams instead of reading the answer back once it is complete (roadmap #17). Default: true. Turning it off restores the previous behaviour, which is worth doing only if your answers are consistently one line long.

public string? WelcomeMessage { get; set; }

Welcome message shown when the chat is empty.