mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Merge branch 'microsoft:main' into fix-glibc-parse
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
@@ -118,11 +118,11 @@ class GitDecorationProvider implements FileDecorationProvider {
|
||||
private onDidRunGitStatus(): void {
|
||||
const newDecorations = new Map<string, FileDecoration>();
|
||||
|
||||
this.collectSubmoduleDecorationData(newDecorations);
|
||||
this.collectDecorationData(this.repository.indexGroup, newDecorations);
|
||||
this.collectDecorationData(this.repository.untrackedGroup, newDecorations);
|
||||
this.collectDecorationData(this.repository.workingTreeGroup, newDecorations);
|
||||
this.collectDecorationData(this.repository.mergeGroup, newDecorations);
|
||||
this.collectSubmoduleDecorationData(newDecorations);
|
||||
|
||||
const uris = new Set([...this.decorations.keys()].concat([...newDecorations.keys()]));
|
||||
this.decorations = newDecorations;
|
||||
|
||||
@@ -2385,16 +2385,7 @@ export class Repository implements Disposable {
|
||||
}
|
||||
|
||||
switch (raw.y) {
|
||||
case 'M': {
|
||||
// https://git-scm.com/docs/git-status#_porcelain_format_version_1
|
||||
// When using `-z` with the porcelain v1 format any submodule changes
|
||||
// are reported as modified M instead of m or single ?. Due to that we
|
||||
// will ignore any changes reported for the submodule folder.
|
||||
if (this.submodules.every(s => !pathEquals(s.path, raw.path))) {
|
||||
workingTreeGroup.push(new Resource(this.resourceCommandResolver, ResourceGroupType.WorkingTree, uri, Status.MODIFIED, useIcons, renameUri));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'M': workingTreeGroup.push(new Resource(this.resourceCommandResolver, ResourceGroupType.WorkingTree, uri, Status.MODIFIED, useIcons, renameUri)); break;
|
||||
case 'D': workingTreeGroup.push(new Resource(this.resourceCommandResolver, ResourceGroupType.WorkingTree, uri, Status.DELETED, useIcons, renameUri)); break;
|
||||
case 'A': workingTreeGroup.push(new Resource(this.resourceCommandResolver, ResourceGroupType.WorkingTree, uri, Status.INTENT_TO_ADD, useIcons, renameUri)); break;
|
||||
case 'R': workingTreeGroup.push(new Resource(this.resourceCommandResolver, ResourceGroupType.WorkingTree, uri, Status.INTENT_TO_RENAME, useIcons, renameUri)); break;
|
||||
|
||||
@@ -176,12 +176,23 @@
|
||||
color: var(--vscode-textLink-activeForeground);
|
||||
}
|
||||
|
||||
/** Spans in markdown hovers need a margin-bottom to avoid looking cramped: https://github.com/microsoft/vscode/issues/101496 **/
|
||||
.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span {
|
||||
/**
|
||||
* Spans in markdown hovers need a margin-bottom to avoid looking cramped:
|
||||
* https://github.com/microsoft/vscode/issues/101496
|
||||
|
||||
* This was later refined to only apply when the last child of a rendered markdown block (before the
|
||||
* border or a `hr`) uses background color:
|
||||
* https://github.com/microsoft/vscode/issues/228136
|
||||
*/
|
||||
.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) p:last-child [style*="background-color"] {
|
||||
margin-bottom: 4px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a slight margin to try vertically align codicons with any text
|
||||
* https://github.com/microsoft/vscode/issues/221359
|
||||
*/
|
||||
.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span.codicon {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
@@ -105,6 +105,28 @@ export class ConsoleObservableLogger implements IObservableLogger {
|
||||
this.changedObservablesSets.get(derived)!.add(observable);
|
||||
return existingHandleChange.apply(derived, [observable, change]);
|
||||
};
|
||||
|
||||
const debugTrackUpdating = false;
|
||||
if (debugTrackUpdating) {
|
||||
const updating: IObservable<any>[] = [];
|
||||
(derived as any).__debugUpdating = updating;
|
||||
|
||||
const existingBeginUpdate = derived.beginUpdate;
|
||||
derived.beginUpdate = (obs) => {
|
||||
updating.push(obs);
|
||||
return existingBeginUpdate.apply(derived, [obs]);
|
||||
};
|
||||
|
||||
const existingEndUpdate = derived.endUpdate;
|
||||
derived.endUpdate = (obs) => {
|
||||
const idx = updating.indexOf(obs);
|
||||
if (idx === -1) {
|
||||
console.error('endUpdate called without beginUpdate', derived.debugName, obs.debugName);
|
||||
}
|
||||
updating.splice(idx, 1);
|
||||
return existingEndUpdate.apply(derived, [obs]);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
handleDerivedRecomputed(derived: Derived<unknown>, info: IChangeInformation): void {
|
||||
|
||||
@@ -61,7 +61,11 @@ export class ContentHoverController extends Disposable implements IEditorContrib
|
||||
) {
|
||||
super();
|
||||
this._reactToEditorMouseMoveRunner = this._register(new RunOnceScheduler(
|
||||
() => this._reactToEditorMouseMove(this._mouseMoveEvent), 0
|
||||
() => {
|
||||
if (this._mouseMoveEvent) {
|
||||
this._reactToEditorMouseMove(this._mouseMoveEvent);
|
||||
}
|
||||
}, 0
|
||||
));
|
||||
this._hookListeners();
|
||||
this._register(this._editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => {
|
||||
@@ -83,18 +87,17 @@ export class ContentHoverController extends Disposable implements IEditorContrib
|
||||
sticky: hoverOpts.sticky,
|
||||
hidingDelay: hoverOpts.hidingDelay
|
||||
};
|
||||
if (hoverOpts.enabled) {
|
||||
this._listenersStore.add(this._editor.onMouseDown((e: IEditorMouseEvent) => this._onEditorMouseDown(e)));
|
||||
this._listenersStore.add(this._editor.onMouseUp(() => this._onEditorMouseUp()));
|
||||
this._listenersStore.add(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(e)));
|
||||
this._listenersStore.add(this._editor.onKeyDown((e: IKeyboardEvent) => this._onKeyDown(e)));
|
||||
this._listenersStore.add(this._editor.onMouseLeave((e) => this._onEditorMouseLeave(e)));
|
||||
this._listenersStore.add(this._editor.onDidChangeModel(() => this._cancelSchedulerAndHide()));
|
||||
this._listenersStore.add(this._editor.onDidChangeModelContent(() => this._cancelScheduler()));
|
||||
this._listenersStore.add(this._editor.onDidScrollChange((e: IScrollEvent) => this._onEditorScrollChanged(e)));
|
||||
} else {
|
||||
if (!hoverOpts.enabled) {
|
||||
this._cancelSchedulerAndHide();
|
||||
}
|
||||
this._listenersStore.add(this._editor.onMouseDown((e: IEditorMouseEvent) => this._onEditorMouseDown(e)));
|
||||
this._listenersStore.add(this._editor.onMouseUp(() => this._onEditorMouseUp()));
|
||||
this._listenersStore.add(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(e)));
|
||||
this._listenersStore.add(this._editor.onKeyDown((e: IKeyboardEvent) => this._onKeyDown(e)));
|
||||
this._listenersStore.add(this._editor.onMouseLeave((e) => this._onEditorMouseLeave(e)));
|
||||
this._listenersStore.add(this._editor.onDidChangeModel(() => this._cancelSchedulerAndHide()));
|
||||
this._listenersStore.add(this._editor.onDidChangeModelContent(() => this._cancelScheduler()));
|
||||
this._listenersStore.add(this._editor.onDidScrollChange((e: IScrollEvent) => this._onEditorScrollChanged(e)));
|
||||
}
|
||||
|
||||
private _unhookListeners(): void {
|
||||
@@ -156,33 +159,49 @@ export class ContentHoverController extends Disposable implements IEditorContrib
|
||||
this.hideContentHover();
|
||||
}
|
||||
|
||||
private _shouldNotRecomputeCurrentHoverWidget(mouseEvent: IEditorMouseEvent): boolean {
|
||||
|
||||
private _shouldKeepCurrentHover(mouseEvent: IEditorMouseEvent): boolean {
|
||||
const contentWidget = this._contentWidget;
|
||||
if (!contentWidget) {
|
||||
return false;
|
||||
}
|
||||
const isHoverSticky = this._hoverSettings.sticky;
|
||||
|
||||
const isMouseOnStickyContentHoverWidget = (mouseEvent: IEditorMouseEvent, isHoverSticky: boolean): boolean => {
|
||||
const isMouseOnContentHoverWidget = this._isMouseOnContentHoverWidget(mouseEvent);
|
||||
return isHoverSticky && isMouseOnContentHoverWidget;
|
||||
};
|
||||
const isMouseOnColorPicker = (mouseEvent: IEditorMouseEvent): boolean => {
|
||||
const isMouseOnColorPickerOrChoosingColor = (mouseEvent: IEditorMouseEvent): boolean => {
|
||||
const isColorPickerVisible = contentWidget.isColorPickerVisible;
|
||||
const isMouseOnContentHoverWidget = this._isMouseOnContentHoverWidget(mouseEvent);
|
||||
const isColorPickerVisible = this._contentWidget?.isColorPickerVisible ?? false;
|
||||
return isMouseOnContentHoverWidget && isColorPickerVisible;
|
||||
const isMouseOnHoverWithColorPicker = isColorPickerVisible && isMouseOnContentHoverWidget;
|
||||
const isMaybeChoosingColor = isColorPickerVisible && this._isMouseDown;
|
||||
return isMouseOnHoverWithColorPicker || isMaybeChoosingColor;
|
||||
};
|
||||
// TODO@aiday-mar verify if the following is necessary code
|
||||
const isTextSelectedWithinContentHoverWidget = (mouseEvent: IEditorMouseEvent, sticky: boolean): boolean => {
|
||||
return (sticky
|
||||
&& this._contentWidget?.containsNode(mouseEvent.event.browserEvent.view?.document.activeElement)
|
||||
&& !mouseEvent.event.browserEvent.view?.getSelection()?.isCollapsed) ?? false;
|
||||
const view = mouseEvent.event.browserEvent.view;
|
||||
if (!view) {
|
||||
return false;
|
||||
}
|
||||
return sticky && contentWidget.containsNode(view.document.activeElement) && !view.getSelection()?.isCollapsed;
|
||||
};
|
||||
return isMouseOnStickyContentHoverWidget(mouseEvent, isHoverSticky)
|
||||
|| isMouseOnColorPicker(mouseEvent)
|
||||
const isFocused = contentWidget.isFocused;
|
||||
const isResizing = contentWidget.isResizing;
|
||||
const isStickyAndVisibleFromKeyboard = this._hoverSettings.sticky && contentWidget.isVisibleFromKeyboard;
|
||||
|
||||
return this.shouldKeepOpenOnEditorMouseMoveOrLeave
|
||||
|| isFocused
|
||||
|| isResizing
|
||||
|| isStickyAndVisibleFromKeyboard
|
||||
|| isMouseOnStickyContentHoverWidget(mouseEvent, isHoverSticky)
|
||||
|| isMouseOnColorPickerOrChoosingColor(mouseEvent)
|
||||
|| isTextSelectedWithinContentHoverWidget(mouseEvent, isHoverSticky);
|
||||
}
|
||||
|
||||
private _onEditorMouseMove(mouseEvent: IEditorMouseEvent): void {
|
||||
const shouldReactToEditorMouseMove = this._shouldReactToEditorMouseMove(mouseEvent);
|
||||
if (!shouldReactToEditorMouseMove) {
|
||||
this._mouseMoveEvent = mouseEvent;
|
||||
const shouldKeepCurrentHover = this._shouldKeepCurrentHover(mouseEvent);
|
||||
if (shouldKeepCurrentHover) {
|
||||
this._reactToEditorMouseMoveRunner.cancel();
|
||||
return;
|
||||
}
|
||||
const shouldRescheduleHoverComputation = this._shouldRescheduleHoverComputation();
|
||||
@@ -195,28 +214,6 @@ export class ContentHoverController extends Disposable implements IEditorContrib
|
||||
this._reactToEditorMouseMove(mouseEvent);
|
||||
}
|
||||
|
||||
private _shouldReactToEditorMouseMove(mouseEvent: IEditorMouseEvent): boolean {
|
||||
if (this.shouldKeepOpenOnEditorMouseMoveOrLeave) {
|
||||
return false;
|
||||
}
|
||||
this._mouseMoveEvent = mouseEvent;
|
||||
if (this._contentWidget && (this._contentWidget.isFocused || this._contentWidget.isResizing || this._isMouseDown && this._contentWidget.isColorPickerVisible)) {
|
||||
return false;
|
||||
}
|
||||
const sticky = this._hoverSettings.sticky;
|
||||
if (sticky && this._contentWidget?.isVisibleFromKeyboard) {
|
||||
// Sticky mode is on and the hover has been shown via keyboard
|
||||
// so moving the mouse has no effect
|
||||
return false;
|
||||
}
|
||||
const shouldNotRecomputeCurrentHoverWidget = this._shouldNotRecomputeCurrentHoverWidget(mouseEvent);
|
||||
if (shouldNotRecomputeCurrentHoverWidget) {
|
||||
this._reactToEditorMouseMoveRunner.cancel();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private _shouldRescheduleHoverComputation(): boolean {
|
||||
const hidingDelay = this._hoverSettings.hidingDelay;
|
||||
const isContentHoverWidgetVisible = this._contentWidget?.isVisible ?? false;
|
||||
@@ -225,13 +222,12 @@ export class ContentHoverController extends Disposable implements IEditorContrib
|
||||
return isContentHoverWidgetVisible && this._hoverSettings.sticky && hidingDelay > 0;
|
||||
}
|
||||
|
||||
private _reactToEditorMouseMove(mouseEvent: IEditorMouseEvent | undefined): void {
|
||||
if (!mouseEvent) {
|
||||
return;
|
||||
}
|
||||
const contentWidget: ContentHoverWidgetWrapper = this._getOrCreateContentWidget();
|
||||
if (contentWidget.showsOrWillShow(mouseEvent)) {
|
||||
return;
|
||||
private _reactToEditorMouseMove(mouseEvent: IEditorMouseEvent): void {
|
||||
if (this._hoverSettings.enabled) {
|
||||
const contentWidget: ContentHoverWidgetWrapper = this._getOrCreateContentWidget();
|
||||
if (contentWidget.showsOrWillShow(mouseEvent)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (_sticky) {
|
||||
return;
|
||||
|
||||
@@ -419,7 +419,7 @@ export class InlineCompletionsModel extends Disposable {
|
||||
return 'noSuggestion';
|
||||
});
|
||||
|
||||
public readonly inlineCompletionState = derived(reader => {
|
||||
public readonly inlineCompletionState = derived(this, reader => {
|
||||
const s = this.state.read(reader);
|
||||
if (!s || s.kind !== 'ghostText') {
|
||||
return undefined;
|
||||
@@ -430,7 +430,7 @@ export class InlineCompletionsModel extends Disposable {
|
||||
return s;
|
||||
});
|
||||
|
||||
public readonly inlineEditState = derived(reader => {
|
||||
public readonly inlineEditState = derived(this, reader => {
|
||||
const s = this.state.read(reader);
|
||||
if (!s || s.kind !== 'inlineEdit') {
|
||||
return undefined;
|
||||
@@ -438,7 +438,7 @@ export class InlineCompletionsModel extends Disposable {
|
||||
return s;
|
||||
});
|
||||
|
||||
public readonly inlineEditAvailable = derived(reader => {
|
||||
public readonly inlineEditAvailable = derived(this, reader => {
|
||||
const s = this.inlineEditState.read(reader);
|
||||
return !!s;
|
||||
});
|
||||
|
||||
@@ -235,6 +235,7 @@ export class InlineEditsSideBySideDiff extends Disposable {
|
||||
bracketPairsHorizontal: false,
|
||||
highlightActiveIndentation: false,
|
||||
},
|
||||
padding: { top: 0, bottom: 0 },
|
||||
folding: false,
|
||||
selectOnLineNumbers: false,
|
||||
selectionHighlight: false,
|
||||
|
||||
@@ -319,9 +319,6 @@ const _allApiProposals = {
|
||||
shareProvider: {
|
||||
proposal: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.shareProvider.d.ts',
|
||||
},
|
||||
showLocal: {
|
||||
proposal: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.showLocal.d.ts',
|
||||
},
|
||||
speech: {
|
||||
proposal: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.speech.d.ts',
|
||||
},
|
||||
|
||||
@@ -432,7 +432,7 @@ export class ConsoleLogger extends AbstractLogger implements ILogger {
|
||||
warn(message: string | Error, ...args: any[]): void {
|
||||
if (this.canLog(LogLevel.Warning)) {
|
||||
if (this.useColors) {
|
||||
console.log('%c WARN', 'color: #993', message, ...args);
|
||||
console.warn('%c WARN', 'color: #993', message, ...args);
|
||||
} else {
|
||||
console.log(message, ...args);
|
||||
}
|
||||
@@ -442,7 +442,7 @@ export class ConsoleLogger extends AbstractLogger implements ILogger {
|
||||
error(message: string, ...args: any[]): void {
|
||||
if (this.canLog(LogLevel.Error)) {
|
||||
if (this.useColors) {
|
||||
console.log('%c ERR', 'color: #f33', message, ...args);
|
||||
console.error('%c ERR', 'color: #f33', message, ...args);
|
||||
} else {
|
||||
console.error(message, ...args);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import { URI } from '../../../base/common/uri.js';
|
||||
import { MainThreadDiaglogsShape, MainContext, MainThreadDialogOpenOptions, MainThreadDialogSaveOptions } from '../common/extHost.protocol.js';
|
||||
import { extHostNamedCustomer, IExtHostContext } from '../../services/extensions/common/extHostCustomers.js';
|
||||
import { IFileDialogService, IOpenDialogOptions, ISaveDialogOptions } from '../../../platform/dialogs/common/dialogs.js';
|
||||
import { Schemas } from '../../../base/common/network.js';
|
||||
|
||||
@extHostNamedCustomer(MainContext.MainThreadDialogs)
|
||||
export class MainThreadDialogs implements MainThreadDiaglogsShape {
|
||||
@@ -47,7 +46,7 @@ export class MainThreadDialogs implements MainThreadDiaglogsShape {
|
||||
canSelectMany: options?.canSelectMany,
|
||||
defaultUri: options?.defaultUri ? URI.revive(options.defaultUri) : undefined,
|
||||
title: options?.title || undefined,
|
||||
availableFileSystems: options?.allowUIResources ? [Schemas.vscodeRemote, Schemas.file] : []
|
||||
availableFileSystems: []
|
||||
};
|
||||
if (options?.filters) {
|
||||
result.filters = [];
|
||||
|
||||
@@ -781,7 +781,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
return extHostQuickOpen.showInput(options, token);
|
||||
},
|
||||
showOpenDialog(options) {
|
||||
return extHostDialogs.showOpenDialog(extension, options);
|
||||
return extHostDialogs.showOpenDialog(options);
|
||||
},
|
||||
showSaveDialog(options) {
|
||||
return extHostDialogs.showSaveDialog(options);
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
import type * as vscode from 'vscode';
|
||||
import { URI } from '../../../base/common/uri.js';
|
||||
import { MainContext, MainThreadDiaglogsShape, IMainContext } from './extHost.protocol.js';
|
||||
import { checkProposedApiEnabled } from '../../services/extensions/common/extensions.js';
|
||||
import { IExtensionDescription } from '../../../platform/extensions/common/extensions.js';
|
||||
|
||||
export class ExtHostDialogs {
|
||||
|
||||
@@ -17,10 +15,7 @@ export class ExtHostDialogs {
|
||||
this._proxy = mainContext.getProxy(MainContext.MainThreadDialogs);
|
||||
}
|
||||
|
||||
showOpenDialog(extension: IExtensionDescription, options?: vscode.OpenDialogOptions): Promise<URI[] | undefined> {
|
||||
if (options?.allowUIResources) {
|
||||
checkProposedApiEnabled(extension, 'showLocal');
|
||||
}
|
||||
showOpenDialog(options?: vscode.OpenDialogOptions): Promise<URI[] | undefined> {
|
||||
return this._proxy.$showOpenDialog(options).then(filepaths => {
|
||||
return filepaths ? filepaths.map(p => URI.revive(p)) : undefined;
|
||||
});
|
||||
|
||||
@@ -1249,7 +1249,11 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||
}
|
||||
|
||||
focus(): void {
|
||||
this.focusPart(Parts.EDITOR_PART, getWindow(this.activeContainer));
|
||||
if (this.isPanelMaximized() && this.mainContainer === this.activeContainer) {
|
||||
this.focusPart(Parts.PANEL_PART);
|
||||
} else {
|
||||
this.focusPart(Parts.EDITOR_PART, getWindow(this.activeContainer));
|
||||
}
|
||||
}
|
||||
|
||||
private focusPanelOrEditor(): void {
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
background-size: 16px;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
padding: 2px; /* Make sure view actions and container actions align */
|
||||
}
|
||||
|
||||
.monaco-workbench .part > .title > .title-actions .action-label .label {
|
||||
|
||||
@@ -11,12 +11,13 @@ import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js'
|
||||
import { Categories } from '../../../../platform/action/common/actionCommonCategories.js';
|
||||
import { AuxiliaryBarVisibleContext } from '../../../common/contextkeys.js';
|
||||
import { ViewContainerLocation, ViewContainerLocationToString } from '../../../common/views.js';
|
||||
import { IWorkbenchLayoutService, Parts } from '../../../services/layout/browser/layoutService.js';
|
||||
import { ActivityBarPosition, IWorkbenchLayoutService, LayoutSettings, Parts } from '../../../services/layout/browser/layoutService.js';
|
||||
import { IPaneCompositePartService } from '../../../services/panecomposite/browser/panecomposite.js';
|
||||
import { ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js';
|
||||
import { KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js';
|
||||
import { KeyCode, KeyMod } from '../../../../base/common/keyCodes.js';
|
||||
import { SwitchCompositeViewAction } from '../compositeBarActions.js';
|
||||
import { closeIcon } from '../panel/panelActions.js';
|
||||
|
||||
const auxiliaryBarRightIcon = registerIcon('auxiliarybar-right-layout-icon', Codicon.layoutSidebarRight, localize('toggleAuxiliaryIconRight', 'Icon to toggle the auxiliary bar off in its right position.'));
|
||||
const auxiliaryBarRightOffIcon = registerIcon('auxiliarybar-right-off-layout-icon', Codicon.layoutSidebarRightOff, localize('toggleAuxiliaryIconRightOn', 'Icon to toggle the auxiliary bar on in its right position.'));
|
||||
@@ -34,10 +35,11 @@ export class ToggleAuxiliaryBarAction extends Action2 {
|
||||
title: ToggleAuxiliaryBarAction.LABEL,
|
||||
toggled: {
|
||||
condition: AuxiliaryBarVisibleContext,
|
||||
title: localize('secondary sidebar', "Secondary Side Bar"),
|
||||
title: localize('closeSecondarySideBar', 'Hide Secondary Side Bar'),
|
||||
icon: closeIcon,
|
||||
mnemonicTitle: localize({ key: 'secondary sidebar mnemonic', comment: ['&& denotes a mnemonic'] }, "Secondary Si&&de Bar"),
|
||||
},
|
||||
|
||||
icon: closeIcon, // Ensures no flickering when using toggled.icon
|
||||
category: Categories.View,
|
||||
f1: true,
|
||||
keybinding: {
|
||||
@@ -54,6 +56,11 @@ export class ToggleAuxiliaryBarAction extends Action2 {
|
||||
id: MenuId.MenubarAppearanceMenu,
|
||||
group: '2_workbench_layout',
|
||||
order: 2
|
||||
}, {
|
||||
id: MenuId.AuxiliaryBarTitle,
|
||||
group: 'navigation',
|
||||
order: 2,
|
||||
when: ContextKeyExpr.equals(`config.${LayoutSettings.ACTIVITY_BAR_LOCATION}`, ActivityBarPosition.DEFAULT)
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
@@ -8,8 +8,8 @@ import { localize, localize2 } from '../../../../nls.js';
|
||||
import { KeyMod, KeyCode } from '../../../../base/common/keyCodes.js';
|
||||
import { MenuId, MenuRegistry, registerAction2, Action2, IAction2Options } from '../../../../platform/actions/common/actions.js';
|
||||
import { Categories } from '../../../../platform/action/common/actionCommonCategories.js';
|
||||
import { ActivityBarPosition, isHorizontal, IWorkbenchLayoutService, LayoutSettings, PanelAlignment, Parts, Position, positionToString } from '../../../services/layout/browser/layoutService.js';
|
||||
import { AuxiliaryBarVisibleContext, PanelAlignmentContext, PanelMaximizedContext, PanelPositionContext, PanelVisibleContext } from '../../../common/contextkeys.js';
|
||||
import { isHorizontal, IWorkbenchLayoutService, PanelAlignment, Parts, Position, positionToString } from '../../../services/layout/browser/layoutService.js';
|
||||
import { PanelAlignmentContext, PanelMaximizedContext, PanelPositionContext, PanelVisibleContext } from '../../../common/contextkeys.js';
|
||||
import { ContextKeyExpr, ContextKeyExpression } from '../../../../platform/contextkey/common/contextkey.js';
|
||||
import { Codicon } from '../../../../base/common/codicons.js';
|
||||
import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';
|
||||
@@ -24,7 +24,7 @@ import { SwitchCompositeViewAction } from '../compositeBarActions.js';
|
||||
|
||||
const maximizeIcon = registerIcon('panel-maximize', Codicon.chevronUp, localize('maximizeIcon', 'Icon to maximize a panel.'));
|
||||
const restoreIcon = registerIcon('panel-restore', Codicon.chevronDown, localize('restoreIcon', 'Icon to restore a panel.'));
|
||||
const closeIcon = registerIcon('panel-close', Codicon.close, localize('closeIcon', 'Icon to close a panel.'));
|
||||
export const closeIcon = registerIcon('panel-close', Codicon.close, localize('closeIcon', 'Icon to close a panel.'));
|
||||
const panelIcon = registerIcon('panel-layout-icon', Codicon.layoutPanel, localize('togglePanelOffIcon', 'Icon to toggle the panel off when it is on.'));
|
||||
const panelOffIcon = registerIcon('panel-layout-icon-off', Codicon.layoutPanelOff, localize('togglePanelOnIcon', 'Icon to toggle the panel on when it is off.'));
|
||||
|
||||
@@ -39,9 +39,11 @@ export class TogglePanelAction extends Action2 {
|
||||
title: TogglePanelAction.LABEL,
|
||||
toggled: {
|
||||
condition: PanelVisibleContext,
|
||||
title: localize('toggle panel', "Panel"),
|
||||
title: localize('closePanel', 'Hide Panel'),
|
||||
icon: closeIcon,
|
||||
mnemonicTitle: localize({ key: 'toggle panel mnemonic', comment: ['&& denotes a mnemonic'] }, "&&Panel"),
|
||||
},
|
||||
icon: closeIcon, // Ensures no flickering when using toggled.icon
|
||||
f1: true,
|
||||
category: Categories.View,
|
||||
keybinding: { primary: KeyMod.CtrlCmd | KeyCode.KeyJ, weight: KeybindingWeight.WorkbenchContrib },
|
||||
@@ -54,7 +56,11 @@ export class TogglePanelAction extends Action2 {
|
||||
id: MenuId.LayoutControlMenuSubmenu,
|
||||
group: '0_workbench_layout',
|
||||
order: 4
|
||||
},
|
||||
}, {
|
||||
id: MenuId.PanelTitle,
|
||||
group: 'navigation',
|
||||
order: 2
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
@@ -288,51 +294,6 @@ registerAction2(class extends Action2 {
|
||||
}
|
||||
});
|
||||
|
||||
registerAction2(class extends Action2 {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'workbench.action.closePanel',
|
||||
title: localize2('closePanel', 'Hide Panel'),
|
||||
category: Categories.View,
|
||||
icon: closeIcon,
|
||||
menu: [{
|
||||
id: MenuId.CommandPalette,
|
||||
when: PanelVisibleContext,
|
||||
}, {
|
||||
id: MenuId.PanelTitle,
|
||||
group: 'navigation',
|
||||
order: 2
|
||||
}]
|
||||
});
|
||||
}
|
||||
run(accessor: ServicesAccessor) {
|
||||
accessor.get(IWorkbenchLayoutService).setPartHidden(true, Parts.PANEL_PART);
|
||||
}
|
||||
});
|
||||
|
||||
registerAction2(class extends Action2 {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'workbench.action.closeAuxiliaryBar',
|
||||
title: localize2('closeSecondarySideBar', 'Hide Secondary Side Bar'),
|
||||
category: Categories.View,
|
||||
icon: closeIcon,
|
||||
menu: [{
|
||||
id: MenuId.CommandPalette,
|
||||
when: AuxiliaryBarVisibleContext,
|
||||
}, {
|
||||
id: MenuId.AuxiliaryBarTitle,
|
||||
group: 'navigation',
|
||||
order: 2,
|
||||
when: ContextKeyExpr.equals(`config.${LayoutSettings.ACTIVITY_BAR_LOCATION}`, ActivityBarPosition.DEFAULT)
|
||||
}]
|
||||
});
|
||||
}
|
||||
run(accessor: ServicesAccessor) {
|
||||
accessor.get(IWorkbenchLayoutService).setPartHidden(true, Parts.AUXILIARYBAR_PART);
|
||||
}
|
||||
});
|
||||
|
||||
MenuRegistry.appendMenuItems([
|
||||
{
|
||||
id: MenuId.LayoutControlMenu,
|
||||
|
||||
@@ -271,23 +271,6 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.monaco-workbench .part.titlebar > .titlebar-container .window-appicon > .home-bar-icon-badge {
|
||||
position: absolute;
|
||||
right: 9px;
|
||||
bottom: 6px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
z-index: 1;
|
||||
/* on top of home indicator */
|
||||
background-image: url('../../../media/code-icon.svg');
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-size: 8px;
|
||||
pointer-events: none;
|
||||
border-top: 1px solid transparent;
|
||||
border-left: 1px solid transparent;
|
||||
}
|
||||
|
||||
/* Window Controls Container */
|
||||
.monaco-workbench .part.titlebar .window-controls-container {
|
||||
display: flex;
|
||||
|
||||
@@ -15,7 +15,6 @@ import { IConfigurationService, IConfigurationChangeEvent } from '../../../../pl
|
||||
import { DisposableStore, IDisposable } from '../../../../base/common/lifecycle.js';
|
||||
import { IBrowserWorkbenchEnvironmentService } from '../../../services/environment/browser/environmentService.js';
|
||||
import { IThemeService } from '../../../../platform/theme/common/themeService.js';
|
||||
import { ThemeIcon } from '../../../../base/common/themables.js';
|
||||
import { TITLE_BAR_ACTIVE_BACKGROUND, TITLE_BAR_ACTIVE_FOREGROUND, TITLE_BAR_INACTIVE_FOREGROUND, TITLE_BAR_INACTIVE_BACKGROUND, TITLE_BAR_BORDER, WORKBENCH_BACKGROUND } from '../../../common/theme.js';
|
||||
import { isMacintosh, isWindows, isLinux, isWeb, isNative, platformLocale } from '../../../../base/common/platform.js';
|
||||
import { Color } from '../../../../base/common/color.js';
|
||||
@@ -29,8 +28,6 @@ import { createActionViewItem, fillInActionBarActions as fillInActionBarActions
|
||||
import { Action2, IMenu, IMenuService, MenuId, registerAction2 } from '../../../../platform/actions/common/actions.js';
|
||||
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';
|
||||
import { IHostService } from '../../../services/host/browser/host.js';
|
||||
import { Codicon } from '../../../../base/common/codicons.js';
|
||||
import { getIconRegistry } from '../../../../platform/theme/common/iconRegistry.js';
|
||||
import { WindowTitle } from './windowTitle.js';
|
||||
import { CommandCenterControl } from './commandCenterControl.js';
|
||||
import { Categories } from '../../../../platform/action/common/actionCommonCategories.js';
|
||||
@@ -434,21 +431,9 @@ export class BrowserTitlebarPart extends Part implements ITitlebarPart {
|
||||
this.centerContent = append(this.rootContainer, $('.titlebar-center'));
|
||||
this.rightContent = append(this.rootContainer, $('.titlebar-right'));
|
||||
|
||||
// App Icon (Windows, Linux) / Home Indicator (Web)
|
||||
const homeIndicator = this.environmentService.options?.homeIndicator;
|
||||
const supportsAppIcon = isWindows || isLinux || (isWeb && homeIndicator && !this.isAuxiliary);
|
||||
if (supportsAppIcon && !hasNativeTitlebar(this.configurationService, this.titleBarStyle)) {
|
||||
// App Icon (Windows, Linux)
|
||||
if ((isWindows || isLinux) && !hasNativeTitlebar(this.configurationService, this.titleBarStyle)) {
|
||||
this.appIcon = prepend(this.leftContent, $('a.window-appicon'));
|
||||
|
||||
// Web: home indicator
|
||||
if (isWeb && homeIndicator) {
|
||||
const icon: ThemeIcon = getIconRegistry().getIcon(homeIndicator.icon) ? { id: homeIndicator.icon } : Codicon.code;
|
||||
this.appIcon.setAttribute('href', homeIndicator.href);
|
||||
this.appIcon.classList.add(...ThemeIcon.asClassNameArray(icon));
|
||||
this.appIconBadge = document.createElement('div');
|
||||
this.appIconBadge.classList.add('home-bar-icon-badge');
|
||||
this.appIcon.appendChild(this.appIconBadge);
|
||||
}
|
||||
}
|
||||
|
||||
// Draggable region that we can manipulate for #52522
|
||||
|
||||
@@ -332,11 +332,6 @@ export interface IWorkbenchConstructionOptions {
|
||||
|
||||
//#region Branding
|
||||
|
||||
/**
|
||||
* Optional home indicator to appear above the hamburger menu in the activity bar.
|
||||
*/
|
||||
readonly homeIndicator?: IHomeIndicator;
|
||||
|
||||
/**
|
||||
* Optional welcome banner to appear above the workbench. Can be dismissed by the
|
||||
* user.
|
||||
@@ -576,25 +571,6 @@ export interface ICommand {
|
||||
handler: (...args: any[]) => unknown;
|
||||
}
|
||||
|
||||
export interface IHomeIndicator {
|
||||
|
||||
/**
|
||||
* The link to open when clicking the home indicator.
|
||||
*/
|
||||
href: string;
|
||||
|
||||
/**
|
||||
* The icon name for the home indicator. This needs to be one of the existing
|
||||
* icons from our Codicon icon set. For example `code`.
|
||||
*/
|
||||
icon: string;
|
||||
|
||||
/**
|
||||
* A tooltip that will appear while hovering over the home indicator.
|
||||
*/
|
||||
title: string;
|
||||
}
|
||||
|
||||
export interface IWelcomeBanner {
|
||||
|
||||
/**
|
||||
|
||||
@@ -188,7 +188,7 @@ export function registerNewChatActions() {
|
||||
announceChatCleared(accessibilitySignalService);
|
||||
const widget = widgetService.getWidgetBySessionId(context.sessionId);
|
||||
if (widget) {
|
||||
chatEditingService.currentEditingSessionObs.get()?.stop(true);
|
||||
await chatEditingService.currentEditingSessionObs.get()?.stop(true);
|
||||
widget.clear();
|
||||
widget.attachmentModel.clear();
|
||||
widget.focusInput();
|
||||
@@ -199,7 +199,7 @@ export function registerNewChatActions() {
|
||||
const widget = chatView.widget;
|
||||
|
||||
announceChatCleared(accessibilitySignalService);
|
||||
chatEditingService.currentEditingSessionObs.get()?.stop(true);
|
||||
await chatEditingService.currentEditingSessionObs.get()?.stop(true);
|
||||
widget.clear();
|
||||
widget.attachmentModel.clear();
|
||||
widget.focusInput();
|
||||
|
||||
@@ -328,8 +328,6 @@ export class ChatEditingService extends Disposable implements IChatEditingServic
|
||||
if (responseModel.isComplete) {
|
||||
onResponseComplete(responseModel);
|
||||
disposable.dispose();
|
||||
} else if (responseModel.isCanceled || responseModel.isStale) {
|
||||
disposable.dispose();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { ITask, Sequencer, timeout } from '../../../../../base/common/async.js';
|
||||
import { BugIndicatingError } from '../../../../../base/common/errors.js';
|
||||
import { Emitter } from '../../../../../base/common/event.js';
|
||||
import { Disposable } from '../../../../../base/common/lifecycle.js';
|
||||
import { Disposable, dispose } from '../../../../../base/common/lifecycle.js';
|
||||
import { ResourceMap, ResourceSet } from '../../../../../base/common/map.js';
|
||||
import { autorun, derived, IObservable, IReader, ITransaction, observableValue, transaction } from '../../../../../base/common/observable.js';
|
||||
import { URI } from '../../../../../base/common/uri.js';
|
||||
@@ -523,10 +523,9 @@ export class ChatEditingSession extends Disposable implements IChatEditingSessio
|
||||
override dispose() {
|
||||
this._assertNotDisposed();
|
||||
|
||||
for (const entry of this._entriesObs.get()) {
|
||||
entry.dispose();
|
||||
}
|
||||
this._chatService.cancelCurrentRequestForSession(this.chatSessionId);
|
||||
|
||||
dispose(this._entriesObs.get());
|
||||
super.dispose();
|
||||
this._state.set(ChatEditingSessionState.Disposed, undefined);
|
||||
this._onDidDispose.fire();
|
||||
|
||||
@@ -42,7 +42,7 @@ import { IWorkspaceContextService } from '../../../../platform/workspace/common/
|
||||
import { IWorkbenchContribution } from '../../../common/contributions.js';
|
||||
import { IViewDescriptorService, ViewContainerLocation } from '../../../common/views.js';
|
||||
import { IActivityService, ProgressBadge } from '../../../services/activity/common/activity.js';
|
||||
import { AuthenticationSession, IAuthenticationService } from '../../../services/authentication/common/authentication.js';
|
||||
import { AuthenticationSession, IAuthenticationExtensionsService, IAuthenticationService } from '../../../services/authentication/common/authentication.js';
|
||||
import { IWorkbenchExtensionEnablementService } from '../../../services/extensionManagement/common/extensionManagement.js';
|
||||
import { IExtensionService } from '../../../services/extensions/common/extensions.js';
|
||||
import { IWorkbenchLayoutService, Parts } from '../../../services/layout/browser/layoutService.js';
|
||||
@@ -706,6 +706,7 @@ class ChatSetupController extends Disposable {
|
||||
private readonly requests: ChatSetupRequests,
|
||||
@ITelemetryService private readonly telemetryService: ITelemetryService,
|
||||
@IAuthenticationService private readonly authenticationService: IAuthenticationService,
|
||||
@IAuthenticationExtensionsService private readonly authenticationExtensionsService: IAuthenticationExtensionsService,
|
||||
@IViewsService private readonly viewsService: IViewsService,
|
||||
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
|
||||
@IProductService private readonly productService: IProductService,
|
||||
@@ -804,8 +805,11 @@ class ChatSetupController extends Disposable {
|
||||
|
||||
session = await this.authenticationService.createSession(defaultChat.providerId, defaultChat.providerScopes[0]);
|
||||
entitlement = await this.requests.forceResolveEntitlement(session);
|
||||
|
||||
this.authenticationExtensionsService.updateAccountPreference(defaultChat.extensionId, defaultChat.providerId, session.account);
|
||||
this.authenticationExtensionsService.updateAccountPreference(defaultChat.chatExtensionId, defaultChat.providerId, session.account);
|
||||
} catch (error) {
|
||||
// noop
|
||||
this.logService.error(`[chat setup] signIn: error ${error}`);
|
||||
}
|
||||
|
||||
if (!session) {
|
||||
|
||||
@@ -388,7 +388,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
|
||||
this._disposables.add(this._commentThreadWidget.onDidResize(dimension => {
|
||||
this._refresh(dimension);
|
||||
}));
|
||||
if ((this._commentThread.collapsibleState === languages.CommentThreadCollapsibleState.Expanded) || (range === undefined)) {
|
||||
if (this._commentThread.collapsibleState === languages.CommentThreadCollapsibleState.Expanded) {
|
||||
this.show(this.arrowPosition(range), 2);
|
||||
}
|
||||
|
||||
|
||||
@@ -305,7 +305,11 @@ class QuickDiffWidget extends PeekViewWidget {
|
||||
}
|
||||
|
||||
private shouldUseDropdown(): boolean {
|
||||
return this.model.getQuickDiffResults()
|
||||
const visibleQuickDiffs = this.model.quickDiffs.filter(quickDiff => quickDiff.visible);
|
||||
const visibleQuickDiffResults = this.model.getQuickDiffResults()
|
||||
.filter(result => visibleQuickDiffs.some(quickDiff => quickDiff.label === result.label));
|
||||
|
||||
return visibleQuickDiffResults
|
||||
.filter(quickDiff => quickDiff.changes.length > 0).length > 1;
|
||||
}
|
||||
|
||||
@@ -333,9 +337,12 @@ class QuickDiffWidget extends PeekViewWidget {
|
||||
protected override _fillHead(container: HTMLElement): void {
|
||||
super._fillHead(container, true);
|
||||
|
||||
const visibleQuickDiffs = this.model.quickDiffs.filter(quickDiff => quickDiff.visible);
|
||||
|
||||
this.dropdownContainer = dom.prepend(this._titleElement!, dom.$('.dropdown'));
|
||||
this.dropdown = this.instantiationService.createInstance(QuickDiffPickerViewItem, new QuickDiffPickerBaseAction((event?: IQuickDiffSelectItem) => this.switchQuickDiff(event)),
|
||||
this.model.quickDiffs.map(quickDiffer => quickDiffer.label), this.model.changes[this._index].label);
|
||||
this.dropdown = this.instantiationService.createInstance(QuickDiffPickerViewItem,
|
||||
new QuickDiffPickerBaseAction((event?: IQuickDiffSelectItem) => this.switchQuickDiff(event)),
|
||||
visibleQuickDiffs.map(quickDiff => quickDiff.label), this.model.changes[this._index].label);
|
||||
this.dropdown.render(this.dropdownContainer);
|
||||
this.updateActions();
|
||||
}
|
||||
|
||||
@@ -210,7 +210,6 @@ export const testsInFile = async function* (testService: ITestService, ident: IU
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log('iterated', n, 'times');
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/131138
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
export interface OpenDialogOptions {
|
||||
/**
|
||||
* Controls whether the dialog allows users to select local files via the "Show Local" button.
|
||||
* Extensions that set this to `true` should check the scheme of the selected file.
|
||||
* Resources with the `file` scheme come from the same extension host as the extension.
|
||||
* Resources with the `vscode-local` scheme come from an extension host running in the same place as the UI.
|
||||
*/
|
||||
allowUIResources?: boolean;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user