From 8d646ce7705bf814f9769bac0eba5153b9aefa91 Mon Sep 17 00:00:00 2001 From: Jeppe B <2jepp9350@gmail.com> Date: Sun, 9 Aug 2026 19:26:05 +0200 Subject: [PATCH] feat(pleno-vue): MiniMax M3 settings UI in superuser XL Vask module (#269) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the MiniMax (M3) configuration surface inside `ConfigurationXLVask.vue`. **What ships** - `SessionUser.modules.minimax` mirrors the OpenAI pattern (`config.get_all`, `config.keys.api_key`, `config.enabled`). - Two new sections inside `ConfigurationXLVask.vue`: - Switch: **Use MiniMax M3 for autopilot suggestions** (toggles `minimax_integration_enabled` on xlvask). - **MiniMax M3 (AI planner)** category with: - Enable MiniMax switch - API key field (uses `ConfigurationSecretKey`) - **Re-authenticate** button (password prompt → set new key) - **Remove** button (clears the stored key, with confirm dialog) - All status feedback uses `Swal` with busy-state guards. **i18n** 26 new keys added to `configuration.xlvask.minimax_*` in all 5 locales (da/de/en/no/sv). English source, to be translated by the language owners later. **Backend counterpart** `api#355` adds `modules/miniMax` config, the `classes/minimax.php` Anthropic-messages client, and forces the xlvask autopilot planner to use `MiniMax-M3` instead of `gpt-5.6-sol`. **Workflow (per jeppe)** Once this PR + api#355 are merged to master, operator (jeppe) enters the MiniMax API key in the new XL Vask settings UI; agent then optimizes + tests + debugs live XL Vask usage logs against the new model. --------- Co-authored-by: Truck Wash Agent --- .../superUser/modules/miniMax/Config.vue | 47 ++++++ .../superUser/modules/miniMax/MiniMax.vue | 22 +++ .../session/token/superUserObject.vue | 4 + src/i18n/generated/da-v2.json | 28 +++- src/i18n/generated/de-v2.json | 28 +++- src/i18n/generated/en-v2.json | 28 +++- src/i18n/generated/no-v2.json | 28 +++- src/i18n/generated/sv-v2.json | 28 +++- .../phrases/compat/configuration/index.json | 28 +++- .../phrases/compat/configuration/index.json | 28 +++- .../phrases/compat/configuration/index.json | 28 +++- .../phrases/compat/configuration/index.json | 28 +++- .../phrases/compat/configuration/index.json | 28 +++- .../configuration/ConfigurationXLVask.vue | 136 ++++++++++++++++++ 14 files changed, 479 insertions(+), 10 deletions(-) create mode 100644 src/components/session/token/superUser/modules/miniMax/Config.vue create mode 100644 src/components/session/token/superUser/modules/miniMax/MiniMax.vue diff --git a/src/components/session/token/superUser/modules/miniMax/Config.vue b/src/components/session/token/superUser/modules/miniMax/Config.vue new file mode 100644 index 00000000..a0b9a796 --- /dev/null +++ b/src/components/session/token/superUser/modules/miniMax/Config.vue @@ -0,0 +1,47 @@ + diff --git a/src/components/session/token/superUser/modules/miniMax/MiniMax.vue b/src/components/session/token/superUser/modules/miniMax/MiniMax.vue new file mode 100644 index 00000000..60050209 --- /dev/null +++ b/src/components/session/token/superUser/modules/miniMax/MiniMax.vue @@ -0,0 +1,22 @@ + diff --git a/src/components/session/token/superUserObject.vue b/src/components/session/token/superUserObject.vue index be135a8b..cbc2b5a3 100644 --- a/src/components/session/token/superUserObject.vue +++ b/src/components/session/token/superUserObject.vue @@ -23,6 +23,7 @@ import { Entra } from "@/components/session/token/superUser/modules/entra/Entra. import { Limble } from "@/components/session/token/superUser/modules/limble/Limble.vue"; import { OcrSpace } from "@/components/session/token/superUser/modules/ocrSpace/OcrSpace.vue"; import { OpenAI } from "@/components/session/token/superUser/modules/openAI/OpenAI.vue"; +import { MiniMax } from "@/components/session/token/superUser/modules/miniMax/MiniMax.vue"; import { LicensePlateRecognizer } from "@/components/session/token/superUser/modules/licensePlateRecognizer/LicensePlateRecognizer.vue"; import { VirkData } from "@/components/session/token/superUser/modules/virkdata/VirkData.vue"; import { Shelly } from "@/components/session/token/superUser/modules/shelly/Shelly.vue"; @@ -105,6 +106,9 @@ export const SuperUserObject = { get openai() { return OpenAI; }, + get minimax() { + return MiniMax; + }, get licenseplaterecognizer() { return LicensePlateRecognizer; }, diff --git a/src/i18n/generated/da-v2.json b/src/i18n/generated/da-v2.json index 030f39dc..e90864f9 100644 --- a/src/i18n/generated/da-v2.json +++ b/src/i18n/generated/da-v2.json @@ -2911,7 +2911,33 @@ "password_desc": "@.capitalize:{'words.generated.adgangskoden'} @:{'words.generated.bruges'} @:{'words.generated.til'} @:{'words.generated.at'} @:{'words.generated.autentificere'} @:{'words.generated.api'} @:{'words.generated.forbindelsen'}.", "subtitle": "@.capitalize:{'words.generated.konfiguration'} @:{'words.generated.af'} @:{'words.generated.xlvask'} @:{'words.generated.integrationen'}", "title": "@:{'words.generated.xlvask'} @:{'words.generated.konfiguration'}", - "username_desc": "@.capitalize:{'words.generated.brugernavnet'} @:{'words.generated.bruges'} @:{'words.generated.til'} @:{'words.generated.at'} @:{'words.generated.autentificere'} @:{'words.generated.api'} @:{'words.generated.forbindelsen'}." + "username_desc": "@.capitalize:{'words.generated.brugernavnet'} @:{'words.generated.bruges'} @:{'words.generated.til'} @:{'words.generated.at'} @:{'words.generated.autentificere'} @:{'words.generated.api'} @:{'words.generated.forbindelsen'}.", + "minimax_settings": "MiniMax M3 (AI planner)", + "minimax_settings_desc": "Configure the MiniMax M3 integration that powers the XL Vask autopilot planner.", + "enable_minimax_integration": "Use MiniMax M3 for autopilot suggestions", + "enable_minimax_integration_desc": "Force the XL Vask autopilot to use MiniMax M3 (replaces OpenAI for AI suggestions).", + "minimax_enable": "Enable MiniMax", + "minimax_enable_desc": "Activate the MiniMax integration used by the XL Vask autopilot and other AI features.", + "minimax_api_key": "MiniMax API key", + "minimax_api_key_desc": "The secret key for MiniMax. Obtain it from the MiniMax Portal; rotate or remove it from this page.", + "minimax_api_key_placeholder": "Paste your MiniMax API key", + "minimax_api_key_required": "An API key is required.", + "minimax_reauthenticate": "Re-authenticate", + "minimax_reauth_title": "Re-authenticate MiniMax", + "minimax_reauth_desc": "Paste a new MiniMax API key. This replaces the stored key.", + "minimax_reauth_confirm": "Save key", + "minimax_reauth_in_progress": "Saving…", + "minimax_reauth_success": "MiniMax key saved", + "minimax_reauth_success_desc": "The XL Vask autopilot will use the new key on its next call.", + "minimax_reauth_failed": "Could not save MiniMax key", + "minimax_remove": "Remove", + "minimax_remove_title": "Remove MiniMax key", + "minimax_remove_desc": "Clear the stored MiniMax API key. The autopilot will stop using MiniMax until a new key is provided.", + "minimax_remove_confirm": "Yes, remove", + "minimax_remove_in_progress": "Removing…", + "minimax_remove_success": "MiniMax key removed", + "minimax_remove_success_desc": "The autopilot is now forced off until a new key is configured.", + "minimax_remove_failed": "Could not remove MiniMax key" }, "release_manager": { "integrations": { diff --git a/src/i18n/generated/de-v2.json b/src/i18n/generated/de-v2.json index e1e5cd95..33a88584 100644 --- a/src/i18n/generated/de-v2.json +++ b/src/i18n/generated/de-v2.json @@ -3021,7 +3021,33 @@ "password_desc": "@.capitalize:{'words.generated.das'} @:{'words.generated.passwort'} @:{'words.generated.wird'} @:{'words.generated.zur'} @:{'words.generated.authentifizierung'} @:{'words.generated.der'} @:{'words.generated.api'}-@:{'words.generated.verbindung'} @:{'words.generated.verwendet'}.", "subtitle": "@:{'words.generated.konfiguration'} @:{'words.generated.der'} @:{'words.generated.xlvask'}-@.capitalize:{'words.generated.integration'}", "title": "@:{'words.generated.xlvask'}-@:{'words.generated.konfiguration'}", - "username_desc": "@.capitalize:{'words.generated.der'} @:{'words.generated.benutzername'} @:{'words.generated.wird'} @:{'words.generated.zur'} @:{'words.generated.authentifizierung'} @:{'words.generated.der'} @:{'words.generated.api'}-@:{'words.generated.verbindung'} @:{'words.generated.verwendet'}." + "username_desc": "@.capitalize:{'words.generated.der'} @:{'words.generated.benutzername'} @:{'words.generated.wird'} @:{'words.generated.zur'} @:{'words.generated.authentifizierung'} @:{'words.generated.der'} @:{'words.generated.api'}-@:{'words.generated.verbindung'} @:{'words.generated.verwendet'}.", + "minimax_settings": "MiniMax M3 (AI planner)", + "minimax_settings_desc": "Configure the MiniMax M3 integration that powers the XL Vask autopilot planner.", + "enable_minimax_integration": "Use MiniMax M3 for autopilot suggestions", + "enable_minimax_integration_desc": "Force the XL Vask autopilot to use MiniMax M3 (replaces OpenAI for AI suggestions).", + "minimax_enable": "Enable MiniMax", + "minimax_enable_desc": "Activate the MiniMax integration used by the XL Vask autopilot and other AI features.", + "minimax_api_key": "MiniMax API key", + "minimax_api_key_desc": "The secret key for MiniMax. Obtain it from the MiniMax Portal; rotate or remove it from this page.", + "minimax_api_key_placeholder": "Paste your MiniMax API key", + "minimax_api_key_required": "An API key is required.", + "minimax_reauthenticate": "Re-authenticate", + "minimax_reauth_title": "Re-authenticate MiniMax", + "minimax_reauth_desc": "Paste a new MiniMax API key. This replaces the stored key.", + "minimax_reauth_confirm": "Save key", + "minimax_reauth_in_progress": "Saving…", + "minimax_reauth_success": "MiniMax key saved", + "minimax_reauth_success_desc": "The XL Vask autopilot will use the new key on its next call.", + "minimax_reauth_failed": "Could not save MiniMax key", + "minimax_remove": "Remove", + "minimax_remove_title": "Remove MiniMax key", + "minimax_remove_desc": "Clear the stored MiniMax API key. The autopilot will stop using MiniMax until a new key is provided.", + "minimax_remove_confirm": "Yes, remove", + "minimax_remove_in_progress": "Removing…", + "minimax_remove_success": "MiniMax key removed", + "minimax_remove_success_desc": "The autopilot is now forced off until a new key is configured.", + "minimax_remove_failed": "Could not remove MiniMax key" }, "release_manager": { "integrations": { diff --git a/src/i18n/generated/en-v2.json b/src/i18n/generated/en-v2.json index ab9f4ae5..7cee5b3a 100644 --- a/src/i18n/generated/en-v2.json +++ b/src/i18n/generated/en-v2.json @@ -2742,7 +2742,33 @@ "password_desc": "@.capitalize:{'words.replication.article.host_mention'} @:{'words.generated.password'} @:{'words.generated.is'} @:{'words.generated.used'} @:{'words.generated.to'} @:{'words.generated.authenticate'} @:{'words.replication.article.host_mention'} @:{'words.generated.api'} @:{'words.generated.connection'}.", "subtitle": "@.capitalize:{'words.generated.configuration'} @:{'words.generated.of'} @:{'words.replication.article.host_mention'} @:{'words.generated.xlvask'} @:{'words.generated.integration'}", "title": "@:{'words.generated.xlvask'} @:{'words.generated.configuration'}", - "username_desc": "@.capitalize:{'words.replication.article.host_mention'} @:{'words.generated.username'} @:{'words.generated.is'} @:{'words.generated.used'} @:{'words.generated.to'} @:{'words.generated.authenticate'} @:{'words.replication.article.host_mention'} @:{'words.generated.api'} @:{'words.generated.connection'}." + "username_desc": "@.capitalize:{'words.replication.article.host_mention'} @:{'words.generated.username'} @:{'words.generated.is'} @:{'words.generated.used'} @:{'words.generated.to'} @:{'words.generated.authenticate'} @:{'words.replication.article.host_mention'} @:{'words.generated.api'} @:{'words.generated.connection'}.", + "minimax_settings": "MiniMax M3 (AI planner)", + "minimax_settings_desc": "Configure the MiniMax M3 integration that powers the XL Vask autopilot planner.", + "enable_minimax_integration": "Use MiniMax M3 for autopilot suggestions", + "enable_minimax_integration_desc": "Force the XL Vask autopilot to use MiniMax M3 (replaces OpenAI for AI suggestions).", + "minimax_enable": "Enable MiniMax", + "minimax_enable_desc": "Activate the MiniMax integration used by the XL Vask autopilot and other AI features.", + "minimax_api_key": "MiniMax API key", + "minimax_api_key_desc": "The secret key for MiniMax. Obtain it from the MiniMax Portal; rotate or remove it from this page.", + "minimax_api_key_placeholder": "Paste your MiniMax API key", + "minimax_api_key_required": "An API key is required.", + "minimax_reauthenticate": "Re-authenticate", + "minimax_reauth_title": "Re-authenticate MiniMax", + "minimax_reauth_desc": "Paste a new MiniMax API key. This replaces the stored key.", + "minimax_reauth_confirm": "Save key", + "minimax_reauth_in_progress": "Saving…", + "minimax_reauth_success": "MiniMax key saved", + "minimax_reauth_success_desc": "The XL Vask autopilot will use the new key on its next call.", + "minimax_reauth_failed": "Could not save MiniMax key", + "minimax_remove": "Remove", + "minimax_remove_title": "Remove MiniMax key", + "minimax_remove_desc": "Clear the stored MiniMax API key. The autopilot will stop using MiniMax until a new key is provided.", + "minimax_remove_confirm": "Yes, remove", + "minimax_remove_in_progress": "Removing…", + "minimax_remove_success": "MiniMax key removed", + "minimax_remove_success_desc": "The autopilot is now forced off until a new key is configured.", + "minimax_remove_failed": "Could not remove MiniMax key" }, "release_manager": { "integrations": { diff --git a/src/i18n/generated/no-v2.json b/src/i18n/generated/no-v2.json index a0898b15..1164f142 100644 --- a/src/i18n/generated/no-v2.json +++ b/src/i18n/generated/no-v2.json @@ -3024,7 +3024,33 @@ "password_desc": "@.capitalize:{'words.generated.passordet'} @:{'words.generated.brukes'} @:{'words.generated.til'} @:{'words.generated.a'} @:{'words.generated.autentisere'} @:{'words.generated.api'}-@:{'words.generated.tilkoblingen'}.", "subtitle": "@.capitalize:{'words.generated.konfigurasjon'} @:{'words.generated.av'} @:{'words.generated.xlvask'}-@:{'words.generated.integrasjonen'}", "title": "@:{'words.generated.xlvask'}-@:{'words.generated.konfigurasjon'}", - "username_desc": "@:{'words.generated.brukernavnet'} @:{'words.generated.brukes'} @:{'words.generated.til'} @:{'words.generated.a'} @:{'words.generated.autentisere'} @:{'words.generated.api'}-@:{'words.generated.tilkoblingen'}." + "username_desc": "@:{'words.generated.brukernavnet'} @:{'words.generated.brukes'} @:{'words.generated.til'} @:{'words.generated.a'} @:{'words.generated.autentisere'} @:{'words.generated.api'}-@:{'words.generated.tilkoblingen'}.", + "minimax_settings": "MiniMax M3 (AI planner)", + "minimax_settings_desc": "Configure the MiniMax M3 integration that powers the XL Vask autopilot planner.", + "enable_minimax_integration": "Use MiniMax M3 for autopilot suggestions", + "enable_minimax_integration_desc": "Force the XL Vask autopilot to use MiniMax M3 (replaces OpenAI for AI suggestions).", + "minimax_enable": "Enable MiniMax", + "minimax_enable_desc": "Activate the MiniMax integration used by the XL Vask autopilot and other AI features.", + "minimax_api_key": "MiniMax API key", + "minimax_api_key_desc": "The secret key for MiniMax. Obtain it from the MiniMax Portal; rotate or remove it from this page.", + "minimax_api_key_placeholder": "Paste your MiniMax API key", + "minimax_api_key_required": "An API key is required.", + "minimax_reauthenticate": "Re-authenticate", + "minimax_reauth_title": "Re-authenticate MiniMax", + "minimax_reauth_desc": "Paste a new MiniMax API key. This replaces the stored key.", + "minimax_reauth_confirm": "Save key", + "minimax_reauth_in_progress": "Saving…", + "minimax_reauth_success": "MiniMax key saved", + "minimax_reauth_success_desc": "The XL Vask autopilot will use the new key on its next call.", + "minimax_reauth_failed": "Could not save MiniMax key", + "minimax_remove": "Remove", + "minimax_remove_title": "Remove MiniMax key", + "minimax_remove_desc": "Clear the stored MiniMax API key. The autopilot will stop using MiniMax until a new key is provided.", + "minimax_remove_confirm": "Yes, remove", + "minimax_remove_in_progress": "Removing…", + "minimax_remove_success": "MiniMax key removed", + "minimax_remove_success_desc": "The autopilot is now forced off until a new key is configured.", + "minimax_remove_failed": "Could not remove MiniMax key" }, "release_manager": { "integrations": { diff --git a/src/i18n/generated/sv-v2.json b/src/i18n/generated/sv-v2.json index 9b80ece8..ee701543 100644 --- a/src/i18n/generated/sv-v2.json +++ b/src/i18n/generated/sv-v2.json @@ -3074,7 +3074,33 @@ "password_desc": "@.capitalize:{'words.generated.losenordet'} @:{'words.generated.anvands'} @:{'words.generated.for'} @:{'words.generated.att'} @:{'words.generated.autentisera'} @:{'words.generated.api'}-@:{'words.generated.anslutningen'}.", "subtitle": "@.capitalize:{'words.generated.konfiguration'} @:{'words.generated.af'} @:{'words.generated.xlvask'} @:{'words.generated.integrationen'}", "title": "@:{'words.generated.xlvask'} @:{'words.generated.konfiguration'}", - "username_desc": "Användarnamnet @:{'words.generated.anvands'} @:{'words.generated.for'} @:{'words.generated.att'} @:{'words.generated.autentisera'} @:{'words.generated.api'}-@:{'words.generated.anslutningen'}." + "username_desc": "Användarnamnet @:{'words.generated.anvands'} @:{'words.generated.for'} @:{'words.generated.att'} @:{'words.generated.autentisera'} @:{'words.generated.api'}-@:{'words.generated.anslutningen'}.", + "minimax_settings": "MiniMax M3 (AI planner)", + "minimax_settings_desc": "Configure the MiniMax M3 integration that powers the XL Vask autopilot planner.", + "enable_minimax_integration": "Use MiniMax M3 for autopilot suggestions", + "enable_minimax_integration_desc": "Force the XL Vask autopilot to use MiniMax M3 (replaces OpenAI for AI suggestions).", + "minimax_enable": "Enable MiniMax", + "minimax_enable_desc": "Activate the MiniMax integration used by the XL Vask autopilot and other AI features.", + "minimax_api_key": "MiniMax API key", + "minimax_api_key_desc": "The secret key for MiniMax. Obtain it from the MiniMax Portal; rotate or remove it from this page.", + "minimax_api_key_placeholder": "Paste your MiniMax API key", + "minimax_api_key_required": "An API key is required.", + "minimax_reauthenticate": "Re-authenticate", + "minimax_reauth_title": "Re-authenticate MiniMax", + "minimax_reauth_desc": "Paste a new MiniMax API key. This replaces the stored key.", + "minimax_reauth_confirm": "Save key", + "minimax_reauth_in_progress": "Saving…", + "minimax_reauth_success": "MiniMax key saved", + "minimax_reauth_success_desc": "The XL Vask autopilot will use the new key on its next call.", + "minimax_reauth_failed": "Could not save MiniMax key", + "minimax_remove": "Remove", + "minimax_remove_title": "Remove MiniMax key", + "minimax_remove_desc": "Clear the stored MiniMax API key. The autopilot will stop using MiniMax until a new key is provided.", + "minimax_remove_confirm": "Yes, remove", + "minimax_remove_in_progress": "Removing…", + "minimax_remove_success": "MiniMax key removed", + "minimax_remove_success_desc": "The autopilot is now forced off until a new key is configured.", + "minimax_remove_failed": "Could not remove MiniMax key" }, "release_manager": { "integrations": { diff --git a/src/i18n/source/da/phrases/compat/configuration/index.json b/src/i18n/source/da/phrases/compat/configuration/index.json index 8c5f8c5f..f7748adb 100644 --- a/src/i18n/source/da/phrases/compat/configuration/index.json +++ b/src/i18n/source/da/phrases/compat/configuration/index.json @@ -371,7 +371,33 @@ "password_desc": "@.capitalize:{'terms.glossary.adgangskoden'} @:{'terms.glossary.bruges'} @:{'terms.glossary.til'} @:{'terms.glossary.at'} @:{'terms.glossary.autentificere'} @:{'terms.glossary.api'} @:{'terms.glossary.forbindelsen'}.", "subtitle": "@.capitalize:{'terms.glossary.konfiguration'} @:{'terms.glossary.af'} @:{'terms.glossary.xlvask'} @:{'terms.glossary.integrationen'}", "title": "@:{'terms.glossary.xlvask'} @:{'terms.glossary.konfiguration'}", - "username_desc": "@.capitalize:{'terms.glossary.brugernavnet'} @:{'terms.glossary.bruges'} @:{'terms.glossary.til'} @:{'terms.glossary.at'} @:{'terms.glossary.autentificere'} @:{'terms.glossary.api'} @:{'terms.glossary.forbindelsen'}." + "username_desc": "@.capitalize:{'terms.glossary.brugernavnet'} @:{'terms.glossary.bruges'} @:{'terms.glossary.til'} @:{'terms.glossary.at'} @:{'terms.glossary.autentificere'} @:{'terms.glossary.api'} @:{'terms.glossary.forbindelsen'}.", + "minimax_settings": "MiniMax M3 (AI planner)", + "minimax_settings_desc": "Configure the MiniMax M3 integration that powers the XL Vask autopilot planner.", + "enable_minimax_integration": "Use MiniMax M3 for autopilot suggestions", + "enable_minimax_integration_desc": "Force the XL Vask autopilot to use MiniMax M3 (replaces OpenAI for AI suggestions).", + "minimax_enable": "Enable MiniMax", + "minimax_enable_desc": "Activate the MiniMax integration used by the XL Vask autopilot and other AI features.", + "minimax_api_key": "MiniMax API key", + "minimax_api_key_desc": "The secret key for MiniMax. Obtain it from the MiniMax Portal; rotate or remove it from this page.", + "minimax_api_key_placeholder": "Paste your MiniMax API key", + "minimax_api_key_required": "An API key is required.", + "minimax_reauthenticate": "Re-authenticate", + "minimax_reauth_title": "Re-authenticate MiniMax", + "minimax_reauth_desc": "Paste a new MiniMax API key. This replaces the stored key.", + "minimax_reauth_confirm": "Save key", + "minimax_reauth_in_progress": "Saving…", + "minimax_reauth_success": "MiniMax key saved", + "minimax_reauth_success_desc": "The XL Vask autopilot will use the new key on its next call.", + "minimax_reauth_failed": "Could not save MiniMax key", + "minimax_remove": "Remove", + "minimax_remove_title": "Remove MiniMax key", + "minimax_remove_desc": "Clear the stored MiniMax API key. The autopilot will stop using MiniMax until a new key is provided.", + "minimax_remove_confirm": "Yes, remove", + "minimax_remove_in_progress": "Removing…", + "minimax_remove_success": "MiniMax key removed", + "minimax_remove_success_desc": "The autopilot is now forced off until a new key is configured.", + "minimax_remove_failed": "Could not remove MiniMax key" } } } diff --git a/src/i18n/source/de/phrases/compat/configuration/index.json b/src/i18n/source/de/phrases/compat/configuration/index.json index 96ead148..6d4d699c 100644 --- a/src/i18n/source/de/phrases/compat/configuration/index.json +++ b/src/i18n/source/de/phrases/compat/configuration/index.json @@ -371,7 +371,33 @@ "password_desc": "@.capitalize:{'terms.glossary.das'} @:{'terms.glossary.passwort'} @:{'terms.glossary.wird'} @:{'terms.glossary.zur'} @:{'terms.glossary.authentifizierung'} @:{'terms.glossary.der'} @:{'terms.glossary.api'}-@:{'terms.glossary.verbindung'} @:{'terms.glossary.verwendet'}.", "subtitle": "@:{'terms.glossary.konfiguration'} @:{'terms.glossary.der'} @:{'terms.glossary.xlvask'}-@.capitalize:{'terms.glossary.integration'}", "title": "@:{'terms.glossary.xlvask'}-@:{'terms.glossary.konfiguration'}", - "username_desc": "@.capitalize:{'terms.glossary.der'} @:{'terms.glossary.benutzername'} @:{'terms.glossary.wird'} @:{'terms.glossary.zur'} @:{'terms.glossary.authentifizierung'} @:{'terms.glossary.der'} @:{'terms.glossary.api'}-@:{'terms.glossary.verbindung'} @:{'terms.glossary.verwendet'}." + "username_desc": "@.capitalize:{'terms.glossary.der'} @:{'terms.glossary.benutzername'} @:{'terms.glossary.wird'} @:{'terms.glossary.zur'} @:{'terms.glossary.authentifizierung'} @:{'terms.glossary.der'} @:{'terms.glossary.api'}-@:{'terms.glossary.verbindung'} @:{'terms.glossary.verwendet'}.", + "minimax_settings": "MiniMax M3 (AI planner)", + "minimax_settings_desc": "Configure the MiniMax M3 integration that powers the XL Vask autopilot planner.", + "enable_minimax_integration": "Use MiniMax M3 for autopilot suggestions", + "enable_minimax_integration_desc": "Force the XL Vask autopilot to use MiniMax M3 (replaces OpenAI for AI suggestions).", + "minimax_enable": "Enable MiniMax", + "minimax_enable_desc": "Activate the MiniMax integration used by the XL Vask autopilot and other AI features.", + "minimax_api_key": "MiniMax API key", + "minimax_api_key_desc": "The secret key for MiniMax. Obtain it from the MiniMax Portal; rotate or remove it from this page.", + "minimax_api_key_placeholder": "Paste your MiniMax API key", + "minimax_api_key_required": "An API key is required.", + "minimax_reauthenticate": "Re-authenticate", + "minimax_reauth_title": "Re-authenticate MiniMax", + "minimax_reauth_desc": "Paste a new MiniMax API key. This replaces the stored key.", + "minimax_reauth_confirm": "Save key", + "minimax_reauth_in_progress": "Saving…", + "minimax_reauth_success": "MiniMax key saved", + "minimax_reauth_success_desc": "The XL Vask autopilot will use the new key on its next call.", + "minimax_reauth_failed": "Could not save MiniMax key", + "minimax_remove": "Remove", + "minimax_remove_title": "Remove MiniMax key", + "minimax_remove_desc": "Clear the stored MiniMax API key. The autopilot will stop using MiniMax until a new key is provided.", + "minimax_remove_confirm": "Yes, remove", + "minimax_remove_in_progress": "Removing…", + "minimax_remove_success": "MiniMax key removed", + "minimax_remove_success_desc": "The autopilot is now forced off until a new key is configured.", + "minimax_remove_failed": "Could not remove MiniMax key" } } } diff --git a/src/i18n/source/en/phrases/compat/configuration/index.json b/src/i18n/source/en/phrases/compat/configuration/index.json index dc515903..863cbeb1 100644 --- a/src/i18n/source/en/phrases/compat/configuration/index.json +++ b/src/i18n/source/en/phrases/compat/configuration/index.json @@ -371,7 +371,33 @@ "password_desc": "@.capitalize:{'terms.replication.article.host_mention'} @:{'terms.glossary.password'} @:{'terms.glossary.is'} @:{'terms.glossary.used'} @:{'terms.glossary.to'} @:{'terms.glossary.authenticate'} @:{'terms.replication.article.host_mention'} @:{'terms.glossary.api'} @:{'terms.glossary.connection'}.", "subtitle": "@.capitalize:{'terms.glossary.configuration'} @:{'terms.glossary.of'} @:{'terms.replication.article.host_mention'} @:{'terms.glossary.xlvask'} @:{'terms.glossary.integration'}", "title": "@:{'terms.glossary.xlvask'} @:{'terms.glossary.configuration'}", - "username_desc": "@.capitalize:{'terms.replication.article.host_mention'} @:{'terms.glossary.username'} @:{'terms.glossary.is'} @:{'terms.glossary.used'} @:{'terms.glossary.to'} @:{'terms.glossary.authenticate'} @:{'terms.replication.article.host_mention'} @:{'terms.glossary.api'} @:{'terms.glossary.connection'}." + "username_desc": "@.capitalize:{'terms.replication.article.host_mention'} @:{'terms.glossary.username'} @:{'terms.glossary.is'} @:{'terms.glossary.used'} @:{'terms.glossary.to'} @:{'terms.glossary.authenticate'} @:{'terms.replication.article.host_mention'} @:{'terms.glossary.api'} @:{'terms.glossary.connection'}.", + "minimax_settings": "MiniMax M3 (AI planner)", + "minimax_settings_desc": "Configure the MiniMax M3 integration that powers the XL Vask autopilot planner.", + "enable_minimax_integration": "Use MiniMax M3 for autopilot suggestions", + "enable_minimax_integration_desc": "Force the XL Vask autopilot to use MiniMax M3 (replaces OpenAI for AI suggestions).", + "minimax_enable": "Enable MiniMax", + "minimax_enable_desc": "Activate the MiniMax integration used by the XL Vask autopilot and other AI features.", + "minimax_api_key": "MiniMax API key", + "minimax_api_key_desc": "The secret key for MiniMax. Obtain it from the MiniMax Portal; rotate or remove it from this page.", + "minimax_api_key_placeholder": "Paste your MiniMax API key", + "minimax_api_key_required": "An API key is required.", + "minimax_reauthenticate": "Re-authenticate", + "minimax_reauth_title": "Re-authenticate MiniMax", + "minimax_reauth_desc": "Paste a new MiniMax API key. This replaces the stored key.", + "minimax_reauth_confirm": "Save key", + "minimax_reauth_in_progress": "Saving…", + "minimax_reauth_success": "MiniMax key saved", + "minimax_reauth_success_desc": "The XL Vask autopilot will use the new key on its next call.", + "minimax_reauth_failed": "Could not save MiniMax key", + "minimax_remove": "Remove", + "minimax_remove_title": "Remove MiniMax key", + "minimax_remove_desc": "Clear the stored MiniMax API key. The autopilot will stop using MiniMax until a new key is provided.", + "minimax_remove_confirm": "Yes, remove", + "minimax_remove_in_progress": "Removing…", + "minimax_remove_success": "MiniMax key removed", + "minimax_remove_success_desc": "The autopilot is now forced off until a new key is configured.", + "minimax_remove_failed": "Could not remove MiniMax key" } } } diff --git a/src/i18n/source/no/phrases/compat/configuration/index.json b/src/i18n/source/no/phrases/compat/configuration/index.json index a55e1649..9614a2a3 100644 --- a/src/i18n/source/no/phrases/compat/configuration/index.json +++ b/src/i18n/source/no/phrases/compat/configuration/index.json @@ -371,7 +371,33 @@ "password_desc": "@.capitalize:{'terms.glossary.passordet'} @:{'terms.glossary.brukes'} @:{'terms.glossary.til'} @:{'terms.glossary.a'} @:{'terms.glossary.autentisere'} @:{'terms.glossary.api'}-@:{'terms.glossary.tilkoblingen'}.", "subtitle": "@.capitalize:{'terms.glossary.konfigurasjon'} @:{'terms.glossary.av'} @:{'terms.glossary.xlvask'}-@:{'terms.glossary.integrasjonen'}", "title": "@:{'terms.glossary.xlvask'}-@:{'terms.glossary.konfigurasjon'}", - "username_desc": "@:{'terms.glossary.brukernavnet'} @:{'terms.glossary.brukes'} @:{'terms.glossary.til'} @:{'terms.glossary.a'} @:{'terms.glossary.autentisere'} @:{'terms.glossary.api'}-@:{'terms.glossary.tilkoblingen'}." + "username_desc": "@:{'terms.glossary.brukernavnet'} @:{'terms.glossary.brukes'} @:{'terms.glossary.til'} @:{'terms.glossary.a'} @:{'terms.glossary.autentisere'} @:{'terms.glossary.api'}-@:{'terms.glossary.tilkoblingen'}.", + "minimax_settings": "MiniMax M3 (AI planner)", + "minimax_settings_desc": "Configure the MiniMax M3 integration that powers the XL Vask autopilot planner.", + "enable_minimax_integration": "Use MiniMax M3 for autopilot suggestions", + "enable_minimax_integration_desc": "Force the XL Vask autopilot to use MiniMax M3 (replaces OpenAI for AI suggestions).", + "minimax_enable": "Enable MiniMax", + "minimax_enable_desc": "Activate the MiniMax integration used by the XL Vask autopilot and other AI features.", + "minimax_api_key": "MiniMax API key", + "minimax_api_key_desc": "The secret key for MiniMax. Obtain it from the MiniMax Portal; rotate or remove it from this page.", + "minimax_api_key_placeholder": "Paste your MiniMax API key", + "minimax_api_key_required": "An API key is required.", + "minimax_reauthenticate": "Re-authenticate", + "minimax_reauth_title": "Re-authenticate MiniMax", + "minimax_reauth_desc": "Paste a new MiniMax API key. This replaces the stored key.", + "minimax_reauth_confirm": "Save key", + "minimax_reauth_in_progress": "Saving…", + "minimax_reauth_success": "MiniMax key saved", + "minimax_reauth_success_desc": "The XL Vask autopilot will use the new key on its next call.", + "minimax_reauth_failed": "Could not save MiniMax key", + "minimax_remove": "Remove", + "minimax_remove_title": "Remove MiniMax key", + "minimax_remove_desc": "Clear the stored MiniMax API key. The autopilot will stop using MiniMax until a new key is provided.", + "minimax_remove_confirm": "Yes, remove", + "minimax_remove_in_progress": "Removing…", + "minimax_remove_success": "MiniMax key removed", + "minimax_remove_success_desc": "The autopilot is now forced off until a new key is configured.", + "minimax_remove_failed": "Could not remove MiniMax key" } } } diff --git a/src/i18n/source/sv/phrases/compat/configuration/index.json b/src/i18n/source/sv/phrases/compat/configuration/index.json index b7af0732..80a76509 100644 --- a/src/i18n/source/sv/phrases/compat/configuration/index.json +++ b/src/i18n/source/sv/phrases/compat/configuration/index.json @@ -371,7 +371,33 @@ "password_desc": "@.capitalize:{'terms.glossary.losenordet'} @:{'terms.glossary.anvands'} @:{'terms.glossary.for'} @:{'terms.glossary.att'} @:{'terms.glossary.autentisera'} @:{'terms.glossary.api'}-@:{'terms.glossary.anslutningen'}.", "subtitle": "@.capitalize:{'terms.glossary.konfiguration'} @:{'terms.glossary.af'} @:{'terms.glossary.xlvask'} @:{'terms.glossary.integrationen'}", "title": "@:{'terms.glossary.xlvask'} @:{'terms.glossary.konfiguration'}", - "username_desc": "Användarnamnet @:{'terms.glossary.anvands'} @:{'terms.glossary.for'} @:{'terms.glossary.att'} @:{'terms.glossary.autentisera'} @:{'terms.glossary.api'}-@:{'terms.glossary.anslutningen'}." + "username_desc": "Användarnamnet @:{'terms.glossary.anvands'} @:{'terms.glossary.for'} @:{'terms.glossary.att'} @:{'terms.glossary.autentisera'} @:{'terms.glossary.api'}-@:{'terms.glossary.anslutningen'}.", + "minimax_settings": "MiniMax M3 (AI planner)", + "minimax_settings_desc": "Configure the MiniMax M3 integration that powers the XL Vask autopilot planner.", + "enable_minimax_integration": "Use MiniMax M3 for autopilot suggestions", + "enable_minimax_integration_desc": "Force the XL Vask autopilot to use MiniMax M3 (replaces OpenAI for AI suggestions).", + "minimax_enable": "Enable MiniMax", + "minimax_enable_desc": "Activate the MiniMax integration used by the XL Vask autopilot and other AI features.", + "minimax_api_key": "MiniMax API key", + "minimax_api_key_desc": "The secret key for MiniMax. Obtain it from the MiniMax Portal; rotate or remove it from this page.", + "minimax_api_key_placeholder": "Paste your MiniMax API key", + "minimax_api_key_required": "An API key is required.", + "minimax_reauthenticate": "Re-authenticate", + "minimax_reauth_title": "Re-authenticate MiniMax", + "minimax_reauth_desc": "Paste a new MiniMax API key. This replaces the stored key.", + "minimax_reauth_confirm": "Save key", + "minimax_reauth_in_progress": "Saving…", + "minimax_reauth_success": "MiniMax key saved", + "minimax_reauth_success_desc": "The XL Vask autopilot will use the new key on its next call.", + "minimax_reauth_failed": "Could not save MiniMax key", + "minimax_remove": "Remove", + "minimax_remove_title": "Remove MiniMax key", + "minimax_remove_desc": "Clear the stored MiniMax API key. The autopilot will stop using MiniMax until a new key is provided.", + "minimax_remove_confirm": "Yes, remove", + "minimax_remove_in_progress": "Removing…", + "minimax_remove_success": "MiniMax key removed", + "minimax_remove_success_desc": "The autopilot is now forced off until a new key is configured.", + "minimax_remove_failed": "Could not remove MiniMax key" } } } diff --git a/src/views/dashboards/superUserDashboard/configuration/ConfigurationXLVask.vue b/src/views/dashboards/superUserDashboard/configuration/ConfigurationXLVask.vue index 8b0d4745..cf013989 100644 --- a/src/views/dashboards/superUserDashboard/configuration/ConfigurationXLVask.vue +++ b/src/views/dashboards/superUserDashboard/configuration/ConfigurationXLVask.vue @@ -83,8 +83,95 @@ const onClickTestConnection = async () => { }) } +// --- MiniMax re-authenticate / remove --------------------------------------- +const minimaxApiKeyIsSet = ref(false); +const reauthenticatingMiniMax = ref(false); +const removingMiniMax = ref(false); + +const refreshMiniMaxStatus = async () => { + try { + const response = await SessionUser.superUser.modules.minimax.config.keys.api_key.get(); + const value = response?.data?.data?.value ?? response?.data?.data ?? ''; + minimaxApiKeyIsSet.value = typeof value === 'string' && value !== ''; + } catch (error) { + // If the endpoint is unreachable or the key isn't set yet, treat as not-set. + minimaxApiKeyIsSet.value = false; + } +}; + +const onClickReauthenticateMiniMax = async () => { + const { value: apiKey } = await Swal.fire({ + title: t('configuration.xlvask.minimax_reauth_title'), + text: t('configuration.xlvask.minimax_reauth_desc'), + input: 'password', + inputAttributes: { autocomplete: 'off', autocapitalize: 'off', spellcheck: 'false' }, + inputPlaceholder: t('configuration.xlvask.minimax_api_key_placeholder'), + showCancelButton: true, + confirmButtonText: t('configuration.xlvask.minimax_reauth_confirm'), + cancelButtonText: t('common.cancel'), + preConfirm: (val) => { + if (!val || String(val).trim() === '') { + Swal.showValidationMessage(t('configuration.xlvask.minimax_api_key_required')); + return false; + } + return String(val).trim(); + }, + }); + if (!apiKey) return; + reauthenticatingMiniMax.value = true; + try { + await SessionUser.superUser.modules.minimax.config.keys.api_key.set(apiKey); + minimaxApiKeyIsSet.value = true; + Swal.fire({ + icon: 'success', + title: t('configuration.xlvask.minimax_reauth_success'), + text: t('configuration.xlvask.minimax_reauth_success_desc'), + }); + } catch (error) { + Swal.fire({ + icon: 'error', + title: t('configuration.xlvask.minimax_reauth_failed'), + text: error?.message ?? String(error), + }); + } finally { + reauthenticatingMiniMax.value = false; + } +}; + +const onClickRemoveMiniMax = async () => { + const confirmation = await Swal.fire({ + title: t('configuration.xlvask.minimax_remove_title'), + text: t('configuration.xlvask.minimax_remove_desc'), + icon: 'warning', + showCancelButton: true, + confirmButtonColor: '#d33', + confirmButtonText: t('configuration.xlvask.minimax_remove_confirm'), + cancelButtonText: t('common.cancel'), + }); + if (!confirmation.isConfirmed) return; + removingMiniMax.value = true; + try { + await SessionUser.superUser.modules.minimax.config.keys.api_key.set(''); + minimaxApiKeyIsSet.value = false; + Swal.fire({ + icon: 'success', + title: t('configuration.xlvask.minimax_remove_success'), + text: t('configuration.xlvask.minimax_remove_success_desc'), + }); + } catch (error) { + Swal.fire({ + icon: 'error', + title: t('configuration.xlvask.minimax_remove_failed'), + text: error?.message ?? String(error), + }); + } finally { + removingMiniMax.value = false; + } +}; + const load = async () => { await getModuleConfig(); + await refreshMiniMaxStatus(); }; load(); @@ -184,6 +271,55 @@ load(); :value="getModuleConfigValue('openai_integration_enabled') === true" :on-switch="SessionUser.superUser.modules.xlvask.config.keys.openai_integration_enabled.set" /> + + + + + +
+ + +