Path: blob/main/src/vs/sessions/contrib/chat/browser/media/chatWidget.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.sessions-chat-widget {6display: flex;7flex-direction: column;8height: 100%;9width: 100%;10position: relative;11}1213.new-chat-widget-container {14display: flex;15flex-direction: column;16/* Cross-axis: keep children flush left so the input's left edge — and therefore17* the attach (+) button — stays anchored as the viewport narrows past max-width. */18align-items: flex-start;19justify-content: center;20width: 100%;21height: 100%;22box-sizing: border-box;23overflow: hidden;24padding: 16px 16px 20px 16px;25/* Establishes a size container so the @container (max-width: 330px) query below26* can collapse picker labels to icon-only when the new-chat area is narrow. */27container-type: size;28position: relative;29}3031.new-chat-widget-container.revealed {32justify-content: center;33}3435.new-chat-widget-container.revealed .new-chat-input-container {36display: block;37animation: chat-full-welcome-fade-in 0.35s ease 0.15s both;38}3940/* Option group pickers container (above the input) */41.new-session-workspace-picker-container {42display: none;43width: 100%;44max-width: 800px;45padding: 0;46box-sizing: border-box;47}4849.new-chat-widget-container.revealed .new-session-workspace-picker-container {50display: block;51animation: chat-full-welcome-fade-in 0.35s ease 0.1s both;52}5354@keyframes chat-full-welcome-fade-in {55from {56opacity: 0;57transform: translateY(12px);58}5960to {61opacity: 1;62transform: translateY(0);63}64}6566.new-session-workspace-picker-container:empty {67display: none;68margin-bottom: 0;69}7071.new-chat-widget-content {72width: 100%;73max-width: 800px;74display: flex;75flex-direction: column;76align-items: stretch;77align-self: center;78}7980.new-chat-widget-container .new-chat-bottom-container {81width: 100%;82max-width: 800px;83margin-top: 4px;84padding: 0 4px;85box-sizing: border-box;86display: none;87flex-direction: row;88align-items: center;89gap: 4px;90min-height: 28px;91justify-content: space-between;92}9394.new-chat-widget-container.revealed .new-chat-bottom-container {95display: flex;96}9798.new-chat-widget-container .new-chat-bottom-container .new-chat-controls-container {99display: flex;100gap: 4px;101min-width: 0;102overflow: hidden;103}104105.new-chat-widget-container .new-chat-bottom-container .new-chat-repo-config-container {106display: flex;107align-items: center;108gap: 2px;109min-width: 0;110overflow: hidden;111}112113/* Allow nested toolbar items to shrink so labels can ellipsize when space is tight.114* Mirrors the regular chat-input-toolbar pattern: each flex layer between the115* bounded container and the ellipsizing label gets `min-width: 0; overflow: hidden`. */116.new-chat-widget-container .new-chat-bottom-container .new-chat-controls-container > *,117.new-chat-widget-container .new-chat-bottom-container .new-chat-repo-config-container > *,118.new-chat-widget-container .new-chat-bottom-container .sessions-chat-picker-slot .action-label {119min-width: 0;120overflow: hidden;121}122123/* Floor each picker so the icon + chevron (+ padding) stay visible even when124* the label is fully ellipsized. Approx: 7px padding-left + 12px icon + 2px125* label margin + 16px chevron box + 1px padding-right ~= 38px. The floor must126* be applied to the outermost flex item (.action-item), not just the label,127* because the parent's `min-width: 0` would otherwise let it clip the chevron. */128.new-chat-widget-container .new-chat-bottom-container .monaco-action-bar .action-item,129.new-chat-widget-container .new-chat-bottom-container .sessions-chat-picker-slot .action-label,130.new-chat-widget-container .new-chat-bottom-container .monaco-action-bar .action-item .action-label {131min-width: 30px;132overflow: hidden;133}134135/* Below this width the bottom-row pickers can't fit their labels comfortably,136* so collapse to icon + chevron only. The .new-chat-widget-container declares137* `container-type: size` which makes this a size container query. */138@container (max-width: 330px) {139/* Bottom-row pickers (Copilot CLI, Default Approvals, Worktree, branch): icon-only */140.new-chat-widget-container .new-chat-bottom-container .sessions-chat-dropdown-label {141display: none;142}143144/* Chat input config toolbar: hide mode picker label (uses sessions-chat-dropdown-label),145* but keep the model picker label (uses chat-input-picker-label) visible. */146.new-chat-widget-container .sessions-chat-config-toolbar .sessions-chat-dropdown-label {147display: none;148}149}150151/* Spacing between action items inside the bottom-row toolbars (e.g. Worktree, branch) */152.new-chat-widget-container .new-chat-bottom-container .monaco-action-bar .actions-container {153gap: 4px;154}155156/* Match VS Code chat-secondary-toolbar sizing for action items in the bottom row157* (e.g. session control pickers and repo config pickers) so they align with the158* mode/model picker font in the input toolbar. The 1px right padding is intentional159* because the chevron's 16x16 codicon box supplies the visual right padding. */160.new-chat-widget-container .new-chat-bottom-container .action-label {161height: 16px;162padding: 3px 1px 3px 7px;163font-size: 11px;164color: var(--vscode-icon-foreground);165}166167.new-chat-widget-container .new-chat-bottom-container .action-label > .codicon {168font-size: 12px;169}170171.new-chat-widget-container .new-chat-bottom-container .action-label > .codicon-chevron-down {172font-size: 10px;173margin-left: 4px;174}175176/* Pickers row - two equal halves */177.session-workspace-picker {178display: flex;179flex-direction: row;180flex-wrap: nowrap;181align-items: center;182justify-content: flex-start;183gap: 6px;184width: 100%;185box-sizing: border-box;186padding: 0;187}188189.session-workspace-picker:empty {190display: none;191}192193.session-workspace-picker-label {194font-size: 18px;195line-height: 1.25;196color: var(--vscode-descriptionForeground);197white-space: nowrap;198}199200/* Project picker in inline title row */201.sessions-chat-picker-slot.sessions-chat-workspace-picker .action-label {202height: auto;203padding: 4px;204font-size: 18px;205line-height: 1.25;206border: none;207background-color: transparent;208color: var(--vscode-foreground);209border-radius: 4px;210touch-action: manipulation;211}212213.sessions-chat-picker-slot.sessions-chat-workspace-picker .action-label:hover {214background-color: var(--vscode-toolbar-hoverBackground);215color: var(--vscode-foreground);216}217218.sessions-chat-picker-slot.sessions-chat-workspace-picker .action-label .sessions-chat-dropdown-label {219font-size: 18px;220}221222.sessions-chat-picker-slot.sessions-chat-workspace-picker .action-label > .codicon:not(.sessions-chat-dropdown-chevron) {223font-size: 16px;224margin: 0;225}226227.sessions-chat-picker-slot.sessions-chat-workspace-picker .action-label .sessions-chat-dropdown-chevron {228display: inline-flex;229align-items: center;230justify-content: center;231font-size: 16px;232margin-left: 6px;233line-height: 1;234transform: translateY(1px);235}236237.sessions-chat-dropdown-label {238margin-left: 6px;239overflow: hidden;240text-overflow: ellipsis;241white-space: nowrap;242min-width: 0;243}244245.sessions-chat-picker-slot {246display: flex;247align-items: center;248min-width: 0;249overflow: hidden;250}251252.sessions-chat-picker-slot .action-label {253display: flex;254align-items: center;255height: 16px;256padding: 3px 1px 3px 7px;257background-color: transparent;258border: none;259color: var(--vscode-icon-foreground);260cursor: pointer;261touch-action: manipulation;262white-space: nowrap;263border-radius: 4px;264min-width: 0;265overflow: hidden;266}267268.sessions-chat-picker-slot .action-label.hidden {269display: none;270}271272.sessions-chat-picker-slot .action-label:hover {273background-color: var(--vscode-toolbar-hoverBackground);274color: var(--vscode-foreground);275}276277.sessions-chat-picker-slot.disabled .action-label {278opacity: 0.5;279cursor: default;280pointer-events: none;281}282283.sessions-chat-picker-slot.disabled .action-label:hover {284background-color: transparent;285color: var(--vscode-icon-foreground);286}287288.sessions-chat-picker-slot.loading .action-label {289opacity: 0.5;290cursor: default;291pointer-events: none;292}293294.sessions-chat-picker-slot.loading .action-label .codicon-chevron-down {295display: none;296}297298.sessions-chat-picker-slot.loading .action-label::after {299content: '';300display: inline-block;301width: 12px;302height: 12px;303margin-left: 4px;304border: 1.5px solid var(--vscode-descriptionForeground);305border-top-color: transparent;306border-radius: 50%;307animation: sessions-chat-picker-spin 0.8s linear infinite;308flex-shrink: 0;309}310311@keyframes sessions-chat-picker-spin {312to {313transform: rotate(360deg);314}315}316317.sessions-chat-picker-slot .action-label .codicon {318font-size: 12px;319flex-shrink: 0;320/* Override the base .monaco-action-bar .action-item .codicon { width:16px; height:16px }321* so codicons here size naturally to their font-size, matching pickers (like Copilot CLI)322* that are rendered outside a monaco-action-bar. */323width: auto;324height: auto;325}326327.sessions-chat-picker-slot .action-label .codicon-chevron-down {328display: inline-flex;329align-items: center;330justify-content: center;331font-size: 10px;332margin-left: 2px;333line-height: 1;334width: 12px;335height: 12px;336}337338.sessions-chat-picker-slot .action-label .chat-session-option-label {339overflow: hidden;340text-overflow: ellipsis;341}342343.sessions-chat-picker-slot .action-label span + .chat-session-option-label {344margin-left: 2px;345}346347.sessions-chat-picker-slot .action-label.warning {348color: var(--vscode-problemsWarningIcon-foreground);349opacity: 0.75;350}351352.sessions-chat-picker-slot .action-label.warning .codicon {353color: var(--vscode-problemsWarningIcon-foreground) !important;354}355356.sessions-chat-picker-slot .action-label.warning:hover {357color: var(--vscode-problemsWarningIcon-foreground);358opacity: 1;359}360361.sessions-chat-picker-slot .action-label.info {362color: var(--vscode-problemsInfoIcon-foreground);363opacity: 0.75;364}365366.sessions-chat-picker-slot .action-label.info .codicon {367color: var(--vscode-problemsInfoIcon-foreground) !important;368}369370.sessions-chat-picker-slot .action-label.info:hover {371color: var(--vscode-problemsInfoIcon-foreground);372opacity: 1;373}374375/* Tab bar styles live with the platform widget376* (`platform/actionWidget/browser/tabbedActionListWidget.css`). The377* `sessions-workspace-picker-tabbar` class is applied alongside the378* generic class so picker-specific overrides can be added here if needed. */379380/* Inline browse actions (e.g. "Select Folders…" entries in the Remote tab):381* show the host name as the primary label and only reveal the secondary382* "Select Folders…" description on hover/focus to reduce repetition. */383.action-widget .monaco-list-row.action.sessions-browse-inline-item .description {384visibility: hidden;385}386387.action-widget .monaco-list-row.action.sessions-browse-inline-item:hover:not(.option-disabled) .description,388.action-widget .monaco-list-row.action.sessions-browse-inline-item.focused:not(.option-disabled) .description {389visibility: visible;390}391392393