Questa pagina non è ancora tradotta in italiano: qui la trovi in inglese.
MentorWidgetOptions class
The MentorWidgetOptions class of Novior.MentorAgent.Abstractions.Models: UI-only options for the MentorAgent chat widget. Registered in DI by both…
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>.
Definition
Section titled “Definition”Namespace: Novior.MentorAgent.Abstractions.Models. Package: Novior.MentorAgent.Abstractions.
public sealed class MentorWidgetOptions
dotnet add package Novior.MentorAgent.AbstractionsConstructors
Section titled “Constructors”public MentorWidgetOptions()
Properties
Section titled “Properties”AiDisclosureMessage
Section titled “AiDisclosureMessage”public string? AiDisclosureMessage { get; set; }
The notice's text, shown as written. If null, uses the localized default in MentorWidgetOptions.Language.
AllowedImageTypes
Section titled “AllowedImageTypes”public List<string> AllowedImageTypes { get; set; }
Client-side MIME allow-list. Mirrors MentorOptions.AllowedImageTypes.
AvatarUrl
Section titled “AvatarUrl”public string? AvatarUrl { get; set; }
Custom avatar URL. Falls back to the built-in MentorAgent icon.
BotName
Section titled “BotName”public string BotName { get; set; }
Bot name shown in the widget header. Default: "Mentor AI".
EnableImageInput
Section titled “EnableImageInput”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.
EnableOnboardingTour
Section titled “EnableOnboardingTour”public bool EnableOnboardingTour { get; set; }
Show the guided tour the first time this user opens the widget (roadmap #18). Mirrors MentorOptions.EnableOnboardingTour.
EnableSuggestions
Section titled “EnableSuggestions”public bool EnableSuggestions { get; set; }
Show suggestion chips in the welcome panel.
EnableVoiceInput
Section titled “EnableVoiceInput”public bool EnableVoiceInput { get; set; }
Show microphone button for voice input.
EnableVoiceOutput
Section titled “EnableVoiceOutput”public bool EnableVoiceOutput { get; set; }
Enable text-to-speech for AI responses.
HasMcpServers
Section titled “HasMcpServers”public bool HasMcpServers { get; set; }
True if at least one MCP server is configured (controls badge visibility).
HasRemoteAgents
Section titled “HasRemoteAgents”public bool HasRemoteAgents { get; set; }
True if at least one remote agent is configured (controls badge visibility).
HostedTools
Section titled “HostedTools”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.
InputPlaceholder
Section titled “InputPlaceholder”public string? InputPlaceholder { get; set; }
Input box placeholder text. If null, uses the localized default in MentorWidgetOptions.Language.
Language
Section titled “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.
MaxImageBytes
Section titled “MaxImageBytes”public int MaxImageBytes { get; set; }
Client-side size cap per image, in bytes. Mirrors MentorOptions.MaxImageBytes. Default: 4 MB.
MaxImagesPerMessage
Section titled “MaxImagesPerMessage”public int MaxImagesPerMessage { get; set; }
Client-side cap on images per message. Mirrors MentorOptions.MaxImagesPerMessage. Default: 4.
MaxMessageLength
Section titled “MaxMessageLength”public int MaxMessageLength { get; set; }
Maximum message length in the input box. 0 = no limit (defaults to 4000).
McpServerNames
Section titled “McpServerNames”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.
Position
Section titled “Position”public ChatPosition Position { get; set; }
Widget position on screen. Default: BottomRight.
PrimaryColor
Section titled “PrimaryColor”public string? PrimaryColor { get; set; }
Custom accent color (hex, e.g. "#7c3aed").
RemoteAgentDisplays
Section titled “RemoteAgentDisplays”public List<AgentDisplayInfo> RemoteAgentDisplays { get; set; }
Remote agent display info for the A2A detail bar.
ShowA2AStatus
Section titled “ShowA2AStatus”public bool ShowA2AStatus { get; set; }
Show A2A remote agent connection badge.
ShowAiDisclosure
Section titled “ShowAiDisclosure”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.
ShowHostedToolsStatus
Section titled “ShowHostedToolsStatus”public bool ShowHostedToolsStatus { get; set; }
Show the provider-hosted tools badge in the widget header (roadmap #15). Mirrors MentorOptions.ShowHostedToolsStatus.
ShowMcpStatus
Section titled “ShowMcpStatus”public bool ShowMcpStatus { get; set; }
Show MCP server connection badge.
ShowRagSources
Section titled “ShowRagSources”public bool ShowRagSources { get; set; }
Show RAG source citations below AI responses.
public MentorTheme Theme { get; set; }
Visual theme. Default: Default.
VoiceBargeIn
Section titled “VoiceBargeIn”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.
VoiceHandsFree
Section titled “VoiceHandsFree”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.
VoiceRate
Section titled “VoiceRate”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.
VoiceStreaming
Section titled “VoiceStreaming”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.
WelcomeMessage
Section titled “WelcomeMessage”public string? WelcomeMessage { get; set; }
Welcome message shown when the chat is empty.
