2025-07-22 18:15:36 +00:00
|
|
|
|
namespace AIStudio.Tools.PluginSystem.Assistants.DataModel;
|
|
|
|
|
|
|
|
|
|
|
|
public static class ComponentPropSpecs
|
|
|
|
|
|
{
|
|
|
|
|
|
public static readonly IReadOnlyDictionary<AssistantUiCompontentType, PropSpec> SPECS =
|
|
|
|
|
|
new Dictionary<AssistantUiCompontentType, PropSpec>
|
|
|
|
|
|
{
|
|
|
|
|
|
[AssistantUiCompontentType.FORM] = new(
|
|
|
|
|
|
required: ["Children"],
|
|
|
|
|
|
optional: []
|
|
|
|
|
|
),
|
|
|
|
|
|
[AssistantUiCompontentType.TEXT_AREA] = new(
|
|
|
|
|
|
required: ["Name", "Label"],
|
2025-11-11 13:51:34 +00:00
|
|
|
|
optional: ["UserPrompt", "PrefillText", "ReadOnly", "IsSingleLine"]
|
2025-07-22 18:15:36 +00:00
|
|
|
|
),
|
|
|
|
|
|
[AssistantUiCompontentType.BUTTON] = new(
|
|
|
|
|
|
required: ["Name", "Text", "Action"],
|
|
|
|
|
|
optional: []
|
|
|
|
|
|
),
|
|
|
|
|
|
[AssistantUiCompontentType.DROPDOWN] = new(
|
|
|
|
|
|
required: ["Name", "Label", "Default", "Items"],
|
2025-11-11 14:57:15 +00:00
|
|
|
|
optional: ["UserPrompt"]
|
2025-07-22 18:15:36 +00:00
|
|
|
|
),
|
|
|
|
|
|
[AssistantUiCompontentType.PROVIDER_SELECTION] = new(
|
|
|
|
|
|
required: ["Name", "Label"],
|
|
|
|
|
|
optional: []
|
|
|
|
|
|
),
|
2025-11-11 18:06:44 +00:00
|
|
|
|
[AssistantUiCompontentType.SWITCH] = new(
|
|
|
|
|
|
required: ["Name", "Label", "LabelOn", "LabelOff", "Value"],
|
|
|
|
|
|
optional: ["UserPrompt"]
|
|
|
|
|
|
),
|
2026-02-10 15:12:59 +00:00
|
|
|
|
[AssistantUiCompontentType.HEADING] = new(
|
|
|
|
|
|
required: ["Text", "Level"],
|
|
|
|
|
|
optional: []
|
|
|
|
|
|
),
|
|
|
|
|
|
[AssistantUiCompontentType.TEXT] = new(
|
|
|
|
|
|
required: ["Content"],
|
|
|
|
|
|
optional: []
|
|
|
|
|
|
),
|
2025-07-22 18:15:36 +00:00
|
|
|
|
};
|
|
|
|
|
|
}
|