mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-12-03 13:22:01 +00:00
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
32 lines
997 B
C#
32 lines
997 B
C#
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace AIStudio.Components;
|
|
|
|
/// <summary>
|
|
/// The button next to the settings of an assistant, which switches to another of the modes it offers, e.g., from
|
|
/// translating a document to translating a text.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Every assistant with modes shows the same icon here, so that users recognize the button; its tooltip names
|
|
/// where it leads.
|
|
/// </remarks>
|
|
public partial class AssistantModeSwitch : ComponentBase
|
|
{
|
|
/// <summary>
|
|
/// The tooltip of the button, e.g., "Switch to text translation".
|
|
/// </summary>
|
|
[Parameter, EditorRequired]
|
|
public string Tooltip { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Whether the button is disabled, e.g., while the assistant works.
|
|
/// </summary>
|
|
[Parameter]
|
|
public bool Disabled { get; set; }
|
|
|
|
/// <summary>
|
|
/// Called when the user clicks the button.
|
|
/// </summary>
|
|
[Parameter]
|
|
public EventCallback OnSwitch { get; set; }
|
|
} |