mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-09-03 05:09:15 +00:00
inject spell checking into text fields of dynamic assistant
This commit is contained in:
parent
5ea2d35dcd
commit
87721686c6
@ -74,6 +74,7 @@ else
|
|||||||
var autoGrow = !textArea.IsSingleLine;
|
var autoGrow = !textArea.IsSingleLine;
|
||||||
|
|
||||||
<MudTextField T="string"
|
<MudTextField T="string"
|
||||||
|
UserAttributes="@SPELLCHECK_ATTRIBUTES"
|
||||||
Text="@this.assistantState.Text[textArea.Name]"
|
Text="@this.assistantState.Text[textArea.Name]"
|
||||||
TextChanged="@(value => this.assistantState.Text[textArea.Name] = value)"
|
TextChanged="@(value => this.assistantState.Text[textArea.Name] = value)"
|
||||||
Label="@textArea.Label"
|
Label="@textArea.Label"
|
||||||
|
|||||||
@ -50,6 +50,7 @@ public partial class AssistantDynamic : AssistantBaseCore<NoSettingsPanel>
|
|||||||
private string securityMessage = string.Empty;
|
private string securityMessage = string.Empty;
|
||||||
private bool isSecurityBlocked;
|
private bool isSecurityBlocked;
|
||||||
private const string ASSISTANT_QUERY_KEY = "assistantId";
|
private const string ASSISTANT_QUERY_KEY = "assistantId";
|
||||||
|
private static readonly Dictionary<string, object?> SPELLCHECK_ATTRIBUTES = new();
|
||||||
private static readonly AssistantSessionStateKey<string> TITLE_STATE_KEY = new(nameof(title));
|
private static readonly AssistantSessionStateKey<string> TITLE_STATE_KEY = new(nameof(title));
|
||||||
private static readonly AssistantSessionStateKey<string> DESCRIPTION_STATE_KEY = new(nameof(description));
|
private static readonly AssistantSessionStateKey<string> DESCRIPTION_STATE_KEY = new(nameof(description));
|
||||||
private static readonly AssistantSessionStateKey<string> SYSTEM_PROMPT_STATE_KEY = new(nameof(systemPrompt));
|
private static readonly AssistantSessionStateKey<string> SYSTEM_PROMPT_STATE_KEY = new(nameof(systemPrompt));
|
||||||
@ -110,6 +111,9 @@ public partial class AssistantDynamic : AssistantBaseCore<NoSettingsPanel>
|
|||||||
|
|
||||||
protected override void OnInitialized()
|
protected override void OnInitialized()
|
||||||
{
|
{
|
||||||
|
// Configure the spellchecking for the instance name input:
|
||||||
|
this.SettingsManager.InjectSpellchecking(SPELLCHECK_ATTRIBUTES);
|
||||||
|
|
||||||
var pluginAssistant = this.ResolveAssistantPlugin();
|
var pluginAssistant = this.ResolveAssistantPlugin();
|
||||||
if (pluginAssistant is null)
|
if (pluginAssistant is null)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user