diff --git a/extensions/theme-2026/themes/2026-dark.json b/extensions/theme-2026/themes/2026-dark.json index 4cfdf87334359..ae0cba932f510 100644 --- a/extensions/theme-2026/themes/2026-dark.json +++ b/extensions/theme-2026/themes/2026-dark.json @@ -8,217 +8,217 @@ "errorForeground": "#f48771", "descriptionForeground": "#888888", "icon.foreground": "#888888", - "focusBorder": "#498FADB3", - "textBlockQuote.background": "#232627", + "focusBorder": "#3994BCB3", + "textBlockQuote.background": "#242526", "textBlockQuote.border": "#2A2B2CFF", - "textCodeBlock.background": "#232627", - "textLink.foreground": "#589BB8", - "textLink.activeForeground": "#61A0BC", + "textCodeBlock.background": "#242526", + "textLink.foreground": "#48A0C7", + "textLink.activeForeground": "#53A5CA", "textPreformat.foreground": "#888888", "textSeparator.foreground": "#2a2a2aFF", - "button.background": "#498FAE", + "button.background": "#3994BC", "button.foreground": "#FFFFFF", - "button.hoverBackground": "#4D94B4", + "button.hoverBackground": "#3E9BC4", "button.border": "#2A2B2CFF", - "button.secondaryBackground": "#232627", + "button.secondaryBackground": "#242526", "button.secondaryForeground": "#bfbfbf", - "button.secondaryHoverBackground": "#303234", - "checkbox.background": "#232627", + "button.secondaryHoverBackground": "#313233", + "checkbox.background": "#242526", "checkbox.border": "#2A2B2CFF", "checkbox.foreground": "#bfbfbf", - "dropdown.background": "#191B1D", + "dropdown.background": "#191A1B", "dropdown.border": "#333536", "dropdown.foreground": "#bfbfbf", - "dropdown.listBackground": "#1F2223", - "input.background": "#191B1D", + "dropdown.listBackground": "#202122", + "input.background": "#191A1B", "input.border": "#333536FF", "input.foreground": "#bfbfbf", "input.placeholderForeground": "#777777", - "inputOption.activeBackground": "#498FAE33", + "inputOption.activeBackground": "#3994BC33", "inputOption.activeForeground": "#bfbfbf", "inputOption.activeBorder": "#2A2B2CFF", - "inputValidation.errorBackground": "#191B1D", + "inputValidation.errorBackground": "#191A1B", "inputValidation.errorBorder": "#2A2B2CFF", "inputValidation.errorForeground": "#bfbfbf", - "inputValidation.infoBackground": "#191B1D", + "inputValidation.infoBackground": "#191A1B", "inputValidation.infoBorder": "#2A2B2CFF", "inputValidation.infoForeground": "#bfbfbf", - "inputValidation.warningBackground": "#191B1D", + "inputValidation.warningBackground": "#191A1B", "inputValidation.warningBorder": "#2A2B2CFF", "inputValidation.warningForeground": "#bfbfbf", "scrollbar.shadow": "#191B1D4D", - "scrollbarSlider.background": "#81848533", - "scrollbarSlider.hoverBackground": "#81848566", - "scrollbarSlider.activeBackground": "#81848599", - "badge.background": "#498FAE", + "scrollbarSlider.background": "#83848533", + "scrollbarSlider.hoverBackground": "#83848566", + "scrollbarSlider.activeBackground": "#83848599", + "badge.background": "#3994BC", "badge.foreground": "#FFFFFF", - "progressBar.background": "#858889", - "list.activeSelectionBackground": "#498FAE26", + "progressBar.background": "#878889", + "list.activeSelectionBackground": "#3994BC26", "list.activeSelectionForeground": "#bfbfbf", - "list.inactiveSelectionBackground": "#232627", + "list.inactiveSelectionBackground": "#242526", "list.inactiveSelectionForeground": "#bfbfbf", - "list.hoverBackground": "#252829", + "list.hoverBackground": "#262728", "list.hoverForeground": "#bfbfbf", - "list.dropBackground": "#498FAE1A", - "list.focusBackground": "#498FAE26", + "list.dropBackground": "#3994BC1A", + "list.focusBackground": "#3994BC26", "list.focusForeground": "#bfbfbf", - "list.focusOutline": "#498FADB3", + "list.focusOutline": "#3994BCB3", "list.highlightForeground": "#bfbfbf", "list.invalidItemForeground": "#444444", "list.errorForeground": "#f48771", "list.warningForeground": "#e5ba7d", - "activityBar.background": "#191B1D", + "activityBar.background": "#191A1B", "activityBar.foreground": "#bfbfbf", "activityBar.inactiveForeground": "#888888", "activityBar.border": "#2A2B2CFF", "activityBar.activeBorder": "#2A2B2CFF", - "activityBar.activeFocusBorder": "#498FADB3", - "activityBarBadge.background": "#498FAE", + "activityBar.activeFocusBorder": "#3994BCB3", + "activityBarBadge.background": "#3994BC", "activityBarBadge.foreground": "#FFFFFF", - "sideBar.background": "#191B1D", + "sideBar.background": "#191A1B", "sideBar.foreground": "#bfbfbf", "sideBar.border": "#2A2B2CFF", "sideBarTitle.foreground": "#bfbfbf", - "sideBarSectionHeader.background": "#191B1D", + "sideBarSectionHeader.background": "#191A1B", "sideBarSectionHeader.foreground": "#bfbfbf", "sideBarSectionHeader.border": "#2A2B2CFF", - "titleBar.activeBackground": "#191B1D", + "titleBar.activeBackground": "#191A1B", "titleBar.activeForeground": "#bfbfbf", - "titleBar.inactiveBackground": "#191B1D", + "titleBar.inactiveBackground": "#191A1B", "titleBar.inactiveForeground": "#888888", "titleBar.border": "#2A2B2CFF", - "menubar.selectionBackground": "#232627", + "menubar.selectionBackground": "#242526", "menubar.selectionForeground": "#bfbfbf", - "menu.background": "#1F2223", + "menu.background": "#202122", "menu.foreground": "#bfbfbf", - "menu.selectionBackground": "#498FAE26", + "menu.selectionBackground": "#3994BC26", "menu.selectionForeground": "#bfbfbf", - "menu.separatorBackground": "#818485", + "menu.separatorBackground": "#838485", "menu.border": "#2A2B2CFF", "commandCenter.foreground": "#bfbfbf", "commandCenter.activeForeground": "#bfbfbf", - "commandCenter.background": "#191B1D", - "commandCenter.activeBackground": "#252829", + "commandCenter.background": "#191A1B", + "commandCenter.activeBackground": "#262728", "commandCenter.border": "#333536", - "editor.background": "#121416", + "editor.background": "#121314", "editor.foreground": "#BBBEBF", "editorLineNumber.foreground": "#858889", "editorLineNumber.activeForeground": "#BBBEBF", "editorCursor.foreground": "#BBBEBF", - "editor.selectionBackground": "#498FAE33", - "editor.inactiveSelectionBackground": "#498FAE80", - "editor.selectionHighlightBackground": "#498FAE1A", - "editor.wordHighlightBackground": "#498FAE33", - "editor.wordHighlightStrongBackground": "#498FAE33", - "editor.findMatchBackground": "#498FAE4D", - "editor.findMatchHighlightBackground": "#498FAE26", - "editor.findRangeHighlightBackground": "#232627", - "editor.hoverHighlightBackground": "#232627", - "editor.lineHighlightBackground": "#232627", - "editor.rangeHighlightBackground": "#232627", - "editorLink.activeForeground": "#4a8fad", + "editor.selectionBackground": "#3994BC33", + "editor.inactiveSelectionBackground": "#3994BC80", + "editor.selectionHighlightBackground": "#3994BC1A", + "editor.wordHighlightBackground": "#3994BC33", + "editor.wordHighlightStrongBackground": "#3994BC33", + "editor.findMatchBackground": "#3994BC4D", + "editor.findMatchHighlightBackground": "#3994BC26", + "editor.findRangeHighlightBackground": "#242526", + "editor.hoverHighlightBackground": "#242526", + "editor.lineHighlightBackground": "#242526", + "editor.rangeHighlightBackground": "#242526", + "editorLink.activeForeground": "#3a94bc", "editorWhitespace.foreground": "#8888884D", - "editorIndentGuide.background": "#8184854D", - "editorIndentGuide.activeBackground": "#818485", + "editorIndentGuide.background": "#8384854D", + "editorIndentGuide.activeBackground": "#838485", "editorRuler.foreground": "#848484", "editorCodeLens.foreground": "#888888", - "editorBracketMatch.background": "#498FAE55", + "editorBracketMatch.background": "#3994BC55", "editorBracketMatch.border": "#2A2B2CFF", - "editorWidget.background": "#1F2223", + "editorWidget.background": "#202122", "editorWidget.border": "#2A2B2CFF", "editorWidget.foreground": "#bfbfbf", - "editorSuggestWidget.background": "#1F2223", + "editorSuggestWidget.background": "#202122", "editorSuggestWidget.border": "#2A2B2CFF", "editorSuggestWidget.foreground": "#bfbfbf", "editorSuggestWidget.highlightForeground": "#bfbfbf", - "editorSuggestWidget.selectedBackground": "#498FAE26", - "editorHoverWidget.background": "#1F2223", + "editorSuggestWidget.selectedBackground": "#3994BC26", + "editorHoverWidget.background": "#202122", "editorHoverWidget.border": "#2A2B2CFF", "peekView.border": "#2A2B2CFF", - "peekViewEditor.background": "#191B1D", - "peekViewEditor.matchHighlightBackground": "#498FAE33", - "peekViewResult.background": "#232627", + "peekViewEditor.background": "#191A1B", + "peekViewEditor.matchHighlightBackground": "#3994BC33", + "peekViewResult.background": "#242526", "peekViewResult.fileForeground": "#bfbfbf", "peekViewResult.lineForeground": "#888888", - "peekViewResult.matchHighlightBackground": "#498FAE33", - "peekViewResult.selectionBackground": "#498FAE26", + "peekViewResult.matchHighlightBackground": "#3994BC33", + "peekViewResult.selectionBackground": "#3994BC26", "peekViewResult.selectionForeground": "#bfbfbf", - "peekViewTitle.background": "#232627", + "peekViewTitle.background": "#242526", "peekViewTitleDescription.foreground": "#888888", "peekViewTitleLabel.foreground": "#bfbfbf", - "editorGutter.background": "#121416", - "editorGutter.addedBackground": "#71C792", - "editorGutter.deletedBackground": "#EF8773", - "diffEditor.insertedTextBackground": "#71C79233", - "diffEditor.removedTextBackground": "#EF877333", + "editorGutter.background": "#121314", + "editorGutter.addedBackground": "#72C892", + "editorGutter.deletedBackground": "#F28772", + "diffEditor.insertedTextBackground": "#72C89233", + "diffEditor.removedTextBackground": "#F2877233", "editorOverviewRuler.border": "#2A2B2CFF", - "editorOverviewRuler.findMatchForeground": "#4a8fad99", + "editorOverviewRuler.findMatchForeground": "#3a94bc99", "editorOverviewRuler.modifiedForeground": "#6ab890", "editorOverviewRuler.addedForeground": "#73c991", "editorOverviewRuler.deletedForeground": "#f48771", "editorOverviewRuler.errorForeground": "#f48771", "editorOverviewRuler.warningForeground": "#e5ba7d", - "panel.background": "#191B1D", + "panel.background": "#191A1B", "panel.border": "#2A2B2CFF", - "panelTitle.activeBorder": "#498FAD", + "panelTitle.activeBorder": "#3994BC", "panelTitle.activeForeground": "#bfbfbf", "panelTitle.inactiveForeground": "#888888", - "statusBar.background": "#191B1D", + "statusBar.background": "#191A1B", "statusBar.foreground": "#bfbfbf", "statusBar.border": "#2A2B2CFF", - "statusBar.focusBorder": "#498FADB3", - "statusBar.debuggingBackground": "#498FAE", + "statusBar.focusBorder": "#3994BCB3", + "statusBar.debuggingBackground": "#3994BC", "statusBar.debuggingForeground": "#FFFFFF", - "statusBar.noFolderBackground": "#191B1D", + "statusBar.noFolderBackground": "#191A1B", "statusBar.noFolderForeground": "#bfbfbf", - "statusBarItem.activeBackground": "#4A4D4F", - "statusBarItem.hoverBackground": "#252829", - "statusBarItem.focusBorder": "#498FADB3", - "statusBarItem.prominentBackground": "#498FAE", + "statusBarItem.activeBackground": "#4B4C4D", + "statusBarItem.hoverBackground": "#262728", + "statusBarItem.focusBorder": "#3994BCB3", + "statusBarItem.prominentBackground": "#3994BC", "statusBarItem.prominentForeground": "#FFFFFF", - "statusBarItem.prominentHoverBackground": "#498FAE", - "tab.activeBackground": "#121416", + "statusBarItem.prominentHoverBackground": "#3994BC", + "tab.activeBackground": "#121314", "tab.activeForeground": "#bfbfbf", - "tab.inactiveBackground": "#191B1D", + "tab.inactiveBackground": "#191A1B", "tab.inactiveForeground": "#888888", "tab.border": "#2A2B2CFF", "tab.lastPinnedBorder": "#2A2B2CFF", "tab.activeBorder": "#121314", - "tab.hoverBackground": "#252829", + "tab.hoverBackground": "#262728", "tab.hoverForeground": "#bfbfbf", - "tab.unfocusedActiveBackground": "#121416", + "tab.unfocusedActiveBackground": "#121314", "tab.unfocusedActiveForeground": "#888888", - "tab.unfocusedInactiveBackground": "#191B1D", + "tab.unfocusedInactiveBackground": "#191A1B", "tab.unfocusedInactiveForeground": "#444444", - "editorGroupHeader.tabsBackground": "#191B1D", + "editorGroupHeader.tabsBackground": "#191A1B", "editorGroupHeader.tabsBorder": "#2A2B2CFF", "breadcrumb.foreground": "#888888", - "breadcrumb.background": "#121416", + "breadcrumb.background": "#121314", "breadcrumb.focusForeground": "#bfbfbf", "breadcrumb.activeSelectionForeground": "#bfbfbf", - "breadcrumbPicker.background": "#1F2223", + "breadcrumbPicker.background": "#202122", "notificationCenter.border": "#2A2B2CFF", "notificationCenterHeader.foreground": "#bfbfbf", - "notificationCenterHeader.background": "#232627", + "notificationCenterHeader.background": "#242526", "notificationToast.border": "#2A2B2CFF", "notifications.foreground": "#bfbfbf", - "notifications.background": "#1F2223", + "notifications.background": "#202122", "notifications.border": "#2A2B2CFF", - "notificationLink.foreground": "#4a8fad", - "extensionButton.prominentBackground": "#498FAE", + "notificationLink.foreground": "#3a94bc", + "extensionButton.prominentBackground": "#3994BC", "extensionButton.prominentForeground": "#FFFFFF", - "extensionButton.prominentHoverBackground": "#4D94B4", + "extensionButton.prominentHoverBackground": "#3E9BC4", "pickerGroup.border": "#2A2B2CFF", "pickerGroup.foreground": "#bfbfbf", - "quickInput.background": "#1F2223", + "quickInput.background": "#202122", "quickInput.foreground": "#bfbfbf", - "quickInputList.focusBackground": "#498FAE26", + "quickInputList.focusBackground": "#3994BC26", "quickInputList.focusForeground": "#bfbfbf", "quickInputList.focusIconForeground": "#bfbfbf", - "quickInputList.hoverBackground": "#505354", - "terminal.selectionBackground": "#498FAE33", + "quickInputList.hoverBackground": "#515253", + "terminal.selectionBackground": "#3994BC33", "terminalCursor.foreground": "#bfbfbf", - "terminalCursor.background": "#191B1D", + "terminalCursor.background": "#191A1B", "gitDecoration.addedResourceForeground": "#73c991", "gitDecoration.modifiedResourceForeground": "#e5ba7d", "gitDecoration.deletedResourceForeground": "#f48771", @@ -227,10 +227,10 @@ "gitDecoration.conflictingResourceForeground": "#f48771", "gitDecoration.stageModifiedResourceForeground": "#e5ba7d", "gitDecoration.stageDeletedResourceForeground": "#f48771", - "quickInputTitle.background": "#1F2223", + "quickInputTitle.background": "#202122", "quickInput.border": "#333536", - "chat.requestBubbleBackground": "#498FAE26", - "chat.requestBubbleHoverBackground": "#498FAE46" + "chat.requestBubbleBackground": "#3994BC26", + "chat.requestBubbleHoverBackground": "#3994BC46" }, "tokenColors": [ { diff --git a/extensions/theme-2026/themes/styles.css b/extensions/theme-2026/themes/styles.css index 91f1e05826f68..369a5fa4f5284 100644 --- a/extensions/theme-2026/themes/styles.css +++ b/extensions/theme-2026/themes/styles.css @@ -6,7 +6,7 @@ /* Stealth Shadows - shadow-based depth for UI elements, controlled by workbench.stealthShadows.enabled */ /* Activity Bar */ -.monaco-workbench .part.activitybar { box-shadow: 0 0 6px rgba(0, 0, 0, 0.08); z-index: 50; position: relative; } +.monaco-workbench .part.activitybar { box-shadow: 0 0 6px rgba(0, 0, 0, 0.08); z-index: 50; position: relative;} .monaco-workbench.activitybar-right .part.activitybar { box-shadow: 0 0 6px rgba(0, 0, 0, 0.08); } /* Sidebar */ @@ -14,6 +14,18 @@ .monaco-workbench.sidebar-right .part.sidebar { box-shadow: 0 0 6px rgba(0, 0, 0, 0.08); } .monaco-workbench .part.auxiliarybar { box-shadow: 0 0 6px rgba(0, 0, 0, 0.08); z-index: 40; position: relative; } +/* Ensure iframe containers in pane-body render above sidebar z-index */ +.monaco-workbench > div[data-keybinding-context], +.monaco-workbench > div[data-keybinding-context] { + z-index: 50 !important; +} + +/* Ensure webview containers render above sidebar z-index */ +.monaco-workbench .part.sidebar .webview, +.monaco-workbench .part.sidebar .webview-container, +.monaco-workbench .part.auxiliarybar .webview, +.monaco-workbench .part.auxiliarybar .webview-container { position: relative; z-index: 50; transform: translateZ(0); } + /* Panel */ .monaco-workbench .part.panel { box-shadow: 0 0 6px rgba(0, 0, 0, 0.08); z-index: 35; position: relative; } .monaco-workbench.panel-position-left .part.panel { box-shadow: 0 0 6px rgba(0, 0, 0, 0.08); } @@ -24,8 +36,8 @@ .monaco-workbench .monaco-sash.vertical { z-index: 45; } .monaco-workbench .monaco-sash.horizontal { z-index: 45; } -.monaco-workbench .activitybar.left.bordered::before, -.monaco-workbench .activitybar.right.bordered::before { +.monaco-workbench.vs .activitybar.left.bordered::before, +.monaco-workbench.vs .activitybar.right.bordered::before { border: none; } @@ -52,7 +64,7 @@ .monaco-workbench .part.statusbar { box-shadow: 0 0 6px rgba(0, 0, 0, 0.08); z-index: 55; position: relative; } /* Quick Input (Command Palette) */ -.monaco-workbench .quick-input-widget { box-shadow: 0 0 20px rgba(0, 0, 0, 0.15) !important; border-radius: 12px; overflow: hidden; background: rgba(252, 252, 253, 0.5) !important; backdrop-filter: blur(20px) saturate(100%); -webkit-backdrop-filter: blur(40px) saturate(180%); } +.monaco-workbench .quick-input-widget { box-shadow: 0 0 20px rgba(0, 0, 0, 0.15) !important; border-radius: 12px; overflow: hidden; backdrop-filter: blur(20px) saturate(100%); -webkit-backdrop-filter: blur(40px) saturate(180%); } .monaco-workbench.vs-dark .quick-input-widget, .monaco-workbench.hc-black .quick-input-widget { background: rgba(10, 10, 11, 0.5) !important; backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%); box-shadow: 0 0 20px rgba(0, 0, 0, 0.15) !important; } .monaco-workbench .quick-input-widget .monaco-list-rows { background-color: transparent !important; } @@ -70,7 +82,6 @@ .monaco-workbench .quick-input-widget .monaco-list, .monaco-workbench .quick-input-widget .monaco-list-row { border-color: transparent !important; outline: none !important; } .monaco-workbench .quick-input-widget .monaco-inputbox { box-shadow: none !important; background: transparent !important; } -.monaco-workbench .quick-input-widget .quick-input-filter .monaco-inputbox { background: rgba(249, 250, 251, 0.4) !important; border-radius: 6px; } .monaco-workbench.vs-dark .quick-input-widget .quick-input-filter .monaco-inputbox, .monaco-workbench .quick-input-widget .monaco-list.list_id_6:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: color-mix(in srgb, var(--vscode-list-hoverBackground) 40%, transparent); } @@ -92,15 +103,30 @@ .monaco-workbench .notifications-toasts { box-shadow: 0 0 12px rgba(0, 0, 0, 0.14); border-radius: 4px; - /* backdrop-filter: blur(20px) saturate(180%); - -webkit-backdrop-filter: blur(20px) saturate(180%); */ } .monaco-workbench .notification-toast { box-shadow: none !important; margin: 0 !important;} -.monaco-workbench .notifications-center { + +.monaco-workbench .notification-toast-container { backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); +} + +.monaco-workbench.vs-dark .notification-toast-container .notification-toast { + background-color: rgba(10, 10, 11, 0.6) !important; +} +.monaco-workbench.vs .notification-toast-container .notification-toast { background-color: rgba(255, 255, 255, 0.6) !important; +} +.monaco-workbench .notifications-center { + backdrop-filter: blur(20px) saturate(180%); + -webkit-backdrop-filter: blur(20px) saturate(180%); +} +.monaco-workbench.vs .notifications-center { + background-color: rgba(255, 255, 255, 0.6) !important; +} +.monaco-workbench.vs-dark .notifications-center { + background-color: rgba(10, 10, 11, 0.6) !important; } .monaco-workbench .notifications-list-container, .monaco-workbench > .notifications-center > .notifications-center-header, @@ -194,13 +220,14 @@ .monaco-workbench.vs .monaco-editor .parameter-hints-widget { background: rgba(252, 252, 253, 0.85) !important; } /* Minimap */ -.monaco-workbench .monaco-editor .minimap { background: rgba(252, 252, 253, 0.65) !important; backdrop-filter: blur(40px) saturate(180%) !important; -webkit-backdrop-filter: blur(40px) saturate(180%) !important; border-radius: 8px 0 0 8px; } +.monaco-workbench .monaco-editor .minimap { backdrop-filter: blur(40px) saturate(180%) !important; -webkit-backdrop-filter: blur(40px) saturate(180%) !important; } .monaco-workbench .monaco-editor .minimap canvas { opacity: 0.85; } .monaco-workbench.vs-dark .monaco-editor .minimap, -.monaco-workbench .monaco-editor .minimap-shadow-visible { box-shadow: 0 0 6px rgba(0, 0, 0, 0.10); } +.monaco-workbench .monaco-editor .minimap-shadow-visible { box-shadow: 0 0 6px rgba(0, 0, 0, 0.10); opacity: 0.85; background-color: var(--vscode-editor-background); left: 0;} /* Sticky Scroll */ -.monaco-workbench .monaco-editor .sticky-widget { box-shadow: 0 0 6px rgba(0, 0, 0, 0.10) !important; border-bottom: none !important; background: rgba(252, 252, 253, 0.65) !important; backdrop-filter: blur(40px) saturate(180%) !important; -webkit-backdrop-filter: blur(40px) saturate(180%) !important; border-radius: 0 0 8px 8px !important; } +.monaco-workbench .monaco-editor .sticky-widget { box-shadow: 0 0 6px rgba(0, 0, 0, 0.10) !important; border-bottom: none !important; background: rgba(252, 252, 253, 0.65) !important; backdrop-filter: blur(40px) saturate(180%) !important; -webkit-backdrop-filter: blur(40px) saturate(180%) !important; } +.monaco-workbench.vs-dark .monaco-editor .sticky-widget { border-bottom: none !important; background: rgba(0, 0, 0, 0.3) !important; backdrop-filter: blur(40px) saturate(180%) !important; -webkit-backdrop-filter: blur(40px) saturate(180%) !important; } .monaco-workbench .monaco-editor .sticky-widget *, .monaco-workbench .monaco-editor .sticky-widget > *, .monaco-workbench .monaco-editor .sticky-widget .sticky-widget-line-numbers, @@ -213,11 +240,8 @@ .monaco-workbench .monaco-editor .sticky-widget-focus-preview, .monaco-workbench .monaco-editor .sticky-scroll-focus-line, .monaco-workbench .monaco-editor .focused .sticky-widget, -.monaco-workbench .monaco-editor:has(.sticky-widget:focus-within) .sticky-widget { background: rgba(252, 252, 253, 0.75) !important; backdrop-filter: blur(40px) saturate(180%) !important; -webkit-backdrop-filter: blur(40px) saturate(180%) !important; box-shadow: 0 0 8px rgba(0, 0, 0, 0.12) !important; border-radius: 0 0 8px 8px !important; } -.monaco-workbench.vs-dark .monaco-editor .sticky-widget-focus-preview, -.monaco-workbench.vs-dark .monaco-editor .sticky-scroll-focus-line, -.monaco-workbench.vs-dark .monaco-editor .focused .sticky-widget, -.monaco-workbench.vs-dark .monaco-editor:has(.sticky-widget:focus-within) .sticky-widget, +.monaco-workbench .monaco-editor:has(.sticky-widget:focus-within) .sticky-widget { background: rgba(252, 252, 253, 0.75) !important; backdrop-filter: blur(40px) saturate(180%) !important; -webkit-backdrop-filter: blur(40px) saturate(180%) !important; box-shadow: 0 0 8px rgba(0, 0, 0, 0.12) !important; } +.monaco-workbench.vs-dark .monaco-editor:has(.sticky-widget:focus-within) .sticky-widget { background: rgba(0, 0, 0, 0.4) !important; backdrop-filter: blur(40px) saturate(180%) !important; -webkit-backdrop-filter: blur(40px) saturate(180%) !important; box-shadow: 0 0 8px rgba(0, 0, 0, 0.12) !important; } /* Notebook */ .monaco-workbench .notebookOverlay .monaco-list .cell-focus-indicator { box-shadow: 0 0 4px rgba(0, 0, 0, 0.08); border-radius: 6px; } diff --git a/package.json b/package.json index 0d102190322da..03c85010f0188 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.109.0", - "distro": "9f8bbb424a617246ab35c7c2a143a51fa0ba9ef0", + "distro": "94127eca547fd49c3a6b1e2f7f80ceea1ed644c5", "author": { "name": "Microsoft Corporation" }, diff --git a/src/vs/base/browser/ui/codicons/codicon/codicon.ttf b/src/vs/base/browser/ui/codicons/codicon/codicon.ttf index e7e46096e129d..0c9d65f81c2f3 100644 Binary files a/src/vs/base/browser/ui/codicons/codicon/codicon.ttf and b/src/vs/base/browser/ui/codicons/codicon/codicon.ttf differ diff --git a/src/vs/base/common/codiconsLibrary.ts b/src/vs/base/common/codiconsLibrary.ts index 29037850602d5..90cd1bab10f8d 100644 --- a/src/vs/base/common/codiconsLibrary.ts +++ b/src/vs/base/common/codiconsLibrary.ts @@ -650,4 +650,6 @@ export const codiconsLibrary = { removeSmall: register('remove-small', 0xec7c), worktreeSmall: register('worktree-small', 0xec7d), worktree: register('worktree', 0xec7e), + screenCut: register('screen-cut', 0xec7f), + ask: register('ask', 0xec80), } as const; diff --git a/src/vs/editor/browser/widget/multiDiffEditor/style.css b/src/vs/editor/browser/widget/multiDiffEditor/style.css index edc93b85ce95c..57e2ab568cd6a 100644 --- a/src/vs/editor/browser/widget/multiDiffEditor/style.css +++ b/src/vs/editor/browser/widget/multiDiffEditor/style.css @@ -36,52 +36,13 @@ > .multi-diff-root-floating-menu { position: absolute; - right: 32px; - bottom: 32px; top: auto; + right: 28px; + bottom: 24px; left: auto; - height: auto; width: auto; - padding: 4px 6px; - color: var(--vscode-button-foreground); - background-color: var(--vscode-button-background); - border-radius: 4px; - border: 1px solid var(--vscode-contrastBorder); - display: flex; - align-items: center; - z-index: 10; - box-shadow: 0 3px 12px var(--vscode-widget-shadow); - overflow: hidden; - } - - .multi-diff-root-floating-menu .action-item > .action-label { - padding: 7px 8px; - font-size: 15px; - border-radius: 2px; - } - - .multi-diff-root-floating-menu .action-item > .action-label.codicon { - color: var(--vscode-button-foreground); - } - - .multi-diff-root-floating-menu .action-item > .action-label.codicon:not(.separator) { - padding-top: 6px; - padding-bottom: 6px; } - .multi-diff-root-floating-menu .action-item:first-child > .action-label { - padding-left: 7px; - } - - .multi-diff-root-floating-menu .action-item:last-child > .action-label { - padding-right: 7px; - } - - .multi-diff-root-floating-menu .action-item .action-label.separator { - background-color: var(--vscode-button-separator); - } - - .active { --vscode-multiDiffEditor-border: var(--vscode-focusBorder); } diff --git a/src/vs/editor/contrib/floatingMenu/browser/floatingMenu.css b/src/vs/editor/contrib/floatingMenu/browser/floatingMenu.css index 5221366ed32d2..422e073e5e739 100644 --- a/src/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +++ b/src/vs/editor/contrib/floatingMenu/browser/floatingMenu.css @@ -40,7 +40,8 @@ justify-content: center; } - .action-item.primary > .action-label { + .action-item.primary > .action-label, + .action-item.primary > .action-label.action-label.codicon:not(.separator) { background-color: var(--vscode-button-background); color: var(--vscode-button-foreground); } diff --git a/src/vs/editor/contrib/floatingMenu/browser/floatingMenu.ts b/src/vs/editor/contrib/floatingMenu/browser/floatingMenu.ts index 1302d757b10fc..1a530186e669f 100644 --- a/src/vs/editor/contrib/floatingMenu/browser/floatingMenu.ts +++ b/src/vs/editor/contrib/floatingMenu/browser/floatingMenu.ts @@ -94,12 +94,13 @@ export class FloatingEditorToolbarWidget extends Disposable { this._register(autorun(reader => { const hasActions = this.hasActions.read(reader); const menuPrimaryActionId = menuPrimaryActionIdObs.read(reader); - if (!hasActions || !menuPrimaryActionId) { + + if (!hasActions) { return; } // Toolbar - const toolbar = instantiationService.createInstance(MenuWorkbenchToolBar, this.element, MenuId.EditorContent, { + const toolbar = instantiationService.createInstance(MenuWorkbenchToolBar, this.element, _menuId, { actionViewItemProvider: (action, options) => { if (!(action instanceof MenuItemAction)) { return undefined; diff --git a/src/vs/editor/standalone/browser/services/standaloneWebWorkerService.ts b/src/vs/editor/standalone/browser/services/standaloneWebWorkerService.ts index b5a676fd8702e..1ff3fb838d95f 100644 --- a/src/vs/editor/standalone/browser/services/standaloneWebWorkerService.ts +++ b/src/vs/editor/standalone/browser/services/standaloneWebWorkerService.ts @@ -23,8 +23,9 @@ export class StandaloneWebWorkerService extends WebWorkerService { } protected override _getWorkerLoadingFailedErrorMessage(descriptor: WebWorkerDescriptor): string | undefined { + const examplePath = '\'...?esm\''; // Broken up to avoid detection by bundler plugin return `Failed to load worker script for label: ${descriptor.label}. -Ensure your bundler properly bundles modules referenced by "new URL("...?esm", import.meta.url)".`; +Ensure your bundler properly bundles modules referenced by "new URL(${examplePath}, import.meta.url)".`; } override getWorkerUrl(descriptor: WebWorkerDescriptor): string { diff --git a/src/vs/platform/actionWidget/browser/actionList.ts b/src/vs/platform/actionWidget/browser/actionList.ts index 2fc8c36ed6969..6132cfefb884d 100644 --- a/src/vs/platform/actionWidget/browser/actionList.ts +++ b/src/vs/platform/actionWidget/browser/actionList.ts @@ -193,13 +193,13 @@ class ActionItemRenderer implements IListRenderer, IAction const actionTitle = this._keybindingService.lookupKeybinding(acceptSelectedActionCommand)?.getLabel(); const previewTitle = this._keybindingService.lookupKeybinding(previewSelectedActionCommand)?.getLabel(); data.container.classList.toggle('option-disabled', element.disabled); - if (element.tooltip) { + if (element.hover !== undefined) { + // Don't show tooltip when hover content is configured - the rich hover will show instead + data.container.title = ''; + } else if (element.tooltip) { data.container.title = element.tooltip; } else if (element.disabled) { data.container.title = element.label; - } else if (element.hover?.content) { - // Don't show tooltip when hover content is configured - the rich hover will show instead - data.container.title = ''; } else if (actionTitle && previewTitle) { if (this._supportsPreview && element.canPreview) { data.container.title = localize({ key: 'label-preview', comment: ['placeholders are keybindings, e.g "F2 to Apply, Shift+F2 to Preview"'] }, "{0} to Apply, {1} to Preview", actionTitle, previewTitle); diff --git a/src/vs/workbench/api/common/extHostLanguageModels.ts b/src/vs/workbench/api/common/extHostLanguageModels.ts index b82b1bd992a7b..090ac1a2a957e 100644 --- a/src/vs/workbench/api/common/extHostLanguageModels.ts +++ b/src/vs/workbench/api/common/extHostLanguageModels.ts @@ -216,6 +216,7 @@ export class ExtHostLanguageModels implements ExtHostLanguageModelsShape { detail: m.detail, tooltip: m.tooltip, version: m.version, + multiplier: m.multiplier, maxInputTokens: m.maxInputTokens, maxOutputTokens: m.maxOutputTokens, auth, diff --git a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts index 8b6a6f5f94634..316ce529b610f 100644 --- a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts +++ b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts @@ -463,11 +463,20 @@ export function registerChatActions() { const viewsService = accessor.get(IViewsService); const viewDescriptorService = accessor.get(IViewDescriptorService); const widgetService = accessor.get(IChatWidgetService); + const configurationService = accessor.get(IConfigurationService); const chatLocation = viewDescriptorService.getViewLocationById(ChatViewId); if (viewsService.isViewVisible(ChatViewId)) { - this.updatePartVisibility(layoutService, chatLocation, false); + if ( + chatLocation === ViewContainerLocation.AuxiliaryBar && + configurationService.getValue(ChatConfiguration.CommandCenterTriStateToggle) && + !layoutService.isAuxiliaryBarMaximized() + ) { + layoutService.setAuxiliaryBarMaximized(true); + } else { + this.updatePartVisibility(layoutService, chatLocation, false); + } } else { this.updatePartVisibility(layoutService, chatLocation, true); (await widgetService.revealWidget())?.focusInput(); diff --git a/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.ts b/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.ts index c911f7968033e..a1217866701aa 100644 --- a/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.ts +++ b/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.ts @@ -298,11 +298,11 @@ export class AgentSessionRenderer extends Disposable implements ICompressibleTre session.element.timing.inProgressTime && session.element.timing.finishedOrFailedTime > session.element.timing.inProgressTime ) { - const duration = this.toDuration(session.element.timing.inProgressTime, session.element.timing.finishedOrFailedTime, false); + const duration = this.toDuration(session.element.timing.inProgressTime, session.element.timing.finishedOrFailedTime, false, true); template.description.textContent = session.element.status === AgentSessionStatus.Failed ? - localize('chat.session.status.failedAfter', "Failed after {0}.", duration ?? '1s') : - localize('chat.session.status.completedAfter', "Completed in {0}.", duration ?? '1s'); + localize('chat.session.status.failedAfter', "Failed after {0}.", duration) : + localize('chat.session.status.completedAfter', "Completed in {0}.", duration); } else { template.description.textContent = session.element.status === AgentSessionStatus.Failed ? localize('chat.session.status.failed', "Failed") : @@ -311,13 +311,9 @@ export class AgentSessionRenderer extends Disposable implements ICompressibleTre } } - private toDuration(startTime: number, endTime: number, useFullTimeWords: boolean): string | undefined { - const elapsed = Math.round((endTime - startTime) / 1000) * 1000; - if (elapsed < 1000) { - return undefined; - } - - if (elapsed < 30000) { + private toDuration(startTime: number, endTime: number, useFullTimeWords: boolean, disallowNow: boolean): string { + const elapsed = Math.max(Math.round((endTime - startTime) / 1000) * 1000, 1000 /* clamp to 1s */); + if (!disallowNow && elapsed < 30000) { return localize('secondsDuration', "now"); } @@ -329,7 +325,7 @@ export class AgentSessionRenderer extends Disposable implements ICompressibleTre const getTimeLabel = (session: IAgentSession) => { let timeLabel: string | undefined; if (session.status === AgentSessionStatus.InProgress && session.timing.inProgressTime) { - timeLabel = this.toDuration(session.timing.inProgressTime, Date.now(), false); + timeLabel = this.toDuration(session.timing.inProgressTime, Date.now(), false, false); } if (!timeLabel) { diff --git a/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css b/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css index 846c2ff8fd906..38aa85e3d7842 100644 --- a/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +++ b/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css @@ -47,10 +47,11 @@ .monaco-list-row .agent-session-title-toolbar { /* for the absolute positioning of the toolbar below */ position: relative; + height: 16px; .monaco-toolbar { /* this is required because the overal height (including the padding needed for hover feedback) would push down the title otherwise */ - position: absolute; + position: relative; right: 0; top: 0; display: none; @@ -59,7 +60,6 @@ .monaco-list-row:hover .agent-session-title-toolbar, .monaco-list-row.focused .agent-session-title-toolbar { - width: 44px; .monaco-toolbar { display: block; diff --git a/src/vs/workbench/contrib/chat/browser/chat.contribution.ts b/src/vs/workbench/contrib/chat/browser/chat.contribution.ts index 9794f9c58b16a..a6db161cd4640 100644 --- a/src/vs/workbench/contrib/chat/browser/chat.contribution.ts +++ b/src/vs/workbench/contrib/chat/browser/chat.contribution.ts @@ -55,9 +55,9 @@ import { ILanguageModelToolsService } from '../common/tools/languageModelToolsSe import { ChatPromptFilesExtensionPointHandler } from '../common/promptSyntax/chatPromptFilesContribution.js'; import { ChatPromptContentStore, IChatPromptContentStore } from '../common/promptSyntax/chatPromptContentStore.js'; import { PromptsConfig } from '../common/promptSyntax/config/config.js'; -import { INSTRUCTIONS_DEFAULT_SOURCE_FOLDER, INSTRUCTION_FILE_EXTENSION, LEGACY_MODE_DEFAULT_SOURCE_FOLDER, LEGACY_MODE_FILE_EXTENSION, PROMPT_DEFAULT_SOURCE_FOLDER, PROMPT_FILE_EXTENSION, DEFAULT_SKILL_SOURCE_FOLDERS } from '../common/promptSyntax/config/promptFileLocations.js'; +import { INSTRUCTIONS_DEFAULT_SOURCE_FOLDER, INSTRUCTION_FILE_EXTENSION, LEGACY_MODE_DEFAULT_SOURCE_FOLDER, LEGACY_MODE_FILE_EXTENSION, PROMPT_DEFAULT_SOURCE_FOLDER, PROMPT_FILE_EXTENSION, DEFAULT_SKILL_SOURCE_FOLDERS, AGENTS_SOURCE_FOLDER, AGENT_FILE_EXTENSION, SKILL_FILENAME } from '../common/promptSyntax/config/promptFileLocations.js'; import { PromptLanguageFeaturesProvider } from '../common/promptSyntax/promptFileContributions.js'; -import { AGENT_DOCUMENTATION_URL, INSTRUCTIONS_DOCUMENTATION_URL, PROMPT_DOCUMENTATION_URL } from '../common/promptSyntax/promptTypes.js'; +import { AGENT_DOCUMENTATION_URL, INSTRUCTIONS_DOCUMENTATION_URL, PROMPT_DOCUMENTATION_URL, SKILL_DOCUMENTATION_URL } from '../common/promptSyntax/promptTypes.js'; import { IPromptsService } from '../common/promptSyntax/service/promptsService.js'; import { PromptsService } from '../common/promptSyntax/service/promptsServiceImpl.js'; import { LanguageModelToolsExtensionPointHandler } from '../common/tools/languageModelToolsContribution.js'; @@ -86,6 +86,7 @@ import { registerChatElicitationActions } from './actions/chatElicitationActions import { registerChatToolActions } from './actions/chatToolActions.js'; import { ChatTransferContribution } from './actions/chatTransfer.js'; import './agentSessions/agentSessions.contribution.js'; +import { IAgentSessionsService } from './agentSessions/agentSessionsService.js'; import { IChatAccessibilityService, IChatCodeBlockContextProviderService, IChatWidgetService, IQuickChatService } from './chat.js'; import { ChatAccessibilityService } from './accessibility/chatAccessibilityService.js'; import './attachments/chatAttachmentModel.js'; @@ -138,7 +139,7 @@ import { ChatWidgetService } from './widget/chatWidgetService.js'; import { ILanguageModelsConfigurationService } from '../common/languageModelsConfiguration.js'; import { ChatWindowNotifier } from './chatWindowNotifier.js'; import { ChatRepoInfoContribution } from './chatRepoInfo.js'; -import { VALID_SKILL_PATH_PATTERN } from '../common/promptSyntax/utils/promptFilesLocator.js'; +import { VALID_PROMPT_FOLDER_PATTERN } from '../common/promptSyntax/utils/promptFilesLocator.js'; const toolReferenceNameEnumValues: string[] = []; const toolReferenceNameEnumDescriptions: string[] = []; @@ -193,6 +194,12 @@ configurationRegistry.registerConfiguration({ markdownDescription: nls.localize('chat.commandCenter.enabled', "Controls whether the command center shows a menu for actions to control chat (requires {0}).", '`#window.commandCenter#`'), default: true }, + [ChatConfiguration.CommandCenterTriStateToggle]: { // TODO@bpasero settle this + type: 'boolean', + markdownDescription: nls.localize('chat.commandCenter.triStateToggle', "When enabled, clicking the chat icon in the command center cycles through: show chat, maximize chat, hide chat. This requires chat to be contained in the secondary sidebar."), + default: product.quality !== 'stable', + tags: ['experimental'] + }, [ChatConfiguration.AgentStatusEnabled]: { type: 'boolean', markdownDescription: nls.localize('chat.agentsControl.enabled', "Controls whether the Agent Status indicator is shown in the title bar command center. Enabling this setting will automatically enable {0}.", '`#window.commandCenter#`'), @@ -574,6 +581,9 @@ configurationRegistry.registerConfiguration({ description: nls.localize('chat.editMode.hidden', "When enabled, hides the Edit mode from the chat mode picker."), default: false, tags: ['experimental'], + experiment: { + mode: 'auto' + } }, [ChatConfiguration.EnableMath]: { type: 'boolean', @@ -651,6 +661,10 @@ configurationRegistry.registerConfiguration({ [INSTRUCTIONS_DEFAULT_SOURCE_FOLDER]: true, }, additionalProperties: { type: 'boolean' }, + propertyNames: { + pattern: VALID_PROMPT_FOLDER_PATTERN, + patternErrorMessage: nls.localize('chat.instructionsLocations.invalidPath', "Paths must be relative or start with '~/'. Absolute paths and '\\' separators are not supported. Glob patterns are deprecated and will be removed in future versions."), + }, restricted: true, tags: ['prompts', 'reusable prompts', 'prompt snippets', 'instructions'], examples: [ @@ -680,6 +694,10 @@ configurationRegistry.registerConfiguration({ }, additionalProperties: { type: 'boolean' }, unevaluatedProperties: { type: 'boolean' }, + propertyNames: { + pattern: VALID_PROMPT_FOLDER_PATTERN, + patternErrorMessage: nls.localize('chat.promptFileLocations.invalidPath', "Paths must be relative or start with '~/'. Absolute paths and '\\' separators are not supported. Glob patterns are deprecated and will be removed in future versions."), + }, restricted: true, tags: ['prompts', 'reusable prompts', 'prompt snippets', 'instructions'], examples: [ @@ -722,6 +740,40 @@ configurationRegistry.registerConfiguration({ }, ], }, + [PromptsConfig.AGENTS_LOCATION_KEY]: { + type: 'object', + title: nls.localize( + 'chat.agents.config.locations.title', + "Agent File Locations", + ), + markdownDescription: nls.localize( + 'chat.agents.config.locations.description', + "Specify location(s) of custom agent files (`*{0}`). [Learn More]({1}).\n\nRelative paths are resolved from the root folder(s) of your workspace.", + AGENT_FILE_EXTENSION, + AGENT_DOCUMENTATION_URL, + ), + default: { + [AGENTS_SOURCE_FOLDER]: true, + }, + additionalProperties: { type: 'boolean' }, + propertyNames: { + pattern: VALID_PROMPT_FOLDER_PATTERN, + patternErrorMessage: nls.localize('chat.agentLocations.invalidPath', "Paths must be relative or start with '~/'. Absolute paths and '\\' separators are not supported."), + }, + restricted: true, + tags: ['prompts', 'reusable prompts', 'prompt snippets', 'instructions'], + examples: [ + { + [AGENTS_SOURCE_FOLDER]: true, + }, + { + [AGENTS_SOURCE_FOLDER]: true, + 'my-agents': true, + '../shared-agents': true, + '~/.copilot/agents': true, + }, + ], + }, [PromptsConfig.USE_AGENT_MD]: { type: 'boolean', title: nls.localize('chat.useAgentMd.title', "Use AGENTS.md file",), @@ -752,14 +804,19 @@ configurationRegistry.registerConfiguration({ [PromptsConfig.SKILLS_LOCATION_KEY]: { type: 'object', title: nls.localize('chat.agentSkillsLocations.title', "Agent Skills Locations",), - markdownDescription: nls.localize('chat.agentSkillsLocations.description', "Specify where agent skills are located. Each path should contain skill subfolders with SKILL.md files (e.g., my-skills/skillA/SKILL.md → add my-skills).\n\n**Supported path types:**\n- Workspace paths: `my-skills`, `./my-skills`, `../shared-skills`\n- User home paths: `~/.copilot/skills`, `~/.claude/skills`",), + markdownDescription: nls.localize( + 'chat.agentSkillsLocations.description', + "Specify location(s) of agent skills (`{0}`) that can be used in Chat Sessions. [Learn More]({1}).\n\nEach path should contain skill subfolders with SKILL.md files (e.g., add `my-skills` if you have `my-skills/skillA/SKILL.md`). Relative paths are resolved from the root folder(s) of your workspace.", + SKILL_FILENAME, + SKILL_DOCUMENTATION_URL, + ), default: { ...DEFAULT_SKILL_SOURCE_FOLDERS.map((folder) => ({ [folder.path]: true })).reduce((acc, curr) => ({ ...acc, ...curr }), {}), }, additionalProperties: { type: 'boolean' }, propertyNames: { - pattern: VALID_SKILL_PATH_PATTERN, - patternErrorMessage: nls.localize('chat.agentSkillsLocations.invalidPath', "Skill location paths must either be relative paths or start with '~' for user home directory."), + pattern: VALID_PROMPT_FOLDER_PATTERN, + patternErrorMessage: nls.localize('chat.agentSkillsLocations.invalidPath', "Paths must be relative or start with '~/'. Absolute paths and '\\' separators are not supported."), }, restricted: true, tags: ['prompts', 'reusable prompts', 'prompt snippets', 'instructions'], @@ -1143,15 +1200,17 @@ class ChatSlashStaticSlashCommandsContribution extends Disposable { @IChatAgentService chatAgentService: IChatAgentService, @IChatWidgetService chatWidgetService: IChatWidgetService, @IInstantiationService instantiationService: IInstantiationService, + @IAgentSessionsService agentSessionsService: IAgentSessionsService, ) { super(); this._store.add(slashCommandService.registerSlashCommand({ command: 'clear', - detail: nls.localize('clear', "Start a new chat"), + detail: nls.localize('clear', "Start a new chat and archive the current one"), sortText: 'z2_clear', executeImmediately: true, locations: [ChatAgentLocation.Chat] - }, async () => { + }, async (_prompt, _progress, _history, _location, sessionResource) => { + agentSessionsService.getSession(sessionResource)?.setArchived(true); commandService.executeCommand(ACTION_ID_NEW_CHAT); })); this._store.add(slashCommandService.registerSlashCommand({ diff --git a/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.ts b/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.ts index 614e2b2f281eb..2cb18e9f1caa9 100644 --- a/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.ts +++ b/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.ts @@ -6,7 +6,7 @@ import { distinct } from '../../../../../base/common/arrays.js'; import { IMatch, IFilter, or, matchesCamelCase, matchesWords, matchesBaseContiguousSubString } from '../../../../../base/common/filters.js'; import { Emitter } from '../../../../../base/common/event.js'; -import { ILanguageModelsService, IUserFriendlyLanguageModel, ILanguageModelChatMetadataAndIdentifier } from '../../../chat/common/languageModels.js'; +import { ILanguageModelsService, ILanguageModelProviderDescriptor, ILanguageModelChatMetadataAndIdentifier } from '../../../chat/common/languageModels.js'; import { localize } from '../../../../../nls.js'; import { Disposable } from '../../../../../base/common/lifecycle.js'; import { ILanguageModelsProviderGroup } from '../../common/languageModelsConfiguration.js'; @@ -39,12 +39,13 @@ export const SEARCH_SUGGESTIONS = { }; export interface ILanguageModelProvider { - vendor: IUserFriendlyLanguageModel; + vendor: ILanguageModelProviderDescriptor; group: ILanguageModelsProviderGroup; } export interface ILanguageModel extends ILanguageModelChatMetadataAndIdentifier { provider: ILanguageModelProvider; + visible: boolean; } export interface ILanguageModelEntry { @@ -169,14 +170,13 @@ export class ChatModelsViewModel extends Disposable { filter(searchValue: string): readonly IViewModelEntry[] { if (searchValue !== this.searchValue) { + this.searchValue = searchValue; this.collapsedGroups.clear(); + if (!this.modelsSorted) { + this.languageModelGroups = this.groupModels(this.languageModels); + } + this.doFilter(); } - this.searchValue = searchValue; - if (!this.modelsSorted) { - this.languageModelGroups = this.groupModels(this.languageModels); - } - - this.doFilter(); return this.viewModelEntries; } @@ -258,7 +258,7 @@ export class ChatModelsViewModel extends Disposable { for (const modelEntry of modelEntries) { if (visible !== undefined) { - if ((modelEntry.metadata.isUserSelectable ?? false) !== visible) { + if (modelEntry.visible !== visible) { continue; } } @@ -361,7 +361,7 @@ export class ChatModelsViewModel extends Disposable { if (this.groupBy === ChatModelGroup.Visibility) { const visible = [], hidden = []; for (const model of languageModels) { - if (model.metadata.isUserSelectable) { + if (model.visible) { visible.push(model); } else { hidden.push(model); @@ -418,18 +418,18 @@ export class ChatModelsViewModel extends Disposable { }; } result.sort((a, b) => { - if (a.models[0]?.provider.vendor.vendor === 'copilot') { return -1; } - if (b.models[0]?.provider.vendor.vendor === 'copilot') { return 1; } + if (a.models[0]?.provider.vendor.isDefault) { return -1; } + if (b.models[0]?.provider.vendor.isDefault) { return 1; } return a.group.label.localeCompare(b.group.label); }); } for (const group of result) { group.models.sort((a, b) => { - if (a.provider.vendor.vendor === 'copilot' && b.provider.vendor.vendor === 'copilot') { + if (a.provider.vendor.isDefault && b.provider.vendor.isDefault) { return a.metadata.name.localeCompare(b.metadata.name); } - if (a.provider.vendor.vendor === 'copilot') { return -1; } - if (b.provider.vendor.vendor === 'copilot') { return 1; } + if (a.provider.vendor.isDefault) { return -1; } + if (b.provider.vendor.isDefault) { return 1; } if (a.provider.group.name === b.provider.group.name) { return a.metadata.name.localeCompare(b.metadata.name); } @@ -455,10 +455,10 @@ export class ChatModelsViewModel extends Disposable { }; } - getVendors(): IUserFriendlyLanguageModel[] { + getVendors(): ILanguageModelProviderDescriptor[] { return [...this.languageModelsService.getVendors()].sort((a, b) => { - if (a.vendor === 'copilot') { return -1; } - if (b.vendor === 'copilot') { return 1; } + if (a.isDefault) { return -1; } + if (b.isDefault) { return 1; } return a.displayName.localeCompare(b.displayName); }); } @@ -494,7 +494,7 @@ export class ChatModelsViewModel extends Disposable { this.doFilter(); } - private addVendorModels(vendor: IUserFriendlyLanguageModel): void { + private addVendorModels(vendor: ILanguageModelProviderDescriptor): void { const models: ILanguageModel[] = []; const languageModelsGroups = this.languageModelsService.getLanguageModelGroups(vendor.vendor); for (const group of languageModelsGroups) { @@ -519,13 +519,14 @@ export class ChatModelsViewModel extends Disposable { if (!metadata) { continue; } - if (vendor.vendor === 'copilot' && metadata.id === 'auto') { + if (vendor.isDefault && metadata.id === 'auto') { continue; } models.push({ identifier, metadata, provider, + visible: metadata.isUserSelectable ?? false, }); } } @@ -533,14 +534,14 @@ export class ChatModelsViewModel extends Disposable { } toggleVisibility(model: ILanguageModelEntry): void { - const isVisible = model.model.metadata.isUserSelectable ?? false; - const newVisibility = !isVisible; + const newVisibility = !model.model.visible; this.languageModelsService.updateModelPickerPreference(model.model.identifier, newVisibility); const metadata = this.languageModelsService.lookupLanguageModel(model.model.identifier); const index = this.viewModelEntries.indexOf(model); if (metadata && index !== -1) { - model.id = this.getModelId(model.model); + model.model.visible = newVisibility; model.model.metadata = metadata; + model.id = this.getModelId(model.model); if (this.groupBy === ChatModelGroup.Visibility) { this.modelsSorted = false; } @@ -548,8 +549,43 @@ export class ChatModelsViewModel extends Disposable { } } + setModelsVisibility(models: ILanguageModelEntry[], visible: boolean): void { + for (const model of models) { + this.languageModelsService.updateModelPickerPreference(model.model.identifier, visible); + model.model.visible = visible; + } + // Refresh to update the UI + this.languageModelGroups = this.groupModels(this.languageModels); + this.doFilter(); + } + + setGroupVisibility(group: ILanguageModelProviderEntry | ILanguageModelGroupEntry, visible: boolean): void { + const models = this.getModelsForGroup(group); + for (const model of models) { + this.languageModelsService.updateModelPickerPreference(model.identifier, visible); + model.visible = visible; + } + // Refresh to update the UI + this.languageModelGroups = this.groupModels(this.languageModels); + this.doFilter(); + } + + getModelsForGroup(group: ILanguageModelProviderEntry | ILanguageModelGroupEntry): ILanguageModel[] { + if (isLanguageModelProviderEntry(group)) { + return this.languageModels.filter(m => + this.getProviderGroupId(m.provider.group) === group.id + ); + } else { + // Group by visibility + return this.languageModels.filter(m => + (group.id === 'visible' && m.visible) || + (group.id === 'hidden' && !m.visible) + ); + } + } + private getModelId(modelEntry: ILanguageModel): string { - return `${modelEntry.provider.group.name}.${modelEntry.identifier}.${modelEntry.metadata.version}-visible:${modelEntry.metadata.isUserSelectable}`; + return `${modelEntry.provider.group.name}.${modelEntry.identifier}.${modelEntry.metadata.version}-visible:${modelEntry.visible}`; } private getProviderGroupId(group: ILanguageModelsProviderGroup): string { @@ -575,7 +611,7 @@ export class ChatModelsViewModel extends Disposable { this.collapsedGroups.add(entry.id); } } - this.filter(this.searchValue); + this.doFilter(); } getConfiguredVendors(): ILanguageModelProvider[] { diff --git a/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.ts b/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.ts index 23d1cd4a26c66..970900f5eeca3 100644 --- a/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.ts +++ b/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.ts @@ -9,7 +9,7 @@ import { Emitter } from '../../../../../base/common/event.js'; import * as DOM from '../../../../../base/browser/dom.js'; import { Button, IButtonOptions } from '../../../../../base/browser/ui/button/button.js'; import { ThemeIcon } from '../../../../../base/common/themables.js'; -import { ILanguageModelsService, IUserFriendlyLanguageModel } from '../../../chat/common/languageModels.js'; +import { ILanguageModelsService, ILanguageModelProviderDescriptor } from '../../../chat/common/languageModels.js'; import { localize } from '../../../../../nls.js'; import { defaultButtonStyles } from '../../../../../platform/theme/browser/defaultStyles.js'; import { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js'; @@ -64,9 +64,9 @@ export function getModelHoverContent(model: ILanguageModel): MarkdownString { markdown.appendText(`\n`); } - if (model.metadata.detail) { + if (model.metadata.multiplier) { markdown.appendMarkdown(`${localize('models.cost', 'Multiplier')}: `); - markdown.appendMarkdown(model.metadata.detail); + markdown.appendMarkdown(model.metadata.multiplier); markdown.appendText(`\n`); } @@ -135,7 +135,10 @@ class ModelsSearchFilterDropdownMenuActionViewItem extends DropdownMenuActionVie constructor( action: IAction, options: IActionViewItemOptions, - private readonly searchWidget: SuggestEnabledInput, + private readonly search: { + getValue(): string; + setValue(newValue: string): void; + }, private readonly viewModel: ChatModelsViewModel, @IContextMenuService contextMenuService: IContextMenuService ) { @@ -167,7 +170,7 @@ class ModelsSearchFilterDropdownMenuActionViewItem extends DropdownMenuActionVie private createProviderAction(vendor: string, displayName: string): IAction { const query = `@provider:"${displayName}"`; - const currentQuery = this.searchWidget.getValue(); + const currentQuery = this.search.getValue(); const isChecked = currentQuery.includes(query) || currentQuery.includes(`@provider:${vendor}`); return { @@ -183,7 +186,7 @@ class ModelsSearchFilterDropdownMenuActionViewItem extends DropdownMenuActionVie private createCapabilityAction(capability: string, label: string): IAction { const query = `@capability:${capability}`; - const currentQuery = this.searchWidget.getValue(); + const currentQuery = this.search.getValue(); const isChecked = currentQuery.includes(query); return { @@ -200,7 +203,7 @@ class ModelsSearchFilterDropdownMenuActionViewItem extends DropdownMenuActionVie private createVisibleAction(visible: boolean, label: string): IAction { const query = `@visible:${visible}`; const oppositeQuery = `@visible:${!visible}`; - const currentQuery = this.searchWidget.getValue(); + const currentQuery = this.search.getValue(); const isChecked = currentQuery.includes(query); return { @@ -215,10 +218,9 @@ class ModelsSearchFilterDropdownMenuActionViewItem extends DropdownMenuActionVie } private toggleFilterAndSearch(query: string, alternativeQueries: string[] = []): void { - const currentQuery = this.searchWidget.getValue(); + const currentQuery = this.search.getValue(); const newQuery = toggleFilter(currentQuery, query, alternativeQueries); - this.searchWidget.setValue(newQuery); - this.searchWidget.focus(); + this.search.setValue(newQuery); } private getActions(): IAction[] { @@ -280,7 +282,7 @@ abstract class ModelsTableColumnRenderer