From 44a8ecd0de6f1c5214cbcd481ecddf38af9520e7 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 4 Apr 2026 11:29:27 +0900 Subject: [PATCH] fix: handle nested response object in report agent chat The /api/report/chat endpoint returns a nested response structure: {data: {response: {response: "text", sources: [], tool_calls: []}}} But the frontend expected res.data.response to be a string directly, causing the chat UI to spin indefinitely as the object couldn't be rendered as message content. --- frontend/src/components/Step5Interaction.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/Step5Interaction.vue b/frontend/src/components/Step5Interaction.vue index 9470153..d3d3dd9 100644 --- a/frontend/src/components/Step5Interaction.vue +++ b/frontend/src/components/Step5Interaction.vue @@ -697,7 +697,7 @@ const sendToReportAgent = async (message) => { if (res.success && res.data) { chatHistory.value.push({ role: 'assistant', - content: res.data.response || res.data.answer || 'No response', + content: (typeof res.data.response === 'object' ? res.data.response.response : res.data.response) || res.data.answer || 'No response', timestamp: new Date().toISOString() }) addLog('Report Agent replied')