+ {parsedResponses
+ .filter((item) => item.type !== "todo_list")
+ .map((item, index) => (
+
+ {item.type === "text" ? (
+ <>
+
+ {renderTextWithLinks(
+ (item.displayedContent !== undefined
+ ? item.displayedContent
+ : item.content
+ )?.trim() || "",
+ item.isAnimating
+ )}
+
+
+ {!item.isAnimating && (
+
+ {item.timestamp &&
+ index > 0 &&
+ parsedResponses[index - 1].timestamp
+ ? `Generated in ${(
+ (item.timestamp -
+ (parsedResponses[index - 1].timestamp || 0)) /
+ 1000
+ ).toFixed(2)}s`
+ : item.timestamp && startTime
+ ? `Generated in ${(
+ (item.timestamp - (startTime || 0)) /
+ 1000
+ ).toFixed(2)}s`
+ : ""}
+ {item.outputTokens
+ ? ` • ${formatTokenCount(item.outputTokens)} tokens`
+ : ""}
+
+ )}
+
+ {item.grafanaLinks && item.grafanaLinks.length > 0 && (
+
+ {item.grafanaLinks.map((link, i) => (
+
+ ))}
+
+ )}
+
+ ) : item.type === "tool_use" && item.toolName ? (
+
+ setExpandedTools((prev) => ({
+ ...prev,
+ [index]: !prev[index],
+ }))
+ }
+ />
+ ) : null}
+
+ ))}
+
+ {parsedResponses
+ .filter((item) => item.type === "todo_list")
+ .map((item, index) => (
+
+ {item.todoItems && (
+
+ )}
+
+ ))}
+
+ {isLoading ? (
+
+
+
+
+ {thinkingMessages[thinkingMessageIndex]}
+
+
+ Running for {formatElapsedTime(elapsedTime)} •{" "}
+ {formatTokenCount(displayedTokens)} tokens
+
+
+
+ ) : (
+ completedTokens > 0 && (
+
+
+ Completed in {formatElapsedTime(completedTime)} • Total:{" "}
+ {formatTokenCount(completedTokens)} tokens
+
+
+ )
+ )}
+
+ );
+ };
+
+ return (
+