From 263f339cfcea5c110318aed46018756bd6d4fcfe Mon Sep 17 00:00:00 2001 From: Benjamin Christopher Simmonds <44439583+benibenj@users.noreply.github.com> Date: Fri, 26 Jun 2026 10:22:29 +0200 Subject: [PATCH] agents: enhance contrast agent feedback widget 6ce216a8 (#323040) Agent Host changes for agents/enhance-contrast-agent-feedback-widget-6ce216a8 --- .../lib/stylelint/vscode-known-variables.json | 2 ++ src/vs/sessions/common/theme.ts | 19 ++++++++++++++++--- .../media/agentFeedbackEditorWidget.css | 13 +++++++++---- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/build/lib/stylelint/vscode-known-variables.json b/build/lib/stylelint/vscode-known-variables.json index a443f51c0a1..7d6bef2b41b 100644 --- a/build/lib/stylelint/vscode-known-variables.json +++ b/build/lib/stylelint/vscode-known-variables.json @@ -21,6 +21,8 @@ "--vscode-activityErrorBadge-foreground", "--vscode-activityWarningBadge-background", "--vscode-activityWarningBadge-foreground", + "--vscode-agentFeedbackEditorWidget-background", + "--vscode-agentFeedbackEditorWidget-border", "--vscode-agentFeedbackInputWidget-border", "--vscode-agentSessionReadIndicator-foreground", "--vscode-agentSessionSelectedBadge-border", diff --git a/src/vs/sessions/common/theme.ts b/src/vs/sessions/common/theme.ts index a6f4c24ab04..1e74e57fddc 100644 --- a/src/vs/sessions/common/theme.ts +++ b/src/vs/sessions/common/theme.ts @@ -11,9 +11,10 @@ // for both the main workbench and the sessions workbench. import { localize } from '../../nls.js'; -import { registerColor, transparent } from '../../platform/theme/common/colorUtils.js'; +import { Color } from '../../base/common/color.js'; +import { darken, lighten, registerColor, transparent } from '../../platform/theme/common/colorUtils.js'; import { contrastBorder, focusBorder } from '../../platform/theme/common/colorRegistry.js'; -import { editorWidgetBorder, editorBackground, toolbarHoverBackground } from '../../platform/theme/common/colors/editorColors.js'; +import { editorWidgetBackground, editorWidgetBorder, editorBackground, toolbarHoverBackground } from '../../platform/theme/common/colors/editorColors.js'; import { foreground } from '../../platform/theme/common/colors/baseColors.js'; import { buttonBackground, buttonSecondaryBorder, inputBackground, inputBorder, inputForeground, inputPlaceholderForeground } from '../../platform/theme/common/colors/inputColors.js'; import { ACTIVITY_BAR_BADGE_BACKGROUND, ACTIVITY_BAR_BADGE_FOREGROUND, SIDE_BAR_BACKGROUND, SIDE_BAR_FOREGROUND } from '../../workbench/common/theme.js'; @@ -59,9 +60,21 @@ export const agentsGradientTintColor = registerColor( ); // ============================================================================ -// Agent feedback input widget +// Agent feedback editor widgets // ============================================================================ +export const agentFeedbackEditorWidgetBackground = registerColor( + 'agentFeedbackEditorWidget.background', + { dark: lighten(editorWidgetBackground, 0.08), light: darken(editorWidgetBackground, 0.04), hcDark: Color.black, hcLight: Color.white }, + localize('agentFeedbackEditorWidget.background', 'Background color of the agent feedback widget shown in the editor.') +); + +export const agentFeedbackEditorWidgetBorder = registerColor( + 'agentFeedbackEditorWidget.border', + { dark: transparent(foreground, 0.35), light: transparent(foreground, 0.35), hcDark: contrastBorder, hcLight: contrastBorder }, + localize('agentFeedbackEditorWidget.border', 'Border color of the agent feedback widget shown in the editor.') +); + export const agentFeedbackInputWidgetBorder = registerColor( 'agentFeedbackInputWidget.border', { dark: editorWidgetBorder, light: editorWidgetBorder, hcDark: contrastBorder, hcLight: contrastBorder }, diff --git a/src/vs/sessions/contrib/agentFeedback/browser/media/agentFeedbackEditorWidget.css b/src/vs/sessions/contrib/agentFeedback/browser/media/agentFeedbackEditorWidget.css index 9fd9c047a28..1361be5fe04 100644 --- a/src/vs/sessions/contrib/agentFeedback/browser/media/agentFeedbackEditorWidget.css +++ b/src/vs/sessions/contrib/agentFeedback/browser/media/agentFeedbackEditorWidget.css @@ -8,8 +8,8 @@ position: absolute; max-width: 280px; min-width: 180px; - background-color: var(--vscode-editorWidget-background); - border: 1px solid var(--vscode-editorWidget-border, var(--vscode-contrastBorder)); + background-color: var(--vscode-agentFeedbackEditorWidget-background, var(--vscode-editorWidget-background)); + border: var(--vscode-strokeThickness) solid var(--vscode-agentFeedbackEditorWidget-border, var(--vscode-editorWidget-border, var(--vscode-contrastBorder))); border-radius: var(--vscode-cornerRadius-large); box-shadow: var(--vscode-shadow-lg); font-size: var(--vscode-agents-fontSize-label1); @@ -19,6 +19,11 @@ z-index: 10; } +.hc-black .agent-feedback-widget, +.hc-light .agent-feedback-widget { + box-shadow: none; +} + .agent-feedback-widget.visible { opacity: 1; } @@ -45,7 +50,7 @@ height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; - border-right: 6px solid var(--vscode-editorWidget-border, var(--vscode-contrastBorder)); + border-right: 6px solid var(--vscode-agentFeedbackEditorWidget-border, var(--vscode-editorWidget-border, var(--vscode-contrastBorder))); display: none; } @@ -62,7 +67,7 @@ height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; - border-right: 5px solid var(--vscode-editorWidget-background); + border-right: 5px solid var(--vscode-agentFeedbackEditorWidget-background, var(--vscode-editorWidget-background)); } /* Header */