agent sessions - adopt new icon to forward (#278330)

This commit is contained in:
Benjamin Pasero
2025-11-19 12:51:09 +01:00
committed by GitHub
parent 6ff6f086f7
commit 614b50dc15
2 changed files with 22 additions and 18 deletions

View File

@@ -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);

View File

@@ -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
}
}
}