Sessions - polish changes item action bar (#306366)

This commit is contained in:
Ladislau Szomoru
2026-03-30 16:00:41 +00:00
committed by GitHub
parent d919f292bf
commit 0fab59cfae
2 changed files with 10 additions and 5 deletions

View File

@@ -1258,7 +1258,7 @@ export class ChangesViewPane extends ViewPane {
'ChangesViewTree',
container,
new ChangesTreeDelegate(),
[this.instantiationService.createInstance(ChangesTreeRenderer, resourceLabels, MenuId.ChatEditingSessionChangeToolbar, actionRunner)],
[this.instantiationService.createInstance(ChangesTreeRenderer, this.viewModel, resourceLabels, MenuId.ChatEditingSessionChangeToolbar, actionRunner)],
{
alwaysConsumeMouseWheel: false,
accessibilityProvider: {
@@ -1388,6 +1388,7 @@ class ChangesTreeRenderer implements ICompressibleTreeRenderer<ChangesTreeElemen
readonly templateId: string = ChangesTreeRenderer.TEMPLATE_ID;
constructor(
private viewModel: ChangesViewModel,
private labels: ResourceLabels,
private menuId: MenuId | undefined,
private actionRunner: ActionRunner | undefined,
@@ -1427,6 +1428,10 @@ class ChangesTreeRenderer implements ICompressibleTreeRenderer<ChangesTreeElemen
const activeSession = this.sessionManagementService.activeSession.read(reader);
return activeSession?.sessionType ?? '';
}));
templateDisposables.add(bindContextKey(changesVersionModeContextKey, contextKeyService, reader => {
return this.viewModel.versionModeObs.read(reader);
}));
}
const decorationBadge = dom.$('.changes-decoration-badge');