Improved the assistants page with categories for assistant plugins (#1211)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-20 11:47:59 +01:00
1 parent ef059ffd15
commit 1db0f85898
74 files changed
+3392 -380

No files matched your search

@@ -12,7 +12,7 @@ namespace AIStudio.Assistants.Builder;
/// </remarks>
internal sealed class LauncherTextsResponse
{
public const string SCHEMA_VERSION_VALUE = "assistant_builder_launcher_texts_v1";
public const string SCHEMA_VERSION_VALUE = "assistant_builder_launcher_texts_v2";
/// <summary>
/// How the answer of the model is read.
@@ -48,6 +48,16 @@ internal sealed class LauncherTextsResponse
/// </summary>
public string Description { get; set; } = string.Empty;
/// <summary>
/// The keys of the categories, taken from the approved draft.
/// </summary>
public string[] Categories { get; set; } = [];
/// <summary>
/// The names of the custom categories, when the categories contain CUSTOM.
/// </summary>
public string[] CustomCategories { get; set; } = [];
public static bool TryParse(string modelResponse, out LauncherTextsResponse response, out LuaResponseParseError error, out string technicalDetails)
{
response = new();
@@ -93,6 +103,12 @@ internal sealed class LauncherTextsResponse
return false;
}
if (!AssistantBuilderCategories.TryRead(parsed.Categories, parsed.CustomCategories, out _, out _))
{
error = LuaResponseParseError.INVALID_CATEGORIES;
return false;
}
response = parsed;
return true;
}