Skip to content

Commit 864bda1

Browse files
Fixed #546: made Lua tables for config objects optional (#554)
1 parent 73b2f1f commit 864bda1

File tree

5 files changed

+3
-28
lines changed

5 files changed

+3
-28
lines changed

app/MindWork AI Studio/Assistants/I18N/allTexts.lua

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5509,15 +5509,9 @@ UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::PLUGINCATEGORYEXTENSIONS::T91464
55095509
-- The SETTINGS table does not exist or is not a valid table.
55105510
UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::PLUGINCONFIGURATION::T1148682011"] = "The SETTINGS table does not exist or is not a valid table."
55115511

5512-
-- At least one configured LLM provider is not valid or could not be parsed, or the LLM_PROVIDERS table does not exist.
5513-
UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::PLUGINCONFIGURATION::T3262676428"] = "At least one configured LLM provider is not valid or could not be parsed, or the LLM_PROVIDERS table does not exist."
5514-
55155512
-- The CONFIG table does not exist or is not a valid table.
55165513
UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::PLUGINCONFIGURATION::T3331620576"] = "The CONFIG table does not exist or is not a valid table."
55175514

5518-
-- At least one configured chat template is not valid or could not be parsed, or the CHAT_TEMPLATES table does not exist.
5519-
UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::PLUGINCONFIGURATION::T445358428"] = "At least one configured chat template is not valid or could not be parsed, or the CHAT_TEMPLATES table does not exist."
5520-
55215515
-- The field IETF_TAG does not exist or is not a valid string.
55225516
UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::PLUGINLANGUAGE::T1796010240"] = "The field IETF_TAG does not exist or is not a valid string."
55235517

app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5511,15 +5511,9 @@ UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::PLUGINCATEGORYEXTENSIONS::T91464
55115511
-- The SETTINGS table does not exist or is not a valid table.
55125512
UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::PLUGINCONFIGURATION::T1148682011"] = "Die Tabelle SETTINGS existiert nicht oder ist keine gültige Tabelle."
55135513

5514-
-- At least one configured LLM provider is not valid or could not be parsed, or the LLM_PROVIDERS table does not exist.
5515-
UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::PLUGINCONFIGURATION::T3262676428"] = "Mindestens ein konfigurierter LLM-Anbieter ist ungültig oder konnte nicht verarbeitet werden, oder die Tabelle LLM_PROVIDERS existiert nicht."
5516-
55175514
-- The CONFIG table does not exist or is not a valid table.
55185515
UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::PLUGINCONFIGURATION::T3331620576"] = "Die Tabelle CONFIG existiert nicht oder ist keine gültige Tabelle."
55195516

5520-
-- At least one configured chat template is not valid or could not be parsed, or the CHAT_TEMPLATES table does not exist.
5521-
UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::PLUGINCONFIGURATION::T445358428"] = "Mindestens eine konfigurierte Chat-Vorlage ist ungültig oder konnte nicht verarbeitet werden, oder die Tabelle CHAT_TEMPLATES existiert nicht."
5522-
55235517
-- The field IETF_TAG does not exist or is not a valid string.
55245518
UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::PLUGINLANGUAGE::T1796010240"] = "Das Feld IETF_TAG existiert nicht oder ist keine gültige Zeichenkette."
55255519

app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5511,15 +5511,9 @@ UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::PLUGINCATEGORYEXTENSIONS::T91464
55115511
-- The SETTINGS table does not exist or is not a valid table.
55125512
UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::PLUGINCONFIGURATION::T1148682011"] = "The SETTINGS table does not exist or is not a valid table."
55135513

5514-
-- At least one configured LLM provider is not valid or could not be parsed, or the LLM_PROVIDERS table does not exist.
5515-
UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::PLUGINCONFIGURATION::T3262676428"] = "At least one configured LLM provider is not valid or could not be parsed, or the LLM_PROVIDERS table does not exist."
5516-
55175514
-- The CONFIG table does not exist or is not a valid table.
55185515
UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::PLUGINCONFIGURATION::T3331620576"] = "The CONFIG table does not exist or is not a valid table."
55195516

5520-
-- At least one configured chat template is not valid or could not be parsed, or the CHAT_TEMPLATES table does not exist.
5521-
UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::PLUGINCONFIGURATION::T445358428"] = "At least one configured chat template is not valid or could not be parsed, or the CHAT_TEMPLATES table does not exist."
5522-
55235517
-- The field IETF_TAG does not exist or is not a valid string.
55245518
UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::PLUGINLANGUAGE::T1796010240"] = "The field IETF_TAG does not exist or is not a valid string."
55255519

app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,10 @@ private bool TryProcessConfiguration(bool dryRun, out string message)
6262
ManagedConfiguration.TryProcessConfiguration(x => x.App, x => x.AllowUserToAddProvider, this.Id, settingsTable, dryRun);
6363

6464
// Handle configured LLM providers:
65-
if (!PluginConfigurationObject.TryParse(PluginConfigurationObjectType.LLM_PROVIDER, x => x.Providers, x => x.NextProviderNum, mainTable, this.Id, ref this.configObjects, dryRun))
66-
{
67-
message = TB("At least one configured LLM provider is not valid or could not be parsed, or the LLM_PROVIDERS table does not exist.");
68-
return false;
69-
}
65+
PluginConfigurationObject.TryParse(PluginConfigurationObjectType.LLM_PROVIDER, x => x.Providers, x => x.NextProviderNum, mainTable, this.Id, ref this.configObjects, dryRun);
7066

7167
// Handle configured chat templates:
72-
if (!PluginConfigurationObject.TryParse(PluginConfigurationObjectType.CHAT_TEMPLATE, x => x.ChatTemplates, x => x.NextChatTemplateNum, mainTable, this.Id, ref this.configObjects, dryRun))
73-
{
74-
message = TB("At least one configured chat template is not valid or could not be parsed, or the CHAT_TEMPLATES table does not exist.");
75-
return false;
76-
}
68+
PluginConfigurationObject.TryParse(PluginConfigurationObjectType.CHAT_TEMPLATE, x => x.ChatTemplates, x => x.NextChatTemplateNum, mainTable, this.Id, ref this.configObjects, dryRun);
7769

7870
message = string.Empty;
7971
return true;

app/MindWork AI Studio/wwwroot/changelog/v0.9.51.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- Improved the text summarizer assistant by allowing users to specify important aspects & optimized the generated prompt.
1414
- Improved the OpenAI provider by supporting more models and capabilities.
1515
- Improved the German translation.
16+
- Improved the enterprise configuration of complex objects, such as chat templates: the corresponding Lua tables are now optional. This ensures existing enterprise configurations remain valid when new configuration options are added and don't require adjustments with every update.
1617
- Changed the configuration plugin setting name for how often to check for updates from `UpdateBehavior` to `UpdateInterval`.
1718
- Fixed a bug in various assistants where some text fields were not reset when resetting.
1819
- Fixed the input field header in the dialog for naming chats and workspaces.

0 commit comments

Comments
 (0)