Skip to content

Commit 92072d3

Browse files
committed
Log updates
1 parent 8d284fc commit 92072d3

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/vs/workbench/contrib/chat/browser/chatSessions.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,8 @@ class SessionsRenderer extends Disposable implements ITreeRenderer<IChatSessionI
537537

538538
constructor(
539539
private readonly labels: ResourceLabels,
540-
@IThemeService private readonly themeService: IThemeService
540+
@IThemeService private readonly themeService: IThemeService,
541+
@ILogService private readonly logService: ILogService,
541542
) {
542543
super();
543544

@@ -585,7 +586,7 @@ class SessionsRenderer extends Disposable implements ITreeRenderer<IChatSessionI
585586

586587
this.appliedIconColorStyles.add(styleKey);
587588
} else {
588-
console.log('No color found for colorId:', colorId);
589+
this.logService.debug('No color found for colorId:', colorId);
589590
}
590591
}
591592

@@ -665,6 +666,7 @@ class SessionsViewPane extends ViewPane {
665666
@IHoverService hoverService: IHoverService,
666667
@IEditorService private readonly editorService: IEditorService,
667668
@IViewsService private readonly viewsService: IViewsService,
669+
@ILogService private readonly logService: ILogService,
668670
) {
669671
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService);
670672

@@ -698,14 +700,14 @@ class SessionsViewPane extends ViewPane {
698700
}
699701

700702
const progressIndicator = this.getProgressIndicator();
701-
703+
702704
try {
703705
// Show progress while refreshing tree data
704706
const refreshPromise = this.tree.updateChildren(this.provider);
705707
await progressIndicator.showWhile(refreshPromise, 0); // Show immediately, no delay
706708
} catch (error) {
707709
// Log error but don't throw to avoid breaking the UI
708-
console.error('Error refreshing chat sessions tree:', error);
710+
this.logService.error('Error refreshing chat sessions tree:', error);
709711
}
710712
}
711713

@@ -719,14 +721,14 @@ class SessionsViewPane extends ViewPane {
719721
}
720722

721723
const progressIndicator = this.getProgressIndicator();
722-
724+
723725
try {
724726
// Show progress while loading data
725727
const loadingPromise = this.tree.setInput(this.provider);
726728
await progressIndicator.showWhile(loadingPromise, 0); // Show immediately, no delay
727729
} catch (error) {
728730
// Log error but don't throw to avoid breaking the UI
729-
console.error('Error loading chat sessions data:', error);
731+
this.logService.error('Error loading chat sessions data:', error);
730732
}
731733
}
732734

@@ -742,7 +744,7 @@ class SessionsViewPane extends ViewPane {
742744
this.dataSource = new SessionsDataSource(this.provider);
743745

744746
const delegate = new SessionsDelegate();
745-
const renderer = new SessionsRenderer(this.labels, this.themeService);
747+
const renderer = new SessionsRenderer(this.labels, this.themeService, this.logService);
746748
this._register(renderer);
747749

748750
this.tree = this.instantiationService.createInstance(
@@ -768,7 +770,7 @@ class SessionsViewPane extends ViewPane {
768770
}
769771
) as WorkbenchAsyncDataTree<IChatSessionItemProvider, IChatSessionItem, FuzzyScore>;
770772

771-
console.log('Tree created with hideTwistiesOfChildlessElements: true');
773+
this.logService.debug('Tree created with hideTwistiesOfChildlessElements: true');
772774
this._register(this.tree);
773775

774776
// Handle double-click and keyboard selection to open editors

0 commit comments

Comments
 (0)