From 70fb1e9d40158659e10bf1f8b5797ff512f33d34 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 20:08:18 +0000 Subject: [PATCH] Refactor test agent view Simplify Testar Agente UI to: - Keep agent selection at top with a single New Conversation button - Show all conversation histories across all agents in a unified list - Remove per-agent filtering in the history sidebar - Retain basic chat area while consolidating history view for easier testing --- src/pages/TestPrompt.tsx | 107 ++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 63 deletions(-) diff --git a/src/pages/TestPrompt.tsx b/src/pages/TestPrompt.tsx index fb7061f..e368c35 100644 --- a/src/pages/TestPrompt.tsx +++ b/src/pages/TestPrompt.tsx @@ -174,45 +174,20 @@ export default function TestPrompt() { return (
- {/* Sidebar com conversas anteriores */} + {/* Sidebar com todas as conversas */}
-
-

Conversas

- -
-
- - -
+

Histórico de Conversas

- {conversations - .filter((conv) => conv.agentId === selectedAgent) - .map((conversation) => ( + {conversations.length === 0 ? ( +
+ Nenhuma conversa ainda +
+ ) : ( + conversations.map((conversation) => (
- ))} - {selectedAgent && conversations.filter((c) => c.agentId === selectedAgent).length === 0 && ( -
- Nenhuma conversa ainda -
+ )) )} @@ -248,29 +224,34 @@ export default function TestPrompt() { {/* Header */}
-
-
-

- {selectedAgent - ? agents.find((a) => a.id === selectedAgent)?.name - : "Testar Agente"} -

- {currentConversationId && ( -

- Conversa atual -

- )} +
+
+ + +
+
+
-