From a79076aa68e0b58b9ec1690b581c29db9a8d358a Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Sat, 26 Oct 2024 21:55:56 +0100 Subject: [PATCH 1/3] fix(frontend): removing default plugin issue --- frontend/src/components/settings/SettingInput.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/settings/SettingInput.tsx b/frontend/src/components/settings/SettingInput.tsx index 5f58249..8bbb97b 100644 --- a/frontend/src/components/settings/SettingInput.tsx +++ b/frontend/src/components/settings/SettingInput.tsx @@ -118,7 +118,7 @@ const SettingInput: React.FC = ({ label={t("label.fallback_block")} helperText={t("help.fallback_block")} multiple={false} - onChange={(_e, selected, ..._) => onChange(selected?.id)} + onChange={(_e, selected, ..._) => onChange(selected?.id || null)} {...rest} /> ); @@ -135,7 +135,7 @@ const SettingInput: React.FC = ({ label={t("label.default_nlu_helper")} helperText={t("help.default_nlu_helper")} multiple={false} - onChange={(_e, selected, ..._) => onChange(selected?.name)} + onChange={(_e, selected, ..._) => onChange(selected?.name || null)} {...rest} /> ); @@ -152,7 +152,7 @@ const SettingInput: React.FC = ({ label={t("label.default_llm_helper")} helperText={t("help.default_llm_helper")} multiple={false} - onChange={(_e, selected, ..._) => onChange(selected?.name)} + onChange={(_e, selected, ..._) => onChange(selected?.name || null)} {...rest} /> ); From 606b6bcac18df8d60e257a0b262f5609adbe327e Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Sat, 26 Oct 2024 21:56:19 +0100 Subject: [PATCH 2/3] fix(frontend): i18n translation files --- frontend/public/locales/en/chatbot_settings.json | 3 ++- frontend/public/locales/en/translation.json | 1 - frontend/public/locales/fr/chatbot_settings.json | 3 ++- frontend/public/locales/fr/translation.json | 1 - 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/public/locales/en/chatbot_settings.json b/frontend/public/locales/en/chatbot_settings.json index d29072d..8335fdc 100644 --- a/frontend/public/locales/en/chatbot_settings.json +++ b/frontend/public/locales/en/chatbot_settings.json @@ -5,6 +5,7 @@ "label": { "global_fallback": "Enable Global Fallback?", "fallback_message": "Fallback Message", + "fallback_block": "Fallback Block", "default_nlu_helper": "Default NLU Helper", "default_llm_helper": "Default LLM Helper" }, @@ -14,4 +15,4 @@ "default_nlu_helper": "The NLU helper is responsible for processing and understanding user inputs, including tasks like intent prediction, language detection, and entity recognition.", "default_llm_helper": "The LLM helper leverages advanced generative AI to perform tasks such as text generation, chat completion, and complex query responses." } -} \ No newline at end of file +} diff --git a/frontend/public/locales/en/translation.json b/frontend/public/locales/en/translation.json index 9811b52..0e83ba8 100644 --- a/frontend/public/locales/en/translation.json +++ b/frontend/public/locales/en/translation.json @@ -279,7 +279,6 @@ "effects": "Apply plugin effects", "enable_fallback": "Enable Fallback?", "max_fallback_attempts": "Max Fallback Attempts", - "fallback_block": "Fallback Block", "fallback_message": "Fallback Message", "labeled_with": "Target users with labels?", "assign_labels": "Assign labels", diff --git a/frontend/public/locales/fr/chatbot_settings.json b/frontend/public/locales/fr/chatbot_settings.json index 5199a93..6155a66 100644 --- a/frontend/public/locales/fr/chatbot_settings.json +++ b/frontend/public/locales/fr/chatbot_settings.json @@ -5,6 +5,7 @@ "label": { "global_fallback": "Activer la réponse de secours globale ?", "fallback_message": "Message de secours", + "fallback_block": "Bloc de secours", "default_nlu_helper": "Utilitaire NLU par défaut", "default_llm_helper": "Utilitaire LLM par défaut" }, @@ -14,4 +15,4 @@ "default_nlu_helper": "Utilitaire du traitement et de la compréhension des entrées des utilisateurs, incluant des tâches telles que la prédiction d'intention, la détection de langue et la reconnaissance d'entités.", "default_llm_helper": "Utilitaire responsable de l'intelligence artificielle générative avancée pour effectuer des tâches telles que la génération de texte, la complétion de chat et les réponses à des requêtes complexes." } -} \ No newline at end of file +} diff --git a/frontend/public/locales/fr/translation.json b/frontend/public/locales/fr/translation.json index d06616c..d901b70 100644 --- a/frontend/public/locales/fr/translation.json +++ b/frontend/public/locales/fr/translation.json @@ -279,7 +279,6 @@ "effects": "Appliquer les effets des plugins", "enable_fallback": "Activer le message de secours?", "max_fallback_attempts": "Nombre maximum de tentatives de secours", - "fallback_block": "Bloc de secours", "fallback_message": "Message de secours", "labeled_with": "Cibler les utilisateurs", "assign_labels": "Affecter des étiquettes", From 78cd5e334e7cdf408b1f262504b931c02efa5e67 Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Sat, 26 Oct 2024 22:01:56 +0100 Subject: [PATCH 3/3] fix(frontend): removing default plugin issue v0.0.1 --- frontend/src/components/settings/SettingInput.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/settings/SettingInput.tsx b/frontend/src/components/settings/SettingInput.tsx index 8bbb97b..edb95d2 100644 --- a/frontend/src/components/settings/SettingInput.tsx +++ b/frontend/src/components/settings/SettingInput.tsx @@ -135,7 +135,7 @@ const SettingInput: React.FC = ({ label={t("label.default_nlu_helper")} helperText={t("help.default_nlu_helper")} multiple={false} - onChange={(_e, selected, ..._) => onChange(selected?.name || null)} + onChange={(_e, selected, ..._) => onChange(selected?.name)} {...rest} /> ); @@ -152,7 +152,7 @@ const SettingInput: React.FC = ({ label={t("label.default_llm_helper")} helperText={t("help.default_llm_helper")} multiple={false} - onChange={(_e, selected, ..._) => onChange(selected?.name || null)} + onChange={(_e, selected, ..._) => onChange(selected?.name)} {...rest} /> );