@@ -688,28 +688,46 @@ class SessionsViewPane extends ViewPane {
688
688
}
689
689
}
690
690
691
+ /**
692
+ * Refreshes the tree data with progress indication.
693
+ * Shows a progress indicator while the tree updates its children from the provider.
694
+ */
691
695
private async refreshTreeWithProgress ( ) : Promise < void > {
692
696
if ( ! this . tree ) {
693
697
return ;
694
698
}
695
699
696
700
const progressIndicator = this . getProgressIndicator ( ) ;
697
701
698
- // Show progress while refreshing tree data
699
- const refreshPromise = this . tree . updateChildren ( this . provider ) ;
700
- await progressIndicator . showWhile ( refreshPromise , 0 ) ; // Show immediately, no delay
702
+ try {
703
+ // Show progress while refreshing tree data
704
+ const refreshPromise = this . tree . updateChildren ( this . provider ) ;
705
+ await progressIndicator . showWhile ( refreshPromise , 0 ) ; // Show immediately, no delay
706
+ } catch ( error ) {
707
+ // Log error but don't throw to avoid breaking the UI
708
+ console . error ( 'Error refreshing chat sessions tree:' , error ) ;
709
+ }
701
710
}
702
711
712
+ /**
713
+ * Loads initial tree data with progress indication.
714
+ * Shows a progress indicator while the tree loads data from the provider.
715
+ */
703
716
private async loadDataWithProgress ( ) : Promise < void > {
704
717
if ( ! this . tree ) {
705
718
return ;
706
719
}
707
720
708
721
const progressIndicator = this . getProgressIndicator ( ) ;
709
722
710
- // Show progress while loading data
711
- const loadingPromise = this . tree . setInput ( this . provider ) ;
712
- await progressIndicator . showWhile ( loadingPromise , 0 ) ; // Show immediately, no delay
723
+ try {
724
+ // Show progress while loading data
725
+ const loadingPromise = this . tree . setInput ( this . provider ) ;
726
+ await progressIndicator . showWhile ( loadingPromise , 0 ) ; // Show immediately, no delay
727
+ } catch ( error ) {
728
+ // Log error but don't throw to avoid breaking the UI
729
+ console . error ( 'Error loading chat sessions data:' , error ) ;
730
+ }
713
731
}
714
732
715
733
protected override renderBody ( container : HTMLElement ) : void {
0 commit comments