From 0955a9d9d5f2ad067b3ff1d037b6be6ca224e267 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Tue, 23 Jan 2024 20:52:56 -0300 Subject: [PATCH] Add background color to chat agent icon so it doesn't overlap copilot icon (#203256) --- build/lib/stylelint/vscode-known-variables.json | 1 + src/vs/workbench/contrib/chat/browser/chatWidget.ts | 3 +++ src/vs/workbench/contrib/chat/browser/media/chat.css | 1 + 3 files changed, 5 insertions(+) diff --git a/build/lib/stylelint/vscode-known-variables.json b/build/lib/stylelint/vscode-known-variables.json index 9fb16d8459d..7f5b6fa2892 100644 --- a/build/lib/stylelint/vscode-known-variables.json +++ b/build/lib/stylelint/vscode-known-variables.json @@ -42,6 +42,7 @@ "--vscode-chat-requestBorder", "--vscode-chat-slashCommandBackground", "--vscode-chat-slashCommandForeground", + "--vscode-chat-list-background", "--vscode-checkbox-background", "--vscode-checkbox-border", "--vscode-checkbox-foreground", diff --git a/src/vs/workbench/contrib/chat/browser/chatWidget.ts b/src/vs/workbench/contrib/chat/browser/chatWidget.ts index 745ec7e1c04..11780bb2479 100644 --- a/src/vs/workbench/contrib/chat/browser/chatWidget.ts +++ b/src/vs/workbench/contrib/chat/browser/chatWidget.ts @@ -32,6 +32,7 @@ import { IChatContributionService } from 'vs/workbench/contrib/chat/common/chatC import { ChatModelInitState, IChatModel } from 'vs/workbench/contrib/chat/common/chatModel'; import { IChatReplyFollowup, IChatService } from 'vs/workbench/contrib/chat/common/chatService'; import { ChatViewModel, IChatResponseViewModel, isRequestVM, isResponseVM, isWelcomeVM } from 'vs/workbench/contrib/chat/common/chatViewModel'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; const $ = dom.$; @@ -138,6 +139,7 @@ export class ChatWidget extends Disposable implements IChatWidget { @IChatAccessibilityService private readonly _chatAccessibilityService: IChatAccessibilityService, @IInstantiationService private readonly _instantiationService: IInstantiationService, @ILogService private readonly _logService: ILogService, + @IThemeService private readonly _themeService: IThemeService ) { super(); CONTEXT_IN_CHAT_SESSION.bindTo(contextKeyService).set(true); @@ -439,6 +441,7 @@ export class ChatWidget extends Disposable implements IChatWidget { private onDidStyleChange(): void { this.container.style.setProperty('--vscode-interactive-result-editor-background-color', this.editorOptions.configuration.resultEditor.backgroundColor?.toString() ?? ''); this.container.style.setProperty('--vscode-interactive-session-foreground', this.editorOptions.configuration.foreground?.toString() ?? ''); + this.container.style.setProperty('--vscode-chat-list-background', this._themeService.getColorTheme().getColor(this.styles.listBackground)?.toString() ?? ''); } setModel(model: IChatModel, viewState: IChatViewState): void { diff --git a/src/vs/workbench/contrib/chat/browser/media/chat.css b/src/vs/workbench/contrib/chat/browser/media/chat.css index 009e5b35f49..7b8c230b92f 100644 --- a/src/vs/workbench/contrib/chat/browser/media/chat.css +++ b/src/vs/workbench/contrib/chat/browser/media/chat.css @@ -115,6 +115,7 @@ width: 24px; height: 24px; border-radius: 50%; + background-color: var(--vscode-chat-list-background); } .interactive-item-container .header .avatar .codicon {