Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/sessions/contrib/chat/browser/media/chatInput.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
.new-chat-input-container {
7
width: 100%;
8
max-width: 800px;
9
margin-top: 12px;
10
box-sizing: border-box;
11
display: none;
12
}
13
14
/* Ensure the input editor fits properly */
15
.new-chat-input-container .interactive-input-part {
16
margin: 0;
17
padding: 0;
18
max-width: 100%;
19
box-sizing: border-box;
20
}
21
22
.new-chat-input-container .interactive-input-part .monaco-editor {
23
min-height: 0;
24
}
25
26
.new-chat-input-container .interactive-input-part .monaco-editor .view-lines {
27
min-height: 0;
28
}
29
30
.new-chat-input-container .chat-input-container {
31
overflow: hidden;
32
border-color: var(--vscode-agentsChatInput-border);
33
}
34
35
.new-chat-input-area {
36
position: relative;
37
width: 100%;
38
max-width: 800px;
39
box-sizing: border-box;
40
border: 1px solid var(--vscode-agentsChatInput-border);
41
border-radius: 8px;
42
background-color: var(--vscode-agentsChatInput-background);
43
color: var(--vscode-agentsChatInput-foreground);
44
overflow: hidden;
45
display: flex;
46
flex-direction: column;
47
}
48
49
.new-chat-input-area:focus-within {
50
border-color: var(--vscode-agentsChatInput-focusBorder, var(--vscode-focusBorder));
51
}
52
53
.new-chat-input-area .monaco-editor .ghost-text-decoration {
54
color: var(--vscode-agentsChatInput-placeholderForeground);
55
}
56
57
.chat-input-picker-item .action-label.disabled {
58
opacity: 0.5;
59
cursor: default;
60
pointer-events: none;
61
}
62
63
/* Height constraints are driven by MIN_EDITOR_HEIGHT / MAX_EDITOR_HEIGHT in newChatViewPane.ts */
64
.sessions-chat-editor {
65
padding: 2px 10px 0 10px;
66
flex-shrink: 1;
67
}
68
69
.sessions-chat-editor .monaco-editor,
70
.sessions-chat-editor .monaco-editor .overflow-guard,
71
.sessions-chat-editor .monaco-editor-background {
72
background-color: transparent !important;
73
border-radius: 8px 8px 0 0;
74
}
75
76
/* Toolbar */
77
.sessions-chat-toolbar {
78
display: flex;
79
align-items: center;
80
padding: 4px 6px 6px 6px;
81
gap: 4px;
82
color: var(--vscode-icon-foreground);
83
}
84
85
.sessions-chat-toolbar-spacer {
86
flex: 1;
87
}
88
89
/* Model picker - uses workbench ModelPickerActionItem */
90
/* Session config toolbar (mode, model pickers via MenuWorkbenchToolBar) */
91
.sessions-chat-config-toolbar {
92
display: flex;
93
align-items: center;
94
min-width: 0;
95
overflow: hidden;
96
}
97
98
.sessions-chat-config-toolbar .monaco-toolbar {
99
height: auto;
100
min-width: 0;
101
overflow: hidden;
102
}
103
104
.sessions-chat-config-toolbar .monaco-action-bar,
105
.sessions-chat-config-toolbar .monaco-action-bar .actions-container {
106
min-width: 0;
107
overflow: hidden;
108
}
109
110
.sessions-chat-config-toolbar .monaco-action-bar .action-item {
111
display: flex;
112
align-items: center;
113
min-width: 30px;
114
overflow: hidden;
115
}
116
117
/* Prevent the mode picker from shrinking so the model picker label
118
* ellipsizes first rather than the mode picker collapsing to icon-only. */
119
.sessions-chat-config-toolbar .monaco-action-bar .action-item:has(.sessions-chat-dropdown-label) {
120
flex-shrink: 0;
121
}
122
123
.sessions-chat-config-toolbar .action-label {
124
display: flex;
125
align-items: center;
126
height: 16px;
127
padding: 3px 1px 3px 7px;
128
background-color: transparent;
129
border: none;
130
border-radius: 4px;
131
cursor: pointer;
132
touch-action: manipulation;
133
color: var(--vscode-icon-foreground);
134
white-space: nowrap;
135
min-width: 30px;
136
overflow: hidden;
137
}
138
139
.sessions-chat-config-toolbar .action-label:hover {
140
background-color: var(--vscode-toolbar-hoverBackground);
141
color: var(--vscode-foreground);
142
}
143
144
.sessions-chat-config-toolbar .action-label,
145
.sessions-chat-config-toolbar .action-label .chat-input-picker-label {
146
font-size: 11px;
147
}
148
149
/* Allow long labels (e.g. the model picker name) to ellipsize when space is tight */
150
.sessions-chat-config-toolbar .action-label .chat-input-picker-label {
151
margin-left: 6px;
152
overflow: hidden;
153
text-overflow: ellipsis;
154
white-space: nowrap;
155
min-width: 0;
156
}
157
158
/* When the picker has no leading icon (e.g. model picker), drop the icon-to-label gap. */
159
.sessions-chat-config-toolbar .action-label .chat-input-picker-label:first-child {
160
margin-left: 0;
161
}
162
163
.sessions-chat-config-toolbar .monaco-action-bar .action-item .action-label > .codicon {
164
font-size: 12px;
165
flex-shrink: 0;
166
/* Override the base .monaco-action-bar .action-item .codicon { width:16px; height:16px }
167
* so the leading icon sizes naturally to its font-size, matching the bottom-row pickers. */
168
width: auto;
169
height: auto;
170
}
171
172
.sessions-chat-config-toolbar .monaco-action-bar .action-item .action-label > .codicon-chevron-down {
173
display: inline-flex;
174
align-items: center;
175
justify-content: center;
176
font-size: 10px;
177
margin-left: 2px;
178
line-height: 1;
179
width: 12px;
180
height: 12px;
181
}
182
183
/* Spacing between action items inside the chat input config toolbar (mode + model picker) */
184
.sessions-chat-config-toolbar .monaco-action-bar .actions-container {
185
gap: 4px;
186
}
187
188
/* Delightful gradient styling for the chat send (submit) button. The button
189
is filled at rest with a slowly rotating multi-color conic gradient using
190
the same palette as the working-state border, and emits a quick colorful
191
pulse on click. */
192
@property --chat-send-button-anim-angle {
193
syntax: '<angle>';
194
inherits: false;
195
initial-value: 135deg;
196
}
197
198
@keyframes chat-send-button-spin {
199
from {
200
--chat-send-button-anim-angle: 135deg;
201
}
202
203
to {
204
--chat-send-button-anim-angle: 495deg;
205
}
206
}
207
208
@keyframes chat-send-button-color-cycle {
209
0%,
210
100% {
211
background-color: color-mix(in srgb, var(--vscode-chat-inputWorkingBorderColor1) 60%, var(--vscode-input-background));
212
}
213
214
33% {
215
background-color: color-mix(in srgb, var(--vscode-chat-inputWorkingBorderColor2) 60%, var(--vscode-input-background));
216
}
217
218
66% {
219
background-color: color-mix(in srgb, var(--vscode-chat-inputWorkingBorderColor3) 60%, var(--vscode-input-background));
220
}
221
}
222
223
@keyframes chat-send-button-pulse {
224
0% {
225
opacity: 0.7;
226
transform: scale(1);
227
}
228
229
100% {
230
opacity: 0;
231
transform: scale(1.3);
232
}
233
}
234
235
/* Send button - wraps a Button widget */
236
.sessions-chat-send-button {
237
display: flex;
238
align-items: center;
239
justify-content: center;
240
flex-shrink: 0;
241
position: relative;
242
width: 22px;
243
height: 22px;
244
border-radius: 4px;
245
}
246
247
.sessions-chat-send-button .monaco-button {
248
display: flex;
249
align-items: center;
250
justify-content: center;
251
width: 22px;
252
height: 22px;
253
min-width: 22px;
254
padding: 0;
255
border-radius: 4px;
256
color: var(--vscode-icon-foreground);
257
background: transparent;
258
border: none;
259
cursor: pointer;
260
position: relative;
261
z-index: 1;
262
transition: background-color 250ms ease, color 250ms ease;
263
}
264
265
.sessions-chat-send-button .monaco-button.disabled {
266
cursor: default;
267
}
268
269
/* Focus indicator drawn on the wrapper so it sits cleanly around the
270
22x22 button surface (the inner Button widget doesn't draw its own
271
focus border). */
272
.sessions-chat-send-button:has(.monaco-button:not(.disabled):focus-visible) {
273
outline: 1px solid var(--vscode-focusBorder);
274
outline-offset: 1px;
275
}
276
277
/* Suppress the inner button's default focus outline so it doesn't double up
278
with the wrapper outline above. */
279
.sessions-chat-send-button .monaco-button:focus,
280
.sessions-chat-send-button .monaco-button:focus-visible {
281
outline: none !important;
282
box-shadow: none !important;
283
}
284
285
.monaco-workbench .sessions-chat-send-button .monaco-button.codicon[class*='codicon-']::before,
286
.monaco-workbench .sessions-chat-send-button .monaco-button .codicon[class*='codicon-']::before {
287
/* Optical alignment: nudge arrow glyph 1px left to visually center it. */
288
display: inline-block;
289
transform: translateX(-0.5px);
290
}
291
292
/* Ensure no underline / link decoration ever shows under the codicon glyph
293
(the button is rendered as an <a> tag). */
294
.monaco-workbench .sessions-chat-send-button a.monaco-button,
295
.monaco-workbench .sessions-chat-send-button a.monaco-button:hover,
296
.monaco-workbench .sessions-chat-send-button a.monaco-button:focus,
297
.monaco-workbench .sessions-chat-send-button a.monaco-button:active,
298
.monaco-workbench .sessions-chat-send-button a.monaco-button.disabled {
299
text-decoration: none !important;
300
}
301
302
/* Idle: fill the entire button with a slowly rotating conic gradient (no
303
border ring).
304
305
Colors are darkened (60% mixed with input background) so the gradient
306
reads as a calm fill rather than a saturated accent, and the conic stops
307
are asymmetric so the fill has a clear head and tail rather than
308
mirroring around the mid-point. */
309
.sessions-chat-send-button .monaco-button:not(.disabled) {
310
background: conic-gradient(from var(--chat-send-button-anim-angle) at 0% 0%,
311
color-mix(in srgb, var(--vscode-chat-inputWorkingBorderColor1) 60%, var(--vscode-input-background)) 0deg,
312
color-mix(in srgb, var(--vscode-chat-inputWorkingBorderColor2) 60%, var(--vscode-input-background)) 90deg,
313
color-mix(in srgb, var(--vscode-chat-inputWorkingBorderColor3) 60%, var(--vscode-input-background)) 200deg,
314
color-mix(in srgb, var(--vscode-chat-inputWorkingBorderColor1) 60%, var(--vscode-input-background)) 360deg);
315
color: var(--vscode-button-foreground);
316
animation: chat-send-button-spin 8s linear infinite;
317
transition: box-shadow 120ms ease;
318
}
319
320
/* Hover/focus: subtle dark overlay to match standard toolbar button hover
321
feedback. Uses an inset box-shadow so the rotating gradient background is
322
preserved underneath. */
323
.sessions-chat-send-button:has(.monaco-button:not(.disabled):hover) .monaco-button,
324
.sessions-chat-send-button:has(.monaco-button:not(.disabled):focus-visible) .monaco-button {
325
box-shadow: inset 0 0 0 100px rgba(0, 0, 0, 0.12);
326
}
327
328
/* Click: outward color pulse on the wrapper. */
329
.sessions-chat-send-button:has(.monaco-button:not(.disabled):active)::after {
330
content: '';
331
position: absolute;
332
inset: -2px;
333
border-radius: 6px;
334
background: conic-gradient(from 135deg,
335
var(--vscode-chat-inputWorkingBorderColor1),
336
var(--vscode-chat-inputWorkingBorderColor2),
337
var(--vscode-chat-inputWorkingBorderColor3),
338
var(--vscode-chat-inputWorkingBorderColor2),
339
var(--vscode-chat-inputWorkingBorderColor1));
340
pointer-events: none;
341
animation: chat-send-button-pulse 400ms ease-out forwards;
342
z-index: 0;
343
}
344
345
@media (prefers-reduced-motion: reduce) {
346
.sessions-chat-send-button .monaco-button:not(.disabled),
347
.sessions-chat-send-button:has(.monaco-button:not(.disabled):active)::after {
348
animation: none;
349
}
350
}
351
352
/* Loading spinner in toolbar */
353
.sessions-chat-loading-spinner {
354
display: none;
355
width: 12px;
356
height: 12px;
357
margin-right: 4px;
358
border: 1.5px solid var(--vscode-icon-foreground);
359
border-top-color: transparent;
360
border-radius: 50%;
361
animation: sessions-chat-spin 0.8s linear infinite;
362
opacity: 0.6;
363
flex-shrink: 0;
364
}
365
366
.sessions-chat-loading-spinner.visible {
367
display: block;
368
}
369
370
@keyframes sessions-chat-spin {
371
to {
372
transform: rotate(360deg);
373
}
374
}
375
376
/* Attach row (pills only, above editor, inside input area) */
377
.sessions-chat-attach-row {
378
display: flex;
379
flex-wrap: wrap;
380
align-items: center;
381
gap: 4px;
382
padding: 4px 6px 0 6px;
383
}
384
385
.sessions-chat-attach-row:has(.sessions-chat-attached-context:empty) {
386
display: none;
387
}
388
389
/* Attach context button */
390
.sessions-chat-attach-button {
391
display: flex;
392
align-items: center;
393
justify-content: center;
394
width: 22px;
395
height: 22px;
396
flex-shrink: 0;
397
border-radius: 4px;
398
cursor: pointer;
399
color: var(--vscode-icon-foreground);
400
background: transparent;
401
border: none;
402
outline: none;
403
}
404
405
.sessions-chat-attach-button:hover {
406
background-color: var(--vscode-toolbar-hoverBackground);
407
}
408
409
.sessions-chat-attach-button:focus-visible {
410
outline: 1px solid var(--vscode-focusBorder);
411
outline-offset: -1px;
412
}
413
414
.monaco-workbench .sessions-chat-attach-button .codicon[class*='codicon-'] {
415
font-size: 14px;
416
}
417
418
/* Attached context container */
419
.sessions-chat-attached-context {
420
display: flex;
421
flex-wrap: wrap;
422
gap: 4px;
423
align-items: center;
424
}
425
426
.sessions-chat-attached-context:empty,
427
.sessions-chat-attached-context[style*="display: none"] {
428
display: none !important;
429
}
430
431
/* Attachment pills */
432
.sessions-chat-attachment-pill {
433
display: inline-flex;
434
align-items: center;
435
overflow: hidden;
436
font-size: 11px;
437
padding: 0 4px 0 0;
438
border: 1px solid var(--vscode-chat-requestBorder, var(--vscode-input-background, transparent));
439
border-radius: 4px;
440
height: 18px;
441
max-width: 200px;
442
width: fit-content;
443
}
444
445
.sessions-chat-attachment-name {
446
overflow: hidden;
447
text-overflow: ellipsis;
448
white-space: nowrap;
449
}
450
451
.sessions-chat-attachment-pill .codicon {
452
font-size: 14px;
453
flex-shrink: 0;
454
padding: 0 3px;
455
}
456
457
.sessions-chat-attachment-pill .monaco-icon-label {
458
gap: 4px;
459
}
460
461
.sessions-chat-attachment-pill .monaco-icon-label::before {
462
height: auto;
463
padding: 0 0 0 2px;
464
line-height: 100% !important;
465
align-self: center;
466
}
467
468
.sessions-chat-attachment-pill .monaco-icon-label .monaco-icon-label-container {
469
display: flex;
470
}
471
472
.sessions-chat-attachment-pill .monaco-icon-label .monaco-icon-label-container .monaco-highlighted-label {
473
display: inline-flex;
474
align-items: center;
475
overflow: hidden;
476
white-space: nowrap;
477
text-overflow: ellipsis;
478
}
479
480
.sessions-chat-attachment-remove {
481
display: flex;
482
align-items: center;
483
justify-content: center;
484
cursor: pointer;
485
flex-shrink: 0;
486
color: var(--vscode-descriptionForeground);
487
margin-left: 4px;
488
}
489
490
.sessions-chat-attachment-pill:hover {
491
background-color: var(--vscode-toolbar-hoverBackground);
492
}
493
494
.sessions-chat-attachment-remove .codicon {
495
font-size: 12px;
496
padding: 0;
497
}
498
499
.sessions-chat-attachment-remove:hover {
500
background-color: var(--vscode-toolbar-hoverBackground);
501
}
502
503
/* Drag and drop */
504
.sessions-chat-dnd-overlay {
505
position: absolute;
506
top: 0;
507
left: 0;
508
width: 100%;
509
height: 100%;
510
box-sizing: border-box;
511
display: none;
512
z-index: 10;
513
background-color: var(--vscode-sideBar-dropBackground, var(--vscode-list-dropBackground));
514
}
515
516
.sessions-chat-dnd-overlay.visible {
517
display: flex;
518
align-items: center;
519
justify-content: center;
520
}
521
522
.sessions-chat-dnd-overlay .attach-context-overlay-text {
523
padding: 0.6em;
524
margin: 0.2em;
525
line-height: 12px;
526
height: 12px;
527
display: flex;
528
align-items: center;
529
text-align: center;
530
background-color: var(--vscode-sideBar-background, var(--vscode-editor-background));
531
}
532
533
.sessions-chat-dnd-overlay .attach-context-overlay-text .codicon {
534
height: 12px;
535
font-size: 12px;
536
margin-right: 3px;
537
}
538
539
/* --- Chat input notification in the new-session homepage --- */
540
541
/* Hide the container when no notification is active */
542
.new-chat-input-container > .chat-input-notification-container:not(.has-notification) {
543
display: none;
544
}
545
546
.new-chat-input-container > .chat-input-notification-container .chat-input-notification {
547
padding: 12px 16px;
548
box-sizing: border-box;
549
border: 1px solid var(--vscode-input-border, transparent);
550
border-bottom: none;
551
border-top-left-radius: 8px;
552
border-top-right-radius: 8px;
553
display: flex;
554
flex-direction: column;
555
gap: 4px;
556
}
557
558
/* Severity variants */
559
.new-chat-input-container > .chat-input-notification-container .chat-input-notification.severity-info {
560
border-color: var(--vscode-focusBorder);
561
background-color: color-mix(in srgb, var(--vscode-focusBorder) 6%, var(--vscode-editorWidget-background));
562
}
563
564
.new-chat-input-container > .chat-input-notification-container .chat-input-notification.severity-warning {
565
border-color: var(--vscode-editorWarning-foreground);
566
background-color: color-mix(in srgb, var(--vscode-editorWarning-foreground) 6%, var(--vscode-editorWidget-background));
567
}
568
569
.new-chat-input-container > .chat-input-notification-container .chat-input-notification.severity-error {
570
border-color: var(--vscode-editorError-foreground);
571
background-color: color-mix(in srgb, var(--vscode-editorError-foreground) 6%, var(--vscode-editorWidget-background));
572
}
573
574
/* Remove the top border-radius from the input area when a notification is visible */
575
.new-chat-input-container > .chat-input-notification-container.has-notification + .new-chat-input-area {
576
border-top-left-radius: 0;
577
border-top-right-radius: 0;
578
border-top: none;
579
}
580
581