Added the plugin's path to the metadata

This commit is contained in:
Thorsten Sommer 2025-04-12 13:44:14 +02:00
parent f1dc717049
commit 6e8f9e5224
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
2 changed files with 8 additions and 2 deletions

View File

@ -107,7 +107,7 @@ public static partial class PluginFactory
} }
LOG.LogInformation($"Successfully loaded plugin: '{pluginMainFile}' (Id='{plugin.Id}', Type='{plugin.Type}', Name='{plugin.Name}', Version='{plugin.Version}', Authors='{string.Join(", ", plugin.Authors)}')"); LOG.LogInformation($"Successfully loaded plugin: '{pluginMainFile}' (Id='{plugin.Id}', Type='{plugin.Type}', Name='{plugin.Name}', Version='{plugin.Version}', Authors='{string.Join(", ", plugin.Authors)}')");
AVAILABLE_PLUGINS.Add(new PluginMetadata(plugin)); AVAILABLE_PLUGINS.Add(new PluginMetadata(plugin, pluginPath));
} }
} }

View File

@ -1,6 +1,6 @@
namespace AIStudio.Tools.PluginSystem; namespace AIStudio.Tools.PluginSystem;
public sealed class PluginMetadata(PluginBase plugin) : IPluginMetadata public sealed class PluginMetadata(PluginBase plugin, string localPath) : IAvailablePlugin
{ {
#region Implementation of IPluginMetadata #region Implementation of IPluginMetadata
@ -47,4 +47,10 @@ public sealed class PluginMetadata(PluginBase plugin) : IPluginMetadata
public bool IsInternal { get; } = plugin.IsInternal; public bool IsInternal { get; } = plugin.IsInternal;
#endregion #endregion
#region Implementation of IAvailablePlugin
public string LocalPath { get; } = localPath;
#endregion
} }