mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-14 09:13:48 +00:00
Added detailed plugin information to the plugins page (#1013)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
b371b3d54f
commit
f912af321f
26 files changed
+884
-95
No files matched your search
+12
-1
@@ -69,11 +69,15 @@ public static class DirectChatLauncherLuaWriter
|
||||
/// <summary>
|
||||
/// Writes the complete plugin.lua for an installed launcher whose settings changed.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// All metadata is carried over except the time of the last change: changing the settings
|
||||
/// changes the plugin, so that time becomes now.
|
||||
/// </remarks>
|
||||
/// <param name="plugin">The installed launcher whose metadata is carried over.</param>
|
||||
/// <param name="definition">The name, title, description, and chat settings the user chose.</param>
|
||||
/// <returns>The plugin.lua content, ready to be validated and written.</returns>
|
||||
public static string Write(PluginAssistants plugin, DirectChatLauncherDefinition definition) =>
|
||||
Write(DirectChatLauncherPluginMetadata.FromPlugin(plugin), definition);
|
||||
Write(DirectChatLauncherPluginMetadata.FromPlugin(plugin) with { LastChanged = DateTimeOffset.UtcNow }, definition);
|
||||
|
||||
/// <summary>
|
||||
/// Writes the complete plugin.lua for a launcher.
|
||||
@@ -114,6 +118,13 @@ public static class DirectChatLauncherLuaWriter
|
||||
builder.AppendLine($"VERSION = \"{plugin.Version}\"");
|
||||
builder.AppendLine();
|
||||
|
||||
if (plugin.LastChanged is { } lastChanged)
|
||||
{
|
||||
builder.AppendLine("-- When this plugin was last changed, in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ. Optional.");
|
||||
builder.AppendLine($"LAST_CHANGED = \"{PluginBase.FormatLastChanged(lastChanged)}\"");
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
builder.AppendLine("-- The type of the plugin:");
|
||||
builder.AppendLine($"TYPE = \"{nameof(PluginType.ASSISTANT)}\"");
|
||||
builder.AppendLine();
|
||||
|
||||
Reference in new issue
Block a user