Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/sessions/common/theme.ts
13389 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
// Agent-sessions color tokens.
7
//
8
// Registrations live here in the sessions layer. The workbench entry point
9
// (`workbench.common.main.ts`) imports this file as a side-effect so the
10
// tokens are present in the global color registry and JSON theme schema
11
// for both the main workbench and the sessions workbench.
12
13
import { localize } from '../../nls.js';
14
import { registerColor, transparent } from '../../platform/theme/common/colorUtils.js';
15
import { contrastBorder, focusBorder } from '../../platform/theme/common/colorRegistry.js';
16
import { editorWidgetBorder, editorBackground, toolbarHoverBackground } from '../../platform/theme/common/colors/editorColors.js';
17
import { buttonBackground, buttonBorder, inputBackground, inputBorder, inputForeground, inputPlaceholderForeground } from '../../platform/theme/common/colors/inputColors.js';
18
import { ACTIVITY_BAR_BADGE_BACKGROUND, ACTIVITY_BAR_BADGE_FOREGROUND, PANEL_BORDER, SIDE_BAR_BACKGROUND, SIDE_BAR_FOREGROUND } from '../../workbench/common/theme.js';
19
20
// ============================================================================
21
// Shell background (used by the gradient system)
22
// ============================================================================
23
24
export const agentsBackground = registerColor(
25
'agents.background',
26
{ dark: editorBackground, light: SIDE_BAR_BACKGROUND, hcDark: editorBackground, hcLight: editorBackground },
27
localize('agents.background', 'Background color of the agent sessions window shell and gradient base.')
28
);
29
30
// ============================================================================
31
// Panels (chat panel, auxiliary bar, terminal panel)
32
// ============================================================================
33
34
export const agentsPanelBackground = registerColor(
35
'agentsPanel.background',
36
{ dark: SIDE_BAR_BACKGROUND, light: editorBackground, hcDark: SIDE_BAR_BACKGROUND, hcLight: SIDE_BAR_BACKGROUND },
37
localize('agentsPanel.background', 'Background color of the card panels (chat, files, terminal) in the agent sessions window.')
38
);
39
40
export const agentsPanelForeground = registerColor(
41
'agentsPanel.foreground', SIDE_BAR_FOREGROUND,
42
localize('agentsPanel.foreground', 'Foreground color of the card panels (chat, files, terminal) in the agent sessions window.')
43
);
44
45
export const agentsPanelBorder = registerColor(
46
'agentsPanel.border',
47
{ dark: PANEL_BORDER, light: editorWidgetBorder, hcDark: contrastBorder, hcLight: contrastBorder },
48
localize('agentsPanel.border', 'Border color of the card panels (chat, files, terminal) in the agent sessions window.')
49
);
50
51
// ============================================================================
52
// Gradient background tint
53
// ============================================================================
54
55
export const agentsGradientTintColor = registerColor(
56
'agentsGradient.tintColor', buttonBackground,
57
localize('agentsGradient.tintColor', 'Tint color used in the background gradient of the agent sessions window shell.')
58
);
59
60
// ============================================================================
61
// Agent feedback input widget
62
// ============================================================================
63
64
export const agentFeedbackInputWidgetBorder = registerColor(
65
'agentFeedbackInputWidget.border',
66
{ dark: editorWidgetBorder, light: editorWidgetBorder, hcDark: contrastBorder, hcLight: contrastBorder },
67
localize('agentFeedbackInputWidget.border', 'Border color of the agent feedback input widget shown in the editor.')
68
);
69
70
// ============================================================================
71
// Update button
72
// ============================================================================
73
74
export const agentsUpdateButtonDownloadingBackground = registerColor(
75
'agentsUpdateButton.downloadingBackground', transparent(buttonBackground, 0.4),
76
localize('agentsUpdateButton.downloadingBackground', 'Background color of the update button to show download progress in the agent sessions window.')
77
);
78
79
export const agentsUpdateButtonDownloadedBackground = registerColor(
80
'agentsUpdateButton.downloadedBackground', transparent(buttonBackground, 0.7),
81
localize('agentsUpdateButton.downloadedBackground', 'Background color of the update button when download is complete in the agent sessions window.')
82
);
83
84
// ============================================================================
85
// Chat input
86
// ============================================================================
87
88
export const agentsChatInputBackground = registerColor(
89
'agentsChatInput.background', inputBackground,
90
localize('agentsChatInput.background', 'Background color of the chat input field in the agent sessions window.')
91
);
92
93
export const agentsChatInputForeground = registerColor(
94
'agentsChatInput.foreground', inputForeground,
95
localize('agentsChatInput.foreground', 'Foreground color of the chat input field in the agent sessions window.')
96
);
97
98
export const agentsChatInputBorder = registerColor(
99
'agentsChatInput.border', inputBorder,
100
localize('agentsChatInput.border', 'Border color of the chat input field in the agent sessions window.')
101
);
102
103
export const agentsChatInputFocusBorder = registerColor(
104
'agentsChatInput.focusBorder', focusBorder,
105
localize('agentsChatInput.focusBorder', 'Border color of the chat input field when focused in the agent sessions window.')
106
);
107
108
export const agentsChatInputPlaceholderForeground = registerColor(
109
'agentsChatInput.placeholderForeground', inputPlaceholderForeground,
110
localize('agentsChatInput.placeholderForeground', 'Placeholder text color in the chat input field in the agent sessions window.')
111
);
112
113
// ============================================================================
114
// New session button
115
// ============================================================================
116
117
export const agentsNewSessionButtonBackground = registerColor(
118
'agentsNewSessionButton.background', '#00000000',
119
localize('agentsNewSessionButton.background', 'Background color of the New Session button in the agent sessions sidebar.')
120
);
121
122
export const agentsNewSessionButtonForeground = registerColor(
123
'agentsNewSessionButton.foreground', SIDE_BAR_FOREGROUND,
124
localize('agentsNewSessionButton.foreground', 'Foreground color of the New Session button in the agent sessions sidebar.')
125
);
126
127
export const agentsNewSessionButtonBorder = registerColor(
128
'agentsNewSessionButton.border', buttonBorder,
129
localize('agentsNewSessionButton.border', 'Border color of the New Session button in the agent sessions sidebar.')
130
);
131
132
export const agentsNewSessionButtonHoverBackground = registerColor(
133
'agentsNewSessionButton.hoverBackground', toolbarHoverBackground,
134
localize('agentsNewSessionButton.hoverBackground', 'Background color of the New Session button when hovered in the agent sessions sidebar.')
135
);
136
137
// ============================================================================
138
// Badge
139
// ============================================================================
140
141
export const agentsBadgeBackground = registerColor(
142
'agentsBadge.background', ACTIVITY_BAR_BADGE_BACKGROUND,
143
localize('agentsBadge.background', 'Background color of badges in the agent sessions window.')
144
);
145
146
export const agentsBadgeForeground = registerColor(
147
'agentsBadge.foreground', ACTIVITY_BAR_BADGE_FOREGROUND,
148
localize('agentsBadge.foreground', 'Foreground color of badges in the agent sessions window.')
149
);
150
151
// ============================================================================
152
// Unread session indicator
153
// ============================================================================
154
155
export const agentsUnreadBadgeBackground = registerColor(
156
'agentsUnreadBadge.background', ACTIVITY_BAR_BADGE_BACKGROUND,
157
localize('agentsUnreadBadge.background', 'Background color of the unread sessions count badge on the sidebar toggle.')
158
);
159
160
export const agentsUnreadBadgeForeground = registerColor(
161
'agentsUnreadBadge.foreground', ACTIVITY_BAR_BADGE_FOREGROUND,
162
localize('agentsUnreadBadge.foreground', 'Foreground color of the unread sessions count badge on the sidebar toggle.')
163
);
164
165