@attribute [Route(Routes.ASSISTANT_META_ASSISTANT)] @using AIStudio.Agents.AssistantAudit @using AIStudio.Tools.PluginSystem.Assistants.DataModel @inherits AssistantBaseCore @if (this.step is BuilderStep.DESCRIBE) { @* This switch chooses between the two kinds of assistant the Builder can create, so it stays outside the advanced options. Its fields are required, and a collapsed panel would hide both them and their validation messages. It asks a question and labels both of its states, so the choice reads the same way as the switches in the app settings. *@ @(this.createChatLauncher ? T("A direct chat launcher tile that opens a preconfigured chat right away") : T("A full assistant with its own input form")) @(this.createChatLauncher ? T("The direct chat launcher tile has no input form of its own. It opens a new chat right away, in the workspace you name below and with the provider, profile, chat template, and data sources you select there.") : T("The assistant asks users for input through a form and builds its own prompt from it.")) @if (this.createChatLauncher) { @* The dashed frame shows that these fields belong together: they describe one chat the launcher tile opens. The title lives here rather than in the advanced options, because a launcher has no other visible content: its tile is the whole assistant. *@ }
@T("Advanced Options")
@* A launcher shows this field inside its own frame above, next to the chat settings it belongs with. *@ @if (!this.createChatLauncher) { } @if (!this.createChatLauncher) { @foreach (var component in ASSISTANT_COMPONENT_OPTIONS) { @component.GetDisplayName() } }
@this.HighPerformanceLLMInfo } else { @T("Assistant draft") @T("View accepted draft") @T("Change description") @if (this.step is BuilderStep.DONE) { @T("Edit draft") } @this.HighPerformanceLLMInfo } @code { private protected override RenderFragment? BelowSubmitContent => this.step is BuilderStep.DONE && !string.IsNullOrWhiteSpace(this.generatedLuaAssistant) ? @
@T("Generated Lua plugin")
@if (this.isCheckingPlugin) { @T("Validating the generated assistant...") } else if (this.IsInstallStepFailed(BuilderInstallStep.CHECK_PLUGIN)) { @T("The generated assistant could not be checked.") @if (!string.IsNullOrWhiteSpace(this.installFlowIssue)) { @string.Format(T("Issue: {0}"), this.installFlowIssue) } } else if (this.PluginCheckCompleted) { @string.Format(T("The generated assistant '{0}' is valid and runnable."), this.pluginCheckResult?.PluginName ?? T("Unknown assistant")) } else { @T("Validate generated assistant") } @if (this.isInstallingPlugin) { @T("Installing the assistant...") } else if (this.IsInstallStepFailed(BuilderInstallStep.INSTALL_ASSISTANT)) { @T("The assistant could not be installed.") @if (!string.IsNullOrWhiteSpace(this.installFlowIssue)) { @string.Format(T("Issue: {0}"), this.installFlowIssue) } } else if (this.PluginInstallCompleted) { @(this.pluginInstallResult?.ReplacedExisting is true ? string.Format(T("The assistant '{0}' was updated."), this.pluginInstallResult?.PluginName ?? T("Unknown assistant")) : string.Format(T("The assistant '{0}' was installed."), this.pluginInstallResult?.PluginName ?? T("Unknown assistant"))) } else { @T("Install assistant") } @if (this.isAuditingPlugin) { @T("Auditing assistants safety...") } else if (this.IsInstallStepFailed(BuilderInstallStep.SECURITY_CHECK)) { @T("The security audit could not be completed.") @if (!string.IsNullOrWhiteSpace(this.installFlowIssue)) { @string.Format(T("Issue: {0}"), this.installFlowIssue) } } else if (this.AuditCompleted) { @this.pluginAudit.Level.GetName(): @this.pluginAudit.Summary } else { @T("Start security audit") } @if (this.isEnablingPlugin) { @T("Enabling the assistant...") } else if (this.IsInstallStepFailed(BuilderInstallStep.ENABLE_ASSISTANT)) { @T("The assistant cannot be enabled.") @if (!string.IsNullOrWhiteSpace(this.installFlowIssue)) { @string.Format(T("Issue: {0}"), this.installFlowIssue) } } else if (this.EnableCompleted) { @T("The assistant is enabled.") } else { @if (this.RequiresActivationConfirmation) { @T("The security check is below your required level. Your settings allow activation after confirmation.") } @T("Enable assistant") } @if (this.CanOpenAssistant) { @T("Open assistant") } else { @T("Enable the assistant before opening it.") }
: null; private protected override RenderFragment AfterSubmitContent => @ ; }