@@ -366,31 +366,24 @@ export class ChatTodoListWidget extends Disposable {
366366 const firstInProgressTodo = inProgressTodos . length > 0 ? inProgressTodos [ 0 ] : undefined ;
367367 const notStartedTodos = todoList . filter ( todo => todo . status === 'not-started' ) ;
368368 const firstNotStartedTodo = notStartedTodos . length > 0 ? notStartedTodos [ 0 ] : undefined ;
369-
370- // Calculate current task number (1-indexed)
371369 const currentTaskNumber = inProgressTodos . length > 0 ? completedCount + 1 : Math . max ( 1 , completedCount ) ;
372- const progressCount = totalCount > 0 ? ` (${ currentTaskNumber } /${ totalCount } )` : '' ;
373-
374- const titleText = dom . $ ( 'span' ) ;
375- titleText . textContent = this . _isExpanded
376- ? localize ( 'chat.todoList.title' , 'Todos' ) + progressCount
377- : progressCount ;
378- titleElement . appendChild ( titleText ) ;
379370
380371 const expandButtonLabel = this . _isExpanded
381- ? localize ( 'chat.todoList.collapseButton' , 'Collapse Todos {0}' , progressCount )
382- : localize ( 'chat.todoList.expandButton' , 'Expand Todos {0}' , progressCount ) ;
372+ ? localize ( 'chat.todoList.collapseButton' , 'Collapse Todos' )
373+ : localize ( 'chat.todoList.expandButton' , 'Expand Todos' ) ;
383374 this . expandoElement . setAttribute ( 'aria-label' , expandButtonLabel ) ;
384375 this . expandoElement . setAttribute ( 'aria-expanded' , this . _isExpanded ? 'true' : 'false' ) ;
385- if ( ! this . _isExpanded ) {
376+
377+ if ( this . _isExpanded ) {
378+ const titleText = dom . $ ( 'span' ) ;
379+ titleText . textContent = totalCount > 0 ?
380+ localize ( 'chat.todoList.titleWithCount' , 'Todos ({0}/{1})' , currentTaskNumber , totalCount ) :
381+ localize ( 'chat.todoList.title' , 'Todos' ) ;
382+ titleElement . appendChild ( titleText ) ;
383+ } else {
386384 // Show first in-progress todo, or if none, the first not-started todo
387385 const todoToShow = firstInProgressTodo || firstNotStartedTodo ;
388386 if ( todoToShow ) {
389- const separator = dom . $ ( 'span' ) ;
390- separator . textContent = ' - ' ;
391- separator . style . marginLeft = '4px' ;
392- titleElement . appendChild ( separator ) ;
393-
394387 const icon = dom . $ ( '.codicon' ) ;
395388 if ( todoToShow === firstInProgressTodo ) {
396389 icon . classList . add ( 'codicon-record' ) ;
@@ -399,13 +392,12 @@ export class ChatTodoListWidget extends Disposable {
399392 icon . classList . add ( 'codicon-circle-outline' ) ;
400393 icon . style . color = 'var(--vscode-foreground)' ;
401394 }
402- icon . style . marginLeft = '4px' ;
403395 icon . style . marginRight = '4px' ;
404396 icon . style . verticalAlign = 'middle' ;
405397 titleElement . appendChild ( icon ) ;
406398
407399 const todoText = dom . $ ( 'span' ) ;
408- todoText . textContent = todoToShow . title ;
400+ todoText . textContent = localize ( 'chat.todoList.currentTask' , '{0} ({1}/{2})' , todoToShow . title , currentTaskNumber , totalCount ) ;
409401 todoText . style . verticalAlign = 'middle' ;
410402 todoText . style . overflow = 'hidden' ;
411403 todoText . style . textOverflow = 'ellipsis' ;
@@ -415,14 +407,8 @@ export class ChatTodoListWidget extends Disposable {
415407 }
416408 // Show "Done" when all tasks are completed
417409 else if ( completedCount > 0 && completedCount === totalCount ) {
418- const separator = dom . $ ( 'span' ) ;
419- separator . textContent = ' - ' ;
420- separator . style . marginLeft = '4px' ;
421- titleElement . appendChild ( separator ) ;
422-
423410 const doneText = dom . $ ( 'span' ) ;
424411 doneText . textContent = localize ( 'chat.todoList.allDone' , 'Done' ) ;
425- doneText . style . marginLeft = '4px' ;
426412 doneText . style . verticalAlign = 'middle' ;
427413 titleElement . appendChild ( doneText ) ;
428414 }
0 commit comments