Change:
Repro: Open multiple terminals Select multiple terminal tabs Right click and change icon Change icon only a single terminal is changed Real context stored with the action was done recently as part of Related:

Discussion:
rename(title?: string): Promise<void>; /** <del> * Triggers a quick pick to change the icon of this terminal. </del> <ins> * Sets or triggers a quick pick to change the icon of this terminal. </ins> */ <del> changeIcon(): Promise<void>; </del> <ins> changeIcon(icon?: TerminalIcon): Promise<TerminalIcon | undefined>; </ins> /** <del> * Triggers a quick pick to change the color of the associated terminal tab icon. </del> <ins> * Sets or triggers a quick pick to change the color of the associated terminal tab icon. </ins> */ <del> changeColor(): Promise<void>; </del> <ins> changeColor(color?: string): Promise<string | undefined>; </ins> /** * Triggers a quick pick that displays recent commands or cwds. Selecting one will

import { INotificationService, Severity } from 'vs/platform/notification/common/notification'; import { IOpenerService } from 'vs/platform/opener/common/opener'; import { IPickOptions, IQuickInputService, IQuickPickItem } from 'vs/platform/quickinput/common/quickInput'; <del> import { ITerminalProfile, TerminalExitReason, TerminalLocation, TerminalSettingId } from 'vs/platform/terminal/common/terminal'; </del> <ins> import { ITerminalProfile, TerminalExitReason, TerminalIcon, TerminalLocation, TerminalSettingId } from 'vs/platform/terminal/common/terminal'; </ins> import { IWorkspaceContextService, IWorkspaceFolder } from 'vs/platform/workspace/common/workspace'; import { PICK_WORKSPACE_FOLDER_COMMAND_ID } from 'vs/workbench/browser/actions/workspaceCommands'; import { CLOSE_EDITOR_COMMAND_ID } from 'vs/workbench/browser/parts/editor/editorCommands';

title: terminalStrings.changeIcon, f1: false, precondition: ContextKeyExpr.and(ContextKeyExpr.or(TerminalContextKeys.processSupported, TerminalContextKeys.terminalHasBeenCreated), TerminalContextKeys.tabsSingularSelection), <del> run: (c, accessor) => getSelectedInstances(accessor)?.[0].changeIcon() </del> <ins> run: async (c, accessor) => { let icon: TerminalIcon | undefined; for (const terminal of getSelectedInstances(accessor) ?? []) { icon = await terminal.changeIcon(icon); } } </ins> }); registerTerminalAction({

title: terminalStrings.changeColor, f1: false, precondition: ContextKeyExpr.and(ContextKeyExpr.or(TerminalContextKeys.processSupported, TerminalContextKeys.terminalHasBeenCreated), TerminalContextKeys.tabsSingularSelection), <del> run: (c, accessor) => getSelectedInstances(accessor)?.[0].changeColor() </del> <ins> run: async (c, accessor) => { let color: string | undefined; for (const terminal of getSelectedInstances(accessor) ?? []) { color = await terminal.changeColor(color); } } </ins> }); registerTerminalAction({

run: (c, accessor) => accessor.get(ICommandService).executeCommand(CLOSE_EDITOR_COMMAND_ID) }); <del> registerContextualInstanceAction({ </del> <ins> registerTerminalAction({ </ins> id: TerminalCommandId.KillActiveTab, title: terminalStrings.kill, f1: false,

weight: KeybindingWeight.WorkbenchContrib, when: TerminalContextKeys.tabsFocus }, <del> run: (instance, c) => c.service.safeDisposeTerminal(instance), runAfter: (instances, c) => c.groupService.focusTabs() </del> <ins> run: async (c, accessor) => { for (const terminal of getSelectedInstances(accessor) ?? []) { c.service.safeDisposeTerminal(terminal); } c.groupService.focusTabs(); } </ins> }); registerTerminalAction({

} } <del> async changeIcon() { </del> <ins> async changeIcon(icon?: TerminalIcon): Promise<TerminalIcon | undefined> { if (icon) { this._icon = icon; this._onIconChanged.fire({ instance: this, userInitiated: true }); return icon; } </ins> type Item = IQuickPickItem & { icon: TerminalIcon }; const items: Item[] = []; for (const icon of getAllCodicons()) {

if (result) { this._icon = result.icon; this._onIconChanged.fire({ instance: this, userInitiated: true }); <ins> return this._icon; </ins> } <ins> return; </ins> } <del> async changeColor() { </del> <ins> async changeColor(color?: string): Promise<string | undefined> { if (color) { this.shellLaunchConfig.color = color; this._onIconChanged.fire({ instance: this, userInitiated: true }); return color; } </ins> const icon = this._getIcon(); if (!icon) { return;

quickPick.hide(); colorStyleDisposable.dispose(); <ins> return result?.id; </ins> } selectPreviousSuggestion(): void {