sessions - fix layer breakers (#305693)

This commit is contained in:
Benjamin Pasero
2026-03-27 16:48:36 +01:00
committed by GitHub
parent 9c566819ae
commit 63304545b2
2 changed files with 0 additions and 25 deletions

View File

@@ -2099,7 +2099,6 @@ export default tseslint.config(
'vs/editor/contrib/*/~',
'vs/workbench/~',
'vs/workbench/browser/**',
'vs/workbench/contrib/**',
'vs/workbench/services/*/~',
'vs/sessions/~',
'vs/sessions/services/*/~'

View File

@@ -42,8 +42,6 @@ import { hasNativeTitlebar, getTitleBarStyle } from '../../../platform/window/co
import { ThemeIcon } from '../../../base/common/themables.js';
import { Codicon } from '../../../base/common/codicons.js';
import { DisposableStore } from '../../../base/common/lifecycle.js';
import { IAgentSessionsService } from '../../../workbench/contrib/chat/browser/agentSessions/agentSessionsService.js';
import { countUnreadSessions } from '../../../workbench/contrib/chat/browser/agentSessions/agentSessionsModel.js';
import { localize } from '../../../nls.js';
/**
@@ -201,7 +199,6 @@ export class SidebarPart extends AbstractPaneCompositePart {
widget.tabIndex = 0;
widget.setAttribute('aria-label', localize('hideSidebar', "Hide Side Bar"));
append(widget, $(ThemeIcon.asCSSSelector(Codicon.tasklist)));
const badge = append(widget, $('span.session-status-toggle-badge'));
// Toggle sidebar on click
widgetDisposables.add(addDisposableListener(widget, EventType.CLICK, (e) => {
@@ -209,27 +206,6 @@ export class SidebarPart extends AbstractPaneCompositePart {
e.stopPropagation();
this.layoutService.setPartHidden(true, Parts.SIDEBAR_PART);
}));
// Update badge on session changes (deferred to avoid service unavailability)
const updateBadge = (svc: IAgentSessionsService) => {
const unread = countUnreadSessions(svc.model.sessions);
badge.textContent = unread > 0 ? `${unread}` : '';
badge.style.display = unread > 0 ? '' : 'none';
widget.setAttribute('aria-label', unread > 0
? localize('hideSidebarUnread', "Hide Side Bar, {0} unread session(s)", unread)
: localize('hideSidebar', "Hide Side Bar"));
};
setTimeout(() => {
try {
const svc = this.instantiationService.invokeFunction(accessor => accessor.get(IAgentSessionsService));
updateBadge(svc);
widgetDisposables.add(svc.model.onDidChangeSessions(() => updateBadge(svc)));
} catch {
// Service not yet available
badge.style.display = 'none';
}
}, 0);
}
private createFooter(parent: HTMLElement): void {