diff --git a/frontend/src/features/agents/components/drilldown/ChatTracker.js b/frontend/src/features/agents/components/drilldown/ChatTracker.js index 2885ad0..217baf1 100644 --- a/frontend/src/features/agents/components/drilldown/ChatTracker.js +++ b/frontend/src/features/agents/components/drilldown/ChatTracker.js @@ -56,11 +56,11 @@ )} {/* Tracking HUD Overlay */} diff --git a/frontend/src/features/agents/components/drilldown/ConfigPanel.js b/frontend/src/features/agents/components/drilldown/ConfigPanel.js index 0dfa678..64914db 100644 --- a/frontend/src/features/agents/components/drilldown/ConfigPanel.js +++ b/frontend/src/features/agents/components/drilldown/ConfigPanel.js @@ -109,7 +109,7 @@ className="w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl px-4 py-2 text-sm" > - {nodes.map(n => )} + {nodes.map(n => )} @@ -194,7 +194,7 @@
{t.trigger_type === 'webhook' ? (
-
+
{/* Evaluation Strategy (Rubric) */} -
+
@@ -124,7 +124,7 @@
{/* Live feedback loop (Feedback) */} -
+
diff --git a/frontend/src/features/agents/components/drilldown/MetricsPanel.js b/frontend/src/features/agents/components/drilldown/MetricsPanel.js index 81fac56..4615d60 100644 --- a/frontend/src/features/agents/components/drilldown/MetricsPanel.js +++ b/frontend/src/features/agents/components/drilldown/MetricsPanel.js @@ -26,7 +26,7 @@
{/* Runtime / Health Card */} -
+
@@ -67,7 +67,7 @@
{/* Precision / Score Card */} -
+
@@ -82,7 +82,7 @@
{/* Resource / Tokens Card */} -
+
diff --git a/frontend/src/features/chat/components/ChatWindow.js b/frontend/src/features/chat/components/ChatWindow.js index a7c194a..a20fe20 100644 --- a/frontend/src/features/chat/components/ChatWindow.js +++ b/frontend/src/features/chat/components/ChatWindow.js @@ -315,7 +315,9 @@ }; // Main ChatWindow component with dynamic height calculation -const ChatWindow = ({ chatHistory, maxHeight, onSynthesize, featureName, isStreamingPlaying, onAudioPlay, autoCollapse = false, evaluationMetadata }) => { +const ChatWindow = ({ messages, chatHistory, maxHeight, onSynthesize, featureName, isStreamingPlaying, onAudioPlay, autoCollapse = false, evaluationMetadata }) => { + const history = chatHistory || messages || []; + const containerRef = useRef(null); const [activePlayingId, setActivePlayingId] = useState(null); const [expandedIndices, setExpandedIndices] = useState({}); @@ -361,7 +363,7 @@ } }); } - }, [chatHistory, evaluationMetadata]); + }, [history, evaluationMetadata]); return (
{(() => { - const lastAssistantIndex = chatHistory.slice().reverse().findIndex(m => m.sender === 'assistant' || m.sender === 'assistant'); // Logic for assistant - const actualLastAssistantIndex = lastAssistantIndex !== -1 ? chatHistory.length - 1 - lastAssistantIndex : -1; + const lastAssistantIndex = history.slice().reverse().findIndex(m => m.sender === 'assistant' || m.sender === 'assistant'); // Logic for assistant + const actualLastAssistantIndex = lastAssistantIndex !== -1 ? history.length - 1 - lastAssistantIndex : -1; - return chatHistory.map((message, index) => { - const isLastMessage = index === chatHistory.length - 1; + return history.map((message, index) => { + const isLastMessage = index === history.length - 1; const isLastAssistantMessage = index === actualLastAssistantIndex; const isSystemLog = message.sender === "system" && (message.text?.includes("Co-Worker") || message.text?.includes("Attempt")); const shouldCollapse = (autoCollapse && !isLastMessage && !message.isUser && !expandedIndices[index]) || (isSystemLog && !expandedIndices[index]);