Path: blob/main/src/vs/sessions/contrib/chat/browser/media/chatInput.css
13405 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45.new-chat-input-container {6width: 100%;7max-width: 800px;8margin-top: 12px;9box-sizing: border-box;10display: none;11}1213/* Ensure the input editor fits properly */14.new-chat-input-container .interactive-input-part {15margin: 0;16padding: 0;17max-width: 100%;18box-sizing: border-box;19}2021.new-chat-input-container .interactive-input-part .monaco-editor {22min-height: 0;23}2425.new-chat-input-container .interactive-input-part .monaco-editor .view-lines {26min-height: 0;27}2829.new-chat-input-container .chat-input-container {30overflow: hidden;31border-color: var(--vscode-agentsChatInput-border);32}3334.new-chat-input-area {35position: relative;36width: 100%;37max-width: 800px;38box-sizing: border-box;39border: 1px solid var(--vscode-agentsChatInput-border);40border-radius: 8px;41background-color: var(--vscode-agentsChatInput-background);42color: var(--vscode-agentsChatInput-foreground);43overflow: hidden;44display: flex;45flex-direction: column;46}4748.new-chat-input-area:focus-within {49border-color: var(--vscode-agentsChatInput-focusBorder, var(--vscode-focusBorder));50}5152.new-chat-input-area .monaco-editor .ghost-text-decoration {53color: var(--vscode-agentsChatInput-placeholderForeground);54}5556.chat-input-picker-item .action-label.disabled {57opacity: 0.5;58cursor: default;59pointer-events: none;60}6162/* Height constraints are driven by MIN_EDITOR_HEIGHT / MAX_EDITOR_HEIGHT in newChatViewPane.ts */63.sessions-chat-editor {64padding: 2px 10px 0 10px;65flex-shrink: 1;66}6768.sessions-chat-editor .monaco-editor,69.sessions-chat-editor .monaco-editor .overflow-guard,70.sessions-chat-editor .monaco-editor-background {71background-color: transparent !important;72border-radius: 8px 8px 0 0;73}7475/* Toolbar */76.sessions-chat-toolbar {77display: flex;78align-items: center;79padding: 4px 6px 6px 6px;80gap: 4px;81color: var(--vscode-icon-foreground);82}8384.sessions-chat-toolbar-spacer {85flex: 1;86}8788/* Model picker - uses workbench ModelPickerActionItem */89/* Session config toolbar (mode, model pickers via MenuWorkbenchToolBar) */90.sessions-chat-config-toolbar {91display: flex;92align-items: center;93min-width: 0;94overflow: hidden;95}9697.sessions-chat-config-toolbar .monaco-toolbar {98height: auto;99min-width: 0;100overflow: hidden;101}102103.sessions-chat-config-toolbar .monaco-action-bar,104.sessions-chat-config-toolbar .monaco-action-bar .actions-container {105min-width: 0;106overflow: hidden;107}108109.sessions-chat-config-toolbar .monaco-action-bar .action-item {110display: flex;111align-items: center;112min-width: 30px;113overflow: hidden;114}115116/* Prevent the mode picker from shrinking so the model picker label117* ellipsizes first rather than the mode picker collapsing to icon-only. */118.sessions-chat-config-toolbar .monaco-action-bar .action-item:has(.sessions-chat-dropdown-label) {119flex-shrink: 0;120}121122.sessions-chat-config-toolbar .action-label {123display: flex;124align-items: center;125height: 16px;126padding: 3px 1px 3px 7px;127background-color: transparent;128border: none;129border-radius: 4px;130cursor: pointer;131touch-action: manipulation;132color: var(--vscode-icon-foreground);133white-space: nowrap;134min-width: 30px;135overflow: hidden;136}137138.sessions-chat-config-toolbar .action-label:hover {139background-color: var(--vscode-toolbar-hoverBackground);140color: var(--vscode-foreground);141}142143.sessions-chat-config-toolbar .action-label,144.sessions-chat-config-toolbar .action-label .chat-input-picker-label {145font-size: 11px;146}147148/* Allow long labels (e.g. the model picker name) to ellipsize when space is tight */149.sessions-chat-config-toolbar .action-label .chat-input-picker-label {150margin-left: 6px;151overflow: hidden;152text-overflow: ellipsis;153white-space: nowrap;154min-width: 0;155}156157/* When the picker has no leading icon (e.g. model picker), drop the icon-to-label gap. */158.sessions-chat-config-toolbar .action-label .chat-input-picker-label:first-child {159margin-left: 0;160}161162.sessions-chat-config-toolbar .monaco-action-bar .action-item .action-label > .codicon {163font-size: 12px;164flex-shrink: 0;165/* Override the base .monaco-action-bar .action-item .codicon { width:16px; height:16px }166* so the leading icon sizes naturally to its font-size, matching the bottom-row pickers. */167width: auto;168height: auto;169}170171.sessions-chat-config-toolbar .monaco-action-bar .action-item .action-label > .codicon-chevron-down {172display: inline-flex;173align-items: center;174justify-content: center;175font-size: 10px;176margin-left: 2px;177line-height: 1;178width: 12px;179height: 12px;180}181182/* Spacing between action items inside the chat input config toolbar (mode + model picker) */183.sessions-chat-config-toolbar .monaco-action-bar .actions-container {184gap: 4px;185}186187/* Delightful gradient styling for the chat send (submit) button. The button188is filled at rest with a slowly rotating multi-color conic gradient using189the same palette as the working-state border, and emits a quick colorful190pulse on click. */191@property --chat-send-button-anim-angle {192syntax: '<angle>';193inherits: false;194initial-value: 135deg;195}196197@keyframes chat-send-button-spin {198from {199--chat-send-button-anim-angle: 135deg;200}201202to {203--chat-send-button-anim-angle: 495deg;204}205}206207@keyframes chat-send-button-color-cycle {2080%,209100% {210background-color: color-mix(in srgb, var(--vscode-chat-inputWorkingBorderColor1) 60%, var(--vscode-input-background));211}21221333% {214background-color: color-mix(in srgb, var(--vscode-chat-inputWorkingBorderColor2) 60%, var(--vscode-input-background));215}21621766% {218background-color: color-mix(in srgb, var(--vscode-chat-inputWorkingBorderColor3) 60%, var(--vscode-input-background));219}220}221222@keyframes chat-send-button-pulse {2230% {224opacity: 0.7;225transform: scale(1);226}227228100% {229opacity: 0;230transform: scale(1.3);231}232}233234/* Send button - wraps a Button widget */235.sessions-chat-send-button {236display: flex;237align-items: center;238justify-content: center;239flex-shrink: 0;240position: relative;241width: 22px;242height: 22px;243border-radius: 4px;244}245246.sessions-chat-send-button .monaco-button {247display: flex;248align-items: center;249justify-content: center;250width: 22px;251height: 22px;252min-width: 22px;253padding: 0;254border-radius: 4px;255color: var(--vscode-icon-foreground);256background: transparent;257border: none;258cursor: pointer;259position: relative;260z-index: 1;261transition: background-color 250ms ease, color 250ms ease;262}263264.sessions-chat-send-button .monaco-button.disabled {265cursor: default;266}267268/* Focus indicator drawn on the wrapper so it sits cleanly around the26922x22 button surface (the inner Button widget doesn't draw its own270focus border). */271.sessions-chat-send-button:has(.monaco-button:not(.disabled):focus-visible) {272outline: 1px solid var(--vscode-focusBorder);273outline-offset: 1px;274}275276/* Suppress the inner button's default focus outline so it doesn't double up277with the wrapper outline above. */278.sessions-chat-send-button .monaco-button:focus,279.sessions-chat-send-button .monaco-button:focus-visible {280outline: none !important;281box-shadow: none !important;282}283284.monaco-workbench .sessions-chat-send-button .monaco-button.codicon[class*='codicon-']::before,285.monaco-workbench .sessions-chat-send-button .monaco-button .codicon[class*='codicon-']::before {286/* Optical alignment: nudge arrow glyph 1px left to visually center it. */287display: inline-block;288transform: translateX(-0.5px);289}290291/* Ensure no underline / link decoration ever shows under the codicon glyph292(the button is rendered as an <a> tag). */293.monaco-workbench .sessions-chat-send-button a.monaco-button,294.monaco-workbench .sessions-chat-send-button a.monaco-button:hover,295.monaco-workbench .sessions-chat-send-button a.monaco-button:focus,296.monaco-workbench .sessions-chat-send-button a.monaco-button:active,297.monaco-workbench .sessions-chat-send-button a.monaco-button.disabled {298text-decoration: none !important;299}300301/* Idle: fill the entire button with a slowly rotating conic gradient (no302border ring).303304Colors are darkened (60% mixed with input background) so the gradient305reads as a calm fill rather than a saturated accent, and the conic stops306are asymmetric so the fill has a clear head and tail rather than307mirroring around the mid-point. */308.sessions-chat-send-button .monaco-button:not(.disabled) {309background: conic-gradient(from var(--chat-send-button-anim-angle) at 0% 0%,310color-mix(in srgb, var(--vscode-chat-inputWorkingBorderColor1) 60%, var(--vscode-input-background)) 0deg,311color-mix(in srgb, var(--vscode-chat-inputWorkingBorderColor2) 60%, var(--vscode-input-background)) 90deg,312color-mix(in srgb, var(--vscode-chat-inputWorkingBorderColor3) 60%, var(--vscode-input-background)) 200deg,313color-mix(in srgb, var(--vscode-chat-inputWorkingBorderColor1) 60%, var(--vscode-input-background)) 360deg);314color: var(--vscode-button-foreground);315animation: chat-send-button-spin 8s linear infinite;316transition: box-shadow 120ms ease;317}318319/* Hover/focus: subtle dark overlay to match standard toolbar button hover320feedback. Uses an inset box-shadow so the rotating gradient background is321preserved underneath. */322.sessions-chat-send-button:has(.monaco-button:not(.disabled):hover) .monaco-button,323.sessions-chat-send-button:has(.monaco-button:not(.disabled):focus-visible) .monaco-button {324box-shadow: inset 0 0 0 100px rgba(0, 0, 0, 0.12);325}326327/* Click: outward color pulse on the wrapper. */328.sessions-chat-send-button:has(.monaco-button:not(.disabled):active)::after {329content: '';330position: absolute;331inset: -2px;332border-radius: 6px;333background: conic-gradient(from 135deg,334var(--vscode-chat-inputWorkingBorderColor1),335var(--vscode-chat-inputWorkingBorderColor2),336var(--vscode-chat-inputWorkingBorderColor3),337var(--vscode-chat-inputWorkingBorderColor2),338var(--vscode-chat-inputWorkingBorderColor1));339pointer-events: none;340animation: chat-send-button-pulse 400ms ease-out forwards;341z-index: 0;342}343344@media (prefers-reduced-motion: reduce) {345.sessions-chat-send-button .monaco-button:not(.disabled),346.sessions-chat-send-button:has(.monaco-button:not(.disabled):active)::after {347animation: none;348}349}350351/* Loading spinner in toolbar */352.sessions-chat-loading-spinner {353display: none;354width: 12px;355height: 12px;356margin-right: 4px;357border: 1.5px solid var(--vscode-icon-foreground);358border-top-color: transparent;359border-radius: 50%;360animation: sessions-chat-spin 0.8s linear infinite;361opacity: 0.6;362flex-shrink: 0;363}364365.sessions-chat-loading-spinner.visible {366display: block;367}368369@keyframes sessions-chat-spin {370to {371transform: rotate(360deg);372}373}374375/* Attach row (pills only, above editor, inside input area) */376.sessions-chat-attach-row {377display: flex;378flex-wrap: wrap;379align-items: center;380gap: 4px;381padding: 4px 6px 0 6px;382}383384.sessions-chat-attach-row:has(.sessions-chat-attached-context:empty) {385display: none;386}387388/* Attach context button */389.sessions-chat-attach-button {390display: flex;391align-items: center;392justify-content: center;393width: 22px;394height: 22px;395flex-shrink: 0;396border-radius: 4px;397cursor: pointer;398color: var(--vscode-icon-foreground);399background: transparent;400border: none;401outline: none;402}403404.sessions-chat-attach-button:hover {405background-color: var(--vscode-toolbar-hoverBackground);406}407408.sessions-chat-attach-button:focus-visible {409outline: 1px solid var(--vscode-focusBorder);410outline-offset: -1px;411}412413.monaco-workbench .sessions-chat-attach-button .codicon[class*='codicon-'] {414font-size: 14px;415}416417/* Attached context container */418.sessions-chat-attached-context {419display: flex;420flex-wrap: wrap;421gap: 4px;422align-items: center;423}424425.sessions-chat-attached-context:empty,426.sessions-chat-attached-context[style*="display: none"] {427display: none !important;428}429430/* Attachment pills */431.sessions-chat-attachment-pill {432display: inline-flex;433align-items: center;434overflow: hidden;435font-size: 11px;436padding: 0 4px 0 0;437border: 1px solid var(--vscode-chat-requestBorder, var(--vscode-input-background, transparent));438border-radius: 4px;439height: 18px;440max-width: 200px;441width: fit-content;442}443444.sessions-chat-attachment-name {445overflow: hidden;446text-overflow: ellipsis;447white-space: nowrap;448}449450.sessions-chat-attachment-pill .codicon {451font-size: 14px;452flex-shrink: 0;453padding: 0 3px;454}455456.sessions-chat-attachment-pill .monaco-icon-label {457gap: 4px;458}459460.sessions-chat-attachment-pill .monaco-icon-label::before {461height: auto;462padding: 0 0 0 2px;463line-height: 100% !important;464align-self: center;465}466467.sessions-chat-attachment-pill .monaco-icon-label .monaco-icon-label-container {468display: flex;469}470471.sessions-chat-attachment-pill .monaco-icon-label .monaco-icon-label-container .monaco-highlighted-label {472display: inline-flex;473align-items: center;474overflow: hidden;475white-space: nowrap;476text-overflow: ellipsis;477}478479.sessions-chat-attachment-remove {480display: flex;481align-items: center;482justify-content: center;483cursor: pointer;484flex-shrink: 0;485color: var(--vscode-descriptionForeground);486margin-left: 4px;487}488489.sessions-chat-attachment-pill:hover {490background-color: var(--vscode-toolbar-hoverBackground);491}492493.sessions-chat-attachment-remove .codicon {494font-size: 12px;495padding: 0;496}497498.sessions-chat-attachment-remove:hover {499background-color: var(--vscode-toolbar-hoverBackground);500}501502/* Drag and drop */503.sessions-chat-dnd-overlay {504position: absolute;505top: 0;506left: 0;507width: 100%;508height: 100%;509box-sizing: border-box;510display: none;511z-index: 10;512background-color: var(--vscode-sideBar-dropBackground, var(--vscode-list-dropBackground));513}514515.sessions-chat-dnd-overlay.visible {516display: flex;517align-items: center;518justify-content: center;519}520521.sessions-chat-dnd-overlay .attach-context-overlay-text {522padding: 0.6em;523margin: 0.2em;524line-height: 12px;525height: 12px;526display: flex;527align-items: center;528text-align: center;529background-color: var(--vscode-sideBar-background, var(--vscode-editor-background));530}531532.sessions-chat-dnd-overlay .attach-context-overlay-text .codicon {533height: 12px;534font-size: 12px;535margin-right: 3px;536}537538/* --- Chat input notification in the new-session homepage --- */539540/* Hide the container when no notification is active */541.new-chat-input-container > .chat-input-notification-container:not(.has-notification) {542display: none;543}544545.new-chat-input-container > .chat-input-notification-container .chat-input-notification {546padding: 12px 16px;547box-sizing: border-box;548border: 1px solid var(--vscode-input-border, transparent);549border-bottom: none;550border-top-left-radius: 8px;551border-top-right-radius: 8px;552display: flex;553flex-direction: column;554gap: 4px;555}556557/* Severity variants */558.new-chat-input-container > .chat-input-notification-container .chat-input-notification.severity-info {559border-color: var(--vscode-focusBorder);560background-color: color-mix(in srgb, var(--vscode-focusBorder) 6%, var(--vscode-editorWidget-background));561}562563.new-chat-input-container > .chat-input-notification-container .chat-input-notification.severity-warning {564border-color: var(--vscode-editorWarning-foreground);565background-color: color-mix(in srgb, var(--vscode-editorWarning-foreground) 6%, var(--vscode-editorWidget-background));566}567568.new-chat-input-container > .chat-input-notification-container .chat-input-notification.severity-error {569border-color: var(--vscode-editorError-foreground);570background-color: color-mix(in srgb, var(--vscode-editorError-foreground) 6%, var(--vscode-editorWidget-background));571}572573/* Remove the top border-radius from the input area when a notification is visible */574.new-chat-input-container > .chat-input-notification-container.has-notification + .new-chat-input-area {575border-top-left-radius: 0;576border-top-right-radius: 0;577border-top: none;578}579580581