Skip to content

Commit 9e597d3

Browse files
authored
Merge pull request #196333 from microsoft/ddossett/zestful-roadrunner
Update chat avatar styles
2 parents 8aab366 + eb6ffc2 commit 9e597d3

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

build/lib/stylelint/vscode-known-variables.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
"--vscode-charts-purple",
3838
"--vscode-charts-red",
3939
"--vscode-charts-yellow",
40+
"--vscode-chat-avatarBackground",
41+
"--vscode-chat-avatarForeground",
4042
"--vscode-chat-requestBorder",
4143
"--vscode-chat-slashCommandBackground",
4244
"--vscode-chat-slashCommandForeground",
@@ -696,8 +698,6 @@
696698
"--vscode-tree-indentGuidesStroke",
697699
"--vscode-tree-tableColumnsBorder",
698700
"--vscode-tree-tableOddRowsBackground",
699-
"--vscode-voiceRecording-background",
700-
"--vscode-voiceRecording-dimmedBackground",
701701
"--vscode-walkThrough-embeddedEditorBackground",
702702
"--vscode-walkthrough-stepTitle-foreground",
703703
"--vscode-welcomePage-background",
@@ -784,4 +784,4 @@
784784
"--z-index-notebook-sticky-scroll",
785785
"--zoom-factor"
786786
]
787-
}
787+
}

src/vs/workbench/contrib/chat/browser/chatListRenderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ export class ChatListItemRenderer extends Disposable implements ITreeRenderer<Ch
351351
avatarImgIcon.src = FileAccess.uriToBrowserUri(element.avatarIconUri).toString(true);
352352
templateData.avatarContainer.replaceChildren(dom.$('.avatar', undefined, avatarImgIcon));
353353
} else {
354-
const defaultIcon = isRequestVM(element) ? Codicon.account : Codicon.hubot;
354+
const defaultIcon = isRequestVM(element) ? Codicon.account : Codicon.copilot;
355355
const avatarIcon = dom.$(ThemeIcon.asCSSSelector(defaultIcon));
356356
templateData.avatarContainer.replaceChildren(dom.$('.avatar.codicon-avatar', undefined, avatarIcon));
357357
}

src/vs/workbench/contrib/chat/browser/media/chat.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,11 @@
9191
width: 24px;
9292
height: 24px;
9393
border-radius: 50%;
94+
outline: 1px solid var(--vscode-chat-requestBorder)
9495
}
9596

9697
.interactive-item-container .header .avatar.codicon-avatar {
97-
background: var(--vscode-badge-background);
98+
background: var(--vscode-chat-avatarBackground);
9899
}
99100

100101
.interactive-item-container .header .avatar+.avatar {
@@ -108,7 +109,8 @@
108109
}
109110

110111
.interactive-item-container .header .avatar .codicon {
111-
color: var(--vscode-badge-foreground) !important;
112+
color: var(--vscode-chat-avatarForeground);
113+
font-size: 14px;
112114
}
113115

114116
.monaco-list-row:not(.focused) .interactive-item-container:not(:hover) .header .monaco-toolbar,

src/vs/workbench/contrib/chat/common/chatColors.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
import { Color, RGBA } from 'vs/base/common/color';
77
import { localize } from 'vs/nls';
8-
import { badgeBackground, badgeForeground, registerColor } from 'vs/platform/theme/common/colorRegistry';
8+
import { badgeBackground, badgeForeground, contrastBorder, foreground, registerColor } from 'vs/platform/theme/common/colorRegistry';
99

1010
export const chatRequestBorder = registerColor(
1111
'chat.requestBorder',
12-
{ dark: new Color(new RGBA(255, 255, 255, 0.10)), light: new Color(new RGBA(0, 0, 0, 0.10)), hcDark: null, hcLight: null, },
12+
{ dark: new Color(new RGBA(255, 255, 255, 0.10)), light: new Color(new RGBA(0, 0, 0, 0.10)), hcDark: contrastBorder, hcLight: contrastBorder, },
1313
localize('chat.requestBorder', 'The border color of a chat request.')
1414
);
1515

@@ -24,3 +24,15 @@ export const chatSlashCommandForeground = registerColor(
2424
{ dark: badgeForeground, light: badgeForeground, hcDark: Color.black, hcLight: badgeForeground },
2525
localize('chat.slashCommandForeground', 'The foreground color of a chat slash command.')
2626
);
27+
28+
export const chatAvatarBackground = registerColor(
29+
'chat.avatarBackground',
30+
{ dark: '#1f1f1f', light: '#f2f2f2', hcDark: Color.black, hcLight: Color.white, },
31+
localize('chat.avatarBackground', 'The background color of a chat avatar.')
32+
);
33+
34+
export const chatAvatarForeground = registerColor(
35+
'chat.avatarForeground',
36+
{ dark: foreground, light: foreground, hcDark: foreground, hcLight: foreground, },
37+
localize('chat.avatarForeground', 'The foreground color of a chat avatar.')
38+
);

0 commit comments

Comments
 (0)