From 356f9275174cd2cb46da21fe0897e06fcce7e09f Mon Sep 17 00:00:00 2001 From: Marcelo Date: Thu, 7 May 2026 14:38:57 -0300 Subject: [PATCH 1/2] fix(frontend): improve agent creation UX wizard (EVO-995) - Always render AI helper buttons (Generate/Review) in Step5; disable with tooltip when OpenAI is not configured instead of hiding them - Move 'Create new tool' button to dialog header in CustomToolsSelectionDialog so it is always visible alongside search - Rewrite agent-type card descriptions in all 6 locales (en, pt-BR, pt, es, fr, it) to clearly differentiate LLM, Task, Sequential, Parallel, Loop and External types - Add aiNotConfigured tooltip i18n key to all 6 locales Co-Authored-By: Claude Sonnet 4.6 --- .../Dialogs/CustomToolsSelectionDialog.tsx | 18 +++- src/i18n/locales/en/aiAgents.json | 15 ++-- src/i18n/locales/es/aiAgents.json | 15 ++-- src/i18n/locales/fr/aiAgents.json | 15 ++-- src/i18n/locales/it/aiAgents.json | 15 ++-- src/i18n/locales/pt-BR/aiAgents.json | 15 ++-- src/i18n/locales/pt/aiAgents.json | 15 ++-- .../Agent/wizard/Step5_Instructions.tsx | 87 ++++++++++++------- 8 files changed, 118 insertions(+), 77 deletions(-) diff --git a/src/components/ai_agents/Dialogs/CustomToolsSelectionDialog.tsx b/src/components/ai_agents/Dialogs/CustomToolsSelectionDialog.tsx index c9910c0f..5298b97c 100644 --- a/src/components/ai_agents/Dialogs/CustomToolsSelectionDialog.tsx +++ b/src/components/ai_agents/Dialogs/CustomToolsSelectionDialog.tsx @@ -137,9 +137,9 @@ const CustomToolsSelectionDialog = ({
- {/* Search */} -
-
+ {/* Search + Create */} +
+
+
{/* Tools List */} diff --git a/src/i18n/locales/en/aiAgents.json b/src/i18n/locales/en/aiAgents.json index 45a32904..5b05328e 100644 --- a/src/i18n/locales/en/aiAgents.json +++ b/src/i18n/locales/en/aiAgents.json @@ -1265,27 +1265,27 @@ "types": { "llm": { "label": "LLM (Language Model)", - "description": "Intelligent assistant with generative AI" + "description": "Conversational AI — reasons, answers questions and chats using a language model" }, "task": { "label": "Task", - "description": "Automation of specific tasks" + "description": "Orchestrates tasks across sub-agents, each with a defined output" }, "sequential": { "label": "Sequential", - "description": "Executes agents in sequence" + "description": "Runs sub-agents one after another, passing results down the chain" }, "parallel": { "label": "Parallel", - "description": "Executes agents in parallel" + "description": "Runs multiple sub-agents simultaneously to speed up independent work" }, "loop": { "label": "Loop", - "description": "Executes agents in loop" + "description": "Repeats sub-agents until a condition is met or iterations complete" }, "external": { "label": "External Integrations", - "description": "Connects and runs external integrations" + "description": "Delegates to Flowise, n8n, Typebot, Dify or OpenAI workflows" } }, "badges": { @@ -1361,7 +1361,8 @@ "validationError": "Briefly describe what your agent does (minimum 10 characters)", "tip": "Tip:", "tipContent": "Be clear and specific. The more details you provide, the better the agent will understand its role and respond accordingly.", - "generateWithAI": "Generate with AI" + "generateWithAI": "Generate with AI", + "aiNotConfigured": "OpenAI integration not configured. Go to Settings → Integrations to enable AI features." }, "promptGenerator": { "title": "AI Prompt Generator", diff --git a/src/i18n/locales/es/aiAgents.json b/src/i18n/locales/es/aiAgents.json index 384fdbea..a9c33b72 100644 --- a/src/i18n/locales/es/aiAgents.json +++ b/src/i18n/locales/es/aiAgents.json @@ -1237,27 +1237,27 @@ "types": { "llm": { "label": "LLM (Modelo de Lenguaje)", - "description": "Asistente inteligente con IA generativa" + "description": "IA conversacional — razona, responde preguntas y chatea usando un modelo de lenguaje" }, "task": { "label": "Tarea", - "description": "Automatización de tareas específicas" + "description": "Orquesta tareas entre sub-agentes, cada una con una salida definida" }, "sequential": { "label": "Sequential", - "description": "Ejecuta agentes en secuencia" + "description": "Ejecuta sub-agentes en cadena, pasando el resultado de cada etapa a la siguiente" }, "parallel": { "label": "Parallel", - "description": "Ejecuta agentes en paralelo" + "description": "Ejecuta múltiples sub-agentes al mismo tiempo para tareas independientes" }, "loop": { "label": "Loop", - "description": "Ejecuta agentes en bucle" + "description": "Repite sub-agentes hasta alcanzar una condición o número de iteraciones" }, "external": { "label": "Integraciones Externas", - "description": "Conecta y ejecuta integraciones externas" + "description": "Delega a flujos de Flowise, n8n, Typebot, Dify u OpenAI" } }, "badges": { @@ -1333,7 +1333,8 @@ "validationError": "Describa brevemente qué hace su agente (mínimo 10 caracteres)", "tip": "Consejo:", "tipContent": "Sea claro y específico. Cuantos más detalles proporcione, mejor el agente entenderá su rol y responderá en consecuencia.", - "generateWithAI": "Generar con IA" + "generateWithAI": "Generar con IA", + "aiNotConfigured": "Integración con OpenAI no configurada. Ve a Configuración → Integraciones para habilitar las funciones de IA." }, "promptGenerator": { "title": "Generador de Prompt con IA", diff --git a/src/i18n/locales/fr/aiAgents.json b/src/i18n/locales/fr/aiAgents.json index 7c0d8f62..021228a1 100644 --- a/src/i18n/locales/fr/aiAgents.json +++ b/src/i18n/locales/fr/aiAgents.json @@ -1203,27 +1203,27 @@ "types": { "llm": { "label": "LLM (Modèle de Langage)", - "description": "Assistant intelligent avec IA générative" + "description": "IA conversationnelle — raisonne, répond aux questions et discute avec un modèle de langage" }, "task": { "label": "Tâche", - "description": "Automatisation de tâches spécifiques" + "description": "Orchestre des tâches entre sous-agents, chacune avec une sortie définie" }, "sequential": { "label": "Sequential", - "description": "Exécute les agents en séquence" + "description": "Exécute les sous-agents en chaîne, passant le résultat de chaque étape à la suivante" }, "parallel": { "label": "Parallel", - "description": "Exécute les agents en parallèle" + "description": "Exécute plusieurs sous-agents simultanément pour des tâches indépendantes" }, "loop": { "label": "Loop", - "description": "Exécute les agents en boucle" + "description": "Répète les sous-agents jusqu'à atteindre une condition ou un nombre d'itérations" }, "external": { "label": "Intégrations Externes", - "description": "Connecte et exécute des intégrations externes" + "description": "Délègue aux flux Flowise, n8n, Typebot, Dify ou OpenAI" } }, "badges": { @@ -1299,7 +1299,8 @@ "validationError": "Décrivez brièvement ce que fait votre agent (minimum 10 caractères)", "tip": "Conseil :", "tipContent": "Soyez clair et spécifique. Plus vous fournissez de détails, mieux l'agent comprendra son rôle et répondra en conséquence.", - "generateWithAI": "Générer avec IA" + "generateWithAI": "Générer avec IA", + "aiNotConfigured": "Intégration OpenAI non configurée. Allez dans Paramètres → Intégrations pour activer les fonctionnalités IA." }, "promptGenerator": { "title": "Générateur de Prompt avec IA", diff --git a/src/i18n/locales/it/aiAgents.json b/src/i18n/locales/it/aiAgents.json index 326a1f68..8449fbec 100644 --- a/src/i18n/locales/it/aiAgents.json +++ b/src/i18n/locales/it/aiAgents.json @@ -1201,27 +1201,27 @@ "types": { "llm": { "label": "LLM (Modello Linguistico)", - "description": "Assistente intelligente con IA generativa" + "description": "IA conversazionale — ragiona, risponde a domande e chatta usando un modello linguistico" }, "task": { "label": "Attività", - "description": "Automazione di attività specifiche" + "description": "Orchestra attività tra sotto-agenti, ognuna con un output definito" }, "sequential": { "label": "Sequential", - "description": "Esegue agenti in sequenza" + "description": "Esegue sotto-agenti in catena, passando il risultato di ogni fase alla successiva" }, "parallel": { "label": "Parallel", - "description": "Esegue agenti in parallelo" + "description": "Esegue più sotto-agenti contemporaneamente per attività indipendenti" }, "loop": { "label": "Loop", - "description": "Esegue agenti in ciclo" + "description": "Ripete i sotto-agenti fino al raggiungimento di una condizione o numero di iterazioni" }, "external": { "label": "Integrazioni Esterne", - "description": "Connette ed esegue integrazioni esterne" + "description": "Delega ai flussi di Flowise, n8n, Typebot, Dify o OpenAI" } }, "badges": { @@ -1297,7 +1297,8 @@ "validationError": "Descrivi brevemente cosa fa il tuo agente (minimo 10 caratteri)", "tip": "Consiglio:", "tipContent": "Sii chiaro e specifico. Più dettagli fornisci, meglio l'agente comprenderà il suo ruolo e risponderà di conseguenza.", - "generateWithAI": "Genera con IA" + "generateWithAI": "Genera con IA", + "aiNotConfigured": "Integrazione OpenAI non configurata. Vai in Impostazioni → Integrazioni per abilitare le funzionalità IA." }, "promptGenerator": { "title": "Generatore di Prompt con IA", diff --git a/src/i18n/locales/pt-BR/aiAgents.json b/src/i18n/locales/pt-BR/aiAgents.json index 14171d6c..558d02de 100644 --- a/src/i18n/locales/pt-BR/aiAgents.json +++ b/src/i18n/locales/pt-BR/aiAgents.json @@ -1282,27 +1282,27 @@ "types": { "llm": { "label": "LLM (Modelo de Linguagem)", - "description": "Assistente inteligente com IA generativa" + "description": "IA conversacional — raciocina, responde perguntas e chata usando modelo de linguagem" }, "task": { "label": "Tarefa", - "description": "Automação de tarefas específicas" + "description": "Orquestra tarefas entre sub-agentes, cada uma com uma saída definida" }, "sequential": { "label": "Sequential", - "description": "Executa agentes em sequência" + "description": "Executa sub-agentes em cadeia, passando o resultado de cada etapa para a próxima" }, "parallel": { "label": "Parallel", - "description": "Executa agentes em paralelo" + "description": "Executa múltiplos sub-agentes ao mesmo tempo para tarefas independentes" }, "loop": { "label": "Loop", - "description": "Executa agentes em loop" + "description": "Repete sub-agentes até atingir uma condição ou número de iterações" }, "external": { "label": "Integrações Externas", - "description": "Conecta e executa integrações externas" + "description": "Delega para fluxos do Flowise, n8n, Typebot, Dify ou OpenAI" } }, "badges": { @@ -1378,7 +1378,8 @@ "validationError": "Descreva brevemente o que seu agente faz (mínimo 10 caracteres)", "tip": "Dica:", "tipContent": "Seja claro e específico. Quanto mais detalhes você fornecer, melhor o agente entenderá seu papel e responderá de acordo.", - "generateWithAI": "Gerar com IA" + "generateWithAI": "Gerar com IA", + "aiNotConfigured": "Integração com OpenAI não configurada. Acesse Configurações → Integrações para habilitar os recursos de IA." }, "promptGenerator": { "title": "Gerador de Prompt com IA", diff --git a/src/i18n/locales/pt/aiAgents.json b/src/i18n/locales/pt/aiAgents.json index 59a9eac6..7f4a9ea2 100644 --- a/src/i18n/locales/pt/aiAgents.json +++ b/src/i18n/locales/pt/aiAgents.json @@ -1265,27 +1265,27 @@ "types": { "llm": { "label": "LLM (Modelo de Linguagem)", - "description": "Assistente inteligente com IA generativa" + "description": "IA conversacional — raciocina, responde perguntas e chata usando modelo de linguagem" }, "task": { "label": "Tarefa", - "description": "Automação de tarefas específicas" + "description": "Orquestra tarefas entre sub-agentes, cada uma com uma saída definida" }, "sequential": { "label": "Sequential", - "description": "Executa agentes em sequência" + "description": "Executa sub-agentes em cadeia, passando o resultado de cada etapa para a próxima" }, "parallel": { "label": "Parallel", - "description": "Executa agentes em paralelo" + "description": "Executa múltiplos sub-agentes ao mesmo tempo para tarefas independentes" }, "loop": { "label": "Loop", - "description": "Executa agentes em loop" + "description": "Repete sub-agentes até atingir uma condição ou número de iterações" }, "external": { "label": "Integrações Externas", - "description": "Conecta e executa integrações externas" + "description": "Delega para fluxos do Flowise, n8n, Typebot, Dify ou OpenAI" } }, "badges": { @@ -1361,7 +1361,8 @@ "validationError": "Descreva brevemente o que seu agente faz (mínimo 10 caracteres)", "tip": "Dica:", "tipContent": "Seja claro e específico. Quanto mais detalhes você fornecer, melhor o agente entenderá seu papel e responderá de acordo.", - "generateWithAI": "Gerar com IA" + "generateWithAI": "Gerar com IA", + "aiNotConfigured": "Integração com OpenAI não configurada. Aceda a Definições → Integrações para ativar os recursos de IA." }, "promptGenerator": { "title": "Gerador de Prompt com IA", diff --git a/src/pages/Customer/Agents/Agent/wizard/Step5_Instructions.tsx b/src/pages/Customer/Agents/Agent/wizard/Step5_Instructions.tsx index ad57e855..50b062f6 100644 --- a/src/pages/Customer/Agents/Agent/wizard/Step5_Instructions.tsx +++ b/src/pages/Customer/Agents/Agent/wizard/Step5_Instructions.tsx @@ -1,5 +1,5 @@ import { useState, useEffect } from 'react'; -import { Textarea, Label, Button } from '@evoapi/design-system'; +import { Textarea, Label, Button, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@evoapi/design-system'; import { ArrowRight, ArrowLeft, Sparkles, Wand2, Loader2 } from 'lucide-react'; import { useLanguage } from '@/hooks/useLanguage'; import { useGlobalConfig } from '@/contexts/GlobalConfigContext'; @@ -74,42 +74,65 @@ const Step5_Instructions = ({ data, onChange, onNext, onBack }: Step5Props) => { - {showAIActions && ( +
{data.instruction && data.instruction.trim() && ( - + + + {!showAIActions && ( + +

{t('wizard.step5.aiNotConfigured')}

+
)} - + )} - + + + + + + + {!showAIActions && ( + +

{t('wizard.step5.aiNotConfigured')}

+
+ )} +
- )} +