2025-07-21 13:10:40 +00:00
|
|
|
|
namespace AIStudio.Tools.PluginSystem.Assistants.DataModel;
|
2025-07-21 12:38:08 +00:00
|
|
|
|
|
2026-02-24 16:21:50 +00:00
|
|
|
|
internal sealed class AssistantButton : AssistantComponentBase
|
2025-07-21 12:38:08 +00:00
|
|
|
|
{
|
2026-02-24 10:39:17 +00:00
|
|
|
|
public override AssistantComponentType Type => AssistantComponentType.BUTTON;
|
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-07-21 12:38:08 +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-07-21 12:38:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
public string Text
|
|
|
|
|
|
{
|
2026-02-24 16:21:50 +00:00
|
|
|
|
get => AssistantComponentPropHelper.ReadString(this.Props, nameof(this.Text));
|
|
|
|
|
|
set => AssistantComponentPropHelper.WriteString(this.Props, nameof(this.Text), value);
|
2025-07-21 12:38:08 +00:00
|
|
|
|
}
|
2026-02-24 16:21:50 +00:00
|
|
|
|
|
2025-07-21 12:38:08 +00:00
|
|
|
|
public string Action
|
|
|
|
|
|
{
|
2026-02-24 16:21:50 +00:00
|
|
|
|
get => AssistantComponentPropHelper.ReadString(this.Props, nameof(this.Action));
|
|
|
|
|
|
set => AssistantComponentPropHelper.WriteString(this.Props, nameof(this.Action), value);
|
2025-07-21 12:38:08 +00:00
|
|
|
|
}
|
2026-02-24 16:21:50 +00:00
|
|
|
|
|
|
|
|
|
|
public string Class
|
|
|
|
|
|
{
|
|
|
|
|
|
get => AssistantComponentPropHelper.ReadString(this.Props, nameof(this.Class));
|
|
|
|
|
|
set => AssistantComponentPropHelper.WriteString(this.Props, nameof(this.Class), value);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string Style
|
|
|
|
|
|
{
|
|
|
|
|
|
get => AssistantComponentPropHelper.ReadString(this.Props, nameof(this.Style));
|
|
|
|
|
|
set => AssistantComponentPropHelper.WriteString(this.Props, nameof(this.Style), value);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|