From 614b50dc15a6ec4dd1cf79e2c4a5343aae13239a Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 19 Nov 2025 12:51:09 +0100 Subject: [PATCH] agent sessions - adopt new icon to forward (#278330) --- .../browser/actions/chatContinueInAction.ts | 2 +- .../agentSessions/agentSessionViewModel.ts | 38 ++++++++++--------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.ts b/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.ts index 09bbab020b0..4b02e2e1f00 100644 --- a/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.ts +++ b/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.ts @@ -130,7 +130,7 @@ export class ChatContinueInSessionActionItem extends ActionWidgetDropdownActionV } protected override renderLabel(element: HTMLElement): IDisposable | null { - const icon = this.contextKeyService.contextMatchesRules(ChatContextKeys.remoteJobCreating) ? Codicon.sync : Codicon.indent; + const icon = this.contextKeyService.contextMatchesRules(ChatContextKeys.remoteJobCreating) ? Codicon.sync : Codicon.forward; element.classList.add(...ThemeIcon.asClassNameArray(icon)); return super.renderLabel(element); diff --git a/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.ts b/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.ts index 6bc1ea8599f..33531fda4c9 100644 --- a/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.ts +++ b/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.ts @@ -360,28 +360,32 @@ class AgentSessionsCache { return []; } - const cached = JSON.parse(sessionsCache) as ISerializedAgentSessionViewModel[]; - return cached.map(session => ({ - providerType: session.providerType, - providerLabel: session.providerLabel, + try { + const cached = JSON.parse(sessionsCache) as ISerializedAgentSessionViewModel[]; + return cached.map(session => ({ + providerType: session.providerType, + providerLabel: session.providerLabel, - resource: URI.revive(session.resource), + resource: URI.revive(session.resource), - icon: ThemeIcon.fromId(session.icon), - label: session.label, - description: session.description, - tooltip: session.tooltip, + icon: ThemeIcon.fromId(session.icon), + label: session.label, + description: session.description, + tooltip: session.tooltip, - status: session.status, - archived: session.archived, + status: session.status, + archived: session.archived, - timing: { - startTime: session.timing.startTime, - endTime: session.timing.endTime, - }, + timing: { + startTime: session.timing.startTime, + endTime: session.timing.endTime, + }, - statistics: session.statistics, - })); + statistics: session.statistics, + })); + } catch { + return []; // invalid data in storage, fallback to empty sessions list + } } }