@@ -10,6 +10,7 @@ import { IContextMenuService } from '../../../../platform/contextview/browser/co
10
10
import { SyncDescriptor } from '../../../../platform/instantiation/common/descriptors.js' ;
11
11
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js' ;
12
12
import { ILogService } from '../../../../platform/log/common/log.js' ;
13
+ import { IProgressService } from '../../../../platform/progress/common/progress.js' ;
13
14
import { Registry } from '../../../../platform/registry/common/platform.js' ;
14
15
import { IStorageService } from '../../../../platform/storage/common/storage.js' ;
15
16
import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js' ;
@@ -678,6 +679,7 @@ class SessionsViewPane extends ViewPane {
678
679
@IEditorService private readonly editorService : IEditorService ,
679
680
@IViewsService private readonly viewsService : IViewsService ,
680
681
@ILogService private readonly logService : ILogService ,
682
+ @IProgressService private readonly progressService : IProgressService ,
681
683
) {
682
684
super ( options , keybindingService , contextMenuService , configurationService , contextKeyService , viewDescriptorService , instantiationService , openerService , themeService , hoverService ) ;
683
685
@@ -710,12 +712,16 @@ class SessionsViewPane extends ViewPane {
710
712
return ;
711
713
}
712
714
713
- const progressIndicator = this . getProgressIndicator ( ) ;
714
-
715
715
try {
716
- // Show progress while refreshing tree data
717
- const refreshPromise = this . tree . updateChildren ( this . provider ) ;
718
- await progressIndicator . showWhile ( refreshPromise , 0 ) ; // Show immediately, no delay
716
+ await this . progressService . withProgress (
717
+ {
718
+ location : this . id , // Use the view ID as the progress location
719
+ title : nls . localize ( 'chatSessions.refreshing' , 'Refreshing chat sessions...' ) ,
720
+ } ,
721
+ async ( ) => {
722
+ await this . tree ! . updateChildren ( this . provider ) ;
723
+ }
724
+ ) ;
719
725
} catch ( error ) {
720
726
// Log error but don't throw to avoid breaking the UI
721
727
this . logService . error ( 'Error refreshing chat sessions tree:' , error ) ;
@@ -731,12 +737,16 @@ class SessionsViewPane extends ViewPane {
731
737
return ;
732
738
}
733
739
734
- const progressIndicator = this . getProgressIndicator ( ) ;
735
-
736
740
try {
737
- // Show progress while loading data
738
- const loadingPromise = this . tree . setInput ( this . provider ) ;
739
- await progressIndicator . showWhile ( loadingPromise , 0 ) ; // Show immediately, no delay
741
+ await this . progressService . withProgress (
742
+ {
743
+ location : this . id , // Use the view ID as the progress location
744
+ title : nls . localize ( 'chatSessions.loading' , 'Loading chat sessions...' ) ,
745
+ } ,
746
+ async ( ) => {
747
+ await this . tree ! . setInput ( this . provider ) ;
748
+ }
749
+ ) ;
740
750
} catch ( error ) {
741
751
// Log error but don't throw to avoid breaking the UI
742
752
this . logService . error ( 'Error loading chat sessions data:' , error ) ;
0 commit comments