Latency
++ {latency_ms ? `${(latency_ms / 1000).toFixed(1)}s` : "N/A"} +
+Tokens
++ {totalTokens?.toLocaleString() ?? "N/A"} +
+Est. Cost
++ {estimated_cost !== undefined ? `$${estimated_cost.toFixed(4)}` : "N/A"} +
+Token Breakdown
+Stage Breakdown
+ {Object.entries(stage_latencies).map(([stage, latency]) => { + const percentage = (latency / latency_ms) * 100; + return ( +View AI Execution Trace
++ See detailed AI operation logs, token usage, and performance metrics in LangSmith +
+ {sessionId && ( +
+ Session: {sessionId.slice(0, 8)}
+
+ View detailed AI operation logs and metrics in LangSmith +
++ Trace link will appear here when LangSmith is configured +
+ )} ++ View detailed traces of AI operations, including: +
++ Note: LangSmith traces appear after AI operations are performed. + Each generation result includes a direct link to its trace. +
+Fast Generation (1.5s)
+Slow Generation (12s)
++ Component returns null when no trace URL: +
++ (Nothing rendered above - graceful degradation) +
++ View detailed AI operation logs and metrics +
++ View detailed AI operation logs and metrics in LangSmith +
++ Trace link will appear here when LangSmith is configured +
+ )} ++ View detailed traces of AI operations, including: +
+