2026-02-24 16:21:50 +00:00
|
|
|
namespace AIStudio.Tools.PluginSystem.Assistants.DataModel;
|
|
|
|
|
|
|
|
|
|
internal sealed class AssistantSwitch : AssistantComponentBase
|
2025-11-11 18:06:44 +00:00
|
|
|
{
|
2026-02-24 10:39:17 +00:00
|
|
|
public override AssistantComponentType Type => AssistantComponentType.SWITCH;
|
2026-03-03 14:44:31 +00:00
|
|
|
public override Dictionary<string, object> Props { get; set; } = new();
|
|
|
|
|
public override List<IAssistantComponent> Children { get; set; } = new();
|
2025-11-11 18:06:44 +00:00
|
|
|
|
|
|
|
|
public string Name
|
|
|
|
|
{
|
2026-02-24 16:21:50 +00:00
|
|
|
get => AssistantComponentPropHelper.ReadString(this.Props, nameof(this.Name));
|
|
|
|
|
set => AssistantComponentPropHelper.WriteString(this.Props, nameof(this.Name), value);
|
2025-11-11 18:06:44 +00:00
|
|
|
}
|
2026-02-24 16:21:50 +00:00
|
|
|
|
2025-11-11 18:06:44 +00:00
|
|
|
public string Label
|
|
|
|
|
{
|
2026-02-24 16:21:50 +00:00
|
|
|
get => AssistantComponentPropHelper.ReadString(this.Props, nameof(this.Label));
|
|
|
|
|
set => AssistantComponentPropHelper.WriteString(this.Props, nameof(this.Label), value);
|
2025-11-11 18:06:44 +00:00
|
|
|
}
|
2026-02-24 16:21:50 +00:00
|
|
|
|
2025-11-11 18:06:44 +00:00
|
|
|
public bool Value
|
|
|
|
|
{
|
2026-03-09 17:56:38 +00:00
|
|
|
get => AssistantComponentPropHelper.ReadBool(this.Props, nameof(this.Value), false);
|
|
|
|
|
set => AssistantComponentPropHelper.WriteBool(this.Props, nameof(this.Value), value);
|
2025-11-11 18:06:44 +00:00
|
|
|
}
|
2026-02-24 16:21:50 +00:00
|
|
|
|
2025-11-11 18:06:44 +00:00
|
|
|
public string UserPrompt
|
|
|
|
|
{
|
2026-02-24 16:21:50 +00:00
|
|
|
get => AssistantComponentPropHelper.ReadString(this.Props, nameof(this.UserPrompt));
|
|
|
|
|
set => AssistantComponentPropHelper.WriteString(this.Props, nameof(this.UserPrompt), value);
|
2025-11-11 18:06:44 +00:00
|
|
|
}
|
2026-02-24 16:21:50 +00:00
|
|
|
|
2025-11-11 18:06:44 +00:00
|
|
|
public string LabelOn
|
|
|
|
|
{
|
2026-02-24 16:21:50 +00:00
|
|
|
get => AssistantComponentPropHelper.ReadString(this.Props, nameof(this.LabelOn));
|
|
|
|
|
set => AssistantComponentPropHelper.WriteString(this.Props, nameof(this.LabelOn), value);
|
2025-11-11 18:06:44 +00:00
|
|
|
}
|
2026-02-24 16:21:50 +00:00
|
|
|
|
2025-11-11 18:06:44 +00:00
|
|
|
public string LabelOff
|
|
|
|
|
{
|
2026-02-24 16:21:50 +00:00
|
|
|
get => AssistantComponentPropHelper.ReadString(this.Props, nameof(this.LabelOff));
|
|
|
|
|
set => AssistantComponentPropHelper.WriteString(this.Props, nameof(this.LabelOff), value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|