@@ -11,7 +11,6 @@ import {
1111} from '../utils/markdown-renderer'
1212import { getDescendantIds , getAncestorIds } from '../utils/message-tree-utils'
1313
14- import type { ElapsedTimeTracker } from '../hooks/use-elapsed-time'
1514import type { ChatMessage } from '../types/chat'
1615import type { ChatTheme } from '../types/theme-system'
1716
@@ -25,7 +24,7 @@ interface MessageRendererProps {
2524 collapsedAgents : Set < string >
2625 streamingAgents : Set < string >
2726 isWaitingForResponse : boolean
28- timer : ElapsedTimeTracker
27+ timerStartTime : number | null
2928 setCollapsedAgents : React . Dispatch < React . SetStateAction < Set < string > > >
3029 setFocusedAgentId : React . Dispatch < React . SetStateAction < string | null > >
3130 userOpenedAgents : Set < string >
@@ -43,7 +42,7 @@ export const MessageRenderer = (props: MessageRendererProps): ReactNode => {
4342 collapsedAgents,
4443 streamingAgents,
4544 isWaitingForResponse,
46- timer ,
45+ timerStartTime ,
4746 setCollapsedAgents,
4847 setFocusedAgentId,
4948 setUserOpenedAgents,
@@ -95,7 +94,7 @@ export const MessageRenderer = (props: MessageRendererProps): ReactNode => {
9594 setUserOpenedAgents = { setUserOpenedAgents }
9695 setFocusedAgentId = { setFocusedAgentId }
9796 isWaitingForResponse = { isWaitingForResponse }
98- timer = { timer }
97+ timerStartTime = { timerStartTime }
9998 onToggleCollapsed = { onToggleCollapsed }
10099 />
101100 )
@@ -119,7 +118,7 @@ interface MessageWithAgentsProps {
119118 setUserOpenedAgents : React . Dispatch < React . SetStateAction < Set < string > > >
120119 setFocusedAgentId : React . Dispatch < React . SetStateAction < string | null > >
121120 isWaitingForResponse : boolean
122- timer : ElapsedTimeTracker
121+ timerStartTime : number | null
123122 onToggleCollapsed : ( id : string ) => void
124123}
125124
@@ -139,7 +138,7 @@ const MessageWithAgents = memo(
139138 setUserOpenedAgents,
140139 setFocusedAgentId,
141140 isWaitingForResponse,
142- timer ,
141+ timerStartTime ,
143142 onToggleCollapsed,
144143 } : MessageWithAgentsProps ) : ReactNode => {
145144 const SIDE_GUTTER = 1
@@ -161,7 +160,7 @@ const MessageWithAgents = memo(
161160 setUserOpenedAgents = { setUserOpenedAgents }
162161 setFocusedAgentId = { setFocusedAgentId }
163162 isWaitingForResponse = { isWaitingForResponse }
164- timer = { timer }
163+ timerStartTime = { timerStartTime }
165164 onToggleCollapsed = { onToggleCollapsed }
166165 />
167166 )
@@ -272,7 +271,7 @@ const MessageWithAgents = memo(
272271 isComplete = { message . isComplete }
273272 completionTime = { message . completionTime }
274273 credits = { message . credits }
275- timer = { timer }
274+ timerStartTime = { timerStartTime }
276275 textColor = { textColor }
277276 timestampColor = { timestampColor }
278277 markdownOptions = { markdownOptions }
@@ -310,7 +309,7 @@ const MessageWithAgents = memo(
310309 isComplete = { message . isComplete }
311310 completionTime = { message . completionTime }
312311 credits = { message . credits }
313- timer = { timer }
312+ timerStartTime = { timerStartTime }
314313 textColor = { textColor }
315314 timestampColor = { timestampColor }
316315 markdownOptions = { markdownOptions }
@@ -343,7 +342,7 @@ const MessageWithAgents = memo(
343342 setUserOpenedAgents = { setUserOpenedAgents }
344343 setFocusedAgentId = { setFocusedAgentId }
345344 isWaitingForResponse = { isWaitingForResponse }
346- timer = { timer }
345+ timerStartTime = { timerStartTime }
347346 onToggleCollapsed = { onToggleCollapsed }
348347 />
349348 </ box >
@@ -369,7 +368,7 @@ interface AgentMessageProps {
369368 setUserOpenedAgents : React . Dispatch < React . SetStateAction < Set < string > > >
370369 setFocusedAgentId : React . Dispatch < React . SetStateAction < string | null > >
371370 isWaitingForResponse : boolean
372- timer : ElapsedTimeTracker
371+ timerStartTime : number | null
373372 onToggleCollapsed : ( id : string ) => void
374373}
375374
@@ -388,7 +387,7 @@ const AgentMessage = memo(
388387 setUserOpenedAgents,
389388 setFocusedAgentId,
390389 isWaitingForResponse,
391- timer ,
390+ timerStartTime ,
392391 onToggleCollapsed,
393392 } : AgentMessageProps ) : ReactNode => {
394393 const agentInfo = message . agent !
@@ -581,7 +580,7 @@ const AgentMessage = memo(
581580 setUserOpenedAgents = { setUserOpenedAgents }
582581 setFocusedAgentId = { setFocusedAgentId }
583582 isWaitingForResponse = { isWaitingForResponse }
584- timer = { timer }
583+ timerStartTime = { timerStartTime }
585584 onToggleCollapsed = { onToggleCollapsed }
586585 />
587586 </ box >
0 commit comments