} function isStoredProfileExtension(candidate: any): candidate is IStoredProfileExtension { <del> return typeof candidate === 'object' </del> <ins> return isObject(candidate) </ins> && isIExtensionIdentifier(candidate.identifier) <del> && isUriComponents(candidate.location) && candidate.version && typeof candidate.version === 'string'; </del> <ins> && (isUriComponents(candidate.location) || isString(candidate.location)) && candidate.version && isString(candidate.version); </ins> } function isUriComponents(thing: unknown): thing is UriComponents { if (!thing) { return false; } <del> return typeof (<any>thing).path === 'string' && typeof (<any>thing).scheme === 'string'; </del> <ins> return isString((<any>thing).path) && isString((<any>thing).scheme); </ins> }


private versionId = 0; private bufferSavedVersionId: number | undefined; private ignoreDirtyOnModelContentChange = false; <ins> private ignoreSaveFromSaveParticipants = false; </ins> private static readonly UNDO_REDO_SAVE_PARTICIPANTS_AUTO_SAVE_THROTTLE_THRESHOLD = 500; private lastModelContentChangeFromUndoRedo: number | undefined = undefined;


let versionId = this.versionId; this.trace(`doSave(${versionId}) - enter with versionId ${versionId}`); <ins> // Return early if saved from within save participant to break recursion // // Scenario: a save participant triggers a save() on the model if (this.ignoreSaveFromSaveParticipants) { this.trace(`doSave(${versionId}) - exit - refusing to save() recursively from save participant`); return; } </ins> // Lookup any running pending save for this versionId and return it if found // // Scenario: user invoked the save action multiple times quickly for the same contents


// Run save participants unless save was cancelled meanwhile if (!saveCancellation.token.isCancellationRequested) { <del> await this.textFileService.files.runSaveParticipants(this, { reason: options.reason ?? SaveReason.EXPLICIT }, saveCancellation.token); </del> <ins> this.ignoreSaveFromSaveParticipants = true; try { await this.textFileService.files.runSaveParticipants(this, { reason: options.reason ?? SaveReason.EXPLICIT }, saveCancellation.token); } finally { this.ignoreSaveFromSaveParticipants = false; } </ins> } } catch (error) { this.logService.error(`[text file model] runSaveParticipants(${versionId}) - resulted in an error: ${error.toString()}`, this.resource.toString());


participant.dispose(); }); <del> test('Save Participant, calling save from within is unsupported but does not explode (sync save)', async function () { </del> <ins> test('Save Participant, calling save from within is unsupported but does not explode (sync save, no model change)', async function () { </ins> const model: TextFileEditorModel = instantiationService.createInstance(TextFileEditorModel, toResource.call(this, '/path/index_async.txt'), 'utf8', undefined); <del> await testSaveFromSaveParticipant(model, false); </del> <ins> await testSaveFromSaveParticipant(model, false, false, false); </ins> model.dispose(); }); <del> test('Save Participant, calling save from within is unsupported but does not explode (async save)', async function () { </del> <ins> test('Save Participant, calling save from within is unsupported but does not explode (async save, no model change)', async function () { </ins> const model: TextFileEditorModel = instantiationService.createInstance(TextFileEditorModel, toResource.call(this, '/path/index_async.txt'), 'utf8', undefined); <del> await testSaveFromSaveParticipant(model, true); </del> <ins> await testSaveFromSaveParticipant(model, true, false, false); </ins> model.dispose(); }); <del> async function testSaveFromSaveParticipant(model: TextFileEditorModel, async: boolean): Promise<void> { </del> <ins> test('Save Participant, calling save from within is unsupported but does not explode (sync save, model change)', async function () { const model: TextFileEditorModel = instantiationService.createInstance(TextFileEditorModel, toResource.call(this, '/path/index_async.txt'), 'utf8', undefined); </ins> <del> let breakLoop = false; </del> <ins> await testSaveFromSaveParticipant(model, false, true, false); </ins> <del> const participant = accessor.textFileService.files.addSaveParticipant({ participate: async model => { if (breakLoop) { return; } </del> <ins> model.dispose(); }); test('Save Participant, calling save from within is unsupported but does not explode (async save, model change)', async function () { const model: TextFileEditorModel = instantiationService.createInstance(TextFileEditorModel, toResource.call(this, '/path/index_async.txt'), 'utf8', undefined); await testSaveFromSaveParticipant(model, true, true, false); model.dispose(); }); test('Save Participant, calling save from within is unsupported but does not explode (force)', async function () { const model: TextFileEditorModel = instantiationService.createInstance(TextFileEditorModel, toResource.call(this, '/path/index_async.txt'), 'utf8', undefined); await testSaveFromSaveParticipant(model, false, false, true); </ins> <del> breakLoop = true; </del> <ins> model.dispose(); }); async function testSaveFromSaveParticipant(model: TextFileEditorModel, async: boolean, modelChange: boolean, force: boolean): Promise<void> { const disposable = accessor.textFileService.files.addSaveParticipant({ participate: async () => { </ins> if (async) { await timeout(10); } <del> const newSavePromise = model.save(); // assert that this is the same promise as the outer one assert.strictEqual(savePromise, newSavePromise); </del> <ins> if (modelChange) { model.updateTextEditorModel(createTextBufferFactory('bar')); const newSavePromise = model.save(force ? { force } : undefined); // assert that this is not the same promise as the outer one assert.notStrictEqual(savePromise, newSavePromise); await newSavePromise; } else { const newSavePromise = model.save(force ? { force } : undefined); // assert that this is the same promise as the outer one assert.strictEqual(savePromise, newSavePromise); await savePromise; } </ins> } }); await model.resolve(); model.updateTextEditorModel(createTextBufferFactory('foo')); <del> const savePromise = model.save(); </del> <ins> const savePromise = model.save(force ? { force } : undefined); </ins> await savePromise; <del> participant.dispose(); </del> <ins> disposable.dispose(); </ins> } test('backup and restore (simple)', async function () {


private readonly saveSequentializer = new TaskSequentializer(); <ins> private ignoreSaveFromSaveParticipants = false; </ins> async save(options: IStoredFileWorkingCopySaveOptions = Object.create(null)): Promise<boolean> { if (!this.isResolved()) { return false;


let versionId = this.versionId; this.trace(`doSave(${versionId}) - enter with versionId ${versionId}`); <ins> // Return early if saved from within save participant to break recursion // // Scenario: a save participant triggers a save() on the working copy if (this.ignoreSaveFromSaveParticipants) { this.trace(`doSave(${versionId}) - exit - refusing to save() recursively from save participant`); return; } </ins> // Lookup any running pending save for this versionId and return it if found // // Scenario: user invoked the save action multiple times quickly for the same contents


// Run save participants unless save was cancelled meanwhile if (!saveCancellation.token.isCancellationRequested) { <del> await this.workingCopyFileService.runSaveParticipants(this, { reason: options.reason ?? SaveReason.EXPLICIT }, saveCancellation.token); </del> <ins> this.ignoreSaveFromSaveParticipants = true; try { await this.workingCopyFileService.runSaveParticipants(this, { reason: options.reason ?? SaveReason.EXPLICIT }, saveCancellation.token); } finally { this.ignoreSaveFromSaveParticipants = false; } </ins> } } catch (error) { this.logService.error(`[stored file working copy] runSaveParticipants(${versionId}) - resulted in an error: ${error.toString()}`, this.resource.toString(), this.typeId);


import { basename } from 'vs/base/common/resources'; import { FileChangesEvent, FileChangeType, FileOperationError, FileOperationResult, NotModifiedSinceFileOperationError } from 'vs/platform/files/common/files'; import { SaveReason, SaveSourceRegistry } from 'vs/workbench/common/editor'; <del> import { Promises } from 'vs/base/common/async'; </del> <ins> import { Promises, timeout } from 'vs/base/common/async'; </ins> import { consumeReadable, consumeStream, isReadableStream } from 'vs/base/common/stream'; import { runWithFakedTimers } from 'vs/base/test/common/timeTravelScheduler';


assert.strictEqual(participationCounter, 1); }); <ins> test('Save Participant, calling save from within is unsupported but does not explode (sync save)', async function () { await workingCopy.resolve(); await testSaveFromSaveParticipant(workingCopy, false); }); test('Save Participant, calling save from within is unsupported but does not explode (async save)', async function () { await workingCopy.resolve(); await testSaveFromSaveParticipant(workingCopy, true); }); async function testSaveFromSaveParticipant(workingCopy: StoredFileWorkingCopy<TestStoredFileWorkingCopyModel>, async: boolean): Promise<void> { assert.strictEqual(accessor.workingCopyFileService.hasSaveParticipants, false); const disposable = accessor.workingCopyFileService.addSaveParticipant({ participate: async () => { if (async) { await timeout(10); } await workingCopy.save({ force: true }); } }); assert.strictEqual(accessor.workingCopyFileService.hasSaveParticipants, true); await workingCopy.save({ force: true }); disposable.dispose(); } </ins> test('revert', async () => { await workingCopy.resolve(); workingCopy.model?.updateContents('hello revert');


type KernelQuickPickItem = IQuickPickItem | InstallExtensionPick | KernelPick | SourcePick; const KERNEL_PICKER_UPDATE_DEBOUNCE = 200; <del> registerAction2(class extends Action2 { constructor() { super({ id: SELECT_KERNEL_ID, category: NOTEBOOK_ACTIONS_CATEGORY, title: { value: localize('notebookActions.selectKernel', "Select Notebook Kernel"), original: 'Select Notebook Kernel' }, // precondition: NOTEBOOK_IS_ACTIVE_EDITOR, icon: selectKernelIcon, f1: true, menu: [{ id: MenuId.EditorTitle, when: ContextKeyExpr.and( NOTEBOOK_IS_ACTIVE_EDITOR, ContextKeyExpr.notEquals('config.notebook.globalToolbar', true) ), group: 'navigation', order: -10 }, { id: MenuId.NotebookToolbar, when: ContextKeyExpr.equals('config.notebook.globalToolbar', true), group: 'status', order: -10 }, { id: MenuId.InteractiveToolbar, when: NOTEBOOK_KERNEL_COUNT.notEqualsTo(0), group: 'status', order: -10 }], description: { description: localize('notebookActions.selectKernel.args', "Notebook Kernel Args"), args: [ { name: 'kernelInfo', description: 'The kernel info', schema: { 'type': 'object', 'required': ['id', 'extension'], 'properties': { 'id': { 'type': 'string' }, 'extension': { 'type': 'string' }, 'notebookEditorId': { 'type': 'string' } } } } ] }, }); } async run(accessor: ServicesAccessor, context?: { id: string; extension: string } | { notebookEditorId: string } | { id: string; extension: string; notebookEditorId: string } | { ui?: boolean; notebookEditor?: NotebookEditorWidget } | undefined ): Promise<boolean> { const notebookKernelService = accessor.get(INotebookKernelService); const editorService = accessor.get(IEditorService); const productService = accessor.get(IProductService); const quickInputService = accessor.get(IQuickInputService); const labelService = accessor.get(ILabelService); const logService = accessor.get(ILogService); const paneCompositeService = accessor.get(IPaneCompositePartService); const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService); const extensionHostService = accessor.get(IExtensionService); </del> <ins> type KernelQuickPickContext = { id: string; extension: string } | { notebookEditorId: string } | { id: string; extension: string; notebookEditorId: string } | { ui?: boolean; notebookEditor?: NotebookEditorWidget }; interface IKernelPickerStrategy { showQuickPick(context?: KernelQuickPickContext): Promise<boolean>; } </ins> <del> let editor: INotebookEditor | undefined; if (context !== undefined && 'notebookEditorId' in context) { const editorId = context.notebookEditorId; const matchingEditor = editorService.visibleEditorPanes.find((editorPane) => { const notebookEditor = getNotebookEditorFromEditorPane(editorPane); return notebookEditor?.getId() === editorId; }); editor = getNotebookEditorFromEditorPane(matchingEditor); } else if (context !== undefined && 'notebookEditor' in context) { editor = context?.notebookEditor; } else { editor = getNotebookEditorFromEditorPane(editorService.activeEditorPane); } </del> <ins> class KernelPickerFlatStrategy implements IKernelPickerStrategy { constructor( private readonly _notebookKernelService: INotebookKernelService, private readonly _editorService: IEditorService, private readonly _productService: IProductService, private readonly _quickInputService: IQuickInputService, private readonly _labelService: ILabelService, private readonly _logService: ILogService, private readonly _paneCompositePartService: IPaneCompositePartService, private readonly _extensionWorkbenchService: IExtensionsWorkbenchService, private readonly _extensionService: IExtensionService, ) { } async showQuickPick(context?: KernelQuickPickContext): Promise<boolean> { const editor = this._getEditorFromContext(context); </ins> if (!editor || !editor.hasModel()) { return false;


const notebook = editor.textModel; const scopedContextKeyService = editor.scopedContextKeyService; <del> const matchResult = notebookKernelService.getMatchingKernel(notebook); </del> <ins> const matchResult = this._notebookKernelService.getMatchingKernel(notebook); </ins> const { selected, all } = matchResult; if (selected && controllerId && selected.id === controllerId && ExtensionIdentifier.equals(selected.extension, extensionId)) {


} } if (!newKernel) { <del> logService.warn(`wanted kernel DOES NOT EXIST, wanted: ${wantedId}, all: ${all.map(k => k.id)}`); </del> <ins> this._logService.warn(`wanted kernel DOES NOT EXIST, wanted: ${wantedId}, all: ${all.map(k => k.id)}`); </ins> return false; } } if (newKernel) { <del> notebookKernelService.selectKernelForNotebook(newKernel, notebook); </del> <ins> this._notebookKernelService.selectKernelForNotebook(newKernel, notebook); </ins> return true; } <del> const quickPick = quickInputService.createQuickPick<KernelQuickPickItem>(); const quickPickItems = this._getKernelPickerQuickPickItems(notebook, matchResult, notebookKernelService, scopedContextKeyService); </del> <ins> const quickPick = this._quickInputService.createQuickPick<KernelQuickPickItem>(); const quickPickItems = this._getKernelPickerQuickPickItems(notebook, matchResult, this._notebookKernelService, scopedContextKeyService); </ins> quickPick.items = quickPickItems; quickPick.canSelectMany = false; quickPick.placeholder = selected <del> ? localize('prompt.placeholder.change', "Change kernel for '{0}'", labelService.getUriLabel(notebook.uri, { relative: true })) : localize('prompt.placeholder.select', "Select kernel for '{0}'", labelService.getUriLabel(notebook.uri, { relative: true })); </del> <ins> ? localize('prompt.placeholder.change', "Change kernel for '{0}'", this._labelService.getUriLabel(notebook.uri, { relative: true })) : localize('prompt.placeholder.select', "Select kernel for '{0}'", this._labelService.getUriLabel(notebook.uri, { relative: true })); </ins> <del> quickPick.busy = notebookKernelService.getKernelDetectionTasks(notebook).length > 0; </del> <ins> quickPick.busy = this._notebookKernelService.getKernelDetectionTasks(notebook).length > 0; </ins> <del> const kernelDetectionTaskListener = notebookKernelService.onDidChangeKernelDetectionTasks(() => { quickPick.busy = notebookKernelService.getKernelDetectionTasks(notebook).length > 0; </del> <ins> const kernelDetectionTaskListener = this._notebookKernelService.onDidChangeKernelDetectionTasks(() => { quickPick.busy = this._notebookKernelService.getKernelDetectionTasks(notebook).length > 0; </ins> }); // run extension recommendataion task if quickPickItems is empty const extensionRecommendataionPromise = quickPickItems.length === 0 <del> ? createCancelablePromise(token => this._showInstallKernelExtensionRecommendation(notebook, quickPick, extensionWorkbenchService, token)) </del> <ins> ? createCancelablePromise(token => this._showInstallKernelExtensionRecommendation(notebook, quickPick, this._extensionWorkbenchService, token)) </ins> : undefined; const kernelChangeEventListener = Event.debounce<void, void>( Event.any( <del> notebookKernelService.onDidChangeSourceActions, notebookKernelService.onDidAddKernel, notebookKernelService.onDidRemoveKernel, notebookKernelService.onDidChangeNotebookAffinity </del> <ins> this._notebookKernelService.onDidChangeSourceActions, this._notebookKernelService.onDidAddKernel, this._notebookKernelService.onDidRemoveKernel, this._notebookKernelService.onDidChangeNotebookAffinity </ins> ), (last, _current) => last, KERNEL_PICKER_UPDATE_DEBOUNCE


extensionRecommendataionPromise?.cancel(); const currentActiveItems = quickPick.activeItems; <del> const matchResult = notebookKernelService.getMatchingKernel(notebook); const quickPickItems = this._getKernelPickerQuickPickItems(notebook, matchResult, notebookKernelService, scopedContextKeyService); </del> <ins> const matchResult = this._notebookKernelService.getMatchingKernel(notebook); const quickPickItems = this._getKernelPickerQuickPickItems(notebook, matchResult, this._notebookKernelService, scopedContextKeyService); </ins> quickPick.keepScrollPosition = true; // recalcuate active items


if (pick) { if (isKernelPick(pick)) { newKernel = pick.kernel; <del> notebookKernelService.selectKernelForNotebook(newKernel, notebook); </del> <ins> this._notebookKernelService.selectKernelForNotebook(newKernel, notebook); </ins> return true; } // actions if (pick.id === 'install') { await this._showKernelExtension( <del> paneCompositeService, extensionWorkbenchService, extensionHostService, </del> <ins> this._paneCompositePartService, this._extensionWorkbenchService, this._extensionService, </ins> notebook.viewType ); // suggestedExtension must be defined for this option to be shown, but still check to make TS happy } else if (isInstallExtensionPick(pick)) { await this._showKernelExtension( <del> paneCompositeService, extensionWorkbenchService, extensionHostService, </del> <ins> this._paneCompositePartService, this._extensionWorkbenchService, this._extensionService, </ins> notebook.viewType, pick.extensionId, <del> productService.quality !== 'stable' </del> <ins> this._productService.quality !== 'stable' </ins> ); } else if (isSourcePick(pick)) { // selected explicilty, it should trigger the execution?


return false; } <ins> private _getEditorFromContext(context?: KernelQuickPickContext): INotebookEditor | undefined { let editor: INotebookEditor | undefined; if (context !== undefined && 'notebookEditorId' in context) { const editorId = context.notebookEditorId; const matchingEditor = this._editorService.visibleEditorPanes.find((editorPane) => { const notebookEditor = getNotebookEditorFromEditorPane(editorPane); return notebookEditor?.getId() === editorId; }); editor = getNotebookEditorFromEditorPane(matchingEditor); } else if (context !== undefined && 'notebookEditor' in context) { editor = context?.notebookEditor; } else { editor = getNotebookEditorFromEditorPane(this._editorService.activeEditorPane); } return editor; } </ins> private _getKernelPickerQuickPickItems( notebookTextModel: NotebookTextModel, matchResult: INotebookKernelMatchResult,


): QuickPickInput<KernelQuickPickItem>[] { const { selected, all, suggestions, hidden } = matchResult; <del> function toQuickPick(kernel: INotebookKernel) { const res = <KernelPick>{ kernel, picked: kernel.id === selected?.id, label: kernel.label, description: kernel.description, detail: kernel.detail }; if (kernel.id === selected?.id) { if (!res.description) { res.description = localize('current1', "Currently Selected"); } else { res.description = localize('current2', "{0} - Currently Selected", res.description); } } return res; } </del> const quickPickItems: QuickPickInput<KernelQuickPickItem>[] = []; if (all.length) { // Always display suggested kernels on the top. <del> if (suggestions.length) { quickPickItems.push({ type: 'separator', label: localize('suggestedKernels', "Suggested") }); quickPickItems.push(...suggestions.map(toQuickPick)); } </del> <ins> this._fillInSuggestions(quickPickItems, suggestions, selected); </ins> // Next display all of the kernels not marked as hidden grouped by categories or extensions. // If we don't have a kind, always display those at the bottom. <del> const picks = all.filter(item => (!suggestions.includes(item) && !hidden.includes(item))).map(toQuickPick); </del> <ins> const picks = all.filter(item => (!suggestions.includes(item) && !hidden.includes(item))).map(kernel => this._toQuickPick(kernel, selected)); </ins> const kernelsPerCategory = groupBy(picks, (a, b) => compareIgnoreCase(a.kernel.kind || 'z', b.kernel.kind || 'z')); kernelsPerCategory.forEach(items => { quickPickItems.push({


return quickPickItems; } <ins> private _toQuickPick(kernel: INotebookKernel, selected: INotebookKernel | undefined) { const res = <KernelPick>{ kernel, picked: kernel.id === selected?.id, label: kernel.label, description: kernel.description, detail: kernel.detail }; if (kernel.id === selected?.id) { if (!res.description) { res.description = localize('current1', "Currently Selected"); } else { res.description = localize('current2', "{0} - Currently Selected", res.description); } } return res; } private _fillInSuggestions(quickPickItems: QuickPickInput<KernelQuickPickItem>[], suggestions: INotebookKernel[], selected: INotebookKernel | undefined) { if (!suggestions.length) { return; } if (suggestions.length === 1 && suggestions[0].id === selected?.id) { quickPickItems.push({ type: 'separator', label: localize('selectedKernels', "Selected") }); // The title is already set to "Selected" so we don't need to set it again in description, thus passing in `undefined`. quickPickItems.push(this._toQuickPick(suggestions[0], undefined)); return; } quickPickItems.push({ type: 'separator', label: localize('suggestedKernels', "Suggested") }); quickPickItems.push(...suggestions.map(kernel => this._toQuickPick(kernel, selected))); } </ins> private async _showInstallKernelExtensionRecommendation( notebookTextModel: NotebookTextModel, quickPick: IQuickPick<KernelQuickPickItem>,


} } private async _getKernelRecommendationsQuickPickItems( notebookTextModel: NotebookTextModel, extensionWorkbenchService: IExtensionsWorkbenchService,


const pascalCased = viewType.split(/[^a-z0-9]/ig).map(uppercaseFirstLetter).join(''); view?.search(`@tag:notebookKernel${pascalCased}`); } <ins> } registerAction2(class extends Action2 { constructor() { super({ id: SELECT_KERNEL_ID, category: NOTEBOOK_ACTIONS_CATEGORY, title: { value: localize('notebookActions.selectKernel', "Select Notebook Kernel"), original: 'Select Notebook Kernel' }, icon: selectKernelIcon, f1: true, menu: [{ id: MenuId.EditorTitle, when: ContextKeyExpr.and( NOTEBOOK_IS_ACTIVE_EDITOR, ContextKeyExpr.notEquals('config.notebook.globalToolbar', true) ), group: 'navigation', order: -10 }, { id: MenuId.NotebookToolbar, when: ContextKeyExpr.equals('config.notebook.globalToolbar', true), group: 'status', order: -10 }, { id: MenuId.InteractiveToolbar, when: NOTEBOOK_KERNEL_COUNT.notEqualsTo(0), group: 'status', order: -10 }], description: { description: localize('notebookActions.selectKernel.args', "Notebook Kernel Args"), args: [ { name: 'kernelInfo', description: 'The kernel info', schema: { 'type': 'object', 'required': ['id', 'extension'], 'properties': { 'id': { 'type': 'string' }, 'extension': { 'type': 'string' }, 'notebookEditorId': { 'type': 'string' } } } } ] }, }); } async run(accessor: ServicesAccessor, context?: KernelQuickPickContext): Promise<boolean> { const notebookKernelService = accessor.get(INotebookKernelService); const editorService = accessor.get(IEditorService); const productService = accessor.get(IProductService); const quickInputService = accessor.get(IQuickInputService); const labelService = accessor.get(ILabelService); const logService = accessor.get(ILogService); const paneCompositeService = accessor.get(IPaneCompositePartService); const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService); const extensionHostService = accessor.get(IExtensionService); const strategy = new KernelPickerFlatStrategy( notebookKernelService, editorService, productService, quickInputService, labelService, logService, paneCompositeService, extensionWorkbenchService, extensionHostService ); return await strategy.showQuickPick(context); } </ins> }); export class NotebooKernelActionViewItem extends ActionViewItem {


"scopeName": "source.clojure", "path": "./syntaxes/clojure.tmLanguage.json" } <del> ] </del> <ins> ], "configurationDefaults": { "[clojure]": { "diffEditor.ignoreTrimWhitespace": false } } </ins> }, "repository": { "type": "git",


"language": "coffeescript", "path": "./snippets/coffeescript.code-snippets" } <del> ] </del> <ins> ], "configurationDefaults": { "[coffeescript]": { "diffEditor.ignoreTrimWhitespace": false } } </ins> }, "repository": { "type": "git",


"language": "fsharp", "path": "./snippets/fsharp.code-snippets" } <del> ] </del> <ins> ], "configurationDefaults": { "[fsharp]": { "diffEditor.ignoreTrimWhitespace": false } } </ins> }, "repository": { "type": "git",


"configurationDefaults": { "[markdown]": { "editor.unicodeHighlight.ambiguousCharacters": false, <del> "editor.unicodeHighlight.invisibleCharacters": false </del> <ins> "editor.unicodeHighlight.invisibleCharacters": false, "diffEditor.ignoreTrimWhitespace": false </ins> } } },


"scopeName": "text.pug", "path": "./syntaxes/pug.tmLanguage.json" } <del> ] </del> <ins> ], "configurationDefaults": { "[jade]": { "diffEditor.ignoreTrimWhitespace": false } } </ins> }, "repository": { "type": "git",


"scopeName": "source.regexp.python", "path": "./syntaxes/MagicRegExp.tmLanguage.json" } <del> ] </del> <ins> ], "configurationDefaults": { "[python]": { "diffEditor.ignoreTrimWhitespace": false } } </ins> }, "scripts": { "update-grammar": "node ../node_modules/vscode-grammar-updater/bin MagicStack/MagicPython grammars/MagicPython.tmLanguage ./syntaxes/MagicPython.tmLanguage.json grammars/MagicRegExp.tmLanguage ./syntaxes/MagicRegExp.tmLanguage.json"


"[yaml]": { "editor.insertSpaces": true, "editor.tabSize": 2, <del> "editor.autoIndent": "advanced" </del> <ins> "editor.autoIndent": "advanced", "diffEditor.ignoreTrimWhitespace": false </ins> }, "[dockercompose]": { "editor.insertSpaces": true,


} } })); <ins> disposables.add(quickPick.onDidHide(() => { quickPick.dispose(); resolve(false); })); </ins> this._calculdateKernelSources(editor).then(quickPickItems => { quickPick.items = quickPickItems; if (quickPick.items.length > 0) {


import { memoize } from 'vs/base/common/decorators'; import { onUnexpectedError } from 'vs/base/common/errors'; import { MarkdownString } from 'vs/base/common/htmlContent'; <del> import { Disposable, dispose, disposeIfDisposable, IDisposable } from 'vs/base/common/lifecycle'; </del> <ins> import { dispose, disposeIfDisposable, IDisposable } from 'vs/base/common/lifecycle'; </ins> import * as env from 'vs/base/common/platform'; import severity from 'vs/base/common/severity'; import { noBreakWhitespace } from 'vs/base/common/strings';


return result; } <del> export class LazyBreakpointEditorContribution extends Disposable implements IBreakpointEditorContribution { private _contrib: IBreakpointEditorContribution | undefined; constructor(editor: ICodeEditor, @IInstantiationService instantiationService: IInstantiationService) { super(); const listener = editor.onDidChangeModel(() => { if (editor.hasModel()) { listener.dispose(); this._contrib = this._register(instantiationService.createInstance(BreakpointEditorContribution, editor)); } }); } showBreakpointWidget(lineNumber: number, column: number | undefined, context?: BreakpointWidgetContext | undefined): void { this._contrib?.showBreakpointWidget(lineNumber, column, context); } closeBreakpointWidget(): void { this._contrib?.closeBreakpointWidget(); } getContextMenuActionsAtPosition(lineNumber: number, model: ITextModel): IAction[] { return this._contrib?.getContextMenuActionsAtPosition(lineNumber, model) ?? []; } } class BreakpointEditorContribution implements IBreakpointEditorContribution { </del> <ins> export class BreakpointEditorContribution implements IBreakpointEditorContribution { </ins> private breakpointHintDecoration: string | null = null; private breakpointWidget: BreakpointWidget | undefined;


import { IEditorContribution } from 'vs/editor/common/editorCommon'; import { IModelDecorationOptions, IModelDeltaDecoration, OverviewRulerLane, TrackedRangeStickiness } from 'vs/editor/common/model'; import { localize } from 'vs/nls'; <del> import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; </del> import { ILogService } from 'vs/platform/log/common/log'; import { registerColor } from 'vs/platform/theme/common/colorRegistry'; import { registerThemingParticipant, themeColorFromId, ThemeIcon } from 'vs/platform/theme/common/themeService';


return result; } <del> export class LazyCallStackEditorContribution extends Disposable { constructor(editor: ICodeEditor, @IInstantiationService instantiationService: IInstantiationService) { super(); const listener = editor.onDidChangeModel(() => { if (editor.hasModel()) { listener.dispose(); this._register(instantiationService.createInstance(CallStackEditorContribution, editor)); } }); } } class CallStackEditorContribution extends Disposable implements IEditorContribution { </del> <ins> export class CallStackEditorContribution extends Disposable implements IEditorContribution { </ins> private decorations = this.editor.createDecorationsCollection(); constructor(


import { Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions'; import { EditorExtensions } from 'vs/workbench/common/editor'; import { Extensions as ViewExtensions, IViewContainersRegistry, IViewsRegistry, ViewContainer, ViewContainerLocation } from 'vs/workbench/common/views'; <del> import { LazyBreakpointEditorContribution } from 'vs/workbench/contrib/debug/browser/breakpointEditorContribution'; </del> <ins> import { BreakpointEditorContribution } from 'vs/workbench/contrib/debug/browser/breakpointEditorContribution'; </ins> import { BreakpointsView } from 'vs/workbench/contrib/debug/browser/breakpointsView'; <del> import { LazyCallStackEditorContribution } from 'vs/workbench/contrib/debug/browser/callStackEditorContribution'; </del> <ins> import { CallStackEditorContribution } from 'vs/workbench/contrib/debug/browser/callStackEditorContribution'; </ins> import { CallStackView } from 'vs/workbench/contrib/debug/browser/callStackView'; import { registerColors } from 'vs/workbench/contrib/debug/browser/debugColors'; import { ADD_CONFIGURATION_ID, CALLSTACK_BOTTOM_ID, CALLSTACK_BOTTOM_LABEL, CALLSTACK_DOWN_ID, CALLSTACK_DOWN_LABEL, CALLSTACK_TOP_ID, CALLSTACK_TOP_LABEL, CALLSTACK_UP_ID, CALLSTACK_UP_LABEL, CONTINUE_ID, CONTINUE_LABEL, COPY_STACK_TRACE_ID, DEBUG_COMMAND_CATEGORY, DEBUG_CONSOLE_QUICK_ACCESS_PREFIX, DEBUG_QUICK_ACCESS_PREFIX, DEBUG_RUN_COMMAND_ID, DEBUG_RUN_LABEL, DEBUG_START_COMMAND_ID, DEBUG_START_LABEL, DISCONNECT_AND_SUSPEND_ID, DISCONNECT_AND_SUSPEND_LABEL, DISCONNECT_ID, DISCONNECT_LABEL, EDIT_EXPRESSION_COMMAND_ID, FOCUS_REPL_ID, JUMP_TO_CURSOR_ID, NEXT_DEBUG_CONSOLE_ID, NEXT_DEBUG_CONSOLE_LABEL, OPEN_LOADED_SCRIPTS_LABEL, PAUSE_ID, PAUSE_LABEL, PREV_DEBUG_CONSOLE_ID, PREV_DEBUG_CONSOLE_LABEL, REMOVE_EXPRESSION_COMMAND_ID, RESTART_FRAME_ID, RESTART_LABEL, RESTART_SESSION_ID, SELECT_AND_START_ID, SELECT_AND_START_LABEL, SELECT_DEBUG_CONSOLE_ID, SELECT_DEBUG_CONSOLE_LABEL, SELECT_DEBUG_SESSION_ID, SELECT_DEBUG_SESSION_LABEL, SET_EXPRESSION_COMMAND_ID, SHOW_LOADED_SCRIPTS_ID, STEP_INTO_ID, STEP_INTO_LABEL, STEP_INTO_TARGET_ID, STEP_INTO_TARGET_LABEL, STEP_OUT_ID, STEP_OUT_LABEL, STEP_OVER_ID, STEP_OVER_LABEL, STOP_ID, STOP_LABEL, TERMINATE_THREAD_ID, TOGGLE_INLINE_BREAKPOINT_ID } from 'vs/workbench/contrib/debug/browser/debugCommands'; import { DebugConsoleQuickAccess } from 'vs/workbench/contrib/debug/browser/debugConsoleQuickAccess'; import { RunToCursorAction, SelectionToReplAction, SelectionToWatchExpressionsAction } from 'vs/workbench/contrib/debug/browser/debugEditorActions'; <del> import { LazyDebugEditorContribution } from 'vs/workbench/contrib/debug/browser/debugEditorContribution'; </del> <ins> import { DebugEditorContribution } from 'vs/workbench/contrib/debug/browser/debugEditorContribution'; </ins> import * as icons from 'vs/workbench/contrib/debug/browser/debugIcons'; import { DebugProgressContribution } from 'vs/workbench/contrib/debug/browser/debugProgress'; import { StartDebugQuickAccessProvider } from 'vs/workbench/contrib/debug/browser/debugQuickAccess';


import { ADD_TO_WATCH_ID, BREAK_WHEN_VALUE_CHANGES_ID, BREAK_WHEN_VALUE_IS_ACCESSED_ID, BREAK_WHEN_VALUE_IS_READ_ID, COPY_EVALUATE_PATH_ID, COPY_VALUE_ID, SET_VARIABLE_ID, VariablesView, VIEW_MEMORY_ID } from 'vs/workbench/contrib/debug/browser/variablesView'; import { ADD_WATCH_ID, ADD_WATCH_LABEL, REMOVE_WATCH_EXPRESSIONS_COMMAND_ID, REMOVE_WATCH_EXPRESSIONS_LABEL, WatchExpressionsView } from 'vs/workbench/contrib/debug/browser/watchExpressionsView'; import { WelcomeView } from 'vs/workbench/contrib/debug/browser/welcomeView'; <del> import { BREAKPOINTS_VIEW_ID, BREAKPOINT_EDITOR_CONTRIBUTION_ID, CALLSTACK_VIEW_ID, CONTEXT_BREAKPOINTS_EXIST, CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED, CONTEXT_CALLSTACK_ITEM_TYPE, CONTEXT_CAN_VIEW_MEMORY, CONTEXT_DEBUGGERS_AVAILABLE, CONTEXT_HAS_DEBUGGED, CONTEXT_DEBUG_STATE, CONTEXT_DEBUG_UX, CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_IN_DEBUG_MODE, CONTEXT_JUMP_TO_CURSOR_SUPPORTED, CONTEXT_LOADED_SCRIPTS_SUPPORTED, CONTEXT_RESTART_FRAME_SUPPORTED, CONTEXT_SET_EXPRESSION_SUPPORTED, CONTEXT_SET_VARIABLE_SUPPORTED, CONTEXT_STACK_FRAME_SUPPORTS_RESTART, CONTEXT_STEP_INTO_TARGETS_SUPPORTED, CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED, CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT, CONTEXT_VARIABLE_IS_READONLY, CONTEXT_WATCH_ITEM_TYPE, DEBUG_PANEL_ID, DISASSEMBLY_VIEW_ID, EDITOR_CONTRIBUTION_ID, getStateLabel, IDebugService, INTERNAL_CONSOLE_OPTIONS_SCHEMA, LOADED_SCRIPTS_VIEW_ID, REPL_VIEW_ID, State, VARIABLES_VIEW_ID, VIEWLET_ID, WATCH_VIEW_ID } from 'vs/workbench/contrib/debug/common/debug'; </del> <ins> import { BREAKPOINTS_VIEW_ID, BREAKPOINT_EDITOR_CONTRIBUTION_ID, CALLSTACK_VIEW_ID, CONTEXT_BREAKPOINTS_EXIST, CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED, CONTEXT_CALLSTACK_ITEM_TYPE, CONTEXT_CAN_VIEW_MEMORY, CONTEXT_DEBUGGERS_AVAILABLE, CONTEXT_DEBUG_STATE, CONTEXT_DEBUG_UX, CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_HAS_DEBUGGED, CONTEXT_IN_DEBUG_MODE, CONTEXT_JUMP_TO_CURSOR_SUPPORTED, CONTEXT_LOADED_SCRIPTS_SUPPORTED, CONTEXT_RESTART_FRAME_SUPPORTED, CONTEXT_SET_EXPRESSION_SUPPORTED, CONTEXT_SET_VARIABLE_SUPPORTED, CONTEXT_STACK_FRAME_SUPPORTS_RESTART, CONTEXT_STEP_INTO_TARGETS_SUPPORTED, CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED, CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT, CONTEXT_VARIABLE_IS_READONLY, CONTEXT_WATCH_ITEM_TYPE, DEBUG_PANEL_ID, DISASSEMBLY_VIEW_ID, EDITOR_CONTRIBUTION_ID, getStateLabel, IDebugService, INTERNAL_CONSOLE_OPTIONS_SCHEMA, LOADED_SCRIPTS_VIEW_ID, REPL_VIEW_ID, State, VARIABLES_VIEW_ID, VIEWLET_ID, WATCH_VIEW_ID } from 'vs/workbench/contrib/debug/common/debug'; </ins> import { DebugContentProvider } from 'vs/workbench/contrib/debug/common/debugContentProvider'; import { DebugLifecycle } from 'vs/workbench/contrib/debug/common/debugLifecycle'; import { DisassemblyViewInput } from 'vs/workbench/contrib/debug/common/disassemblyViewInput';


helpEntries: [{ description: nls.localize('tasksQuickAccessHelp', "Show All Debug Consoles"), commandId: SELECT_DEBUG_CONSOLE_ID }] }); <del> registerEditorContribution('editor.contrib.callStack', LazyCallStackEditorContribution, EditorContributionInstantiation.Eager); registerEditorContribution(BREAKPOINT_EDITOR_CONTRIBUTION_ID, LazyBreakpointEditorContribution, EditorContributionInstantiation.Eager); registerEditorContribution(EDITOR_CONTRIBUTION_ID, LazyDebugEditorContribution, EditorContributionInstantiation.Eager); </del> <ins> registerEditorContribution('editor.contrib.callStack', CallStackEditorContribution, EditorContributionInstantiation.AfterFirstRender); registerEditorContribution(BREAKPOINT_EDITOR_CONTRIBUTION_ID, BreakpointEditorContribution, EditorContributionInstantiation.AfterFirstRender); registerEditorContribution(EDITOR_CONTRIBUTION_ID, DebugEditorContribution, EditorContributionInstantiation.BeforeFirstInteraction); </ins> const registerDebugCommandPaletteItem = (id: string, title: ICommandActionTitle, when?: ContextKeyExpression, precondition?: ContextKeyExpression) => { MenuRegistry.appendMenuItem(MenuId.CommandPalette, {


*  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ <del> import * as nls from 'vs/nls'; import * as strings from 'vs/base/common/strings'; </del> <ins> import { addDisposableListener } from 'vs/base/browser/dom'; import { DomEmitter } from 'vs/base/browser/event'; import { IKeyboardEvent, StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { distinct, flatten } from 'vs/base/common/arrays'; </ins> import { RunOnceScheduler } from 'vs/base/common/async'; <del> import * as env from 'vs/base/common/platform'; </del> <ins> import { CancellationTokenSource } from 'vs/base/common/cancellation'; import { memoize } from 'vs/base/common/decorators'; import { onUnexpectedExternalError } from 'vs/base/common/errors'; import { Event } from 'vs/base/common/event'; </ins> import { visit } from 'vs/base/common/json'; import { setProperty } from 'vs/base/common/jsonEdit'; <del> import { Constants } from 'vs/base/common/uint'; </del> import { KeyCode } from 'vs/base/common/keyCodes'; <del> import { IKeyboardEvent, StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { InlineValueContext } from 'vs/editor/common/languages'; import { StandardTokenType } from 'vs/editor/common/encodedTokenAttributes'; import { CancellationTokenSource } from 'vs/base/common/cancellation'; import { distinct, flatten } from 'vs/base/common/arrays'; import { onUnexpectedExternalError } from 'vs/base/common/errors'; import { DEFAULT_WORD_REGEXP } from 'vs/editor/common/core/wordHelper'; import { ICodeEditor, IEditorMouseEvent, MouseTargetType, IPartialEditorMouseEvent } from 'vs/editor/browser/editorBrowser'; import { Range } from 'vs/editor/common/core/range'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IDebugEditorContribution, IDebugService, State, IStackFrame, IDebugConfiguration, IExpression, IExceptionInfo, IDebugSession, CONTEXT_EXCEPTION_WIDGET_VISIBLE } from 'vs/workbench/contrib/debug/common/debug'; import { ExceptionWidget } from 'vs/workbench/contrib/debug/browser/exceptionWidget'; import { FloatingClickWidget } from 'vs/workbench/browser/codeeditor'; import { Position } from 'vs/editor/common/core/position'; </del> <ins> import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import { basename } from 'vs/base/common/path'; import * as env from 'vs/base/common/platform'; import * as strings from 'vs/base/common/strings'; import { Constants } from 'vs/base/common/uint'; </ins> import { CoreEditingCommands } from 'vs/editor/browser/coreCommands'; <del> import { memoize } from 'vs/base/common/decorators'; import { IEditorHoverOptions, EditorOption } from 'vs/editor/common/config/editorOptions'; import { DebugHoverWidget } from 'vs/workbench/contrib/debug/browser/debugHover'; import { IModelDeltaDecoration, InjectedTextCursorStops, ITextModel } from 'vs/editor/common/model'; import { Disposable, dispose, IDisposable } from 'vs/base/common/lifecycle'; </del> <ins> import { ICodeEditor, IEditorMouseEvent, IPartialEditorMouseEvent, MouseTargetType } from 'vs/editor/browser/editorBrowser'; import { EditorOption, IEditorHoverOptions } from 'vs/editor/common/config/editorOptions'; </ins> import { EditOperation } from 'vs/editor/common/core/editOperation'; <del> import { basename } from 'vs/base/common/path'; </del> <ins> import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { DEFAULT_WORD_REGEXP } from 'vs/editor/common/core/wordHelper'; import { StandardTokenType } from 'vs/editor/common/encodedTokenAttributes'; import { InlineValueContext } from 'vs/editor/common/languages'; import { IModelDeltaDecoration, InjectedTextCursorStops, ITextModel } from 'vs/editor/common/model'; import { IFeatureDebounceInformation, ILanguageFeatureDebounceService } from 'vs/editor/common/services/languageFeatureDebounce'; import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeatures'; </ins> import { ModesHoverController } from 'vs/editor/contrib/hover/browser/hover'; import { HoverStartMode, HoverStartSource } from 'vs/editor/contrib/hover/browser/hoverOperation'; <del> import { IHostService } from 'vs/workbench/services/host/browser/host'; import { Event } from 'vs/base/common/event'; import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity'; </del> <ins> import * as nls from 'vs/nls'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; </ins> import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; <del> import { Expression } from 'vs/workbench/contrib/debug/common/debugModel'; </del> <ins> import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; </ins> import { registerColor } from 'vs/platform/theme/common/colorRegistry'; <del> import { addDisposableListener } from 'vs/base/browser/dom'; import { DomEmitter } from 'vs/base/browser/event'; import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeatures'; import { IFeatureDebounceInformation, ILanguageFeatureDebounceService } from 'vs/editor/common/services/languageFeatureDebounce'; </del> <ins> import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity'; import { FloatingClickWidget } from 'vs/workbench/browser/codeeditor'; import { DebugHoverWidget } from 'vs/workbench/contrib/debug/browser/debugHover'; import { ExceptionWidget } from 'vs/workbench/contrib/debug/browser/exceptionWidget'; import { CONTEXT_EXCEPTION_WIDGET_VISIBLE, IDebugConfiguration, IDebugEditorContribution, IDebugService, IDebugSession, IExceptionInfo, IExpression, IStackFrame, State } from 'vs/workbench/contrib/debug/common/debug'; import { Expression } from 'vs/workbench/contrib/debug/common/debugModel'; import { IHostService } from 'vs/workbench/services/host/browser/host'; </ins> const MAX_NUM_INLINE_VALUES = 100; // JS Global scope can have 700+ entries. We want to limit ourselves for perf reasons const MAX_INLINE_DECORATOR_LENGTH = 150; // Max string length of each inline decorator when debugging. If exceeded ... is added


return result; } <del> export class LazyDebugEditorContribution extends Disposable implements IDebugEditorContribution { private _contrib: IDebugEditorContribution | undefined; constructor(editor: ICodeEditor, @IInstantiationService instantiationService: IInstantiationService) { super(); const listener = editor.onDidChangeModel(() => { if (editor.hasModel()) { listener.dispose(); this._contrib = this._register(instantiationService.createInstance(DebugEditorContribution, editor)); } }); } showHover(position: Position, focus: boolean): Promise<void> { return this._contrib ? this._contrib.showHover(position, focus) : Promise.resolve(); } addLaunchConfiguration(): Promise<any> { return this._contrib ? this._contrib.addLaunchConfiguration() : Promise.resolve(); } closeExceptionWidget(): void { this._contrib?.closeExceptionWidget(); } } </del> export class DebugEditorContribution implements IDebugEditorContribution { private toDispose: IDisposable[];


import { EventEmitter } from 'events'; import * as iconv from '@vscode/iconv-lite-umd'; import * as filetype from 'file-type'; <del> import { assign, groupBy, IDisposable, toDisposable, dispose, mkdirp, readBytes, detectUnicodeEncoding, Encoding, onceEvent, splitInChunks, Limiter, Versions, isWindows } from './util'; </del> <ins> import { assign, groupBy, IDisposable, toDisposable, dispose, mkdirp, readBytes, detectUnicodeEncoding, Encoding, onceEvent, splitInChunks, Limiter, Versions, isWindows, pathEquals } from './util'; </ins> import { CancellationError, CancellationToken, ConfigurationChangeEvent, LogOutputChannel, Progress, Uri, workspace } from 'vscode'; import { detectEncoding } from './encoding'; import { Ref, RefType, Branch, Remote, ForcePushMode, GitErrorCodes, LogOptions, Change, Status, CommitOptions, RefQuery } from './api/git';


), ); if (networkPath !== undefined) { <ins> // If the repository is at the root of the mapped drive then we // have to append `` (ex: D:) otherwise the path is not valid. const isDriveRoot = pathEquals(repoUri.fsPath, networkPath); </ins> return path.normalize( repoUri.fsPath.replace( networkPath, <del> `${letter.toLowerCase()}:${networkPath.endsWith('') ? '' : ''}` </del> <ins> `${letter.toLowerCase()}:${isDriveRoot || networkPath.endsWith('') ? '' : ''}` </ins> ), ); }


.quick-input-titlebar { display: flex; align-items: center; <ins> border-top-left-radius: 5px; /* match border radius of quick input widget */ border-top-right-radius: 5px; </ins> } .quick-input-left-action-bar {


.quick-input-header { display: flex; <del> padding: 8px 6px 0px 6px; margin-bottom: -2px; </del> <ins> padding: 8px 6px 6px 6px; </ins> } .quick-input-widget.hidden-input .quick-input-header {


.quick-input-list { line-height: 22px; <del> margin-top: 6px; padding: 1px; </del> } .quick-input-widget.hidden-input .quick-input-list {


const message = dom.append(extraContainer, $(`#${this.idPrefix}message.quick-input-message`)); <ins> const progressBar = new ProgressBar(container, this.styles.progressBar); progressBar.getContainer().classList.add('quick-input-progress'); </ins> const list = this._register(new QuickInputList(container, this.idPrefix + 'list', this.options)); this._register(list.onChangedAllVisibleChecked(checked => { checkAll.checked = checked;


} })); <del> const progressBar = new ProgressBar(container, this.styles.progressBar); progressBar.getContainer().classList.add('quick-input-progress'); </del> const focusTracker = dom.trackFocus(container); this._register(focusTracker); this._register(dom.addDisposableListener(container, dom.EventType.FOCUS, e => {


class GitHubGistProfileContentHandler implements vscode.ProfileContentHandler { readonly name = vscode.l10n.t('GitHub'); <ins> readonly description = vscode.l10n.t('gist'); </ins> private _octokit: Promise<Octokit> | undefined; private getOctokit(): Promise<Octokit> {


this.proxy = context.getProxy(ExtHostContext.ExtHostProfileContentHandlers); } <del> async $registerProfileContentHandler(id: string, name: string, extensionId: string): Promise<void> { </del> <ins> async $registerProfileContentHandler(id: string, name: string, description: string | undefined, extensionId: string): Promise<void> { </ins> this.registeredHandlers.set(id, this.userDataProfileImportExportService.registerProfileContentHandler(id, { name, <ins> description, </ins> extensionId, saveProfile: async (name: string, content: string, token: CancellationToken) => { const result = await this.proxy.$saveProfile(id, name, content, token);


} export interface MainThreadProfileContentHandlersShape { <del> $registerProfileContentHandler(id: string, name: string, extensionId: string): Promise<void>; </del> <ins> $registerProfileContentHandler(id: string, name: string, description: string | undefined, extensionId: string): Promise<void>; </ins> $unregisterProfileContentHandler(id: string): Promise<void>; }


} this.handlers.set(id, handler); <del> this.proxy.$registerProfileContentHandler(id, handler.name, extension.identifier.value); </del> <ins> this.proxy.$registerProfileContentHandler(id, handler.name, handler.description, extension.identifier.value); </ins> return toDisposable(() => { this.handlers.delete(id);


if (this.profileContentHandlers.size === 1) { return this.profileContentHandlers.values().next().value; } <del> const linkHandlers: { id: string; label: string }[] = []; const fileHandlers: { id: string; label: string }[] = []; for (const [id, profileContentHandler] of this.profileContentHandlers) { if (profileContentHandler.extensionId) { linkHandlers.push({ id, label: profileContentHandler.name }); } else { fileHandlers.push({ id, label: profileContentHandler.name }); } } </del> const options: QuickPickItem[] = []; <del> if (linkHandlers.length) { options.push({ label: localize('link', "link"), type: 'separator' }); options.push(...linkHandlers); } if (fileHandlers.length) { options.push({ label: localize('file', "file"), type: 'separator' }); options.push(...fileHandlers); </del> <ins> for (const [id, profileContentHandler] of this.profileContentHandlers) { options.push({ id, label: profileContentHandler.name, description: profileContentHandler.description }); </ins> } <del> const result = await this.quickInputService.pick(options, </del> <ins> const result = await this.quickInputService.pick(options.reverse(), </ins> { title: localize('select profile content handler', "Export '{0}' profile as...", name), hideInput: true


class FileUserDataProfileContentHandler implements IUserDataProfileContentHandler { readonly name = localize('local', "Local"); <ins> readonly description = localize('file', "file"); </ins> constructor( @IFileDialogService private readonly fileDialogService: IFileDialogService,


export interface IUserDataProfileContentHandler { readonly name: string; <ins> readonly description?: string; </ins> readonly extensionId?: string; saveProfile(name: string, content: string, token: CancellationToken): Promise<ISaveProfileResult | null>; readProfile(idOrUri: string | URI, token: CancellationToken): Promise<string | null>;


export interface ProfileContentHandler { readonly name: string; <ins> readonly description?: string; </ins> saveProfile(name: string, content: string, token: CancellationToken): Thenable<{ readonly id: string; readonly link: Uri } | null>; readProfile(idOrUri: string | Uri, token: CancellationToken): Thenable<string | null>; }


static updateKernelStatusAction(notebook: NotebookTextModel, action: IAction, notebookKernelService: INotebookKernelService, scopedContextKeyService?: IContextKeyService) { const detectionTasks = notebookKernelService.getKernelDetectionTasks(notebook); if (detectionTasks.length) { <ins> const info = notebookKernelService.getMatchingKernel(notebook); </ins> action.enabled = true; <del> action.label = localize('kernels.detecting', "Detecting Kernels"); </del> action.class = ThemeIcon.asClassName(ThemeIcon.modify(executingStateIcon, 'spin')); <ins> if (info.selected) { action.label = info.selected.label; const kernelInfo = info.selected.description ?? info.selected.detail; action.tooltip = kernelInfo ? localize('kernels.selectedKernelAndKernelDetectionRunning', "Selected Kernel: {0} (Kernel Detection Tasks Running)", kernelInfo) : localize('kernels.detecting', "Detecting Kernels"); } else { action.label = localize('kernels.detecting', "Detecting Kernels"); } </ins> return; }


static updateKernelStatusAction(notebook: NotebookTextModel, action: IAction, notebookKernelService: INotebookKernelService) { const detectionTasks = notebookKernelService.getKernelDetectionTasks(notebook); if (detectionTasks.length) { <ins> const info = notebookKernelService.getMatchingKernel(notebook); </ins> action.enabled = true; <del> action.label = localize('kernels.detecting', "Detecting Kernels"); </del> action.class = ThemeIcon.asClassName(ThemeIcon.modify(executingStateIcon, 'spin')); <ins> if (info.selected) { action.label = info.selected.label; const kernelInfo = info.selected.description ?? info.selected.detail; action.tooltip = kernelInfo ? localize('kernels.selectedKernelAndKernelDetectionRunning', "Selected Kernel: {0} (Kernel Detection Tasks Running)", kernelInfo) : localize('kernels.detecting', "Detecting Kernels"); } else { action.label = localize('kernels.detecting', "Detecting Kernels"); } </ins> return; }


protected readonly _commandService: ICommandService ) { } <del> async showQuickPick(editor: IActiveNotebookEditor, wantedId?: string): Promise<boolean> { </del> <ins> async showQuickPick(editor: IActiveNotebookEditor, wantedId?: string, skipAutoRun?: boolean): Promise<boolean> { </ins> const notebook = editor.textModel; const scopedContextKeyService = editor.scopedContextKeyService; const matchResult = this._getMatchingResult(notebook);


const quickPick = this._quickInputService.createQuickPick<KernelQuickPickItem>(); const quickPickItems = this._getKernelPickerQuickPickItems(notebook, matchResult, this._notebookKernelService, scopedContextKeyService); <del> if (quickPickItems.length === 1 && supportAutoRun(quickPickItems[0])) { return await this._handleQuickPick(editor, quickPickItems[0]); </del> <ins> if (quickPickItems.length === 1 && supportAutoRun(quickPickItems[0]) && !skipAutoRun) { return await this._handleQuickPick(editor, quickPickItems[0], quickPickItems as KernelQuickPickItem[]); </ins> } quickPick.items = quickPickItems;


quickPick.activeItems = activeItems; }, this); <del> const pick = await new Promise<KernelQuickPickItem | undefined>((resolve, reject) => { </del> <ins> const pick = await new Promise<{ selected: KernelQuickPickItem | undefined; items: KernelQuickPickItem[] }>((resolve, reject) => { </ins> quickPick.onDidAccept(() => { const item = quickPick.selectedItems[0]; if (item) { <del> resolve(item); </del> <ins> resolve({ selected: item, items: quickPick.items as KernelQuickPickItem[] }); </ins> } else { <del> resolve(undefined); </del> <ins> resolve({ selected: undefined, items: quickPick.items as KernelQuickPickItem[] }); </ins> } quickPick.hide();


kernelDetectionTaskListener.dispose(); kernelChangeEventListener.dispose(); quickPick.dispose(); <del> resolve(undefined); </del> <ins> resolve({ selected: undefined, items: quickPick.items as KernelQuickPickItem[] }); </ins> }); quickPick.show(); }); <del> if (pick) { return await this._handleQuickPick(editor, pick); </del> <ins> if (pick.selected) { return await this._handleQuickPick(editor, pick.selected, pick.items); </ins> } return false;


scopedContextKeyService: IContextKeyService ): QuickPickInput<KernelQuickPickItem>[]; <del> protected async _handleQuickPick(editor: IActiveNotebookEditor, pick: KernelQuickPickItem) { </del> <ins> protected async _handleQuickPick(editor: IActiveNotebookEditor, pick: KernelQuickPickItem, quickPickItems: KernelQuickPickItem[]): Promise<boolean> { </ins> if (isKernelPick(pick)) { const newKernel = pick.kernel; this._selecteKernel(editor.textModel, newKernel);


}; } <del> protected override async _handleQuickPick(editor: IActiveNotebookEditor, pick: KernelQuickPickItem): Promise<boolean> { </del> <ins> protected override async _handleQuickPick(editor: IActiveNotebookEditor, pick: KernelQuickPickItem, items: KernelQuickPickItem[]): Promise<boolean> { </ins> if (pick.id === 'selectAnother') { <del> return this.displaySelectAnotherQuickPick(editor); </del> <ins> return this.displaySelectAnotherQuickPick(editor, items.length === 1 && items[0] === pick); </ins> } <del> return super._handleQuickPick(editor, pick); </del> <ins> return super._handleQuickPick(editor, pick, items); </ins> } <del> private async displaySelectAnotherQuickPick(editor: IActiveNotebookEditor) { </del> <ins> private async displaySelectAnotherQuickPick(editor: IActiveNotebookEditor, kernelListEmpty: boolean) { </ins> const notebook: NotebookTextModel = editor.textModel; const disposables = new DisposableStore(); return new Promise<boolean>(resolve => { // select from kernel sources const quickPick = this._quickInputService.createQuickPick<KernelQuickPickItem>(); <del> quickPick.title = localize('selectAnotherKernel', "Select Another Kernel"); </del> <ins> quickPick.title = kernelListEmpty ? localize('select', "Select Kernel") : localize('selectAnotherKernel', "Select Another Kernel"); </ins> quickPick.busy = true; quickPick.buttons = [this._quickInputService.backButton]; quickPick.show();


disposables.add(quickPick.onDidTriggerButton(button => { if (button === this._quickInputService.backButton) { quickPick.hide(); <del> resolve(this.showQuickPick(editor)); </del> <ins> resolve(this.showQuickPick(editor, undefined, true)); </ins> } })); disposables.add(quickPick.onDidAccept(async () => {


} resolve(true); } else { <del> return resolve(this.displaySelectAnotherQuickPick(editor)); </del> <ins> return resolve(this.displaySelectAnotherQuickPick(editor, false)); </ins> } } else if (isKernelPick(quickPick.selectedItems[0])) { await this._selecteKernel(notebook, quickPick.selectedItems[0].kernel);


const allRepositoriesLabel = l10n.t('All Repositories'); const allRepositoriesQuickPickItem: QuickPickItem = { label: allRepositoriesLabel }; <del> const repositoriesQuickPickItems: QuickPickItem[] = Array.from(this.model.unsafeRepositories.values()).sort().map(r => new UnsafeRepositoryItem(r)); </del> <ins> const repositoriesQuickPickItems: QuickPickItem[] = Array.from(this.model.unsafeRepositories.keys()).sort().map(r => new UnsafeRepositoryItem(r)); </ins> quickpick.items = this.model.unsafeRepositories.size === 1 ? [...repositoriesQuickPickItems] : [...repositoriesQuickPickItems, { label: '', kind: QuickPickItemKind.Separator }, allRepositoriesQuickPickItem];


if (repositoryItem.label === allRepositoriesLabel) { // All Repositories <del> unsafeRepositories.push(...this.model.unsafeRepositories.values()); </del> <ins> unsafeRepositories.push(...this.model.unsafeRepositories.keys()); </ins> } else { // One Repository unsafeRepositories.push((repositoryItem as UnsafeRepositoryItem).path);


for (const unsafeRepository of unsafeRepositories) { // Mark as Safe <del> await this.git.addSafeDirectory(unsafeRepository); </del> <ins> await this.git.addSafeDirectory(this.model.unsafeRepositories.get(unsafeRepository)!); </ins> // Open Repository await this.model.openRepository(unsafeRepository);


} async addSafeDirectory(repositoryPath: string): Promise<void> { <del> // safe.directory only supports paths with `/` as separator repositoryPath = repositoryPath.replaceAll('', '/'); </del> await this.exec(repositoryPath, ['config', '--global', '--add', 'safe.directory', repositoryPath]); return; }


constructor(public readonly repository: Repository, public readonly index: number) { } } <del> class UnsafeRepositorySet extends Set<string> { </del> <ins> /** * Key   - normalized path used in user interface * Value - path extracted from the output of the `git status` command *         used when calling `git config --global --add safe.directory` */ class UnsafeRepositoryMap extends Map<string, string> { </ins> constructor() { super(); this.updateContextKey(); } <del> override add(value: string): this { const result = super.add(value); </del> <ins> override set(key: string, value: string): this { const result = super.set(key, value); </ins> this.updateContextKey(); return result; } <del> override delete(value: string): boolean { const result = super.delete(value); </del> <ins> override delete(key: string): boolean { const result = super.delete(key); </ins> this.updateContextKey(); return result;


private showRepoOnHomeDriveRootWarning = true; private pushErrorHandlers = new Set<PushErrorHandler>(); <del> private _unsafeRepositories = new UnsafeRepositorySet(); get unsafeRepositories(): Set<string> { </del> <ins> private _unsafeRepositories = new UnsafeRepositoryMap(); get unsafeRepositories(): Map<string, string> { </ins> return this._unsafeRepositories; }


repository.status(); // do not await this, we want SCM to know about the repo asap } catch (ex) { // Handle unsafe repository <del> const match = /^fatal: detected dubious ownership in repository at '([^']+)'$/m.exec(ex.stderr); if (match && match.length === 2) { </del> <ins> const match = /^fatal: detected dubious ownership in repository at '([^']+)'[sS]*git config --global --add safe.directory '?([^'n]+)'?$/m.exec(ex.stderr); if (match && match.length === 3) { </ins> const unsafeRepositoryPath = path.normalize(match[1]); this.logger.trace(`Unsafe repository: ${unsafeRepositoryPath}`);


this.showUnsafeRepositoryNotification(); } <del> this._unsafeRepositories.add(unsafeRepositoryPath); </del> <ins> this._unsafeRepositories.set(unsafeRepositoryPath, match[2]); </ins> return; }


registerSimpleEditorSettingMigration('autoIndent', [[false, 'advanced'], [true, 'full']]); registerSimpleEditorSettingMigration('matchBrackets', [[true, 'always'], [false, 'never']]); registerSimpleEditorSettingMigration('renderFinalNewline', [[true, 'on'], [false, 'off']]); <ins> registerSimpleEditorSettingMigration('cursorSmoothCaretAnimation', [[true, 'on'], [false, 'off']]); </ins> registerEditorSettingMigration('autoClosingBrackets', (value, read, write) => { if (value === false) {


private _readOnly: boolean; private _cursorBlinking: TextEditorCursorBlinkingStyle; private _cursorStyle: TextEditorCursorStyle; <del> private _cursorSmoothCaretAnimation: boolean; </del> <ins> private _cursorSmoothCaretAnimation: 'off' | 'explicit' | 'on'; </ins> private _selectionIsEmpty: boolean; private _isComposingInput: boolean;


private _onCursorPositionChanged(position: Position, secondaryPositions: Position[], reason: CursorChangeReason): void { const pauseAnimation = ( this._secondaryCursors.length !== secondaryPositions.length <del> || reason !== CursorChangeReason.Explicit </del> <ins> || (this._cursorSmoothCaretAnimation === 'explicit' && reason !== CursorChangeReason.Explicit) </ins> ); this._primaryCursor.onCursorPositionChanged(position, pauseAnimation); this._updateBlinking();


_cursorBlinkingStyleFromString, { description: nls.localize('cursorBlinking', "Control the cursor animation style.") } )), <del> cursorSmoothCaretAnimation: register(new EditorBooleanOption( EditorOption.cursorSmoothCaretAnimation, 'cursorSmoothCaretAnimation', false, { description: nls.localize('cursorSmoothCaretAnimation', "Controls whether the smooth caret animation should be enabled.") } </del> <ins> cursorSmoothCaretAnimation: register(new EditorStringEnumOption( EditorOption.cursorSmoothCaretAnimation, 'cursorSmoothCaretAnimation', 'off' as 'off' | 'explicit' | 'on', ['off', 'explicit', 'on'] as const, { enumDescriptions: [ nls.localize('cursorSmoothCaretAnimation.off', "Smooth caret animation is disabled."), nls.localize('cursorSmoothCaretAnimation.explicit', "Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."), nls.localize('cursorSmoothCaretAnimation.on', "Smooth caret animation is always enabled.") ], description: nls.localize('cursorSmoothCaretAnimation', "Controls whether the smooth caret animation should be enabled.") } </ins> )), cursorStyle: register(new EditorEnumOption( EditorOption.cursorStyle, 'cursorStyle',


mouseStyle?: 'text' | 'default' | 'copy'; /** * Enable smooth caret animation. <del> * Defaults to false. </del> <ins> * Defaults to 'off'. </ins> */ <del> cursorSmoothCaretAnimation?: boolean; </del> <ins> cursorSmoothCaretAnimation?: 'off' | 'explicit' | 'on'; </ins> /** * Control the cursor style, either 'block' or 'line'. * Defaults to 'line'.


contextmenu: IEditorOption<EditorOption.contextmenu, boolean>; copyWithSyntaxHighlighting: IEditorOption<EditorOption.copyWithSyntaxHighlighting, boolean>; cursorBlinking: IEditorOption<EditorOption.cursorBlinking, TextEditorCursorBlinkingStyle>; <del> cursorSmoothCaretAnimation: IEditorOption<EditorOption.cursorSmoothCaretAnimation, boolean>; </del> <ins> cursorSmoothCaretAnimation: IEditorOption<EditorOption.cursorSmoothCaretAnimation, 'on' | 'off' | 'explicit'>; </ins> cursorStyle: IEditorOption<EditorOption.cursorStyle, TextEditorCursorStyle>; cursorSurroundingLines: IEditorOption<EditorOption.cursorSurroundingLines, number>; cursorSurroundingLinesStyle: IEditorOption<EditorOption.cursorSurroundingLinesStyle, 'default' | 'all'>;


} private get profilesVisibilityPreference(): boolean { <del> return this.userDataProfilesService.isEnabled() && this.storageService.getBoolean(ProfilesActivityActionViewItem.PROFILES_VISIBILITY_PREFERENCE_KEY, StorageScope.PROFILE, this.userDataProfilesService.profiles.length > 1); </del> <ins> return this.userDataProfilesService.isEnabled() && this.storageService.getBoolean(ProfilesActivityActionViewItem.PROFILES_VISIBILITY_PREFERENCE_KEY, StorageScope.PROFILE, true); </ins> } private set profilesVisibilityPreference(value: boolean) {


import { ContextKeyExpr, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IProductService } from 'vs/platform/product/common/productService'; import { Registry } from 'vs/platform/registry/common/platform'; <del> import { IUserDataProfilesService, PROFILES_ENABLEMENT_CONFIG } from 'vs/platform/userDataProfile/common/userDataProfile'; </del> <ins> import { IUserDataProfile, IUserDataProfilesService, PROFILES_ENABLEMENT_CONFIG } from 'vs/platform/userDataProfile/common/userDataProfile'; </ins> import { workbenchConfigurationNodeBase } from 'vs/workbench/common/configuration'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { RenameProfileAction } from 'vs/workbench/contrib/userDataProfile/browser/userDataProfileActions';


import { CancellationToken } from 'vs/base/common/cancellation'; import { URI } from 'vs/base/common/uri'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; <del> import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; </del> <ins> import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; </ins> import { IWorkspaceTagsService } from 'vs/workbench/contrib/tags/common/workspaceTags'; import { getErrorMessage } from 'vs/base/common/errors'; <ins> const SelectProfileSubMenu = new MenuId('SelectProfile'); </ins> export class UserDataProfilesWorkbenchContribution extends Disposable implements IWorkbenchContribution { private readonly currentProfileContext: IContextKey<string>;


private registerActions(): void { this.registerManageProfilesSubMenu(); <ins> this.registerSelectProfileSubMenu(); this.registerProfilesActions(); this._register(this.userDataProfilesService.onDidChangeProfiles(() => this.registerProfilesActions())); </ins> this.registerCurrentProfilesActions(); this._register(Event.any(this.userDataProfileService.onDidChangeCurrentProfile, this.userDataProfileService.onDidUpdateCurrentProfile)(() => this.registerCurrentProfilesActions())); } private registerManageProfilesSubMenu(): void { <del> MenuRegistry.appendMenuItem(MenuId.GlobalActivity, <ISubmenuItem>{ title: PROFILES_TTILE, submenu: ManageProfilesSubMenu, group: '5_settings', when: PROFILES_ENABLEMENT_CONTEXT, order: 1 }); </del> MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, <ISubmenuItem>{ title: PROFILES_TTILE, submenu: ManageProfilesSubMenu,


when: PROFILES_ENABLEMENT_CONTEXT, order: 1 }); <del> MenuRegistry.appendMenuItem(MenuId.AccountsContext, <ISubmenuItem>{ title: PROFILES_TTILE, submenu: ManageProfilesSubMenu, group: '1_settings', </del> <ins> } private registerSelectProfileSubMenu(): IDisposable { const that = this; return MenuRegistry.appendMenuItem(ManageProfilesSubMenu, <ISubmenuItem>{ get title() { return localize('profile', "Profile ({0})", that.userDataProfileService.currentProfile.name); }, submenu: SelectProfileSubMenu, group: '0_profiles', </ins> when: PROFILES_ENABLEMENT_CONTEXT, }); } <del> private readonly currentprofileActionsDisposable = this._register(new MutableDisposable<DisposableStore>()); private registerCurrentProfilesActions(): void { this.currentprofileActionsDisposable.value = new DisposableStore(); this.currentprofileActionsDisposable.value.add(this.registerSwitchProfileForCurrentWindowAction()); this.currentprofileActionsDisposable.value.add(this.registerUpdateCurrentProfileShortNameAction()); this.currentprofileActionsDisposable.value.add(this.registerRenameCurrentProfileAction()); this.currentprofileActionsDisposable.value.add(this.registerExportCurrentProfileAction()); this.currentprofileActionsDisposable.value.add(this.registerImportProfileAction()); </del> <ins> private readonly profilesDisposable = this._register(new MutableDisposable<DisposableStore>()); private registerProfilesActions(): void { this.profilesDisposable.value = new DisposableStore(); for (const profile of this.userDataProfilesService.profiles) { this.profilesDisposable.value.add(this.registerProfileEntryAction(profile)); } </ins> } <del> private registerSwitchProfileForCurrentWindowAction(): IDisposable { </del> <ins> private registerProfileEntryAction(profile: IUserDataProfile): IDisposable { </ins> const that = this; <del> return registerAction2(class SwitchProfileForCurrentWindowAction extends Action2 { </del> <ins> return registerAction2(class ProfileEntryAction extends Action2 { </ins> constructor() { super({ <del> id: 'workbench.profiles.actions.switchProfile', title: { value: localize('switch profile for current', "Switch Profile ({0})...", that.userDataProfileService.currentProfile.name), original: `Switch Profile (${that.workspaceContextService.getWorkbenchState() === WorkbenchState.EMPTY ? localize('window', "Window") : localize('current workspace', "Workspace")})...` }, category: PROFILES_CATEGORY, f1: true, precondition: ContextKeyExpr.and(PROFILES_ENABLEMENT_CONTEXT, HAS_PROFILES_CONTEXT), </del> <ins> id: `workbench.profiles.actions.profileEntry.${profile.id}`, title: profile.name, toggled: ContextKeyExpr.equals(CURRENT_PROFILE_CONTEXT.key, profile.id), </ins> menu: [ { <del> id: ManageProfilesSubMenu, </del> <ins> id: SelectProfileSubMenu, </ins> group: '0_profiles', when: PROFILES_ENABLEMENT_CONTEXT, }


}); } async run(accessor: ServicesAccessor) { <del> const quickInputService = accessor.get(IQuickInputService); const currentProfile = that.userDataProfileService.currentProfile; const result = await quickInputService.pick(that.userDataProfilesService.profiles.map(profile => ({ id: profile.id, label: currentProfile.id === profile.id ? `$(check) ${profile.name}` : profile.name, profile })), { placeHolder: localize('switch profile', "Switch Profile") }); if (result?.profile) { that.userDataProfileManagementService.switchProfile(result?.profile); </del> <ins> if (that.userDataProfileService.currentProfile.id !== profile.id) { return that.userDataProfileManagementService.switchProfile(profile); </ins> } } }); } <ins> private readonly currentprofileActionsDisposable = this._register(new MutableDisposable<DisposableStore>()); private registerCurrentProfilesActions(): void { this.currentprofileActionsDisposable.value = new DisposableStore(); this.currentprofileActionsDisposable.value.add(this.registerUpdateCurrentProfileShortNameAction()); this.currentprofileActionsDisposable.value.add(this.registerRenameCurrentProfileAction()); this.currentprofileActionsDisposable.value.add(this.registerExportCurrentProfileAction()); this.currentprofileActionsDisposable.value.add(this.registerImportProfileAction()); } </ins> private registerUpdateCurrentProfileShortNameAction(): IDisposable { const that = this; return registerAction2(class UpdateCurrentProfileShortName extends Action2 {


"tab.unfocusedHoverBackground": "#6e76811a", "terminal.foreground": "#ffffffc5", "terminal.inactiveSelectionBackground": "#E5EBF1", <del> "textBlockQuote.background": "#010409", </del> <ins> "textBlockQuote.background": "#f8f8f8", </ins> "textBlockQuote.border": "#0000001a", "textCodeBlock.background": "#6e768166", "textLink.activeForeground": "#005FB8",


"editor.background": "#1f1f1f", "editor.findMatchBackground": "#9e6a03", "editor.foreground": "#ffffffd3", <del> "editorCursor.foreground": "#0078d4", </del> "editorGroup.border": "#ffffff17", "editorGroupHeader.tabsBackground": "#181818", "editorGroupHeader.tabsBorder": "#ffffff15",


"editor.foreground": "#000000e4", "editor.inactiveSelectionBackground": "#E5EBF1", "editor.selectionHighlightBackground": "#ADD6FF80", <del> "editorCursor.foreground": "#005FB8", </del> "editorGroup.border": "#0000001a", "editorGroupHeader.tabsBackground": "#f8f8f8", "editorGroupHeader.tabsBorder": "#0000001a",


super(); } <ins> private _activeProvideLinkRequests: Map<number, Promise<TerminalLink[]>> = new Map(); </ins> async provideLinks(bufferLineNumber: number, callback: (links: ILink[] | undefined) => void) { <del> this._activeLinks?.forEach(l => l.dispose()); this._activeLinks = await this._provideLinks(bufferLineNumber); </del> <ins> let activeRequest = this._activeProvideLinkRequests.get(bufferLineNumber); if (activeRequest) { await activeRequest; callback(this._activeLinks); return; } if (this._activeLinks) { for (const link of this._activeLinks) { link.dispose(); } } activeRequest = this._provideLinks(bufferLineNumber); this._activeProvideLinkRequests.set(bufferLineNumber, activeRequest); this._activeLinks = await activeRequest; this._activeProvideLinkRequests.delete(bufferLineNumber); </ins> callback(this._activeLinks); }


"vscode-proxy-agent": "^0.12.0", "vscode-regexpp": "^3.1.0", "vscode-textmate": "8.0.0", <del> "xterm": "5.1.0-beta.87", "xterm-addon-canvas": "0.3.0-beta.35", </del> <ins> "xterm": "5.2.0-beta.2", "xterm-addon-canvas": "0.4.0-beta.1", </ins> "xterm-addon-search": "0.11.0-beta.7", <del> "xterm-addon-serialize": "0.9.0-beta.3", </del> <ins> "xterm-addon-serialize": "0.9.0", </ins> "xterm-addon-unicode11": "0.5.0-beta.5", <del> "xterm-addon-webgl": "0.14.0-beta.50", "xterm-headless": "5.1.0-beta.87", </del> <ins> "xterm-addon-webgl": "0.15.0-beta.1", "xterm-headless": "5.2.0-beta.2", </ins> "yauzl": "^2.9.2", "yazl": "^2.4.3" },


"tas-client-umd": "0.1.6", "vscode-oniguruma": "1.7.0", "vscode-textmate": "8.0.0", <del> "xterm": "5.1.0-beta.87", "xterm-addon-canvas": "0.3.0-beta.35", </del> <ins> "xterm": "5.2.0-beta.2", "xterm-addon-canvas": "0.4.0-beta.1", </ins> "xterm-addon-search": "0.11.0-beta.7", "xterm-addon-unicode11": "0.5.0-beta.5", <del> "xterm-addon-webgl": "0.14.0-beta.50" </del> <ins> "xterm-addon-webgl": "0.15.0-beta.1" </ins> } }


resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== <del> xterm-addon-canvas@0.3.0-beta.35: version "0.3.0-beta.35" resolved "https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.3.0-beta.35.tgz#2f85f9df9b109d51a8ce08a6023db747f4d060d5" integrity sha512-chk/+FaUPEAC33Mt6PDLbUWlzDCCoXBWJvKykMfhZF0vCm8GqpJc3z6R9jdcZcNCPUhmmv5psRTYun6oy5TvBQ== </del> <ins> xterm-addon-canvas@0.4.0-beta.1: version "0.4.0-beta.1" resolved "https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.4.0-beta.1.tgz#f2742b88cd3eb1840b9e7f986c4bfe31e0f4684f" integrity sha512-EfjaN0ujHJ4D8CsVpBig3xPvfRhbzAyOh8piAbNpePZmTpBzc2OQQQvEeklPriKVNDv28WbmY0Zzl5tgYM7vwg== </ins> xterm-addon-search@0.11.0-beta.7: version "0.11.0-beta.7"


resolved "https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.5.0-beta.5.tgz#6992a6f56349e67b903201d52b1ad41ba3469d93" integrity sha512-MaqnU34WTHCUAo7moB4KhynGn03RckI0JJ8E/gXe96EzuCP6bVJIKSc5pc9iFeLF4BX1SuemOqIHYl2Q3u3NTA== <del> xterm-addon-webgl@0.14.0-beta.50: version "0.14.0-beta.50" resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.14.0-beta.50.tgz#e52a7fd1776c214163e15fcabedf1f0b51f75445" integrity sha512-UF8+hBYplKxuOK5ZzLBhbC7cFOqTx0vkcK1dw8mmqL0x8v1lwfz2eRxiqokkC4bDVq3CAKlul1IuEF9cQs5sZQ== </del> <ins> xterm-addon-webgl@0.15.0-beta.1: version "0.15.0-beta.1" resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.15.0-beta.1.tgz#bc3f784c3c467a70542b8a9a8998dbe996287796" integrity sha512-8f4cNXG0+dBMqp+Nvk/ZQ8Wo8s4/KbF24b2VTHTt8DuY5QXt4wSA6+NEdnABV98VYDoHl+KfXl9yyFqkcJYr8Q== </ins> <del> xterm@5.1.0-beta.87: version "5.1.0-beta.87" resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.1.0-beta.87.tgz#a4bb442b73e82941f87819f6db7810949536c891" integrity sha512-0cR7TUfAUH6Z1CVzVCm2CnFs7slqro2nf11yjrWvZyxEoGb34rNWvcnvIq2L5Xzv+gvHbl8jDO8yj5nyxQvUCA== </del> <ins> xterm@5.2.0-beta.2: version "5.2.0-beta.2" resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.2.tgz#67369235a54f41179922e662df40ff4c7c974787" integrity sha512-MRAdWRfV80ae0Q3Caq/mfmCwnZZZ89Z8i/sAleio5g5dpsst9IXc0zeFpPnOvUWmtVy5P1LbfU9YCy47449DWw== </ins>


resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= <del> xterm-addon-canvas@0.3.0-beta.35: version "0.3.0-beta.35" resolved "https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.3.0-beta.35.tgz#2f85f9df9b109d51a8ce08a6023db747f4d060d5" integrity sha512-chk/+FaUPEAC33Mt6PDLbUWlzDCCoXBWJvKykMfhZF0vCm8GqpJc3z6R9jdcZcNCPUhmmv5psRTYun6oy5TvBQ== </del> <ins> xterm-addon-canvas@0.4.0-beta.1: version "0.4.0-beta.1" resolved "https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.4.0-beta.1.tgz#f2742b88cd3eb1840b9e7f986c4bfe31e0f4684f" integrity sha512-EfjaN0ujHJ4D8CsVpBig3xPvfRhbzAyOh8piAbNpePZmTpBzc2OQQQvEeklPriKVNDv28WbmY0Zzl5tgYM7vwg== </ins> xterm-addon-search@0.11.0-beta.7: version "0.11.0-beta.7" resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.11.0-beta.7.tgz#d90bcbe9e8f9238c18ba6145bd7ec2f8e3240052" integrity sha512-i/c774V0/Eon3BIFRsRR3OjKTnMGkccBo12yDkOa40tnAD4aa8FjspE3bxW/Hh1mUEhCSgBSLnMDlK/GwnUC+g== <del> xterm-addon-serialize@0.9.0-beta.3: version "0.9.0-beta.3" resolved "https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.9.0-beta.3.tgz#bb4ed416db5748bcbe55a4b6d4c2151368fdae74" integrity sha512-LaFuowtdxNdeuLm+KmtsoR4mgPOLu/I9k0hlWXbzAd1okJhthwMH4Y6cuL0/pFk1AclP5s+L42glv8PV0GnVsg== </del> <ins> xterm-addon-serialize@0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.9.0.tgz#3eee5f5c34b16e48891ec59b213716bab2354bf4" integrity sha512-qJju2YJFh8c8pbtCYtHaG7gDDHBpDJ4a4JQZvOzuiMxOjgeM1oCnFNjbhzMuK/fOUa59FmvIUGQyqn3WL9q7qw== </ins> xterm-addon-unicode11@0.5.0-beta.5: version "0.5.0-beta.5" resolved "https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.5.0-beta.5.tgz#6992a6f56349e67b903201d52b1ad41ba3469d93" integrity sha512-MaqnU34WTHCUAo7moB4KhynGn03RckI0JJ8E/gXe96EzuCP6bVJIKSc5pc9iFeLF4BX1SuemOqIHYl2Q3u3NTA== <del> xterm-addon-webgl@0.14.0-beta.50: version "0.14.0-beta.50" resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.14.0-beta.50.tgz#e52a7fd1776c214163e15fcabedf1f0b51f75445" integrity sha512-UF8+hBYplKxuOK5ZzLBhbC7cFOqTx0vkcK1dw8mmqL0x8v1lwfz2eRxiqokkC4bDVq3CAKlul1IuEF9cQs5sZQ== </del> <ins> xterm-addon-webgl@0.15.0-beta.1: version "0.15.0-beta.1" resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.15.0-beta.1.tgz#bc3f784c3c467a70542b8a9a8998dbe996287796" integrity sha512-8f4cNXG0+dBMqp+Nvk/ZQ8Wo8s4/KbF24b2VTHTt8DuY5QXt4wSA6+NEdnABV98VYDoHl+KfXl9yyFqkcJYr8Q== </ins> <del> xterm-headless@5.1.0-beta.87: version "5.1.0-beta.87" resolved "https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.1.0-beta.87.tgz#6eb3114bbe006088ce1aab063f14ce87b93c1001" integrity sha512-/LEyLBkyAMy5r2iGur1CW0UsCGu1oEuskAccokbwOGS5Ad/uPZUDQUAuCmfSSX3gauz5TBqBPLYIRdY0u0DEJg== </del> <ins> xterm-headless@5.2.0-beta.2: version "5.2.0-beta.2" resolved "https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.2.0-beta.2.tgz#db8d4cc45a2bba062622d7784a2264030aa7d56d" integrity sha512-aP3+K47bJu5AkdtekML5LZZUh/zAkDc5ONNFgQ+7eUBh7RkFy3JYRuaG5Nj3LbdkUMjWqQZXzc3BW5Vo9KQNgA== </ins> <del> xterm@5.1.0-beta.87: version "5.1.0-beta.87" resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.1.0-beta.87.tgz#a4bb442b73e82941f87819f6db7810949536c891" integrity sha512-0cR7TUfAUH6Z1CVzVCm2CnFs7slqro2nf11yjrWvZyxEoGb34rNWvcnvIq2L5Xzv+gvHbl8jDO8yj5nyxQvUCA== </del> <ins> xterm@5.2.0-beta.2: version "5.2.0-beta.2" resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.2.tgz#67369235a54f41179922e662df40ff4c7c974787" integrity sha512-MRAdWRfV80ae0Q3Caq/mfmCwnZZZ89Z8i/sAleio5g5dpsst9IXc0zeFpPnOvUWmtVy5P1LbfU9YCy47449DWw== </ins> yallist@^4.0.0: version "4.0.0"


dependencies: object-keys "~0.4.0" <del> xterm-addon-canvas@0.3.0-beta.35: version "0.3.0-beta.35" resolved "https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.3.0-beta.35.tgz#2f85f9df9b109d51a8ce08a6023db747f4d060d5" integrity sha512-chk/+FaUPEAC33Mt6PDLbUWlzDCCoXBWJvKykMfhZF0vCm8GqpJc3z6R9jdcZcNCPUhmmv5psRTYun6oy5TvBQ== </del> <ins> xterm-addon-canvas@0.4.0-beta.1: version "0.4.0-beta.1" resolved "https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.4.0-beta.1.tgz#f2742b88cd3eb1840b9e7f986c4bfe31e0f4684f" integrity sha512-EfjaN0ujHJ4D8CsVpBig3xPvfRhbzAyOh8piAbNpePZmTpBzc2OQQQvEeklPriKVNDv28WbmY0Zzl5tgYM7vwg== </ins> xterm-addon-search@0.11.0-beta.7: version "0.11.0-beta.7" resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.11.0-beta.7.tgz#d90bcbe9e8f9238c18ba6145bd7ec2f8e3240052" integrity sha512-i/c774V0/Eon3BIFRsRR3OjKTnMGkccBo12yDkOa40tnAD4aa8FjspE3bxW/Hh1mUEhCSgBSLnMDlK/GwnUC+g== <del> xterm-addon-serialize@0.9.0-beta.3: version "0.9.0-beta.3" resolved "https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.9.0-beta.3.tgz#bb4ed416db5748bcbe55a4b6d4c2151368fdae74" integrity sha512-LaFuowtdxNdeuLm+KmtsoR4mgPOLu/I9k0hlWXbzAd1okJhthwMH4Y6cuL0/pFk1AclP5s+L42glv8PV0GnVsg== </del> <ins> xterm-addon-serialize@0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.9.0.tgz#3eee5f5c34b16e48891ec59b213716bab2354bf4" integrity sha512-qJju2YJFh8c8pbtCYtHaG7gDDHBpDJ4a4JQZvOzuiMxOjgeM1oCnFNjbhzMuK/fOUa59FmvIUGQyqn3WL9q7qw== </ins> xterm-addon-unicode11@0.5.0-beta.5: version "0.5.0-beta.5" resolved "https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.5.0-beta.5.tgz#6992a6f56349e67b903201d52b1ad41ba3469d93" integrity sha512-MaqnU34WTHCUAo7moB4KhynGn03RckI0JJ8E/gXe96EzuCP6bVJIKSc5pc9iFeLF4BX1SuemOqIHYl2Q3u3NTA== <del> xterm-addon-webgl@0.14.0-beta.50: version "0.14.0-beta.50" resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.14.0-beta.50.tgz#e52a7fd1776c214163e15fcabedf1f0b51f75445" integrity sha512-UF8+hBYplKxuOK5ZzLBhbC7cFOqTx0vkcK1dw8mmqL0x8v1lwfz2eRxiqokkC4bDVq3CAKlul1IuEF9cQs5sZQ== </del> <ins> xterm-addon-webgl@0.15.0-beta.1: version "0.15.0-beta.1" resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.15.0-beta.1.tgz#bc3f784c3c467a70542b8a9a8998dbe996287796" integrity sha512-8f4cNXG0+dBMqp+Nvk/ZQ8Wo8s4/KbF24b2VTHTt8DuY5QXt4wSA6+NEdnABV98VYDoHl+KfXl9yyFqkcJYr8Q== </ins> <del> xterm-headless@5.1.0-beta.87: version "5.1.0-beta.87" resolved "https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.1.0-beta.87.tgz#6eb3114bbe006088ce1aab063f14ce87b93c1001" integrity sha512-/LEyLBkyAMy5r2iGur1CW0UsCGu1oEuskAccokbwOGS5Ad/uPZUDQUAuCmfSSX3gauz5TBqBPLYIRdY0u0DEJg== </del> <ins> xterm-headless@5.2.0-beta.2: version "5.2.0-beta.2" resolved "https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.2.0-beta.2.tgz#db8d4cc45a2bba062622d7784a2264030aa7d56d" integrity sha512-aP3+K47bJu5AkdtekML5LZZUh/zAkDc5ONNFgQ+7eUBh7RkFy3JYRuaG5Nj3LbdkUMjWqQZXzc3BW5Vo9KQNgA== </ins> <del> xterm@5.1.0-beta.87: version "5.1.0-beta.87" resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.1.0-beta.87.tgz#a4bb442b73e82941f87819f6db7810949536c891" integrity sha512-0cR7TUfAUH6Z1CVzVCm2CnFs7slqro2nf11yjrWvZyxEoGb34rNWvcnvIq2L5Xzv+gvHbl8jDO8yj5nyxQvUCA== </del> <ins> xterm@5.2.0-beta.2: version "5.2.0-beta.2" resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.2.tgz#67369235a54f41179922e662df40ff4c7c974787" integrity sha512-MRAdWRfV80ae0Q3Caq/mfmCwnZZZ89Z8i/sAleio5g5dpsst9IXc0zeFpPnOvUWmtVy5P1LbfU9YCy47449DWw== </ins> y18n@^3.2.1: version "3.2.2"


"keybindingLabel.foreground": "#000000e4", "list.activeSelectionBackground": "#e8e8e8", "list.activeSelectionForeground": "#000000", <del> "list.activeSelectionIconForeground": "#000000", </del> "list.hoverBackground": "#f2f2f2", "menu.border": "#D4D4D4", "notebook.cellBorderColor": "#E8E8E8",


function Global:__VSCode-Escape-Value([string]$value) { # NOTE: In PowerShell v6.1+, this can be written `$value -replace '…', { … }` instead of `[regex]::Replace`. # Replace any non-alphanumeric characters. <del> [regex]::Replace($value, '[^a-zA-Z0-9]', { param($match) # Backslashes must be doubled. if ($match.Value -eq '') { '' } else { # Any other characters are encoded as their UTF-8 hex values. -Join ( [System.Text.Encoding]::UTF8.GetBytes($match.Value) | ForEach-Object { 'x{0:x2}' -f $_ } ) } </del> <ins> [regex]::Replace($value, '[n;]', { param($match) # Encode the (ascii) matches as `x<hex>` -Join ( [System.Text.Encoding]::UTF8.GetBytes($match.Value) | ForEach-Object { 'x{0:x2}' -f $_ } ) </ins> }) }


return; } <del> if (e.browserEvent.defaultPrevented) { return; } </del> const focus = e.index; if (typeof focus === 'undefined') {


this.list.setSelection([focus], e.browserEvent); } <del> e.browserEvent.preventDefault(); </del> this._onPointer.fire(e); }


return; } <del> if (e.browserEvent.defaultPrevented) { return; } </del> const focus = this.list.getFocus(); this.list.setSelection(focus, e.browserEvent); <del> e.browserEvent.preventDefault(); </del> } private changeSelection(e: IListMouseEvent<T> | IListTouchEvent<T>): void {


return; } <del> if (e.browserEvent.defaultPrevented) { return; } </del> const node = e.element; if (!node) {


return; } <del> if (e.browserEvent.defaultPrevented) { return; } </del> super.onDoubleClick(e); } }


} async getRefs(query: RefQuery = {}, cancellationToken?: CancellationToken): Promise<Ref[]> { <del> return await this.run(Operation.GetRefs, () => { return this.repository.getRefs(query, cancellationToken); }); </del> <ins> const config = workspace.getConfiguration('git'); let defaultSort = config.get<'alphabetically' | 'committerdate'>('branchSortOrder'); if (defaultSort !== 'alphabetically' && defaultSort !== 'committerdate') { defaultSort = 'alphabetically'; } query = { ...query, sort: query?.sort ?? defaultSort }; return await this.run(Operation.GetRefs, () => this.repository.getRefs(query, cancellationToken)); </ins> } async getRemoteRefs(remote: string, opts?: { heads?: boolean; tags?: boolean }): Promise<Ref[]> {


this._sourceControl.commitTemplate = commitTemplate; // Execute cancellable long-running operations <del> const config = workspace.getConfiguration('git'); let sort = config.get<'alphabetically' | 'committerdate'>('branchSortOrder') || 'alphabetically'; if (sort !== 'alphabetically' && sort !== 'committerdate') { sort = 'alphabetically'; } </del> const [resourceGroups, refs] = await Promise.all([ this.getStatus(cancellationToken), <del> this.repository.getRefs({ sort }, cancellationToken)]); </del> <ins> this.getRefs({}, cancellationToken)]); </ins> this._refs = refs!; this._updateResourceGroupsState(resourceGroups);


return (documentVersion: number) => { if (!cachedElements || documentVersion !== cachedVersion) { cachedVersion = documentVersion; <del> cachedElements = [{ element: document.body, line: 0 }]; </del> <ins> cachedElements = [{ element: document.body, line: -1 }]; </ins> for (const element of document.getElementsByClassName(codeLineClass)) { const line = +element.getAttribute('data-line')!; if (isNaN(line)) {


} switch (e.data.type) { <del> case 'setScale': </del> <ins> case 'setScale': { </ins> updateScale(e.data.scale); break; <del> case 'setActive': </del> <ins> } case 'setActive': { </ins> setActive(e.data.value); break; <del> case 'zoomIn': </del> <ins> } case 'zoomIn': { </ins> zoomIn(); break; <del> case 'zoomOut': </del> <ins> } case 'zoomOut': { </ins> zoomOut(); break; <ins> } case 'copyImage': { copyImage(); break; } </ins> } }); <ins> document.addEventListener('copy', () => { copyImage(); }); async function copyImage() { try { await navigator.clipboard.write([new ClipboardItem({ 'image/png': fetch(image.src).then(request => request.blob()) })]); } catch (e) { console.error(e); } } </ins> }());


"command": "imagePreview.zoomOut", "title": "%command.zoomOut%", "category": "Image Preview" <ins> }, { "command": "imagePreview.copyImage", "title": "%command.copyImage%", "category": "Image Preview" </ins> } ], "menus": {


"command": "imagePreview.zoomOut", "when": "activeCustomEditorId == 'imagePreview.previewEditor'", "group": "1_imagePreview" <ins> }, { "command": "imagePreview.copyImage", "when": "false" } ], "webview/context": [ { "command": "imagePreview.copyImage", "when": "webviewId == 'imagePreview.previewEditor'" </ins> } ] }


"customEditor.imagePreview.displayName": "Image Preview", "customEditor.videoPreview.displayName": "Video Preview", "command.zoomIn": "Zoom in", <del> "command.zoomOut": "Zoom out" </del> <ins> "command.zoomOut": "Zoom out", "command.copyImage": "Copy" </ins> }


<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data: ${cspSource}; media-src ${cspSource}; script-src 'nonce-${nonce}'; style-src ${cspSource} 'nonce-${nonce}';"> <meta id="settings" data-settings="${escapeAttribute(JSON.stringify(settings))}">

${vscode.l10n.t("An error occurred while loading the audio file.")}


} } <ins> public copyImage() { if (this.previewState === PreviewState.Active) { this.webviewEditor.reveal(); this.webviewEditor.webview.postMessage({ type: 'copyImage' }); } } </ins> protected override updateState() { super.updateState();


<link rel="stylesheet" href="${escapeAttribute(this.extensionResource('media', 'imagePreview.css'))}" type="text/css" media="screen" nonce="${nonce}">  <meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data: ${cspSource}; script-src 'nonce-${nonce}'; style-src ${cspSource} 'nonce-${nonce}';">   <meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data: ${cspSource}; connect-src ${cspSource}; script-src 'nonce-${nonce}'; style-src ${cspSource} 'nonce-${nonce}';">  <meta id="image-preview-settings" data-settings="${escapeAttribute(JSON.stringify(settings))}">

${vscode.l10n.t("An error occurred while loading the image.")}


previewManager.activePreview?.zoomOut(); })); <ins> disposables.push(vscode.commands.registerCommand('imagePreview.copyImage', () => { previewManager.activePreview?.copyImage(); })); </ins> return vscode.Disposable.from(...disposables); }


<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data: ${cspSource}; media-src ${cspSource}; script-src 'nonce-${nonce}'; style-src ${cspSource} 'nonce-${nonce}';"> <meta id="settings" data-settings="${escapeAttribute(JSON.stringify(settings))}">

${vscode.l10n.t("An error occurred while loading the video file.")}


italic: register('italic', 0xeb0d), jersey: register('jersey', 0xeb0e), json: register('json', 0xeb0f), <ins> bracket: register('bracket', 0xeb0f), </ins> kebabVertical: register('kebab-vertical', 0xeb10), key: register('key', 0xeb11), law: register('law', 0xeb12),


graphLine: register('graph-line', 0xebe2), graphScatter: register('graph-scatter', 0xebe3), pieChart: register('pie-chart', 0xebe4), <del> bracket: register('bracket', 0xebe4), </del> bracketDot: register('bracket-dot', 0xebe5), bracketError: register('bracket-error', 0xebe6), lockSmall: register('lock-small', 0xebe7),


} /** <ins> * A regex that extracts the link suffix which contains line and column information. The link suffix * must terminate at the end of line. */ const linkSuffixRegexEol = new Lazy<RegExp>(() => generateLinkSuffixRegex(true)); /** </ins> * A regex that extracts the link suffix which contains line and column information. */ <del> const linkSuffixRegexEol = new Lazy<RegExp>(() => { </del> <ins> const linkSuffixRegex = new Lazy<RegExp>(() => generateLinkSuffixRegex(false)); function generateLinkSuffixRegex(eolOnly: boolean) { </ins> let ri = 0; let ci = 0; function l(): string {


return `(?<col${ci++}>d+)`; } <ins> const eolSuffix = eolOnly ? '$' : ''; </ins> // The comments in the regex below use real strings/numbers for better readability, here's // the legend: // - Path = foo


// foo:339 // foo:339:12 // foo 339 <del> // foo 339:12                    [#140780] </del> <ins> // foo 339:12                        [#140780] </ins> // "foo",339 // "foo",339:12 <del> `(?::| |['"],)${l()}(:${c()})?$`, // The quotes below are optional [#171652] // "foo", line 339                [#40468] </del> <ins> `(?::| |['"],)${l()}(:${c()})?` + eolSuffix, // The quotes below are optional     [#171652] // "foo", line 339                   [#40468] </ins> // "foo", line 339, col 12 // "foo", line 339, column 12 // "foo":line 339


// "foo" on line 339, col 12 // "foo" on line 339, column 12 // "foo" line 339 column 12 <del> `['"]?(?:,? |: ?| on )line ${l()}(,? col(?:umn)? ${c()})?$`, // foo(339) // foo(339,12) // foo(339, 12) // foo (339) //   ... // foo: (339) //   ... `:? ?[[(]${l()}(?:, ?${c()})?[])]$`, ]; const suffixClause = lineAndColumnRegexClauses // Join all clauses together .join('|') // Convert spaces to allow the non-breaking space char (ascii 160) .replace(/ /g, `[${'u00A0'} ]`); return new RegExp(`(${suffixClause})`); }); const linkSuffixRegex = new Lazy<RegExp>(() => { let ri = 0; let ci = 0; function l(): string { return `(?<row${ri++}>d+)`; } function c(): string { return `(?<col${ci++}>d+)`; } const lineAndColumnRegexClauses = [ // foo:339 // foo:339:12 // foo 339 // foo 339:12                    [#140780] // "foo",339 // "foo",339:12 `(?::| |['"],)${l()}(:${c()})?`, // The quotes below are optional [#171652] // foo, line 339                [#40468] // foo, line 339, col 12 // foo, line 339, column 12 // "foo":line 339 // "foo":line 339, col 12 // "foo":line 339, column 12 // "foo": line 339 // "foo": line 339, col 12 // "foo": line 339, column 12 // "foo" on line 339 // "foo" on line 339, col 12 // "foo" on line 339, column 12 // "foo" line 339 column 12 `['"]?(?:,? |: ?| on )line ${l()}(,? col(?:umn)? ${c()})?`, </del> <ins> // "foo", line 339, character 12     [#171880] // "foo", line 339, characters 12-13 [#171880] // "foo", lines 339-340              [#171880] `['"]?(?:,? |: ?| on )lines? ${l()}(?:-d+)?(?:,? (?:col(?:umn)?|characters?) ${c()}(?:-d+)?)?` + eolSuffix, </ins> // foo(339) // foo(339,12) // foo(339, 12)


//   ... // foo: (339) //   ... <del> `:? ?[[(]${l()}(?:, ?${c()})?[])]`, </del> <ins> `:? ?[[(]${l()}(?:, ?${c()})?[])]` + eolSuffix, </ins> ]; const suffixClause = lineAndColumnRegexClauses


// Convert spaces to allow the non-breaking space char (ascii 160) .replace(/ /g, `[${'u00A0'} ]`); <del> return new RegExp(`(${suffixClause})`, 'g'); }); </del> <ins> return new RegExp(`(${suffixClause})`, eolOnly ? undefined : 'g'); } </ins> /** * Removes the optional link suffix which contains line and column information.


{ link: 'foo: [339,12]', prefix: undefined, suffix: ': [339,12]', hasRow: true, hasCol: true }, { link: 'foo: [339, 12]', prefix: undefined, suffix: ': [339, 12]', hasRow: true, hasCol: true }, <ins> // OCaml-style { link: '"foo", line 339, character 12', prefix: '"', suffix: '", line 339, character 12', hasRow: true, hasCol: true }, { link: '"foo", line 339, characters 12-13', prefix: '"', suffix: '", line 339, characters 12-13', hasRow: true, hasCol: true }, { link: '"foo", lines 339-340', prefix: '"', suffix: '", lines 339-340', hasRow: true, hasCol: false }, </ins> // Non-breaking space { link: 'foou00A0339:12', prefix: undefined, suffix: 'u00A0339:12', hasRow: true, hasCol: true }, { link: '"foo" on line 339,u00A0column 12', prefix: '"', suffix: '" on line 339,u00A0column 12', hasRow: true, hasCol: true },


/* Icons */ .monaco-workbench > .notifications-toasts .codicon.codicon-error { <del> color: var(--vscode-notificationsErrorIcon-foreground); </del> <ins> color: var(--vscode-notificationsErrorIcon-foreground) !important; </ins> } .monaco-workbench > .notifications-toasts .codicon.codicon-warning { <del> color: var(--vscode-notificationsWarningIcon-foreground); </del> <ins> color: var(--vscode-notificationsWarningIcon-foreground) !important; </ins> } .monaco-workbench > .notifications-toasts .codicon.codicon-info { <del> color: var(--vscode-notificationsInfoIcon-foreground); </del> <ins> color: var(--vscode-notificationsInfoIcon-foreground) !important; </ins> }


"vscode-proxy-agent": "^0.12.0", "vscode-regexpp": "^3.1.0", "vscode-textmate": "8.0.0", <del> "xterm": "5.2.0-beta.19", </del> <ins> "xterm": "5.2.0-beta.20", </ins> "xterm-addon-canvas": "0.4.0-beta.7", "xterm-addon-search": "0.11.0", "xterm-addon-serialize": "0.9.0", "xterm-addon-unicode11": "0.5.0", "xterm-addon-webgl": "0.15.0-beta.4", <del> "xterm-headless": "5.2.0-beta.19", </del> <ins> "xterm-headless": "5.2.0-beta.20", </ins> "yauzl": "^2.9.2", "yazl": "^2.4.3" },


"tas-client-umd": "0.1.6", "vscode-oniguruma": "1.7.0", "vscode-textmate": "8.0.0", <del> "xterm": "5.2.0-beta.19", </del> <ins> "xterm": "5.2.0-beta.20", </ins> "xterm-addon-canvas": "0.4.0-beta.7", "xterm-addon-search": "0.11.0", "xterm-addon-unicode11": "0.5.0",


resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.15.0-beta.4.tgz#d03a98e446372a5dbb7d92075d1f125eec23b030" integrity sha512-W9N0+5i3trQhgBOHDsnNiBbBiJpleFenY668wWaZ9GlvWseCTnjnWis1kfnM9WASDh/0+7aOjWrD089o+QeHGQ== <del> xterm@5.2.0-beta.19: version "5.2.0-beta.19" resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.19.tgz#b3fd2eda3d9aa2672abaf03e864fafe64269c8a0" integrity sha512-3U+NYHjnIdUQf+MXiitmoFAcBOaLFHid3R/LzzvELjMwQx227EFk+3OmQjkBt7eH/IR+A4VlP5aPGmgriyLtGQ== </del> <ins> xterm@5.2.0-beta.20: version "5.2.0-beta.20" resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.20.tgz#52ed300d7077ce394f7656655ad07d90f96c6c64" integrity sha512-UIbFYmUPNTOSYIhAt/2pJ9AF7nc8RxT2k2bBUZOER4VdaeA89FH3xcNC5/3OysPkn6QS9INcYS2dX5gM2RnChg== </ins>