Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/sessions/contrib/chat/browser/media/chatWidget.css
13405 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
.sessions-chat-widget {
7
display: flex;
8
flex-direction: column;
9
height: 100%;
10
width: 100%;
11
position: relative;
12
}
13
14
.new-chat-widget-container {
15
display: flex;
16
flex-direction: column;
17
/* Cross-axis: keep children flush left so the input's left edge — and therefore
18
* the attach (+) button — stays anchored as the viewport narrows past max-width. */
19
align-items: flex-start;
20
justify-content: center;
21
width: 100%;
22
height: 100%;
23
box-sizing: border-box;
24
overflow: hidden;
25
padding: 16px 16px 20px 16px;
26
/* Establishes a size container so the @container (max-width: 330px) query below
27
* can collapse picker labels to icon-only when the new-chat area is narrow. */
28
container-type: size;
29
position: relative;
30
}
31
32
.new-chat-widget-container.revealed {
33
justify-content: center;
34
}
35
36
.new-chat-widget-container.revealed .new-chat-input-container {
37
display: block;
38
animation: chat-full-welcome-fade-in 0.35s ease 0.15s both;
39
}
40
41
/* Option group pickers container (above the input) */
42
.new-session-workspace-picker-container {
43
display: none;
44
width: 100%;
45
max-width: 800px;
46
padding: 0;
47
box-sizing: border-box;
48
}
49
50
.new-chat-widget-container.revealed .new-session-workspace-picker-container {
51
display: block;
52
animation: chat-full-welcome-fade-in 0.35s ease 0.1s both;
53
}
54
55
@keyframes chat-full-welcome-fade-in {
56
from {
57
opacity: 0;
58
transform: translateY(12px);
59
}
60
61
to {
62
opacity: 1;
63
transform: translateY(0);
64
}
65
}
66
67
.new-session-workspace-picker-container:empty {
68
display: none;
69
margin-bottom: 0;
70
}
71
72
.new-chat-widget-content {
73
width: 100%;
74
max-width: 800px;
75
display: flex;
76
flex-direction: column;
77
align-items: stretch;
78
align-self: center;
79
}
80
81
.new-chat-widget-container .new-chat-bottom-container {
82
width: 100%;
83
max-width: 800px;
84
margin-top: 4px;
85
padding: 0 4px;
86
box-sizing: border-box;
87
display: none;
88
flex-direction: row;
89
align-items: center;
90
gap: 4px;
91
min-height: 28px;
92
justify-content: space-between;
93
}
94
95
.new-chat-widget-container.revealed .new-chat-bottom-container {
96
display: flex;
97
}
98
99
.new-chat-widget-container .new-chat-bottom-container .new-chat-controls-container {
100
display: flex;
101
gap: 4px;
102
min-width: 0;
103
overflow: hidden;
104
}
105
106
.new-chat-widget-container .new-chat-bottom-container .new-chat-repo-config-container {
107
display: flex;
108
align-items: center;
109
gap: 2px;
110
min-width: 0;
111
overflow: hidden;
112
}
113
114
/* Allow nested toolbar items to shrink so labels can ellipsize when space is tight.
115
* Mirrors the regular chat-input-toolbar pattern: each flex layer between the
116
* bounded container and the ellipsizing label gets `min-width: 0; overflow: hidden`. */
117
.new-chat-widget-container .new-chat-bottom-container .new-chat-controls-container > *,
118
.new-chat-widget-container .new-chat-bottom-container .new-chat-repo-config-container > *,
119
.new-chat-widget-container .new-chat-bottom-container .sessions-chat-picker-slot .action-label {
120
min-width: 0;
121
overflow: hidden;
122
}
123
124
/* Floor each picker so the icon + chevron (+ padding) stay visible even when
125
* the label is fully ellipsized. Approx: 7px padding-left + 12px icon + 2px
126
* label margin + 16px chevron box + 1px padding-right ~= 38px. The floor must
127
* be applied to the outermost flex item (.action-item), not just the label,
128
* because the parent's `min-width: 0` would otherwise let it clip the chevron. */
129
.new-chat-widget-container .new-chat-bottom-container .monaco-action-bar .action-item,
130
.new-chat-widget-container .new-chat-bottom-container .sessions-chat-picker-slot .action-label,
131
.new-chat-widget-container .new-chat-bottom-container .monaco-action-bar .action-item .action-label {
132
min-width: 30px;
133
overflow: hidden;
134
}
135
136
/* Below this width the bottom-row pickers can't fit their labels comfortably,
137
* so collapse to icon + chevron only. The .new-chat-widget-container declares
138
* `container-type: size` which makes this a size container query. */
139
@container (max-width: 330px) {
140
/* Bottom-row pickers (Copilot CLI, Default Approvals, Worktree, branch): icon-only */
141
.new-chat-widget-container .new-chat-bottom-container .sessions-chat-dropdown-label {
142
display: none;
143
}
144
145
/* Chat input config toolbar: hide mode picker label (uses sessions-chat-dropdown-label),
146
* but keep the model picker label (uses chat-input-picker-label) visible. */
147
.new-chat-widget-container .sessions-chat-config-toolbar .sessions-chat-dropdown-label {
148
display: none;
149
}
150
}
151
152
/* Spacing between action items inside the bottom-row toolbars (e.g. Worktree, branch) */
153
.new-chat-widget-container .new-chat-bottom-container .monaco-action-bar .actions-container {
154
gap: 4px;
155
}
156
157
/* Match VS Code chat-secondary-toolbar sizing for action items in the bottom row
158
* (e.g. session control pickers and repo config pickers) so they align with the
159
* mode/model picker font in the input toolbar. The 1px right padding is intentional
160
* because the chevron's 16x16 codicon box supplies the visual right padding. */
161
.new-chat-widget-container .new-chat-bottom-container .action-label {
162
height: 16px;
163
padding: 3px 1px 3px 7px;
164
font-size: 11px;
165
color: var(--vscode-icon-foreground);
166
}
167
168
.new-chat-widget-container .new-chat-bottom-container .action-label > .codicon {
169
font-size: 12px;
170
}
171
172
.new-chat-widget-container .new-chat-bottom-container .action-label > .codicon-chevron-down {
173
font-size: 10px;
174
margin-left: 4px;
175
}
176
177
/* Pickers row - two equal halves */
178
.session-workspace-picker {
179
display: flex;
180
flex-direction: row;
181
flex-wrap: nowrap;
182
align-items: center;
183
justify-content: flex-start;
184
gap: 6px;
185
width: 100%;
186
box-sizing: border-box;
187
padding: 0;
188
}
189
190
.session-workspace-picker:empty {
191
display: none;
192
}
193
194
.session-workspace-picker-label {
195
font-size: 18px;
196
line-height: 1.25;
197
color: var(--vscode-descriptionForeground);
198
white-space: nowrap;
199
}
200
201
/* Project picker in inline title row */
202
.sessions-chat-picker-slot.sessions-chat-workspace-picker .action-label {
203
height: auto;
204
padding: 4px;
205
font-size: 18px;
206
line-height: 1.25;
207
border: none;
208
background-color: transparent;
209
color: var(--vscode-foreground);
210
border-radius: 4px;
211
touch-action: manipulation;
212
}
213
214
.sessions-chat-picker-slot.sessions-chat-workspace-picker .action-label:hover {
215
background-color: var(--vscode-toolbar-hoverBackground);
216
color: var(--vscode-foreground);
217
}
218
219
.sessions-chat-picker-slot.sessions-chat-workspace-picker .action-label .sessions-chat-dropdown-label {
220
font-size: 18px;
221
}
222
223
.sessions-chat-picker-slot.sessions-chat-workspace-picker .action-label > .codicon:not(.sessions-chat-dropdown-chevron) {
224
font-size: 16px;
225
margin: 0;
226
}
227
228
.sessions-chat-picker-slot.sessions-chat-workspace-picker .action-label .sessions-chat-dropdown-chevron {
229
display: inline-flex;
230
align-items: center;
231
justify-content: center;
232
font-size: 16px;
233
margin-left: 6px;
234
line-height: 1;
235
transform: translateY(1px);
236
}
237
238
.sessions-chat-dropdown-label {
239
margin-left: 6px;
240
overflow: hidden;
241
text-overflow: ellipsis;
242
white-space: nowrap;
243
min-width: 0;
244
}
245
246
.sessions-chat-picker-slot {
247
display: flex;
248
align-items: center;
249
min-width: 0;
250
overflow: hidden;
251
}
252
253
.sessions-chat-picker-slot .action-label {
254
display: flex;
255
align-items: center;
256
height: 16px;
257
padding: 3px 1px 3px 7px;
258
background-color: transparent;
259
border: none;
260
color: var(--vscode-icon-foreground);
261
cursor: pointer;
262
touch-action: manipulation;
263
white-space: nowrap;
264
border-radius: 4px;
265
min-width: 0;
266
overflow: hidden;
267
}
268
269
.sessions-chat-picker-slot .action-label.hidden {
270
display: none;
271
}
272
273
.sessions-chat-picker-slot .action-label:hover {
274
background-color: var(--vscode-toolbar-hoverBackground);
275
color: var(--vscode-foreground);
276
}
277
278
.sessions-chat-picker-slot.disabled .action-label {
279
opacity: 0.5;
280
cursor: default;
281
pointer-events: none;
282
}
283
284
.sessions-chat-picker-slot.disabled .action-label:hover {
285
background-color: transparent;
286
color: var(--vscode-icon-foreground);
287
}
288
289
.sessions-chat-picker-slot.loading .action-label {
290
opacity: 0.5;
291
cursor: default;
292
pointer-events: none;
293
}
294
295
.sessions-chat-picker-slot.loading .action-label .codicon-chevron-down {
296
display: none;
297
}
298
299
.sessions-chat-picker-slot.loading .action-label::after {
300
content: '';
301
display: inline-block;
302
width: 12px;
303
height: 12px;
304
margin-left: 4px;
305
border: 1.5px solid var(--vscode-descriptionForeground);
306
border-top-color: transparent;
307
border-radius: 50%;
308
animation: sessions-chat-picker-spin 0.8s linear infinite;
309
flex-shrink: 0;
310
}
311
312
@keyframes sessions-chat-picker-spin {
313
to {
314
transform: rotate(360deg);
315
}
316
}
317
318
.sessions-chat-picker-slot .action-label .codicon {
319
font-size: 12px;
320
flex-shrink: 0;
321
/* Override the base .monaco-action-bar .action-item .codicon { width:16px; height:16px }
322
* so codicons here size naturally to their font-size, matching pickers (like Copilot CLI)
323
* that are rendered outside a monaco-action-bar. */
324
width: auto;
325
height: auto;
326
}
327
328
.sessions-chat-picker-slot .action-label .codicon-chevron-down {
329
display: inline-flex;
330
align-items: center;
331
justify-content: center;
332
font-size: 10px;
333
margin-left: 2px;
334
line-height: 1;
335
width: 12px;
336
height: 12px;
337
}
338
339
.sessions-chat-picker-slot .action-label .chat-session-option-label {
340
overflow: hidden;
341
text-overflow: ellipsis;
342
}
343
344
.sessions-chat-picker-slot .action-label span + .chat-session-option-label {
345
margin-left: 2px;
346
}
347
348
.sessions-chat-picker-slot .action-label.warning {
349
color: var(--vscode-problemsWarningIcon-foreground);
350
opacity: 0.75;
351
}
352
353
.sessions-chat-picker-slot .action-label.warning .codicon {
354
color: var(--vscode-problemsWarningIcon-foreground) !important;
355
}
356
357
.sessions-chat-picker-slot .action-label.warning:hover {
358
color: var(--vscode-problemsWarningIcon-foreground);
359
opacity: 1;
360
}
361
362
.sessions-chat-picker-slot .action-label.info {
363
color: var(--vscode-problemsInfoIcon-foreground);
364
opacity: 0.75;
365
}
366
367
.sessions-chat-picker-slot .action-label.info .codicon {
368
color: var(--vscode-problemsInfoIcon-foreground) !important;
369
}
370
371
.sessions-chat-picker-slot .action-label.info:hover {
372
color: var(--vscode-problemsInfoIcon-foreground);
373
opacity: 1;
374
}
375
376
/* Tab bar styles live with the platform widget
377
* (`platform/actionWidget/browser/tabbedActionListWidget.css`). The
378
* `sessions-workspace-picker-tabbar` class is applied alongside the
379
* generic class so picker-specific overrides can be added here if needed. */
380
381
/* Inline browse actions (e.g. "Select Folders…" entries in the Remote tab):
382
* show the host name as the primary label and only reveal the secondary
383
* "Select Folders…" description on hover/focus to reduce repetition. */
384
.action-widget .monaco-list-row.action.sessions-browse-inline-item .description {
385
visibility: hidden;
386
}
387
388
.action-widget .monaco-list-row.action.sessions-browse-inline-item:hover:not(.option-disabled) .description,
389
.action-widget .monaco-list-row.action.sessions-browse-inline-item.focused:not(.option-disabled) .description {
390
visibility: visible;
391
}
392
393