mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-02-14 01:01:38 +00:00
Spelling & documentation
This commit is contained in:
parent
458096a743
commit
6faa488699
@ -3,7 +3,7 @@ require("icon")
|
|||||||
-- ------
|
-- ------
|
||||||
-- This is an example of a configuration plugin. Please replace
|
-- This is an example of a configuration plugin. Please replace
|
||||||
-- the placeholders and assign a valid ID.
|
-- the placeholders and assign a valid ID.
|
||||||
-- IDs should be lower-case.
|
-- All IDs should be lower-case.
|
||||||
-- ------
|
-- ------
|
||||||
|
|
||||||
-- The ID for this plugin:
|
-- The ID for this plugin:
|
||||||
@ -98,7 +98,7 @@ CONFIG["SETTINGS"] = {}
|
|||||||
|
|
||||||
-- Configure the preselected profile.
|
-- Configure the preselected profile.
|
||||||
-- It must be one of the profile IDs defined in CONFIG["PROFILES"].
|
-- It must be one of the profile IDs defined in CONFIG["PROFILES"].
|
||||||
-- Using an empty string ("") will lock the preselected profile selection, even though no valid preselected profile is found.
|
-- Please note: using an empty string ("") will lock the preselected profile selection, even though no valid preselected profile is found.
|
||||||
-- CONFIG["SETTINGS"]["DataApp.PreselectedProfile"] = "00000000-0000-0000-0000-000000000000"
|
-- CONFIG["SETTINGS"]["DataApp.PreselectedProfile"] = "00000000-0000-0000-0000-000000000000"
|
||||||
|
|
||||||
-- Example chat templates for this configuration:
|
-- Example chat templates for this configuration:
|
||||||
|
|||||||
@ -167,19 +167,19 @@ public static partial class ManagedConfiguration
|
|||||||
/// Furthermore, it locks the managed state of the configuration metadata to the provided configuration plugin ID.
|
/// Furthermore, it locks the managed state of the configuration metadata to the provided configuration plugin ID.
|
||||||
/// The setting's value is set to the configured value.
|
/// The setting's value is set to the configured value.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="type">Parameter type of the configuration entry.</param>
|
/// <param name="configuredType">Parameter type of the configuration entry.</param>
|
||||||
/// <param name="configPluginId">The ID of the related configuration plugin.</param>
|
/// <param name="configPluginId">The ID of the related configuration plugin.</param>
|
||||||
/// <param name="settings">The Lua table containing the settings to process.</param>
|
/// <param name="settings">The Lua table containing the settings to process.</param>
|
||||||
/// <param name="configSelection">The expression to select the configuration class.</param>
|
/// <param name="configSelection">The expression to select the configuration class.</param>
|
||||||
/// <param name="propertyExpression">The expression to select the property within the configuration class.</param>
|
/// <param name="propertyExpression">The expression to select the property within the configuration class.</param>
|
||||||
/// <param name="dryRun">When true, the method will not apply any changes, but only check if the configuration can be read.</param>
|
/// <param name="dryRun">When true, the method will not apply any changes, but only check if the configuration can be read.</param>
|
||||||
/// <typeparam name="TClass">The type of the configuration class.</typeparam>
|
/// <typeparam name="TClass">The type of the configuration class.</typeparam>
|
||||||
/// <typeparam name="TDataType">The data type of the configuration.</typeparam>
|
/// <typeparam name="TDataType">The data type of the configured value.</typeparam>
|
||||||
/// <returns>True when the configuration was successfully processed, otherwise false.</returns>
|
/// <returns>True when the configuration was successfully processed, otherwise false.</returns>
|
||||||
public static bool TryProcessConfiguration<TClass, TDataType>(
|
public static bool TryProcessConfiguration<TClass, TDataType>(
|
||||||
Expression<Func<Data, TClass>> configSelection,
|
Expression<Func<Data, TClass>> configSelection,
|
||||||
Expression<Func<TClass, string>> propertyExpression,
|
Expression<Func<TClass, string>> propertyExpression,
|
||||||
TDataType type,
|
TDataType configuredType,
|
||||||
Guid configPluginId,
|
Guid configPluginId,
|
||||||
LuaTable settings,
|
LuaTable settings,
|
||||||
bool dryRun)
|
bool dryRun)
|
||||||
@ -201,12 +201,15 @@ public static partial class ManagedConfiguration
|
|||||||
// Step 2 -- try to read the Lua value as a string:
|
// Step 2 -- try to read the Lua value as a string:
|
||||||
if(configuredTextValue.TryRead<string>(out var configuredText))
|
if(configuredTextValue.TryRead<string>(out var configuredText))
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (configuredType)
|
||||||
{
|
{
|
||||||
|
// Case: the read string is a Guid:
|
||||||
case Guid:
|
case Guid:
|
||||||
successful = Guid.TryParse(configuredText, out var id);
|
successful = Guid.TryParse(configuredText, out var id);
|
||||||
configuredValue = successful ? id.ToString().ToLowerInvariant(): configuredText;
|
configuredValue = successful ? id.ToString().ToLowerInvariant(): configuredText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Case: the read string is just a string:
|
||||||
case string:
|
case string:
|
||||||
configuredValue = configuredText;
|
configuredValue = configuredText;
|
||||||
successful = true;
|
successful = true;
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
# v0.9.55, build 230 (2025-12-xx xx:xx UTC)
|
# v0.9.55, build 230 (2025-12-xx xx:xx UTC)
|
||||||
- Improved the ID handling in the enterprise plugin.
|
- Improved the ID handling for configuration plugins.
|
||||||
Loading…
Reference in New Issue
Block a user