diff --git a/src/cli/components/AgentInfoBar.tsx b/src/cli/components/AgentInfoBar.tsx index 257568f..5132131 100644 --- a/src/cli/components/AgentInfoBar.tsx +++ b/src/cli/components/AgentInfoBar.tsx @@ -68,11 +68,8 @@ export const AgentInfoBar = memo(function AgentInfoBar({ const isCloudUser = serverUrl?.includes("api.letta.com"); const adeConversationUrl = - agentId && - agentId !== "loading" && - conversationId && - conversationId !== "default" - ? `https://app.letta.com/agents/${agentId}?conversation=${conversationId}` + agentId && agentId !== "loading" + ? `https://app.letta.com/agents/${agentId}${conversationId && conversationId !== "default" ? `?conversation=${conversationId}` : ""}` : ""; const showBottomBar = agentId && agentId !== "loading"; const reasoningLabel = formatReasoningLabel(currentReasoningEffort); diff --git a/src/cli/components/InputRich.tsx b/src/cli/components/InputRich.tsx index 2abd4b4..e0cf141 100644 --- a/src/cli/components/InputRich.tsx +++ b/src/cli/components/InputRich.tsx @@ -470,24 +470,32 @@ const StreamingStatus = memo(function StreamingStatus({ } }, [animate]); - // Elapsed time tracking + // Elapsed time tracking: pause updates during resize, but do not reset. useEffect(() => { - if (streaming && visible && !isResizing) { - // Start tracking when streaming begins - if (streamStartRef.current === null) { - streamStartRef.current = performance.now(); - } - const id = setInterval(() => { - if (streamStartRef.current !== null) { - setElapsedMs(performance.now() - streamStartRef.current); - } - }, 1000); - return () => clearInterval(id); + if (!streaming || !visible || isResizing) { + return; + } + + if (streamStartRef.current === null) { + streamStartRef.current = performance.now(); + } + + const id = setInterval(() => { + if (streamStartRef.current !== null) { + setElapsedMs(performance.now() - streamStartRef.current); + } + }, 1000); + + return () => clearInterval(id); + }, [streaming, visible, isResizing]); + + useEffect(() => { + if (streaming && visible) { + return; } - // Reset when streaming stops streamStartRef.current = null; setElapsedMs(0); - }, [streaming, visible, isResizing]); + }, [streaming, visible]); const estimatedTokens = charsToTokens(tokenCount); const totalElapsedMs = elapsedBaseMs + elapsedMs;