# MentorWidgetOptions class

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

- URL: https://docs.mentoragent.net/api/novior-mentoragent-abstractions-models/mentorwidgetoptions
- Verified with: MentorAgent 1.2.0
- Last updated: 2026-10-27
- Packages: Novior.MentorAgent.Abstractions

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

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

`public sealed class MentorWidgetOptions`

```shell
dotnet add package Novior.MentorAgent.Abstractions
```

## Constructors

`public MentorWidgetOptions()`

## Properties

### `AiDisclosureMessage`

`public string? AiDisclosureMessage { get; set; }`

The notice's text, shown as written. If null, uses the localized default in [`MentorWidgetOptions.Language`](https://docs.mentoragent.net/api/novior-mentoragent-abstractions-models/mentorwidgetoptions#language).

### `AllowedImageTypes`

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

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

### `AvatarUrl`

`public string? AvatarUrl { get; set; }`

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

### `BotName`

`public string BotName { get; set; }`

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

### `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`

`public bool EnableOnboardingTour { get; set; }`

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

### `EnableSuggestions`

`public bool EnableSuggestions { get; set; }`

Show suggestion chips in the welcome panel.

### `EnableVoiceInput`

`public bool EnableVoiceInput { get; set; }`

Show microphone button for voice input.

### `EnableVoiceOutput`

`public bool EnableVoiceOutput { get; set; }`

Enable text-to-speech for AI responses.

### `HasMcpServers`

`public bool HasMcpServers { get; set; }`

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

### `HasRemoteAgents`

`public bool HasRemoteAgents { get; set; }`

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

### `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`

`public string? InputPlaceholder { get; set; }`

Input box placeholder text. If null, uses the localized default in [`MentorWidgetOptions.Language`](https://docs.mentoragent.net/api/novior-mentoragent-abstractions-models/mentorwidgetoptions#language).

### `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`

`public int MaxImageBytes { get; set; }`

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

### `MaxImagesPerMessage`

`public int MaxImagesPerMessage { get; set; }`

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

### `MaxMessageLength`

`public int MaxMessageLength { get; set; }`

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

### `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`

`public ChatPosition Position { get; set; }`

Widget position on screen. Default: BottomRight.

### `PrimaryColor`

`public string? PrimaryColor { get; set; }`

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

### `RemoteAgentDisplays`

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

Remote agent display info for the A2A detail bar.

### `ShowA2AStatus`

`public bool ShowA2AStatus { get; set; }`

Show A2A remote agent connection badge.

### `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`

`public bool ShowHostedToolsStatus { get; set; }`

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

### `ShowMcpStatus`

`public bool ShowMcpStatus { get; set; }`

Show MCP server connection badge.

### `ShowRagSources`

`public bool ShowRagSources { get; set; }`

Show RAG source citations below AI responses.

### `Theme`

`public MentorTheme Theme { get; set; }`

Visual theme. Default: Default.

### `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`

`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`](https://docs.mentoragent.net/api/novior-mentoragent-abstractions-models/mentorwidgetoptions#enablevoiceinput).

### `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`

`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`

`public string? WelcomeMessage { get; set; }`

Welcome message shown when the chat is empty.

---

- Previous: [MentorUserMessage record](https://docs.mentoragent.net/api/novior-mentoragent-abstractions-models/mentorusermessage.md)
- Next: [ModelPrice record](https://docs.mentoragent.net/api/novior-mentoragent-abstractions-models/modelprice.md)
