diff --git a/src/app/(dashboard)/dashboard/tools/traffic-inspector/components/tabs/ConversationTab.tsx b/src/app/(dashboard)/dashboard/tools/traffic-inspector/components/tabs/ConversationTab.tsx index ee30cf0e16..cb09a1baa7 100644 --- a/src/app/(dashboard)/dashboard/tools/traffic-inspector/components/tabs/ConversationTab.tsx +++ b/src/app/(dashboard)/dashboard/tools/traffic-inspector/components/tabs/ConversationTab.tsx @@ -1,5 +1,6 @@ "use client"; +import { useTranslations } from "next-intl"; import type { InterceptedRequest } from "@/mitm/inspector/types"; import { normalizeConversation } from "@/mitm/inspector/conversationNormalizer"; import { ChatBubble } from "../chat/ChatBubble"; @@ -9,6 +10,7 @@ interface ConversationTabProps { } export function ConversationTab({ request }: ConversationTabProps) { + const t = useTranslations("trafficInspector"); const conversation = normalizeConversation(request); if (!conversation) { @@ -36,9 +38,30 @@ export function ConversationTab({ request }: ConversationTabProps) { #{conversation.contextKey.slice(0, 12)} )} - {allTurns.map((turn, i) => ( - - ))} + {conversation.request.length > 0 && ( + <> +
+
+ {conversation.request.map((turn, i) => ( + + ))} + + )} + {conversation.response.length > 0 && ( + <> +
+
+ {conversation.response.map((turn, i) => ( + + ))} + + )} ); }