From 89a5c4e8b3efd5d42bbe358280c9d1a2d7dfd2b7 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 26 Mar 2026 08:41:28 +0100 Subject: [PATCH] chat: show repository badge for pinned sessions (#304896) fix - update badge visibility for pinned sessions --- .../chat/browser/agentSessions/agentSessionsViewer.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.ts b/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.ts index 5b818564946..aaddd2664aa 100644 --- a/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.ts +++ b/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.ts @@ -325,9 +325,13 @@ export class AgentSessionRenderer extends Disposable implements ICompressibleTre // When grouped by repository, hide the badge only if the name it shows // matches the section header (i.e. the repository name for this session). // Badges with a different name (e.g. worktree name) are still shown. - // Archived sessions always keep their badge since they are grouped under - // the "Archived" section, not a repository section. - if (this.options.isGroupedByRepository?.() && !session.element.isArchived()) { + // Pinned and archived sessions always keep their badge since they are + // grouped under their own section, not a repository section. + if ( + this.options.isGroupedByRepository?.() && + !session.element.isArchived() && + !session.element.isPinned() + ) { const raw = typeof badge === 'string' ? badge : badge.value; const match = raw.match(/^\$\((?:repo|folder|worktree)\)\s*(.+)/); if (match) {