minor fixes

This commit is contained in:
krut_ni 2026-03-16 15:44:15 +01:00
parent 0d57f1883c
commit 5894147238
No known key found for this signature in database
GPG Key ID: A5C0151B4DDB172C
6 changed files with 29 additions and 6 deletions

View File

@ -5,9 +5,18 @@
@using AIStudio.Tools.PluginSystem.Assistants.DataModel.Layout @using AIStudio.Tools.PluginSystem.Assistants.DataModel.Layout
@inherits AssistantBaseCore<AIStudio.Dialogs.Settings.SettingsDialogDynamic> @inherits AssistantBaseCore<AIStudio.Dialogs.Settings.SettingsDialogDynamic>
@foreach (var component in this.RootComponent!.Children) @if (this.RootComponent is null)
{ {
@this.RenderComponent(component) <MudAlert Severity="Severity.Warning">
@this.T("No assistant plugin are currently installed.")
</MudAlert>
}
else
{
@foreach (var component in this.RootComponent.Children)
{
@this.RenderComponent(component)
}
} }
@code { @code {

View File

@ -30,14 +30,11 @@ public partial class AssistantDynamic : AssistantBaseCore<SettingsDialogDynamic>
// Reuse chat-level provider filtering/preselection instead of NONE. // Reuse chat-level provider filtering/preselection instead of NONE.
protected override Tools.Components Component => Tools.Components.CHAT; protected override Tools.Components Component => Tools.Components.CHAT;
private string? inputText;
private string title = string.Empty; private string title = string.Empty;
private string description = string.Empty; private string description = string.Empty;
private string systemPrompt = string.Empty; private string systemPrompt = string.Empty;
private bool allowProfiles = true; private bool allowProfiles = true;
private string submitText = string.Empty; private string submitText = string.Empty;
private string selectedTargetLanguage = string.Empty;
private string customTargetLanguage = string.Empty;
private bool showFooterProfileSelection = true; private bool showFooterProfileSelection = true;
private PluginAssistants? assistantPlugin; private PluginAssistants? assistantPlugin;
@ -86,7 +83,9 @@ public partial class AssistantDynamic : AssistantBaseCore<SettingsDialogDynamic>
private PluginAssistants? ResolveAssistantPlugin() private PluginAssistants? ResolveAssistantPlugin()
{ {
var assistantPlugins = PluginFactory.RunningPlugins.OfType<PluginAssistants>().ToList(); var assistantPlugins = PluginFactory.RunningPlugins.OfType<PluginAssistants>()
.Where(plugin => this.SettingsManager.IsPluginEnabled(plugin))
.ToList();
if (assistantPlugins.Count == 0) if (assistantPlugins.Count == 0)
return null; return null;

View File

@ -535,6 +535,9 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTA
-- Yes, hide the policy definition -- Yes, hide the policy definition
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T940701960"] = "Yes, hide the policy definition" UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T940701960"] = "Yes, hide the policy definition"
-- No assistant plugin are currently installed.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DYNAMIC::ASSISTANTDYNAMIC::T1913566603"] = "No assistant plugin are currently installed."
-- Please select one of your profiles. -- Please select one of your profiles.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DYNAMIC::ASSISTANTDYNAMIC::T465395981"] = "Please select one of your profiles." UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DYNAMIC::ASSISTANTDYNAMIC::T465395981"] = "Please select one of your profiles."

View File

@ -537,6 +537,9 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTA
-- Yes, hide the policy definition -- Yes, hide the policy definition
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T940701960"] = "Ja, die Definition des Regelwerks ausblenden" UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T940701960"] = "Ja, die Definition des Regelwerks ausblenden"
-- No assistant plugin are currently installed.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DYNAMIC::ASSISTANTDYNAMIC::T1913566603"] = "Derzeit sind keine Assistant-Plugins installiert."
-- Please select one of your profiles. -- Please select one of your profiles.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DYNAMIC::ASSISTANTDYNAMIC::T465395981"] = "Bitte wählen Sie eines Ihrer Profile aus." UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DYNAMIC::ASSISTANTDYNAMIC::T465395981"] = "Bitte wählen Sie eines Ihrer Profile aus."

View File

@ -537,6 +537,9 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTA
-- Yes, hide the policy definition -- Yes, hide the policy definition
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T940701960"] = "Yes, hide the policy definition" UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DOCUMENTANALYSIS::DOCUMENTANALYSISASSISTANT::T940701960"] = "Yes, hide the policy definition"
-- No assistant plugin are currently installed.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DYNAMIC::ASSISTANTDYNAMIC::T1913566603"] = "No assistant plugin are currently installed."
-- Please select one of your profiles. -- Please select one of your profiles.
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DYNAMIC::ASSISTANTDYNAMIC::T465395981"] = "Please select one of your profiles." UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::DYNAMIC::ASSISTANTDYNAMIC::T465395981"] = "Please select one of your profiles."

View File

@ -370,6 +370,12 @@ public sealed class PluginAssistants(bool isInternal, LuaState state, PluginType
result = action; result = action;
return true; return true;
} }
if (type == AssistantComponentType.SWITCH && key == "OnChanged" && val.TryRead<LuaFunction>(out var onChanged))
{
result = onChanged;
return true;
}
return this.TryConvertLuaValue(val, out result); return this.TryConvertLuaValue(val, out result);
} }