namespace AIStudio.Tools.PluginSystem.Assistants; /// /// The plugin metadata a direct chat launcher carries beyond its chat settings. /// /// /// An installed launcher keeps these in its plugin.lua, and editing one carries them over. A /// launcher the Assistant Builder is about to create has no file yet, so its metadata comes from /// the Builder's defaults instead. Both paths end in the same writer, which is where the two meet. /// /// The plugin ID, which stays with the plugin for its whole life. /// The plugin version, as it appears in the Lua file. /// The authors of the plugin. /// Where users turn with questions about this plugin. /// Where the plugin comes from. /// The categories this plugin belongs to. /// The target groups this plugin is meant for. /// Whether the plugin is still maintained. /// What users are told when the plugin is deprecated. /// Whether the Assistant Builder created this plugin. public sealed record DirectChatLauncherPluginMetadata(Guid Id, string Version, IReadOnlyList Authors, string SupportContact, string SourceURL, IReadOnlyList Categories, IReadOnlyList TargetGroups, bool IsMaintained, string DeprecationMessage, bool IsAssistantBuilderGenerated) { /// /// Takes the metadata of an installed launcher for the case where one is edited. /// public static DirectChatLauncherPluginMetadata FromPlugin(PluginAssistants plugin) => new(plugin.Id, plugin.Version.ToString(), plugin.Authors, plugin.SupportContact, plugin.SourceURL, plugin.Categories, plugin.TargetGroups, plugin.IsMaintained, plugin.DeprecationMessage, plugin.IsAssistantBuilderGenerated); }