File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/vs/workbench/contrib/chat/browser/agentSessions Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ export class AgentSessionRenderer implements ICompressibleTreeRenderer<IAgentSes
230230 }
231231
232232 private renderStatus ( session : ITreeNode < IAgentSessionViewModel , FuzzyScore > , template : IAgentSessionItemTemplate ) : void {
233- const getStatus = ( session : IAgentSessionViewModel ) => `${ session . providerLabel } • ${ fromNow ( session . timing . startTime ) } ` ;
233+ const getStatus = ( session : IAgentSessionViewModel ) => `${ session . providerLabel } • ${ fromNow ( session . timing . endTime || session . timing . startTime ) } ` ;
234234
235235 template . status . textContent = getStatus ( session . element ) ;
236236 const timer = template . elementDisposable . add ( new IntervalTimer ( ) ) ;
@@ -346,8 +346,8 @@ export class AgentSessionsSorter implements ITreeSorter<IAgentSessionViewModel>
346346 return 1 ; // a (finished) comes after b (in-progress)
347347 }
348348
349- // Both in-progress or finished: sort by start time (most recent first)
350- return sessionB . timing . startTime - sessionA . timing . startTime ;
349+ // Both in-progress or finished: sort by end or start time (most recent first)
350+ return ( sessionB . timing . endTime || sessionB . timing . startTime ) - ( sessionA . timing . endTime || sessionA . timing . startTime ) ;
351351 }
352352}
353353
You can’t perform that action at this time.
0 commit comments