{"_id":"doc-en-vscode-fc35972865a33023bb13206831f1c4b1a89dfb142baa58965535bcd57d1281ba","title":"","text":"import paths = require('vs/base/common/paths'); import { dirname, join } from 'path'; import { nfcall } from 'vs/base/common/async'; import fs = require('fs'); export function isRoot(path: string): boolean { return path === dirname(path); } export function readdir(path: string): TPromise { return nfcall(extfs.readdir, path); }"} {"_id":"doc-en-vscode-3101e4ea45935b48790868f838c02e745d53801cb68f5e01cefb96f6ee039971","title":"","text":"return TPromise.wrapError(err); }); if (isRoot(path)) { return TPromise.as(true); } return mkdir().then(null, (err: NodeJS.ErrnoException) => { if (err.code === 'ENOENT') { return mkdirp(dirname(path), mode).then(mkdir);"} {"_id":"doc-en-vscode-001a4b7bb1b7b6d8cb4a037abf74bdad33d227c420c0084d7be954e8c27ee74c","title":"","text":"import {IMessageService} from 'vs/platform/message/common/message'; import {IKeybindingService} from 'vs/platform/keybinding/common/keybindingService'; import {remote} from 'electron'; import {remote, webFrame} from 'electron'; export class ContextMenuService implements IContextMenuService {"} {"_id":"doc-en-vscode-227813d8371170947c184c51151451b0d5005a463e1cfd85a9d929d9d69e861d","title":"","text":"x = pos.x; y = pos.y; } let zoom = webFrame.getZoomFactor(); x *= zoom; y *= zoom; menu.popup(remote.getCurrentWindow(), Math.floor(x), Math.floor(y));"} {"_id":"doc-en-vscode-99019b1f0a414797c1c69ab436fc4e734db8cc841e3681d76da9c740d49bbbd2","title":"","text":"}) .done(null, e => this.messageService.show(severity.Error, e)); } } No newline at end of file } "} {"_id":"doc-en-vscode-ad0786495185e4f4bd1d00ebf729210fe89092bb3cc0fbbdd9aca9d87c3c6382","title":"","text":".pipe(util.cleanNodeModule('oniguruma', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('windows-mutex', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('native-keymap', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('windows-foreground-love', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('gc-signals', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node', 'src/index.js'])) .pipe(util.cleanNodeModule('pty.js', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['build/Release/**']));"} {"_id":"doc-en-vscode-7a21bd5463b7c0c8f0c4016051ec5d6627f47087782b4afc1c3328c8849bd245","title":"","text":"\"from\": \"vscode-textmate@2.2.0\", \"resolved\": \"https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-2.2.0.tgz\" }, \"windows-foreground-love\": { \"version\": \"0.1.0\", \"from\": \"windows-foreground-love@0.1.0\", \"resolved\": \"https://registry.npmjs.org/windows-foreground-love/-/windows-foreground-love-0.1.0.tgz\" }, \"windows-mutex\": { \"version\": \"0.2.0\", \"from\": \"windows-mutex@>=0.2.0 <0.3.0\","} {"_id":"doc-en-vscode-5c367a0d29a0549bb52c1ea1a673e5c8ae77ec6686397edb87f6e58e658e4f45","title":"","text":"} }, \"optionalDependencies\": { \"windows-foreground-love\": \"0.1.0\", \"windows-mutex\": \"^0.2.0\", \"fsevents\": \"0.3.8\" }"} {"_id":"doc-en-vscode-7b075409b1a63d0c5395328769980034c4111b7e4ad73e9515a16c995313a46b","title":"","text":" /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ declare module 'windows-foreground-love' { export function allowSetForegroundWindow(pid?: number): boolean; } No newline at end of file"} {"_id":"doc-en-vscode-c1adc270de1f3e2197a8f8948414faf2d3cb7dad05ac66e7ae9379ca5e9135b5","title":"","text":"export interface ILaunchService { start(args: ParsedArgs, userEnv: IProcessEnvironment): TPromise; getMainProcessId(): TPromise; } export interface ILaunchChannel extends IChannel { call(command: 'start', arg: IStartArguments): TPromise; call(command: 'get-main-process-id', arg: null): TPromise; call(command: string, arg: any): TPromise; }"} {"_id":"doc-en-vscode-01b30049a5fa379ac49525d8ef2377794d756f3faaa422a00a546545093eaa0e","title":"","text":"constructor(private service: ILaunchService) { } call(command: string, arg: any): TPromise { const { args, userEnv } = arg as IStartArguments; switch (command) { case 'start': return this.service.start(args, userEnv); case 'start': const { args, userEnv } = arg as IStartArguments; return this.service.start(args, userEnv); case 'get-main-process-id': return this.service.getMainProcessId(); } } }"} {"_id":"doc-en-vscode-c0610bac00d5c5ba802ccdbacbc87cea5b4146337698da706a40bbf2eaa0ea87","title":"","text":"start(args: ParsedArgs, userEnv: IProcessEnvironment): TPromise { return this.channel.call('start', { args, userEnv }); } getMainProcessId(): TPromise { return this.channel.call('get-main-process-id', null); } } export class LaunchService implements ILaunchService {"} {"_id":"doc-en-vscode-67cc2de280204bf08d2845639ac73612a186c87805649770163be3ec96b0e8d3","title":"","text":"return TPromise.as(null); } getMainProcessId(): TPromise { this.logService.log('Received request for process ID from other instance.'); return TPromise.as(process.pid); } } No newline at end of file"} {"_id":"doc-en-vscode-bc3bebea08c5990d492be8bbb069d0d26ca1b50d5db8bd81c4eb873d35d9b675","title":"","text":"const channel = client.getChannel('launch'); const service = new LaunchChannelClient(channel); return service.start(environmentService.args, process.env) let promise = TPromise.as(null); if (platform.isWindows) { promise = service.getMainProcessId() .then(processId => { logService.log('Sending some foreground love to the running instance:', processId); try { const { allowSetForegroundWindow } = require.__$__nodeRequire('windows-foreground-love'); allowSetForegroundWindow(processId); } catch (e) { // noop } }); } return promise .then(() => service.start(environmentService.args, process.env)) .then(() => client.dispose()) .then(() => TPromise.wrapError('Sent env to running instance. Terminating...')); },"} {"_id":"doc-en-vscode-f8eedb75ce6975b8c95328925065903dcd2d7aafb2cb72cdd8017d389477aaa0","title":"","text":"var viewItem = this.getItemAround(event.target); if (!viewItem) { if (!viewItem || (event.posx === 0 && event.posy === 0 && event.browserEvent.type === DOM.EventType.DRAG_LEAVE)) { // dragging outside of tree if (this.currentDropTarget) {"} {"_id":"doc-en-vscode-65f80acdb0484c78ea5e35d9322f0b3088bf3a71e0d8c086335bffcc360c103b","title":"","text":"'!build/{lib,tslintRules}/**/*.js', '!build/**/*.sh', '!build/tfs/**/*.js', '!build/tfs/**/*.config', '!**/Dockerfile', '!extensions/markdown-language-features/media/*.js' ];"} {"_id":"doc-en-vscode-e5e86ed87a771b31b3046f295436992045c1f9344d9a73fa4a099204f34faf5d","title":"","text":"const setupDir = (arch, target) => path.join(repoPath, '.build', `win32-${arch}`, `${target}-setup`); const issPath = path.join(__dirname, 'win32', 'code.iss'); const innoSetupPath = path.join(path.dirname(path.dirname(require.resolve('innosetup-compiler'))), 'bin', 'ISCC.exe'); const signPS1 = path.join(repoPath, 'build', 'tfs', 'win32', 'sign.ps1'); function packageInnoSetup(iss, options, cb) { options = options || {};"} {"_id":"doc-en-vscode-c7177a5f3c62016e033492f36762942513b5cd4a4c0c52aa8b3e70ce1d8bbe38","title":"","text":"keys.forEach(key => assert(typeof definitions[key] === 'string', `Missing value for '${key}' in Inno Setup package step`)); const defs = keys.map(key => `/d${key}=${definitions[key]}`); const args = [iss].concat(defs); const args = [ iss, ...defs, `/sesrp=powershell.exe -ExecutionPolicy bypass ${signPS1} $f` ]; cp.spawn(innoSetupPath, args, { stdio: ['ignore', 'inherit', 'inherit'] }) .on('error', cb)"} {"_id":"doc-en-vscode-4fb0c4b6423b94e2dd39249c01a865e4620ead37a6494808db69c979f6025989","title":"","text":"] SessionTimeout: 120 - task: NuGetCommand@2 displayName: Install ESRPClient.exe inputs: restoreSolution: 'buildtfswin32ESRPClientpackages.config' feedsToUse: config nugetConfigPath: 'buildtfswin32ESRPClientNuGet.config' externalFeedCredentials: 3fc0b7f7-da09-4ae7-a9c8-d69824b1819b restoreDirectory: packages - task: ESRPImportCertTask@1 displayName: Import ESRP Request Signing Certificate inputs: ESRP: 'ESRP CodeSign' - powershell: | $ErrorActionPreference = \"Stop\" npm run gulp -- \"vscode-win32-$(VSCODE_ARCH)-archive\" \"vscode-win32-$(VSCODE_ARCH)-system-setup\" \"vscode-win32-$(VSCODE_ARCH)-user-setup\" - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 inputs: ConnectedServiceName: 'ESRP CodeSign' FolderPath: '$(agent.builddirectory)' Pattern: VSCodeSetup.exe signConfigType: inlineSignParams inlineOperation: | [ { \"keyCode\": \"CP-229803\", \"operationSetCode\": \"SigntoolSign\", \"parameters\": [ { \"parameterName\": \"OpusName\", \"parameterValue\": \"VS Code\" }, { \"parameterName\": \"OpusInfo\", \"parameterValue\": \"https://code.visualstudio.com/\" }, { \"parameterName\": \"PageHash\", \"parameterValue\": \"/NPH\" }, { \"parameterName\": \"TimeStamp\", \"parameterValue\": \"/t \"http://ts4096.gtm.microsoft.com/TSS/AuthenticodeTS\"\" } ], \"toolName\": \"sign\", \"toolVersion\": \"1.0\" }, { \"keyCode\": \"CP-230012\", \"operationSetCode\": \"SigntoolSign\", \"parameters\": [ { \"parameterName\": \"OpusName\", \"parameterValue\": \"VS Code\" }, { \"parameterName\": \"OpusInfo\", \"parameterValue\": \"https://code.visualstudio.com/\" }, { \"parameterName\": \"Append\", \"parameterValue\": \"/as\" }, { \"parameterName\": \"FileDigest\", \"parameterValue\": \"/fd \"SHA256\"\" }, { \"parameterName\": \"PageHash\", \"parameterValue\": \"/NPH\" }, { \"parameterName\": \"TimeStamp\", \"parameterValue\": \"/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256\" } ], \"toolName\": \"sign\", \"toolVersion\": \"1.0\" }, { \"keyCode\": \"CP-230012\", \"operationSetCode\": \"SigntoolVerify\", \"parameters\": [ { \"parameterName\": \"VerifyAll\", \"parameterValue\": \"/all\" } ], \"toolName\": \"sign\", \"toolVersion\": \"1.0\" } ] SessionTimeout: 120 .buildtfswin32import-esrp-auth-cert.ps1 -AuthCertificateBase64 $(ESRP_AUTH_CERTIFICATE) -AuthCertificateKey $(ESRP_AUTH_CERTIFICATE_KEY) displayName: Import ESRP Auth Certificate - powershell: | $ErrorActionPreference = \"Stop\" npm run gulp -- \"vscode-win32-$(VSCODE_ARCH)-archive\" \"vscode-win32-$(VSCODE_ARCH)-system-setup\" \"vscode-win32-$(VSCODE_ARCH)-user-setup\" $Repo = \"$(pwd)\" $Root = \"$Repo..\" $SystemExe = \"$Repo.buildwin32-$(VSCODE_ARCH)system-setupVSCodeSetup.exe\""} {"_id":"doc-en-vscode-a78a28ada92e120025260f318882eda8fe3ef65d06818a9b4dc034ea4baba174","title":"","text":" No newline at end of file"} {"_id":"doc-en-vscode-7f1f7f17bee2f31b16431c090aa3afe27bcbfdb21d0eb212c5f425f3826e1eb8","title":"","text":" "} {"_id":"doc-en-vscode-01ec675b824274159db693e376b91791d8b1296597ea49f1d035a6c7c933b73a","title":"","text":" Param( [string]$AuthCertificateBase64, [string]$AuthCertificateKey ) # Import auth certificate $AuthCertificateFileName = [System.IO.Path]::GetTempFileName() $AuthCertificateBytes = [Convert]::FromBase64String($AuthCertificateBase64) [IO.File]::WriteAllBytes($AuthCertificateFileName, $AuthCertificateBytes) $AuthCertificate = Import-PfxCertificate -FilePath $AuthCertificateFileName -CertStoreLocation Cert:LocalMachineMy -Password (ConvertTo-SecureString $AuthCertificateKey -AsPlainText -Force) rm $AuthCertificateFileName $ESRPAuthCertificateSubjectName = $AuthCertificate.Subject Write-Output (\"##vso[task.setvariable variable=ESRPAuthCertificateSubjectName;]$ESRPAuthCertificateSubjectName\") No newline at end of file"} {"_id":"doc-en-vscode-01b8db83c58ac7323f17e07532b638fe618972c692ece0c26fb9007539efcfda","title":"","text":" function Create-TmpJson($Obj) { $FileName = [System.IO.Path]::GetTempFileName() ConvertTo-Json -Depth 100 $Obj | Out-File -Encoding UTF8 $FileName return $FileName } $Auth = Create-TmpJson @{ Version = \"1.0.0\" AuthenticationType = \"AAD_CERT\" ClientId = $env:ESRPClientId AuthCert = @{ SubjectName = $env:ESRPAuthCertificateSubjectName StoreLocation = \"LocalMachine\" StoreName = \"My\" } RequestSigningCert = @{ SubjectName = $env:ESRPCertificateSubjectName StoreLocation = \"LocalMachine\" StoreName = \"My\" } } $Policy = Create-TmpJson @{ Version = \"1.0.0\" } $Input = Create-TmpJson @{ Version = \"1.0.0\" SignBatches = @( @{ SourceLocationType = \"UNC\" SignRequestFiles = @( @{ SourceLocation = $args[0] } ) SigningInfo = @{ Operations = @( @{ KeyCode = \"CP-229803\" OperationCode = \"SigntoolSign\" Parameters = @{ OpusName = \"VS Code\" OpusInfo = \"https://code.visualstudio.com/\" PageHash = \"/NPH\" TimeStamp = \"/t `\"http://ts4096.gtm.microsoft.com/TSS/AuthenticodeTS`\"\" } ToolName = \"sign\" ToolVersion = \"1.0\" }, @{ KeyCode = \"CP-230012\" OperationCode = \"SigntoolSign\" Parameters = @{ OpusName = \"VS Code\" OpusInfo = \"https://code.visualstudio.com/\" Append = \"/as\" FileDigest = \"/fd `\"SHA256`\"\" PageHash = \"/NPH\" TimeStamp = \"/tr `\"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer`\" /td sha256\" } ToolName = \"sign\" ToolVersion = \"1.0\" }, @{ KeyCode = \"CP-230012\" OperationCode = \"SigntoolVerify\" Parameters = @{ VerifyAll = \"/all\" } ToolName = \"sign\" ToolVersion = \"1.0\" } ) } } ) } $Output = [System.IO.Path]::GetTempFileName() $ScriptPath = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent & \"$ScriptPathESRPClientpackagesEsrpClient.1.0.27toolsESRPClient.exe\" Sign -a $Auth -p $Policy -i $Input -o $Output No newline at end of file"} {"_id":"doc-en-vscode-e533d4dc33fa309fdf35fee809afdea1f705360568227d8fd8e9db4f5e370fea","title":"","text":"ShowLanguageDialog=auto ArchitecturesAllowed={#ArchitecturesAllowed} ArchitecturesInstallIn64BitMode={#ArchitecturesInstallIn64BitMode} SignTool=esrp #if \"user\" == InstallTarget DefaultDirName={userpf}{#DirName}"} {"_id":"doc-en-vscode-d724407c5237a753f2d024cf280dbe4e6148d29dc9a8be12d8d2e08dbde3751b","title":"","text":"import MDDocumentSymbolProvider from './features/documentSymbolProvider'; import { MarkdownContentProvider } from './features/previewContentProvider'; import { MarkdownPreviewManager } from './features/previewManager'; import MarkdownFoldingProvider from './features/foldingProvider'; export function activate(context: vscode.ExtensionContext) {"} {"_id":"doc-en-vscode-4a1d333d6eecdf9fdfbd0d60d3fe0ee246a9a109da5889280736df57248e069c","title":"","text":"context.subscriptions.push(vscode.languages.registerDocumentSymbolProvider(selector, new MDDocumentSymbolProvider(engine))); context.subscriptions.push(vscode.languages.registerDocumentLinkProvider(selector, new LinkProvider())); context.subscriptions.push(vscode.languages.registerFoldingProvider(selector, new MarkdownFoldingProvider(engine))); const previewSecuritySelector = new PreviewSecuritySelector(cspArbiter, previewManager);"} {"_id":"doc-en-vscode-691eabeffe30126c71ee38bb5844c2214698a7073e41f7197124f9031fb0eec3","title":"","text":" /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; import { MarkdownEngine } from '../markdownEngine'; import { TableOfContentsProvider } from '../tableOfContentsProvider'; export default class MarkdownFoldingProvider implements vscode.FoldingProvider { constructor( private readonly engine: MarkdownEngine ) { } public async provideFoldingRanges( document: vscode.TextDocument, _token: vscode.CancellationToken ): Promise { const tocProvider = new TableOfContentsProvider(this.engine, document); const toc = await tocProvider.getToc(); const foldingRanges = toc.map((entry, startIndex) => { const start = entry.line; let end: number | undefined = undefined; for (let i = startIndex + 1; i < toc.length; ++i) { if (toc[i].level <= entry.level) { end = toc[i].line - 1; break; } } return new vscode.FoldingRange( start, typeof end === 'number' ? end : document.lineCount - 1); }); return new vscode.FoldingRangeList(foldingRanges); } } No newline at end of file"} {"_id":"doc-en-vscode-695b9a41ca7c1abdf7d840f9d2a1a15ffd14802161319058b01f24851feb7e5c","title":"","text":" /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ export interface IScrollEvent { vertical: boolean; horizontal: boolean; } export interface IDelegate { getHeight(element: T): number; getTemplateId(element: T): string; } export interface IRenderer { renderTemplate(container: HTMLElement): TTemplateData; renderElement(element: TElement, templateData: TTemplateData): void; disposeTemplate(templateData: TTemplateData): void; } export interface IRendererMap { [templateId: string]: IRenderer; } "} {"_id":"doc-en-vscode-3291c4f1aa1f92188d2300e4bba0779ea5dac911f7ee700de5d21fd9a7bb633a","title":"","text":" /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { IScrollable } from 'vs/base/common/scrollable'; import Event, { Emitter } from 'vs/base/common/event'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { Gesture } from 'vs/base/browser/touch'; import * as DOM from 'vs/base/browser/dom'; import { IScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; import { ScrollableElement } from 'vs/base/browser/ui/scrollbar/impl/scrollableElement'; import { RangeMap } from './rangeMap'; import { IScrollEvent, IDelegate, IRendererMap } from './list'; import { RowCache, IRow } from './rowCache'; interface IItem { height: number; templateId: string; row: IRow; } export class List implements IScrollable { private items: IItem[]; private rangeMap: RangeMap; private cache: RowCache; private _scrollTop: number; private _viewHeight: number; private renderTop: number; private renderHeight: number; private domNode: HTMLElement; private wrapper: HTMLElement; private gesture: Gesture; private rowsContainer: HTMLElement; private scrollableElement: IScrollableElement; private _onScroll = new Emitter(); onScroll: Event = this._onScroll.event; constructor(container: HTMLElement, delegate: IDelegate, renderers: IRendererMap) { this.items = []; this.rangeMap = new RangeMap(); this.cache = new RowCache(renderers); this.domNode = document.createElement('div'); this.domNode.className = 'monaco-list'; this.domNode.tabIndex = 0; this.wrapper = document.createElement('div'); this.wrapper.className = 'monaco-list-wrapper'; this.scrollableElement = new ScrollableElement(this.wrapper, { forbidTranslate3dUse: true, scrollable: this, horizontal: 'hidden', vertical: 'auto', useShadows: true, saveLastScrollTimeOnClassName: 'monaco-list-row' }); this.gesture = new Gesture(this.wrapper); this.rowsContainer = document.createElement('div'); this.rowsContainer.className = 'monaco-list-rows'; } layout(height?: number): void { // if (!this.isTreeVisible()) { // \treturn; // } this.viewHeight = height || DOM.getContentHeight(this.wrapper); // render this.setScrollTop(this.scrollTop); // render this.scrollableElement.onElementDimensions(); this.scrollableElement.onElementInternalDimensions(); } // IScrollable getScrollHeight(): number { return this.rangeMap.size; } getScrollWidth(): number { return 0; } getScrollLeft(): number { return 0; } setScrollLeft(scrollLeft: number): void { // noop } getScrollTop(): number { return this.scrollTop; } setScrollTop(scrollTop: number): void { scrollTop = Math.min(scrollTop, this.getScrollHeight() - this.viewHeight); scrollTop = Math.max(scrollTop, 0); this.render(scrollTop, this.viewHeight); this._scrollTop = scrollTop; this._onScroll.fire({ vertical: true, horizontal: false }); } addScrollListener(callback: ()=>void): IDisposable { return this.onScroll(callback); } // Render Properties private get viewHeight() { return this._viewHeight; } private set viewHeight(viewHeight: number) { this.render(this.scrollTop, viewHeight); this._viewHeight = viewHeight; } private get scrollTop(): number { return this._scrollTop; } private set scrollTop(scrollTop: number) { this.setScrollTop(scrollTop); } // Render private render(scrollTop: number, viewHeight: number): void { const renderTop = Math.max(scrollTop, 0); const renderBottom = scrollTop + viewHeight; const thisRenderBottom = this.scrollTop + this.viewHeight; let i: number, stop: number; // when view scrolls down, start rendering from the renderBottom for (i = this.indexAfter(renderBottom) - 1, stop = this.rangeMap.indexAt(Math.max(thisRenderBottom, renderTop)); i >= stop; i--) { this.insertItemInDOM(i); } // when view scrolls up, start rendering from either this.renderTop or renderBottom for (i = Math.min(this.rangeMap.indexAt(this.renderTop), this.indexAfter(renderBottom)) - 1, stop = this.rangeMap.indexAt(renderTop); i >= stop; i--) { this.insertItemInDOM(i); } // when view scrolls down, start unrendering from renderTop for (i = this.rangeMap.indexAt(this.renderTop), stop = Math.min(this.rangeMap.indexAt(renderTop), this.indexAfter(thisRenderBottom)); i < stop; i++) { this.removeItemFromDOM(i); } // when view scrolls up, start unrendering from either renderBottom this.renderTop for (i = Math.max(this.indexAfter(renderBottom), this.rangeMap.indexAt(this.renderTop)), stop = this.indexAfter(thisRenderBottom); i < stop; i++) { this.removeItemFromDOM(i); } const topPosition = this.rangeMap.positionAt(this.rangeMap.indexAt(renderTop)); if (topPosition > -1) { this.rowsContainer.style.top = (topPosition - renderTop) + 'px'; } this.renderTop = renderTop; this.renderHeight = renderBottom - renderTop; } private indexAfter(position: number): number { return Math.min(this.rangeMap.indexAt(position) + 1, this.rangeMap.size); } private insertItemInDOM(index: number): void { const item = this.items[index]; if (!item.row) { item.row = this.cache.alloc(item.templateId); // used in reverse lookup from HTMLElement to Item // ( this.element)[TreeView.BINDING] = this; } if (item.row.domNode.parentElement) { return; } const nextItem = this.items[index + 1]; if (nextItem && nextItem.row) { this.rowsContainer.insertBefore(item.row.domNode, nextItem.row.domNode); } else { this.rowsContainer.appendChild(item.row.domNode); } this.renderItem(index); } private removeItemFromDOM(index: number): void { const item = this.items[index]; if (!item.row) { return; } // ( this.element)[TreeView.BINDING] = null; this.cache.release(item.row); item.row = null; } private renderItem(index: number): void { // TODO } dispose() { this.items = null; if (this.domNode && this.domNode.parentElement) { this.domNode.parentNode.removeChild(this.domNode); this.domNode = null; } this.rangeMap = dispose(this.rangeMap); this.gesture = dispose(this.gesture); this.scrollableElement = dispose(this.scrollableElement); this._onScroll = dispose(this._onScroll); } } "} {"_id":"doc-en-vscode-7a6267e4f77aa869ebb406aa2b1bcc6ada720afea435bcf1da0fb63e6ce5650d","title":"","text":" /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ export interface IGroup { count: number; size: number; } export interface IRange { start: number; end: number; } export interface IRangedGroup { range: IRange; size: number; } /** * Returns the intersection between two ranges as a range itself. * Returns `null` if the intersection is empty. */ export function intersect(one: IRange, other: IRange): IRange { if (one.start >= other.end || other.start >= one.end) { return null; } const start = Math.max(one.start, other.start); const end = Math.min(one.end, other.end); if (end - start <= 0) { return null; } return { start, end }; } /** * Returns the intersection between a ranged group and a range. * Returns `[]` if the intersection is empty. */ export function groupIntersect(range: IRange, groups: IRangedGroup[]): IRangedGroup[] { const result: IRangedGroup[] = []; for (const r of groups) { if (range.start >= r.range.end) { continue; } if (range.end < r.range.start) { break; } const intersection = intersect(range, r.range); if (!intersection) { continue; } result.push({ range: intersection, size: r.size }); } return result; } /** * Shifts a range by that `much`. */ function shift({ start, end }: IRange, much: number): IRange { return { start: start + much, end: end + much }; } /** * Consolidates a collection of ranged groups. * * Consolidation is the process of merging consecutive ranged groups * that share the same `size`. */ export function consolidate(groups: IRangedGroup[]): IRangedGroup[] { const result: IRangedGroup[] = []; let previousGroup: IRangedGroup = null; for (const group of groups) { const start = group.range.start; const end = group.range.end; const size = group.size; if (previousGroup && size === previousGroup.size) { previousGroup.range.end = end; continue; } previousGroup = { range: { start, end }, size }; result.push(previousGroup); } return result; } /** * Concatenates several collections of ranged groups into a single * collection. */ function concat(...groups: IRangedGroup[][]): IRangedGroup[] { return consolidate(groups.reduce((r, g) => r.concat(g), [] as IRangedGroup[])); } export class RangeMap { private groups: IRangedGroup[] = []; private _size = 0; splice(index: number, deleteCount: number, ...groups: IGroup[]): void { let diff = -deleteCount; let index2 = index; const middle = groups .filter(g => g.count > 0 && g.size > 0) .map(g => { const end = index2 + g.count; const result = { range: { start: index2, end }, size: g.size }; diff += g.count; index2 = end; return result; }); const before = groupIntersect({ start: 0, end: index }, this.groups); const after = groupIntersect({ start: index + deleteCount, end: Number.POSITIVE_INFINITY }, this.groups) .map(g => ({ range: shift(g.range, diff), size: g.size })); this.groups = concat(before, middle, after); this._size = this.groups.reduce((t, g) => t + (g.size * (g.range.end - g.range.start)), 0); } /** * Returns the number of items in the range map. */ get count(): number { const len = this.groups.length; if (!len) { return 0; } return this.groups[len - 1].range.end; } /** * Returns the sum of the sizes of all items in the range map. */ get size(): number { return this._size; } /** * Returns index of the item at the given position. */ indexAt(position: number): number { if (position < 0) { return -1; } let index = 0; let size = 0; for (const group of this.groups) { const newSize = size + ((group.range.end - group.range.start) * group.size); if (position < newSize) { return index + Math.floor((position - size) / group.size); } index += group.size; size = newSize; } return -1; } /** * Returns the start position of the item at the given index. */ positionAt(index: number): number { if (index < 0) { return -1; } let position = 0; let count = 0; for (const group of this.groups) { const groupCount = group.range.end - group.range.start; const newCount = count + groupCount; if (index < newCount) { return position + ((index - count) * group.size); } position += groupCount * group.size; count = newCount; } return -1; } dispose() { this.groups = null; } } No newline at end of file"} {"_id":"doc-en-vscode-16e8f9e7b12955fa7bc8115af1904f107050605f442f18f003513e2461c7816a","title":"","text":" /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { IRendererMap } from './list'; import { IDisposable } from 'vs/base/common/lifecycle'; import { append, emmet as $, addClass, removeClass } from 'vs/base/browser/dom'; export interface IRow { domNode: HTMLElement; templateId: string; templateData: any; } function getLastScrollTime(element: HTMLElement): number { var value = element.getAttribute('last-scroll-time'); return value ? parseInt(value, 10) : 0; } function removeFromParent(element: HTMLElement): void { try { element.parentElement.removeChild(element); } catch (e) { // this will throw if this happens due to a blur event, nasty business } } export class RowCache implements IDisposable { private cache: { [templateId:string]: IRow[]; }; private scrollingRow: IRow; constructor(private renderers: IRendererMap) { this.cache = Object.create(null); this.scrollingRow = null; } /** * Returns a row either by creating a new one or reusing * a previously released row which shares the same templateId. */ alloc(templateId: string): IRow { let result = this.getTemplateCache(templateId).pop(); if (!result) { const domNode = $('div'); const content = append(domNode, $('.content')); const renderer = this.renderers[templateId]; const templateData = renderer.renderTemplate(content); result = { domNode, templateId, templateData }; } return result; } /** * Releases the row for eventual reuse. The row's domNode * will eventually be removed from its parent, given that * it is not the currently scrolling row (for OS X ballistic * scrolling). */ release(row: IRow): void { var lastScrollTime = getLastScrollTime(row.domNode); if (!lastScrollTime) { removeFromParent(row.domNode); this.getTemplateCache(row.templateId).push(row); return; } if (this.scrollingRow) { var lastKnownScrollTime = getLastScrollTime(this.scrollingRow.domNode); if (lastKnownScrollTime > lastScrollTime) { removeFromParent(row.domNode); this.getTemplateCache(row.templateId).push(row); return; } if (this.scrollingRow.domNode.parentElement) { removeFromParent(this.scrollingRow.domNode); removeClass(this.scrollingRow.domNode, 'scrolling'); this.getTemplateCache(this.scrollingRow.templateId).push(this.scrollingRow); } } this.scrollingRow = row; addClass(this.scrollingRow.domNode, 'scrolling'); } private getTemplateCache(templateId: string): IRow[] { return this.cache[templateId] || (this.cache[templateId] = []); } garbageCollect(): void { if (this.cache) { Object.keys(this.cache).forEach(templateId => { this.cache[templateId].forEach(cachedRow => { const renderer = this.renderers[templateId]; renderer.disposeTemplate(cachedRow.templateData); cachedRow.domNode = null; cachedRow.templateData = null; }); delete this.cache[templateId]; }); } if (this.scrollingRow) { const renderer = this.renderers[this.scrollingRow.templateId]; renderer.disposeTemplate(this.scrollingRow.templateData); this.scrollingRow = null; } } dispose(): void { this.garbageCollect(); this.cache = null; this.renderers = null; } } No newline at end of file"} {"_id":"doc-en-vscode-a10bb590c89ef1d28e2a6d11597f64068ddb3b0235968b687088b993d595bd2e","title":"","text":" /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import assert = require('assert'); import { RangeMap, intersect, groupIntersect, IRangedGroup, consolidate } from '../rangeMap'; suite('RangeMap', () => { var rangeMap: RangeMap; setup(() => { rangeMap = new RangeMap(); }); teardown(() => { rangeMap.dispose(); }); test('intersection', () => { assert.deepEqual(intersect({ start: 0, end: 0 }, { start: 0, end: 0 }), null); assert.deepEqual(intersect({ start: 0, end: 0 }, { start: 5, end: 5 }), null); assert.deepEqual(intersect({ start: 0, end: 1 }, { start: 5, end: 6 }), null); assert.deepEqual(intersect({ start: 5, end: 6 }, { start: 0, end: 1 }), null); assert.deepEqual(intersect({ start: 0, end: 5 }, { start: 2, end: 2 }), null); assert.deepEqual(intersect({ start: 0, end: 1 }, { start: 0, end: 1 }), { start: 0, end: 1 }); assert.deepEqual(intersect({ start: 0, end: 10 }, { start: 0, end: 5 }), { start: 0, end: 5 }); assert.deepEqual(intersect({ start: 0, end: 5 }, { start: 0, end: 10 }), { start: 0, end: 5 }); assert.deepEqual(intersect({ start: 0, end: 10 }, { start: 5, end: 10 }), { start: 5, end: 10 }); assert.deepEqual(intersect({ start: 5, end: 10 }, { start: 0, end: 10 }), { start: 5, end: 10 }); assert.deepEqual(intersect({ start: 0, end: 10 }, { start: 2, end: 8 }), { start: 2, end: 8 }); assert.deepEqual(intersect({ start: 2, end: 8 }, { start: 0, end: 10 }), { start: 2, end: 8 }); assert.deepEqual(intersect({ start: 0, end: 10 }, { start: 5, end: 15 }), { start: 5, end: 10 }); assert.deepEqual(intersect({ start: 5, end: 15 }, { start: 0, end: 10 }), { start: 5, end: 10 }); }); test('multiIntersect', () => { assert.deepEqual( groupIntersect( { start: 0, end: 0 }, [{ range: { start: 0, end: 10 }, size: 1 }] ), [] ); assert.deepEqual( groupIntersect( { start: 10, end: 20 }, [{ range: { start: 0, end: 10 }, size: 1 }] ), [] ); assert.deepEqual( groupIntersect( { start: 2, end: 8 }, [{ range: { start: 0, end: 10 }, size: 1 }] ), [{ range: { start: 2, end: 8 }, size: 1 }] ); assert.deepEqual( groupIntersect( { start: 2, end: 8 }, [{ range: { start: 0, end: 10 }, size: 1 }, { range: { start: 10, end: 20 }, size: 5 }] ), [{ range: { start: 2, end: 8 }, size: 1 }] ); assert.deepEqual( groupIntersect( { start: 12, end: 18 }, [{ range: { start: 0, end: 10 }, size: 1 }, { range: { start: 10, end: 20 }, size: 5 }] ), [{ range: { start: 12, end: 18 }, size: 5 }] ); assert.deepEqual( groupIntersect( { start: 2, end: 18 }, [{ range: { start: 0, end: 10 }, size: 1 }, { range: { start: 10, end: 20 }, size: 5 }] ), [{ range: { start: 2, end: 10 }, size: 1 }, { range: { start: 10, end: 18 }, size: 5 }] ); assert.deepEqual( groupIntersect( { start: 2, end: 28 }, [{ range: { start: 0, end: 10 }, size: 1 }, { range: { start: 10, end: 20 }, size: 5 }, { range: { start: 20, end: 30 }, size: 10 }] ), [{ range: { start: 2, end: 10 }, size: 1 }, { range: { start: 10, end: 20 }, size: 5 }, { range: { start: 20, end: 28 }, size: 10 }] ); }); test('consolidate', () => { assert.deepEqual(consolidate([]), []); assert.deepEqual( consolidate([{ range: { start: 0, end: 10 }, size: 1 }]), [{ range: { start: 0, end: 10 }, size: 1 }] ); assert.deepEqual( consolidate([ { range: { start: 0, end: 10 }, size: 1 }, { range: { start: 10, end: 20 }, size: 1 } ]), [{ range: { start: 0, end: 20 }, size: 1 }] ); assert.deepEqual( consolidate([ { range: { start: 0, end: 10 }, size: 1 }, { range: { start: 10, end: 20 }, size: 1 }, { range: { start: 20, end: 100 }, size: 1 } ]), [{ range: { start: 0, end: 100 }, size: 1 }] ); assert.deepEqual( consolidate([ { range: { start: 0, end: 10 }, size: 1 }, { range: { start: 10, end: 20 }, size: 5 }, { range: { start: 20, end: 30 }, size: 10 } ]), [ { range: { start: 0, end: 10 }, size: 1 }, { range: { start: 10, end: 20 }, size: 5 }, { range: { start: 20, end: 30 }, size: 10 } ] ); assert.deepEqual( consolidate([ { range: { start: 0, end: 10 }, size: 1 }, { range: { start: 10, end: 20 }, size: 2 }, { range: { start: 20, end: 100 }, size: 2 } ]), [ { range: { start: 0, end: 10 }, size: 1 }, { range: { start: 10, end: 100 }, size: 2 } ] ); }); test('empty', () => { assert.equal(rangeMap.size, 0); assert.equal(rangeMap.count, 0); }); test('length & count', () => { rangeMap.splice(0, 0, { count: 1, size: 1 }); assert.equal(rangeMap.size, 1); assert.equal(rangeMap.count, 1); }); test('length & count #2', () => { rangeMap.splice(0, 0, { count: 5, size: 1 }); assert.equal(rangeMap.size, 5); assert.equal(rangeMap.count, 5); }); test('length & count #3', () => { rangeMap.splice(0, 0, { count: 1, size: 5 }); assert.equal(rangeMap.size, 5); assert.equal(rangeMap.count, 1); }); test('length & count #4', () => { rangeMap.splice(0, 0, { count: 5, size: 5 }); assert.equal(rangeMap.size, 25); assert.equal(rangeMap.count, 5); }); test('insert', () => { rangeMap.splice(0, 0, { count: 5, size: 5 }); assert.equal(rangeMap.size, 25); assert.equal(rangeMap.count, 5); rangeMap.splice(0, 0, { count: 5, size: 5 }); assert.equal(rangeMap.size, 50); assert.equal(rangeMap.count, 10); rangeMap.splice(5, 0, { count: 2, size: 10 }); assert.equal(rangeMap.size, 70); assert.equal(rangeMap.count, 12); rangeMap.splice(12, 0, { count: 1, size: 200 }); assert.equal(rangeMap.size, 270); assert.equal(rangeMap.count, 13); }); test('delete', () => { rangeMap.splice(0, 0, { count: 20, size: 5 }); assert.equal(rangeMap.size, 100); assert.equal(rangeMap.count, 20); rangeMap.splice(10, 5); assert.equal(rangeMap.size, 75); assert.equal(rangeMap.count, 15); rangeMap.splice(0, 1); assert.equal(rangeMap.size, 70); assert.equal(rangeMap.count, 14); rangeMap.splice(1, 13); assert.equal(rangeMap.size, 5); assert.equal(rangeMap.count, 1); rangeMap.splice(1, 1); assert.equal(rangeMap.size, 5); assert.equal(rangeMap.count, 1); }); test('insert & delete', () => { assert.equal(rangeMap.size, 0); assert.equal(rangeMap.count, 0); rangeMap.splice(0, 0, { count: 1, size: 1 }); assert.equal(rangeMap.size, 1); assert.equal(rangeMap.count, 1); rangeMap.splice(0, 1); assert.equal(rangeMap.size, 0); assert.equal(rangeMap.count, 0); }); test('insert & delete #2', () => { rangeMap.splice(0, 0, { count: 10, size: 1 }); rangeMap.splice(2, 6); assert.equal(rangeMap.count, 4); assert.equal(rangeMap.size, 4); }); test('insert & delete #3', () => { rangeMap.splice(0, 0, { count: 10, size: 1 }, { count: 10, size: 2 }); rangeMap.splice(8, 4); assert.equal(rangeMap.count, 16); assert.equal(rangeMap.size, 24); }); test('insert & delete #3', () => { rangeMap.splice(0, 0, { count: 10, size: 1 }, { count: 10, size: 2 }); rangeMap.splice(5, 0, { count: 5, size: 3 }); assert.equal(rangeMap.count, 25); assert.equal(rangeMap.size, 45); rangeMap.splice(4, 7); assert.equal(rangeMap.count, 18); assert.equal(rangeMap.size, 28); }); suite('indexAt, positionAt', () => { test('empty', () => { assert.equal(rangeMap.indexAt(0), -1); assert.equal(rangeMap.indexAt(10), -1); assert.equal(rangeMap.indexAt(-1), -1); assert.equal(rangeMap.positionAt(0), -1); assert.equal(rangeMap.positionAt(10), -1); assert.equal(rangeMap.positionAt(-1), -1); }); test('simple', () => { rangeMap.splice(0, 0, { count: 1, size: 1 }); assert.equal(rangeMap.indexAt(0), 0); assert.equal(rangeMap.indexAt(1), -1); assert.equal(rangeMap.positionAt(0), 0); assert.equal(rangeMap.positionAt(1), -1); }); test('simple #2', () => { rangeMap.splice(0, 0, { count: 1, size: 10 }); assert.equal(rangeMap.indexAt(0), 0); assert.equal(rangeMap.indexAt(5), 0); assert.equal(rangeMap.indexAt(9), 0); assert.equal(rangeMap.indexAt(10), -1); assert.equal(rangeMap.positionAt(0), 0); assert.equal(rangeMap.positionAt(1), -1); }); test('insert', () => { rangeMap.splice(0, 0, { count: 10, size: 1 }); assert.equal(rangeMap.indexAt(0), 0); assert.equal(rangeMap.indexAt(1), 1); assert.equal(rangeMap.indexAt(5), 5); assert.equal(rangeMap.indexAt(9), 9); assert.equal(rangeMap.indexAt(10), -1); rangeMap.splice(10, 0, { count: 10, size: 1 }); assert.equal(rangeMap.indexAt(10), 10); assert.equal(rangeMap.indexAt(19), 19); assert.equal(rangeMap.indexAt(20), -1); assert.equal(rangeMap.positionAt(0), 0); assert.equal(rangeMap.positionAt(1), 1); assert.equal(rangeMap.positionAt(19), 19); assert.equal(rangeMap.positionAt(20), -1); }); test('delete', () => { rangeMap.splice(0, 0, { count: 10, size: 1 }); rangeMap.splice(2, 6); assert.equal(rangeMap.indexAt(0), 0); assert.equal(rangeMap.indexAt(1), 1); assert.equal(rangeMap.indexAt(3), 3); assert.equal(rangeMap.indexAt(4), -1); assert.equal(rangeMap.positionAt(0), 0); assert.equal(rangeMap.positionAt(1), 1); assert.equal(rangeMap.positionAt(3), 3); assert.equal(rangeMap.positionAt(4), -1); }); test('delete #2', () => { rangeMap.splice(0, 0, { count: 10, size: 10 }); rangeMap.splice(2, 6); assert.equal(rangeMap.indexAt(0), 0); assert.equal(rangeMap.indexAt(1), 0); assert.equal(rangeMap.indexAt(30), 3); assert.equal(rangeMap.indexAt(40), -1); assert.equal(rangeMap.positionAt(0), 0); assert.equal(rangeMap.positionAt(1), 10); assert.equal(rangeMap.positionAt(2), 20); assert.equal(rangeMap.positionAt(3), 30); assert.equal(rangeMap.positionAt(4), -1); }); }); }); No newline at end of file"} {"_id":"doc-en-vscode-f43e1e611f9ebebd0ae926e40dbcdb1c482642feda06865674985e43f3afa895","title":"","text":"dispose(): void; } export function dispose(disposable: T): T { if (disposable) { disposable.dispose(); } return null; } export function disposeAll(arr: T[]): T[] { if (arr) { for (let i = 0, len = arr.length; i < len; i++) {"} {"_id":"doc-en-vscode-8f717e10dac160b1d5650daeaec0a91d7b4888ed07806eda128c9981865783b5","title":"","text":"Root: HKCR; Subkey: \"{#RegValueName}SourceFileDefaultIcon\"; ValueType: string; ValueName: \"\"; ValueData: \"{app}resourcesappresourceswin32code_file.ico\" Root: HKCR; Subkey: \"{#RegValueName}SourceFileshellopencommand\"; ValueType: string; ValueName: \"\"; ValueData: \"\"\"{app}{#ExeBasename}.exe\"\" \"\"%1\"\"\" Root: HKCR; Subkey: \"Applications{#ExeBasename}.exe\"; ValueType: none; ValueName: \"\"; Flags: uninsdeletekey Root: HKCR; Subkey: \"Applications{#ExeBasename}.exeDefaultIcon\"; ValueType: string; ValueName: \"\"; ValueData: \"{app}resourcesappresourceswin32code_file.ico\" Root: HKCR; Subkey: \"Applications{#ExeBasename}.exeshellopencommand\"; ValueType: string; ValueName: \"\"; ValueData: \"\"\"{app}{#ExeBasename}.exe\"\" \"\"%1\"\"\" Root: HKCU; Subkey: \"Environment\"; ValueType: expandsz; ValueName: \"Path\"; ValueData: \"{olddata};{app}bin\"; Tasks: addtopath; Check: NeedsAddPath(ExpandConstant('{app}bin')) Root: HKCU; Subkey: \"SOFTWAREClasses*shell{#RegValueName}\"; ValueType: expandsz; ValueName: \"\"; ValueData: \"Open with {#ShellNameShort}\"; Tasks: addcontextmenufiles; Flags: uninsdeletekey"} {"_id":"doc-en-vscode-7b9ca70763fd53b76a1ddad5d7e5efdf90b8d797c93b427746cc86108d1c456b","title":"","text":"public disposeTemplate(templateId: string, templateData: any): void { if (templateId === templateEntryItem) { this.entryItemRenderer.disposeTemplate(null, templateId, templateData); } else { const data = templateData as IQuickOpenEntryGroupTemplateData; data.actionBar.dispose(); data.actionBar = null; data.container = null; data.description.dispose(); data.description = null; data.detail.dispose(); data.detail = null; data.group = null; data.icon = null; data.label.dispose(); data.label = null; data.prefix = null; } const data = templateData as IQuickOpenEntryGroupTemplateData; data.actionBar.dispose(); data.actionBar = null; data.container = null; data.description.dispose(); data.description = null; data.detail.dispose(); data.detail = null; data.group = null; data.icon = null; data.label.dispose(); data.label = null; data.prefix = null; } }"} {"_id":"doc-en-vscode-f8e8b5de54d8e07c8388abc1c854038aa483ab132eae7e2c624d471dda505466","title":"","text":"import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { relative } from 'path'; import { IProcessEnvironment, isWindows } from 'vs/base/common/platform'; export class ConfigurationResolverService implements IConfigurationResolverService { _serviceBrand: any;"} {"_id":"doc-en-vscode-1cbe8bc704e62e8e387b21829429f73994e6ba9e4e0d900127c32bec4895e7e8","title":"","text":"private _lastWorkspaceFolder: IWorkspaceFolder; constructor( envVariables: { [key: string]: string }, envVariables: IProcessEnvironment, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IEnvironmentService environmentService: IEnvironmentService, @IConfigurationService private configurationService: IConfigurationService,"} {"_id":"doc-en-vscode-3484e22f4130038732965adb81fe8a46393392649cce1d1b6ca1a55358ae0a9f","title":"","text":") { this._execPath = environmentService.execPath; Object.keys(envVariables).forEach(key => { this[`env:${key}`] = envVariables[key]; const name = isWindows ? key.toLowerCase() : key; this[`env:${name}`] = envVariables[key]; }); }"} {"_id":"doc-en-vscode-68f08bafb19cdfa75b42c3b23e0a9f0f2fc8ee5758ef899af6c6a991143294ff","title":"","text":"let regexp = /${(.*?)}/g; const originalValue = value; const resolvedString = value.replace(regexp, (match: string, name: string) => { let newValue = (this)[name]; const key = (isWindows && match.indexOf('env:') > 0) ? name.toLowerCase() : name; let newValue = (this)[key]; if (types.isString(newValue)) { return newValue; } else {"} {"_id":"doc-en-vscode-39e368c5b478b1c7fc8fe081c1797299307ea6dcd98e2391b33b154c4a97eb7e","title":"","text":"suite('Configuration Resolver Service', () => { let configurationResolverService: IConfigurationResolverService; let envVariables: { [key: string]: string } = { key1: 'Value for Key1', key2: 'Value for Key2' }; let envVariables: { [key: string]: string } = { key1: 'Value for key1', key2: 'Value for key2' }; let mockCommandService: MockCommandService; let editorService: TestEditorService; let workspace: IWorkspaceFolder;"} {"_id":"doc-en-vscode-d46849ea7d976653e73ae65aced5cd9c80bb0460e889aa6d1cd2fe3c059fce0f","title":"","text":"test('substitute one env variable', () => { if (platform.isWindows) { assert.strictEqual(configurationResolverService.resolve(workspace, 'abc ${workspaceFolder} ${env:key1} xyz'), 'abc VSCodeworkspaceLocation Value for Key1 xyz'); assert.strictEqual(configurationResolverService.resolve(workspace, 'abc ${workspaceFolder} ${env:key1} xyz'), 'abc VSCodeworkspaceLocation Value for key1 xyz'); } else { assert.strictEqual(configurationResolverService.resolve(workspace, 'abc ${workspaceFolder} ${env:key1} xyz'), 'abc /VSCode/workspaceLocation Value for Key1 xyz'); assert.strictEqual(configurationResolverService.resolve(workspace, 'abc ${workspaceFolder} ${env:key1} xyz'), 'abc /VSCode/workspaceLocation Value for key1 xyz'); } }); test('substitute many env variable', () => { if (platform.isWindows) { assert.strictEqual(configurationResolverService.resolve(workspace, '${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'), 'VSCodeworkspaceLocation - VSCodeworkspaceLocation Value for Key1 - Value for Key2'); assert.strictEqual(configurationResolverService.resolve(workspace, '${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'), 'VSCodeworkspaceLocation - VSCodeworkspaceLocation Value for key1 - Value for key2'); } else { assert.strictEqual(configurationResolverService.resolve(workspace, '${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'), '/VSCode/workspaceLocation - /VSCode/workspaceLocation Value for Key1 - Value for Key2'); assert.strictEqual(configurationResolverService.resolve(workspace, '${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'), '/VSCode/workspaceLocation - /VSCode/workspaceLocation Value for key1 - Value for key2'); } }); test('substitute one env variable using platform case sensitivity', () => { if (platform.isWindows) { assert.strictEqual(configurationResolverService.resolve(workspace, '${env:key1} - ${env:Key1}'), 'Value for key1 - Value for key1'); } else { assert.strictEqual(configurationResolverService.resolve(workspace, '${env:key1} - ${env:Key1}'), 'Value for key1 - '); } });"} {"_id":"doc-en-vscode-293fef48d07c79ad065cbf56bc77f8e585969ba84d1e9d0ba6e22a7d29ffd60e","title":"","text":"let service = new ConfigurationResolverService(envVariables, new TestEditorService(), TestEnvironmentService, configurationService, mockCommandService); if (platform.isWindows) { assert.strictEqual(service.resolve(workspace, 'abc ${config:editor.fontFamily} ${workspaceFolder} ${env:key1} xyz'), 'abc foo VSCodeworkspaceLocation Value for Key1 xyz'); assert.strictEqual(service.resolve(workspace, 'abc ${config:editor.fontFamily} ${workspaceFolder} ${env:key1} xyz'), 'abc foo VSCodeworkspaceLocation Value for key1 xyz'); } else { assert.strictEqual(service.resolve(workspace, 'abc ${config:editor.fontFamily} ${workspaceFolder} ${env:key1} xyz'), 'abc foo /VSCode/workspaceLocation Value for Key1 xyz'); assert.strictEqual(service.resolve(workspace, 'abc ${config:editor.fontFamily} ${workspaceFolder} ${env:key1} xyz'), 'abc foo /VSCode/workspaceLocation Value for key1 xyz'); } });"} {"_id":"doc-en-vscode-c3a0739e01b466f395fcecc6b21454cb348d7a0257dff4bf6c0aa81a2f2e42c5","title":"","text":"let service = new ConfigurationResolverService(envVariables, new TestEditorService(), TestEnvironmentService, configurationService, mockCommandService); if (platform.isWindows) { assert.strictEqual(service.resolve(workspace, '${config:editor.fontFamily} ${config:terminal.integrated.fontFamily} ${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'), 'foo bar VSCodeworkspaceLocation - VSCodeworkspaceLocation Value for Key1 - Value for Key2'); assert.strictEqual(service.resolve(workspace, '${config:editor.fontFamily} ${config:terminal.integrated.fontFamily} ${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'), 'foo bar VSCodeworkspaceLocation - VSCodeworkspaceLocation Value for key1 - Value for key2'); } else { assert.strictEqual(service.resolve(workspace, '${config:editor.fontFamily} ${config:terminal.integrated.fontFamily} ${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'), 'foo bar /VSCode/workspaceLocation - /VSCode/workspaceLocation Value for Key1 - Value for Key2'); assert.strictEqual(service.resolve(workspace, '${config:editor.fontFamily} ${config:terminal.integrated.fontFamily} ${workspaceFolder} - ${workspaceFolder} ${env:key1} - ${env:key2}'), 'foo bar /VSCode/workspaceLocation - /VSCode/workspaceLocation Value for key1 - Value for key2'); } });"} {"_id":"doc-en-vscode-6f4fdd35aace20edd41c41858d64e7a9f6ad49d288199d063756d11f59e543e0","title":"","text":"import {ActionItem, BaseActionItem, Separator} from 'vs/base/browser/ui/actionbar/actionbar'; import {Scope, IActionBarRegistry, Extensions as ActionBarExtensions, ActionBarContributor} from 'vs/workbench/browser/actionBarRegistry'; import {IEditorInputActionContext, IEditorInputAction, EditorInputActionContributor} from 'vs/workbench/browser/parts/editor/baseEditor'; import {AddToWorkingFiles, FocusWorkingFiles, FocusFilesExplorer, OpenPreviousWorkingFile, OpenNextWorkingFile, CloseAllFilesAction, CloseFileAction, CloseOtherFilesAction, GlobalCompareResourcesAction, GlobalNewFolderAction, RevertFileAction, SaveFilesAction, SaveAllAction, SaveFileAction, keybindingForAction, MoveFileToTrashAction, TriggerRenameFileAction, PasteFileAction, CopyFileAction, SelectResourceForCompareAction, CompareResourcesAction, NewFolderAction, NewFileAction, OpenToSideAction, ShowActiveFileInExplorer} from 'vs/workbench/parts/files/browser/fileActions'; import {AddToWorkingFiles, FocusWorkingFiles, FocusFilesExplorer, OpenPreviousWorkingFile, OpenNextWorkingFile, CloseAllFilesAction, CloseFileAction, CloseOtherFilesAction, GlobalCompareResourcesAction, GlobalNewFileAction, GlobalNewFolderAction, RevertFileAction, SaveFilesAction, SaveAllAction, SaveFileAction, keybindingForAction, MoveFileToTrashAction, TriggerRenameFileAction, PasteFileAction, CopyFileAction, SelectResourceForCompareAction, CompareResourcesAction, NewFolderAction, NewFileAction, OpenToSideAction, ShowActiveFileInExplorer} from 'vs/workbench/parts/files/browser/fileActions'; import {RevertLocalChangesAction, AcceptLocalChangesAction, ConflictResolutionDiffEditorInput} from 'vs/workbench/parts/files/browser/saveErrorHandler'; import {SyncActionDescriptor} from 'vs/platform/actions/common/actions'; import {IWorkbenchActionRegistry, Extensions as ActionExtensions} from 'vs/workbench/common/actionRegistry';"} {"_id":"doc-en-vscode-886e9f7c196e8af6e27ed859930872f473fff1f9eff16031ae066c3b1ade8ad8","title":"","text":"registry.registerWorkbenchAction(new SyncActionDescriptor(SaveAllAction, SaveAllAction.ID, SaveAllAction.LABEL), category, ['save', 'all', 'files']); registry.registerWorkbenchAction(new SyncActionDescriptor(SaveFilesAction, SaveFilesAction.ID, null /* only for programmatic trigger */)); registry.registerWorkbenchAction(new SyncActionDescriptor(RevertFileAction, RevertFileAction.ID, RevertFileAction.LABEL), category, ['revert', 'file']); registry.registerWorkbenchAction(new SyncActionDescriptor(GlobalNewFileAction, GlobalNewFileAction.ID, GlobalNewFileAction.LABEL), category, ['new', 'file']); registry.registerWorkbenchAction(new SyncActionDescriptor(GlobalNewFolderAction, GlobalNewFolderAction.ID, GlobalNewFolderAction.LABEL), category, ['new', 'folder']); registry.registerWorkbenchAction(new SyncActionDescriptor(GlobalCompareResourcesAction, GlobalCompareResourcesAction.ID, GlobalCompareResourcesAction.LABEL), category, ['compare', 'files']); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseFileAction, CloseFileAction.ID, CloseFileAction.LABEL, { primary: KeyMod.chord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_W) }), category, ['close', 'file']);"} {"_id":"doc-en-vscode-e5d955fd0a287417a0c575d25db454f65f05b915596f56bcee143fbff5e76014","title":"","text":"} /* Create new file from anywhere: Open untitled */ export class GlobalNewFileAction extends Action { export class GlobalNewUntitledFileAction extends Action { public static ID = 'workbench.action.files.newUntitledFile'; public static LABEL = nls.localize('newFile', \"New File\"); public static LABEL = nls.localize('newUntitledFile', \"New Untitled File\"); constructor( id: string,"} {"_id":"doc-en-vscode-04cee68cce2c3ae96e003aa2c676b0acf5cb3d758893b665ad8b77655a562254","title":"","text":"} } /* Create new file from anywhere */ export class GlobalNewFileAction extends BaseGlobalNewAction { public static ID = 'workbench.action.files.newFile'; public static LABEL = nls.localize('newFile', \"New File\"); protected getAction(): IConstructorSignature2 { return NewFileAction; } } /* Create new folder from anywhere */ export class GlobalNewFolderAction extends BaseGlobalNewAction { public static ID = 'workbench.action.files.newFolder';"} {"_id":"doc-en-vscode-8d607363ac191aba4b63fc3a8a5a0d88c1a8189b46758561e64b24013f2f275b","title":"","text":"export function keybindingForAction(id: string): Keybinding { switch (id) { case GlobalNewFileAction.ID: case GlobalNewUntitledFileAction.ID: return new Keybinding(KeyMod.CtrlCmd | KeyCode.KEY_N); case TriggerRenameFileAction.ID: return new Keybinding(isMacintosh ? KeyCode.Enter : KeyCode.F2);"} {"_id":"doc-en-vscode-4f52c7b4e0a5e948738660abf195545b7029873ea914d9df28b4c4b7d1c48cca","title":"","text":"import env = require('vs/base/common/platform'); import {ITextFileService, asFileResource} from 'vs/workbench/parts/files/common/files'; import {IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions} from 'vs/workbench/common/contributions'; import {GlobalNewFileAction, SaveFileAsAction} from 'vs/workbench/parts/files/browser/fileActions'; import {GlobalNewUntitledFileAction, SaveFileAsAction} from 'vs/workbench/parts/files/browser/fileActions'; import {FileTracker} from 'vs/workbench/parts/files/electron-browser/electronFileTracker'; import {TextFileService} from 'vs/workbench/parts/files/electron-browser/textFileServices'; import {OpenFolderAction, OPEN_FOLDER_ID, OPEN_FOLDER_LABEL, OpenFileAction, OPEN_FILE_ID, OPEN_FILE_LABEL, OpenFileFolderAction, OPEN_FILE_FOLDER_ID, OPEN_FILE_FOLDER_LABEL, ShowOpenedFileInNewWindow, GlobalRevealInOSAction, GlobalCopyPathAction, CopyPathAction, RevealInOSAction} from 'vs/workbench/parts/files/electron-browser/electronFileActions';"} {"_id":"doc-en-vscode-baa8bb0f5b0b9f99efe88b25e7f2a2dcf59decdb9598dfd4de1040c9fa6c3a77","title":"","text":"let workbenchActionsRegistry = Registry.as(ActionExtensions.WorkbenchActions); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(SaveFileAsAction, SaveFileAsAction.ID, SaveFileAsAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_S }), category, ['save', 'as']); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(GlobalNewFileAction, GlobalNewFileAction.ID, GlobalNewFileAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_N }), category, ['new', 'file']); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(GlobalNewUntitledFileAction, GlobalNewUntitledFileAction.ID, GlobalNewUntitledFileAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_N }), category, ['new', 'untitled', 'file']); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(GlobalCopyPathAction, GlobalCopyPathAction.ID, GlobalCopyPathAction.LABEL, { primary: KeyMod.chord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_P) }), category, ['copy', 'path']); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(GlobalRevealInOSAction, GlobalRevealInOSAction.ID, GlobalRevealInOSAction.LABEL, { primary: KeyMod.chord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_R) }), category, ['reveal', 'file']);"} {"_id":"doc-en-vscode-b9a9ac15a16cabf47efed396297d1105a97ee673e1021240101013d7c0ff2a22","title":"","text":"const DEFAULT_WINDOWS_FONT_FAMILY = 'Consolas, 'Courier New', monospace'; const DEFAULT_MAC_FONT_FAMILY = 'Menlo, Monaco, 'Courier New', monospace'; const DEFAULT_LINUX_FONT_FAMILY = ''Droid Sans Mono', 'Courier New', monospace, 'Droid Sans Fallback''; const DEFAULT_LINUX_FONT_FAMILY = ''Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback''; /** * @internal"} {"_id":"doc-en-vscode-e3d840364057c4c6b72eb5390d01e51ab228e38cc319b071f941ffba0cd42dd5","title":"","text":"[\"(\", \")\"] ], \"autoClosingPairs\": [ [\"{\", \"}\"], [\"[\", \"]\"], [\"(\", \")\"], [\"\"\", \"\"\"], [\"'\", \"'\"] { \"open\": \"{\", \"close\": \"}\" }, { \"open\": \"[\", \"close\": \"]\" }, { \"open\": \"(\", \"close\": \")\" }, { \"open\": \"\"\", \"close\": \"\"\", \"notIn\": [\"string\"] }, { \"open\": \"'\", \"close\": \"'\", \"notIn\": [\"string\", \"comment\"] } ], \"surroundingPairs\": [ [\"{\", \"}\"],"} {"_id":"doc-en-vscode-851ea51d4258ee37cb573693a75af15bf078f1416b182d1a48271e3aced58983","title":"","text":"import * as nls from 'vs/nls'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import { isLowSurrogate, isHighSurrogate } from 'vs/base/common/strings'; import { Range } from 'vs/editor/common/core/range'; import { Position, IPosition } from 'vs/editor/common/core/position'; import { ICommand } from 'vs/editor/common/editorCommon'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { registerEditorAction, EditorAction, ServicesAccessor } from 'vs/editor/browser/editorExtensions'; import { ReplaceCommand } from 'vs/editor/common/commands/replaceCommand'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { ITextModel } from 'vs/editor/common/model'; class TransposeLettersAction extends EditorAction { private positionLeftOf(start: IPosition, model: ITextModel): Position { let column = start.column; let lineNumber = start.lineNumber; if (column > model.getLineMinColumn(lineNumber)) { if (isLowSurrogate(model.getLineContent(lineNumber).charCodeAt(column - 2))) { // character before column is a low surrogate column = column - 2; } else { column = column - 1; } } else if (lineNumber > 1) { lineNumber = lineNumber - 1; column = model.getLineMaxColumn(lineNumber); } return new Position(lineNumber, column); } private positionRightOf(start: IPosition, model: ITextModel): Position { let column = start.column; let lineNumber = start.lineNumber; if (column < model.getLineMaxColumn(lineNumber)) { if (isHighSurrogate(model.getLineContent(lineNumber).charCodeAt(column - 1))) { // character after column is a high surrogate column = column + 2; } else { column = column + 1; } } else if (lineNumber < model.getLineCount()) { lineNumber = lineNumber + 1; column = 0; } return new Position(lineNumber, column); } constructor() { super({ id: 'editor.action.transposeLetters',"} {"_id":"doc-en-vscode-2ea66afdef2fd9302b06315db745ffaaae4a6fc1897e89774d931389000a4a32","title":"","text":"let commands: ICommand[] = []; let selections = editor.getSelections(); for (let i = 0; i < selections.length; i++) { let selection = selections[i]; for (let selection of selections) { if (!selection.isEmpty()) { continue; } let lineNumber = selection.startLineNumber; let column = selection.startColumn; if (column === 1) { // at the beginning of line continue; } let maxColumn = model.getLineMaxColumn(lineNumber); if (column === maxColumn) { // at the end of line let lastColumn = model.getLineMaxColumn(lineNumber); if (lineNumber === 1 && (column === 1 || (column === 2 && lastColumn === 2))) { // at beginning of file, nothing to do continue; } let lineContent = model.getLineContent(lineNumber); let charToTheLeft = lineContent.charAt(column - 2); let charToTheRight = lineContent.charAt(column - 1); // handle special case: when at end of line, transpose left two chars // otherwise, transpose left and right chars let endPosition = (column === lastColumn) ? selection.getPosition() : this.positionRightOf(selection.getPosition(), model); let middlePosition = this.positionLeftOf(endPosition, model); let beginPosition = this.positionLeftOf(middlePosition, model); let replaceRange = new Range(lineNumber, column - 1, lineNumber, column + 1); let leftChar = model.getValueInRange(Range.fromPositions(beginPosition, middlePosition)); let rightChar = model.getValueInRange(Range.fromPositions(middlePosition, endPosition)); commands.push(new ReplaceCommand(replaceRange, charToTheRight + charToTheLeft)); let replaceRange = Range.fromPositions(beginPosition, endPosition); commands.push(new ReplaceCommand(replaceRange, rightChar + leftChar)); } if (commands.length > 0) {"} {"_id":"doc-en-vscode-c73ee8d9c77724944e3b4b165399535af56d978d9462e30f8b43e41c345fd96d","title":"","text":"import DOM = require('vs/base/browser/dom'); import URI from 'vs/base/common/uri'; import errors = require('vs/base/common/errors'); import {RunOnceScheduler} from 'vs/base/common/async'; import {isMacintosh} from 'vs/base/common/platform'; import {IWorkbenchEditorService} from 'vs/workbench/services/editor/common/editorService'; import {IContextMenuService} from 'vs/platform/contextview/browser/contextView';"} {"_id":"doc-en-vscode-ec0b5d257df7c0ec82090efdb90c8449ef0ab10bcf96b1892ca3b25cbc5a122c","title":"","text":"private _onGroupFocusChanged: Emitter; private onStacksChangeScheduler: RunOnceScheduler; private stacksChangedBuffer: IStacksModelChangeEvent[]; private toDispose: IDisposable[]; constructor("} {"_id":"doc-en-vscode-bcd82d958d5c5b191cd504371d82bd2bbbbd1847222464f637104a318df71f11","title":"","text":"@IInstantiationService private instantiationService: IInstantiationService ) { this.stacks = editorGroupService.getStacksModel(); this.toDispose = []; this.parent = parent; this.dimension = new Dimension(0, 0);"} {"_id":"doc-en-vscode-45fcbe9b6048fdc442f0b6b018e8401bbaee1395bc4d02b4a6a1dda7d0940d59","title":"","text":"this._onGroupFocusChanged = new Emitter(); this.toDispose = []; this.onStacksChangeScheduler = new RunOnceScheduler(() => this.handleStacksChanged(), 0); this.toDispose.push(this.onStacksChangeScheduler); this.stacksChangedBuffer = []; this.create(this.parent); this.registerListeners();"} {"_id":"doc-en-vscode-315b129da66e604ddcd80716c271b05c9b947bf4ad3fd486a9887397aa193288","title":"","text":"} private onStacksChanged(e: IStacksModelChangeEvent): void { this.stacksChangedBuffer.push(e); this.onStacksChangeScheduler.schedule(); } private handleStacksChanged(): void { // Up to date context // Read and reset buffer of events const buffer = this.stacksChangedBuffer; this.stacksChangedBuffer = []; // Up to date context for all title controls POSITIONS.forEach(position => { this.getTitleAreaControl(position).setContext(this.stacks.groupAt(position)); const titleAreaControl = this.getTitleAreaControl(position); const context = this.stacks.groupAt(position); titleAreaControl.setContext(context); if (!context) { titleAreaControl.refresh(); // clear out the control if the context is no longer present } }); // Refresh / update if group is visible and has a position const position = this.stacks.positionOfGroup(e.group); if (position >= 0) { if (e.structural) { this.getTitleAreaControl(position).refresh(); } else { this.getTitleAreaControl(position).update(); buffer.forEach(e => { const position = this.stacks.positionOfGroup(e.group); if (position >= 0) { // group could be gone by now because we run from a scheduler with timeout if (e.structural) { this.getTitleAreaControl(position).refresh(); } else { this.getTitleAreaControl(position).update(); } } } }); } public get onGroupFocusChanged(): Event {"} {"_id":"doc-en-vscode-48de79e981715386436ba82998ec672f1d697ec3c9082a80f41a716e63402dc8","title":"","text":"private rochade(from: Position, to: Position): void { // Move editor to new position // Move container to new position const containerFrom = this.silos[from].child(); containerFrom.appendTo(this.silos[to]); const containerTo = this.silos[to].child(); containerTo.appendTo(this.silos[from]); // Inform editor const editor = this.visibleEditors[from]; editor.getContainer().offDOM().build(this.silos[to].child()); editor.changePosition(to); // Change data structures"} {"_id":"doc-en-vscode-e45dd22f022d255928bc53b29e3fcea89aea6352948c86587d7bf878f54d5744","title":"","text":"// Distance 1: Swap Editors if (Math.abs(from - to) === 1) { // Move editors to new position let editorPos1 = this.visibleEditors[from]; editorPos1.getContainer().offDOM().build(this.silos[to].child()); editorPos1.changePosition(to); // Move containers to new position const containerFrom = this.silos[from].child(); containerFrom.appendTo(this.silos[to]); const containerTo = this.silos[to].child(); containerTo.appendTo(this.silos[from]); let editorPos2 = this.visibleEditors[to]; editorPos2.getContainer().offDOM().build(this.silos[from].child()); editorPos2.changePosition(from); // Inform Editors this.visibleEditors[from].changePosition(to); this.visibleEditors[to].changePosition(from); // Update last active position accordingly if (this.lastActivePosition === from) {"} {"_id":"doc-en-vscode-33c68e16e9b77f95560f12079069e7945de731a1923cbe30a24fd9b4706a08fa","title":"","text":"newRightPosition = Position.LEFT; } // Move editors to new position let editorPos1 = this.visibleEditors[Position.LEFT]; editorPos1.getContainer().offDOM().build(this.silos[newLeftPosition].child()); editorPos1.changePosition(newLeftPosition); // Move containers to new position const containerPos1 = this.silos[Position.LEFT].child(); containerPos1.appendTo(this.silos[newLeftPosition]); let editorPos2 = this.visibleEditors[Position.CENTER]; editorPos2.getContainer().offDOM().build(this.silos[newCenterPosition].child()); editorPos2.changePosition(newCenterPosition); const containerPos2 = this.silos[Position.CENTER].child(); containerPos2.appendTo(this.silos[newCenterPosition]); const editorPos3 = this.visibleEditors[Position.RIGHT]; editorPos3.getContainer().offDOM().build(this.silos[newRightPosition].child()); editorPos3.changePosition(newRightPosition); const containerPos3 = this.silos[Position.RIGHT].child(); containerPos3.appendTo(this.silos[newRightPosition]); // Inform Editors this.visibleEditors[Position.LEFT].changePosition(newLeftPosition); this.visibleEditors[Position.CENTER].changePosition(newCenterPosition); this.visibleEditors[Position.RIGHT].changePosition(newRightPosition); // Update last active position accordingly if (this.lastActivePosition === Position.LEFT) {"} {"_id":"doc-en-vscode-c20411fcc6cd86776507e407196f88b03fb6ddc13b966055f6ca0d3c1801ec92","title":"","text":"const titleAreaControl = instantiationService.createInstance(useTabs ? TabsTitleControl : NoTabsTitleControl); titleAreaControl.create(container.getHTMLElement()); titleAreaControl.setContext(context); titleAreaControl.refresh(); titleAreaControl.refresh(true /* instant */); silo.child().setProperty(SideBySideEditorControl.TITLE_AREA_CONTROL_KEY, titleAreaControl); // associate with container }"} {"_id":"doc-en-vscode-172fbfb6d6d78927b60556b2704de9e323b3898c2451ac4b01c89e7ecc7e55d1","title":"","text":"// Move to valid position if any if (moveTo !== null) { this.editorGroupService.moveGroup(position, moveTo); // To reduce flickering during this operation we trigger a refresh of all // title controls right after. POSITIONS.forEach(p => { this.getTitleAreaControl(p).refresh(true); }); } // Otherwise layout to restore proper positioning"} {"_id":"doc-en-vscode-3e00c0904a6d33a98f605205beb5195914ac4591e6b25546cc5b6cf55c720f27","title":"","text":"private _readOnly: boolean; private _cursorBlinking: editorCommon.TextEditorCursorBlinkingStyle; private _cursorStyle: editorCommon.TextEditorCursorStyle; private _canUseTranslate3d: boolean; private _isVisible: boolean;"} {"_id":"doc-en-vscode-9375428133b0926a8ef2cfe55ac5014f86b211f9dd395a083ed9c4d9aacc9d32","title":"","text":"this._readOnly = this._context.configuration.editor.readOnly; this._cursorBlinking = this._context.configuration.editor.viewInfo.cursorBlinking; this._cursorStyle = this._context.configuration.editor.viewInfo.cursorStyle; this._canUseTranslate3d = context.configuration.editor.viewInfo.canUseTranslate3d; this._primaryCursor = new ViewCursor(this._context, false); this._secondaryCursors = [];"} {"_id":"doc-en-vscode-83badf54dd37e4fa2adf08d08f2145902793d9c1678080819b9300e7199f5733","title":"","text":"if (e.viewInfo.cursorStyle) { this._cursorStyle = this._context.configuration.editor.viewInfo.cursorStyle; } if (e.viewInfo.canUseTranslate3d) { this._canUseTranslate3d = this._context.configuration.editor.viewInfo.canUseTranslate3d; } this._primaryCursor.onConfigurationChanged(e); this._updateBlinking();"} {"_id":"doc-en-vscode-b048ebc4756d89cbda61340fece47c463437edc831f4cf54b1dd2574d9ceaf79","title":"","text":"for (var i = 0, len = this._secondaryCursors.length; i < len; i++) { this._secondaryCursors[i].render(ctx); } if (this._canUseTranslate3d) { this._domNode.setTransform('translate3d(0px, 0px, 0px)'); } else { this._domNode.setTransform(''); } } }"} {"_id":"doc-en-vscode-51e66fd831cfd96d1a906f542012752e5ad81b0fd8a1bfe736f09d2b03dd3916","title":"","text":"\"type\": \"object\", \"order\": 20, \"properties\": { \"php.builtInCompletions.enable\": { \"type\": \"boolean\", \"default\": true, \"description\": \"%configuration.builtInCompletions.enable%\" }, \"php.validate.enable\": { \"type\": \"boolean\", \"default\": true,"} {"_id":"doc-en-vscode-5de86772850d79bd864b804f365469c3a34ee7c4414773d68fd6d7e6c9e92dd6","title":"","text":"{ \"configuration.validate.enable\": \"Whether php validation is enabled or not.\", \"configuration.validate.executablePath\": \"Points to the php executable.\", \"configuration.builtInCompletions.enable\": \"Enable/disable built-in PHP completions.\", \"configuration.validate.enable\": \"Enable/disable built-in PHP validation.\", \"configuration.validate.executablePath\": \"Points to the PHP executable.\", \"configuration.validate.run\": \"Whether the linter is run on save or on type.\", \"configuration.title\": \"PHP\" } No newline at end of file"} {"_id":"doc-en-vscode-1d53816905e23850e05c090e3a3c2eb0dea951806b45128a6909e660062e42e2","title":"","text":"'use strict'; import { CompletionItemProvider, CompletionItem, CompletionItemKind, CancellationToken, TextDocument, Position, Range, TextEdit } from 'vscode'; import { CompletionItemProvider, CompletionItem, CompletionItemKind, CancellationToken, TextDocument, Position, Range, TextEdit, workspace } from 'vscode'; import phpGlobals = require('./phpGlobals'); export default class PHPCompletionItemProvider implements CompletionItemProvider {"} {"_id":"doc-en-vscode-94dfb8e3f7f05ccd8c1df7c9feac4588da5122e29758c37a514138a1801137dd","title":"","text":"public provideCompletionItems(document: TextDocument, position: Position, token: CancellationToken): Promise { let result: CompletionItem[] = []; let shouldProvideCompletionItems = workspace.getConfiguration('php').get('builtInCompletions.enable', true); if (!shouldProvideCompletionItems) { return Promise.resolve(result); } var range = document.getWordRangeAtPosition(position); var prefix = range ? document.getText(range) : ''; if (!range) {"} {"_id":"doc-en-vscode-6126fe677ef4a9a5aea26612f8f1ba5618e37d1a9a0366d12637a75a126d77f9","title":"","text":"'editor.snippetSuggestions', 'editor.selectionHighlight', 'editor.glyphMargin', 'php.validate.run', 'editor.wordSeparators', 'editor.mouseWheelScrollSensitivity', 'editor.suggestOnTriggerCharacters',"} {"_id":"doc-en-vscode-7aa3d938088b297be1b2aeb719911b70aae5c1ccccd4322f4be8a491b6522f05","title":"","text":"'editor.trimAutoWhitespace', 'editor.folding', 'workbench.editor.enablePreviewFromQuickOpen', 'php.builtInCompletions.enable', 'php.validate.enable', 'php.validate.run', 'editor.parameterHints', ];"} {"_id":"doc-en-vscode-ded098187ac899f31765b3248ce78f226c16c1b366a5e1fc44f0e1dfca5f5616","title":"","text":" (^|G)(?!s*$|#|[ ]{0,3}((([-*_][ ]{0,2}2){2,}[ t]*$n?)|([*+-]([ ]{1,3}|t)))|s*[.+?]:|>) (^|G)(?!s*$|#|[ ]{0,3}((([*_][ ]{0,2}2){2,}[ t]*$n?)|([*+-]([ ]{1,3}|t)))|s*[.+?]:|>) raw_block "} {"_id":"doc-en-vscode-28d2f2b0eecefb6fe92e41a189ad036acb00dfec7f41fdfcd3e08f067b876560","title":"","text":"separator match (^|G)[ ]{0,3}([-*_])([ ]{0,2}2){2,}[ t]*$n? (^|G)[ ]{0,3}([*-_])([ ]{0,2}2){2,}[ t]*$n? name meta.separator.markdown "} {"_id":"doc-en-vscode-930a48a540c2bcdff868f82bb75a7551f882af929ab6d750dd9b5dd1e6d84c81","title":"","text":"## Markdown plus h2 with a custom ID ## {#id-goes-here} [Link back to H2](#id-goes-here) ### Alternate heading styles: Alternate Header 1 ================== Alternate Header 2 ------------------
"} {"_id":"doc-en-vscode-e083c5c5842d93a394a82b831074f1046978d1ddb1f0337200a14b40b8e5fa94","title":"","text":"} }, { \"c\": \"###\", \"t\": \"${1/(#)(#)?(#)?(#)?(#)?(#)?/${6:?6:${5:?5:${4:?4:${3:?3:${2:?2:1}}}}}/}.definition.heading.markdown.markup.punctuation\", \"r\": { \"dark_plus\": \".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.markup.heading rgb(86, 156, 214)\", \"light_plus\": \".vs.vscode-theme-defaults-themes-light_plus-json .token.markup.heading rgb(128, 0, 0)\", \"dark_vs\": \".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.markup.heading rgb(86, 156, 214)\", \"light_vs\": \".vs.vscode-theme-defaults-themes-light_vs-json .token.markup.heading rgb(128, 0, 0)\", \"hc_black\": \".hc-black.vscode-theme-defaults-themes-hc_black-json .token.markup.heading rgb(103, 150, 230)\" } }, { \"c\": \" \", \"t\": \"${1/(#)(#)?(#)?(#)?(#)?(#)?/${6:?6:${5:?5:${4:?4:${3:?3:${2:?2:1}}}}}/}.heading.markdown.markup\", \"r\": { \"dark_plus\": \".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.markup.heading rgb(86, 156, 214)\", \"light_plus\": \".vs.vscode-theme-defaults-themes-light_plus-json .token.markup.heading rgb(128, 0, 0)\", \"dark_vs\": \".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.markup.heading rgb(86, 156, 214)\", \"light_vs\": \".vs.vscode-theme-defaults-themes-light_vs-json .token.markup.heading rgb(128, 0, 0)\", \"hc_black\": \".hc-black.vscode-theme-defaults-themes-hc_black-json .token.markup.heading rgb(103, 150, 230)\" } }, { \"c\": \"Alternate heading styles:\", \"t\": \"${1/(#)(#)?(#)?(#)?(#)?(#)?/${6:?6:${5:?5:${4:?4:${3:?3:${2:?2:1}}}}}/}.entity.heading.markdown.markup.name.section\", \"r\": { \"dark_plus\": \".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.markup.heading rgb(86, 156, 214)\", \"light_plus\": \".vs.vscode-theme-defaults-themes-light_plus-json .token.markup.heading rgb(128, 0, 0)\", \"dark_vs\": \".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.markup.heading rgb(86, 156, 214)\", \"light_vs\": \".vs.vscode-theme-defaults-themes-light_vs-json .token.markup.heading rgb(128, 0, 0)\", \"hc_black\": \".hc-black.vscode-theme-defaults-themes-hc_black-json .token.markup.heading rgb(103, 150, 230)\" } }, { \"c\": \"Alternate Header 1\", \"t\": \"markdown.meta.paragraph\", \"r\": { \"dark_plus\": \".vs-dark .token rgb(212, 212, 212)\", \"light_plus\": \".vs .token rgb(0, 0, 0)\", \"dark_vs\": \".vs-dark .token rgb(212, 212, 212)\", \"light_vs\": \".vs .token rgb(0, 0, 0)\", \"hc_black\": \".hc-black .token rgb(255, 255, 255)\" } }, { \"c\": \"==================\", \"t\": \"1.heading.markdown.markup.meta.paragraph.setext\", \"r\": { \"dark_plus\": \".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.markup.heading rgb(86, 156, 214)\", \"light_plus\": \".vs.vscode-theme-defaults-themes-light_plus-json .token.markup.heading rgb(128, 0, 0)\", \"dark_vs\": \".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.markup.heading rgb(86, 156, 214)\", \"light_vs\": \".vs.vscode-theme-defaults-themes-light_vs-json .token.markup.heading rgb(128, 0, 0)\", \"hc_black\": \".hc-black.vscode-theme-defaults-themes-hc_black-json .token.markup.heading rgb(103, 150, 230)\" } }, { \"c\": \"Alternate Header 2\", \"t\": \"markdown.meta.paragraph\", \"r\": { \"dark_plus\": \".vs-dark .token rgb(212, 212, 212)\", \"light_plus\": \".vs .token rgb(0, 0, 0)\", \"dark_vs\": \".vs-dark .token rgb(212, 212, 212)\", \"light_vs\": \".vs .token rgb(0, 0, 0)\", \"hc_black\": \".hc-black .token rgb(255, 255, 255)\" } }, { \"c\": \"------------------\", \"t\": \"2.heading.markdown.markup.meta.paragraph.setext\", \"r\": { \"dark_plus\": \".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.markup.heading rgb(86, 156, 214)\", \"light_plus\": \".vs.vscode-theme-defaults-themes-light_plus-json .token.markup.heading rgb(128, 0, 0)\", \"dark_vs\": \".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.markup.heading rgb(86, 156, 214)\", \"light_vs\": \".vs.vscode-theme-defaults-themes-light_vs-json .token.markup.heading rgb(128, 0, 0)\", \"hc_black\": \".hc-black.vscode-theme-defaults-themes-hc_black-json .token.markup.heading rgb(103, 150, 230)\" } }, { \"c\": \"\"], [\"<\", \">\"], [\"{\", \"}\"], [\"(\", \")\"] ],"} {"_id":"doc-en-vscode-ba625fc3acee476cdb866320acef39dae0c4f0a6c7205b49b8a558184ed10007","title":"","text":"\"@vscode/l10n\": \"^0.0.11\", \"jsonc-parser\": \"^3.2.0\", \"request-light\": \"^0.7.0\", \"vscode-json-languageservice\": \"^5.3.1\", \"vscode-json-languageservice\": \"^5.3.2\", \"vscode-languageserver\": \"^8.1.0\", \"vscode-uri\": \"^3.0.7\" },"} {"_id":"doc-en-vscode-ea63b7ef322f061634bb2df99509cb1836822b9e0a0ccc7b0537466a81b1eafe","title":"","text":"resolved \"https://registry.yarnpkg.com/request-light/-/request-light-0.7.0.tgz#885628bb2f8040c26401ebf258ec51c4ae98ac2a\" integrity sha512-lMbBMrDoxgsyO+yB3sDcrDuX85yYt7sS8BfQd11jtbW/z5ZWgLZRcEGLsLoYw7I0WSUGQBs8CC8ScIxkTX1+6Q== vscode-json-languageservice@^5.3.1: version \"5.3.1\" resolved \"https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-5.3.1.tgz#c36175d05f425fbd8f47dcee6f2a72096bdda36f\" integrity sha512-tPRf/2LOBS6uFflFLABdj8T3ol2/QgZ0kpzZHFCs+cbxpnjBNiCo+rfh3th0dtdytq5dSnWo5iFJj99zF6jZWQ== vscode-json-languageservice@^5.3.2: version \"5.3.2\" resolved \"https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-5.3.2.tgz#11e530ba9ec541eaeb421dc274a22efdb5d580ef\" integrity sha512-5td6olfoNdtyxnNA4uocq7V9jdTJt63o9mGEntQb6cbD2HiObZW2XgbSj6nRaebWwBCiYdWpFklNjm6Wz6Xy1Q== dependencies: \"@vscode/l10n\" \"^0.0.11\" jsonc-parser \"^3.2.0\""} {"_id":"doc-en-vscode-f214aa7873f62485bc2a50a57b22049161da64587de277f7e8423075fdc69ad7","title":"","text":"} } private async selectStep(id: string | undefined, delayFocus = true, forceRebuild = false) { if (id && this.editorInput.selectedStep === id && !forceRebuild) { return; } private async selectStep(id: string | undefined, delayFocus = true) { if (id && this.editorInput.selectedStep === id) { return; } if (id) { let stepElement = this.container.querySelector(`[data-step-id=\"${id}\"]`);"} {"_id":"doc-en-vscode-d87e85a1a9977e888371e4fd8a37e7fee61d608a9769169d23dd5f5c5ccee870","title":"","text":"if (event.keyCode === KeyCode.UpArrow) { const toExpand = category.steps.filter((step, index) => index < currentStepIndex() && this.contextService.contextMatchesRules(step.when)); if (toExpand.length) { this.selectStep(toExpand[toExpand.length - 1].id, false, false); this.selectStep(toExpand[toExpand.length - 1].id, false); } } if (event.keyCode === KeyCode.DownArrow) { const toExpand = category.steps.find((step, index) => index > currentStepIndex() && this.contextService.contextMatchesRules(step.when)); if (toExpand) { this.selectStep(toExpand.id, false, false); this.selectStep(toExpand.id, false); } } }));"} {"_id":"doc-en-vscode-a96e5953f6a11d6d943b72cd3efedc92418439e4d3c1ead58b2c3a98186fff17","title":"","text":"if (e.affectsSome(contextKeysToWatch)) { buildStepList(); this.registerDispatchListeners(); this.selectStep(this.editorInput.selectedStep, false, true); this.selectStep(this.editorInput.selectedStep, false); } }));"} {"_id":"doc-en-vscode-b94ef156216fdd45ecfd35f8f4cfb276c699d2a9a7188b3651bbd044b34457ba","title":"","text":"reset(this.stepsContent, categoryDescriptorComponent, stepListComponent, this.stepMediaComponent, categoryFooter); const toExpand = category.steps.find(step => this.contextService.contextMatchesRules(step.when) && !step.done) ?? category.steps[0]; this.selectStep(selectedStep ?? toExpand.id, !selectedStep, true); this.selectStep(selectedStep ?? toExpand.id, !selectedStep); this.detailsScrollbar.scanDomNode(); this.detailsPageScrollbar?.scanDomNode();"} {"_id":"doc-en-vscode-aa47c369b7dbed8478d5cb657452eb0315cbbc8002f179188dca9119482831f5","title":"","text":"if (!this._updateCustomBuiltinExtensionsCachePromise) { this._updateCustomBuiltinExtensionsCachePromise = (async () => { this.logService.info('Updating additional builtin extensions cache'); const cached = await this.getCustomBuiltinExtensionsFromCache(); const webExtensions: IWebExtension[] = []; const { extensions } = await this.readCustomBuiltinExtensionsInfoFromEnv(); if (extensions.length) {"} {"_id":"doc-en-vscode-b6d2bd6ba9e96e59e294d328dd6f74817255079b915e81ade1a96711b290f22d","title":"","text":"} await Promise.all([...galleryExtensionsMap.values()].map(async gallery => { try { const webExtension = cached.find(e => areSameExtensions(e.identifier, gallery.identifier) && e.version === gallery.version) ?? await this.toWebExtensionFromGallery(gallery, { isPreReleaseVersion: gallery.properties.isPreReleaseVersion, preRelease: gallery.properties.isPreReleaseVersion, isBuiltin: true }); const webExtension = await this.toWebExtensionFromGallery(gallery, { isPreReleaseVersion: gallery.properties.isPreReleaseVersion, preRelease: gallery.properties.isPreReleaseVersion, isBuiltin: true }); webExtensions.push(webExtension); } catch (error) { this.logService.info(`Ignoring additional builtin extension ${gallery.identifier.id} because there is an error while converting it into web extension`, getErrorMessage(error));"} {"_id":"doc-en-vscode-ec7414f16ced6e781838a215bad3849db816c1ff0c373dbb5d3ec1b8c38439af","title":"","text":"MonacoEditorSchemas['http://opentools.azurewebsites.net/jsconfig'] = { 'title': nls.localize('jsconfig.json.title', \"JSON schema for the JavaScript configuration file\"), 'type': 'object', 'default': { 'compilerOptions': { 'target': 'ES5' } }, 'default': { 'compilerOptions': { 'target': 'ES6' } }, 'properties': { 'compilerOptions': { 'type': 'object',"} {"_id":"doc-en-vscode-7f59bbc6e160bfac844199413733799549a5357b639dae3d3e3782c7f21a2b59","title":"","text":"this._compilerOptions = options || ts.getDefaultCompilerOptions(); this._compilerOptions.allowNonTsExtensions = true; // because of JS* and mirror model we need this this._compilerOptions.module = ts.ModuleKind.CommonJS; // because of JS* this._compilerOptions.target = options && options.target !== undefined ? options.target : ts.ScriptTarget.Latest; // because of JS* } getCompilationSettings(): ts.CompilerOptions {"} {"_id":"doc-en-vscode-9f3457ececeac85ba3202e9e571925e4040288bd0f5bb768533c5ed62c6c6775","title":"","text":"WindowsEnableConpty = 'terminal.integrated.windowsEnableConpty', WordSeparators = 'terminal.integrated.wordSeparators', EnableFileLinks = 'terminal.integrated.enableFileLinks', AllowedLinkSchemes = 'terminal.integrated.allowedLinkSchemes', UnicodeVersion = 'terminal.integrated.unicodeVersion', LocalEchoLatencyThreshold = 'terminal.integrated.localEchoLatencyThreshold', LocalEchoEnabled = 'terminal.integrated.localEchoEnabled',"} {"_id":"doc-en-vscode-77c9c9c85b8e9394cffdab22f0e044dcf72177571275f5a448d1f0f96754523c","title":"","text":"windowsEnableConpty: boolean; wordSeparators: string; enableFileLinks: 'off' | 'on' | 'notRemote'; allowedLinkSchemes: string[]; unicodeVersion: '6' | '11'; localEchoLatencyThreshold: number; localEchoExcludePrograms: ReadonlyArray;"} {"_id":"doc-en-vscode-d9b31eb87342a7218983fb6263d8c9ec43b0ea9e8ddccf938f8100cd29884f67","title":"","text":"], default: 'on' }, [TerminalSettingId.AllowedLinkSchemes]: { description: localize('terminal.integrated.allowedLinkSchemes', \"An array of strings containing the URI schemes that the terminal is allowed to open links for. By default, only a small subset of possible schemes are allowed for security reasons.\"), type: 'array', items: { type: 'string' }, default: [ 'file', 'http', 'https', 'mailto', 'vscode', 'vscode-insiders', ] }, [TerminalSettingId.UnicodeVersion]: { type: 'string', enum: ['6', '11'],"} {"_id":"doc-en-vscode-6ac9ce154ff877ea29a10a972bf3a9ad4d03abca296eedcc45c6183d29227b4e","title":"","text":"import { TerminalLocalLinkDetector } from 'vs/workbench/contrib/terminalContrib/links/browser/terminalLocalLinkDetector'; import { TerminalUriLinkDetector } from 'vs/workbench/contrib/terminalContrib/links/browser/terminalUriLinkDetector'; import { TerminalWordLinkDetector } from 'vs/workbench/contrib/terminalContrib/links/browser/terminalWordLinkDetector'; import { ITerminalExternalLinkProvider, TerminalLinkQuickPickEvent } from 'vs/workbench/contrib/terminal/browser/terminal'; import { ITerminalConfigurationService, ITerminalExternalLinkProvider, TerminalLinkQuickPickEvent } from 'vs/workbench/contrib/terminal/browser/terminal'; import { ILinkHoverTargetOptions, TerminalHover } from 'vs/workbench/contrib/terminal/browser/widgets/terminalHoverWidget'; import { TerminalWidgetManager } from 'vs/workbench/contrib/terminal/browser/widgets/widgetManager'; import { IXtermCore } from 'vs/workbench/contrib/terminal/browser/xterm-private';"} {"_id":"doc-en-vscode-064371c622e9f5c8c7105430cb32eca3a5006dbf2998e0deb6279d4fd6032499","title":"","text":"import { RunOnceScheduler } from 'vs/base/common/async'; import { ITerminalLogService } from 'vs/platform/terminal/common/terminal'; import { TerminalMultiLineLinkDetector } from 'vs/workbench/contrib/terminalContrib/links/browser/terminalMultiLineLinkDetector'; import { INotificationService, Severity } from 'vs/platform/notification/common/notification'; export type XtermLinkMatcherHandler = (event: MouseEvent | undefined, link: string) => Promise;"} {"_id":"doc-en-vscode-14e98ba5012674e2a2f7393e9a03567b722a542db807046da31e0ed78c8c89ea","title":"","text":"capabilities: ITerminalCapabilityStore, private readonly _linkResolver: ITerminalLinkResolver, @IConfigurationService private readonly _configurationService: IConfigurationService, @ITerminalConfigurationService private readonly _terminalConfigurationService: ITerminalConfigurationService, @IInstantiationService private readonly _instantiationService: IInstantiationService, @INotificationService private readonly _notificationService: INotificationService, @ITerminalLogService private readonly _logService: ITerminalLogService, @ITunnelService private readonly _tunnelService: ITunnelService ) {"} {"_id":"doc-en-vscode-9953a53385d538dee45cb910716290fe52e2d7d697b674ae78121e7d3db6634b","title":"","text":"activeTooltipScheduler?.dispose(); })); this._xterm.options.linkHandler = { activate: (_, text) => { allowNonHttpProtocols: true, activate: (event, text) => { if (!this._isLinkActivationModifierDown(event)) { return; } const colonIndex = text.indexOf(':'); if (colonIndex === -1) { throw new Error(`Could not find scheme in link \"${text}\"`); } const scheme = text.substring(0, colonIndex); if (this._terminalConfigurationService.config.allowedLinkSchemes.indexOf(scheme) === -1) { this._notificationService.prompt(Severity.Warning, nls.localize('scheme', 'Opening URIs can be insecure, do you want to allow opening links with the scheme {0}?', scheme), [ { label: nls.localize('allow', 'Allow {0}', scheme), run: () => { const allowedLinkSchemes = [ ...this._terminalConfigurationService.config.allowedLinkSchemes, scheme ]; this._configurationService.updateValue(`terminal.integrated.allowedLinkSchemes`, allowedLinkSchemes); } } ]); } this._openers.get(TerminalBuiltinLinkType.Url)?.open({ type: TerminalBuiltinLinkType.Url, text,"} {"_id":"doc-en-vscode-a3a1f7402a59d60db6a89ccab797d308c7a7ea4ff9204aef3ee7108a3673c8e1","title":"","text":"const fileService = accessor.get(IFileService); const openerService = accessor.get(IOpenerService); let { range, uri } = test.item; const { range, uri } = test.item; if (!uri) { return; } // If an editor has the file open, there are decorations. Try to adjust the // revealed range to those decorations (#133441). range = accessor.get(ITestingDecorationsService).getDecoratedRangeForTest(uri, extId) || range; const position = accessor.get(ITestingDecorationsService).getDecoratedTestPosition(uri, extId) || range?.getStartPosition(); accessor.get(ITestExplorerFilterState).reveal.value = extId; accessor.get(ITestingPeekOpener).closeAllPeeks();"} {"_id":"doc-en-vscode-5a7bffaa2145012c6ee79848a006aa84fa35e5accf27fb00d739aa0f5c9ee425","title":"","text":"return; } await openerService.open(range ? uri.with({ fragment: `L${range.startLineNumber}:${range.startColumn}` }) await openerService.open(position ? uri.with({ fragment: `L${position.lineNumber}:${position.column}` }) : uri ); }"} {"_id":"doc-en-vscode-de3c8c3c86f010bfd2636d9cfb8785a971ab53127e641f420205999b73efb3b3","title":"","text":"} /** @inheritdoc */ public getDecoratedRangeForTest(resource: URI, testId: string) { public getDecoratedTestPosition(resource: URI, testId: string) { const model = this.modelService.getModel(resource); if (!model) { return undefined;"} {"_id":"doc-en-vscode-29ab8fa8d85c1a8bf715f95f66543fc5b51f96784358e1c7c9311abe05ae4759","title":"","text":"return undefined; } return model.getDecorationRange(decoration.id) || undefined; // decoration is collapsed, so the range is meaningless; only position matters. return model.getDecorationRange(decoration.id)?.getStartPosition(); } private invalidate() {"} {"_id":"doc-en-vscode-77f0beaa840033795623fad8a03e9fb2c9d4acb405adc741acde8c5f570df625","title":"","text":"} } const firstLineRange = (originalRange: IRange) => ({ const collapseRange = (originalRange: IRange) => ({ startLineNumber: originalRange.startLineNumber, endLineNumber: originalRange.startLineNumber, startColumn: 0, endColumn: Number.MAX_SAFE_INTEGER, startColumn: originalRange.startColumn, endColumn: originalRange.startColumn, }); const createRunTestDecoration = (tests: readonly IncrementalTestCollectionItem[], states: readonly (TestResultItem | undefined)[], visible: boolean): IModelDeltaDecoration => {"} {"_id":"doc-en-vscode-8cc57c4ee9a27b18814eda14e3eaba2a3c222ca0981ee6250ca1cb5d27ce3cdb","title":"","text":"} if (!visible) { return { range: firstLineRange(range), options: { isWholeLine: true, description: 'run-test-decoration' } }; return { range: collapseRange(range), options: { isWholeLine: true, description: 'run-test-decoration' } }; } let computedState = TestResultState.Unset;"} {"_id":"doc-en-vscode-6efb1dd03da0539d0d1879dd986dc6211bbc2a624289fc6b2d26c61ff9e53b2f","title":"","text":"} return { range: firstLineRange(range), range: collapseRange(range), options: { description: 'run-test-decoration', isWholeLine: true, showIfCollapsed: true, get hoverMessage() { if (!hoverMessage) { const building = hoverMessage = new MarkdownString('', true).appendText(hoverMessageParts.join(', ') + '.');"} {"_id":"doc-en-vscode-3b6e1fa7835b7692bffbbafe0a3f27dacd982c22264bc619f438730e1e48981d","title":"","text":"import { binarySearch } from 'vs/base/common/arrays'; import { Event } from 'vs/base/common/event'; import { URI } from 'vs/base/common/uri'; import { Range } from 'vs/editor/common/core/range'; import { Position } from 'vs/editor/common/core/position'; import { IModelDeltaDecoration } from 'vs/editor/common/model'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { ITestMessage } from 'vs/workbench/contrib/testing/common/testTypes';"} {"_id":"doc-en-vscode-14da9e1707e504605dbc0d93fca9364c924ff7b9bb6f404078205a8cebbad690","title":"","text":"* Gets the range where a test ID is displayed, in the given URI. * Returns undefined if there's no such decoration. */ getDecoratedRangeForTest(resource: URI, testId: string): Range | undefined; getDecoratedTestPosition(resource: URI, testId: string): Position | undefined; } export interface ITestDecoration {"} {"_id":"doc-en-vscode-0aea9acc95e87ee40b3e33f9fb661cd8e06f21b1e1c3243558fcd2e388a0e179","title":"","text":"append_dir GTK_PATH \"$SNAP/usr/lib/$ARCH/gtk-3.0\" append_dir GTK_PATH \"$SNAP/usr/lib/gtk-3.0\" # We don't have gtk libraries in this path but # enforcing this environment variable will disallow # gtk binaries like `gtk-query-immodules` to not search # in system default library paths. # Based on https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkmodules.c#L104-136 export GTK_EXE_PREFIX=\"$SNAP/usr\" # ibus and fcitx integration GTK_IM_MODULE_DIR=\"$SNAP_USER_COMMON/.cache/immodules\""} {"_id":"doc-en-vscode-3e5590ab956babe24d3a40e0e7a908ec763066e9fe0538c161ba96d10d9b882f","title":"","text":"- libgl1 - libglib2.0-0 - libgtk-3-0 - libibus-1.0-5 - libnss3 - libpango-1.0-0 - libsecret-1-0"} {"_id":"doc-en-vscode-12f68e1d203a067d9b92e98321ffa3616614ef3cfc2bfd751ce124cf6ca043fa","title":"","text":"const gtkIMModuleFile = process.env['GTK_IM_MODULE_FILE']; const gdkBackend = process.env['GDK_BACKEND']; const gioModuleDir = process.env['GIO_MODULE_DIR']; const gtkExePrefix = process.env['GTK_EXE_PREFIX']; delete process.env['GDK_PIXBUF_MODULE_FILE']; delete process.env['GDK_PIXBUF_MODULEDIR']; delete process.env['GTK_IM_MODULE_FILE']; delete process.env['GDK_BACKEND']; delete process.env['GIO_MODULE_DIR']; delete process.env['GTK_EXE_PREFIX']; shell.openExternal(url);"} {"_id":"doc-en-vscode-e3ed27717dc76ff4f894278a01ce7f7aabd34d0341e8aada00bdafc084175f7c","title":"","text":"process.env['GTK_IM_MODULE_FILE'] = gtkIMModuleFile; process.env['GDK_BACKEND'] = gdkBackend; process.env['GIO_MODULE_DIR'] = gioModuleDir; process.env['GTK_EXE_PREFIX'] = gtkExePrefix; } moveItemToTrash(windowId: number | undefined, fullPath: string): Promise {"} {"_id":"doc-en-vscode-c748ce2b338128338f4b99833eca7ef659240b12d39d4f84cfee9a84eefc8991","title":"","text":"metadata.scrollable : options.outputScrolling; } // div.cell_container // div.output_container // div.output.output-stream\t\t<-- outputElement parameter // div.scrollable? tabindex=\"0\" \t<-- contentParent // div output-item-id=\"{guid}\"\t<-- content from outputItem parameter function renderStream(outputInfo: OutputItem, outputElement: HTMLElement, error: boolean, ctx: IRichRenderContext): IDisposable { const disposableStore = createDisposableStore(); const outputScrolling = scrollingEnabled(outputInfo, ctx.settings);"} {"_id":"doc-en-vscode-0467f695abdb8aabbbacbc7734e01a2471af00b15035f1176baf60874738663f","title":"","text":"const scrollTop = outputScrolling ? findScrolledHeight(outputElement) : undefined; // If the previous output item for the same cell was also a stream, append this output to the previous const existingContentParent = getPreviousMatchingContentGroup(outputElement); const existingContentParent = getPreviousMatchingContentGroup(outputElement) || outputElement.querySelector('div'); if (existingContentParent) { const existing = existingContentParent.querySelector(`[output-item-id=\"${outputInfo.id}\"]`) as HTMLElement | null; if (existing) {"} {"_id":"doc-en-vscode-f8a3b31eaf507a8ed436750812afdf4f0130d50e28ef1292d593408f1b7e0c32","title":"","text":"const link = document.createElement('a'); link.textContent = '...'; link.href = `command:workbench.action.openLargeOutput?${outputId}`; link.ariaLabel = 'Open full output in text editor'; link.title = 'Open full output in text editor'; link.style.setProperty('text-decoration', 'none'); container.appendChild(link);"} {"_id":"doc-en-vscode-5c3fd04d6e075088bca46741ca2bd906d65d5487d351d420c4ee7d0fc546d467","title":"","text":"import { IRange, Range } from 'vs/editor/common/core/range'; import { getDefinitionsAtPosition } from 'vs/editor/contrib/gotoSymbol/browser/goToSymbol'; import { goToDefinitionWithLocation } from 'vs/editor/contrib/inlayHints/browser/inlayHintsLocations'; import { Position } from 'vs/editor/common/core/position'; import { IPosition, Position } from 'vs/editor/common/core/position'; import { CancellationTokenSource } from 'vs/base/common/cancellation'; import { ILanguageConfigurationService } from 'vs/editor/common/languages/languageConfigurationRegistry'; import { ILanguageFeatureDebounceService } from 'vs/editor/common/services/languageFeatureDebounce';"} {"_id":"doc-en-vscode-a8c7b690128a9339c10ca2528cdc20c06b3fe9071ffc30d9bde84ef886711758","title":"","text":"private _focusedStickyElementIndex: number = -1; private _enabled = false; private _focused = false; private _positionRevealed = false; private _onMouseDown = false; constructor( private readonly _editor: ICodeEditor,"} {"_id":"doc-en-vscode-955a8d1781712bca5c704dec8e6dd6cc51d7b6656a5535c3e97316533f2bba2e","title":"","text":"const focusTracker = this._register(dom.trackFocus(this._stickyScrollWidget.getDomNode())); this._register(focusTracker.onDidBlur(_ => { const height = this._stickyScrollWidget.getDomNode().clientHeight; if (height !== 0) { this._disposeFocusStickyScrollStore(); } else { // If the height is 0, then the blur has been caused by scrolling. In that case keep the focus on the sticky scroll. // Suppose that the blurring is caused by scrolling, then keep the focus on the sticky scroll // This is determined by the fact that the height of the widget has become zero and there has been no position revealing if (this._positionRevealed === false && height === 0) { this._focusedStickyElementIndex = -1; this.focus(); } // In all other casees, dispose the focus on the sticky scroll else { this._disposeFocusStickyScrollStore(); } })); this._register(focusTracker.onDidFocus(_ => { this.focus(); })); this._register(this._createClickLinkGesture()); // Suppose that mouse down on the sticky scroll, then do not focus on the sticky scroll because this will be followed by the revealing of a position this._register(dom.addDisposableListener(this._stickyScrollWidget.getDomNode(), dom.EventType.MOUSE_DOWN, (e) => { this._onMouseDown = true; })); } get stickyScrollCandidateProvider(): IStickyLineCandidateProvider {"} {"_id":"doc-en-vscode-d074819290d36668e307f62705fb3d98d767e0a21435ee917dfde07232f8dc82","title":"","text":"private _disposeFocusStickyScrollStore() { this._stickyScrollFocusedContextKey.set(false); this._focusDisposableStore!.dispose(); this._focusDisposableStore?.dispose(); this._focused = false; this._positionRevealed = false; this._onMouseDown = false; } public focus(): void { // If the mouse is down, do not focus on the sticky scroll if (this._onMouseDown) { this._onMouseDown = false; this._editor.focus(); return; } const focusState = this._stickyScrollFocusedContextKey.get(); if (focusState === true) { return;"} {"_id":"doc-en-vscode-51be41cf6ff58afb83518daf667e7da487d12849addc2bcbbff8477f72881051","title":"","text":"public goToFocused(): void { const lineNumbers = this._stickyScrollWidget.lineNumbers; this._disposeFocusStickyScrollStore(); this._editor.revealPosition({ lineNumber: lineNumbers[this._focusedStickyElementIndex], column: 1 }); this._revealPosition({ lineNumber: lineNumbers[this._focusedStickyElementIndex], column: 1 }); } private _revealPosition(position: IPosition): void { this._positionRevealed = true; this._editor.revealPosition(position); this._editor.setSelection(Range.fromPositions(position)); this._editor.focus(); } private _createClickLinkGesture(): IDisposable {"} {"_id":"doc-en-vscode-c5ef09caa233966e81ad1c9935bbd08e1eda5b509cf1f84ff39cbf0d396663fc","title":"","text":"if (this._focused) { this._disposeFocusStickyScrollStore(); } this._editor.revealPosition({ lineNumber: this._stickyScrollWidget.hoverOnLine, column: 1 }); this._revealPosition({ lineNumber: this._stickyScrollWidget.hoverOnLine, column: 1 }); } this._instaService.invokeFunction(goToDefinitionWithLocation, e, this._editor as IActiveCodeEditor, { uri: this._editor.getModel()!.uri, range: this._stickyRangeProjectedOnEditor! }); } else if (!e.isRightClick) { // Normal click const position = { lineNumber: this._stickyScrollWidget.hoverOnLine, column: this._stickyScrollWidget.hoverOnColumn }; if (this._focused) { this._disposeFocusStickyScrollStore(); } this._editor.revealPosition(position); this._editor.setSelection(Range.fromPositions(position)); this._revealPosition({ lineNumber: this._stickyScrollWidget.hoverOnLine, column: this._stickyScrollWidget.hoverOnColumn }); } })); return linkGestureStore;"} {"_id":"doc-en-vscode-4080f49ef11e1e547c0d9dacce4fb2ddeb92128ffef3ed99de98808d5703fd08","title":"","text":"import { AudioCue, IAudioCueService } from 'vs/platform/audioCues/browser/audioCueService'; import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { TerminalContextKeys } from 'vs/workbench/contrib/terminal/common/terminalContextKey'; import { withNullAsUndefined } from 'vs/base/common/types'; const enum CssClass { Active = 'active', Hide = 'hide' } interface IAccessibleBufferQuickPickItem extends IQuickPickItem { lineNumber: number; exitCode?: number; } export class AccessibleBufferWidget extends DisposableStore { private _accessibleBuffer: HTMLElement; private _bufferEditor: CodeEditorWidget;"} {"_id":"doc-en-vscode-112970f96d7d88918a645098b79bb970bcbbe70585e31e50463cdf9fa033fc5f","title":"","text":"private readonly _focusedContextKey: IContextKey; private readonly _focusTracker: dom.IFocusTracker; private _inQuickPick = false; private _prependNewLine = false; private _bufferToEditorIndex: Map = new Map(); constructor( private readonly _instance: ITerminalInstance,"} {"_id":"doc-en-vscode-906cc6cac70a825a028a4937a6f3db1068a0ee343d611eb35b0cdf9ec14d5575","title":"","text":"if (insertion && model && lineCount > this._xterm.raw.rows) { const lineNumber = lineCount + 1; model.pushEditOperations(null, [{ range: { startLineNumber: lineNumber, endLineNumber: lineNumber, startColumn: 1, endColumn: 1 }, text: this._getContent(true) range: { startLineNumber: lineNumber, endLineNumber: lineNumber, startColumn: 1, endColumn: 1 }, text: this._getContent(1) }], () => []); } else { model = await this._getTextModel(this._instance.resource.with({ fragment: this._getContent() }));"} {"_id":"doc-en-vscode-0befe7e5b587d6482468495e727ad1f37548ebee720802be63dd6f49af5e8bd4","title":"","text":"this._bufferEditor.setScrollTop(this._bufferEditor.getScrollHeight()); } async createQuickPick(): Promise | undefined> { if (!this._focusedContextKey.get()) { await this.show(); } async createQuickPick(): Promise | undefined> { let currentPosition = withNullAsUndefined(this._bufferEditor.getPosition()); this._inQuickPick = true; const commands = this._instance.capabilities.get(TerminalCapability.CommandDetection)?.commands; if (!commands?.length) { return; } const quickPickItems: IQuickPickItem[] = []; const quickPickItems: IAccessibleBufferQuickPickItem[] = []; for (const command of commands) { let line = command.marker?.line; const line = command.marker?.line; if (!line || !command.command.length) { continue; } line = this._bufferToEditorIndex.get(line); if (!line) { continue; } quickPickItems.push( { label: localize('terminal.integrated.symbolQuickPick.labelNoExitCode', '{0}', command.command), meta: JSON.stringify({ line: line + 1, exitCode: command.exitCode }) lineNumber: line + 1, exitCode: command.exitCode }); } const quickPick = this._quickInputService.createQuickPick(); const quickPick = this._quickInputService.createQuickPick(); quickPick.canSelectMany = false; quickPick.onDidChangeActive(() => { const activeItem = quickPick.activeItems[0]; if (activeItem.exitCode) { this._audioCueService.playAudioCue(AudioCue.error, true); } this._bufferEditor.revealLine(activeItem.lineNumber, 0); }); quickPick.onDidHide(() => { if (currentPosition) { this._bufferEditor.setPosition(currentPosition); this._bufferEditor.revealLineInCenter(currentPosition.lineNumber); } quickPick.dispose(); this._inQuickPick = false; }); quickPick.onDidAccept(() => { const item = quickPick.activeItems[0]; const model = this._bufferEditor.getModel(); if (!model || !item.meta) { if (!model) { return; } if (!item && currentPosition) { // reset this._bufferEditor.setPosition(currentPosition); } else { this._bufferEditor.setSelection({ startLineNumber: item.lineNumber, startColumn: 1, endLineNumber: item.lineNumber, endColumn: 1 }); currentPosition = this._bufferEditor.getSelection()?.getPosition(); } quickPick.hide(); const data: { line: number; exitCode: number } = JSON.parse(item.meta); this._bufferEditor.setSelection({ startLineNumber: data.line, startColumn: 1, endLineNumber: data.line, endColumn: 1 }); this._bufferEditor.revealLine(data.line); this._inQuickPick = false; return; }); quickPick.onDidChangeActive(() => { const data = quickPick.activeItems?.[0]?.meta; if (data && JSON.parse(data).exitCode) { this._audioCueService.playAudioCue(AudioCue.error, true); } }); quickPick.items = quickPickItems.reverse(); return quickPick; } async show(): Promise { await this._updateEditor(); this._prependNewLine = true; this._accessibleBuffer.tabIndex = -1; this._bufferEditor.layout({ width: this._xtermElement.clientWidth, height: this._xtermElement.clientHeight }); this._accessibleBuffer.classList.add(CssClass.Active);"} {"_id":"doc-en-vscode-4f5d518794e687501259594eae29470aaa9ddfe95471d7fac117bd15327012fc","title":"","text":"this._bufferEditor.focus(); } private async _getTextModel(resource: URI): Promise { const existing = this._modelService.getModel(resource); if (existing && !existing.isDisposed()) { return existing; } return this._modelService.createModel(resource.fragment, null, resource, false); } private _getContent(lastBufferIndex?: boolean): string { const buffer = this._xterm?.raw.buffer.active; private _getContent(startIndex?: number): string { const buffer = this._xterm.raw.buffer.active; if (!buffer) { return ''; }"} {"_id":"doc-en-vscode-6ddd8e103f88fcdbabcad5fc8dcf5e864cb8b5fd47a9f9fb7d2ecb66a61a7d51","title":"","text":"const scrollback: number = this._configurationService.getValue(TerminalSettingId.Scrollback); const maxBufferSize = scrollback + this._xterm.raw.rows - 1; const end = Math.min(maxBufferSize, buffer.length - 1); if (lastBufferIndex) { if (startIndex) { // If the last buffer index is requested, this is as a result of // a dynamic addition. Return only the last line to prevent duplication. const line = buffer.getLine(end - 1)?.translateToString(false).replace(new RegExp(' ', 'g'), 'xA0'); const result = line ? (this._prependNewLine ? 'n' : '') + line + 'n' : ''; this._prependNewLine = false; const result = line ? line + 'n' : ''; return result; } this._bufferToEditorIndex = new Map(); const lines: string[] = []; let currentLine: string = ''; for (let i = 0; i <= end; i++) {"} {"_id":"doc-en-vscode-ba7ac6d462ecae8a94a7dc9b235643eebec4946f1bcd650669e2b82ae74671ff","title":"","text":"continue; } const isWrapped = buffer.getLine(i + 1)?.isWrapped; this._bufferToEditorIndex.set(i, lines.length); currentLine += line.translateToString(!isWrapped); if (currentLine && !isWrapped || i === end - 1) { lines.push(currentLine.replace(new RegExp(' ', 'g'), 'xA0'));"} {"_id":"doc-en-vscode-f6ac5a334e0cdf79bc4d61add45b5080e39df687f6cd376e7c1341ef372bf928","title":"","text":"return lines.join('n'); } private async _getTextModel(resource: URI): Promise { const existing = this._modelService.getModel(resource); if (existing && !existing.isDisposed()) { return existing; } return this._modelService.createModel(resource.fragment, null, resource, false); } }"} {"_id":"doc-en-vscode-03052c5ffa268537c43f19aaf1c79892dd7873e9564fe179411229035a306de5","title":"","text":"
Notebook Editor Widget
Notebook Editor Widget
Code Editor Widget
Code Editor Widget
Interactive Editor
Interactive Editor
NotebookService
NotebookService
TextModelResolverService
TextModelResolverService
NotebookTextModel
NotebookTextModel
ITextModel
ITextModel
Interactive Editor Input
Interactive Editor In...
EditorPane
EditorPane
EditorInput
EditorInput
Editor Resolver Service
Editor Resolver Service
EditorPane Registry
EditorPane Registry
Registry Editor Pane
Registry Editor Pane
registerEditor
registerEditor
input: EditorInput
input: EditorInput
group: IEditorGroup
group: IEditorGroup
getControl: IEditorControl
getControl: IEditorControl
Text is not SVG - cannot display
"} {"_id":"doc-en-vscode-026eca38239fb7f35bcf6d83b350664b50a8d1830f36c4532c5f05d669c855d6","title":"","text":"
Ext Host
Ext Host
UI
UI
Notebook Editor
Notebook Editor
Text Editor
Text Editor
Interactive Editor
Interactive Editor
NotebookService
NotebookService
TextModelResolverService
TextModelResolverService
ExthostNotebook
ExthostNotebook
ExthostEditors
ExthostEditors
ExthostInteractive
ExthostInteracti...
NotebookEditor
NotebookE...
Input
Input
Text is not SVG - cannot display
"} {"_id":"doc-en-vscode-6b12823cf87f9e3c710b109d482d14de940981c7b2949e691cda4eea25f7b682","title":"","text":" # Interactive Window The interactive window component enables extensions to offer REPL like experience to its users. VS Code provides the user interface and extensions provide the execution environment, code completions, execution results rendering and so on. The interactive window consists of notebook editor at the top and regular monaco editor at the bottom of the viewport. Extensions can extend the interactive window by leveraging the notebook editor API and text editor/document APIs: * Extensions register notebook controllers for the notebook document in the intearctive window through `vscode.notebooks.createNotebookController`. The notebook document has a special notebook view type `interactive`, which is contributed by the core instead of extensions. The registered notebook controller is responsible for execution. * Extensions register auto complete provider for the bottom text editor through `vscode.languages.registerCompletionItemProvider`. The resource scheme for the text editor is `interactive-input` and the language used in the editor is determined by the notebook controller contributed by extensions. Users can type in code in the text editor and after users pressing `Shift+Enter`, we will insert a new code cell into the notebook document with the content from the text editor. Then we will request execution for the newly inserted cell. The notebook controller will handle the execution just like it;s in a normal notebook editor. ## Intearactive Window registration Registering a new editor type in the workbench consists of two steps * Register an editor input factory which is responsible for resolving resources with given `glob` patterns. Here we register an `InteractiveWindowInput` for all resources with `vscode-interactive-input` scheme: `vscode-interactive-input:/**`. * Register an editor pane factory for the given editor input type. Here we register `InteractiveEditor` for our own editor input `InteractiveWindowInput`. The workbench editor service is not aware of how models are resolved in `EditorInput`, neither how `EditorPane`s are rendered. It only cares about the common states and events on `EditorInput` or `EditorPane`, i.e., display name, capabilities (editable), content change, dirty state change. It's `EditorInput`/`EditorPane`'s responsibility to provide the right info and updates to the editor service. One major difference between Interactive Editor and other editor panes is Interactive Window is never dirty so users never see a dot on the editor title bar. ![editor registration](interactive.editor.drawio.svg) ## Interactive Window Editor Model Resolution The Interactive.open command will manually create an EditorInput specific for the Interactive Window and resolving that Input will go through the following workflow: The `NotebookEditorModelResolverService` will create a `NotebookFileWorkingCopyModelFactory` and use that to create a `WorkingCopyManager` which is then used to create a `SimpleNotebookEditorModel`. When the `SimpleNotebookEditorModel` is requested to `load`, it will ask the `WorkingCopyManager` to create a new `StoredWorkingCopy` which reads content from a resource URI with the `fileService`. That content is passed to the the `ModelFactory` which retreives a `NotebookSerializer` from the `notebookService` and constructs a `NotebookTextModel`. ![editor registration](interactive.model.resolution.drawio.svg) The `FileSystem` provider that is registered for `vscode-interactive` schema will always return an empty buffer for any read, and will drop all write requests as nothing is stored on disk for Interactive Window resources. The `notebookSerializer` that is registered for the `interactive` viewtype knows to return an empty notebook data model when it deserializes an empty buffer when the model is being resolved. Restoring the interactive window happens through the `EditorModelCache`, where the full notebook data is stored, and can be used to repopulate the `EditorInput` without needing to go through the editor model resolution flow, effectively skipping any filesystem reads. ## UI/EH editor/document syncing `EditorInput` is responsible for resolving models for the given resources but in Interactive Window it's much simpler as we are not resolving models ourselves but delegating to Notebook and TextEditor. `InteractiveEditorInput` does the coordination job. ![arch](interactive.eh.drawio.svg) "} {"_id":"doc-en-vscode-71f832e4d330956ce6d53fe6b374f867334f11f4278692d8dc00a73d736ad88e","title":"","text":"
Read resource
Read resource
Deserialize NotebookData
Deserialize NotebookData
creates
creates
creates
creates
creates
creates
NotebookEditorModelResolverService
NotebookEditorMod...
SimpleNoteboookEditorModel
SimpleNoteboookEd...
NotebookFileWorkingCopyModelFactory
NotebookFileWorki...
WorkingCopyManager
WorkingCopyManager
creates
creates
NotebookService
NotebookService
FileService
FileService
NotebookTextModel
NotebookTextModel
register FS provider
for vscode-interactive schema
register FS provider...
register notebook serializer
for interactive viewtype
register notebook serializer...
interactive.contribution
(startup)
interactive.contributio...
InteractiveEditor
InteractiveEditor
NotebookEditorInput
NotebookEditorInp...
Text is not SVG - cannot display
"} {"_id":"doc-en-vscode-5da6004312865904557e23fca7590d96bcb02d02734fdf371567624d919f4d66","title":"","text":"
Notebook List View
Notebook List View
Webview top -1000
Webview top -1000
Viewport
Viewport
Notebook List View
Notebook List View
Grow Height by 50
Grow Height by 50
scrollTop 1000
scrollTop 1000
scrollTop 1000
scrollTop 1000
Notebook List View
Notebook List View
scrollTop 1050
scrollTop 1050
Notebook List View
Notebook List View
scrollTop 1050
scrollTop 1050
Adjust top
Adjust top
UpdateScrollTop
UpdateScrollTop
Webview top -1000
Webview top -1000
Webview top -1000
Webview top -1000
Webview top -1000
Webview top -1000
Notebook List View
Notebook List View
scrollTop 1050
scrollTop 1050
Webview top -950
Webview top -950
Notebook List View
Notebook List View
scrollTop 1050
scrollTop 1050
Webview top -950
Webview top -950
Adjust top
Adjust top
1
1
2
2
3
3
4
4
4'
4'
5
5
Viewer does not support full SVG 1.1
"} {"_id":"doc-en-vscode-3bd9ff92d2d26b43dac7cf8de748def4c4898013710cc4fb35c0e7296222825c","title":"","text":"
window.find
window.find
exec(\"hiliteColor\")
findMatchColor
exec(\"hiliteColor\")...
Serialize
document.getSelection()
Serialize...
Find in Rendered Outputs (Search in DOM)
Find in Rendered Out...
Find
Find
Find in Text Model
Find in Text Model
Mix matches
Mix matches
End of Doc
End of Doc
Webview
Webview
Find Next
Find Next
Is Model Match
Is Model Match
Reveal Editor
Reveal Editor
Y
Y
document create range
document create range
\"hiliteColor\"
currentFindMatchColor
\"hiliteColor\"...
Find cell/output container
Find cell/output con...
Viewer does not support full SVG 1.1
"} {"_id":"doc-en-vscode-f43e03395bb20b0d461b3b4bbed264fcfef13bcc693cbaf7337acbd321fe9bb2","title":"","text":" ## Find in Outputs * Find is no longer **synchronous** * Progress bar in Find Widget * Require all outputs to be rendered first * `window.find` * Shadow DOM nodes are skipped in non-chromium browsers * no builtin css rule for find match color * `hiliteColor` * Modifies DOM * Shadow DOM not supported, we can potentially have our own impl * Find match range serialization `document.getSelection` * `document.getSelection().getRangeAt(0).cloneRange()` not immutable, changed when document active selection changes * range will be invalid after `hiliteColor` executed * require our own serialization/deserialization * Performance * `window.find` can be slow * We currently travese the DOM tree to figure out which cell/output contain the find match belongs to, it's really costly. One idea is checking the absolute position of the find match and compare it with output container positions. * Search only rendered outputs * MutationObserver for output change * Change active selection to the beginning of the new output and then request `window.find` "} {"_id":"doc-en-vscode-86c941ab91dd5eb2ec4d3824f0c2d78873b5bcaa2d351a0c5db3604daf6c3c5b","title":"","text":" The notebook editor is a virtualized list view rendered in two contexts (mainframe and webview/iframe). It's on top of the builtin list/tree view renderer but its experience is different from traditional list views like File Explorer and Settings Editor. This doc covers the architecture of the notebook editor and layout optimizations we experimented with. - [Architecture](#architecture) - [Notebook model resolution](#notebook-model-resolution) - [Viewport rendering](#viewport-rendering) - [Cell rendering](#cell-rendering) - [Focus Tracking](#focus-tracking) - [Optimizations](#optimizations) - [Avoid flickering on resize of cells above current viewport](#avoid-flickering-on-resize-of-cells-above-current-viewport) - [Executing code cell followed by markdown cells](#executing-code-cell-followed-by-markdown-cells) - [Re-executing code cell followed by markdown cells](#re-executing-code-cell-followed-by-markdown-cells) - [Scrolling](#scrolling) # Architecture ## Notebook model resolution The notebook model resolution consists of two main parts * Resolving the raw data (bytes) of the resource from file service. This part is backed by the `WorkingCopyService` and it will resolve the data and broadcast updates when the resource is updated on file system. * Requesting the contributed notebook serializer to serialize/deserize the raw bytes for the resource. We will find the best matched notebook serializer (by user's editor type configuration and serializer's selector definition) and convert the raw bytes from/to `NotebookTextModel`. `NotebookTextModel` is the only source of truth for the notebook document once the resource is opened in the workspace. The source text of each individual cell in the notebook is backed by a piece tree text buffer. When the notebook is opened in the editor group, we will request the `TextModelResolverService` for the monaco `TextModel` reference for each cell. The `TextModel` will use the piece tree text buffer from the cell as the backing store so whenever the `TextModel` gets updated, the cells in `NotebookTextModel` are always up to date.`` Since we are using the `TextModelResolverService` for cell's text model resolution, the `TextModel`s will have a mirror in the extension host, just like a normal resource opened in a text editor. Extensions can treat them as normal text documents. ![arch](https://user-images.githubusercontent.com/876920/141845889-abe0384e-0093-4b08-831a-04424a4b8101.png) ## Viewport rendering The viewport rendering of notebook list view is a \"guess and validate\" process. It will calcuate how many cells/rows it can render within the viewport first, have them all rendered, and then ask for their real dimensions, and based on the cell/row dimensions it will decide if it needs to render more cells (if there is still some room in the viewport) or remove a few. For short, the process is more or less * Render cell/row (DOM write) * Read dimensions (DOM read) The catch here is if we happen to perform any DOM read operation between DOM write while rendering a cell, it will trigger forced reflow and block the UI. To make it even worse, there are multiple components in a cell and often they are not aware of the existence of each other. When one component is updating its own DOM content, another component might be reading DOM dimensions at the same time. To prevent the unnecessary forced reflow from happening too often, we introduced the concept of `CellPart`. A `CellPart` is an abstract component in a cell and its lifecycle consists of four phases: * Creation. `CellPart` is usually created on cell template * Attach cell. When a cell is being rendered, we would attach the cell with all `CellPart`s by invoking `CellPart#renderCell`. * A subclass of `CellPart` should implement `CellPart#didRenderCell` to customize this phase * Read DOM dimensions. All DOM read operation should be performed in this phase to prepare for the layout update. `CellPart#prepareLayout` will invoked. * Update DOM positions. Once the list view finish reading DOM dimensions of all `CellPart`s, it will ask each `CellPart` to update its internal DOM nodes' positions, by invoking `CellPart#updateLayoutNow`. When we introduce new UI elements to notebook cell, we would make it a `CellPart` and ensure that we batch the DOM read and write operations in the right phases. ![render viewport](./viewport-rendering.drawio.svg) When the notebook document contains markdown cells or rich outputs, the workflow is a bit more complex and become asynchronous partially due to the fact the markdown and rich outputs are rendered in a separate webview/iframe. While the list view renders the cell/row, it will send requests to the webview for output rendering, the rendering result (like dimensions of the output elements) won't come back in current frame. Once we receive the output rendering results from the webview (say next frame), we would ask the list view to adjust the position/dimension of the cell and ones below. ![render outputs in the webview/iframe](https://user-images.githubusercontent.com/876920/142923784-4e7a297c-6ce4-4741-b306-cbfb3277699b.png) ## Cell rendering The rendering of cells in the notebook editor consists of following steps: * Update reused DOM nodes in the template and cell decorations * Set up context for the cell and toolbars * Update cell toolbar, run toolbar and insertion toolbar between cells * Render cell * Register listeners for: * Notebook layout change * Cell layout change * Cell state change: Folding, Collapse, Focus ## Focus Tracking Due to the nature of virtualization (list view) and two layers architecture, the focus tracking is more complex compared to file explorer or monaco editor. When a notebook is *focused*, the `document.activeElement` can be * Monaco editor, when users focus on a cell editor * `textarea` when users focus the text * Widgets * Webview/iframe, when users focus on markdown cell or rich outputs rendered rendered in iframe * List view container, when users focus on cell container * Focusable element inside the notebook editor * Builtin output (e.g., text output) * Find Widget * Cell statusbar * Toolbars The catch here is if the focus is on a monaco editor, instead of the list view container, when the cell is moved out of view, the list view removes the cell row from the DOM tree. The `document.activeElement` will fall back `document.body` when that happens. To ensure that the notebook editor doesn't blur, we need to move focus back to list view container when the focused cell is moved out of view. More importantly, focus the cell editor again when the cell is visible again (if the cell is still the *active* cell). Copy in Notebook depends on the focus tracking * Send `document.executeCommand('copy')` if users select text in output rendered in main frame by builtin renderer * Request webview copy if the focus is inside the webview * Copy cells if the focus is on notebook cell list * Copy text if the focus is in cell editor (monaco editor) ![diagram](https://user-images.githubusercontent.com/876920/141730905-2818043e-1a84-45d3-ad27-83bd89235ca5.png) # Optimizations Since most elements' positions are absolute and there is latency between the two frames, we have multiple optimizations to ensure smooth (we try our best) perceived user experience. The optimizations are mostly around: * Ensure the elements in current viewport are stable when other elements' dimensions update * Fewer layout messages between the main and iframe * Less flickering and forced reflow on scrolling While we continue optimizing the layout code, we need to make sure that the new optimization won't lead to regression in above three aspects. Here is a list of existing optimziations we already have and we want to make sure they still perform well when updating layout code. ## Avoid flickering on resize of cells above current viewport We always ensure that elements in current viewport are stable (their visual positions don't change) when cells above current viewport resize. Resizing a cell above viewport will then include following steps as shown in below diagram ![cell resize above viewport](./cell-resize-above-viewport.drawio.svg) 1. User scrolls to the middle of the document, with one markdown cell partially visible (blue box in the green container) and one code cell fully visible (blue box in the white container) 2. The code cell above current viewport grows by 50px. The list view will then push down every cell below it. Thus the code cell in the viewport will move down by 50px. In current tick/frame, the markdown preview elements in the webview are not updated yet thus it's still partially visible. 3. To ensure the code cell's position is stable, we would scroll the whole list view downwards by 50px. The code cell's position is now fixed but at the same time, the webview also moves up by 50px (as it's a child of the list view scrollable element). 4. Lastly we sent requests to the webview to fix the visual positions of markdown previews After the last step, both the code and markdown cells in the viewport stays where they were. However due to the fact that code cells and markdown cells are rendered in two different contexts (UI and iframe), there is always latency between step 3 and 4 so users will notice annoying flickering of markdown cells easily. The fix is kind of \"tricky\". Instead of adjusting the position of the partially markdown cells, we can actually make it visually stable by adjusting the position of the webview element (step 4). That would mess up the positions of markdown cells above current viewport, but we can fix them in next frame/tick (step 5) and since they are never in the viewport, users won't notice their position flicker/shift. ## Executing code cell followed by markdown cells Code cell outputs and markdown cells are both rendered in the underlying webview. When executing a code cell, the list view will 1. Request cell output rendering in webview 2. Cell output height change 1. in the webview, we set `maxHeight: 0; overflow: hidden` on the output DOM node, then it won't overlap with the following markdown cells 2. broadcast the height change to the list view in main frame 3. List view received the height update request 1. Send acknowledge of the output height change to webview 2. Push down code cells below 3. Webview remove `maxHeight: 0` on the output DOM node Whether users would see flickering or overlap of outputs, monaco editor and markdown cells depends on the latency between 3.2 and 3.3. ## Re-executing code cell followed by markdown cells Re-executing code cell consists of two steps: 1. Remove old outputs, which will reset the output height to 0 2. Render new outputs, which will push elements below downwards The latency between 1 and 2 will cause the UI to flicker (as cells below this code cell will move upwards then downwards in a short period of time. However a lot of the time, we just tweak the code a bit and the outputs will have the same shape and very likely same rendered height, seeing the movement of cells below it is not pleasant. For example say we have code ```py print(1) ``` it will generate text output `1`. Updating the code to ```py print(2) ``` will genrate text output `2`. The re-rendering of the output is fast and we want to ensure the UI is stable in this scenario, to achieve this: 1. Clear existing output `1` 1. Remove the output DOM node, but we reserve the height of the output 2. In 200ms, we will reset the output height to `0`, unless there is a new output rendered 2. Received new output 1. Re-render the new output 2. Calcuate the height of the new output, update layout If the new output is rendered within 200ms, users won't see the UI movement. ## Scrolling Code cell outputs and markdown cells are rendered in the webview, which are async in nature. In order to have the cell outputs and markdown previews rendered when users scroll to them, we send rendering requests of cells in the next and previous viewport when it's idle. Thus scrolling is smoother. We also warm up all rendered markdown in the document, from top to bottom, when the browser is idle. We don't warm up outputs like this, since they can be more expensive to render than markdown. But outputs do get rendered when the user starts a search in outputs. "} {"_id":"doc-en-vscode-6003047cf392806f7a2a2cc6785f3b3986071426ea23d4e202ac6d7baa97a02d","title":"","text":"
Render Viewport
Render Viewport
Notebook List View
Notebook List View
Render Template
Render Template
Render Element
Render Element
Get Dynamic Height
Get Dynamic Height
Create Cell Templates/Parts
Create Cell Templates/Parts
Toolbar
Toolbar
Editor
Editor
Statusbar
Statusbar
Code Cell
Code Cell
Render Cell Parts
Render Cell Parts
CellPart read DOM
CellPart read DOM
Update layout info
Update layout info
Toolbar.renderCell
Toolbar.renderCell
Toolbar.renderCell
Toolbar.renderCell
Toolbar.didRenderCell
Toolbar.didRenderCell
Toolbar.renderCell
Toolbar.renderCell
Toolbar.renderCell
Toolbar.renderCell
Toolbar.prepareLayout
Toolbar.prepareLay...
Cell Layout Change
Cell Layout Change
Cell Part updateInternalLayoutNow
Cell Part updateInternalLayoutNow
Toolbar.renderCell
Toolbar.renderCell
Toolbar.renderCell
Toolbar.renderCell
Toolbar.updateInternalLayoutNow
Toolbar.updateInternalLayout...
Next Frame
Next Frame
DOM Read
DOM Read
DOM Write
DOM Write
Viewer does not support full SVG 1.1
"} {"_id":"doc-en-vscode-d7f21c0e2f4fb406d2d576e0bc368eab1ae882b54acef4cdb19e640930b720a7","title":"","text":"private didLayout = false; private emptyViews: ISplitViewView<{ top: number; left: number }>[] | undefined; private readonly splitViewDisposables = new DisposableStore(); private centeredLayoutFixedWidth = true; constructor( private container: HTMLElement, private view: IView, public state: CenteredViewState = { ...defaultState } public state: CenteredViewState = { ...defaultState }, private centeredLayoutFixedWidth: boolean = false ) { this.container.appendChild(this.view.element); // Make sure to hide the split view overflow like sashes #52892"} {"_id":"doc-en-vscode-3dcc346251a3ad73368a4badaba60dc307e068383ddcfaf1bab5ac3a953cb574","title":"","text":"this.doCreateGridControl(options); // Centered layout widget this.centeredLayoutWidget = this._register(new CenteredViewLayout(this.container, this.gridWidgetView, this.profileMemento[EditorPart.EDITOR_PART_CENTERED_VIEW_STORAGE_KEY])); this.centeredLayoutWidget = this._register(new CenteredViewLayout(this.container, this.gridWidgetView, this.profileMemento[EditorPart.EDITOR_PART_CENTERED_VIEW_STORAGE_KEY], this._partOptions.centeredLayoutFixedWidth)); this._register(this.onDidChangeEditorPartOptions(e => this.centeredLayoutWidget.setFixedWidth(e.newPartOptions.centeredLayoutFixedWidth ?? false))); // Drag & Drop support"} {"_id":"doc-en-vscode-24d1e65e76a15ca00e78ca4086d012328279dcb56cbfced37422d139007334ea","title":"","text":".pipe(util.skipDirectories()) .pipe(util.fixWin32DirectoryPermissions()) .pipe(filter(['**', '!**/.github/**'], { dot: true })) // https://github.com/microsoft/vscode/issues/116523 .pipe(electron({ ...config, platform, arch: arch === 'armhf' ? 'arm' : arch, ffmpegChromium: true })) .pipe(electron({ ...config, platform, arch: arch === 'armhf' ? 'arm' : arch, ffmpegChromium: false })) .pipe(filter(['**', '!LICENSE', '!LICENSES.chromium.html', '!version'], { dot: true })); if (platform === 'linux') {"} {"_id":"doc-en-vscode-586ff702515cd58d8888290905ed7e46f514535bfa47d297f4cfc1dff06f22a2","title":"","text":"}); } exports.config = { version: product.electronRepository ? '22.4.4' : util.getElectronVersion(), version: product.electronRepository ? '22.4.5' : util.getElectronVersion(), productAppName: product.nameLong, companyName: 'Microsoft Corporation', copyright: 'Copyright (C) 2023 Microsoft. All rights reserved',"} {"_id":"doc-en-vscode-ed089832df0230f02007309c240c1e3904f00fdb2d94491cdee2b83212dad9cd","title":"","text":"const electronOpts = _.extend({}, exports.config, { platform: process.platform, arch: arch === 'armhf' ? 'arm' : arch, ffmpegChromium: true, ffmpegChromium: false, keepDefaultApp: true }); return vfs.src('package.json')"} {"_id":"doc-en-vscode-6789132c1faaa6e5b9b456e74902dc0afb337d346c38be51499f189af86e2325","title":"","text":"}; } async function main(arch = process.arch) { const version = product.electronRepository ? '22.4.4' : util.getElectronVersion(); const version = product.electronRepository ? '22.4.5' : util.getElectronVersion(); const electronPath = path.join(root, '.build', 'electron'); const versionFile = path.join(electronPath, 'version'); const isUpToDate = fs.existsSync(versionFile) && fs.readFileSync(versionFile, 'utf8') === `${version}`;"} {"_id":"doc-en-vscode-c107e07d87eec35b5743b9bf7b5c1f032b0179faffd98fb236f1241867db9e61","title":"","text":"process.exit(1); }); } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWxlY3Ryb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJlbGVjdHJvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7OztnR0FHZ0c7OztBQUVoRyx5QkFBeUI7QUFDekIsNkJBQTZCO0FBQzdCLGdDQUFnQztBQUNoQyxzQ0FBc0M7QUFDdEMsZ0NBQWdDO0FBQ2hDLCtCQUErQjtBQUMvQiw2Q0FBMEM7QUFZMUMsU0FBUyxnQkFBZ0IsQ0FBQyxHQUFZO0lBQ3JDLE9BQU8sR0FBRyxLQUFLLFVBQVUsSUFBSSxHQUFHLEtBQUssUUFBUSxJQUFJLEdBQUcsS0FBSyxNQUFNLElBQUksR0FBRyxLQUFLLGFBQWEsQ0FBQztBQUMxRixDQUFDO0FBRUQsTUFBTSxJQUFJLEdBQUcsSUFBSSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUM7QUFDbkQsTUFBTSxPQUFPLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxFQUFFLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsSUFBSSxFQUFFLGNBQWMsQ0FBQyxFQUFFLE1BQU0sQ0FBQyxDQUFDLENBQUM7QUFDckYsTUFBTSxNQUFNLEdBQUcsSUFBQSx1QkFBVSxFQUFDLElBQUksQ0FBQyxDQUFDO0FBRWhDLE1BQU0scUJBQXFCLEdBQUcsT0FBTyxDQUFDLGFBQWEsSUFBSSxDQUFDLENBQUMsUUFBUSxDQUFDLEVBQUUsQ0FBQyxZQUFZLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFJLEVBQUUsT0FBTyxDQUFDLGFBQWEsQ0FBQyxFQUFFLE1BQU0sQ0FBQyxDQUFDLENBQUM7QUFFbkk7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQWtCRztBQUNILFNBQVMsd0JBQXdCLENBQUMsVUFBb0IsRUFBRSxJQUFZLEVBQUUsWUFBNEMsRUFBRSxJQUFlO0lBQ2xJLDJGQUEyRjtJQUMzRixJQUFJLGdCQUFnQixDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsWUFBWSxFQUFFO1FBQ3BELFlBQVksR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDLFdBQVcsRUFBRSxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLEdBQUcsR0FBRyxHQUFHLENBQUMsWUFBWSxJQUFJLFVBQVUsQ0FBQyxDQUFDO0tBQ2pHO0lBRUQsT0FBTztRQUNOLElBQUksRUFBRSxZQUFZO1FBQ2xCLElBQUksRUFBRSxRQUFRO1FBQ2QsT0FBTyxFQUFFLENBQUMsTUFBTSxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUUsTUFBTSxDQUFDO1FBQ3pDLFVBQVU7UUFDVixRQUFRLEVBQUUsbUJBQW1CLEdBQUcsSUFBSSxHQUFHLE9BQU87UUFDOUMsSUFBSTtLQUNKLENBQUM7QUFDSCxDQUFDO0FBRUQ7Ozs7Ozs7Ozs7R0FVRztBQUNILFNBQVMseUJBQXlCLENBQUMsS0FBNEMsRUFBRSxJQUFZO0lBQzVGLE9BQU8sTUFBTSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxJQUFZLEVBQXNCLEVBQUU7UUFDbEUsTUFBTSxVQUFVLEdBQUcsS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDO1FBQy9CLE9BQU87WUFDTixJQUFJO1lBQ0osSUFBSSxFQUFFLFFBQVE7WUFDZCxPQUFPLEVBQUUsQ0FBQyxNQUFNLEVBQUUsTUFBTSxFQUFFLE1BQU0sRUFBRSxNQUFNLENBQUM7WUFDekMsVUFBVSxFQUFFLEtBQUssQ0FBQyxPQUFPLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxVQUFVLENBQUM7WUFDakUsUUFBUSxFQUFFLG1CQUFtQixHQUFHLElBQUksR0FBRyxPQUFPO1NBQ3hCLENBQUM7SUFDekIsQ0FBQyxDQUFDLENBQUM7QUFDSixDQUFDO0FBRVksUUFBQSxNQUFNLEdBQUc7SUFDckIsT0FBTyxFQUFFLE9BQU8sQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsa0JBQWtCLEVBQUU7SUFDMUUsY0FBYyxFQUFFLE9BQU8sQ0FBQyxRQUFRO0lBQ2hDLFdBQVcsRUFBRSx1QkFBdUI7SUFDcEMsU0FBUyxFQUFFLG1EQUFtRDtJQUM5RCxVQUFVLEVBQUUsNEJBQTRCO0lBQ3hDLHNCQUFzQixFQUFFLE9BQU8sQ0FBQyxzQkFBc0I7SUFDdEQsNkJBQTZCLEVBQUUscUNBQXFDO0lBQ3BFLG9CQUFvQixFQUFFLGtCQUFrQjtJQUN4QyxrQkFBa0IsRUFBRSxrQkFBa0I7SUFDdEMseUJBQXlCLEVBQUU7UUFDMUIsR0FBRyx5QkFBeUIsQ0FBQyxFQUFFLGVBQWUsRUFBRSxHQUFHLEVBQUUsZUFBZSxFQUFFLEdBQUcsRUFBRSxFQUFFLEdBQUcsQ0FBQztRQUNqRixHQUFHLHlCQUF5QixDQUFDLEVBQUUsd0JBQXdCLEVBQUUsQ0FBQyxlQUFlLEVBQUUsV0FBVyxFQUFFLFdBQVcsQ0FBQyxFQUFFLEVBQUUsUUFBUSxDQUFDO1FBQ2pILEdBQUcseUJBQXlCLENBQUMsRUFBRSx3QkFBd0IsRUFBRSxDQUFDLEtBQUssRUFBRSxNQUFNLEVBQUUsUUFBUSxFQUFFLE9BQU8sRUFBRSxLQUFLLEVBQUUsT0FBTyxFQUFFLE9BQU8sQ0FBQyxFQUFFLEVBQUUsTUFBTSxDQUFDO1FBQy9ILHdCQUF3QixDQUFDLENBQUMsS0FBSyxFQUFFLEtBQUssQ0FBQyxFQUFFLEtBQUssRUFBRSx3QkFBd0IsQ0FBQztRQUN6RSx3QkFBd0IsQ0FBQyxDQUFDLFNBQVMsQ0FBQyxFQUFFLE9BQU8sQ0FBQztRQUM5Qyx3QkFBd0IsQ0FBQyxDQUFDLFFBQVEsRUFBRSxjQUFjLEVBQUUsS0FBSyxFQUFFLEtBQUssQ0FBQyxFQUFFLFFBQVEsRUFBRSxvQkFBb0IsQ0FBQztRQUNsRyx3QkFBd0IsQ0FBQyxDQUFDLElBQUksRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLEtBQUssQ0FBQyxFQUFFLEtBQUssRUFBRSxpQkFBaUIsQ0FBQztRQUMvRSx3QkFBd0IsQ0FBQyxDQUFDLElBQUksRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLEtBQUssQ0FBQyxFQUFFLEtBQUssRUFBRSxpQkFBaUIsQ0FBQztRQUMvRSx3QkFBd0IsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxFQUFFLFNBQVMsRUFBRSx5QkFBeUIsQ0FBQztRQUNyRSx3QkFBd0IsQ0FBQyxDQUFDLElBQUksQ0FBQyxFQUFFLEtBQUssRUFBRSwyQkFBMkIsQ0FBQztRQUNwRSx3QkFBd0IsQ0FBQyxDQUFDLElBQUksRUFBRSxLQUFLLENBQUMsRUFBRSxRQUFRLEVBQUUsZ0JBQWdCLENBQUM7UUFDbkUsd0JBQXdCLENBQUMsQ0FBQyxLQUFLLENBQUMsRUFBRSxLQUFLLEVBQUUsS0FBSyxDQUFDO1FBQy9DLHdCQUF3QixDQUFDLENBQUMsSUFBSSxDQUFDLEVBQUUsSUFBSSxFQUFFLGdCQUFnQixDQUFDO1FBQ3hELHdCQUF3QixDQUFDLENBQUMsS0FBSyxFQUFFLE1BQU0sRUFBRSxPQUFPLENBQUMsRUFBRSxNQUFNLENBQUM7UUFDMUQsd0JBQXdCLENBQUMsQ0FBQyxNQUFNLENBQUMsRUFBRSxNQUFNLENBQUM7UUFDMUMsd0JBQXdCLENBQUMsQ0FBQyxLQUFLLEVBQUUsTUFBTSxDQUFDLEVBQUUsTUFBTSxDQUFDO1FBQ2pELHdCQUF3QixDQUFDLENBQUMsSUFBSSxFQUFFLFFBQVEsRUFBRSxVQUFVLEVBQUUsS0FBSyxFQUFFLEtBQUssQ0FBQyxFQUFFLFlBQVksRUFBRSxNQUFNLENBQUM7UUFDMUYsd0JBQXdCLENBQUMsQ0FBQyxNQUFNLENBQUMsRUFBRSxNQUFNLENBQUM7UUFDMUMsd0JBQXdCLENBQUMsQ0FBQyxNQUFNLENBQUMsRUFBRSxNQUFNLENBQUM7UUFDMUMsd0JBQXdCLENBQUMsQ0FBQyxVQUFVLEVBQUUsSUFBSSxFQUFFLE1BQU0sRUFBRSxPQUFPLEVBQUUsUUFBUSxFQUFFLE9BQU8sRUFBRSxNQUFNLEVBQUUsS0FBSyxFQUFFLE1BQU0sQ0FBQyxFQUFFLFVBQVUsQ0FBQztRQUNuSCx3QkFBd0IsQ0FBQyxDQUFDLEtBQUssQ0FBQyxFQUFFLEtBQUssRUFBRSxhQUFhLENBQUM7UUFDdkQsd0JBQXdCLENBQUMsQ0FBQyxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sQ0FBQyxFQUFFLFlBQVksRUFBRSxRQUFRLENBQUM7UUFDekUsd0JBQXdCLENBQUMsQ0FBQyxJQUFJLEVBQUUsS0FBSyxDQUFDLEVBQUUsUUFBUSxFQUFFLFFBQVEsQ0FBQztRQUMzRCx3QkFBd0IsQ0FBQyxDQUFDLFNBQVMsRUFBRSxJQUFJLEVBQUUsS0FBSyxDQUFDLEVBQUUsTUFBTSxFQUFFLGFBQWEsQ0FBQztRQUN6RSx3QkFBd0IsQ0FBQyxDQUFDLE1BQU0sRUFBRSxNQUFNLENBQUMsRUFBRSxNQUFNLEVBQUUsTUFBTSxDQUFDO1FBQzFELHdCQUF3QixDQUFDLENBQUMsS0FBSyxDQUFDLEVBQUUsS0FBSyxFQUFFLFFBQVEsQ0FBQztRQUNsRCx3QkFBd0IsQ0FBQyxDQUFDLElBQUksQ0FBQyxFQUFFLFlBQVksRUFBRSxNQUFNLENBQUM7UUFDdEQsd0JBQXdCLENBQUMsQ0FBQyxLQUFLLEVBQUUsS0FBSyxDQUFDLEVBQUUsT0FBTyxFQUFFLGFBQWEsQ0FBQztRQUNoRSx3QkFBd0IsQ0FBQyxDQUFDLEtBQUssQ0FBQyxFQUFFLEtBQUssRUFBRSxhQUFhLENBQUM7UUFDdkQsd0JBQXdCLENBQUMsQ0FBQyxNQUFNLEVBQUUsUUFBUSxFQUFFLEtBQUssRUFBRSxPQUFPLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLE1BQU0sQ0FBQyxFQUFFLEtBQUssQ0FBQztRQUN2Ryx3QkFBd0IsQ0FBQyxDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLEtBQUssQ0FBQyxFQUFFLE1BQU0sQ0FBQztRQUNsRSx3QkFBd0IsQ0FBQztZQUN4QixNQUFNLEVBQUUsWUFBWSxFQUFFLGFBQWEsRUFBRSxjQUFjLEVBQUUsUUFBUTtZQUM3RCxTQUFTLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxJQUFJLEVBQUUsUUFBUSxFQUFFLFNBQVM7WUFDNUQsVUFBVSxFQUFFLEtBQUssRUFBRSxRQUFRLEVBQUUsT0FBTztTQUNwQyxFQUFFLE9BQU8sRUFBRSxRQUFRLENBQUM7UUFDckIsb0NBQW9DO1FBQ3BDLEdBQUcseUJBQXlCLENBQUM7WUFDNUIscUJBQXFCLEVBQUUsQ0FBQyxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sRUFBRSxTQUFTLENBQUM7WUFDekQsd0JBQXdCLEVBQUUsZ0JBQWdCO1lBQzFDLDBCQUEwQixFQUFFLFFBQVE7WUFDcEMsd0JBQXdCLEVBQUUsS0FBSztZQUMvQixjQUFjLEVBQUUsT0FBTztZQUN2QixhQUFhLEVBQUUsTUFBTTtZQUNyQixXQUFXLEVBQUUsTUFBTTtZQUNuQixZQUFZLEVBQUUsWUFBWTtZQUMxQixhQUFhLEVBQUUsUUFBUTtZQUN2QixlQUFlLEVBQUUsUUFBUTtZQUN6QixVQUFVLEVBQUUsQ0FBQyxVQUFVLEVBQUUsSUFBSSxDQUFDO1lBQzlCLFlBQVksRUFBRSxLQUFLO1lBQ25CLGNBQWMsRUFBRSxLQUFLO1lBQ3JCLFNBQVMsRUFBRSxPQUFPO1lBQ2xCLFVBQVUsRUFBRSxNQUFNO1lBQ2xCLFVBQVUsRUFBRSxLQUFLO1lBQ2pCLGlCQUFpQixFQUFFLEtBQUs7WUFDeEIsb0JBQW9CLEVBQUUsV0FBVztZQUNqQyxzQkFBc0IsRUFBRSxhQUFhO1lBQ3JDLHFCQUFxQixFQUFFLElBQUk7WUFDM0IsZUFBZSxFQUFFLEdBQUc7WUFDcEIsa0JBQWtCLEVBQUUsSUFBSTtZQUN4Qiw0QkFBNEIsRUFBRSxLQUFLO1lBQ25DLGdCQUFnQixFQUFFLENBQUMsS0FBSyxFQUFFLEtBQUssQ0FBQztZQUNoQyxnQkFBZ0IsRUFBRSxJQUFJO1lBQ3RCLG1CQUFtQixFQUFFLEtBQUs7WUFDMUIsV0FBVyxFQUFFLENBQUMsS0FBSyxFQUFFLFVBQVUsQ0FBQztZQUNoQyxjQUFjLEVBQUUsQ0FBQyxLQUFLLEVBQUUsTUFBTSxDQUFDO1lBQy9CLGVBQWUsRUFBRSxNQUFNO1lBQ3ZCLG1CQUFtQixFQUFFLE9BQU87U0FDNUIsRUFBRSxTQUFTLENBQUM7UUFDYixpQ0FBaUM7UUFDakMsd0JBQXdCLENBQUM7WUFDeEIsZUFBZSxFQUFFLEtBQUssRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQUUsSUFBSSxFQUFFLEtBQUs7WUFDdEUsSUFBSSxFQUFFLEtBQUssRUFBRSxJQUFJLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBRSxJQUFJLEVBQUUsWUFBWSxFQUFFLE1BQU0sRUFBRSxJQUFJLEVBQUUsR0FBRztTQUN0RSxFQUFFLFNBQVMsRUFBRSxPQUFPLENBQUMsUUFBUSxHQUFHLFdBQVcsQ0FBQztRQUM3QyxvQkFBb0I7UUFDcEIsd0JBQXdCLENBQUMsRUFBRSxFQUFFLFNBQVMsRUFBRSxRQUFRLEVBQUUsQ0FBQyxlQUFlLENBQUMsQ0FBQztLQUNwRTtJQUNELG9CQUFvQixFQUFFLENBQUM7WUFDdEIsSUFBSSxFQUFFLFFBQVE7WUFDZCxJQUFJLEVBQUUsT0FBTyxDQUFDLFFBQVE7WUFDdEIsVUFBVSxFQUFFLENBQUMsT0FBTyxDQUFDLFdBQVcsQ0FBQztTQUNqQyxDQUFDO0lBQ0YsMEJBQTBCLEVBQUUsSUFBSTtJQUNoQyxhQUFhLEVBQUUscUJBQXFCLENBQUMsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMscUJBQXFCLENBQUMsRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLElBQUksRUFBRSxJQUFJLElBQUksRUFBRSxDQUFDLFdBQVcsRUFBRSxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxTQUFTO0lBQ3pJLG1CQUFtQixFQUFFLE9BQU8sQ0FBQyxlQUFlO0lBQzVDLE9BQU8sRUFBRSwwQkFBMEI7SUFDbkMsS0FBSyxFQUFFLE9BQU8sQ0FBQyxHQUFHLENBQUMsY0FBYyxDQUFDO0lBQ2xDLElBQUksRUFBRSxPQUFPLENBQUMsa0JBQWtCLElBQUksU0FBUztDQUM3QyxDQUFDO0FBRUYsU0FBUyxXQUFXLENBQUMsSUFBWTtJQUNoQyxPQUFPLEdBQUcsRUFBRTtRQUNYLE1BQU0sUUFBUSxHQUFHLE9BQU8sQ0FBQyxvQkFBb0IsQ0FBQyxDQUFDO1FBQy9DLE1BQU0sSUFBSSxHQUFHLE9BQU8sQ0FBQyxrQkFBa0IsQ0FBc0MsQ0FBQztRQUU5RSxNQUFNLFlBQVksR0FBRyxDQUFDLENBQUMsTUFBTSxDQUFDLEVBQUUsRUFBRSxjQUFNLEVBQUU7WUFDekMsUUFBUSxFQUFFLE9BQU8sQ0FBQyxRQUFRO1lBQzFCLElBQUksRUFBRSxJQUFJLEtBQUssT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLElBQUk7WUFDckMsY0FBYyxFQUFFLElBQUk7WUFDcEIsY0FBYyxFQUFFLElBQUk7U0FDcEIsQ0FBQyxDQUFDO1FBRUgsT0FBTyxHQUFHLENBQUMsR0FBRyxDQUFDLGNBQWMsQ0FBQzthQUM1QixJQUFJLENBQUMsSUFBSSxDQUFDLEVBQUUsSUFBSSxFQUFFLE9BQU8sQ0FBQyxTQUFTLEVBQUUsQ0FBQyxDQUFDO2FBQ3ZDLElBQUksQ0FBQyxRQUFRLENBQUMsWUFBWSxDQUFDLENBQUM7YUFDNUIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDLElBQUksRUFBRSxzQkFBc0IsQ0FBQyxDQUFDLENBQUM7YUFDNUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsaUJBQWlCLENBQUMsQ0FBQyxDQUFDO0lBQ3JDLENBQUMsQ0FBQztBQUNILENBQUM7QUFFRCxLQUFLLFVBQVUsSUFBSSxDQUFDLElBQUksR0FBRyxPQUFPLENBQUMsSUFBSTtJQUN0QyxNQUFNLE9BQU8sR0FBRyxPQUFPLENBQUMsa0JBQWtCLENBQUMsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLGtCQUFrQixFQUFFLENBQUM7SUFDbEYsTUFBTSxZQUFZLEdBQUcsSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFJLEVBQUUsUUFBUSxFQUFFLFVBQVUsQ0FBQyxDQUFDO0lBQzNELE1BQU0sV0FBVyxHQUFHLElBQUksQ0FBQyxJQUFJLENBQUMsWUFBWSxFQUFFLFNBQVMsQ0FBQyxDQUFDO0lBQ3ZELE1BQU0sVUFBVSxHQUFHLEVBQUUsQ0FBQyxVQUFVLENBQUMsV0FBVyxDQUFDLElBQUksRUFBRSxDQUFDLFlBQVksQ0FBQyxXQUFXLEVBQUUsTUFBTSxDQUFDLEtBQUssR0FBRyxPQUFPLEVBQUUsQ0FBQztJQUV2RyxJQUFJLENBQUMsVUFBVSxFQUFFO1FBQ2hCLE1BQU0sSUFBSSxDQUFDLE1BQU0sQ0FBQyxZQUFZLENBQUMsRUFBRSxDQUFDO1FBQ2xDLE1BQU0sSUFBSSxDQUFDLGVBQWUsQ0FBQyxXQUFXLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDO0tBQ2hEO0FBQ0YsQ0FBQztBQUVELElBQUksT0FBTyxDQUFDLElBQUksS0FBSyxNQUFNLEVBQUU7SUFDNUIsSUFBSSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLEVBQUU7UUFDakMsT0FBTyxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQztRQUNuQixPQUFPLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDO0lBQ2pCLENBQUMsQ0FBQyxDQUFDO0NBQ0gifQ== No newline at end of file //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWxlY3Ryb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJlbGVjdHJvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7OztnR0FHZ0c7OztBQUVoRyx5QkFBeUI7QUFDekIsNkJBQTZCO0FBQzdCLGdDQUFnQztBQUNoQyxzQ0FBc0M7QUFDdEMsZ0NBQWdDO0FBQ2hDLCtCQUErQjtBQUMvQiw2Q0FBMEM7QUFZMUMsU0FBUyxnQkFBZ0IsQ0FBQyxHQUFZO0lBQ3JDLE9BQU8sR0FBRyxLQUFLLFVBQVUsSUFBSSxHQUFHLEtBQUssUUFBUSxJQUFJLEdBQUcsS0FBSyxNQUFNLElBQUksR0FBRyxLQUFLLGFBQWEsQ0FBQztBQUMxRixDQUFDO0FBRUQsTUFBTSxJQUFJLEdBQUcsSUFBSSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUM7QUFDbkQsTUFBTSxPQUFPLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxFQUFFLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsSUFBSSxFQUFFLGNBQWMsQ0FBQyxFQUFFLE1BQU0sQ0FBQyxDQUFDLENBQUM7QUFDckYsTUFBTSxNQUFNLEdBQUcsSUFBQSx1QkFBVSxFQUFDLElBQUksQ0FBQyxDQUFDO0FBRWhDLE1BQU0scUJBQXFCLEdBQUcsT0FBTyxDQUFDLGFBQWEsSUFBSSxDQUFDLENBQUMsUUFBUSxDQUFDLEVBQUUsQ0FBQyxZQUFZLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFJLEVBQUUsT0FBTyxDQUFDLGFBQWEsQ0FBQyxFQUFFLE1BQU0sQ0FBQyxDQUFDLENBQUM7QUFFbkk7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQWtCRztBQUNILFNBQVMsd0JBQXdCLENBQUMsVUFBb0IsRUFBRSxJQUFZLEVBQUUsWUFBNEMsRUFBRSxJQUFlO0lBQ2xJLDJGQUEyRjtJQUMzRixJQUFJLGdCQUFnQixDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsWUFBWSxFQUFFO1FBQ3BELFlBQVksR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDLFdBQVcsRUFBRSxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLEdBQUcsR0FBRyxHQUFHLENBQUMsWUFBWSxJQUFJLFVBQVUsQ0FBQyxDQUFDO0tBQ2pHO0lBRUQsT0FBTztRQUNOLElBQUksRUFBRSxZQUFZO1FBQ2xCLElBQUksRUFBRSxRQUFRO1FBQ2QsT0FBTyxFQUFFLENBQUMsTUFBTSxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUUsTUFBTSxDQUFDO1FBQ3pDLFVBQVU7UUFDVixRQUFRLEVBQUUsbUJBQW1CLEdBQUcsSUFBSSxHQUFHLE9BQU87UUFDOUMsSUFBSTtLQUNKLENBQUM7QUFDSCxDQUFDO0FBRUQ7Ozs7Ozs7Ozs7R0FVRztBQUNILFNBQVMseUJBQXlCLENBQUMsS0FBNEMsRUFBRSxJQUFZO0lBQzVGLE9BQU8sTUFBTSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxJQUFZLEVBQXNCLEVBQUU7UUFDbEUsTUFBTSxVQUFVLEdBQUcsS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDO1FBQy9CLE9BQU87WUFDTixJQUFJO1lBQ0osSUFBSSxFQUFFLFFBQVE7WUFDZCxPQUFPLEVBQUUsQ0FBQyxNQUFNLEVBQUUsTUFBTSxFQUFFLE1BQU0sRUFBRSxNQUFNLENBQUM7WUFDekMsVUFBVSxFQUFFLEtBQUssQ0FBQyxPQUFPLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxVQUFVLENBQUM7WUFDakUsUUFBUSxFQUFFLG1CQUFtQixHQUFHLElBQUksR0FBRyxPQUFPO1NBQ3hCLENBQUM7SUFDekIsQ0FBQyxDQUFDLENBQUM7QUFDSixDQUFDO0FBRVksUUFBQSxNQUFNLEdBQUc7SUFDckIsT0FBTyxFQUFFLE9BQU8sQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsa0JBQWtCLEVBQUU7SUFDMUUsY0FBYyxFQUFFLE9BQU8sQ0FBQyxRQUFRO0lBQ2hDLFdBQVcsRUFBRSx1QkFBdUI7SUFDcEMsU0FBUyxFQUFFLG1EQUFtRDtJQUM5RCxVQUFVLEVBQUUsNEJBQTRCO0lBQ3hDLHNCQUFzQixFQUFFLE9BQU8sQ0FBQyxzQkFBc0I7SUFDdEQsNkJBQTZCLEVBQUUscUNBQXFDO0lBQ3BFLG9CQUFvQixFQUFFLGtCQUFrQjtJQUN4QyxrQkFBa0IsRUFBRSxrQkFBa0I7SUFDdEMseUJBQXlCLEVBQUU7UUFDMUIsR0FBRyx5QkFBeUIsQ0FBQyxFQUFFLGVBQWUsRUFBRSxHQUFHLEVBQUUsZUFBZSxFQUFFLEdBQUcsRUFBRSxFQUFFLEdBQUcsQ0FBQztRQUNqRixHQUFHLHlCQUF5QixDQUFDLEVBQUUsd0JBQXdCLEVBQUUsQ0FBQyxlQUFlLEVBQUUsV0FBVyxFQUFFLFdBQVcsQ0FBQyxFQUFFLEVBQUUsUUFBUSxDQUFDO1FBQ2pILEdBQUcseUJBQXlCLENBQUMsRUFBRSx3QkFBd0IsRUFBRSxDQUFDLEtBQUssRUFBRSxNQUFNLEVBQUUsUUFBUSxFQUFFLE9BQU8sRUFBRSxLQUFLLEVBQUUsT0FBTyxFQUFFLE9BQU8sQ0FBQyxFQUFFLEVBQUUsTUFBTSxDQUFDO1FBQy9ILHdCQUF3QixDQUFDLENBQUMsS0FBSyxFQUFFLEtBQUssQ0FBQyxFQUFFLEtBQUssRUFBRSx3QkFBd0IsQ0FBQztRQUN6RSx3QkFBd0IsQ0FBQyxDQUFDLFNBQVMsQ0FBQyxFQUFFLE9BQU8sQ0FBQztRQUM5Qyx3QkFBd0IsQ0FBQyxDQUFDLFFBQVEsRUFBRSxjQUFjLEVBQUUsS0FBSyxFQUFFLEtBQUssQ0FBQyxFQUFFLFFBQVEsRUFBRSxvQkFBb0IsQ0FBQztRQUNsRyx3QkFBd0IsQ0FBQyxDQUFDLElBQUksRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLEtBQUssQ0FBQyxFQUFFLEtBQUssRUFBRSxpQkFBaUIsQ0FBQztRQUMvRSx3QkFBd0IsQ0FBQyxDQUFDLElBQUksRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLEtBQUssQ0FBQyxFQUFFLEtBQUssRUFBRSxpQkFBaUIsQ0FBQztRQUMvRSx3QkFBd0IsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxFQUFFLFNBQVMsRUFBRSx5QkFBeUIsQ0FBQztRQUNyRSx3QkFBd0IsQ0FBQyxDQUFDLElBQUksQ0FBQyxFQUFFLEtBQUssRUFBRSwyQkFBMkIsQ0FBQztRQUNwRSx3QkFBd0IsQ0FBQyxDQUFDLElBQUksRUFBRSxLQUFLLENBQUMsRUFBRSxRQUFRLEVBQUUsZ0JBQWdCLENBQUM7UUFDbkUsd0JBQXdCLENBQUMsQ0FBQyxLQUFLLENBQUMsRUFBRSxLQUFLLEVBQUUsS0FBSyxDQUFDO1FBQy9DLHdCQUF3QixDQUFDLENBQUMsSUFBSSxDQUFDLEVBQUUsSUFBSSxFQUFFLGdCQUFnQixDQUFDO1FBQ3hELHdCQUF3QixDQUFDLENBQUMsS0FBSyxFQUFFLE1BQU0sRUFBRSxPQUFPLENBQUMsRUFBRSxNQUFNLENBQUM7UUFDMUQsd0JBQXdCLENBQUMsQ0FBQyxNQUFNLENBQUMsRUFBRSxNQUFNLENBQUM7UUFDMUMsd0JBQXdCLENBQUMsQ0FBQyxLQUFLLEVBQUUsTUFBTSxDQUFDLEVBQUUsTUFBTSxDQUFDO1FBQ2pELHdCQUF3QixDQUFDLENBQUMsSUFBSSxFQUFFLFFBQVEsRUFBRSxVQUFVLEVBQUUsS0FBSyxFQUFFLEtBQUssQ0FBQyxFQUFFLFlBQVksRUFBRSxNQUFNLENBQUM7UUFDMUYsd0JBQXdCLENBQUMsQ0FBQyxNQUFNLENBQUMsRUFBRSxNQUFNLENBQUM7UUFDMUMsd0JBQXdCLENBQUMsQ0FBQyxNQUFNLENBQUMsRUFBRSxNQUFNLENBQUM7UUFDMUMsd0JBQXdCLENBQUMsQ0FBQyxVQUFVLEVBQUUsSUFBSSxFQUFFLE1BQU0sRUFBRSxPQUFPLEVBQUUsUUFBUSxFQUFFLE9BQU8sRUFBRSxNQUFNLEVBQUUsS0FBSyxFQUFFLE1BQU0sQ0FBQyxFQUFFLFVBQVUsQ0FBQztRQUNuSCx3QkFBd0IsQ0FBQyxDQUFDLEtBQUssQ0FBQyxFQUFFLEtBQUssRUFBRSxhQUFhLENBQUM7UUFDdkQsd0JBQXdCLENBQUMsQ0FBQyxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sQ0FBQyxFQUFFLFlBQVksRUFBRSxRQUFRLENBQUM7UUFDekUsd0JBQXdCLENBQUMsQ0FBQyxJQUFJLEVBQUUsS0FBSyxDQUFDLEVBQUUsUUFBUSxFQUFFLFFBQVEsQ0FBQztRQUMzRCx3QkFBd0IsQ0FBQyxDQUFDLFNBQVMsRUFBRSxJQUFJLEVBQUUsS0FBSyxDQUFDLEVBQUUsTUFBTSxFQUFFLGFBQWEsQ0FBQztRQUN6RSx3QkFBd0IsQ0FBQyxDQUFDLE1BQU0sRUFBRSxNQUFNLENBQUMsRUFBRSxNQUFNLEVBQUUsTUFBTSxDQUFDO1FBQzFELHdCQUF3QixDQUFDLENBQUMsS0FBSyxDQUFDLEVBQUUsS0FBSyxFQUFFLFFBQVEsQ0FBQztRQUNsRCx3QkFBd0IsQ0FBQyxDQUFDLElBQUksQ0FBQyxFQUFFLFlBQVksRUFBRSxNQUFNLENBQUM7UUFDdEQsd0JBQXdCLENBQUMsQ0FBQyxLQUFLLEVBQUUsS0FBSyxDQUFDLEVBQUUsT0FBTyxFQUFFLGFBQWEsQ0FBQztRQUNoRSx3QkFBd0IsQ0FBQyxDQUFDLEtBQUssQ0FBQyxFQUFFLEtBQUssRUFBRSxhQUFhLENBQUM7UUFDdkQsd0JBQXdCLENBQUMsQ0FBQyxNQUFNLEVBQUUsUUFBUSxFQUFFLEtBQUssRUFBRSxPQUFPLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLE1BQU0sQ0FBQyxFQUFFLEtBQUssQ0FBQztRQUN2Ryx3QkFBd0IsQ0FBQyxDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLEtBQUssQ0FBQyxFQUFFLE1BQU0sQ0FBQztRQUNsRSx3QkFBd0IsQ0FBQztZQUN4QixNQUFNLEVBQUUsWUFBWSxFQUFFLGFBQWEsRUFBRSxjQUFjLEVBQUUsUUFBUTtZQUM3RCxTQUFTLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxJQUFJLEVBQUUsUUFBUSxFQUFFLFNBQVM7WUFDNUQsVUFBVSxFQUFFLEtBQUssRUFBRSxRQUFRLEVBQUUsT0FBTztTQUNwQyxFQUFFLE9BQU8sRUFBRSxRQUFRLENBQUM7UUFDckIsb0NBQW9DO1FBQ3BDLEdBQUcseUJBQXlCLENBQUM7WUFDNUIscUJBQXFCLEVBQUUsQ0FBQyxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sRUFBRSxTQUFTLENBQUM7WUFDekQsd0JBQXdCLEVBQUUsZ0JBQWdCO1lBQzFDLDBCQUEwQixFQUFFLFFBQVE7WUFDcEMsd0JBQXdCLEVBQUUsS0FBSztZQUMvQixjQUFjLEVBQUUsT0FBTztZQUN2QixhQUFhLEVBQUUsTUFBTTtZQUNyQixXQUFXLEVBQUUsTUFBTTtZQUNuQixZQUFZLEVBQUUsWUFBWTtZQUMxQixhQUFhLEVBQUUsUUFBUTtZQUN2QixlQUFlLEVBQUUsUUFBUTtZQUN6QixVQUFVLEVBQUUsQ0FBQyxVQUFVLEVBQUUsSUFBSSxDQUFDO1lBQzlCLFlBQVksRUFBRSxLQUFLO1lBQ25CLGNBQWMsRUFBRSxLQUFLO1lBQ3JCLFNBQVMsRUFBRSxPQUFPO1lBQ2xCLFVBQVUsRUFBRSxNQUFNO1lBQ2xCLFVBQVUsRUFBRSxLQUFLO1lBQ2pCLGlCQUFpQixFQUFFLEtBQUs7WUFDeEIsb0JBQW9CLEVBQUUsV0FBVztZQUNqQyxzQkFBc0IsRUFBRSxhQUFhO1lBQ3JDLHFCQUFxQixFQUFFLElBQUk7WUFDM0IsZUFBZSxFQUFFLEdBQUc7WUFDcEIsa0JBQWtCLEVBQUUsSUFBSTtZQUN4Qiw0QkFBNEIsRUFBRSxLQUFLO1lBQ25DLGdCQUFnQixFQUFFLENBQUMsS0FBSyxFQUFFLEtBQUssQ0FBQztZQUNoQyxnQkFBZ0IsRUFBRSxJQUFJO1lBQ3RCLG1CQUFtQixFQUFFLEtBQUs7WUFDMUIsV0FBVyxFQUFFLENBQUMsS0FBSyxFQUFFLFVBQVUsQ0FBQztZQUNoQyxjQUFjLEVBQUUsQ0FBQyxLQUFLLEVBQUUsTUFBTSxDQUFDO1lBQy9CLGVBQWUsRUFBRSxNQUFNO1lBQ3ZCLG1CQUFtQixFQUFFLE9BQU87U0FDNUIsRUFBRSxTQUFTLENBQUM7UUFDYixpQ0FBaUM7UUFDakMsd0JBQXdCLENBQUM7WUFDeEIsZUFBZSxFQUFFLEtBQUssRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQUUsSUFBSSxFQUFFLEtBQUs7WUFDdEUsSUFBSSxFQUFFLEtBQUssRUFBRSxJQUFJLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBRSxJQUFJLEVBQUUsWUFBWSxFQUFFLE1BQU0sRUFBRSxJQUFJLEVBQUUsR0FBRztTQUN0RSxFQUFFLFNBQVMsRUFBRSxPQUFPLENBQUMsUUFBUSxHQUFHLFdBQVcsQ0FBQztRQUM3QyxvQkFBb0I7UUFDcEIsd0JBQXdCLENBQUMsRUFBRSxFQUFFLFNBQVMsRUFBRSxRQUFRLEVBQUUsQ0FBQyxlQUFlLENBQUMsQ0FBQztLQUNwRTtJQUNELG9CQUFvQixFQUFFLENBQUM7WUFDdEIsSUFBSSxFQUFFLFFBQVE7WUFDZCxJQUFJLEVBQUUsT0FBTyxDQUFDLFFBQVE7WUFDdEIsVUFBVSxFQUFFLENBQUMsT0FBTyxDQUFDLFdBQVcsQ0FBQztTQUNqQyxDQUFDO0lBQ0YsMEJBQTBCLEVBQUUsSUFBSTtJQUNoQyxhQUFhLEVBQUUscUJBQXFCLENBQUMsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMscUJBQXFCLENBQUMsRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLElBQUksRUFBRSxJQUFJLElBQUksRUFBRSxDQUFDLFdBQVcsRUFBRSxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxTQUFTO0lBQ3pJLG1CQUFtQixFQUFFLE9BQU8sQ0FBQyxlQUFlO0lBQzVDLE9BQU8sRUFBRSwwQkFBMEI7SUFDbkMsS0FBSyxFQUFFLE9BQU8sQ0FBQyxHQUFHLENBQUMsY0FBYyxDQUFDO0lBQ2xDLElBQUksRUFBRSxPQUFPLENBQUMsa0JBQWtCLElBQUksU0FBUztDQUM3QyxDQUFDO0FBRUYsU0FBUyxXQUFXLENBQUMsSUFBWTtJQUNoQyxPQUFPLEdBQUcsRUFBRTtRQUNYLE1BQU0sUUFBUSxHQUFHLE9BQU8sQ0FBQyxvQkFBb0IsQ0FBQyxDQUFDO1FBQy9DLE1BQU0sSUFBSSxHQUFHLE9BQU8sQ0FBQyxrQkFBa0IsQ0FBc0MsQ0FBQztRQUU5RSxNQUFNLFlBQVksR0FBRyxDQUFDLENBQUMsTUFBTSxDQUFDLEVBQUUsRUFBRSxjQUFNLEVBQUU7WUFDekMsUUFBUSxFQUFFLE9BQU8sQ0FBQyxRQUFRO1lBQzFCLElBQUksRUFBRSxJQUFJLEtBQUssT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLElBQUk7WUFDckMsY0FBYyxFQUFFLEtBQUs7WUFDckIsY0FBYyxFQUFFLElBQUk7U0FDcEIsQ0FBQyxDQUFDO1FBRUgsT0FBTyxHQUFHLENBQUMsR0FBRyxDQUFDLGNBQWMsQ0FBQzthQUM1QixJQUFJLENBQUMsSUFBSSxDQUFDLEVBQUUsSUFBSSxFQUFFLE9BQU8sQ0FBQyxTQUFTLEVBQUUsQ0FBQyxDQUFDO2FBQ3ZDLElBQUksQ0FBQyxRQUFRLENBQUMsWUFBWSxDQUFDLENBQUM7YUFDNUIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDLElBQUksRUFBRSxzQkFBc0IsQ0FBQyxDQUFDLENBQUM7YUFDNUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsaUJBQWlCLENBQUMsQ0FBQyxDQUFDO0lBQ3JDLENBQUMsQ0FBQztBQUNILENBQUM7QUFFRCxLQUFLLFVBQVUsSUFBSSxDQUFDLElBQUksR0FBRyxPQUFPLENBQUMsSUFBSTtJQUN0QyxNQUFNLE9BQU8sR0FBRyxPQUFPLENBQUMsa0JBQWtCLENBQUMsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLGtCQUFrQixFQUFFLENBQUM7SUFDbEYsTUFBTSxZQUFZLEdBQUcsSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFJLEVBQUUsUUFBUSxFQUFFLFVBQVUsQ0FBQyxDQUFDO0lBQzNELE1BQU0sV0FBVyxHQUFHLElBQUksQ0FBQyxJQUFJLENBQUMsWUFBWSxFQUFFLFNBQVMsQ0FBQyxDQUFDO0lBQ3ZELE1BQU0sVUFBVSxHQUFHLEVBQUUsQ0FBQyxVQUFVLENBQUMsV0FBVyxDQUFDLElBQUksRUFBRSxDQUFDLFlBQVksQ0FBQyxXQUFXLEVBQUUsTUFBTSxDQUFDLEtBQUssR0FBRyxPQUFPLEVBQUUsQ0FBQztJQUV2RyxJQUFJLENBQUMsVUFBVSxFQUFFO1FBQ2hCLE1BQU0sSUFBSSxDQUFDLE1BQU0sQ0FBQyxZQUFZLENBQUMsRUFBRSxDQUFDO1FBQ2xDLE1BQU0sSUFBSSxDQUFDLGVBQWUsQ0FBQyxXQUFXLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDO0tBQ2hEO0FBQ0YsQ0FBQztBQUVELElBQUksT0FBTyxDQUFDLElBQUksS0FBSyxNQUFNLEVBQUU7SUFDNUIsSUFBSSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLEVBQUU7UUFDakMsT0FBTyxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQztRQUNuQixPQUFPLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDO0lBQ2pCLENBQUMsQ0FBQyxDQUFDO0NBQ0gifQ== No newline at end of file"} {"_id":"doc-en-vscode-f411f34baffd0dc5c9b4f3d42d5e1b95bda936caa7f2c7b19f5f9dff03e7af9d","title":"","text":"} export const config = { version: product.electronRepository ? '22.4.4' : util.getElectronVersion(), version: product.electronRepository ? '22.4.5' : util.getElectronVersion(), productAppName: product.nameLong, companyName: 'Microsoft Corporation', copyright: 'Copyright (C) 2023 Microsoft. All rights reserved',"} {"_id":"doc-en-vscode-9c0d1446ded92b547da41d0d7f1eaf3e411aaef47121c6d623899da1fc76a868","title":"","text":"const electronOpts = _.extend({}, config, { platform: process.platform, arch: arch === 'armhf' ? 'arm' : arch, ffmpegChromium: true, ffmpegChromium: false, keepDefaultApp: true });"} {"_id":"doc-en-vscode-9be9c5ce7c5e7523ae8b9d245bc2f366767c2769dffbe142dcc7b7696f26c8d3","title":"","text":"} async function main(arch = process.arch): Promise { const version = product.electronRepository ? '22.4.4' : util.getElectronVersion(); const version = product.electronRepository ? '22.4.5' : util.getElectronVersion(); const electronPath = path.join(root, '.build', 'electron'); const versionFile = path.join(electronPath, 'version'); const isUpToDate = fs.existsSync(versionFile) && fs.readFileSync(versionFile, 'utf8') === `${version}`;"} {"_id":"doc-en-vscode-ce0516ac9b4063c1f7c0fe0e10987a25f6f619134f0ca3595fa6e3f5cfc94488","title":"","text":"/** * Removes the optional link suffix which contains line and column information. * @param link The link to parse. * @param link The link to use. */ export function removeLinkSuffix(link: string): string { const suffix = getLinkSuffix(link)?.suffix;"} {"_id":"doc-en-vscode-48b362f927846bab6f4b19563469bfcbbfc5a9c8f6f86336fcdb28f246284686","title":"","text":"} /** * Removes any query string from the link. * @param link The link to use. */ export function removeLinkQueryString(link: string): string { // Skip ? in UNC paths const start = link.startsWith('?') ? 4 : 0; const index = link.indexOf('?', start); if (index === -1) { return link; } return link.substring(0, index); } /** * Returns the optional link suffix which contains line and column information. * @param link The link to parse. */"} {"_id":"doc-en-vscode-3e27c6ce110dca61aaa20dab23e49edcd33938c19b077875eaa9f6b1b76528a0","title":"","text":"*--------------------------------------------------------------------------------------------*/ import { ITerminalLinkResolver, ResolvedLink } from 'vs/workbench/contrib/terminalContrib/links/browser/links'; import { removeLinkSuffix, winDrivePrefix } from 'vs/workbench/contrib/terminalContrib/links/browser/terminalLinkParsing'; import { removeLinkSuffix, removeLinkQueryString, winDrivePrefix } from 'vs/workbench/contrib/terminalContrib/links/browser/terminalLinkParsing'; import { URI } from 'vs/base/common/uri'; import { ITerminalBackend, ITerminalProcessManager } from 'vs/workbench/contrib/terminal/common/terminal'; import { Schemas } from 'vs/base/common/network';"} {"_id":"doc-en-vscode-412c47b58bbdcdc28c6aac73fd6a99bf54017fab7fc403457518f64a20ea74b3","title":"","text":"} } // Remove any line/col suffix before processing the path // Remove any line/col suffix let linkUrl = removeLinkSuffix(link); if (!linkUrl) { // Remove any query string linkUrl = removeLinkQueryString(linkUrl); // Exit early if the link is determines as not valid already if (linkUrl.length === 0) { cache.set(link, null); return null; }"} {"_id":"doc-en-vscode-aa674b049390d5d93be1c7f5a016c30977609827d3416480e79efa1df28f4043","title":"","text":"import { deepStrictEqual, ok, strictEqual } from 'assert'; import { OperatingSystem } from 'vs/base/common/platform'; import { detectLinks, detectLinkSuffixes, getLinkSuffix, IParsedLink, removeLinkSuffix } from 'vs/workbench/contrib/terminalContrib/links/browser/terminalLinkParsing'; import { detectLinks, detectLinkSuffixes, getLinkSuffix, IParsedLink, removeLinkQueryString, removeLinkSuffix } from 'vs/workbench/contrib/terminalContrib/links/browser/terminalLinkParsing'; interface ITestLink { link: string;"} {"_id":"doc-en-vscode-da95809965e0437dc50d9153c6f2f5892ff3cab30786a8ad75e7f985c65f6894","title":"","text":"); }); }); suite('removeLinkQueryString', () => { test('should remove any query string from the link', () => { strictEqual(removeLinkQueryString('?a=b'), ''); strictEqual(removeLinkQueryString('foo?a=b'), 'foo'); strictEqual(removeLinkQueryString('./foo?a=b'), './foo'); strictEqual(removeLinkQueryString('/foo/bar?a=b'), '/foo/bar'); strictEqual(removeLinkQueryString('foo?a=b?'), 'foo'); strictEqual(removeLinkQueryString('foo?a=b&c=d'), 'foo'); }); test('should respect ? in UNC paths', () => { strictEqual(removeLinkQueryString('?foo?a=b'), '?foo',); }); }); suite('detectLinks', () => { test('foo(1, 2) bar[3, 4] \"baz\" on line 5', () => { deepStrictEqual("} {"_id":"doc-en-vscode-963cc89a58c34a755784c3e045c4c4cdfe00974eebb8c6f29d9727df955384e9","title":"","text":"'builtin-extensions-dir': { type: 'string' }, 'list-extensions': { type: 'boolean', cat: 'e', description: localize('listExtensions', \"List the installed extensions.\") }, 'show-versions': { type: 'boolean', cat: 'e', description: localize('showVersions', \"Show versions of installed extensions, when using --list-extensions.\") }, 'category': { type: 'string', cat: 'e', description: localize('category', \"Filters installed extensions by provided category, when using --list-extensions.\"), args: 'category' }, 'category': { type: 'string', allowEmptyValue: true, cat: 'e', description: localize('category', \"Filters installed extensions by provided category, when using --list-extensions.\"), args: 'category' }, 'install-extension': { type: 'string[]', cat: 'e', args: 'ext-id | path', description: localize('installExtension', \"Installs or updates an extension. The argument is either an extension id or a path to a VSIX. The identifier of an extension is '${publisher}.${name}'. Use '--force' argument to update to latest version. To install a specific version provide '@${version}'. For example: 'vscode.csharp@1.2.3'.\") }, 'pre-release': { type: 'boolean', cat: 'e', description: localize('install prerelease', \"Installs the pre-release version of the extension, when using --install-extension\") }, 'uninstall-extension': { type: 'string[]', cat: 'e', args: 'ext-id', description: localize('uninstallExtension', \"Uninstalls an extension.\") },"} {"_id":"doc-en-vscode-7449001da98ae3a76c7ad32eb6a4e2eddb871aad64ca41cd051e94e2b4e8ff23","title":"","text":"pick: async () => { // Do a late 'onDebugDynamicConfigurationsName' activation so extensions are not activated too early #108578 await this.adapterManager.activateDebuggers(onDebugDynamicConfigurationsName, type); const disposables = new DisposableStore(); const input = disposables.add(this.quickInputService.createQuickPick()); input.busy = true; input.placeholder = nls.localize('selectConfiguration', \"Select Launch Configuration\"); input.show(); const chosenPromise = new Promise(resolve => { disposables.add(input.onDidAccept(() => resolve(input.activeItems[0]))); disposables.add(input.onDidTriggerItemButton(async (context) => { resolve(undefined); const { launch, config } = context.item; await launch.openConfigFile({ preserveFocus: false, type: config.type, suppressInitialConfigs: true }); // Only Launch have a pin trigger button await (launch as Launch).writeConfiguration(config); await this.selectConfiguration(launch, config.name); this.removeRecentDynamicConfigurations(config.name, config.type); })); }); const token = new CancellationTokenSource(); const picks: Promise[] = [];"} {"_id":"doc-en-vscode-01e8ae7542a77386caf9216e2e7f9f123efb04fb1cfd8438190be5f83fedc336","title":"","text":"} }); const disposables = new DisposableStore(); const input = disposables.add(this.quickInputService.createQuickPick()); input.busy = true; input.placeholder = nls.localize('selectConfiguration', \"Select Launch Configuration\"); const chosenPromise = new Promise(resolve => { disposables.add(input.onDidAccept(() => resolve(input.activeItems[0]))); disposables.add(input.onDidTriggerItemButton(async (context) => { resolve(undefined); const { launch, config } = context.item; await launch.openConfigFile({ preserveFocus: false, type: config.type, suppressInitialConfigs: true }); // Only Launch have a pin trigger button await (launch as Launch).writeConfiguration(config); await this.selectConfiguration(launch, config.name); this.removeRecentDynamicConfigurations(config.name, config.type); })); }); const nestedPicks = await Promise.all(picks); const items = flatten(nestedPicks); input.items = items; input.busy = false; input.show(); const chosen = await chosenPromise; disposables.dispose();"} {"_id":"doc-en-vscode-464e7b85d1673a6762ea4c8af6b8bd1095f5fdc159692ecac08db5133d66f534","title":"","text":"} else { if (options.hideOnHover === undefined) { // When unset, will default to true when it's a string or when it's markdown that // appears to have a link using a naive check for '](' hideOnHover = typeof options.content === 'string' || isMarkdownString(options.content) && !options.content.value.includes(']('); // appears to have a link using a naive check for '](' and '' hideOnHover = typeof options.content === 'string' || isMarkdownString(options.content) && !options.content.value.includes('](') && !options.content.value.includes(''); } else { // It's set explicitly hideOnHover = options.hideOnHover;"} {"_id":"doc-en-vscode-53de47a35ba7de5b3499a8529f7c6f72a69c9ef95c8bd55ae4c2d0be2a2087ea","title":"","text":"const isWrapped = buffer.getLine(i + 1)?.isWrapped; currentLine += line.translateToString(!isWrapped); if (currentLine && !isWrapped || i === (buffer.baseY + this._xterm.raw.rows - 1)) { const line = replaceWithNonBreakingSpaces(currentLine); if (line.length) { cachedLines.push(line); cachedLines.push(currentLine); currentLine = ''; } }"} {"_id":"doc-en-vscode-f496f4304a605e1bb9a3237ff616a24a1bd448711f2a6b9d95557515f339435d","title":"","text":"const isWrapped = buffer.getLine(i + 1)?.isWrapped; currentLine += line.translateToString(!isWrapped); if (currentLine && !isWrapped || i === (buffer.baseY + this._xterm.raw.rows - 1)) { const line = replaceWithNonBreakingSpaces(currentLine); if (line.length) { if (currentLine.length) { this._priorEditorViewportLineCount++; this._lines.push(line); this._lines.push(currentLine); currentLine = ''; } }"} {"_id":"doc-en-vscode-35633bcee48226f3b0b79a3f76a60fcd876bf9694b1ebc92294df3ddca408d0b","title":"","text":"this._logService.debug('Viewport content update complete, ', this._lines.length, ' lines in the viewport'); } } export function replaceWithNonBreakingSpaces(s: string): string { return s.replace(new RegExp(' ', 'g'), ' xA0'); } "} {"_id":"doc-en-vscode-7554b9906bbc1a20af9a0b54bffe3f953c6264af52e6fb1577e82fc472cdaa1b","title":"","text":"import { writeP } from 'vs/workbench/contrib/terminal/browser/terminalTestHelpers'; import { XtermTerminal } from 'vs/workbench/contrib/terminal/browser/xterm/xtermTerminal'; import { ITerminalConfiguration } from 'vs/workbench/contrib/terminal/common/terminal'; import { BufferContentTracker, replaceWithNonBreakingSpaces } from 'vs/workbench/contrib/terminalContrib/accessibility/browser/bufferContentTracker'; import { BufferContentTracker } from 'vs/workbench/contrib/terminalContrib/accessibility/browser/bufferContentTracker'; import { ILifecycleService } from 'vs/workbench/services/lifecycle/common/lifecycle'; import { TestLifecycleService } from 'vs/workbench/test/browser/workbenchTestServices'; import { Terminal } from 'xterm';"} {"_id":"doc-en-vscode-e8702c47b45df019d2f16ba7562b7fe3c1b4242f71f3c2bf4eee43444ed83ba3","title":"","text":"assert.strictEqual(bufferTracker.lines.length, 0); await writeP(xterm.raw, prompt); xterm.clearBuffer(); await bufferTracker.update(); bufferTracker.update(); assert.deepStrictEqual(bufferTracker.lines, [prompt]); assert.strictEqual(bufferTracker.lines.length, 1); }); test('repeated updates should not change the content', async () => { assert.strictEqual(bufferTracker.lines.length, 0); await writeP(xterm.raw, prompt); await bufferTracker.update(); bufferTracker.update(); assert.deepStrictEqual(bufferTracker.lines, [prompt]); assert.strictEqual(bufferTracker.lines.length, 1); await bufferTracker.update(); bufferTracker.update(); assert.deepStrictEqual(bufferTracker.lines, [prompt]); assert.strictEqual(bufferTracker.lines.length, 1); await bufferTracker.update(); bufferTracker.update(); assert.deepStrictEqual(bufferTracker.lines, [prompt]); assert.strictEqual(bufferTracker.lines.length, 1); }); test('should add lines in the viewport and scrollback', async () => { await writeAndAssertBufferState(promptPlusData, 38, xterm.raw, bufferTracker);"} {"_id":"doc-en-vscode-48b078c4a4f9d88fd55734c7a3412757ec895c5a61ba1fdc7a99ef1cfa093f2b","title":"","text":"test('should refresh viewport', async () => { await writeAndAssertBufferState(promptPlusData, 6, xterm.raw, bufferTracker); await writeP(xterm.raw, 'x1b[3Ainserteddata'); await bufferTracker.update(); assert.deepStrictEqual(bufferTracker.lines, [promptPlusData, promptPlusData, `${promptPlusData}inserteddata`, promptPlusData, promptPlusData, promptPlusData].map(s => replaceWithNonBreakingSpaces(s))); bufferTracker.update(); assert.deepStrictEqual(bufferTracker.lines, [promptPlusData, promptPlusData, `${promptPlusData}inserteddata`, promptPlusData, promptPlusData, promptPlusData]); }); test('should refresh viewport with full scrollback', async () => { const content = replaceWithNonBreakingSpaces(`${prompt}rn`.repeat(1030).trimEnd()); const content = `${prompt}rn`.repeat(1030).trimEnd(); await writeP(xterm.raw, content); await bufferTracker.update(); bufferTracker.update(); await writeP(xterm.raw, 'x1b[4Ainsertion'); await bufferTracker.update(); bufferTracker.update(); const expected = content.split('rn'); expected[1025] = `${prompt}insertion`; assert.deepStrictEqual(bufferTracker.lines[1025], `${prompt}insertion`);"} {"_id":"doc-en-vscode-284e1465846d001a90552dc8395acb09a60fc891c619008540afdd3c99d2992f","title":"","text":"test('should cap the size of the cached lines, removing old lines in favor of new lines', async () => { const content = `${prompt}rn`.repeat(1036).trimEnd(); await writeP(xterm.raw, content); await bufferTracker.update(); const expected = content.split('rn').map(s => replaceWithNonBreakingSpaces(s)); bufferTracker.update(); const expected = content.split('rn'); // delete the 6 lines that should be trimmed for (let i = 0; i < 6; i++) { expected.pop(); } // insert a new character await writeP(xterm.raw, 'x1b[2Ainsertion'); await bufferTracker.update(); bufferTracker.update(); expected[1027] = `${prompt}insertion`; assert.strictEqual(bufferTracker.lines.length, expected.length); assert.deepStrictEqual(bufferTracker.lines, expected);"} {"_id":"doc-en-vscode-622c39512b0e33b12885bdffd0c1c6369005fd701c718f7cf72b8dcb555778cd","title":"","text":"async function writeAndAssertBufferState(data: string, rows: number, terminal: Terminal, bufferTracker: BufferContentTracker): Promise { const content = `${data}rn`.repeat(rows).trimEnd(); await writeP(terminal, content); await bufferTracker.update(); bufferTracker.update(); assert.strictEqual(bufferTracker.lines.length, rows); assert.deepStrictEqual(bufferTracker.lines, content.split('rn').map(s => replaceWithNonBreakingSpaces(s))); assert.deepStrictEqual(bufferTracker.lines, content.split('rn')); }"} {"_id":"doc-en-vscode-f34b4faad3669f543ace27e29ecd8bfae026f33c3bd472c4ac1071a37e0944df","title":"","text":"} try { itemOrItems = Array.isArray(itemOrItems) ? itemOrItems : [itemOrItems]; await Promise.all(itemOrItems.map(element => { return tree.expand(element, false); })); for (const element of itemOrItems) { await tree.expand(element, false); } } catch (e) { // The extension could have changed the tree during the reveal. // Because of that, we ignore errors."} {"_id":"doc-en-vscode-605475ffc5dd9313ec1fbbe96341ed95ebb3411b01b67adcb0617b36b943f864","title":"","text":"export function setup(ensureStableCode: () => string | undefined, logger: Logger) { describe('Data Loss (insiders -> insiders)', function () { // Double the timeout since these tests involve 2 startups this.timeout(4 * 60 * 1000); let app: Application | undefined = undefined; // Shared before/after handling"} {"_id":"doc-en-vscode-004c00bc37a4930bfc4fc9c17e9a43b19939d680e7ce61fe657fceeb7a45a4b8","title":"","text":"}); describe('Data Loss (stable -> insiders)', function () { // Double the timeout since these tests involve 2 startups this.timeout(4 * 60 * 1000); let insidersApp: Application | undefined = undefined; let stableApp: Application | undefined = undefined;"} {"_id":"doc-en-vscode-74f8e04f6f1cda2ee455eb42ead37707fa297f69b15311312e6544eed34c9de4","title":"","text":"interface InputTemplate { readonly inputWidget: SCMInputWidget; inputWidgetHeight: number; readonly elementDisposables: DisposableStore; readonly templateDisposable: IDisposable; }"} {"_id":"doc-en-vscode-aa392d66ea5e44dc978b7fe6a6f4bc4f518fc65400f1e6321d6d10fbb70bea04","title":"","text":"const inputWidget = this.instantiationService.createInstance(SCMInputWidget, inputElement, this.overflowWidgetsDomNode); templateDisposable.add(inputWidget); return { inputWidget, elementDisposables: new DisposableStore(), templateDisposable }; return { inputWidget, inputWidgetHeight: InputRenderer.DEFAULT_HEIGHT, elementDisposables: new DisposableStore(), templateDisposable }; } renderElement(node: ITreeNode, index: number, templateData: InputTemplate): void {"} {"_id":"doc-en-vscode-d71f26a10cfd22ec71d5f224a83477848efd94e91cacbccaa63695f296956e18","title":"","text":"// Remember widget this.inputWidgets.set(input, templateData.inputWidget); templateData.elementDisposables.add({ dispose: () => { this.inputWidgets.delete(input); this.contentHeights.delete(input); } dispose: () => this.inputWidgets.delete(input) }); // Widget cursor selections"} {"_id":"doc-en-vscode-982c73f21644362495ab05c18ababc8dbe31cd33870231ab73c77137edac0500","title":"","text":"// Rerender the element whenever the editor content height changes const onDidChangeContentHeight = () => { const contentHeight = templateData.inputWidget.getContentHeight(); const lastContentHeight = this.contentHeights.get(input)!; this.contentHeights.set(input, contentHeight); if (lastContentHeight !== contentHeight) { if (templateData.inputWidgetHeight !== contentHeight) { this.updateHeight(input, contentHeight + 10); templateData.inputWidgetHeight = contentHeight; templateData.inputWidget.layout(); } };"} {"_id":"doc-en-vscode-ffcef5ee02b878e3af4ffec94d9318b6e43a5fc9d99f4cd6e9c391862a6eeaf4","title":"","text":"override async setInput(newInput: GettingStartedInput, options: IEditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken) { this.container.classList.remove('animatable'); this.editorInput = newInput; await this.lifecycleService.when(LifecyclePhase.Restored); await super.setInput(newInput, options, context, token); await this.lifecycleService.when(LifecyclePhase.Restored); await this.buildCategoriesSlide(); if (this.shouldAnimate()) { setTimeout(() => this.container.classList.add('animatable'), 0);"} {"_id":"doc-en-vscode-f944668a0fc48ce26027a9c4519c302ffc37ea6825ebbfa42fd7d6be8d5fcff1","title":"","text":"} result[id] = [data.propagate, data.tooltip, data.badge, data.color]; } catch (e) { this._logService.warn(`INVALID decoration from extension '${extensionId}': ${e}`); this._logService.warn(`INVALID decoration from extension '${extensionId.identifier.value}': ${e}`); } } catch (err) { this._logService.error(err);"} {"_id":"doc-en-vscode-36bcbfb45766e08281e3af11f3c09e060f2e750b43fbd71a45d4016553e2b85d","title":"","text":"end set -e VSCODE_PATH_PREFIX # Apply EnvironmentVariableCollections if needed if test -n \"$VSCODE_ENV_REPLACE\" set ITEMS (string split : $VSCODE_ENV_REPLACE) for B in $ITEMS set split (string split = $B) set -gx \"$split[1]\" (echo -e \"$split[2]\") set -g __vsc_applied_env_vars 0 function __vsc_apply_env_vars if test $__vsc_applied_env_vars -eq 1; return end set -e VSCODE_ENV_REPLACE end if test -n \"$VSCODE_ENV_PREPEND\" set ITEMS (string split : $VSCODE_ENV_PREPEND) for B in $ITEMS set split (string split = $B) set -gx \"$split[1]\" (echo -e \"$split[2]\")\"$$split[1]\" # avoid -p as it adds a space set -l __vsc_applied_env_vars 1 # Apply EnvironmentVariableCollections if needed if test -n \"$VSCODE_ENV_REPLACE\" set ITEMS (string split : $VSCODE_ENV_REPLACE) for B in $ITEMS set split (string split = $B) set -gx \"$split[1]\" (echo -e \"$split[2]\") end set -e VSCODE_ENV_REPLACE end set -e VSCODE_ENV_PREPEND end if test -n \"$VSCODE_ENV_APPEND\" set ITEMS (string split : $VSCODE_ENV_APPEND) for B in $ITEMS set split (string split = $B) set -gx \"$split[1]\" \"$$split[1]\"(echo -e \"$split[2]\") # avoid -a as it adds a space if test -n \"$VSCODE_ENV_PREPEND\" set ITEMS (string split : $VSCODE_ENV_PREPEND) for B in $ITEMS set split (string split = $B) set -gx \"$split[1]\" (echo -e \"$split[2]\")\"$$split[1]\" # avoid -p as it adds a space end set -e VSCODE_ENV_PREPEND end if test -n \"$VSCODE_ENV_APPEND\" set ITEMS (string split : $VSCODE_ENV_APPEND) for B in $ITEMS set split (string split = $B) set -gx \"$split[1]\" \"$$split[1]\"(echo -e \"$split[2]\") # avoid -a as it adds a space end set -e VSCODE_ENV_APPEND end set -e VSCODE_ENV_APPEND end # Handle the shell integration nonce"} {"_id":"doc-en-vscode-3990e4b892ccd5fc9a72c3aeb3147970ef6cdb2ccb926fb40ee59acb81f986a3","title":"","text":"# Sent at the start of the prompt. # Marks the beginning of the prompt (and, implicitly, a new line). function __vsc_fish_prompt_start # Applying environment variables is deferred to after config.fish has been # evaluated __vsc_apply_env_vars __vsc_esc A end"} {"_id":"doc-en-vscode-935bd6ff02a44a0018dd5ab3c723ff770f76bcbaa028977857f9448bd82b738e","title":"","text":"group: 'navigation/execute', when: ContextKeyExpr.and( executeNotebookCondition, ContextKeyExpr.or(NOTEBOOK_INTERRUPTIBLE_KERNEL.toNegated(), NOTEBOOK_HAS_SOMETHING_RUNNING.toNegated()), ContextKeyExpr.or( NOTEBOOK_INTERRUPTIBLE_KERNEL.toNegated(), NOTEBOOK_HAS_SOMETHING_RUNNING.toNegated(), ), ContextKeyExpr.and(NOTEBOOK_HAS_SOMETHING_RUNNING, NOTEBOOK_INTERRUPTIBLE_KERNEL.toNegated())?.negate(), ContextKeyExpr.equals('config.notebook.globalToolbar', true) ) }"} {"_id":"doc-en-vscode-3d41297462fd6ad62cf7ce9592c92e2c8ae603e2bb4ed7260001b1e7d32787ae","title":"","text":"return await this.run(Operation.Ignore, async () => { const ignoreFile = `${this.repository.root}${path.sep}.gitignore`; const textToAppend = files .map(uri => relativePath(this.repository.root, uri.fsPath).replace(//g, '/')) .map(uri => relativePath(this.repository.root, uri.fsPath) .replace(/|[/g, match => match === '' ? '/' : `${match}`)) .join('n'); const document = await new Promise(c => fs.exists(ignoreFile, c))"} {"_id":"doc-en-vscode-c21ce86726c1f9504e9eb2b7443ec7024a487ec31e25067f4842d38aebf891d6","title":"","text":"tsx: false, decorators: true }, target: 'es2020', target: 'es2022', loose: false, minify: { compress: false,"} {"_id":"doc-en-vscode-570a26c64684b31b25fdc5513ee9ecca6c78640f3dbcb24c8a04597179d28c8d","title":"","text":"\"./vs/*\" ] }, \"target\": \"es2022\", \"useDefineForClassFields\": false, \"lib\": [ \"ES2016\", \"ES2017.Object\", \"ES2017.String\", \"ES2017.Intl\", \"ES2017.TypedArrays\", \"ES2018.AsyncIterable\", \"ES2018.AsyncGenerator\", \"ES2018.Promise\", \"ES2018.Regexp\", \"ES2018.Intl\", \"ES2019.Array\", \"ES2019.Object\", \"ES2019.String\", \"ES2019.Symbol\", \"ES2020.BigInt\", \"ES2020.Promise\", \"ES2020.String\", \"ES2020.Symbol.WellKnown\", \"ES2020.Intl\", \"ES2021.Promise\", \"ES2021.String\", \"ES2021.WeakRef\", \"ES2022\", \"DOM\", \"DOM.Iterable\", \"WebWorker.ImportScripts\""} {"_id":"doc-en-vscode-782e24219081ae8119ab612234a85d5215e0449ba4302d6bde95db3b604e88bc","title":"","text":"\"allowJs\": true, \"resolveJsonModule\": true, \"outDir\": \"../out/vs\", \"target\": \"es2021\", \"types\": [ \"keytar\", \"mocha\","} {"_id":"doc-en-vscode-290c4ddc22f986e0f96b970994d25c512b926806db41a1f97d256b7dad1fa960","title":"","text":"export class ExtractError extends Error { readonly type?: ExtractErrorType; readonly cause: Error; constructor(type: ExtractErrorType | undefined, cause: Error) { let message = cause.message;"} {"_id":"doc-en-vscode-bc3a27dcb7a6201ecd348e8c68bac58c3691f20ae69119c52dbb79e6f7fbbf79","title":"","text":"export abstract class ErrorHandler { static { static async installEarlyHandler(accessor: ServicesAccessor): Promise { // increase number of stack frames (from 10, https://github.com/v8/v8/wiki/Stack-Trace-API) Error.stackTraceLimit = 100; } static async installEarlyHandler(accessor: ServicesAccessor): Promise { // does NOT dependent of extension information, can be installed immediately, and simply forwards // to the log service and main thread errors const logService = accessor.get(ILogService);"} {"_id":"doc-en-vscode-a732306279f2b446a45bdaea962ee17db0d6d2f1217431ff28ec7accd476785d","title":"","text":"private async initialize(): Promise { await this.extensionsScannerService.initializeDefaultProfileExtensions(); await this.onDidChangeProfiles(this.userDataProfilesService.profiles, []); await this.onDidChangeProfiles(this.userDataProfilesService.profiles); this.registerListeners(); await this.uninstallExtensionsNotInProfiles(); } private registerListeners(): void { this._register(this.userDataProfilesService.onDidChangeProfiles(e => this.onDidChangeProfiles(e.added, e.removed))); this._register(this.userDataProfilesService.onDidChangeProfiles(e => this.onDidChangeProfiles(e.added))); this._register(this.extensionsProfileScannerService.onAddExtensions(e => this.onAddExtensions(e))); this._register(this.extensionsProfileScannerService.onDidAddExtensions(e => this.onDidAddExtensions(e))); this._register(this.extensionsProfileScannerService.onRemoveExtensions(e => this.onRemoveExtensions(e)));"} {"_id":"doc-en-vscode-88547c8a519be1246eefda51654613dadf757018275e240324242e65341c0f0e","title":"","text":"this._register(this.fileService.onDidFilesChange(e => this.onDidFilesChange(e))); } private async onDidChangeProfiles(added: readonly IUserDataProfile[], removed: readonly IUserDataProfile[]): Promise { private async onDidChangeProfiles(added: readonly IUserDataProfile[]): Promise { try { await Promise.all(removed.map(profile => { this.extensionsProfileWatchDisposables.deleteAndDispose(profile.id); return this.removeExtensionsFromProfile(profile.extensionsResource); })); if (added.length) { await Promise.all(added.map(profile => { this.extensionsProfileWatchDisposables.set(profile.id, combinedDisposable("} {"_id":"doc-en-vscode-33932234e8d44081be1cd4913d0d3bb1b87d2afdb00dfe6e1c51e1eb0a2bdb50","title":"","text":"} } private async removeExtensionsFromProfile(removedProfile: URI): Promise { for (const key of [...this.allExtensions.keys()]) { this.removeExtensionWithKey(key, removedProfile); } await this.uninstallExtensionsNotInProfiles(); } private async uninstallExtensionsNotInProfiles(toUninstall?: IExtension[]): Promise { if (!toUninstall) { const installed = await this.extensionManagementService.scanAllUserInstalledExtensions();"} {"_id":"doc-en-vscode-fdeca3af505a87b8baec592ae4ef4d08e621c5702412aad6081d1502cd2bd28e","title":"","text":"this.logService.error(error); } } try { if (this.profiles.length === 1) { await this.fileService.del(this.profilesHome, { recursive: true }); } else { await this.fileService.del(profile.location, { recursive: true }); } } catch (error) { this.logService.error(error); } } async setProfileForWorkspace(workspaceIdentifier: IAnyWorkspaceIdentifier, profileToSet: IUserDataProfile): Promise {"} {"_id":"doc-en-vscode-2b8394614c984613185f1f4c53e1ea77a3d41d49737131d78293748a9e77ab37","title":"","text":"// If HEAD is not published, make sure it is && !repository?.state.HEAD?.upstream ) { const publishBranch = vscode.l10n.t('Publish Branch'); const publishBranch = vscode.l10n.t('Publish Branch & Copy Link'); const selection = await vscode.window.showInformationMessage( vscode.l10n.t('The current branch is not published to the remote. Would you like to publish your branch before copying a link?'), { modal: true },"} {"_id":"doc-en-vscode-c0959c6c85aec6c5e38e0ff20425f27b55b46b037a5e8fd2ecdc69c095faab6a","title":"","text":"} const uncommittedChanges = [...repository.state.workingTreeChanges, ...repository.state.indexChanges]; if (uncommittedChanges.find((c) => c.uri.toString() === file.toString())) { if (uncommittedChanges.find((c) => c.uri.toString() === file.toString()) && !repository.state.HEAD?.ahead && !repository.state.HEAD?.behind) { const commitChanges = vscode.l10n.t('Commit Changes'); const copyAnyway = vscode.l10n.t('Copy Anyway'); const selection = await vscode.window.showWarningMessage("} {"_id":"doc-en-vscode-a779e6456ceccbf9b898f4d6703e5a44edc1624e5fcbd3389afc874a74dc38e9","title":"","text":"throw new vscode.CancellationError(); } } else if (repository.state.HEAD?.ahead) { const pushCommits = vscode.l10n.t('Push Commits'); const pushCommits = vscode.l10n.t('Push Commits & Copy Link'); const selection = await vscode.window.showInformationMessage( vscode.l10n.t('The current branch has unpublished commits. Would you like to push your commits before copying a link?'), { modal: true },"} {"_id":"doc-en-vscode-8d6a26529b996cbe3cf413e819b675b7ca7d00d7eb3a0f492b4efeb6f841b65e","title":"","text":"} await repository.push(); } else if (repository.state.HEAD?.behind) { const pull = vscode.l10n.t('Pull Changes & Copy Link'); const selection = await vscode.window.showInformationMessage( vscode.l10n.t('The current branch is not up to date. Would you like to pull before copying a link?'), { modal: true }, pull ); if (selection !== pull) { throw new vscode.CancellationError(); } await repository.pull(); } await repository.status();"} {"_id":"doc-en-vscode-1263a6f9580fc61867feec6b64d97a6cbb41e8b1a091d3c1ce46242f404c4cb8","title":"","text":"if (sessionData) { this._persistedSessions = this.deserializeChats(sessionData); const countsForLog = Object.keys(this._persistedSessions).length; this.trace('constructor', `Restored ${countsForLog} persisted sessions`); if (countsForLog > 0) { this.trace('constructor', `Restored ${countsForLog} persisted sessions`); } } else { this._persistedSessions = {}; this.trace('constructor', 'No persisted sessions'); } this._transferred = this.getTransferredSession();"} {"_id":"doc-en-vscode-95f8e1daca3d2335fcc6a9c83c8fb9c4311fbb3341454c6230e0e6ea14d34d4b","title":"","text":".filter(session => session.requests.length)); allSessions.sort((a, b) => (b.creationDate ?? 0) - (a.creationDate ?? 0)); allSessions = allSessions.slice(0, maxPersistedSessions); this.trace('onWillSaveState', `Persisting ${allSessions.length} sessions`); if (allSessions.length) { this.trace('onWillSaveState', `Persisting ${allSessions.length} sessions`); } const serialized = JSON.stringify(allSessions); this.trace('onWillSaveState', `Persisting ${serialized.length} chars`); if (allSessions.length) { this.trace('onWillSaveState', `Persisting ${serialized.length} chars`); } this.storageService.store(serializedChatKey, serialized, StorageScope.WORKSPACE, StorageTarget.MACHINE); }"} {"_id":"doc-en-vscode-5adaffa4db22630b12b6551b0f096b31486366c1f70d9919632283a81963b041","title":"","text":"await this.configurationEditing.writeConfiguration(editableConfigurationTarget, { key, value }, { scopes: overrides, ...options }); switch (editableConfigurationTarget) { case EditableConfigurationTarget.USER_LOCAL: if (this.applicationConfiguration && this.configurationRegistry.getConfigurationProperties()[key].scope === ConfigurationScope.APPLICATION) { if (this.applicationConfiguration && this.configurationRegistry.getConfigurationProperties()[key]?.scope === ConfigurationScope.APPLICATION) { await this.reloadApplicationConfiguration(); } else { await this.reloadLocalUserConfiguration();"} {"_id":"doc-en-vscode-e126d4be0d1200548413cdf489c0cf38638e71877fb47442badec7013b3a00bd","title":"","text":"override hide() { super.hide(); this._findWidgetVisible.reset(); this._instance.focus(); this._instance.focus(true); this._instance.xterm?.clearSearchDecorations(); }"} {"_id":"doc-en-vscode-f90c8d9aaa13360ae1059e9317fff19d8a9dfa42ecd69202e3bd9420d4268abd","title":"","text":"this._logService.debug(`TextAreaSyncAddon#updateCommandAndCursor: no line`); return; } if (!!currentCommand.commandStartX) { if (currentCommand.commandStartX !== undefined) { this._currentCommand = commandLine.substring(currentCommand.commandStartX); this._cursorX = buffer.cursorX - currentCommand.commandStartX; } else {"} {"_id":"doc-en-vscode-73035379bb2ebafd27c8d1b0a05be355cb0ef855863211314f2ac77f18ed0d4d","title":"","text":"return this._proxy.setTerminalLayoutInfo(args); } async getTerminalLayoutInfo(args: IGetTerminalLayoutInfoArgs): Promise { return await this._proxy.getTerminalLayoutInfo(args); // This is optional as we want reconnect requests to go through only if the pty host exists. // Revive is handled specially as reviveTerminalProcesses is guaranteed to be called before // the request for layout info. return this._optionalProxy?.getTerminalLayoutInfo(args); } async requestDetachInstance(workspaceId: string, instanceId: number): Promise {"} {"_id":"doc-en-vscode-4a86aab0a1a1b59c67885c1c7473d7a1167f2d1c217b4c7890b3837e63a5eaed","title":"","text":"}; } catch (e) { this._logService.warn(`Couldn't get layout info, a terminal was probably disconnected`, e.message); this._logService.info('Reattach to wrong terminal debug info - layout info by id', t); this._logService.info('Reattach to wrong terminal debug info - _revivePtyIdMap', Array.from(this._revivedPtyIdMap.values())); this._logService.debug('Reattach to wrong terminal debug info - layout info by id', t); this._logService.debug('Reattach to wrong terminal debug info - _revivePtyIdMap', Array.from(this._revivedPtyIdMap.values())); this._logService.debug('Reattach to wrong terminal debug info - _ptys ids', Array.from(this._ptys.keys())); // this will be filtered out and not reconnected return { terminal: null,"} {"_id":"doc-en-vscode-8401a66164014ff0e44522ba6e199c6c8b6cd9f33f1a705a48ba06517c9341c6","title":"","text":"// Revive processes if needed const serializedState = this._storageService.get(TerminalStorageKeys.TerminalBufferState, StorageScope.WORKSPACE); const parsed = this._deserializeTerminalState(serializedState); if (!parsed) { return undefined; } try { // Note that remote terminals do not get their environment re-resolved unlike in local terminals mark('code/terminal/willReviveTerminalProcessesRemote'); await this._remoteTerminalChannel.reviveTerminalProcesses(parsed, Intl.DateTimeFormat().resolvedOptions().locale); mark('code/terminal/didReviveTerminalProcessesRemote'); this._storageService.remove(TerminalStorageKeys.TerminalBufferState, StorageScope.WORKSPACE); // If reviving processes, send the terminal layout info back to the pty host as it // will not have been persisted on application exit const layoutInfo = this._storageService.get(TerminalStorageKeys.TerminalLayoutInfo, StorageScope.WORKSPACE); if (layoutInfo) { mark('code/terminal/willSetTerminalLayoutInfoRemote'); await this._remoteTerminalChannel.setTerminalLayoutInfo(JSON.parse(layoutInfo)); mark('code/terminal/didSetTerminalLayoutInfoRemote'); this._storageService.remove(TerminalStorageKeys.TerminalLayoutInfo, StorageScope.WORKSPACE); const reviveBufferState = this._deserializeTerminalState(serializedState); if (reviveBufferState && reviveBufferState.length > 0) { try { // Note that remote terminals do not get their environment re-resolved unlike in local terminals mark('code/terminal/willReviveTerminalProcessesRemote'); await this._remoteTerminalChannel.reviveTerminalProcesses(reviveBufferState, Intl.DateTimeFormat().resolvedOptions().locale); mark('code/terminal/didReviveTerminalProcessesRemote'); this._storageService.remove(TerminalStorageKeys.TerminalBufferState, StorageScope.WORKSPACE); // If reviving processes, send the terminal layout info back to the pty host as it // will not have been persisted on application exit const layoutInfo = this._storageService.get(TerminalStorageKeys.TerminalLayoutInfo, StorageScope.WORKSPACE); if (layoutInfo) { mark('code/terminal/willSetTerminalLayoutInfoRemote'); await this._remoteTerminalChannel.setTerminalLayoutInfo(JSON.parse(layoutInfo)); mark('code/terminal/didSetTerminalLayoutInfoRemote'); this._storageService.remove(TerminalStorageKeys.TerminalLayoutInfo, StorageScope.WORKSPACE); } } catch (e: unknown) { this._logService.warn('RemoteTerminalBackend#getTerminalLayoutInfo Error', e && typeof e === 'object' && 'message' in e ? e.message : e); } } catch (e: unknown) { this._logService.warn('RemoteTerminalBackend#getTerminalLayoutInfo Error', e && typeof e === 'object' && 'message' in e ? e.message : e); } return this._remoteTerminalChannel.getTerminalLayoutInfo();"} {"_id":"doc-en-vscode-bd087f4796a05df38d441b1a052b47dfd478f9df248ed58d41bb6db5f74b6828","title":"","text":"// Revive processes if needed const serializedState = this._storageService.get(TerminalStorageKeys.TerminalBufferState, StorageScope.WORKSPACE); const parsed = this._deserializeTerminalState(serializedState); if (!parsed) { return undefined; } try { // Create variable resolver const activeWorkspaceRootUri = this._historyService.getLastActiveWorkspaceRoot(); const lastActiveWorkspace = activeWorkspaceRootUri ? withNullAsUndefined(this._workspaceContextService.getWorkspaceFolder(activeWorkspaceRootUri)) : undefined; const variableResolver = terminalEnvironment.createVariableResolver(lastActiveWorkspace, await this._terminalProfileResolverService.getEnvironment(this.remoteAuthority), this._configurationResolverService); // Re-resolve the environments and replace it on the state so local terminals use a fresh // environment mark('code/terminal/willGetReviveEnvironments'); await Promise.all(parsed.map(state => new Promise(r => { this._resolveEnvironmentForRevive(variableResolver, state.shellLaunchConfig).then(freshEnv => { state.processLaunchConfig.env = freshEnv; r(); }); }))); mark('code/terminal/didGetReviveEnvironments'); mark('code/terminal/willReviveTerminalProcesses'); await this._proxy.reviveTerminalProcesses(workspaceId, parsed, Intl.DateTimeFormat().resolvedOptions().locale); mark('code/terminal/didReviveTerminalProcesses'); this._storageService.remove(TerminalStorageKeys.TerminalBufferState, StorageScope.WORKSPACE); // If reviving processes, send the terminal layout info back to the pty host as it // will not have been persisted on application exit const layoutInfo = this._storageService.get(TerminalStorageKeys.TerminalLayoutInfo, StorageScope.WORKSPACE); if (layoutInfo) { mark('code/terminal/willSetTerminalLayoutInfo'); await this._proxy.setTerminalLayoutInfo(JSON.parse(layoutInfo)); mark('code/terminal/didSetTerminalLayoutInfo'); this._storageService.remove(TerminalStorageKeys.TerminalLayoutInfo, StorageScope.WORKSPACE); const reviveBufferState = this._deserializeTerminalState(serializedState); if (reviveBufferState && reviveBufferState.length > 0) { try { // Create variable resolver const activeWorkspaceRootUri = this._historyService.getLastActiveWorkspaceRoot(); const lastActiveWorkspace = activeWorkspaceRootUri ? withNullAsUndefined(this._workspaceContextService.getWorkspaceFolder(activeWorkspaceRootUri)) : undefined; const variableResolver = terminalEnvironment.createVariableResolver(lastActiveWorkspace, await this._terminalProfileResolverService.getEnvironment(this.remoteAuthority), this._configurationResolverService); // Re-resolve the environments and replace it on the state so local terminals use a fresh // environment mark('code/terminal/willGetReviveEnvironments'); await Promise.all(reviveBufferState.map(state => new Promise(r => { this._resolveEnvironmentForRevive(variableResolver, state.shellLaunchConfig).then(freshEnv => { state.processLaunchConfig.env = freshEnv; r(); }); }))); mark('code/terminal/didGetReviveEnvironments'); mark('code/terminal/willReviveTerminalProcesses'); await this._proxy.reviveTerminalProcesses(workspaceId, reviveBufferState, Intl.DateTimeFormat().resolvedOptions().locale); mark('code/terminal/didReviveTerminalProcesses'); this._storageService.remove(TerminalStorageKeys.TerminalBufferState, StorageScope.WORKSPACE); // If reviving processes, send the terminal layout info back to the pty host as it // will not have been persisted on application exit const layoutInfo = this._storageService.get(TerminalStorageKeys.TerminalLayoutInfo, StorageScope.WORKSPACE); if (layoutInfo) { mark('code/terminal/willSetTerminalLayoutInfo'); await this._proxy.setTerminalLayoutInfo(JSON.parse(layoutInfo)); mark('code/terminal/didSetTerminalLayoutInfo'); this._storageService.remove(TerminalStorageKeys.TerminalLayoutInfo, StorageScope.WORKSPACE); } } catch (e: unknown) { this._logService.warn('LocalTerminalBackend#getTerminalLayoutInfo Error', e && typeof e === 'object' && 'message' in e ? e.message : e); } } catch (e: unknown) { this._logService.warn('LocalTerminalBackend#getTerminalLayoutInfo Error', e && typeof e === 'object' && 'message' in e ? e.message : e); } return this._proxy.getTerminalLayoutInfo(layoutArgs);"} {"_id":"doc-en-vscode-e25f362d13273b893c2403267cc112ef81e0f6bec010fe1cee2f2055f1ec945e","title":"","text":"private viewHasSomeCollapsibleRootItem: IContextKey; private viewVisibleContextKey: IContextKey; private setTreeInputPromise: Promise | undefined; private horizontalScrolling: boolean | undefined; private dragHandler!: DelayedDragHandler;"} {"_id":"doc-en-vscode-04d376a40347e0a4a40bc14deff4ffc0196fb36403add0613a752b5f2aad7446","title":"","text":"// save view state this._register(this.storageService.onWillSaveState(() => { this.storageService.store(ExplorerView.TREE_VIEW_STATE_STORAGE_KEY, JSON.stringify(this.tree.getViewState()), StorageScope.WORKSPACE, StorageTarget.MACHINE); this.storeTreeViewState(); })); }"} {"_id":"doc-en-vscode-2afd869f7c8bb83cc3c21ca57d8d19fce150e8310a1f5b26fdd7f00cfeb6df5b","title":"","text":"} } private storeTreeViewState() { this.storageService.store(ExplorerView.TREE_VIEW_STATE_STORAGE_KEY, JSON.stringify(this.tree.getViewState()), StorageScope.WORKSPACE, StorageTarget.MACHINE); } private setContextKeys(stat: ExplorerItem | null | undefined): void { const folders = this.contextService.getWorkspace().folders; const resource = stat ? stat.resource : folders[folders.length - 1].uri;"} {"_id":"doc-en-vscode-f46b3b221b9306b153d17ab6d62d940d0eebce7cd2d328ab6a00bdfb7413cb08","title":"","text":"return Promise.resolve(undefined); } // Wait for the last execution to complete before executing if (this.setTreeInputPromise) { await this.setTreeInputPromise; } const initialInputSetup = !this.tree.getInput(); if (initialInputSetup) { perf.mark('code/willResolveExplorer');"} {"_id":"doc-en-vscode-a1161fa0ec08353d9a1f8149b74057e0e745c9f7d1f421cd3390cf87ae85cdf7","title":"","text":"} const previousInput = this.tree.getInput(); const promise = this.tree.setInput(input, viewState).then(async () => { const promise = this.setTreeInputPromise = this.tree.setInput(input, viewState).then(async () => { if (Array.isArray(input)) { if (!viewState || previousInput instanceof ExplorerItem) { // There is no view state for this workspace (we transitioned from a folder workspace?), expand up to five roots."} {"_id":"doc-en-vscode-507ac663458bf516797b5dab492ae2d45f93fb32c3837e62f31e3ba1b29d12dc","title":"","text":"const treeInputArray = Array.isArray(treeInput) ? treeInput : Array.from(treeInput.children.values()); // Has collapsible root when anything is expanded this.viewHasSomeCollapsibleRootItem.set(hasExpandedNode(this.tree, treeInputArray)); // synchronize state to cache this.storeTreeViewState(); } override dispose(): void {"} {"_id":"doc-en-vscode-b15e3b3dc9d5dc671ae07c894c6b7642fc272e3f68417cb34a650a72abc57f55","title":"","text":"// Set up nls if the user is not using the default language (English) const nlsConfig = {}; const locale = window.localStorage.getItem('vscode.nls.locale') || navigator.language; // Normalize locale to lowercase because translationServiceUrl is case-sensitive. // ref: https://github.com/microsoft/vscode/issues/187795 const locale = window.localStorage.getItem('vscode.nls.locale') || navigator.language.toLowerCase(); if (!locale.startsWith('en')) { nlsConfig['vs/nls'] = { availableLanguages: {"} {"_id":"doc-en-vscode-ae78875cb7c8192d39dc09cee29d1658d7c05aed55d4ae10c3f10da219fe2a4f","title":"","text":"async setLocale(languagePackItem: ILanguagePackItem, _skipDialog = false): Promise { const locale = languagePackItem.id; if (locale === Language.value() || (!locale && Language.value() === navigator.language)) { if (locale === Language.value() || (!locale && Language.value() === navigator.language.toLowerCase())) { return; } if (locale) {"} {"_id":"doc-en-vscode-2c1f2168083f06950e49ffaf680938f17d2ce9ac1098d1ce89b9c16253c2154a","title":"","text":"window.localStorage.removeItem(WebLocaleService._LOCAL_STORAGE_LOCALE_KEY); window.localStorage.removeItem(WebLocaleService._LOCAL_STORAGE_EXTENSION_ID_KEY); if (Language.value() === navigator.language) { if (Language.value() === navigator.language.toLowerCase()) { return; }"} {"_id":"doc-en-vscode-5d2ede00b829ffa9197d2e3fec6a0ebf612092d5b9847faf426c561d1bcc3a54","title":"","text":"[[package]] name = \"inno_updater\" version = \"0.10.0\" version = \"0.10.1\" dependencies = [ \"byteorder\", \"crc\","} {"_id":"doc-en-vscode-f4dea54ee5647dc4347279ca4598bb8b20d78ffbe571288b825b93702d49699a","title":"","text":"[package] name = \"inno_updater\" version = \"0.10.0\" version = \"0.10.1\" authors = [\"Microsoft \"] build = \"build.rs\""} {"_id":"doc-en-vscode-cd73e12bb28f6129e453a636721bb5efea655dcee3d38df5febf6128eafaafc6","title":"","text":"const rerender = () => { this.gettingStartedCategories = this.gettingStartedService.getWalkthroughs(); this.featuredExtensions = this.featuredExtensionService.getExtensions(); this.buildSlideThrottle.queue(async () => await this.buildCategoriesSlide()); if (this.currentWalkthrough) { const existingSteps = this.currentWalkthrough.steps.map(step => step.id); const newCategory = this.gettingStartedCategories.find(category => this.currentWalkthrough?.id === category.id); if (newCategory) { const newSteps = newCategory.steps.map(step => step.id); if (!equals(newSteps, existingSteps)) { this.buildSlideThrottle.queue(() => this.buildCategoriesSlide()); } } } else { this.buildSlideThrottle.queue(() => this.buildCategoriesSlide()); } }; this._register(this.extensionManagementService.onDidInstallExtensions(async (result) => {"} {"_id":"doc-en-vscode-9eec1acbad52a7fd11896be5495e60ab921a139e7c60048a85a705109d3261ec","title":"","text":"isEncryptionAvailable(): Promise; } // The values provided to the `password-store` command line switch. // Notice that they are not the same as the values returned by // `getSelectedStorageBackend` in the `safeStorage` API. export const enum PasswordStoreCLIOption { kwallet = 'kwallet', kwallet5 = 'kwallet5', gnome = 'gnome', gnomeKeyring = 'gnome-keyring', gnomeLibsecret = 'gnome-libsecret', basic = 'basic' } // The values returned by `getSelectedStorageBackend` in the `safeStorage` API. export const enum KnownStorageProvider { unknown = 'unknown', basicText = 'basic_text',"} {"_id":"doc-en-vscode-b8316a151292d00a916fecf6ca355e0faaab0a2368cdedc8ca87432637004717","title":"","text":"kwallet5 = 'kwallet5', kwallet6 = 'kwallet6', // The rest of these are not returned by `getSelectedStorageBackend` // but these were added for platform completeness. // Windows dplib = 'dpapi',"} {"_id":"doc-en-vscode-7440a7a3226edfd924cb24dbf18f27f47701bd8f71c90186f319e356a96d330d","title":"","text":"import { safeStorage as safeStorageElectron, app } from 'electron'; import { isMacintosh, isWindows } from 'vs/base/common/platform'; import { KnownStorageProvider, IEncryptionMainService } from 'vs/platform/encryption/common/encryptionService'; import { KnownStorageProvider, IEncryptionMainService, PasswordStoreCLIOption } from 'vs/platform/encryption/common/encryptionService'; import { ILogService } from 'vs/platform/log/common/log'; // These APIs are currently only supported in our custom build of electron so"} {"_id":"doc-en-vscode-a940983e86b6d3f85922d98221a6d722f64956c404ddc56c82689f033be8618a","title":"","text":"@ILogService private readonly logService: ILogService ) { // if this commandLine switch is set, the user has opted in to using basic text encryption if (app.commandLine.getSwitchValue('password-store') === 'basic_text') { if (app.commandLine.getSwitchValue('password-store') === PasswordStoreCLIOption.basic) { safeStorage.setUsePlainTextEncryption?.(true); } }"} {"_id":"doc-en-vscode-8cce32ba47d1a520fffe3450cf63aa0ed27f0008014496bcd0ab60bceca6051e","title":"","text":"'install-source'?: string; 'disable-updates'?: boolean; 'disable-keytar'?: boolean; 'password-store'?: string; 'disable-workspace-trust'?: boolean; 'disable-crash-reporter'?: boolean; 'crash-reporter-directory'?: string;"} {"_id":"doc-en-vscode-3a8e52e7e18e8618a4eb66961e7959ea1731bd8494c6d1de697800f9dac81cfa","title":"","text":"'disable-telemetry': { type: 'boolean' }, 'disable-updates': { type: 'boolean' }, 'disable-keytar': { type: 'boolean' }, 'password-store': { type: 'string' }, 'disable-workspace-trust': { type: 'boolean' }, 'disable-crash-reporter': { type: 'boolean' }, 'crash-reporter-directory': { type: 'string' },"} {"_id":"doc-en-vscode-924f37f3ac37464b2ecc2d2f7a913541337aa85a4e970039e9f852d1883c0e95","title":"","text":"import Severity from 'vs/base/common/severity'; import { localize } from 'vs/nls'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; import { IEncryptionService, KnownStorageProvider, isGnome, isKwallet } from 'vs/platform/encryption/common/encryptionService'; import { IEncryptionService, KnownStorageProvider, PasswordStoreCLIOption, isGnome, isKwallet } from 'vs/platform/encryption/common/encryptionService'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { InstantiationType, registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { ILogService } from 'vs/platform/log/common/log';"} {"_id":"doc-en-vscode-0ce6ff5fc39ed5a4538346900ed480a3709a66c6d6c9cc41993d780b20f1233c","title":"","text":"label: localize('usePlainText', \"Use weaker encryption\"), run: async () => { await this._encryptionService.setUsePlainTextEncryption(); await this._jsonEditingService.write(this._environmentService.argvResource, [{ path: ['password-store'], value: 'basic_text' }], true); await this._jsonEditingService.write(this._environmentService.argvResource, [{ path: ['password-store'], value: PasswordStoreCLIOption.basic }], true); this.reinitialize(); } };"} {"_id":"doc-en-vscode-6d5491fdb119e3a1f2b0c2e60fa0906c57aeb4881ec6ef0a81749fb7924b1402","title":"","text":"private _responsePendingAudioCue: IDisposable | undefined; private _hasReceivedRequest: boolean = false; private _runOnceScheduler: RunOnceScheduler; private _lastResponse: string | undefined; constructor(@IAudioCueService private readonly _audioCueService: IAudioCueService) { super();"} {"_id":"doc-en-vscode-e346ed6239c2fc933d677bd65ef1db8d22a8d3899a05adb520080c9c32e06580","title":"","text":"const isPanelChat = typeof response !== 'string'; this._responsePendingAudioCue?.dispose(); this._runOnceScheduler?.cancel(); if (this._lastResponse === response?.toString()) { return; } this._lastResponse = response?.toString(); this._audioCueService.playAudioCue(AudioCue.chatResponseReceived, true); this._hasReceivedRequest = false; if (!response) {"} {"_id":"doc-en-vscode-95daefc238bf90d087d5d3cd61f080006e350d6c7e98b7a45ffdb96505e8fb32","title":"","text":"* Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ExtensionRecommendations, ExtensionRecommendation } from 'vs/workbench/contrib/extensions/browser/extensionRecommendations'; import { INotificationService, Severity } from 'vs/platform/notification/common/notification'; import { EnablementState, IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { EnablementState } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { ExtensionRecommendationReason, IExtensionIgnoredRecommendationsService } from 'vs/workbench/services/extensionRecommendations/common/extensionRecommendations'; import { IExtensionsViewPaneContainer, IExtensionsWorkbenchService, IExtension, VIEWLET_ID as EXTENSIONS_VIEWLET_ID } from 'vs/workbench/contrib/extensions/common/extensions'; import { CancellationToken } from 'vs/base/common/cancellation'; import { IExtensionsWorkbenchService, IExtension } from 'vs/workbench/contrib/extensions/common/extensions'; import { localize } from 'vs/nls'; import { StorageScope, IStorageService, StorageTarget } from 'vs/platform/storage/common/storage'; import { IProductService } from 'vs/platform/product/common/productService';"} {"_id":"doc-en-vscode-daa22fcc782556a5e4ec2eb6d829e79ff56888df8236667ecddb92ed7c5a58af","title":"","text":"import { basename, extname } from 'vs/base/common/resources'; import { match } from 'vs/base/common/glob'; import { URI } from 'vs/base/common/uri'; import { Mimes } from 'vs/base/common/mime'; import { getMimeTypes } from 'vs/editor/common/services/languagesAssociations'; import { IModelService } from 'vs/editor/common/services/model'; import { ILanguageService } from 'vs/editor/common/languages/language'; import { IExtensionRecommendationNotificationService, RecommendationsNotificationResult, RecommendationSource } from 'vs/platform/extensionRecommendations/common/extensionRecommendations';"} {"_id":"doc-en-vscode-caee56b824244050863558057473dca8e3b481eefe6d280326d3eab35d73e8ba","title":"","text":"import { DisposableStore } from 'vs/base/common/lifecycle'; import { CellUri } from 'vs/workbench/contrib/notebook/common/notebookCommon'; import { disposableTimeout } from 'vs/base/common/async'; import { IPaneCompositePartService } from 'vs/workbench/services/panecomposite/browser/panecomposite'; import { ViewContainerLocation } from 'vs/workbench/common/views'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { isEmptyObject } from 'vs/base/common/types'; import { PLAINTEXT_LANGUAGE_ID } from 'vs/editor/common/languages/modesRegistry'; type FileExtensionSuggestionClassification = { owner: 'sandy081'; comment: 'Response information when a file based reccommendation is suggested'; userReaction: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'User reaction after showing the recommendation prompt. Eg., install, cancel, show, neverShowAgain' }; fileExtension: { classification: 'PublicNonPersonalData'; purpose: 'FeatureInsight'; comment: 'Extension of the file for which an extension is being recommended.' }; }; const promptedRecommendationsStorageKey = 'fileBasedRecommendations/promptedRecommendations'; const promptedFileExtensionsStorageKey = 'fileBasedRecommendations/promptedFileExtensions'; const recommendationsStorageKey = 'extensionsAssistant/recommendations'; const searchMarketplace = localize('searchMarketplace', \"Search Marketplace\"); const milliSecondsInADay = 1000 * 60 * 60 * 24; export class FileBasedRecommendations extends ExtensionRecommendations {"} {"_id":"doc-en-vscode-88fee12c1b9ee848908aa371bac180606d23204fad7c6843d37eb269bd477a38","title":"","text":"private readonly recommendationsByPattern = new Map>(); private readonly fileBasedRecommendations = new Map(); private readonly fileBasedImportantRecommendations = new Set(); private readonly processedFileExtensions: string[] = []; get recommendations(): ReadonlyArray { const recommendations: ExtensionRecommendation[] = [];"} {"_id":"doc-en-vscode-fe0287790726346ae94682165e3d45e82ac124e2e5067c0d277e2078d70f0b9c","title":"","text":"constructor( @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, @IPaneCompositePartService private readonly paneCompositeService: IPaneCompositePartService, @IModelService private readonly modelService: IModelService, @ILanguageService private readonly languageService: ILanguageService, @IProductService productService: IProductService, @INotificationService private readonly notificationService: INotificationService, @ITelemetryService private readonly telemetryService: ITelemetryService, @IStorageService private readonly storageService: IStorageService, @IExtensionRecommendationNotificationService private readonly extensionRecommendationNotificationService: IExtensionRecommendationNotificationService, @IExtensionIgnoredRecommendationsService private readonly extensionIgnoredRecommendationsService: IExtensionIgnoredRecommendationsService, @IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService, @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, ) { super(); this.fileOpenRecommendations = {};"} {"_id":"doc-en-vscode-b78db6348b0580e02b4857dade6eb0e72d33a6cb3755787f5a8f038fa538e24a","title":"","text":"} // re-schedule this bit of the operation to be off the critical path - in case glob-match is slow this._register(disposableTimeout(() => this.promptRecommendations(uri, model), 0)); } private promptRecommendations(uri: URI, model: ITextModel): void { if (this.promptImportantRecommendations(uri, model)) { return; } const fileExtension = extname(uri).toLowerCase(); if (!this.processedFileExtensions.includes(fileExtension)) { this.processedFileExtensions.push(fileExtension); this.promptRecommendedExtensionForFileExtension(uri, fileExtension); } this._register(disposableTimeout(() => this.promptImportantRecommendations(uri, model), 0)); } /** * Prompt the user to either install the recommended extension for the file type in the current editor model * or prompt to search the marketplace if it has extensions that can support the file type */ private promptImportantRecommendations(uri: URI, model: ITextModel, extensionRecommendations?: IStringDictionary): boolean { private promptImportantRecommendations(uri: URI, model: ITextModel, extensionRecommendations?: IStringDictionary): void { const pattern = extname(uri).toLowerCase(); extensionRecommendations = extensionRecommendations ?? this.recommendationsByPattern.get(pattern) ?? this.fileOpenRecommendations; const extensionRecommendationEntries = Object.entries(extensionRecommendations); if (extensionRecommendationEntries.length === 0) { return false; return; } const processedPathGlobs = new Map();"} {"_id":"doc-en-vscode-e52e162a74f21c46f016e85940a8c409f9f93eee3ea76b5de30be1006503248f","title":"","text":"if (Object.keys(matchedRecommendations).length) { this.promptFromRecommendations(uri, model, matchedRecommendations); return true; } return false; } private promptFromRecommendations(uri: URI, model: ITextModel, extensionRecommendations: IStringDictionary): void {"} {"_id":"doc-en-vscode-8df892d07bca5186a65bde03306de6b68de275abc8ec3fbcdec4156875b1757c","title":"","text":"this.storageService.store(promptedRecommendationsStorageKey, JSON.stringify(promptedRecommendations), StorageScope.PROFILE, StorageTarget.USER); } private getPromptedFileExtensions(): string[] { return JSON.parse(this.storageService.get(promptedFileExtensionsStorageKey, StorageScope.PROFILE, '[]')); } private addToPromptedFileExtensions(fileExtension: string) { const promptedFileExtensions = this.getPromptedFileExtensions(); promptedFileExtensions.push(fileExtension); this.storageService.store(promptedFileExtensionsStorageKey, JSON.stringify(distinct(promptedFileExtensions)), StorageScope.PROFILE, StorageTarget.USER); } private async promptRecommendedExtensionForFileExtension(uri: URI, fileExtension: string): Promise { if (this.extensionRecommendationNotificationService.hasToIgnoreRecommendationNotifications()) { return; } // Do not prompt when there is no local and remote extension management servers if (!this.extensionManagementServerService.localExtensionManagementServer && !this.extensionManagementServerService.remoteExtensionManagementServer) { return; } fileExtension = fileExtension.substring(1); // Strip the dot if (!fileExtension) { return; } const mimeTypes = getMimeTypes(uri); if (mimeTypes.length !== 1 || mimeTypes[0] !== Mimes.unknown) { return; } const fileExtensionSuggestionIgnoreList = JSON.parse(this.storageService.get('extensionsAssistant/fileExtensionsSuggestionIgnore', StorageScope.PROFILE, '[]')); if (fileExtensionSuggestionIgnoreList.indexOf(fileExtension) > -1) { return; } const promptedFileExtensions = this.getPromptedFileExtensions(); if (promptedFileExtensions.includes(fileExtension)) { return; } const text = `ext:${fileExtension}`; const pager = await this.extensionsWorkbenchService.queryGallery({ text, pageSize: 100 }, CancellationToken.None).then(r => r, () => null); if (!pager?.firstPage.length) { return; } const installedExtensionsIds = this.extensionsWorkbenchService.local.reduce((result, i) => { result.add(i.identifier.id.toLowerCase()); return result; }, new Set()); if (pager.firstPage.some(e => installedExtensionsIds.has(e.identifier.id.toLowerCase()))) { return; } this.notificationService.prompt( Severity.Info, localize('showLanguageExtensions', \"The Marketplace has extensions that can help with '.{0}' files\", fileExtension), [{ label: searchMarketplace, run: () => { this.addToPromptedFileExtensions(fileExtension); this.telemetryService.publicLog2<{ userReaction: string; fileExtension: string }, FileExtensionSuggestionClassification>('fileExtensionSuggestion:popup', { userReaction: 'ok', fileExtension }); this.paneCompositeService.openPaneComposite(EXTENSIONS_VIEWLET_ID, ViewContainerLocation.Sidebar, true) .then(viewlet => viewlet?.getViewPaneContainer() as IExtensionsViewPaneContainer) .then(viewlet => { viewlet.search(`ext:${fileExtension}`); viewlet.focus(); }); } }, { label: localize('dontShowAgainExtension', \"Don't Show Again for '.{0}' files\", fileExtension), run: () => { fileExtensionSuggestionIgnoreList.push(fileExtension); this.storageService.store( 'extensionsAssistant/fileExtensionsSuggestionIgnore', JSON.stringify(fileExtensionSuggestionIgnoreList), StorageScope.PROFILE, StorageTarget.USER); this.telemetryService.publicLog2<{ userReaction: string; fileExtension: string }, FileExtensionSuggestionClassification>('fileExtensionSuggestion:popup', { userReaction: 'neverShowAgain', fileExtension }); } }], { sticky: true, onCancel: () => { this.telemetryService.publicLog2<{ userReaction: string; fileExtension: string }, FileExtensionSuggestionClassification>('fileExtensionSuggestion:popup', { userReaction: 'cancelled', fileExtension }); } } ); } private filterIgnoredOrNotAllowed(recommendationsToSuggest: string[]): string[] { const ignoredRecommendations = [...this.extensionIgnoredRecommendationsService.ignoredRecommendations, ...this.extensionRecommendationNotificationService.ignoredRecommendations]; return recommendationsToSuggest.filter(id => !ignoredRecommendations.includes(id));"} {"_id":"doc-en-vscode-17f932a49bb0a3f3753530c8185d57e0e4dfabab597f1cb9246436e5f766b5bf","title":"","text":"codeEditor = codeEditorService.getActiveCodeEditor()!; } accessibleViewService.show(instantiationService.createInstance(AccessibilityHelpProvider, codeEditor)); })); }, EditorContextKeys.focus)); } }"} {"_id":"doc-en-vscode-f81c5d14fa54897985452f7d252dfce7546b17a05e049d83d8cb588303cc59ee","title":"","text":"return this._view; } const toolbar = this.instantiationService.createInstance(WorkbenchToolBar, this.toolbarContainer, { const toolbar = this._register(this.instantiationService.createInstance(WorkbenchToolBar, this.toolbarContainer, { actionViewItemProvider: action => { return createActionViewItem(this.instantiationService, action); }, renderDropdownAsChildElement: true }); })); const deleteToolbar = this._register(this.instantiationService.invokeFunction(accessor => createDeleteToolbar(accessor, this.toolbarContainer, 'cell-delete-toolbar'))); if (model.deleteActions.primary.length !== 0 || model.deleteActions.secondary.length !== 0) {"} {"_id":"doc-en-vscode-79a25102b9812a1fac43a5418343f7606b2880283b94c42e3f7df4a8eabe9cff","title":"","text":"debug!(self.logger, \"Starting server with command... {:?}\", cmd); // On Windows spawning a code-server binary will run cmd.exe /c C:pathtocode-server.cmd... // This spawns a cmd.exe window for the user, which if they close will kill the code-server process // and disconnect the tunnel. To prevent this, pass the CREATE_NO_WINDOW flag to the Command // only on Windows. // Original issue: https://github.com/microsoft/vscode/issues/184058 // Partial fix: https://github.com/microsoft/vscode/pull/184621 #[cfg(target_os = \"windows\")] let cmd = cmd.creation_flags(winapi::um::winbase::CREATE_NO_WINDOW); let child = cmd .stderr(std::process::Stdio::piped()) .stdout(std::process::Stdio::piped())"} {"_id":"doc-en-vscode-cd88965568c7c19a3ee5e8aac9e0ed320b235013ed9fc1b000cf3fb19f10457b","title":"","text":"get disableWorkspaceTrust(): boolean { return !!this.args['disable-workspace-trust']; } @memoize get disableKeytar(): boolean { return !!this.args['disable-keytar']; } @memoize get policyFile(): URI | undefined { if (this.args['__enable-file-policy']) { const vscodePortable = env['VSCODE_PORTABLE'];"} {"_id":"doc-en-vscode-27de631c99becf78a68fd96f1da0879cfc630cbc1e27e03c9ffe76eb2e497804","title":"","text":"get disableUpdates(): boolean { return !!this.args['disable-updates']; } @memoize get disableKeytar(): boolean { return !!this.args['disable-keytar']; } @memoize get crossOriginIsolated(): boolean { return !!this.args['enable-coi']; } @memoize"} {"_id":"doc-en-vscode-524f7c78f51754ec7dbc62576c75e24292972f4d4199f1db7879854e171d8dd7","title":"","text":"private async initialize(): Promise { let storageService; if (!this._useInMemoryStorage && await this._encryptionService.isEncryptionAvailable()) { this._logService.trace(`[SecretStorageService] Encryption is available, using persisted storage`); this._type = 'persisted'; storageService = this._storageService; } else {"} {"_id":"doc-en-vscode-d82a79e7bdc623b09b31e25aadb2f43da5fa6cd35b857305e6f3ed2d99bd46c2","title":"","text":"this._sequencer.queue(key, async () => { await this.resolvedStorageService; if (this.type !== 'persisted') { if (this.type !== 'persisted' && !this._environmentService.disableKeytar) { this._logService.trace('[NativeSecretStorageService] Notifying user that secrets are not being stored on disk.'); await this.notifyOfNoEncryptionOnce(); }"} {"_id":"doc-en-vscode-cfb53f16f08294b632e7e8aa4fcd299d6fff4033d86dc8a8093e093662830905","title":"","text":"} })); // Title Menu changes this._register(this.titleService.onDidChangeCommandCenterVisibility(() => this.doUpdateLayoutConfiguration())); // Fullscreen changes this._register(onDidChangeFullscreen(() => this.onFullscreenChanged()));"} {"_id":"doc-en-vscode-18a20f5a61b8b4b1e0494f5d8826eeac907e4073425480bc63cc94b072cd1bd1","title":"","text":"this._register(this.titleService.onMenubarVisibilityChange(visible => this.onMenubarToggled(visible))); } // Title Menu changes this._register(this.titleService.onDidChangeCommandCenterVisibility(() => this.layout())); // Theme changes this._register(this.themeService.onDidColorThemeChange(() => this.updateStyles()));"} {"_id":"doc-en-vscode-9b6062a2667ff2623300b74f4b93f981705b49706f1ed0e064439b0a8e07db0c","title":"","text":"private _revealInViewWithMinimalScrolling(viewIndex: number, firstLine?: boolean) { const firstIndex = this.view.firstVisibleIndex; if (viewIndex <= firstIndex) { const elementHeight = this.view.elementHeight(viewIndex); if (viewIndex <= firstIndex || elementHeight >= this.view.renderHeight) { this._revealInternal(viewIndex, true, CellRevealPosition.Top, firstLine); } else { this._revealInternal(viewIndex, true, CellRevealPosition.Bottom, firstLine);"} {"_id":"doc-en-vscode-558e9affcafcd603360b76bbc9141f1cb2bad6e9eae57796685aba3c3e43c119","title":"","text":"{ \"name\": \"code-oss-dev\", \"version\": \"1.82.0\", \"distro\": \"49cc0fbc0a8e222bcce2a7c3bf62e0d23f20d258\", \"distro\": \"2100ad274ed566f978bb917f327b3d99f95d59f2\", \"author\": { \"name\": \"Microsoft Corporation\" },"} {"_id":"doc-en-vscode-da90b61ef3d1d44c1bc693f65a0c65301a242df901e9fcd2bcc8d393fb1a295e","title":"","text":"disturl \"https://nodejs.org/dist\" target \"18.15.0\" ms_build_id \"223745\" ms_build_id \"229541\" runtime \"node\" build_from_source \"true\""} {"_id":"doc-en-vscode-8604f1677bd46e45d8b966ae500c04bd5eef97d2ab4d6409e352eea63b81a2a7","title":"","text":") { super(); this._register(Registry.as(Extensions.ViewsRegistry).registerViewWelcomeContent(TUNNEL_VIEW_ID, { content: `No forwarded ports. Forward a port to access your running services locally.n[Forward a Port](command:${ForwardPortAction.INLINE_ID})`, content: this.environmentService.remoteAuthority ? nls.localize('remoteNoPorts', \"No forwarded ports. Forward a port to access your running services locally.n[Forward a Port]({0})\", `command:${ForwardPortAction.INLINE_ID}`) : nls.localize('noRemoteNoPorts', \"No forwarded ports. Forward a port to access your locally running services over the internet.n[Forward a Port]({0})\", `command:${ForwardPortAction.INLINE_ID}`), })); this.enableBadgeAndStatusBar(); this.enableForwardedPortsView();"} {"_id":"doc-en-vscode-870b3cc38825710bcdb253a8b0042ab10a9e40a1dd72eee9f7e521221f83261a","title":"","text":"} # Set IsWindows property [Console]::Write(\"$([char]0x1b)]633;P;IsWindows=$($IsWindows)`a\") if ($PSVersionTable.PSVersion -lt \"6.0\") { # Windows PowerShell is only available on Windows [Console]::Write(\"$([char]0x1b)]633;P;IsWindows=$true`a\") } else { [Console]::Write(\"$([char]0x1b)]633;P;IsWindows=$IsWindows`a\") } # Set always on key handlers which map to default VS Code keybindings function Set-MappedKeyHandler {"} {"_id":"doc-en-vscode-05d96053c8684e5721ab51b28bb4398b0597090bf72c5cd5f16259e3cfad7914","title":"","text":"readonly raw: RawXtermTerminal; private _core: IXtermCore; private static _suggestedRendererType: 'canvas' | 'dom' | undefined = undefined; private static _checkedWebglCompatible = false; private _attached?: { container: HTMLElement; options: IXtermAttachToElementOptions }; private _isPhysicalMouseWheel = MouseWheelClassifier.INSTANCE.isPhysicalMouseWheel();"} {"_id":"doc-en-vscode-da6572de5c3a436b0353a141ddb44d71c4e51c6ab8c9841ea69bdbdb6224a5ec","title":"","text":"if (!this.raw.element || this._webglAddon) { return; } // Check if the the WebGL renderer is compatible with xterm.js: // - https://github.com/microsoft/vscode/issues/190195 // - https://github.com/xtermjs/xterm.js/issues/4665 // - https://bugs.chromium.org/p/chromium/issues/detail?id=1476475 if (!XtermTerminal._checkedWebglCompatible) { XtermTerminal._checkedWebglCompatible = true; const checkCanvas = document.createElement('canvas'); const checkGl = checkCanvas.getContext('webgl2'); const debugInfo = checkGl?.getExtension('WEBGL_debug_renderer_info'); if (checkGl && debugInfo) { const renderer = checkGl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL); if (renderer.startsWith('ANGLE (Google, Vulkan 1.3.0 (SwiftShader Device (Subzero)')) { this._disableWebglForThisSession(); return; } } } const Addon = await this._getWebglAddonConstructor(); this._webglAddon = new Addon(); this._disposeOfCanvasRenderer();"} {"_id":"doc-en-vscode-0004bebc0b5418db748319fc18f191f5337be3af9b34550f192eed9e728f9e9b","title":"","text":"if (!neverMeasureRenderTime && this._configHelper.config.gpuAcceleration !== 'off') { this._measureRenderTime(); } XtermTerminal._suggestedRendererType = 'canvas'; this._disposeOfWebglRenderer(); this._enableCanvasRenderer(); this._disableWebglForThisSession(); } } private _disableWebglForThisSession() { XtermTerminal._suggestedRendererType = 'canvas'; this._disposeOfWebglRenderer(); this._enableCanvasRenderer(); } private async _enableCanvasRenderer(): Promise { if (!this.raw.element || this._canvasAddon) { return;"} {"_id":"doc-en-vscode-4b0162a849095410e549ab0e732298c24dc3e352351d8173a9ee397504bc190a","title":"","text":"}); suite('renderers', () => { test('should re-evaluate gpu acceleration auto when the setting is changed', async () => { // This is skipped until the webgl renderer bug is fixed in Chromium // https://bugs.chromium.org/p/chromium/issues/detail?id=1476475 test.skip('should re-evaluate gpu acceleration auto when the setting is changed', async () => { // Check initial state strictEqual(TestWebglAddon.isEnabled, false);"} {"_id":"doc-en-vscode-bb044755bb0d21f43c06a61e154a5fd788aef8f5227f561bb1954760d53cf0cf","title":"","text":"* Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { Disposable, MutableDisposable } from 'vs/base/common/lifecycle'; import { Disposable, DisposableStore, MutableDisposable } from 'vs/base/common/lifecycle'; import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility'; import { ITerminalCapabilityStore, TerminalCapability } from 'vs/platform/terminal/common/capabilities/capabilities'; import { ITerminalLogService } from 'vs/platform/terminal/common/terminal'; import type { Terminal, ITerminalAddon } from 'xterm'; import { debounce } from 'vs/base/common/decorators'; import { addDisposableListener } from 'vs/base/browser/dom'; export interface ITextAreaData { content: string;"} {"_id":"doc-en-vscode-e75c8017f4e51e6d2cdecdd80903cf90ceb3d53ab26d1e43606371c948b25a88","title":"","text":"export class TextAreaSyncAddon extends Disposable implements ITerminalAddon { private _terminal: Terminal | undefined; private _onCursorMoveListener = this._register(new MutableDisposable()); private _listeners = this._register(new MutableDisposable()); private _currentCommand: string | undefined; private _cursorX: number | undefined; activate(terminal: Terminal): void { this._terminal = terminal; if (this._accessibilityService.isScreenReaderOptimized()) { this._onCursorMoveListener.value = this._terminal.onCursorMove(() => this._refreshTextArea()); this._registerSyncListeners(); } }"} {"_id":"doc-en-vscode-a567fa036530dd798d613e15c8e9d4ff98ba4eb73ea474030333697513295e67","title":"","text":") { super(); this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(() => { if (this._accessibilityService.isScreenReaderOptimized() && this._terminal) { this._refreshTextArea(); this._onCursorMoveListener.value = this._terminal.onCursorMove(() => this._refreshTextArea()); if (this._accessibilityService.isScreenReaderOptimized()) { this._syncTextArea(); this._registerSyncListeners(); } else { this._onCursorMoveListener.clear(); this._listeners.clear(); } })); } private _refreshTextArea(focusChanged?: boolean): void { private _registerSyncListeners(): void { if (this._accessibilityService.isScreenReaderOptimized() && this._terminal?.textarea) { this._listeners.value = new DisposableStore(); this._listeners.value.add(this._terminal.onCursorMove(() => this._syncTextArea())); this._listeners.value.add(this._terminal.onData(() => this._syncTextArea())); this._listeners.value.add(addDisposableListener(this._terminal.textarea, 'focus', () => this._syncTextArea())); } } @debounce(50) private _syncTextArea(): void { this._logService.debug('TextAreaSyncAddon#syncTextArea'); const textArea = this._terminal?.textarea; if (!textArea) { this._logService.debug(`TextAreaSyncAddon#syncTextArea: no textarea`); return; } this._updateCommandAndCursor(); if (this._currentCommand !== textArea.value) { textArea.value = this._currentCommand || ''; this._logService.debug(`TextAreaSyncAddon#syncTextArea: text changed to \"${this._currentCommand}\"`); } else if (!this._currentCommand) { textArea.value = ''; this._logService.debug(`TextAreaSyncAddon#syncTextArea: text cleared`); } if (this._cursorX !== textArea.selectionStart) { textArea.selectionStart = this._cursorX ?? 0; textArea.selectionEnd = this._cursorX ?? 0; this._logService.debug(`TextAreaSyncAddon#syncTextArea: selection start/end changed to ${this._cursorX}`); } } private _updateCommandAndCursor(): void { if (!this._terminal) { return; } this._logService.debug('TextAreaSyncAddon#refreshTextArea'); const commandCapability = this._capabilities.get(TerminalCapability.CommandDetection); const currentCommand = commandCapability?.currentCommand; if (!currentCommand) { this._logService.debug(`TextAreaSyncAddon#refreshTextArea: no currentCommand`); this._logService.debug(`TextAreaSyncAddon#updateCommandAndCursor: no current command`); return; } const buffer = this._terminal.buffer.active; const line = buffer.getLine(buffer.cursorY)?.translateToString(true); let commandStartX: number | undefined; if (!line) { this._logService.debug(`TextAreaSyncAddon#refreshTextArea: no line`); this._logService.debug(`TextAreaSyncAddon#updateCommandAndCursor: no line`); return; } let content: string | undefined; if (currentCommand.commandStartX) { if (currentCommand.commandStartX !== undefined) { // Left prompt content = line.substring(currentCommand.commandStartX); commandStartX = currentCommand.commandStartX; } else if (currentCommand.commandRightPromptStartX) { this._currentCommand = line.substring(currentCommand.commandStartX); this._cursorX = buffer.cursorX - currentCommand.commandStartX; } else if (currentCommand.commandRightPromptStartX !== undefined) { // Right prompt content = line.substring(0, currentCommand.commandRightPromptStartX); commandStartX = 0; } if (!content) { this._logService.debug(`TextAreaSyncAddon#refreshTextArea: no content`); return; } if (commandStartX === undefined) { this._logService.debug(`TextAreaSyncAddon#refreshTextArea: no commandStartX`); return; } const textArea = this._terminal.textarea; if (!textArea) { this._logService.debug(`TextAreaSyncAddon#refreshTextArea: no textarea`); return; } this._logService.debug(`TextAreaSyncAddon#refreshTextArea: content is \"${content}\"`); this._logService.debug(`TextAreaSyncAddon#refreshTextArea: textContent is \"${textArea.textContent}\"`); if (focusChanged || content !== textArea.textContent) { textArea.textContent = content; this._logService.debug(`TextAreaSyncAddon#refreshTextArea: textContent changed to \"${content}\"`); } const cursorX = buffer.cursorX - commandStartX; this._logService.debug(`TextAreaSyncAddon#refreshTextArea: cursorX is ${cursorX}`); this._logService.debug(`TextAreaSyncAddon#refreshTextArea: selectionStart is ${textArea.selectionStart}`); if (focusChanged || cursorX !== textArea.selectionStart) { textArea.selectionStart = cursorX; textArea.selectionEnd = cursorX; this._logService.debug(`TextAreaSyncAddon#refreshTextArea: selectionStart changed to ${cursorX}`); this._currentCommand = line.substring(0, currentCommand.commandRightPromptStartX); this._cursorX = buffer.cursorX; } else { this._currentCommand = undefined; this._cursorX = undefined; this._logService.debug(`TextAreaSyncAddon#updateCommandAndCursor: neither commandStartX nor commandRightPromptStartX`); } // TODO: cursorY? } }"} {"_id":"doc-en-vscode-d514c260f5b681577d007a8aad3a9f5ebd748399beecd54e120e1fd5c08e0b2c","title":"","text":"if (event.affectsConfiguration(TitlebarPart.configCommandCenter)) { this.updateTitle(); this._onDidChangeCommandCenterVisibility.fire(); this._onDidChange.fire(undefined); } }"} {"_id":"doc-en-vscode-9bbc8939eae0ace0396c528863f1b53b5e33bd4182c8f42b70da4bffda7dfb5a","title":"","text":"getScoped(scope: EnvironmentVariableScope): EnvironmentVariableCollection; } export type EnvironmentVariableScope = { /** * The scope object to which the environment variable collection applies. */ export interface EnvironmentVariableScope { /** * Any specific workspace folder to get collection for. */ workspaceFolder?: WorkspaceFolder; }; } /** * A location in the editor at which progress information can be shown. It depends on the"} {"_id":"doc-en-vscode-b2352ff05311cd763f56ccd26f1dc04b13665e47ce5199e6fbec878e3545343f","title":"","text":"if (isNonEmptyArray(notification.actions && notification.actions.secondary)) { actions++; // secondary actions } this.offsetHelper.style.width = `${450 /* notifications container width */ - (10 /* padding */ + 26 /* severity icon */ + (actions * (24 + 8)) /* 24px (+8px padding) per action */ - 4 /* 4px less padding for last action */)}px`; this.offsetHelper.style.width = `${450 /* notifications container width */ - (10 /* padding */ + 30 /* severity icon */ + (actions * 30) /* actions */ - (Math.max(actions - 1, 0) * 4) /* less padding for actions > 1 */)}px`; // Render message into offset helper const renderedMessage = NotificationMessageRenderer.render(notification.message);"} {"_id":"doc-en-vscode-0ace3ff6a7755688828f6df1d493f25417c439801d2557a53708b6a70e3ff0d9","title":"","text":"pinned, selection, revealIfVisible: true, indexedCellOptions: element instanceof MatchInNotebook ? { index: element.cellIndex, selection: element.range() } : undefined, }; try {"} {"_id":"doc-en-vscode-828d8302019e2357b691db7d7083503280fd23ffc5ca868eecf874b595515bee","title":"","text":"disturl=\"https://electronjs.org/headers\" target=\"30.5.1\" ms_build_id=\"10262041\" ms_build_id=\"10306386\" runtime=\"electron\" build_from_source=\"true\" legacy-peer-deps=\"true\""} {"_id":"doc-en-vscode-6dbc05db96560c98c83aed3030ee846b0ab1c1d52039b9d999b94117fbebe402","title":"","text":"{ \"name\": \"code-oss-dev\", \"version\": \"1.95.0\", \"distro\": \"350f0404ef17accb38b1359e82886738870a7377\", \"distro\": \"1f05cd9b265f2477905f0b7688a66cfb2c6061f5\", \"author\": { \"name\": \"Microsoft Corporation\" },"} {"_id":"doc-en-vscode-a345647ffb5c5372b3a32f85a6d00d15ea8bf0e60a5f79df12a02371faa3e91b","title":"","text":"} None => SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), args.port), }; let builder = Server::try_bind(&addr).map_err(CodeError::CouldNotListenOnInterface)?; let mut listening = format!(\"Web UI available at http://{}\", addr); if let Some(ct) = args.connection_token {"} {"_id":"doc-en-vscode-29878bde6dcd36fb1437b9eac03c03c4a196457d844ae7c40a71516de38ba2c1","title":"","text":"} ctx.log.result(listening); Server::bind(&addr) builder .serve(make_service_fn(|_| make_svc())) .with_graceful_shutdown(async { let _ = shutdown.wait().await;"} {"_id":"doc-en-vscode-a357f3ed265bd9be203b7216916ac8a8893ba0f8597a7363b8b6340baa0fd58f","title":"","text":".test-output-peek-tree { color: var(--vscode-editor-foreground); border-left: 1px solid var(--vscode-panelSection-border); } .test-output-peek-tree .monaco-list-row .monaco-action-bar,"} {"_id":"doc-en-vscode-8a22b96ed10587c74315c179d84a0c20e5e168fb742af09f3c01708ab890c740","title":"","text":"import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { TerminalCapability } from 'vs/platform/terminal/common/capabilities/capabilities'; import { TerminalCapabilityStore } from 'vs/platform/terminal/common/capabilities/terminalCapabilityStore'; import { formatMessageForTerminal } from 'vs/platform/terminal/common/terminalStrings'; import { IColorTheme, IThemeService } from 'vs/platform/theme/common/themeService'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IViewPaneOptions, ViewPane } from 'vs/workbench/browser/parts/views/viewPane';"} {"_id":"doc-en-vscode-73938f3005137b1913c3f7dde490fe1f48df996e36b34c3a8c1cb150f4570992","title":"","text":"terminal.xterm.write(chunk.buffer, () => pendingWrites.value--); } } else { didWriteData = true; this.writeNotice(terminal, localize('runNoOutputForPast', 'Test output is only available for new test runs.')); }"} {"_id":"doc-en-vscode-a6835b3401a9b52930fa7339dede81292f265cc0175b6081227f1bbef3f99697","title":"","text":"} private writeNotice(terminal: IDetachedTerminalInstance, str: string) { terminal.xterm.write(`x1b[2m${str}x1b[0m`); terminal.xterm.write(formatMessageForTerminal(str)); } private attachTerminalToDom(terminal: IDetachedTerminalInstance) {"} {"_id":"doc-en-vscode-fd6914f8a7a5471d3bdd3dc30b1269f45ccd7f13a09c059d32796c6f36b88782","title":"","text":"})); if (this._dimension) { this._list.layout(this._dimension.height, this._dimension.width); this._list.layout(this.getBodyHeight(this._dimension.height), this._dimension.width); } else { this._list.layout(); }"} {"_id":"doc-en-vscode-bcaf3171acc258ebca3f678317cf0a23a864c08b961193fe4fc11bb59ab04d1d","title":"","text":"return this._scrollBeyondLastLine && !this.isEmbedded; } private getBodyHeight(dimensionHeight: number) { return Math.max(dimensionHeight - (this._notebookTopToolbar?.useGlobalToolbar ? /** Toolbar height */ 26 : 0), 0); } layout(dimension: DOM.Dimension, shadowElement?: HTMLElement, position?: DOM.IDomPosition): void { if (!shadowElement && this._shadowElementViewInfo === null) { this._dimension = dimension;"} {"_id":"doc-en-vscode-6fc6da688842c3a376f0762065868723c857a13a47d512013acc36a798e5ac37","title":"","text":"this._dimension = dimension; this._position = position; const newBodyHeight = Math.max(dimension.height - (this._notebookTopToolbar?.useGlobalToolbar ? /** Toolbar height */ 26 : 0), 0); const newBodyHeight = this.getBodyHeight(dimension.height); DOM.size(this._body, dimension.width, newBodyHeight); const topInserToolbarHeight = this._notebookOptions.computeTopInsertToolbarHeight(this.viewModel?.viewType);"} {"_id":"doc-en-vscode-162207153ef731bc12b0f8318ad2b8ca1d3bed0b9016463ec0f1414d691cfa34","title":"","text":"} if (this._cursorX !== textArea.selectionStart) { textArea.selectionStart = this._cursorX ?? 0; textArea.selectionEnd = this._cursorX ?? 0; this._logService.debug(`TextAreaSyncAddon#syncTextArea: selection start/end changed to ${this._cursorX}`); const selection = !this._cursorX || this._cursorX < 0 ? 0 : this._cursorX; textArea.selectionStart = selection; textArea.selectionEnd = selection; this._logService.debug(`TextAreaSyncAddon#syncTextArea: selection start/end changed to ${selection}`); } }"} {"_id":"doc-en-vscode-9846a34f3e544b9cc021cd971f98350972b365cb05e44215621b26db96d80ad9","title":"","text":"private _dimensions: ITerminalDimensions; private __isCommandStorageDisabled: boolean = false; private _handleCommandStartOptions?: IHandleCommandOptions; private _commandStartWindowsPromise?: Promise; get commands(): readonly ITerminalCommand[] { return this._commands; } get executingCommand(): string | undefined { return this._currentCommand.command; }"} {"_id":"doc-en-vscode-c2e6bc1c9e75fc9a64eef2d82c86461e671ca019acc76f283ab1e5d84d738f11","title":"","text":"return; } if (this._isWindowsPty) { this._handleCommandStartWindows(); this._commandStartWindowsPromise = this._handleCommandStartWindows(); return; } this._currentCommand.commandStartX = this._terminal.buffer.active.cursorX;"} {"_id":"doc-en-vscode-a02a121babeeda9e07471c7f6c86b9393acc72fbe26704942d020d6ebce05737","title":"","text":"this._logService.debug('CommandDetectionCapability#handleCommandStart', this._currentCommand.commandStartX, this._currentCommand.commandStartMarker?.line); } private _handleCommandStartWindows(): void { private async _handleCommandStartWindows(): Promise { this._currentCommand.commandStartX = this._terminal.buffer.active.cursorX; // On Windows track all cursor movements after the command start sequence this._commandMarkers.length = 0; // HACK: Fire command started on the following frame on Windows to allow the cursor // position to update as conpty often prints the sequence on a different line to the // actual line the command started on. timeout(0).then(() => { if (!this._currentCommand.commandExecutedMarker) { this._onCursorMoveListener = this._terminal.onCursorMove(() => { if (this._commandMarkers.length === 0 || this._commandMarkers[this._commandMarkers.length - 1].line !== this._terminal.buffer.active.cursorY) { const marker = this._terminal.registerMarker(0); if (marker) { this._commandMarkers.push(marker); } } }); const lastCommand = this.commands.at(-1); function cursorOnCorrectLine(terminal: Terminal): boolean { if (!lastCommand) { return false; } this._currentCommand.commandStartMarker = this._terminal.registerMarker(0); if (this._currentCommand.commandStartMarker) { const line = this._terminal.buffer.active.getLine(this._currentCommand.commandStartMarker.line); if (line) { this._currentCommand.commandStartLineContent = line.translateToString(true); const cursorYAbsolute = terminal.buffer.active.baseY + terminal.buffer.active.cursorY; // If the cursor position is within the last command, we should poll. const lastCommandYAbsolute = (lastCommand.endMarker ? lastCommand.endMarker.line : lastCommand.marker?.line) ?? -1; return cursorYAbsolute > lastCommandYAbsolute; } function lineIsPrompt(terminal: Terminal): boolean { const line = terminal.buffer.active.getLine(terminal.buffer.active.baseY + terminal.buffer.active.cursorY); if (!line) { return false; } // TODO: fine tune prompt regex to accomodate for unique configurtions. return line.translateToString(true)?.match(/^(PS.+>)|([A-Z]:.*>)/) !== null; } // Conpty could have the wrong cursor position at this point. if (!cursorOnCorrectLine(this._terminal) || !lineIsPrompt(this._terminal)) { // Poll for 200ms until the cursor position is correct. for (let i = 0; i < 20; i++) { await timeout(10); if (cursorOnCorrectLine(this._terminal) && lineIsPrompt(this._terminal)) { this._logService.debug('CommandDetectionCapability#_handleCommandStartWindows polling attempts required: ', i + 1); break; } } this._onCommandStarted.fire({ marker: this._currentCommand.commandStartMarker } as ITerminalCommand); this._logService.debug('CommandDetectionCapability#_handleCommandStartWindows', this._currentCommand.commandStartX, this._currentCommand.commandStartMarker?.line); }); } else { // HACK: Fire command started on the following frame on Windows to allow the cursor // position to update as conpty often prints the sequence on a different line to the // actual line the command started on. await timeout(0); } if (!this._currentCommand.commandExecutedMarker) { this._onCursorMoveListener = this._terminal.onCursorMove(() => { if (this._commandMarkers.length === 0 || this._commandMarkers[this._commandMarkers.length - 1].line !== this._terminal.buffer.active.cursorY) { const marker = this._terminal.registerMarker(0); if (marker) { this._commandMarkers.push(marker); } } }); } this._currentCommand.commandStartMarker = this._terminal.registerMarker(0); if (this._currentCommand.commandStartMarker) { const line = this._terminal.buffer.active.getLine(this._currentCommand.commandStartMarker.line); if (line) { this._currentCommand.commandStartLineContent = line.translateToString(true); } } this._onCommandStarted.fire({ marker: this._currentCommand.commandStartMarker } as ITerminalCommand); this._logService.debug('CommandDetectionCapability#_handleCommandStartWindows', this._currentCommand.commandStartX, this._currentCommand.commandStartMarker?.line); } handleGenericCommand(options?: IHandleCommandOptions): void {"} {"_id":"doc-en-vscode-4620663f8d2234012e7e78c9895fb091b3c122dd277f44ac9b5d27fa73eceef1","title":"","text":"handleCommandExecuted(options?: IHandleCommandOptions): void { if (this._isWindowsPty) { this._handleCommandExecutedWindows(); this._commandStartWindowsPromise?.then(() => this._handleCommandExecutedWindows()); return; }"} {"_id":"doc-en-vscode-2776938be2a4cefa3067d3801b5517e9814e049e3ead406f619e18f970813a8b","title":"","text":"handleCommandFinished(exitCode: number | undefined, options?: IHandleCommandOptions): void { if (this._isWindowsPty) { this._preHandleCommandFinishedWindows(); this._commandStartWindowsPromise?.then(() => this._preHandleCommandFinishedWindows()); } this._currentCommand.commandFinishedMarker = options?.marker || this._terminal.registerMarker(0);"} {"_id":"doc-en-vscode-b28b2aa9d22569229a88103a36b6b3b3b7a9608993d844cb7a745a84cc0fdf6e","title":"","text":"return range; } return decorations[0].getActiveRange() ?? undefined; return (decorations.length > 0 ? (decorations[0].getActiveRange() ?? undefined) : undefined); } public dispose(): void {"} {"_id":"doc-en-vscode-06d79c4566cef6116f47d36c2152e5e97030a0f35c763da1d5763f95c6a5036a","title":"","text":"@IKeybindingService private _keybindingService: IKeybindingService, @IInstantiationService private _instaService: IInstantiationService, ) { super(undefined, _submenu.actions[0], options); super(undefined, _submenu.actions.find(action => action.id === 'workbench.action.quickOpenWithModes') ?? _submenu.actions[0], options); } override render(container: HTMLElement): void {"} {"_id":"doc-en-vscode-17dfc967e5a380e8b25061cc72c1186d03bf7b991c0a6e70db0e6a1320e73cd2","title":"","text":"}); const CONTEXT_TOOLBAR_COMMAND_CENTER = ContextKeyExpr.equals('config.debug.toolBarLocation', 'commandCenter'); MenuRegistry.appendMenuItem(MenuId.CommandCenterCenter, { submenu: MenuId.DebugToolBar, title: 'Debug', icon: Codicon.debug, order: 1, when: ContextKeyExpr.and(CONTEXT_IN_DEBUG_MODE, ContextKeyExpr.equals('config.debug.toolBarLocation', 'commandCenter')) when: ContextKeyExpr.and(CONTEXT_IN_DEBUG_MODE, CONTEXT_TOOLBAR_COMMAND_CENTER) }); registerDebugToolBarItem(CONTINUE_ID, CONTINUE_LABEL, 10, icons.debugContinue, CONTEXT_DEBUG_STATE.isEqualTo('stopped'));"} {"_id":"doc-en-vscode-f4fa6a3d039f534629938ddb219184980860462697e4cb25b3ab6f0e8952c659","title":"","text":"registerDebugToolBarItem(RESTART_SESSION_ID, RESTART_LABEL, 60, icons.debugRestart); registerDebugToolBarItem(STEP_BACK_ID, localize('stepBackDebug', \"Step Back\"), 50, icons.debugStepBack, CONTEXT_STEP_BACK_SUPPORTED, CONTEXT_DEBUG_STATE.isEqualTo('stopped')); registerDebugToolBarItem(REVERSE_CONTINUE_ID, localize('reverseContinue', \"Reverse\"), 55, icons.debugReverseContinue, CONTEXT_STEP_BACK_SUPPORTED, CONTEXT_DEBUG_STATE.isEqualTo('stopped')); registerDebugToolBarItem(FOCUS_SESSION_ID, FOCUS_SESSION_LABEL, 100, Codicon.listTree, CONTEXT_MULTI_SESSION_DEBUG); registerDebugToolBarItem(FOCUS_SESSION_ID, FOCUS_SESSION_LABEL, 100, Codicon.listTree, ContextKeyExpr.and(CONTEXT_MULTI_SESSION_DEBUG, CONTEXT_TOOLBAR_COMMAND_CENTER.negate())); MenuRegistry.appendMenuItem(MenuId.DebugToolBarStop, { group: 'navigation',"} {"_id":"doc-en-vscode-25ec1ccffa95ad56438a0e69e84ff447f28176d464885aaa6b33156e23ed8e7f","title":"","text":"Registry.as(Extensions.Configuration).registerConfiguration({ ...editorConfigurationBaseNode, properties: { 'editor.codeActionWidget.includeNearbyQuickfixes': { 'editor.codeActionWidget.includeNearbyQuickFixes': { type: 'boolean', scope: ConfigurationScope.LANGUAGE_OVERRIDABLE, description: nls.localize('includeNearbyQuickfixes', \"Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic.\"), description: nls.localize('includeNearbyQuickFixes', \"Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic.\"), default: true, }, }"} {"_id":"doc-en-vscode-21ca141b39e41ad536d4543efb02651bea68366e5de787506f2b3301beb3806f","title":"","text":"const currPosition = trigger.selection.getPosition(); let trackedPosition = currPosition; let distance = Number.MAX_VALUE; let toBeModified = false; const currentActions = [...codeActionSet.validActions]; for (const marker of allMarkers) { const col = marker.endColumn;"} {"_id":"doc-en-vscode-7f439f67897ae7c1d3f87058fdd3c11b726502e799586016ff9a01b22bb3b1f6","title":"","text":"const startRow = marker.startLineNumber; // Found quickfix on the same line and check relative distance to other markers if ((row === currPosition.lineNumber || startRow === currPosition.lineNumber) && Math.abs(currPosition.column - col) < distance) { distance = Math.abs(currPosition.column - col); toBeModified = true; if ((row === currPosition.lineNumber || startRow === currPosition.lineNumber)) { trackedPosition = new Position(row, col); const newCodeActionTrigger: CodeActionTrigger = { type: trigger.trigger.type, triggerAction: trigger.trigger.triggerAction, filter: { include: trigger.trigger.filter?.include ? trigger.trigger.filter?.include : CodeActionKind.QuickFix }, autoApply: trigger.trigger.autoApply, context: { notAvailableMessage: trigger.trigger.context?.notAvailableMessage || '', position: trackedPosition } }; const selectionAsPosition = new Selection(trackedPosition.lineNumber, trackedPosition.column, trackedPosition.lineNumber, trackedPosition.column); const actionsAtMarker = await getCodeActions(this._registry, model, selectionAsPosition, newCodeActionTrigger, Progress.None, token); if (actionsAtMarker.validActions.length !== 0) { for (const action of actionsAtMarker.validActions) { action.highlightRange = action.action.isPreferred; } // Already filtered through to only get quickfixes, so no need to filter again. if (Math.abs(currPosition.column - col) < distance) { currentActions.unshift(...actionsAtMarker.validActions); } else { currentActions.push(...actionsAtMarker.validActions); } } distance = Math.abs(currPosition.column - col); } } currentActions.filter((action, index, self) => self.findIndex((a) => a.action.title === action.action.title) === index); currentActions.sort((a, b) => { if (a.action.isPreferred && !b.action.isPreferred) { return -1; } else if (!a.action.isPreferred && b.action.isPreferred) { return 1; } else { return 0; } }); // Only retriggers if actually found quickfix on the same line as cursor if (toBeModified) { const newCodeActionTrigger: CodeActionTrigger = { type: trigger.trigger.type, triggerAction: trigger.trigger.triggerAction, filter: { include: trigger.trigger.filter?.include ? trigger.trigger.filter?.include : CodeActionKind.QuickFix }, autoApply: trigger.trigger.autoApply, context: { notAvailableMessage: trigger.trigger.context?.notAvailableMessage || '', position: trackedPosition } }; const selectionAsPosition = new Selection(trackedPosition.lineNumber, trackedPosition.column, trackedPosition.lineNumber, trackedPosition.column); const actionsAtMarker = await getCodeActions(this._registry, model, selectionAsPosition, newCodeActionTrigger, Progress.None, token); const currentActions = [...codeActionSet.validActions]; if (actionsAtMarker.validActions.length !== 0) { actionsAtMarker.validActions.forEach(action => { action.highlightRange = action.action.isPreferred; }); // Already filtered through to only get quickfixes, so no need to filter again. currentActions.push(...actionsAtMarker.validActions); } return { validActions: currentActions, allActions: codeActionSet.allActions, documentation: codeActionSet.documentation, hasAutoFix: codeActionSet.hasAutoFix, dispose: () => { codeActionSet.dispose(); } }; } return { validActions: currentActions, allActions: codeActionSet.allActions, documentation: codeActionSet.documentation, hasAutoFix: codeActionSet.hasAutoFix, dispose: () => { codeActionSet.dispose(); } }; } } } // temporarilly hiding here as this is enabled/disabled behind a setting. return getCodeActions(this._registry, model, trigger.selection, trigger.trigger, Progress.None, token); }); if (trigger.trigger.type === CodeActionTriggerType.Invoke) { this._progressService?.showWhile(actions, 250); }"} {"_id":"doc-en-vscode-f65cc0fa4ab4b60cef6777ae30f52aa90c1e77ee9a5da5f54090468b8fe9d093","title":"","text":"return { ahead: Number(ahead) || 0, behind: Number(behind) || 0 }; } async revParse(ref: string): Promise { try { const result = await this.exec(['rev-parse', ref]); if (result.stderr) { return undefined; } return result.stdout.trim(); } catch (err) { return undefined; } } async updateSubmodules(paths: string[]): Promise { const args = ['submodule', 'update'];"} {"_id":"doc-en-vscode-653c205f7a2931a5811cc4a9abe9b7bbd821e03c14b252996173ef69170f66ae","title":"","text":"} const optionsRef = options.limit.id; const historyItemGroupIdRef = await this.repository.revParse(historyItemGroupId) ?? ''; const [commits, summary] = await Promise.all([ this.repository.log({ range: `${optionsRef}..${historyItemGroupId}`, sortByAuthorDate: true }), this.getSummaryHistoryItem(optionsRef, historyItemGroupId) this.repository.log({ range: `${optionsRef}..${historyItemGroupIdRef}`, sortByAuthorDate: true }), this.getSummaryHistoryItem(optionsRef, historyItemGroupIdRef) ]); const historyItems = commits.length === 0 ? [] : [summary];"} {"_id":"doc-en-vscode-8a2cc55fb639afedbd17335aa2a902808fddd9bbc24ffbc5424a214ccf4fb071","title":"","text":"RevertFiles = 'RevertFiles', RevertFilesNoProgress = 'RevertFilesNoProgress', RevList = 'RevList', RevParse = 'RevParse', SetBranchUpstream = 'SetBranchUpstream', Show = 'Show', Stage = 'Stage',"} {"_id":"doc-en-vscode-17567db222316f66a9cbca7bb458eb2acfb0c8ac6c3a51f107cc4e9b5ba42429","title":"","text":"GetBranchOperation | GetBranchesOperation | GetCommitTemplateOperation | GetObjectDetailsOperation | GetRefsOperation | GetRemoteRefsOperation | HashObjectOperation | IgnoreOperation | LogOperation | LogFileOperation | MergeOperation | MergeAbortOperation | MergeBaseOperation | MoveOperation | PostCommitCommandOperation | PullOperation | PushOperation | RemoteOperation | RenameBranchOperation | RemoveOperation | ResetOperation | RebaseOperation | RebaseAbortOperation | RebaseContinueOperation | RevertFilesOperation | RevListOperation | ResetOperation | RebaseOperation | RebaseAbortOperation | RebaseContinueOperation | RevertFilesOperation | RevListOperation | RevParseOperation | SetBranchUpstreamOperation | ShowOperation | StageOperation | StatusOperation | StashOperation | SubmoduleUpdateOperation | SyncOperation | TagOperation;"} {"_id":"doc-en-vscode-53846226434d59f0c522fc1553857e6c20f5dba8c038d07d812e5df0ee0a30c1","title":"","text":"export type RebaseContinueOperation = BaseOperation & { kind: OperationKind.RebaseContinue }; export type RevertFilesOperation = BaseOperation & { kind: OperationKind.RevertFiles }; export type RevListOperation = BaseOperation & { kind: OperationKind.RevList }; export type RevParseOperation = BaseOperation & { kind: OperationKind.RevParse }; export type SetBranchUpstreamOperation = BaseOperation & { kind: OperationKind.SetBranchUpstream }; export type ShowOperation = BaseOperation & { kind: OperationKind.Show }; export type StageOperation = BaseOperation & { kind: OperationKind.Stage };"} {"_id":"doc-en-vscode-14570ad712e1cf644d790f8584105b0d002b28c3c99bcf71bb12282935de184b","title":"","text":"RebaseContinue: { kind: OperationKind.RebaseContinue, blocking: false, readOnly: false, remote: false, retry: false, showProgress: true } as RebaseContinueOperation, RevertFiles: (showProgress: boolean) => ({ kind: OperationKind.RevertFiles, blocking: false, readOnly: false, remote: false, retry: false, showProgress } as RevertFilesOperation), RevList: { kind: OperationKind.RevList, blocking: false, readOnly: true, remote: false, retry: false, showProgress: false } as RevListOperation, RevParse: { kind: OperationKind.RevParse, blocking: false, readOnly: true, remote: false, retry: false, showProgress: false } as RevParseOperation, SetBranchUpstream: { kind: OperationKind.SetBranchUpstream, blocking: false, readOnly: false, remote: false, retry: false, showProgress: true } as SetBranchUpstreamOperation, Show: { kind: OperationKind.Show, blocking: false, readOnly: true, remote: false, retry: false, showProgress: false } as ShowOperation, Stage: { kind: OperationKind.Stage, blocking: false, readOnly: false, remote: false, retry: false, showProgress: true } as StageOperation,"} {"_id":"doc-en-vscode-5ccbfabed757e36cb3cf10187ce27ea4a320b9fe931ca7768061e78d439960e8","title":"","text":"return await this.run(Operation.RevList, () => this.repository.getCommitCount(range)); } async revParse(ref: string): Promise { return await this.run(Operation.RevParse, () => this.repository.revParse(ref)); } async reset(treeish: string, hard?: boolean): Promise { await this.run(Operation.Reset, () => this.repository.reset(treeish, hard)); }"} {"_id":"doc-en-vscode-15e05e8ee813287300b3b8f45c28bb5d3ec8fbd13f15138258a4d91e6834f36d","title":"","text":"'editor.codeActionWidget.includeNearbyQuickfixes': { type: 'boolean', scope: ConfigurationScope.LANGUAGE_OVERRIDABLE, description: nls.localize('includeNearbyQuickfixes', \"Enable/disable showing nearest quickfix within a line when not currently on a diagnostic.\"), default: false, description: nls.localize('includeNearbyQuickfixes', \"Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic.\"), default: true, }, } });"} {"_id":"doc-en-vscode-c6861daeff2f85888c94a66fc6ff7bdd4fdbcbe90aace76286bc328e0a5f6e99","title":"","text":"} editor = editor ?? this.editorService.activeTextEditorControl; if (isDiffEditor(editor)) { if (editor.getOriginalEditor().hasTextFocus()) { editor = editor.getOriginalEditor(); } else { editor = editor.getModifiedEditor(); } } if (!editor) { return null;"} {"_id":"doc-en-vscode-16e4e8b1c88f198b4048978eb49226257a3c6d351aeb9b752a7162e795f79e2f","title":"","text":"return undefined; } export function getSelectionTextFromEditor(allowUnselectedWord: boolean, editor: IEditor): string | null { export function getSelectionTextFromEditor(allowUnselectedWord: boolean, activeEditor: IEditor): string | null { let editor = activeEditor; if (isDiffEditor(editor)) { if (editor.getOriginalEditor().hasTextFocus()) { editor = editor.getOriginalEditor(); } else { editor = editor.getModifiedEditor(); } } if (!isCodeEditor(editor) || !editor.hasModel()) { return null;"} {"_id":"doc-en-vscode-edc3d507d39d75a1513de87889c474b115c7799bddc550ff0acb1f92d0b711af","title":"","text":"import { Mime, mediaMimes } from '../../util/mimes'; import { Schemes } from '../../util/schemes'; import { createEditForMediaFiles, tryGetUriListSnippet } from './shared'; import { getParentDocumentUri } from '../../util/document'; class ResourceDropProvider implements vscode.DocumentDropEditProvider {"} {"_id":"doc-en-vscode-012913dac72932763ae1b3c009c94f153e83871da027b1ce54ce889277ec68f0","title":"","text":"} private async _getMediaFilesEdit(document: vscode.TextDocument, dataTransfer: vscode.DataTransfer, token: vscode.CancellationToken): Promise { if (document.uri.scheme === Schemes.untitled) { if (getParentDocumentUri(document.uri).scheme === Schemes.untitled) { return; }"} {"_id":"doc-en-vscode-427226dda2a18c009abb48884b8861d8dd60ff9a4cbd98f8402de272a8ea8d87","title":"","text":"import { Mime, mediaMimes } from '../../util/mimes'; import { Schemes } from '../../util/schemes'; import { PasteUrlAsFormattedLink, createEditAddingLinksForUriList, createEditForMediaFiles, getPasteUrlAsFormattedLinkSetting } from './shared'; import { getParentDocumentUri } from '../../util/document'; class PasteResourceEditProvider implements vscode.DocumentPasteEditProvider {"} {"_id":"doc-en-vscode-ce4a0ff160d113a985535f9c251f5f5eb22d6dd617ce86f34a5761e937ee44b5","title":"","text":"} private async _getMediaFilesEdit(document: vscode.TextDocument, dataTransfer: vscode.DataTransfer, token: vscode.CancellationToken): Promise { if (document.uri.scheme === Schemes.untitled) { if (getParentDocumentUri(document.uri).scheme === Schemes.untitled) { return; }"} {"_id":"doc-en-vscode-700651c6ad8db702e57ca1dc6afa86fb517ce04117504fda3fc6f861d85e156d","title":"","text":"this._overlayContainer.style.position = 'absolute'; this._overlayContainer.style.overflow = 'hidden'; if (this._isVisible) { this.layoutContainerOverShadowElement(dimension, position); } this.layoutContainerOverShadowElement(dimension, position); if (this._webviewTransparentCover) { this._webviewTransparentCover.style.height = `${dimension.height}px`;"} {"_id":"doc-en-vscode-f072311847618664764c543965c1d81ea8dbbc8d1fdb6c10e761f1aac71f5930","title":"","text":"import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; import { IOutlineModelService } from 'vs/editor/contrib/documentSymbols/browser/outlineModel'; import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeatures'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { accessibilityHelpIsShown, accessibleViewIsShown } from 'vs/workbench/contrib/accessibility/browser/accessibilityConfiguration'; export class GotoSymbolQuickAccessProvider extends AbstractGotoSymbolQuickAccessProvider {"} {"_id":"doc-en-vscode-8ff95b63e3418a7dfeaa6fa10c0869c1c63ff0a419510f1d945f09208c1599b8","title":"","text":"}, f1: true, keybinding: { when: undefined, when: ContextKeyExpr.and(accessibleViewIsShown.negate(), accessibilityHelpIsShown.negate()), weight: KeybindingWeight.WorkbenchContrib, primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyO },"} {"_id":"doc-en-vscode-36956a4b30752fc978f5c80411d8b8c3fd83cc5aaf8f1fcaf7e4be2391a1922c","title":"","text":"// Windows 32-bit warning if (isWindows && this.environmentService.os.arch === 'ia32') { const message = localize('windows32eolmessage', \"You are running {0} 32-bit, which will soon stop receiving updates on Windows. Consider upgrading to the 64-bit build.\", this.productService.nameLong); const actions = [{ label: localize('windowseolBannerLearnMore', \"Learn More\"), href: 'https://aka.ms/vscode-faq-old-windows' }]; this.bannerService.show({ id: 'windows32eol.banner', message, ariaLabel: localize('windowseolarialabel', \"{0}. Use navigation keys to access banner actions.\", message), actions, icon: Codicon.warning }); this.notificationService.prompt( Severity.Warning,"} {"_id":"doc-en-vscode-288d7b49140c12f56e29c798e6d2d99f7300077d23a0b3ec25df08f8c065caaa","title":"","text":"if (eolReleases.has(majorVersion)) { const message = localize('macoseolmessage', \"{0} on {1} will soon stop receiving updates. Consider upgrading your macOS version.\", this.productService.nameLong, eolReleases.get(majorVersion)); const actions = [{ label: localize('macoseolBannerLearnMore', \"Learn More\"), href: 'https://aka.ms/vscode-faq-old-macOS' }]; this.bannerService.show({ id: 'macoseol.banner', message, ariaLabel: localize('macoseolarialabel', \"{0}. Use navigation keys to access banner actions.\", message), actions, icon: Codicon.warning }); this.notificationService.prompt( Severity.Warning,"} {"_id":"doc-en-vscode-36d2eff6030a2b40a9fc762ecfb379c3d38739c69d925f2b71e43bb0cf0d50d5","title":"","text":"import { assertAllDefined, assertIsDefined } from 'vs/base/common/types'; import { NotificationsCenterVisibleContext } from 'vs/workbench/common/contextkeys'; import { INotificationService } from 'vs/platform/notification/common/notification'; import { AccessibleNotificationEvent, IAccessibleNotificationService } from 'vs/platform/accessibility/common/accessibility'; export class NotificationsCenter extends Themable implements INotificationsCenterController {"} {"_id":"doc-en-vscode-ea9343a2712218337ddd4cc54e4470a099e0f3e0241e7995f7243f24b9ab3dce","title":"","text":"@IEditorGroupsService private readonly editorGroupService: IEditorGroupsService, @IKeybindingService private readonly keybindingService: IKeybindingService, @INotificationService private readonly notificationService: INotificationService, @IAccessibleNotificationService private readonly accessibleNotificationService: IAccessibleNotificationService ) { super(themeService);"} {"_id":"doc-en-vscode-90ae2d7476b7b2d6ad4959ff64b0bf63f6298b6cdaa6e1af7dfd7521e75a7b45","title":"","text":"if (!notification.hasProgress) { notification.close(); } this.accessibleNotificationService.notify(AccessibleNotificationEvent.Clear); } } }"} {"_id":"doc-en-vscode-4f62b0ff40eeba35d028f7ddf065f7af964a511ceb64927784736fbe0a10dd7c","title":"","text":"import { ActionRunner, IAction, WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification } from 'vs/base/common/actions'; import { hash } from 'vs/base/common/hash'; import { firstOrDefault } from 'vs/base/common/arrays'; import { AccessibleNotificationEvent, IAccessibleNotificationService } from 'vs/platform/accessibility/common/accessibility'; // Center export const SHOW_NOTIFICATIONS_CENTER = 'notifications.showList';"} {"_id":"doc-en-vscode-cdf2c9c928143e3d0a101a730f12c020c2dbc123722e7f2d52384aa846904f18","title":"","text":"primary: KeyMod.CtrlCmd | KeyCode.Backspace }, handler: (accessor, args?) => { const accessibleNotificationService = accessor.get(IAccessibleNotificationService); const notification = getNotificationFromContext(accessor.get(IListService), args); if (notification && !notification.hasProgress) { notification.close(); accessibleNotificationService.notify(AccessibleNotificationEvent.Clear); } } });"} {"_id":"doc-en-vscode-93796944aa9c3a0e555edc444d50785bec9151e2a5b59bbf376e313c03b843e9","title":"","text":"this.stateModel.setRuntimeValue(LayoutStateKeys.EDITOR_HIDDEN, false); } // Activity bar cannot be hidden if (this.stateModel.getRuntimeValue(LayoutStateKeys.ACTIVITYBAR_HIDDEN) && !this.canActivityBarBeHidden()) { this.stateModel.setRuntimeValue(LayoutStateKeys.ACTIVITYBAR_HIDDEN, false); } this.stateModel.onDidChangeState(change => { if (change.key === LayoutStateKeys.ACTIVITYBAR_HIDDEN) { this.setActivityBarHidden(change.value as boolean);"} {"_id":"doc-en-vscode-814de4f676b90194275e97f0c8ca28cee5323aa8fd46b433a406981c7137da58","title":"","text":"} } // Activity bar cannot be hidden // This check must be called after state is set // because canActivityBarBeHidden calls isVisible if (this.stateModel.getRuntimeValue(LayoutStateKeys.ACTIVITYBAR_HIDDEN) && !this.canActivityBarBeHidden()) { this.stateModel.setRuntimeValue(LayoutStateKeys.ACTIVITYBAR_HIDDEN, false); } // Window border this.updateWindowBorder(true); }"} {"_id":"doc-en-vscode-c37751a6d6aeca52febcbccd912ed7d6704e7ca8bd0041e36232fd38c31b5c28","title":"","text":"export function parseAuthorityWithPort(authority: string): { host: string; port: number } { const { host, port } = parseAuthority(authority); if (typeof port === 'undefined') { throw new Error(`Remote authority doesn't contain a port!`); throw new Error(`Invalid remote authority: ${authority}. It must either be a remote of form + or a remote host of form :.`); } return { host, port }; }"} {"_id":"doc-en-vscode-1d138f703d600ba995d8ed12868dfc8a6a6c746e24d5171eb397158d2b9731a4","title":"","text":"\"textCodeBlock.background\": \"#2B2B2B\", \"textLink.activeForeground\": \"#4daafc\", \"textLink.foreground\": \"#4daafc\", \"textPreformat.foreground\": \"#D0D0D0\", \"textPreformat.foreground\": \"#D7BA7D\", \"textPreformat.background\": \"#3C3C3C\", \"textSeparator.foreground\": \"#21262D\", \"titleBar.activeBackground\": \"#181818\","} {"_id":"doc-en-vscode-27bb5412257ea9656956482530d9a48ce916e74aeaeb1d8fd31c0ec029cdb036","title":"","text":"\"textCodeBlock.background\": \"#F8F8F8\", \"textLink.activeForeground\": \"#005FB8\", \"textLink.foreground\": \"#005FB8\", \"textPreformat.foreground\": \"#3B3B3B\", \"textPreformat.foreground\": \"#A31515\", \"textPreformat.background\":\t\"#0000001F\", \"textSeparator.foreground\": \"#21262D\", \"titleBar.activeBackground\": \"#F8F8F8\","} {"_id":"doc-en-vscode-4dd1b436eba1a7aae19b3641d9a159640085712cb29ab1d055f35902a28d2078","title":"","text":"export const textSeparatorForeground = registerColor('textSeparator.foreground', { light: '#0000002e', dark: '#ffffff2e', hcDark: Color.black, hcLight: '#292929' }, nls.localize('textSeparatorForeground', \"Color for text separators.\")); export const textLinkForeground = registerColor('textLink.foreground', { light: '#006AB1', dark: '#3794FF', hcDark: '#3794FF', hcLight: '#0F4A85' }, nls.localize('textLinkForeground', \"Foreground color for links in text.\")); export const textLinkActiveForeground = registerColor('textLink.activeForeground', { light: '#006AB1', dark: '#3794FF', hcDark: '#3794FF', hcLight: '#0F4A85' }, nls.localize('textLinkActiveForeground', \"Foreground color for links in text when clicked on and on mouse hover.\")); export const textPreformatForeground = registerColor('textPreformat.foreground', { light: '#A31515', dark: '#D7BA7D', hcDark: '#000000', hcLight: '#FFFFFF' }, nls.localize('textPreformatForeground', \"Foreground color for preformatted text segments.\")); export const textPreformatForeground = registerColor('textPreformat.foreground', { light: '#A31515', dark: '#D7BA7D', hcDark: '#D7BA7D', hcLight: '#292929' }, nls.localize('textPreformatForeground', \"Foreground color for preformatted text segments.\")); export const textPreformatBackground = registerColor('textPreformat.background', { light: '#0000001A', dark: '#FFFFFF1A', hcDark: '#FFFFFF', hcLight: '#09345f' }, nls.localize('textPreformatBackground', \"Background color for preformatted text segments.\")); export const textBlockQuoteBackground = registerColor('textBlockQuote.background', { light: '#f2f2f2', dark: '#222222', hcDark: null, hcLight: '#F2F2F2' }, nls.localize('textBlockQuoteBackground', \"Background color for block quotes in text.\")); export const textBlockQuoteBorder = registerColor('textBlockQuote.border', { light: '#007acc80', dark: '#007acc80', hcDark: Color.white, hcLight: '#292929' }, nls.localize('textBlockQuoteBorder', \"Border color for block quotes in text.\"));"} {"_id":"doc-en-vscode-1aad4bb012cb21ad7ef1a7fb878bff66f266e99672cdf2ab25d52062651cc615","title":"","text":"font-family: var(--monaco-monospace-font); font-size: 12px; color: var(--vscode-textPreformat-foreground); background-color: var(--vscode-textPreformat-background); padding: 1px 3px; border-radius: 4px; }"} {"_id":"doc-en-vscode-fd234fc45d698990e317866068172e69be9f1a90489d53ef7ad160ac8e76c88b","title":"","text":"font-family: var(--monaco-monospace-font); font-size: 11px; color: var(--vscode-textPreformat-foreground); background-color: var(--vscode-textPreformat-background); padding: 1px 3px; border-radius: 4px; }"} {"_id":"doc-en-vscode-522b4ebe76460c2b44b5962ca1a0f8e4664579beb51ac9d0f0640d31cde50a87","title":"","text":"font-family: var(--monaco-monospace-font); font-size: 12px; color: var(--vscode-textPreformat-foreground); background-color: var(--vscode-textPreformat-background); padding: 2px 5px; border-radius: 4px; }"} {"_id":"doc-en-vscode-778962ea03ef8035e7418581bfda4f64aa378756ba9c8f89bf1ef3238116377d","title":"","text":"IFS=':' read -ra ADDR <<< \"$VSCODE_ENV_REPLACE\" for ITEM in \"${ADDR[@]}\"; do VARNAME=\"$(echo $ITEM | cut -d \"=\" -f 1)\" VALUE=\"$(echo -e \"$ITEM\" | cut -d \"=\" -f 2)\" VALUE=\"$(echo -e \"$ITEM\" | cut -d \"=\" -f 2-)\" export $VARNAME=\"$VALUE\" done builtin unset VSCODE_ENV_REPLACE"} {"_id":"doc-en-vscode-a0811ead8445378b665f7bfd87b3ef0eb0f830cbd530568a2c37c4a7afe98af4","title":"","text":"IFS=':' read -ra ADDR <<< \"$VSCODE_ENV_PREPEND\" for ITEM in \"${ADDR[@]}\"; do VARNAME=\"$(echo $ITEM | cut -d \"=\" -f 1)\" VALUE=\"$(echo -e \"$ITEM\" | cut -d \"=\" -f 2)\" VALUE=\"$(echo -e \"$ITEM\" | cut -d \"=\" -f 2-)\" export $VARNAME=\"$VALUE${!VARNAME}\" done builtin unset VSCODE_ENV_PREPEND"} {"_id":"doc-en-vscode-d99012fc8611e1f7f8887b146a8d127dda88598756a5fa504b5589c59f83cdac","title":"","text":"IFS=':' read -ra ADDR <<< \"$VSCODE_ENV_APPEND\" for ITEM in \"${ADDR[@]}\"; do VARNAME=\"$(echo $ITEM | cut -d \"=\" -f 1)\" VALUE=\"$(echo -e \"$ITEM\" | cut -d \"=\" -f 2)\" VALUE=\"$(echo -e \"$ITEM\" | cut -d \"=\" -f 2-)\" export $VARNAME=\"${!VARNAME}$VALUE\" done builtin unset VSCODE_ENV_APPEND"} {"_id":"doc-en-vscode-e5b4c5556a3cb8c40c9846807f0d891689bcacf377a1ac6ff6b47bad486db10e","title":"","text":"if ($env:VSCODE_ENV_REPLACE) { $Split = $env:VSCODE_ENV_REPLACE.Split(\":\") foreach ($Item in $Split) { $Inner = $Item.Split('=') $Inner = $Item.Split('=', 2) [Environment]::SetEnvironmentVariable($Inner[0], $Inner[1].Replace('x3a', ':')) } $env:VSCODE_ENV_REPLACE = $null"} {"_id":"doc-en-vscode-86f6ecbb25592cb5cd20d57aaf036b59c37b9389418b80fb9e6e57da8bec4c84","title":"","text":"if ($env:VSCODE_ENV_PREPEND) { $Split = $env:VSCODE_ENV_PREPEND.Split(\":\") foreach ($Item in $Split) { $Inner = $Item.Split('=') $Inner = $Item.Split('=', 2) [Environment]::SetEnvironmentVariable($Inner[0], $Inner[1].Replace('x3a', ':') + [Environment]::GetEnvironmentVariable($Inner[0])) } $env:VSCODE_ENV_PREPEND = $null"} {"_id":"doc-en-vscode-b7c8703fc1f0c2e3fd5aa76a5d858786d695ef17599b5379a1bf3e9f377a2ba3","title":"","text":"if ($env:VSCODE_ENV_APPEND) { $Split = $env:VSCODE_ENV_APPEND.Split(\":\") foreach ($Item in $Split) { $Inner = $Item.Split('=') $Inner = $Item.Split('=', 2) [Environment]::SetEnvironmentVariable($Inner[0], [Environment]::GetEnvironmentVariable($Inner[0]) + $Inner[1].Replace('x3a', ':')) } $env:VSCODE_ENV_APPEND = $null"} {"_id":"doc-en-vscode-1d181f0b15cb604ebdea816fb1680a8bb0fa415653172ea509a2ecd75973729e","title":"","text":"private _removeAllDecorations(): void { const currentEditors = this.codeEditorService.listCodeEditors(); const deleteURI = []; // iterate over editors and store models in currentModels for (const editor of currentEditors) { if (!editor.hasModel()) {"} {"_id":"doc-en-vscode-50cd6587639e32ed424e34c82fcc2e52cca06628e588f52f97c0750b18201b78","title":"","text":"} editor.removeDecorations(currentDecorationIDs); WordHighlighter.storedDecorations.delete(editor.getModel().uri); deleteURI.push(editor.getModel().uri); const editorHighlighterContrib = WordHighlighterContribution.get(editor); if (!editorHighlighterContrib?.wordHighlighter) {"} {"_id":"doc-en-vscode-8be3814fc3f3ec1ddc547c5c2bf9e99d041b6f77f6d47b382bcfc064d3eb0c0f","title":"","text":"editorHighlighterContrib.wordHighlighter._hasWordHighlights.set(false); } } for (const uri of deleteURI) { WordHighlighter.storedDecorations.delete(uri); } } private _stopSingular(): void { // Remove any existing decorations + a possible query, and re - run to update decorations this._removeSingleDecorations(); if (this.editor.hasWidgetFocus()) { if (this.editor.hasTextFocus()) { if (this.editor.getModel()?.uri.scheme !== Schemas.vscodeNotebookCell && WordHighlighter.query?.modelInfo?.model.uri.scheme !== Schemas.vscodeNotebookCell) { // clear query if focused non-nb editor WordHighlighter.query = null; this._run();"} {"_id":"doc-en-vscode-a5bb914de40a19d3faf6e23e0dcb0f4c1569b2b3c07e4f98d6ad15c5aa70d7f1","title":"","text":"} } private _stopAll(): void { private _stopAll() { // Remove any existing decorations // TODO: @Yoyokrazy - this triggers as notebooks scroll, causing highlights to disappear momentarily. // TODO: @Yoyokrazy -- this triggers as notebooks scroll, causing highlights to disappear momentarily. // maybe a nb type check? this._removeAllDecorations(); // Cancel any renderDecorationsTimer"} {"_id":"doc-en-vscode-8c96b5894a06de30aa75f374cdab69b3e07db5953ec0fcdd6537a0c82fb4ef08","title":"","text":"// a) there is no stored query model, but there is a word. This signals the editor that drove the highlight is disposed (cell out of viewport, etc) // b) the queried model is not the current model. This signals that the editor that drove the highlight is still in the viewport, but we are highlighting a different cell // otherwise, we send null in place of the word, and the model and selection are used to compute the word // TODO: @Yoyokrazy -- investigate this logic for sendWord const sendWord = (!WordHighlighter.query.modelInfo && WordHighlighter.query.word) || (WordHighlighter.query.modelInfo?.model.uri !== this.model.uri) ? true : false;"} {"_id":"doc-en-vscode-3cce02a5ed35aa575748461c20e739e128282a5deba5ccdaf5ce340b3f7cc899","title":"","text":"const newDocumentHighlights = this.workerRequestValue.get(uri); if (newDocumentHighlights) { for (const highlight of newDocumentHighlights) { if (!highlight.range) { continue; } newDecorations.push({ range: highlight.range, options: getHighlightDecorationOptions(highlight.kind)"} {"_id":"doc-en-vscode-29b3a19d05edbc60448c9ea90597c5d17ac48a3b009327a73d1bffbe275b2ee2","title":"","text":"import * as arrays from 'vs/base/common/arrays'; import { RunOnceScheduler } from 'vs/base/common/async'; import * as errors from 'vs/base/common/errors'; import { DisposableStore, dispose, IDisposable } from 'vs/base/common/lifecycle'; import { DisposableStore, dispose, IDisposable, MutableDisposable } from 'vs/base/common/lifecycle'; import { URI } from 'vs/base/common/uri'; import 'vs/css!./media/debugToolBar'; import { ServicesAccessor } from 'vs/editor/browser/editorExtensions';"} {"_id":"doc-en-vscode-ea00519d0b65c1bc4e035f19ae443dc8a08942417a3485d1d46622a58be8b493","title":"","text":"import { CONTEXT_DEBUG_STATE, CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_FOCUSED_SESSION_IS_NO_DEBUG, CONTEXT_IN_DEBUG_MODE, CONTEXT_MULTI_SESSION_DEBUG, CONTEXT_STEP_BACK_SUPPORTED, CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED, IDebugConfiguration, IDebugService, State, VIEWLET_ID } from 'vs/workbench/contrib/debug/common/debug'; import { EditorTabsMode, IWorkbenchLayoutService, LayoutSettings, Parts } from 'vs/workbench/services/layout/browser/layoutService'; import { Codicon } from 'vs/base/common/codicons'; import { mainWindow } from 'vs/base/browser/window'; import { CodeWindow, mainWindow } from 'vs/base/browser/window'; import { clamp } from 'vs/base/common/numbers'; const DEBUG_TOOLBAR_POSITION_KEY = 'debug.actionswidgetposition'; const DEBUG_TOOLBAR_Y_KEY = 'debug.actionswidgety';"} {"_id":"doc-en-vscode-17b290688cd4f987be960c401740bcf5e7a3664e99c4fd68cdb405e5f970d712","title":"","text":"private isBuilt = false; private readonly stopActionViewItemDisposables = this._register(new DisposableStore()); /** coordinate of the debug toolbar per aux window */ private readonly auxWindowCoordinates = new WeakMap(); constructor( @INotificationService private readonly notificationService: INotificationService,"} {"_id":"doc-en-vscode-bb8721406ae6dc93e98693bf5fb89f1fca705dc1b3855916378e3388ec56dc6e","title":"","text":"// log in telemetry this.telemetryService.publicLog2('workbenchActionExecuted', { id: e.action.id, from: 'debugActionsWidget' }); })); this._register(dom.addDisposableListener(mainWindow, dom.EventType.RESIZE, () => this.setCoordinates())); this._register(dom.addDisposableGenericMouseUpListener(this.dragArea, (event: MouseEvent) => { const mouseClickEvent = new StandardMouseEvent(dom.getWindow(this.dragArea), event); const activeWindow = dom.getWindow(this.layoutService.activeContainer); if (mouseClickEvent.detail === 2) { // double click on debug bar centers it again #8250 const widgetWidth = this.$el.clientWidth; this.setCoordinates(0.5 * mainWindow.innerWidth - 0.5 * widgetWidth, 0); this.setCoordinates(0.5 * activeWindow.innerWidth - 0.5 * widgetWidth, 0); this.storePosition(); } })); this._register(dom.addDisposableGenericMouseDownListener(this.dragArea, (event: MouseEvent) => { this.dragArea.classList.add('dragged'); const activeWindow = dom.getWindow(this.layoutService.activeContainer); const mouseMoveListener = dom.addDisposableGenericMouseMoveListener(mainWindow, (e: MouseEvent) => { const mouseMoveEvent = new StandardMouseEvent(mainWindow, e); const mouseMoveListener = dom.addDisposableGenericMouseMoveListener(activeWindow, (e: MouseEvent) => { const mouseMoveEvent = new StandardMouseEvent(activeWindow, e); // Prevent default to stop editor selecting text #8524 mouseMoveEvent.preventDefault(); // Reduce x by width of drag handle to reduce jarring #16604 this.setCoordinates(mouseMoveEvent.posx - 14, mouseMoveEvent.posy - 14); }); const mouseUpListener = dom.addDisposableGenericMouseUpListener(mainWindow, (e: MouseEvent) => { const mouseUpListener = dom.addDisposableGenericMouseUpListener(activeWindow, (e: MouseEvent) => { this.storePosition(); this.dragArea.classList.remove('dragged');"} {"_id":"doc-en-vscode-6c900337e6c9bbaf8b795f24180265112bf8e4d35ccd4514501a8291c470f293","title":"","text":"this._register(this.layoutService.onDidChangePartVisibility(() => this.setYCoordinate())); this._register(browser.PixelRatio.onDidChange(() => this.setYCoordinate())); const resizeListener = this._register(new MutableDisposable()); this._register(this.layoutService.onDidChangeActiveContainer(() => { this._yRange = undefined; // note: we intentionally don't read the activeContainer before the // `then` clause to avoid any races due to quickly switching windows. this.layoutService.whenActiveContainerStylesLoaded.then(() => { if (this.isBuilt) { this.layoutService.activeContainer.appendChild(this.$el); this.setCoordinates(); } resizeListener.value = this._register(dom.addDisposableListener( dom.getWindow(this.layoutService.activeContainer), dom.EventType.RESIZE, () => this.setYCoordinate())); }); })); } private storePosition(): void { const left = dom.getComputedStyle(this.$el).left; if (left) { const position = parseFloat(left) / mainWindow.innerWidth; this.storageService.store(DEBUG_TOOLBAR_POSITION_KEY, position, StorageScope.PROFILE, StorageTarget.MACHINE); } if (this.yCoordinate) { const activeWindow = dom.getWindow(this.layoutService.activeContainer); const isMainWindow = this.layoutService.activeContainer === this.layoutService.mainContainer; const left = this.$el.getBoundingClientRect().left / activeWindow.innerWidth; if (isMainWindow) { this.storageService.store(DEBUG_TOOLBAR_POSITION_KEY, left, StorageScope.PROFILE, StorageTarget.MACHINE); this.storageService.store(DEBUG_TOOLBAR_Y_KEY, this.yCoordinate, StorageScope.PROFILE, StorageTarget.MACHINE); } else { this.storageService.remove(DEBUG_TOOLBAR_Y_KEY, StorageScope.PROFILE); this.auxWindowCoordinates.set(activeWindow, { x: left, y: this.yCoordinate }); } }"} {"_id":"doc-en-vscode-faf4ee6ef356d1cfbbf231201702efc4078de22191256237ff95d8eaa90220d6","title":"","text":"if (!this.isVisible) { return; } const widgetWidth = this.$el.clientWidth; const currentWindow = dom.getWindow(this.layoutService.activeContainer); const isMainWindow = currentWindow === mainWindow; if (x === undefined) { const positionPercentage = this.storageService.get(DEBUG_TOOLBAR_POSITION_KEY, StorageScope.PROFILE); x = positionPercentage !== undefined ? parseFloat(positionPercentage) * mainWindow.innerWidth : (0.5 * mainWindow.innerWidth - 0.5 * widgetWidth); const positionPercentage = isMainWindow ? Number(this.storageService.get(DEBUG_TOOLBAR_POSITION_KEY, StorageScope.PROFILE)) : this.auxWindowCoordinates.get(currentWindow)?.x; x = positionPercentage !== undefined ? positionPercentage * currentWindow.innerWidth : (0.5 * currentWindow.innerWidth - 0.5 * widgetWidth); } x = Math.max(0, Math.min(x, mainWindow.innerWidth - widgetWidth)); // do not allow the widget to overflow on the right x = clamp(x, 0, currentWindow.innerWidth - widgetWidth); // do not allow the widget to overflow on the right this.$el.style.left = `${x}px`; if (y === undefined) { y = this.storageService.getNumber(DEBUG_TOOLBAR_Y_KEY, StorageScope.PROFILE, 0); y = isMainWindow ? this.storageService.getNumber(DEBUG_TOOLBAR_Y_KEY, StorageScope.PROFILE) : this.auxWindowCoordinates.get(currentWindow)?.y; } this.setYCoordinate(y); this.setYCoordinate(y || 0); } private setYCoordinate(y = this.yCoordinate): void {"} {"_id":"doc-en-vscode-68d0761cdab0bdae89e42a058379e096bd1264346f38f0e7a842f84f32f08d27","title":"","text":"private _yRange: [number, number] | undefined; private get yRange(): [number, number] { if (!this._yRange) { const isTitleBarVisible = this.layoutService.isVisible(Parts.TITLEBAR_PART, mainWindow); const isTitleBarVisible = this.layoutService.isVisible(Parts.TITLEBAR_PART, dom.getWindow(this.layoutService.activeContainer)); const yMin = isTitleBarVisible ? 0 : this.layoutService.mainContainerOffset.top; let yMax = 0;"} {"_id":"doc-en-vscode-ab9873e56ac6d041c089402aaaa69144671db03eb83dcba09be8957357f0670a","title":"","text":"} if (!this.isBuilt) { this.isBuilt = true; this.layoutService.mainContainer.appendChild(this.$el); this.layoutService.activeContainer.appendChild(this.$el); } this.isVisible = true;"} {"_id":"doc-en-vscode-f5f73faa9e2f2e932dfed8aacdf563026b3ae642e0bb9fe02264fa724ae59177","title":"","text":"await TerminalAccessibleViewContribution.get(instance)?.navigateToCommand(NavigationType.Previous); } }); registerTerminalAction({ id: TerminalCommandId.ScrollToBottom, title: { value: localize('workbench.action.terminal.scrollToBottom', \"Scroll to Bottom\"), original: 'Scroll to Bottom' }, precondition: ContextKeyExpr.and(ContextKeyExpr.or(TerminalContextKeys.processSupported, TerminalContextKeys.terminalHasBeenCreated), ContextKeyExpr.and(accessibleViewIsShown, ContextKeyExpr.equals(accessibleViewCurrentProviderId.key, AccessibleViewProviderId.Terminal))), keybinding: { primary: KeyMod.CtrlCmd | KeyCode.End, linux: { primary: KeyMod.Shift | KeyCode.End }, when: accessibleViewCurrentProviderId.isEqualTo(AccessibleViewProviderId.Terminal), weight: KeybindingWeight.WorkbenchContrib }, run: (c, accessor) => { const accessibleViewService = accessor.get(IAccessibleViewService); const lastPosition = accessibleViewService.getLastPosition(); if (!lastPosition) { return; } accessibleViewService.setPosition(lastPosition, true); } }); registerTerminalAction({ id: TerminalCommandId.ScrollToTop, title: { value: localize('workbench.action.terminal.scrollToTop', \"Scroll to Top\"), original: 'Scroll to Top' }, precondition: ContextKeyExpr.and(ContextKeyExpr.or(TerminalContextKeys.processSupported, TerminalContextKeys.terminalHasBeenCreated), ContextKeyExpr.and(accessibleViewIsShown, ContextKeyExpr.equals(accessibleViewCurrentProviderId.key, AccessibleViewProviderId.Terminal))), keybinding: { primary: KeyMod.CtrlCmd | KeyCode.Home, linux: { primary: KeyMod.Shift | KeyCode.Home }, when: accessibleViewCurrentProviderId.isEqualTo(AccessibleViewProviderId.Terminal), weight: KeybindingWeight.WorkbenchContrib }, run: (c, accessor) => { const accessibleViewService = accessor.get(IAccessibleViewService); accessibleViewService.setPosition({ lineNumber: 1, column: 1 } as Position, true); } }); "} {"_id":"doc-en-vscode-3e826d22aa21a69cf222eb51cf6441f7668cc968eb25bb756e96e4e851a54bda","title":"","text":"return; } this._inlineChatKeybinding = keybinding; const hoverMessage = new MarkdownString(keybinding ? localize('runWithKeybinding', 'Start Inline Chat [{0}]', keybinding) : LOCALIZED_START_INLINE_CHAT_STRING); const hoverMessage = new MarkdownString(keybinding ? localize('runWithKeybinding', 'Start Inline Chat ({0})', keybinding) : LOCALIZED_START_INLINE_CHAT_STRING); this._gutterDecorationTransparent.glyphMarginHoverMessage = hoverMessage; this._gutterDecorationOpaque.glyphMarginHoverMessage = hoverMessage; }"} {"_id":"doc-en-vscode-10061edea6a9e307c098cd8ca628d8c5d306bd6a599801559c67e5f217070337","title":"","text":"/** * Sets or triggers a quick pick to change the color of the associated terminal tab icon. */ changeColor(color?: string): Promise; changeColor(color?: string, skipQuickPick?: boolean): Promise; /** * Triggers a quick pick that displays recent commands or cwds. Selecting one will"} {"_id":"doc-en-vscode-7820c05014e6f56a13b48e017bd1723197c9bfb1e281e470960498f3414db115","title":"","text":"precondition: ContextKeyExpr.and(ContextKeyExpr.or(TerminalContextKeys.processSupported, TerminalContextKeys.terminalHasBeenCreated), TerminalContextKeys.tabsSingularSelection), run: async (c, accessor) => { let color: string | undefined; let i = 0; for (const terminal of getSelectedInstances(accessor) ?? []) { color = await terminal.changeColor(color); const skipQuickPick = i !== 0; // Always show the quickpick on the first iteration color = await terminal.changeColor(color, skipQuickPick); i++; } } });"} {"_id":"doc-en-vscode-a95104d3a94196b26c1535669c54c7e870be01f5212c894a672cf506d3394e1f","title":"","text":"when: TerminalContextKeys.tabsFocus }, run: async (c, accessor) => { for (const terminal of getSelectedInstances(accessor) ?? []) { c.service.safeDisposeTerminal(terminal); const disposePromises: Promise[] = []; for (const terminal of getSelectedInstances(accessor, true) ?? []) { disposePromises.push(c.service.safeDisposeTerminal(terminal)); } await Promise.all(disposePromises); c.groupService.focusTabs(); } });"} {"_id":"doc-en-vscode-02248ceab523b34d33dce3f14e2869307a701356e0e8320d89810a8e5647c2f9","title":"","text":"const terminalGroupService = accessor.get(ITerminalGroupService); const result: ITerminalInstance[] = []; // Get inline tab instance if (terminalGroupService.lastAccessedMenu === 'inline-tab') { const list = listService.lastFocusedList; // Get selected tab list instance(s) const selections = list?.getSelection(); // Get inline tab instance if there are not tab list selections #196578 if (terminalGroupService.lastAccessedMenu === 'inline-tab' && !selections?.length) { const instance = terminalGroupService.activeInstance; return instance ? [terminalGroupService.activeInstance] : undefined; } // Get tab list instance if (!listService.lastFocusedList?.getSelection()) { if (!list || !selections) { return undefined; } const selections = listService.lastFocusedList.getSelection(); const focused = listService.lastFocusedList.getFocus(); const focused = list.getFocus(); if (focused.length === 1 && !selections.includes(focused[0])) { // focused length is always a max of 1"} {"_id":"doc-en-vscode-bfcdad6f205e83d787d5dfb71227beca96261d78f4cc0f2093143973fb33a2a6","title":"","text":"return; } async changeColor(color?: string): Promise { async changeColor(color?: string, skipQuickPick?: boolean): Promise { if (color) { this.shellLaunchConfig.color = color; this._onIconChanged.fire({ instance: this, userInitiated: true }); return color; } else if (skipQuickPick) { // Reset this tab's color this.shellLaunchConfig.color = ''; this._onIconChanged.fire({ instance: this, userInitiated: true }); return; } const icon = this._getIcon(); if (!icon) {"} {"_id":"doc-en-vscode-f1a254d34e4a271c5e61d2a84bb556c5fa00f0fb7bad503b01141a418e7d1ae8","title":"","text":"title: { value: LOCALIZED_START_INLINE_CHAT_STRING, original: 'Start Inline Chat' }, category: AbstractInlineChatAction.category, f1: true, precondition: CTX_INLINE_CHAT_HAS_PROVIDER, precondition: ContextKeyExpr.and(CTX_INLINE_CHAT_HAS_PROVIDER, EditorContextKeys.writable), keybinding: { when: EditorContextKeys.focus, weight: KeybindingWeight.WorkbenchContrib,"} {"_id":"doc-en-vscode-149780402e877e3fd62a0ab49f8f7cf79bd4533dc2e165ee20e05613dd0dbc0d","title":"","text":"import * as perf from 'vs/base/common/performance'; import { WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification } from 'vs/base/common/actions'; import { memoize } from 'vs/base/common/decorators'; import { IFilesConfiguration, ExplorerFolderContext, FilesExplorerFocusedContext, ExplorerFocusedContext, ExplorerRootContext, ExplorerResourceReadonlyContext, ExplorerResourceCut, ExplorerResourceMoveableToTrash, ExplorerCompressedFocusContext, ExplorerCompressedFirstFocusContext, ExplorerCompressedLastFocusContext, ExplorerResourceAvailableEditorIdsContext, VIEW_ID, VIEWLET_ID, ExplorerResourceNotReadonlyContext, ViewHasSomeCollapsibleRootItemContext, FoldersViewVisibleContext } from 'vs/workbench/contrib/files/common/files'; import { IFilesConfiguration, ExplorerFolderContext, FilesExplorerFocusedContext, ExplorerFocusedContext, ExplorerRootContext, ExplorerResourceReadonlyContext, ExplorerResourceCut, ExplorerResourceMoveableToTrash, ExplorerCompressedFocusContext, ExplorerCompressedFirstFocusContext, ExplorerCompressedLastFocusContext, ExplorerResourceAvailableEditorIdsContext, VIEW_ID, ExplorerResourceNotReadonlyContext, ViewHasSomeCollapsibleRootItemContext, FoldersViewVisibleContext } from 'vs/workbench/contrib/files/common/files'; import { FileCopiedContext, NEW_FILE_COMMAND_ID, NEW_FOLDER_COMMAND_ID } from 'vs/workbench/contrib/files/browser/fileActions'; import * as DOM from 'vs/base/browser/dom'; import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';"} {"_id":"doc-en-vscode-9e499feac81aa6951a57120952fa7857381dbd9bc93df7b452b2c5cb3c55fcdf","title":"","text":"import { IDisposable } from 'vs/base/common/lifecycle'; import { Event } from 'vs/base/common/event'; import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; import { IViewDescriptorService, IViewsService, ViewContainerLocation } from 'vs/workbench/common/views'; import { IViewDescriptorService, IViewsService } from 'vs/workbench/common/views'; import { IOpenerService } from 'vs/platform/opener/common/opener'; import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity'; import { EditorResourceAccessor, SideBySideEditor } from 'vs/workbench/common/editor';"} {"_id":"doc-en-vscode-8ee7536daa0b156b8af3534ba1255867efa37ecccfba7c329bbc1e08fdaaf576","title":"","text":"import { Codicon } from 'vs/base/common/codicons'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IEditorResolverService } from 'vs/workbench/services/editor/common/editorResolverService'; import { IPaneCompositePartService } from 'vs/workbench/services/panecomposite/browser/panecomposite'; import { EditorOpenSource } from 'vs/platform/editor/common/editor'; import { ResourceMap } from 'vs/base/common/map'; import { isInputElement } from 'vs/base/browser/ui/list/listWidget';"} {"_id":"doc-en-vscode-3c32e60e922a7ed8b1af98bda627f2e62eda364fbbee0e73e7b3768c273b7186","title":"","text":"} async run(accessor: ServicesAccessor): Promise { const paneCompositeService = accessor.get(IPaneCompositePartService); const viewsService = accessor.get(IViewsService); const explorerService = accessor.get(IExplorerService); await paneCompositeService.openPaneComposite(VIEWLET_ID, ViewContainerLocation.Sidebar); await viewsService.openView(VIEW_ID); await explorerService.refresh(); } });"} {"_id":"doc-en-vscode-c90a22ca17040a02c8068aa9b6789f62116f4329cf05f69b92cb5687cd7af6b3","title":"","text":"\"@vscode/l10n-dev\": \"0.0.30\", \"@vscode/telemetry-extractor\": \"^1.10.2\", \"@vscode/test-cli\": \"^0.0.3\", \"@vscode/test-electron\": \"^2.3.5\", \"@vscode/test-electron\": \"^2.3.8\", \"@vscode/test-web\": \"^0.0.42\", \"@vscode/v8-heap-parser\": \"^0.1.0\", \"@vscode/vscode-perf\": \"^0.0.14\","} {"_id":"doc-en-vscode-c95023614d341d3331e54a131204ead5853a30ddc4d3b80956661e7694fd2a00","title":"","text":"supports-color \"^9.4.0\" yargs \"^17.7.2\" \"@vscode/test-electron@^2.3.5\": version \"2.3.5\" resolved \"https://registry.yarnpkg.com/@vscode/test-electron/-/test-electron-2.3.5.tgz#c472c5bdce1329aeb4762b8aa7a2cbe7aa783aac\" integrity sha512-lAW7nQ0HuPqJnGJrtCzEKZCICtRizeP6qNanyCrjmdCOAAWjX3ixiG8RVPwqsYPQBWLPgYuE12qQlwXsOR/2fQ== \"@vscode/test-electron@^2.3.8\": version \"2.3.8\" resolved \"https://registry.yarnpkg.com/@vscode/test-electron/-/test-electron-2.3.8.tgz#06a7c50b38cfac0ede833905e088d55c61cd12d3\" integrity sha512-b4aZZsBKtMGdDljAsOPObnAi7+VWIaYl3ylCz1jTs+oV6BZ4TNHcVNC3xUn0azPeszBmwSBDQYfFESIaUQnrOg== dependencies: http-proxy-agent \"^4.0.1\" https-proxy-agent \"^5.0.0\""} {"_id":"doc-en-vscode-b3396ad5cac3d6648fc03473bd4330fea3b2ed51d7f81e74378a93bce2f2cf24","title":"","text":"} else if (name === 'nu') { // nushell requires ^ before quoted path to treat it as a command command = `^'${process.execPath}' ${extraArgs} -p '\"${mark}\" + JSON.stringify(process.env) + \"${mark}\"'`; shellArgs = ['-i', '-l', '-c']; } else if (name === 'xonsh') { // #200374: native implementation is shorter command = `import os, json; print(\"${mark}\", json.dumps(dict(os.environ)), \"${mark}\")`; shellArgs = ['-i', '-l', '-c']; } else { command = `'${process.execPath}' ${extraArgs} -p '\"${mark}\" + JSON.stringify(process.env) + \"${mark}\"'`;"} {"_id":"doc-en-vscode-35a24ad47d1b8725461bb1f6b7160c624cc756adf688b53dd1174f758873259f","title":"","text":"} let { top, left } = placement; if (!alignAtTop) { if (!alignAtTop && height > anchorBox.height) { top = bottom - height; } const editorDomNode = this._editor.getDomNode();"} {"_id":"doc-en-vscode-c7005c8ddf54ade51a1f1ed5e473c1d4f4269c75dc04a5fed6bdde614ee8451d","title":"","text":"export interface IButtonOptions extends Partial { readonly title?: boolean | string; readonly ariaLabel?: boolean | string; readonly supportIcons?: boolean; readonly supportShortLabel?: boolean; readonly secondary?: boolean;"} {"_id":"doc-en-vscode-08bc1e9ecb1f80fa92731ef6455211090ffce37b643a519d82c8370b7f8712e9","title":"","text":"this._element.classList.add('monaco-text-button-with-short-label'); } if (typeof options.ariaLabel === 'string') { this._element.setAttribute('aria-label', options.ariaLabel); } container.appendChild(this._element); this._register(Gesture.addTarget(this._element));"} {"_id":"doc-en-vscode-ca2b8aecfc19a9dfc8645b59d79cc3d70c119f9ed945ef206cdc530df05f18a7","title":"","text":"this._element.title = renderStringAsPlaintext(value); } if (typeof this.options.ariaLabel === 'string') { this._element.setAttribute('aria-label', this.options.ariaLabel); } else if (this.options.ariaLabel) { this._element.setAttribute('aria-label', this._element.title); } this._label = value; }"} {"_id":"doc-en-vscode-132cd82e8f659d9a0cc8880357ad436b5d12ddc286fcf4a1a44edb9eb08d3bad","title":"","text":"actionRunner: this._actionRunner, actions: rest, contextMenuProvider: this._contextMenuService, ariaLabel: action.label }); } else { action = actionOrSubmenu; btn = this.addButton({ secondary: conifgProvider(action)?.isSecondary ?? secondary, ariaLabel: action.label }); }"} {"_id":"doc-en-vscode-e52a8711b793499cb0a222aa06c38787df12a540f4f35552cfe43aa23a470362","title":"","text":"readonly position: number; } function stickyScrollNodeStateEquals(node1: StickyScrollNode, node2: StickyScrollNode) { return node1.position === node2.position && stickyScrollNodeEquals(node1, node2); } function stickyScrollNodeEquals(node1: StickyScrollNode, node2: StickyScrollNode) { return node1.position === node2.position && node1.node.element === node2.node.element && return node1.node.element === node2.node.element && node1.startIndex === node2.startIndex && node1.height === node2.height && node1.endIndex === node2.endIndex; } class StickyScrollState extends Disposable { class StickyScrollState { constructor( readonly stickyNodes: StickyScrollNode[] = [] ) { super(); } ) { } get count(): number { return this.stickyNodes.length; } equal(state: StickyScrollState): boolean { return equals(this.stickyNodes, state.stickyNodes, stickyScrollNodeEquals); return equals(this.stickyNodes, state.stickyNodes, stickyScrollNodeStateEquals); } lastNodePartiallyVisible(): boolean {"} {"_id":"doc-en-vscode-b1f737d1983f04b8fe131b8b8079622d1dc0de5255644d080c1288281a43f64b","title":"","text":"return secondLastStickyNode.position + secondLastStickyNode.height !== lastStickyNode.position; } addDisposable(disposable: IDisposable): void { this._register(disposable); animationStateChanged(previousState: StickyScrollState): boolean { if (!equals(this.stickyNodes, previousState.stickyNodes, stickyScrollNodeEquals)) { return false; } if (this.count === 0) { return false; } const lastStickyNode = this.stickyNodes[this.count - 1]; const previousLastStickyNode = previousState.stickyNodes[previousState.count - 1]; return lastStickyNode.position !== previousLastStickyNode.position; } }"} {"_id":"doc-en-vscode-723016418182ea30b71427a0fe8184202237c1603ed723040484e43e56202546","title":"","text":"private readonly _rootDomNode: HTMLElement; private _previousState: StickyScrollState | undefined; private _previousElements: HTMLElement[] = []; private _previousStateDisposables: DisposableStore = new DisposableStore(); private stickyScrollFocus: StickyScrollFocus; readonly onDidChangeHasFocus: Event;"} {"_id":"doc-en-vscode-b603d93745ab021e8f9a256724fb26cf6e737a01ba8b11a99a6a130b443d2e81","title":"","text":"private readonly accessibilityProvider: IListAccessibilityProvider | undefined, ) { this._rootDomNode = document.createElement('div'); this._rootDomNode.classList.add('monaco-tree-sticky-container'); this._rootDomNode = $('.monaco-tree-sticky-container'); container.appendChild(this._rootDomNode); const shadow = $('.monaco-tree-sticky-container-shadow'); this._rootDomNode.appendChild(shadow); this.stickyScrollFocus = new StickyScrollFocus(this._rootDomNode, view); this.onDidChangeHasFocus = this.stickyScrollFocus.onDidChangeHasFocus; this.onContextMenu = this.stickyScrollFocus.onContextMenu;"} {"_id":"doc-en-vscode-710c4d522fe74e6335aebf30130dddee4d6b7c13f69949d2ea46f75e4562a000","title":"","text":"this.setVisible(isVisible); } // Remove previous state this._previousState?.dispose(); this._previousState = state; if (!isVisible) { this._previousState = undefined; this._previousElements = []; this._previousStateDisposables.clear(); return; } const elements = Array(state.count); for (let stickyIndex = state.count - 1; stickyIndex >= 0; stickyIndex--) { const stickyNode = state.stickyNodes[stickyIndex]; const { element, disposable } = this.createElement(stickyNode, stickyIndex, state.count); elements[stickyIndex] = element; const lastStickyNode = state.stickyNodes[state.count - 1]; this._rootDomNode.appendChild(element); state.addDisposable(disposable); // If the new state is only a change in the last node's position, update the position of the last element if (this._previousState && state.animationStateChanged(this._previousState)) { this._previousElements[this._previousState.count - 1].style.top = `${lastStickyNode.position}px`; } // create new dom elements else { this._previousStateDisposables.clear(); this.stickyScrollFocus.updateElements(elements, state); const elements = Array(state.count); for (let stickyIndex = state.count - 1; stickyIndex >= 0; stickyIndex--) { const stickyNode = state.stickyNodes[stickyIndex]; // Add shadow element to the end of the widget const shadow = $('.monaco-tree-sticky-container-shadow'); this._rootDomNode.appendChild(shadow); state.addDisposable(toDisposable(() => shadow.remove())); const { element, disposable } = this.createElement(stickyNode, stickyIndex, state.count); elements[stickyIndex] = element; this._rootDomNode.appendChild(element); this._previousStateDisposables.add(disposable); } this.stickyScrollFocus.updateElements(elements, state); this._previousState = state; this._previousElements = elements; } // Set the height of the widget to the bottom of the last sticky node const lastStickyNode = state.stickyNodes[state.count - 1]; this._rootDomNode.style.height = `${lastStickyNode.position + lastStickyNode.height}px`; }"} {"_id":"doc-en-vscode-fe6701cfdcb115175e0caf2182af39a7d6789bb82dcc50f542dfc16362393670","title":"","text":"dispose(): void { this.stickyScrollFocus.dispose(); this._previousState?.dispose(); this._previousStateDisposables.dispose(); this._rootDomNode.remove(); } }"} {"_id":"doc-en-vscode-7012d4b583e7aa78a68e061d005407f7108c475695f31b3a1be90b7d03558179","title":"","text":"command: 'git.commit', title: l10n.t('{0} Continue', '$(check)'), tooltip: this.state.isCommitInProgress ? l10n.t('Continuing Rebase...') : l10n.t('Continue Rebase'), arguments: [this.repository.sourceControl, ''] arguments: [this.repository.sourceControl, null] }; }"} {"_id":"doc-en-vscode-6906eea19b9dd02ae9a920911301df1777082f777c20af5bac46502ea188d5f6","title":"","text":"command: 'git.commit', title: l10n.t('{0} Commit', '$(check)'), tooltip: this.state.isCommitInProgress ? l10n.t('Committing Changes...') : l10n.t('Commit Changes'), arguments: [this.repository.sourceControl, ''] arguments: [this.repository.sourceControl, null] }; }"} {"_id":"doc-en-vscode-87084080bf2fa44927b0c325e8b1965a6313b71f4799c34eeb981fd893fff3f3","title":"","text":"const childNodes: INotebookVariableElement[] = []; if (parent.indexedChildrenCount > variablePageSize) { // TODO: improve handling of large number of children const indexedChildCountLimit = 100000; const limit = Math.min(parent.indexedChildrenCount, indexedChildCountLimit); for (let start = 0; start < limit; start += variablePageSize) { let end = start + variablePageSize; if (end > limit) { end = limit; const nestedPageSize = Math.floor(Math.max(parent.indexedChildrenCount / variablePageSize, 100)); const indexedChildCountLimit = 1_000_000; let start = parent.indexStart ?? 0; const last = start + Math.min(parent.indexedChildrenCount, indexedChildCountLimit); for (; start < last; start += nestedPageSize) { let end = start + nestedPageSize; if (end > last) { end = last; } childNodes.push({"} {"_id":"doc-en-vscode-2c136ac6a5de41f012be483be5e9fc9a210d6ac270327b1b0bd506147a769976","title":"","text":"childNodes.push({ kind: 'variable', notebook: parent.notebook, id: parent.id + `${limit + 1}`, id: parent.id + `${last + 1}`, extHostId: parent.extHostId, name: localize('notebook.indexedChildrenLimitReached', \"Display limit reached\"), value: '',"} {"_id":"doc-en-vscode-38205127536640d954c4e1c0cae7b3881a53e16cb265a5a12c385810450ec758","title":"","text":"assert.equal(variables[0].extHostId, parent.extHostId, 'ExtHostId should match the parent since we will use it to get the real children'); }); test('Get children for very large list', async () => { const parent = { kind: 'variable', notebook: notebookModel, id: '1', extHostId: 1, name: 'list', value: '[...]', hasNamedChildren: false, indexedChildrenCount: 1_000_000 } as INotebookVariableElement; results = []; const groups = await dataSource.getChildren(parent); const children = await dataSource.getChildren(groups[99]); assert(children.length === 100, 'We should have a full page of child groups'); assert(!provideVariablesCalled, 'provideVariables should not be called'); assert.equal(children[0].extHostId, parent.extHostId, 'ExtHostId should match the parent since we will use it to get the real children'); }); test('Cancel while enumerating through children', async () => { const parent = { kind: 'variable', notebook: notebookModel, id: '1', extHostId: 1, name: 'list', value: '[...]', hasNamedChildren: false, indexedChildrenCount: 10 } as INotebookVariableElement; results = ["} {"_id":"doc-en-vscode-ecdef38f9a0ff6f159e005c1926e3c5539038c275cdab48819829e10a372ef09","title":"","text":"public onDidChangeTaskSystemInfo: Event = this._onDidChangeTaskSystemInfo.event; private _onDidReconnectToTasks: Emitter = new Emitter(); public onDidReconnectToTasks: Event = this._onDidReconnectToTasks.event; private _onDidChangeTaskConfig: Emitter = new Emitter(); public onDidChangeTaskConfig: Event = this._onDidChangeTaskConfig.event; public get isReconnected(): boolean { return this._tasksReconnected; } constructor("} {"_id":"doc-en-vscode-840b4b55a145b39b153279b999de196eb8c2e8086ea7ca1c187aa4d826cf0887","title":"","text":"this._updateSetup(folderSetup); return this._updateWorkspaceTasks(TaskRunSource.FolderOpen); })); this._register(this._configurationService.onDidChangeConfiguration((e) => { this._register(this._configurationService.onDidChangeConfiguration(async (e) => { if (!e.affectsConfiguration('tasks') || (!this._taskSystem && !this._workspaceTasksPromise)) { return; }"} {"_id":"doc-en-vscode-e725ec4279bac23062c82eba9909d9d63bcfb7a96826b617290c313bb8176c8c","title":"","text":"} this._setTaskLRUCacheLimit(); return this._updateWorkspaceTasks(TaskRunSource.ConfigurationChange); await this._updateWorkspaceTasks(TaskRunSource.ConfigurationChange); this._onDidChangeTaskConfig.fire(); })); this._taskRunningState = TASK_RUNNING_STATE.bindTo(_contextKeyService); this._onDidStateChange = this._register(new Emitter());"} {"_id":"doc-en-vscode-d5c5ae474751de53b57a902ac1f1cd02e846a3026c65a50dfb06c40ed108cb2e","title":"","text":"this._logService.trace('RunAutomaticTasks: Awaiting task system info.'); await Event.toPromise(Event.once(this._taskService.onDidChangeTaskSystemInfo)); } const workspaceTasks = await this._taskService.getWorkspaceTasks(TaskRunSource.FolderOpen); let workspaceTasks = await this._taskService.getWorkspaceTasks(TaskRunSource.FolderOpen); this._logService.trace(`RunAutomaticTasks: Found ${workspaceTasks.size} automatic tasks`); await this._runWithPermission(this._taskService, this._configurationService, workspaceTasks); let autoTasks = this._findAutoTasks(this._taskService, workspaceTasks); this._logService.trace(`RunAutomaticTasks: taskNames=${JSON.stringify(autoTasks.taskNames)}`); // As seen in some cases with the Remote SSH extension, the tasks configuration is loaded after we have come // to this point. Let's give it some extra time. if (autoTasks.taskNames.length === 0) { const updatedWithinTimeout = await Promise.race([ new Promise((resolve) => { Event.toPromise(Event.once(this._taskService.onDidChangeTaskConfig)).then(() => resolve(true)); }), new Promise((resolve) => { const timer = setTimeout(() => { clearTimeout(timer); resolve(false); }, 10000); })]); if (!updatedWithinTimeout) { this._logService.trace(`RunAutomaticTasks: waited some extra time, but no update of tasks configuration`); return; } workspaceTasks = await this._taskService.getWorkspaceTasks(TaskRunSource.FolderOpen); autoTasks = this._findAutoTasks(this._taskService, workspaceTasks); this._logService.trace(`RunAutomaticTasks: updated taskNames=${JSON.stringify(autoTasks.taskNames)}`); } this._runWithPermission(this._taskService, this._configurationService, autoTasks.tasks, autoTasks.taskNames); } private _runTasks(taskService: ITaskService, tasks: Array>) {"} {"_id":"doc-en-vscode-fea96f78ae71645fe866fdb16863486047a120946f2f83685f7d2e620931f1c6","title":"","text":"return { tasks, taskNames, locations }; } private async _runWithPermission(taskService: ITaskService, configurationService: IConfigurationService, workspaceTaskResult: Map) { const { tasks, taskNames } = this._findAutoTasks(taskService, workspaceTaskResult); private async _runWithPermission(taskService: ITaskService, configurationService: IConfigurationService, tasks: (Task | Promise)[], taskNames: string[]) { if (taskNames.length === 0) { return; }"} {"_id":"doc-en-vscode-fcbcdf7333a47b61e819cbc2ba2bec259dbee5c0dff7a4469ac59541eb101721","title":"","text":"registerTaskSystem(scheme: string, taskSystemInfo: ITaskSystemInfo): void; onDidChangeTaskSystemInfo: Event; onDidChangeTaskConfig: Event; readonly hasTaskSystemInfo: boolean; registerSupportedExecutions(custom?: boolean, shell?: boolean, process?: boolean): void;"} {"_id":"doc-en-vscode-98d5eca6a232e48c9742ad5e03e000f90fc950734bdf54d78093d7418fb9ffc8","title":"","text":"} finalMatchedTargets.add(uri); }); }).catch(err => { // temporary fix for https://github.com/microsoft/vscode/issues/205044: don't show notebook results for remotehub repos. if (err.code === 'ENOENT') { console.warn(`Could not find notebook search results, ignoring notebook results.`); return { limitHit: false, messages: [], }; } else { throw err; } }); })) ));"} {"_id":"doc-en-vscode-12195cf00d15cf9a894ad225b33dde99f8eedbd88d4bbc4a390ce7029f6a8aa6","title":"","text":"return this.input.selectionEnd === this.input.value.length && this.input.selectionStart === this.input.selectionEnd; } public getSelection(): IRange | null { const selectionStart = this.input.selectionStart; if (selectionStart === null) { return null; } const selectionEnd = this.input.selectionEnd ?? selectionStart; return { start: selectionStart, end: selectionEnd, }; } public enable(): void { this.input.removeAttribute('disabled'); }"} {"_id":"doc-en-vscode-8250a7d75956d870e3c0169f0294bb218baad2a22770586cd20bcb430c8d423e","title":"","text":"} } // Store the existing selection if there was one. const visibleSelection = visibleQuickAccess?.picker?.valueSelection; // Create a picker for the provider to use with the initial value // and adjust the filtering to exclude the prefix from filtering const disposables = new DisposableStore();"} {"_id":"doc-en-vscode-9d87c0a731322e69acfdc34e122e4506e1ebd70a42bac4aecf473c298fcc0f7a","title":"","text":"// on the onDidHide event. picker.show(); // If the previous picker had a selection, we should set that in the new picker. if (visibleSelection) { picker.valueSelection = visibleSelection; } // Pick mode: return with promise if (pick) { return pickPromise?.p;"} {"_id":"doc-en-vscode-aa4f74b29222114376e1f82466aff12c9cd6f81eb79c9d98333a0c9fb182a98d","title":"","text":"return this.ui.keyMods; } get valueSelection() { const selection = this.ui.inputBox.getSelection(); if (!selection) { return undefined; } return [selection.start, selection.end]; } set valueSelection(valueSelection: Readonly<[number, number]> | undefined) { set valueSelection(valueSelection: Readonly<[number, number]>) { this._valueSelection = valueSelection; this.valueSelectionUpdated = true; this.update();"} {"_id":"doc-en-vscode-1cdb41db0bd54061acdc00be1768312579d5ec87e0808674a57ac176991f9d8c","title":"","text":"this.update(); } get valueSelection() { const selection = this.ui.inputBox.getSelection(); if (!selection) { return undefined; } return [selection.start, selection.end]; } set valueSelection(valueSelection: Readonly<[number, number]> | undefined) { set valueSelection(valueSelection: Readonly<[number, number]>) { this._valueSelection = valueSelection; this.valueSelectionUpdated = true; this.update();"} {"_id":"doc-en-vscode-74c532dc2ab8af06879dcdd902f5c1e62bbf260febc7f0ab893cb0c01a38fedf","title":"","text":"this.findInput.inputBox.select(range); } getSelection(): IRange | null { return this.findInput.inputBox.getSelection(); } isSelectionAtEnd(): boolean { return this.findInput.inputBox.isSelectionAtEnd(); }"} {"_id":"doc-en-vscode-548928fce2a1268394cae2542cdbb89a47d66ec28ae9c38ca0fba3ae2792ef57","title":"","text":"'terminal.ansiGreen': { index: 2, defaults: { light: '#00BC00', light: '#107C10', dark: '#0DBC79', hcDark: '#00cd00', hcLight: '#00bc00' hcLight: '#136C13' } }, 'terminal.ansiYellow': {"} {"_id":"doc-en-vscode-e3031ce818aada05f657ec1356e72b0f54e47f6d399337f048e965eb33c10870","title":"","text":"assert.deepStrictEqual(colors, [ '#000000', '#cd3131', '#00bc00', '#107c10', '#949800', '#0451a5', '#bc05bc',"} {"_id":"doc-en-vscode-26ccd6950b688ad600406295e590dab21a5402a357cd6ddb7a943dbcd54cf9a1","title":"","text":"import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { NOTEBOOK_VARIABLE_VIEW_ENABLED } from 'vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys'; export class NotebookVariables extends Disposable implements IWorkbenchContribution { private listeners: IDisposable[] = []; private configListener: IDisposable;"} {"_id":"doc-en-vscode-3fd71448fe1f2b71ebc109c53c82ce6714e60d711915670c6144bda6c2c5d471","title":"","text":"this.viewEnabled = NOTEBOOK_VARIABLE_VIEW_ENABLED.bindTo(contextKeyService); this.listeners.push(this.editorService.onDidEditorsChange(() => this.handleInitEvent())); this.listeners.push(this.notebookExecutionStateService.onDidChangeExecution(() => this.handleInitEvent())); this.listeners.push(this.editorService.onDidActiveEditorChange(() => this.handleInitEvent())); this.listeners.push(this.notebookExecutionStateService.onDidChangeExecution((e) => this.handleInitEvent())); this.configListener = configurationService.onDidChangeConfiguration((e) => this.handleConfigChange(e)); }"} {"_id":"doc-en-vscode-add58ff69e2cabbf27671d20d8c87340f3babb3552d227960710d0feb570630a","title":"","text":"if (this.configurationService.getValue(NotebookSetting.notebookVariablesView) && this.editorService.activeEditorPane?.getId() === 'workbench.editor.notebook') { if (this.hasVariableProvider()) { if (this.hasVariableProvider() && !this.initialized && this.initializeView()) { this.viewEnabled.set(true); } if (!this.initialized && this.initializeView()) { this.initialized = true; this.listeners.forEach(listener => listener.dispose()); }"} {"_id":"doc-en-vscode-d4b633d92f3ea79b7b2b94d710e76df9e16067438ee21474cb8da3b951cdadc2","title":"","text":"private setActiveNotebook() { const current = this.activeNotebook; const activeEditorPane = this.editorService.activeEditorPane; if (activeEditorPane && activeEditorPane.getId() === 'workbench.editor.notebook') { if (activeEditorPane?.getId() === 'workbench.editor.notebook') { const notebookDocument = getNotebookEditorFromEditorPane(activeEditorPane)?.getViewModel()?.notebookDocument; this.activeNotebook = notebookDocument; }"} {"_id":"doc-en-vscode-98add5538fd6bae019688c8c7add3181748196bc3af433438b5fbe536c09818a","title":"","text":"import { IViewsService } from 'vs/workbench/services/views/common/viewsService'; import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer'; import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry'; import { IQuickPickItem, IQuickInputService, IQuickPickSeparator } from 'vs/platform/quickinput/common/quickInput'; import { IQuickPickItem, IQuickInputService, IQuickPickSeparator, QuickPickInput } from 'vs/platform/quickinput/common/quickInput'; import { AUX_WINDOW_GROUP, AUX_WINDOW_GROUP_TYPE, IEditorService } from 'vs/workbench/services/editor/common/editorService'; import { assertIsDefined } from 'vs/base/common/types'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';"} {"_id":"doc-en-vscode-74f8799f4771adb258eb82a4ba8e9772f72e132293ee2467f28164ef3b33823f","title":"","text":"const editorService = accessor.get(IEditorService); const fileConfigurationService = accessor.get(IFilesConfigurationService); const entries: IOutputChannelQuickPickItem[] = outputService.getChannelDescriptors().filter(c => c.file && c.log) .map(channel => ({ id: channel.id, label: channel.label, channel })); const argName = args && typeof args === 'string' ? args : undefined; let entry: IOutputChannelQuickPickItem | undefined; if (argName) { entry = entries.find(e => e.id === argName); const argName = args && typeof args === 'string' ? args : undefined; const extensionChannels: IOutputChannelQuickPickItem[] = []; const coreChannels: IOutputChannelQuickPickItem[] = []; for (const c of outputService.getChannelDescriptors()) { if (c.file && c.log) { const e = { id: c.id, label: c.label, channel: c }; if (c.extensionId) { extensionChannels.push(e); } else { coreChannels.push(e); } if (e.id === argName) { entry = e; } } } if (!entry) { entry = await quickInputService.pick(entries, { placeHolder: nls.localize('selectlogFile', \"Select Log File\") }); const entries: QuickPickInput[] = [...extensionChannels.sort((a, b) => a.label.localeCompare(b.label))]; if (entries.length && coreChannels.length) { entries.push({ type: 'separator' }); entries.push(...coreChannels.sort((a, b) => a.label.localeCompare(b.label))); } entry = await quickInputService.pick(entries, { placeHolder: nls.localize('selectlogFile', \"Select Log File\") }); } if (entry) { const resource = assertIsDefined(entry.channel.file);"} {"_id":"doc-en-vscode-3ac7c9878bf1b547ea1c4ea5f361fb055ed95712d6fc2aa4047cef8c211d361d","title":"","text":"hideOnHover: true, hideOnKeyDown: true, }, appearance: { compact: true, }, ...overrideOptions }, focus); }"} {"_id":"doc-en-vscode-ece05b1a044ed59c893e67d531cf473f57a23c9bae7a096b956f04b8fb35c3f8","title":"","text":"const response = await fetch(url, init); if (!response.ok) { console.error('Invalid GitHub URL provided.'); return false; } const result = await response.json();"} {"_id":"doc-en-vscode-d518058e99b147dd515310ecc7d9660053a61b24764e255c3e10673217c939bd","title":"","text":"let issueUrl = hasUri ? this.getExtensionBugsUrl() : this.getIssueUrl(); if (!issueUrl) { console.error('No issue url found'); return false; }"} {"_id":"doc-en-vscode-100604318ad846fe0b33a20868590e0cd76118525b3bdf536f5578f0e2c09c76","title":"","text":"try { url = await this.writeToClipboard(baseUrl, issueBody); } catch (_) { console.error('Writing to clipboard failed'); return false; } }"} {"_id":"doc-en-vscode-11814e7b99c2cd7e90d4a7f942246dad079356a94223d0d6ca19b6e6b9be6f9e","title":"","text":"owner: match[1], repositoryName: match[2] }; } else { console.error('No GitHub match'); } return undefined;"} {"_id":"doc-en-vscode-b0ed346fa1d1fd63d447a3bb02aad14ab3dcbbd96fc18f219165304dd8dc3357","title":"","text":"githubAccessToken }, dataOverrides); if (issueReporterData.extensionId) { const extensionExists = extensionData.some(extension => extension.id === issueReporterData.extensionId); if (!extensionExists) { console.error(`Extension with ID ${issueReporterData.extensionId} does not exist.`); } } if (issueReporterData.extensionId && this.extensionIdentifierSet.has(issueReporterData.extensionId)) { ipcRenderer.send(`vscode:triggerReporterMenuResponse:${issueReporterData.extensionId}`, issueReporterData); this.extensionIdentifierSet.delete(new ExtensionIdentifier(issueReporterData.extensionId));"} {"_id":"doc-en-vscode-0544c4cc20923c77721bf8b9124cde9f5383608ebc92c21a4c5fde7270d58d27","title":"","text":"previewStart = assertIsDefined(this.editor.getPosition()); } const endPosition = new Position(previewStart.lineNumber, previewStart.column + text.length); this.editor.executeEdits(EditorDictation.ID, [ EditOperation.replace(Range.fromPositions(previewStart, previewStart.with(undefined, previewStart.column + lastReplaceTextLength)), text) ], [ Selection.fromPositions(new Position(previewStart.lineNumber, previewStart.column + text.length)) Selection.fromPositions(endPosition) ]); if (isPreview) {"} {"_id":"doc-en-vscode-771c377f4627653e6c3cef1fc7f21da22d978cf558fe9721b91347bfdd02d09f","title":"","text":"lastReplaceTextLength = 0; } this.editor.revealPositionInCenterIfOutsideViewport(endPosition); this.widget.layout(); };"} {"_id":"doc-en-vscode-a5190f0415c98d49331306d424b2eecf3250964a0a0e8f4cf99cd8b1273a1ada","title":"","text":"LanguageModelSystemMessage: extHostTypes.LanguageModelChatSystemMessage, LanguageModelUserMessage: extHostTypes.LanguageModelChatUserMessage, LanguageModelAssistantMessage: extHostTypes.LanguageModelChatAssistantMessage, LanguageModelError: extHostTypes.LanguageModelError, NewSymbolName: extHostTypes.NewSymbolName, NewSymbolNameTag: extHostTypes.NewSymbolNameTag, InlineEdit: extHostTypes.InlineEdit,"} {"_id":"doc-en-vscode-cd31c75d47bcf693f7af21084192230f7885d1a3b11b3273468337f5830e3d27","title":"","text":"import { ILogService } from 'vs/platform/log/common/log'; import { ExtHostLanguageModelsShape, IMainContext, MainContext, MainThreadLanguageModelsShape } from 'vs/workbench/api/common/extHost.protocol'; import * as typeConvert from 'vs/workbench/api/common/extHostTypeConverters'; import { LanguageModelError } from 'vs/workbench/api/common/extHostTypes'; import type * as vscode from 'vscode'; import { Progress } from 'vs/platform/progress/common/progress'; import { IChatMessage, IChatResponseFragment, ILanguageModelChatMetadata } from 'vs/workbench/contrib/chat/common/languageModels';"} {"_id":"doc-en-vscode-297f1fa0e2531168b4077f243d5d7db930976ad6805f8d64888b9a0cd0a2711d","title":"","text":"const metadata = await this._proxy.$prepareChatAccess(from, languageModelId, options.justification); if (!metadata || !this._languageModelIds.has(languageModelId)) { throw new Error(`Language model '${languageModelId}' is unknown.`); throw LanguageModelError.NotFound(`Language model '${languageModelId}' is unknown.`); } if (this._isUsingAuth(from, metadata)) { const success = await this._getAuthAccess(extension, { identifier: metadata.extension, displayName: metadata.auth.providerLabel }, options.justification, options.silent); if (!success || !this._modelAccessList.get(from)?.has(metadata.extension)) { throw new Error(`Language model '${languageModelId}' cannot be used by '${from.value}'.`); throw LanguageModelError.NoPermissions(`Language model '${languageModelId}' cannot be used by '${from.value}'.`); } }"} {"_id":"doc-en-vscode-81c6869ebde35d8fe68ac608ed7100eb2e1e24d398bc456fbdd367a8b4f7d8a8","title":"","text":"await barrier.wait(); if (error) { throw new Error(`Language model '${languageModelId}' errored, check cause for more details`, { cause: error }); throw new LanguageModelError( `Language model '${languageModelId}' errored, check cause for more details`, 'Unknown', error ); } return res.apiObject;"} {"_id":"doc-en-vscode-bf63220c6a818af6a8c1dffb03f6e4ab0fd4291b5c535e74a994a24b22ec81dd","title":"","text":"} } export class LanguageModelError extends Error { static NotFound(message?: string): LanguageModelError { return new LanguageModelError(message, LanguageModelError.NotFound.name); } static NoPermissions(message?: string): LanguageModelError { return new LanguageModelError(message, LanguageModelError.NoPermissions.name); } readonly code: string; constructor(message?: string, code?: string, cause?: Error) { super(message, { cause }); this.name = 'LanguageModelError'; this.code = code ?? ''; } } //#endregion //#region ai"} {"_id":"doc-en-vscode-7d23e29e21917b9b97be2082ca137a466f1292afe497baa989e1f498a377a4c1","title":"","text":"} /** * An error type for language model specific errors. * * Consumers of language models should check the code property to determine specific * failure causes, like `if(someError.code === vscode.LanguageModelError.NotFound.name) {...}` * for the case of referring to an unknown language model. */ export class LanguageModelError extends Error { /** * The language model does not exist. */ static NotFound(message?: string): LanguageModelError; /** * The requestor does not have permissions to use this * language model */ static NoPermissions(message?: string): LanguageModelError; /** * A code that identifies this error. * * Possible values are names of errors, like {@linkcode LanguageModelError.NotFound NotFound}, * or `Unknown` for unspecified errors from the language model itself. In the latter case the * `cause`-property will contain the actual error. */ readonly code: string; } /** * Options for making a chat request using a language model. * * @see {@link lm.chatRequest}"} {"_id":"doc-en-vscode-41deb3d4e80965b03b936dedd7e8a68ca16c188928ef65a99387f42ea5234d29","title":"","text":"* @returns A thenable that resolves to a {@link LanguageModelChatResponse}. The promise will reject when making the request failed. */ // TODO@API refine doc // TODO@API define specific error types? // TODO@API NAME: sendChatRequest, fetchChatResponse, makeChatRequest, chat, chatRequest sendChatRequest // TODO@API ExtensionContext#permission#languageModels: { languageModel: string: LanguageModelAccessInformation} // TODO@API ✅ define specific error types? // TODO@API ✅ NAME: sendChatRequest, fetchChatResponse, makeChatRequest, chat, chatRequest sendChatRequest // TODO@API ✅ NAME: LanguageModelChatXYZMessage // TODO@API ✅ errors on everything that prevents us to make the actual request // TODO@API ✅ double auth"} {"_id":"doc-en-vscode-56e49dd212c42c7bed71d7950d9e933293abac9607b12ad8afbb648501f74f5a","title":"","text":"import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; import { workbenchConfigurationNodeBase, Extensions as WorkbenchExtensions, IConfigurationMigrationRegistry, ConfigurationKeyValuePairs } from 'vs/workbench/common/configuration'; import { AccessibilityAlertSettingId, AccessibilitySignal } from 'vs/platform/accessibilitySignal/browser/accessibilitySignalService'; import { ISpeechService } from 'vs/workbench/contrib/speech/common/speechService'; import { ISpeechService, SPEECH_LANGUAGES, SPEECH_LANGUAGE_CONFIG } from 'vs/workbench/contrib/speech/common/speechService'; import { Disposable } from 'vs/base/common/lifecycle'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { Event } from 'vs/base/common/event';"} {"_id":"doc-en-vscode-255e037f483bca4db42c5901133a5b2f18bb6aca38163ad12ad60f093de955e9","title":"","text":"export const enum AccessibilityVoiceSettingId { SpeechTimeout = 'accessibility.voice.speechTimeout', SpeechLanguage = 'accessibility.voice.speechLanguage' SpeechLanguage = SPEECH_LANGUAGE_CONFIG } export const SpeechTimeoutDefault = 1200; const SpeechLanguageDefault = 'en-US'; export class DynamicSpeechAccessibilityConfiguration extends Disposable implements IWorkbenchContribution {"} {"_id":"doc-en-vscode-c5ac97446a254523168dcfe59365495e03f36508ad549d01e6c0f95bd50b712f","title":"","text":"'tags': ['accessibility'] }, [AccessibilityVoiceSettingId.SpeechLanguage]: { 'markdownDescription': localize('voice.speechLanguage', \"The language that voice speech recognition should recognize.\"), 'markdownDescription': localize('voice.speechLanguage', \"The language that voice speech recognition should recognize. Select `auto` to use the configured display language if possible. Note that not all display languages maybe supported by speech recognition\"), 'type': 'string', 'enum': languagesSorted, 'default': SpeechLanguageDefault, 'default': 'auto', 'tags': ['accessibility'], 'enumDescriptions': languagesSorted.map(key => languages[key].name), 'enumItemLabels': languagesSorted.map(key => languages[key].name)"} {"_id":"doc-en-vscode-11557124ecc03bd5e5fa15d7c800cbd7fa05adf6533974cec216b16b1615da50","title":"","text":"private getLanguages(): { [locale: string]: { name: string } } { return { ['da-DK']: { name: localize('speechLanguage.da-DK', \"Danish (Denmark)\") ['auto']: { name: localize('speechLanguage.auto', \"Auto (Use Display Language)\") }, ['de-DE']: { name: localize('speechLanguage.de-DE', \"German (Germany)\") }, ['en-AU']: { name: localize('speechLanguage.en-AU', \"English (Australia)\") }, ['en-CA']: { name: localize('speechLanguage.en-CA', \"English (Canada)\") }, ['en-GB']: { name: localize('speechLanguage.en-GB', \"English (United Kingdom)\") }, ['en-IE']: { name: localize('speechLanguage.en-IE', \"English (Ireland)\") }, ['en-IN']: { name: localize('speechLanguage.en-IN', \"English (India)\") }, ['en-NZ']: { name: localize('speechLanguage.en-NZ', \"English (New Zealand)\") }, [SpeechLanguageDefault]: { name: localize('speechLanguage.en-US', \"English (United States)\") }, ['es-ES']: { name: localize('speechLanguage.es-ES', \"Spanish (Spain)\") }, ['es-MX']: { name: localize('speechLanguage.es-MX', \"Spanish (Mexico)\") }, ['fr-CA']: { name: localize('speechLanguage.fr-CA', \"French (Canada)\") }, ['fr-FR']: { name: localize('speechLanguage.fr-FR', \"French (France)\") }, ['hi-IN']: { name: localize('speechLanguage.hi-IN', \"Hindi (India)\") }, ['it-IT']: { name: localize('speechLanguage.it-IT', \"Italian (Italy)\") }, ['ja-JP']: { name: localize('speechLanguage.ja-JP', \"Japanese (Japan)\") }, ['ko-KR']: { name: localize('speechLanguage.ko-KR', \"Korean (South Korea)\") }, ['nl-NL']: { name: localize('speechLanguage.nl-NL', \"Dutch (Netherlands)\") }, ['pt-PT']: { name: localize('speechLanguage.pt-PT', \"Portuguese (Portugal)\") }, ['pt-BR']: { name: localize('speechLanguage.pt-BR', \"Portuguese (Brazil)\") }, ['ru-RU']: { name: localize('speechLanguage.ru-RU', \"Russian (Russia)\") }, ['sv-SE']: { name: localize('speechLanguage.sv-SE', \"Swedish (Sweden)\") }, ['tr-TR']: { name: localize('speechLanguage.tr-TR', \"Turkish (Turkey)\") }, ['zh-CN']: { name: localize('speechLanguage.zh-CN', \"Chinese (Simplified, China)\") }, ['zh-HK']: { name: localize('speechLanguage.zh-HK', \"Chinese (Traditional, Hong Kong)\") }, ['zh-TW']: { name: localize('speechLanguage.zh-TW', \"Chinese (Traditional, Taiwan)\") } ...SPEECH_LANGUAGES }; } }"} {"_id":"doc-en-vscode-72515a68a4592642b6c26e94ce17905d8fb48b8ae79c189dd8f0e9227e8a023c","title":"","text":"import { ILogService } from 'vs/platform/log/common/log'; import { IHostService } from 'vs/workbench/services/host/browser/host'; import { DeferredPromise } from 'vs/base/common/async'; import { ISpeechService, ISpeechProvider, HasSpeechProvider, ISpeechToTextSession, SpeechToTextInProgress, IKeywordRecognitionSession, KeywordRecognitionStatus, SpeechToTextStatus } from 'vs/workbench/contrib/speech/common/speechService'; import { ISpeechService, ISpeechProvider, HasSpeechProvider, ISpeechToTextSession, SpeechToTextInProgress, IKeywordRecognitionSession, KeywordRecognitionStatus, SpeechToTextStatus, speechLanguageConfigToLanguage, SPEECH_LANGUAGE_CONFIG } from 'vs/workbench/contrib/speech/common/speechService'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration';"} {"_id":"doc-en-vscode-d5c5230d4d01f6eddd7aa86c3398d9a617e3df9ce879b8b9804d84a86511b4d4","title":"","text":"this.logService.warn(`Multiple speech providers registered. Picking first one: ${provider.metadata.displayName}`); } const language = this.configurationService.getValue('accessibility.voice.speechLanguage'); const language = speechLanguageConfigToLanguage(this.configurationService.getValue(SPEECH_LANGUAGE_CONFIG)); const session = this._activeSpeechToTextSession = provider.createSpeechToTextSession(token, typeof language === 'string' ? { language } : undefined); const sessionStart = Date.now();"} {"_id":"doc-en-vscode-c356b78e5e9f838d08b47c52698b51b5322ea0eec6948f2445b694a6606fb729","title":"","text":"import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { language } from 'vs/base/common/platform'; export const ISpeechService = createDecorator('speechService');"} {"_id":"doc-en-vscode-91ba3055ac2084753af31d40f2e281d4b8258c1c7e87675e63da984632b4c270","title":"","text":"*/ recognizeKeyword(token: CancellationToken): Promise; } export const SPEECH_LANGUAGE_CONFIG = 'accessibility.voice.speechLanguage'; export const SPEECH_LANGUAGES = { ['da-DK']: { name: localize('speechLanguage.da-DK', \"Danish (Denmark)\") }, ['de-DE']: { name: localize('speechLanguage.de-DE', \"German (Germany)\") }, ['en-AU']: { name: localize('speechLanguage.en-AU', \"English (Australia)\") }, ['en-CA']: { name: localize('speechLanguage.en-CA', \"English (Canada)\") }, ['en-GB']: { name: localize('speechLanguage.en-GB', \"English (United Kingdom)\") }, ['en-IE']: { name: localize('speechLanguage.en-IE', \"English (Ireland)\") }, ['en-IN']: { name: localize('speechLanguage.en-IN', \"English (India)\") }, ['en-NZ']: { name: localize('speechLanguage.en-NZ', \"English (New Zealand)\") }, ['en-US']: { name: localize('speechLanguage.en-US', \"English (United States)\") }, ['es-ES']: { name: localize('speechLanguage.es-ES', \"Spanish (Spain)\") }, ['es-MX']: { name: localize('speechLanguage.es-MX', \"Spanish (Mexico)\") }, ['fr-CA']: { name: localize('speechLanguage.fr-CA', \"French (Canada)\") }, ['fr-FR']: { name: localize('speechLanguage.fr-FR', \"French (France)\") }, ['hi-IN']: { name: localize('speechLanguage.hi-IN', \"Hindi (India)\") }, ['it-IT']: { name: localize('speechLanguage.it-IT', \"Italian (Italy)\") }, ['ja-JP']: { name: localize('speechLanguage.ja-JP', \"Japanese (Japan)\") }, ['ko-KR']: { name: localize('speechLanguage.ko-KR', \"Korean (South Korea)\") }, ['nl-NL']: { name: localize('speechLanguage.nl-NL', \"Dutch (Netherlands)\") }, ['pt-PT']: { name: localize('speechLanguage.pt-PT', \"Portuguese (Portugal)\") }, ['pt-BR']: { name: localize('speechLanguage.pt-BR', \"Portuguese (Brazil)\") }, ['ru-RU']: { name: localize('speechLanguage.ru-RU', \"Russian (Russia)\") }, ['sv-SE']: { name: localize('speechLanguage.sv-SE', \"Swedish (Sweden)\") }, ['tr-TR']: { name: localize('speechLanguage.tr-TR', \"Turkish (Turkey)\") }, ['zh-CN']: { name: localize('speechLanguage.zh-CN', \"Chinese (Simplified, China)\") }, ['zh-HK']: { name: localize('speechLanguage.zh-HK', \"Chinese (Traditional, Hong Kong)\") }, ['zh-TW']: { name: localize('speechLanguage.zh-TW', \"Chinese (Traditional, Taiwan)\") } }; export function speechLanguageConfigToLanguage(config: unknown, lang = language): string { if (typeof config === 'string') { if (config === 'auto') { if (lang !== 'en') { const langParts = lang.split('-'); return speechLanguageConfigToLanguage(`${langParts[0]}-${(langParts[1] ?? langParts[0]).toUpperCase()}`); } } else { if (SPEECH_LANGUAGES[config as keyof typeof SPEECH_LANGUAGES]) { return config; } } } return 'en-US'; } "} {"_id":"doc-en-vscode-abfe5b0f2a6eef9531836645918ec9d8a84081e0118d4f2900cadd5dc87e0878","title":"","text":" /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as assert from 'assert'; import { ensureNoDisposablesAreLeakedInTestSuite } from 'vs/base/test/common/utils'; import { speechLanguageConfigToLanguage } from 'vs/workbench/contrib/speech/common/speechService'; suite('SpeechService', () => { test('resolve language', async () => { assert.strictEqual(speechLanguageConfigToLanguage(undefined), 'en-US'); assert.strictEqual(speechLanguageConfigToLanguage(3), 'en-US'); assert.strictEqual(speechLanguageConfigToLanguage('foo'), 'en-US'); assert.strictEqual(speechLanguageConfigToLanguage('foo-bar'), 'en-US'); assert.strictEqual(speechLanguageConfigToLanguage('tr-TR'), 'tr-TR'); assert.strictEqual(speechLanguageConfigToLanguage('zh-TW'), 'zh-TW'); assert.strictEqual(speechLanguageConfigToLanguage('auto', 'en'), 'en-US'); assert.strictEqual(speechLanguageConfigToLanguage('auto', 'tr'), 'tr-TR'); assert.strictEqual(speechLanguageConfigToLanguage('auto', 'zh-tw'), 'zh-TW'); }); ensureNoDisposablesAreLeakedInTestSuite(); }); "} {"_id":"doc-en-vscode-01decab8a33bbcc60f65d292e73d404c314b78043c34b0aaa21cf7ef08d3136c","title":"","text":"left: unset !important; } .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.tab-actions-left::after, .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.close-action-off::after, .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fixed.tab-actions-left::after, .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fixed.close-action-off::after { content: ''; .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab .tab-fade-hider { display: none; } .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.tab-actions-left .tab-fade-hider, .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.close-action-off .tab-fade-hider, .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fixed.tab-actions-left .tab-fade-hider, .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fixed.close-action-off .tab-fade-hider { display: flex; flex: 0; width: 5px; /* reserve space to hide tab fade when close button is left or off (fixes https://github.com/microsoft/vscode/issues/45728) */"} {"_id":"doc-en-vscode-a368b8e7a1a31c4e0fb9ae2235e4ff26ad963dab266e6e9fafea7e5d50b1c017","title":"","text":"const tabActionBarDisposable = combinedDisposable(tabActionBar, tabActionListener, toDisposable(insert(this.tabActionBars, tabActionBar))); // Tab Fade Hider // Hides the tab fade to the right when tab action left and sizing shrink/fixed, ::after, ::before are already used const tabShadowHider = document.createElement('div'); tabShadowHider.classList.add('tab-fade-hider'); tabContainer.appendChild(tabShadowHider); // Tab Border Bottom const tabBorderBottomContainer = document.createElement('div'); tabBorderBottomContainer.classList.add('tab-border-bottom-container');"} {"_id":"doc-en-vscode-05a88f003ea2fd2949e2c9420aa2677f4b59b379f6715645ba0fcef416e77f01","title":"","text":"} })); // Reset widget height so it's recalculated templateData.inputWidgetHeight = InputRenderer.DEFAULT_HEIGHT; // Rerender the element whenever the editor content height changes const onDidChangeContentHeight = () => { const contentHeight = templateData.inputWidget.getContentHeight();"} {"_id":"doc-en-vscode-0e71061b94196d11c42eab44ce77cac14e15c2cfcc20392a662439248dac170b","title":"","text":"} export function fromDetails(coverage: vscode.FileCoverageDetail): CoverageDetails.Serialized { if (typeof coverage.executed === 'number' && coverage.executed < 0) { throw new Error(`Invalid coverage count ${coverage.executed}`); } if ('branches' in coverage) { return { count: coverage.executed,"} {"_id":"doc-en-vscode-73931b065c3042c01ed458b998591e298a7574c52e6d53cc7fd8067c6be25964","title":"","text":"} export function fromFile(id: string, coverage: vscode.FileCoverage): IFileCoverage.Serialized { types.validateTestCoverageCount(coverage.statementCoverage); types.validateTestCoverageCount(coverage.branchCoverage); types.validateTestCoverageCount(coverage.declarationCoverage); return { id, uri: coverage.uri,"} {"_id":"doc-en-vscode-d1956e2982f5d988394deabae995627c0586507f1b5ae8ce62ea2ca3b4df7af4","title":"","text":"//#region Test Coverage export class TestCoverageCount implements vscode.TestCoverageCount { constructor(public covered: number, public total: number) { validateTestCoverageCount(this); } } const validateCC = (cc?: vscode.TestCoverageCount) => { if (cc && cc.covered > cc.total) { export function validateTestCoverageCount(cc?: vscode.TestCoverageCount) { if (!cc) { return; } if (cc.covered > cc.total) { throw new Error(`The total number of covered items (${cc.covered}) cannot be greater than the total (${cc.total})`); } }; if (cc.total < 0) { throw new Error(`The number of covered items (${cc.total}) cannot be negative`); } } export class FileCoverage implements vscode.FileCoverage { public static fromDetails(uri: vscode.Uri, details: vscode.FileCoverageDetail[]): vscode.FileCoverage {"} {"_id":"doc-en-vscode-d9d32857bcf1768cb614caaaa36f2652f93406d915c9d025c493eb04647742fe","title":"","text":"public branchCoverage?: vscode.TestCoverageCount, public declarationCoverage?: vscode.TestCoverageCount, ) { validateCC(statementCoverage); validateCC(branchCoverage); validateCC(declarationCoverage); } }"} {"_id":"doc-en-vscode-a0ec782c128f4b8906316146906af9ab903ddf03cb0e6e1e5624639a18c15940","title":"","text":"import * as dom from 'vs/base/browser/dom'; import { HoverWidget } from 'vs/base/browser/ui/hover/hoverWidget'; import { mapFindFirst } from 'vs/base/common/arraysFind'; import { assertNever } from 'vs/base/common/assert'; import { CancellationTokenSource } from 'vs/base/common/cancellation'; import { IMarkdownString, MarkdownString } from 'vs/base/common/htmlContent'; import { KeyChord, KeyCode, KeyMod } from 'vs/base/common/keyCodes';"} {"_id":"doc-en-vscode-bca0a108ca47cc63675651eae2d654ccce617b843a6b4b59e007e3007b89cd76","title":"","text":"import { testingCoverageMissingBranch } from 'vs/workbench/contrib/testing/browser/icons'; import { FileCoverage } from 'vs/workbench/contrib/testing/common/testCoverage'; import { ITestCoverageService } from 'vs/workbench/contrib/testing/common/testCoverageService'; import { CoverageDetails, DetailType, IStatementCoverage } from 'vs/workbench/contrib/testing/common/testTypes'; import { CoverageDetails, DetailType, IDeclarationCoverage, IStatementCoverage } from 'vs/workbench/contrib/testing/common/testTypes'; import { TestingContextKeys } from 'vs/workbench/contrib/testing/common/testingContextKeys'; const MAX_HOVERED_LINES = 30;"} {"_id":"doc-en-vscode-ec428a60142605e0efe160de02780d6bc60162539da3e9b11baad4c439ec7f81","title":"","text":"/** Gets the markdown description for the given detail */ public describe(detail: CoverageDetailsWithBranch, model: ITextModel): IMarkdownString | undefined { if (detail.type === DetailType.Declaration) { return new MarkdownString().appendMarkdown(localize('coverage.declExecutedCount', '`{0}` was executed {1} time(s).', detail.name, detail.count)); return namedDetailLabel(detail.name, detail); } else if (detail.type === DetailType.Statement) { const text = wrapName(model.getValueInRange(tidyLocation(detail.location)).trim() || ``); const str = new MarkdownString(); if (detail.branches?.length) { const covered = detail.branches.filter(b => !!b.count).length; str.appendMarkdown(localize('coverage.branches', '{0} of {1} of branches in {2} were covered.', covered, detail.branches.length, text)); return new MarkdownString().appendMarkdown(localize('coverage.branches', '{0} of {1} of branches in {2} were covered.', covered, detail.branches.length, text)); } else { str.appendMarkdown(localize('coverage.codeExecutedCount', '{0} was executed {1} time(s).', text, detail.count)); return namedDetailLabel(text, detail); } return str; } else if (detail.type === DetailType.Branch) { const text = wrapName(model.getValueInRange(tidyLocation(detail.detail.location)).trim() || ``); const { count, label } = detail.detail.branches![detail.branch]; const label2 = label ? wrapInBackticks(label) : `#${detail.branch + 1}`; if (count === 0) { if (!count) { return new MarkdownString().appendMarkdown(localize('coverage.branchNotCovered', 'Branch {0} in {1} was not covered.', label2, text)); } else if (count === true) { return new MarkdownString().appendMarkdown(localize('coverage.branchCoveredYes', 'Branch {0} in {1} was executed.', label2, text)); } else { return new MarkdownString().appendMarkdown(localize('coverage.branchCovered', 'Branch {0} in {1} was executed {2} time(s).', label2, text, count)); } } return undefined; assertNever(detail); } } function namedDetailLabel(name: string, detail: IStatementCoverage | IDeclarationCoverage) { return new MarkdownString().appendMarkdown( !detail.count // 0 or false ? localize('coverage.declExecutedNo', '`{0}` was not executed.', name) : typeof detail.count === 'number' ? localize('coverage.declExecutedCount', '`{0}` was executed {1} time(s).', name, detail.count) : localize('coverage.declExecutedYes', '`{0}` was executed.', name) ); } // 'tidies' the range by normalizing it into a range and removing leading // and trailing whitespace. function tidyLocation(location: Range | Position): Range {"} {"_id":"doc-en-vscode-a3192a92f86c69275662782e51fd9a39c92a9d044d9d18344fa59b385d57bc83","title":"","text":"runHandler: (request: TestRunRequest, token: CancellationToken) => Thenable | void; /** * A function that provides detailed statement and function-level coverage for a file. * An extension-provided function that provides detailed statement and * function-level coverage for a file. The editor will call this when more * detail is needed for a file, such as when it's opened in an editor or * expanded in the **Test Coverage** view. * * The {@link FileCoverage} object passed to this function is the same instance * emitted on {@link TestRun.addCoverage} calls associated with this profile."} {"_id":"doc-en-vscode-d610530ca1096df55232b82698aec90b58b2b5882368ef2d27c1a424638f4b9b","title":"","text":"get cwd(): URI | undefined { return that.cwd; }, createDataStream(): AsyncIterable { readData(): AsyncIterable { return that._createDataStream(); } };"} {"_id":"doc-en-vscode-220a13880dd26fa93c7ec0f79e12e14ea3a502cb9b29b6b98c0a7228b26f8edf","title":"","text":"* @example * // Log all data written to the terminal for a command * const command = term.shellIntegration.executeCommand({ commandLine: 'echo \"Hello world\"' }); * const stream = command.createDataStream(); * const stream = command.readData(); * for await (const data of stream) { * console.log(data); * } */ createDataStream(): AsyncIterable; readData(): AsyncIterable; } export interface Terminal {"} {"_id":"doc-en-vscode-33f6c551c9792a5b1eb4b254f56e224346a648d8455daa2710c750149c5f5180","title":"","text":"// delete if (fileOperation.type & BulkFileOperationType.Delete) { return { original: { resource: undefined }, modified: { resource: URI.revive(previewUri) } original: { resource: URI.revive(previewUri) }, modified: { resource: undefined } }; }"} {"_id":"doc-en-vscode-c5c42f90742fee33afcc133b7d9d1884bf3cd0b4c4b17cf5d23fc22ffb762724","title":"","text":"overviewRulerWidth: 10, ignoreBracketedPasteMode: config.ignoreBracketedPasteMode, rescaleOverlappingGlyphs: config.rescaleOverlappingGlyphs, windowOptions: { getWinSizePixels: true, getCellSizePixels: true, getWinSizeChars: true, }, })); this._updateSmoothScrolling(); this._core = (this.raw as any)._core as IXtermCore;"} {"_id":"doc-en-vscode-f3057acf31234c2876880b0da31298faf84ce7614b1a411d1e842549c0d3a9ce","title":"","text":"* Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { createCancelablePromise, firstParallel } from 'vs/base/common/async'; import { createCancelablePromise, firstParallel, timeout } from 'vs/base/common/async'; import { IDisposable } from 'vs/base/common/lifecycle'; import * as platform from 'vs/base/common/platform'; import * as nls from 'vs/nls';"} {"_id":"doc-en-vscode-c37c2bb82d2f1b2d553921e8131a071e0409f4ac79ccb262ac8925482b5c324d","title":"","text":"} else { if (terminal.state.isInteractedWith) { terminal.sendText('u0003'); // Ctrl+C for #106743. Not part of the same command for #107969 await timeout(200); // mirroring https://github.com/microsoft/vscode/blob/c67ccc70ece5f472ec25464d3eeb874cfccee9f1/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts#L852-L857 } if (configProvider.getConfiguration('debug.terminal').get('clearBeforeReusing')) {"} {"_id":"doc-en-vscode-e52302385ae2ee0b337cb0000edc82b4bf4bdbe8cf16cb804f1bcfb39a16a19f","title":"","text":"hoverDelegate.onDidHideHover?.(); hoverWidget = undefined; } htmlElement.removeAttribute('custom-hover-active'); }; const triggerShowHover = (delay: number, focus?: boolean, target?: IHoverDelegateTarget) => {"} {"_id":"doc-en-vscode-02696ce207385892d931a0231334cc3fa4439cf52c417843443fadc0f2ae93e5","title":"","text":"if (!hoverWidget || hoverWidget.isDisposed) { hoverWidget = new UpdatableHoverWidget(hoverDelegate, target || htmlElement, delay > 0); await hoverWidget.update(typeof content === 'function' ? content() : content, focus, options); htmlElement.setAttribute('custom-hover-active', 'true'); } }, delay); };"} {"_id":"doc-en-vscode-6d17e12a81d16be81d0afe998e1f7cc6f6c5ab47493a017be3acce232b798cc7","title":"","text":"this.handleAndRegisterCustomViewContainers(); this.handleAndRegisterCustomViews(); // Abstract tree has it's own implementation of triggering custom hover // TreeView uses it's own implementation due to setting focus inside the (markdown) let showTreeHoverCancellation = new CancellationTokenSource(); KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'workbench.action.showTreeHover',"} {"_id":"doc-en-vscode-f463e225f9b9efc6779cd337d73b4773d5c3ff64d8094f42a74fc3bc3d23926f","title":"","text":"} }, true); }, weight: KeybindingWeight.WorkbenchContrib, weight: KeybindingWeight.WorkbenchContrib + 1, primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyI), when: ContextKeyExpr.and(RawCustomTreeViewContextKey, WorkbenchListFocusContextKey) });"} {"_id":"doc-en-vscode-1080651d5b679be107dc3fb799e357bfed995bdf3020f7a7b56fc7826de7640d","title":"","text":"* Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { KeyMod, KeyCode, KeyChord } from 'vs/base/common/keyCodes'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { List } from 'vs/base/browser/ui/list/listWidget';"} {"_id":"doc-en-vscode-d04888f054a588d42c8fe6334969966352c6d8fac6e76bda8fed92b7b670e8cf","title":"","text":"import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { Table } from 'vs/base/browser/ui/table/tableWidget'; import { AbstractTree, TreeFindMatchType, TreeFindMode } from 'vs/base/browser/ui/tree/abstractTree'; import { isActiveElement } from 'vs/base/browser/dom'; import { EventType, getActiveWindow, isActiveElement } from 'vs/base/browser/dom'; import { Action2, registerAction2 } from 'vs/platform/actions/common/actions'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { localize, localize2 } from 'vs/nls'; import { IDisposable } from 'vs/base/common/lifecycle'; function ensureDOMFocus(widget: ListWidget | undefined): void { // it can happen that one of the commands is executed while"} {"_id":"doc-en-vscode-601a743ea80883ec02824c5cf64a7e48338f372265fc0b3ef02a0ac81c464179","title":"","text":"return; } if (activeHover) { toggleCustomHover(activeHover, widget); } await updateFocus(widget, updateFocusFn); const listFocus = widget.getFocus();"} {"_id":"doc-en-vscode-141b6cb3b6a8353fbda542e0ed5ff497a6b99062a4def843c8b360609ce29631","title":"","text":"}); KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.showHover', weight: KeybindingWeight.WorkbenchContrib, primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyI), when: WorkbenchListFocusContextKey, handler: async (accessor: ServicesAccessor, ...args: any[]) => { const listService = accessor.get(IListService); const lastFocusedList = listService.lastFocusedList; if (!lastFocusedList) { return; } // Check if a tree element is focused const focus = lastFocusedList.getFocus(); if (!focus || (focus.length === 0)) { return; } // As the tree does not know anything about the rendered DOM elements // we have to traverse the dom to find the HTMLElements const treeDOM = lastFocusedList.getHTMLElement(); const scrollableElement = treeDOM.querySelector('.monaco-scrollable-element'); const listRows = scrollableElement?.querySelector('.monaco-list-rows'); const focusedElement = listRows?.querySelector('.focused'); if (!focusedElement) { return; } // Check if the focused element has a hover, otherwise find the first child with a hover const elementWithHover = focusedElement.matches('[custom-hover=\"true\"]') ? focusedElement : focusedElement.querySelector('[custom-hover=\"true\"]'); if (!elementWithHover) { return; } toggleCustomHover(elementWithHover as HTMLElement, lastFocusedList); }, }); let activeHover: undefined | HTMLElement; let disposable: IDisposable | undefined; function toggleCustomHover(element: HTMLElement, list: WorkbenchListWidget) { const show = !element.getAttribute('custom-hover-active'); const mouseEvent = new MouseEvent(show ? EventType.MOUSE_OVER : EventType.MOUSE_LEAVE, { view: getActiveWindow(), bubbles: true, cancelable: true, }); element.dispatchEvent(mouseEvent); if (activeHover === element && !show) { activeHover = undefined; disposable?.dispose(); disposable = undefined; } else { activeHover = element; disposable = list.onDidBlur(() => { toggleCustomHover(element, list); }); } } KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.toggleExpand', weight: KeybindingWeight.WorkbenchContrib, when: WorkbenchListFocusContextKey,"} {"_id":"doc-en-vscode-39ef93db208b2f962cbb7aad82dedc2b936a522405091367e77bf067380b5c97","title":"","text":"return result[0].resource; }); } else if (fileExists && (tasksExistInFile || content)) { if (content) { this._configurationService.updateValue('tasks', json.parse(content), target); const statResource = stat?.resource; if (content && statResource) { this._configurationService.updateValue('tasks', json.parse(content), { resource: statResource }, target); } return stat?.resource; return statResource; } return undefined; }).then((resource) => {"} {"_id":"doc-en-vscode-9334dd0c5e7043694a938d2a0951bc1cc960be4475d06ebbd5273dee6eb519e9","title":"","text":"// Do not trigger state if current state is manual and incoming state is automatic if (!isManualToAutoTransition) { this.setState(newState); } else { // Reset the new state after getting code actions back. setTimeout(() => { this.setState(newState); }, 500); } }, undefined); this._codeActionOracle.value.trigger({ type: CodeActionTriggerType.Auto, triggerAction: CodeActionTriggerSource.Default });"} {"_id":"doc-en-vscode-e12299f07a6d1f4cca5522d48b4565c25f39a82ee95d0f89496dc9b40c648ff7","title":"","text":"localize('window.systemColorTheme.light', \"Enforce a light system color theme.\"), localize('window.systemColorTheme.dark', \"Enforce a dark system color theme.\"), ], markdownDescription: localize({ key: 'window.systemColorTheme', comment: ['{0} and {1} will become links to other settings.'] }, \"Overrides the system color theme that is used for native UI elements such as native dialogs, menus and title bar. Even if your OS is configured in light appearance mode, you can select a dark system color theme for the window. You can also configure to automatically adjust based on the {0} setting. Note: Using this setting will disable {1}\", formatSettingAsLink(ThemeSettings.COLOR_THEME), formatSettingAsLink(ThemeSettings.DETECT_COLOR_SCHEME)), markdownDescription: localize({ key: 'window.systemColorTheme', comment: ['{0} and {1} will become links to other settings.'] }, \"Overrides the system color theme that is used for native UI elements such as native dialogs, menus and title bar. Even if your OS is configured in light appearance mode, you can select a dark system color theme for the window. You can also configure to automatically adjust based on the {0} setting. Note: Using this setting will disable {1}.\", formatSettingAsLink(ThemeSettings.COLOR_THEME), formatSettingAsLink(ThemeSettings.DETECT_COLOR_SCHEME)), default: 'default', included: ENABLE_SYSTEM_COLOR_SCHEME_SETTING, scope: ConfigurationScope.APPLICATION,"} {"_id":"doc-en-vscode-f1f8f74d0c634936cfebec2c944c5316f944d984e1096d60b92ec7554117bb8e","title":"","text":"import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IActiveNotebookEditor, ICellViewModel, INotebookEditor, type INotebookViewCellsUpdateEvent } from 'vs/workbench/contrib/notebook/browser/notebookBrowser'; import { IActiveNotebookEditor, ICellViewModel, INotebookEditor } from 'vs/workbench/contrib/notebook/browser/notebookBrowser'; import { CellKind, NotebookCellsChangeType, NotebookSetting } from 'vs/workbench/contrib/notebook/common/notebookCommon'; import { INotebookExecutionStateService, NotebookExecutionType } from 'vs/workbench/contrib/notebook/common/notebookExecutionStateService'; import { OutlineChangeEvent, OutlineConfigKeys, OutlineTarget } from 'vs/workbench/services/outline/browser/outline';"} {"_id":"doc-en-vscode-a93ed1c4087f85ef36b109245f6c3cd88536f7182fbdb6bb03bed5dd763c03b6","title":"","text":"private _uri: URI | undefined; private _entries: OutlineEntry[] = []; get entries(): OutlineEntry[] { if (this.delayedOutlineRecompute.isTriggered()) { this.delayedOutlineRecompute.cancel(); this._recomputeState(); } return this._entries; }"} {"_id":"doc-en-vscode-94d5105b7e53d7146bbcfdcdf6ceac71f6e2be50143ded5cc29aa020ba7cec86","title":"","text":"readonly outlineKind = 'notebookCells'; get activeElement(): OutlineEntry | undefined { if (this.delayedOutlineRecompute.isTriggered()) { this.delayedOutlineRecompute.cancel(); this._recomputeState(); } return this._activeEntry; } private readonly _outlineEntryFactory: NotebookOutlineEntryFactory; private readonly delayRecomputeActive: () => void; private readonly delayedOutlineRecompute: Delayer;; constructor( private readonly _editor: INotebookEditor, private readonly _target: OutlineTarget,"} {"_id":"doc-en-vscode-dcbad39a53f6a006c56f71c6f603aac7ba714d36b01a5cb0b018745368f634f1","title":"","text":"@IConfigurationService private readonly _configurationService: IConfigurationService, ) { this._outlineEntryFactory = new NotebookOutlineEntryFactory(notebookExecutionStateService); const delayerRecomputeActive = this._disposables.add(new Delayer(10)); this.delayRecomputeActive = () => delayerRecomputeActive.trigger(() => this._recomputeActive()); this._disposables.add(Event.debounce( _editor.onDidChangeSelection, (last, _current) => last, 200 )(() => { this.delayRecomputeActive(); const delayerRecomputeActive = this._disposables.add(new Delayer(200)); this._disposables.add(_editor.onDidChangeSelection(() => { delayerRecomputeActive.trigger(() => this._recomputeActive()); }, this)) this._disposables.add(Event.debounce( _editor.onDidChangeViewCells, (last, _current) => last ?? _current, 200 )(() => { this.delayRecomputeActive(); }, this) ); // .3s of a delay is sufficient, 100-200s is too quick and will unnecessarily block the ui thread. // Given we're only updating the outline when the user types, we can afford to wait a bit. const delayer = this._disposables.add(new Delayer(300)); const delayedRecompute = () => delayer.trigger(() => this._recomputeState()); this.delayedOutlineRecompute = this._disposables.add(new Delayer(300)); const delayedRecompute = () => { delayerRecomputeActive.cancel(); // Active is always recomputed after a recomputing the outline state. this.delayedOutlineRecompute.trigger(() => this._recomputeState()); }; this._disposables.add(_configurationService.onDidChangeConfiguration(e => { if (e.affectsConfiguration(NotebookSetting.outlineShowMarkdownHeadersOnly) ||"} {"_id":"doc-en-vscode-c87b7f808ff00cb36b96a0770cfa86efa15fc7c094975d54dc0610e325ece8a4","title":"","text":"return; } disposable.add(this._editor.textModel.onDidChangeContent(contentChanges => { if (contentChanges.rawEvents.some(c => c.kind === NotebookCellsChangeType.ChangeCellContent)) { if (contentChanges.rawEvents.some(c => c.kind === NotebookCellsChangeType.ChangeCellContent || c.kind === NotebookCellsChangeType.ChangeCellInternalMetadata || c.kind === NotebookCellsChangeType.Move || c.kind === NotebookCellsChangeType.ModelChange)) { delayedRecompute(); } }));"} {"_id":"doc-en-vscode-3b03d01e3ff874ed5608096a8ac25143dd0048cac302662eea4054794ba81c14","title":"","text":"} })); this.delayRecomputeActive(); this._recomputeActive(); } private _recomputeActive(): { changeEventTriggered: boolean } {"} {"_id":"doc-en-vscode-c3901696a2f3155828b18703ebce388a74481943d4d10c0d3cd6cfa300283faf","title":"","text":"\"url\": \"./schemas/jsconfig.schema.json\" }, { \"fileMatch\": \".swcrc\", \"url\": \"https://swc.rs/schema.json\" }, { \"fileMatch\": \"typedoc.json\", \"url\": \"https://typedoc.org/schema.json\" }"} {"_id":"doc-en-vscode-86c47873d8b178dc0d4749d31b71bb2bbb878f84f0fbdb38e6fb79abbd03fd55","title":"","text":"// tests already encompass their children. if (!test) { // no-op } else if (!test.item.uri) { queue.push(test.children.values()); continue; } else if (ident.extUri.isEqualOrParent(test.item.uri, uri)) { } else if (test.item.uri && ident.extUri.isEqualOrParent(test.item.uri, uri)) { yield test; } else if (ident.extUri.isEqualOrParent(uri, test.item.uri)) { } else if (!test.item.uri || ident.extUri.isEqualOrParent(uri, test.item.uri)) { if (test.expand === TestItemExpandState.Expandable) { await testService.collection.expand(test.item.extId, 1); }"} {"_id":"doc-en-vscode-d907640971adca326a0ba635899d7eb39583b70d9da82be9cb3ec207a65a0907","title":"","text":"use std::sync::{Arc, Mutex}; use std::time::{Duration, Instant}; use const_format::concatcp; use hyper::service::{make_service_fn, service_fn}; use hyper::{Body, Request, Response, Server}; use tokio::io::{AsyncBufReadExt, BufReader};"} {"_id":"doc-en-vscode-153c751949ede74f30ae5c5bbddc88842e8b1986e2c2d1e1b19e7c8a1cd06f4b","title":"","text":"/// Number of bytes for the secret keys. See workbench.ts for their usage. const SECRET_KEY_BYTES: usize = 32; /// Path to mint the key combining server and client parts. const SECRET_KEY_MINT_PATH: &str = \"/_vscode-cli/mint-key\"; const SECRET_KEY_MINT_PATH: &str = \"_vscode-cli/mint-key\"; /// Cookie set to the `SECRET_KEY_MINT_PATH` const PATH_COOKIE_NAME: &str = \"vscode-secret-key-path\"; /// Cookie set to the `SECRET_KEY_MINT_PATH` const PATH_COOKIE_VALUE: &str = concatcp!( PATH_COOKIE_NAME, \"=\", SECRET_KEY_MINT_PATH, \"; SameSite=Strict; Path=/\" ); /// HTTP-only cookie where the client's secret half is stored. const SECRET_KEY_COOKIE_NAME: &str = \"vscode-cli-secret-half\";"} {"_id":"doc-en-vscode-ec68c9e2da377202f580893346e139534fb69823653c9059d029396c8a2650d4","title":"","text":"/// Handler function for an inbound request async fn handle(ctx: HandleContext, req: Request) -> Result, Infallible> { let client_key_half = get_client_key_half(&req); let mut res = match req.uri().path() { SECRET_KEY_MINT_PATH => handle_secret_mint(ctx, req), _ => handle_proxied(ctx, req).await, let path = req.uri().path(); let mut res = if path.starts_with(&ctx.cm.base_path) && path.get(ctx.cm.base_path.len()..).unwrap_or_default() == SECRET_KEY_MINT_PATH { handle_secret_mint(&ctx, req) } else { handle_proxied(&ctx, req).await }; append_secret_headers(&mut res, &client_key_half); append_secret_headers(&ctx.cm.base_path, &mut res, &client_key_half); Ok(res) } async fn handle_proxied(ctx: HandleContext, req: Request) -> Response { async fn handle_proxied(ctx: &HandleContext, req: Request) -> Response { let release = if let Some((r, _)) = get_release_from_path(req.uri().path(), ctx.cm.platform) { r } else {"} {"_id":"doc-en-vscode-c4021b3f9a7e49a725ab666acf059d0b7e572c7fb5f3fc2a9b0437a74317bd64","title":"","text":"} } fn handle_secret_mint(ctx: HandleContext, req: Request) -> Response { fn handle_secret_mint(ctx: &HandleContext, req: Request) -> Response { use sha2::{Digest, Sha256}; let mut hasher = Sha256::new();"} {"_id":"doc-en-vscode-6231f462f26f461475eed4c988176fe6c37f5add6ff9eaac64e2e5478b3c3541","title":"","text":"/// Appends headers to response to maintain the secret storage of the workbench: /// sets the `PATH_COOKIE_VALUE` so workbench.ts knows about the 'mint' endpoint, /// and maintains the http-only cookie the client will use for cookies. fn append_secret_headers(res: &mut Response, client_key_half: &SecretKeyPart) { fn append_secret_headers( base_path: &str, res: &mut Response, client_key_half: &SecretKeyPart, ) { let headers = res.headers_mut(); headers.append( hyper::header::SET_COOKIE, PATH_COOKIE_VALUE.parse().unwrap(), format!( \"{}={}{}; SameSite=Strict; Path=/\", PATH_COOKIE_NAME, base_path, SECRET_KEY_MINT_PATH, ) .parse() .unwrap(), ); headers.append( hyper::header::SET_COOKIE,"} {"_id":"doc-en-vscode-d4f6377c360ca586cf08555f6a47b0012765e30b22a4e854400d5d66d1c5b74b","title":"","text":"pub platform: Platform, pub log: log::Logger, args: ServeWebArgs, /// Server base path, ending in `/` base_path: String, /// Cache where servers are stored cache: DownloadCache, /// Mapping of (Quality, Commit) to the state each server is in"} {"_id":"doc-en-vscode-1fc96eeaa439b30aa865d16f2f976d2f0196b1b55aaf209852b49af28acf85ee","title":"","text":"(release.quality, release.commit.clone()) } fn normalize_base_path(p: &str) -> String { let p = p.trim_matches('/'); if p.is_empty() { return \"/\".to_string(); } format!(\"/{}/\", p.trim_matches('/')) } impl ConnectionManager { pub fn new(ctx: &CommandContext, platform: Platform, args: ServeWebArgs) -> Arc { let base_path = normalize_base_path(args.server_base_path.as_deref().unwrap_or_default()); Arc::new(Self { platform, args, base_path, log: ctx.log.clone(), cache: DownloadCache::new(ctx.paths.web_server_storage()), update_service: UpdateService::new("} {"_id":"doc-en-vscode-892a80b53fe8967e81a29c52a72e0700c1e6b81deff34f24f5ecf473c24f14ad","title":"","text":"import { Button } from '../../../../base/browser/ui/button/button.js'; import { ITreeElement } from '../../../../base/browser/ui/tree/tree.js'; import { Action } from '../../../../base/common/actions.js'; import { Delayer } from '../../../../base/common/async.js'; import { Delayer, raceTimeout } from '../../../../base/common/async.js'; import { CancellationToken, CancellationTokenSource } from '../../../../base/common/cancellation.js'; import { fromNow } from '../../../../base/common/date.js'; import { isCancellationError } from '../../../../base/common/errors.js';"} {"_id":"doc-en-vscode-88465546dd9ebe2cb37f51c3bc98bc6361662efdf6344452a06c5964c98e84ee","title":"","text":"import { AbstractSettingRenderer, HeightChangeParams, ISettingLinkClickEvent, resolveConfiguredUntrustedSettings, createTocTreeForExtensionSettings, resolveSettingsTree, SettingsTree, SettingTreeRenderers } from './settingsTree.js'; import { ISettingsEditorViewState, parseQuery, SearchResultIdx, SearchResultModel, SettingsTreeElement, SettingsTreeGroupChild, SettingsTreeGroupElement, SettingsTreeModel, SettingsTreeSettingElement } from './settingsTreeModels.js'; import { createTOCIterator, TOCTree, TOCTreeModel } from './tocTree.js'; import { CONTEXT_SETTINGS_EDITOR, CONTEXT_SETTINGS_ROW_FOCUS, CONTEXT_SETTINGS_SEARCH_FOCUS, CONTEXT_TOC_ROW_FOCUS, ENABLE_LANGUAGE_FILTER, EXTENSION_SETTING_TAG, FEATURE_SETTING_TAG, ID_SETTING_TAG, IPreferencesSearchService, ISearchProvider, LANGUAGE_SETTING_TAG, MODIFIED_SETTING_TAG, POLICY_SETTING_TAG, REQUIRE_TRUSTED_WORKSPACE_SETTING_TAG, SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS, SETTINGS_EDITOR_COMMAND_SUGGEST_FILTERS, WORKSPACE_TRUST_SETTING_TAG, getExperimentalExtensionToggleData } from '../common/preferences.js'; import { CONTEXT_SETTINGS_EDITOR, CONTEXT_SETTINGS_ROW_FOCUS, CONTEXT_SETTINGS_SEARCH_FOCUS, CONTEXT_TOC_ROW_FOCUS, ENABLE_LANGUAGE_FILTER, EXTENSION_FETCH_TIMEOUT_MS, EXTENSION_SETTING_TAG, FEATURE_SETTING_TAG, ID_SETTING_TAG, IPreferencesSearchService, ISearchProvider, LANGUAGE_SETTING_TAG, MODIFIED_SETTING_TAG, POLICY_SETTING_TAG, REQUIRE_TRUSTED_WORKSPACE_SETTING_TAG, SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS, SETTINGS_EDITOR_COMMAND_SUGGEST_FILTERS, WORKSPACE_TRUST_SETTING_TAG, getExperimentalExtensionToggleData } from '../common/preferences.js'; import { settingsHeaderBorder, settingsSashBorder, settingsTextInputBorder } from '../common/settingsEditorColorRegistry.js'; import { IEditorGroup, IEditorGroupsService } from '../../../services/editor/common/editorGroupsService.js'; import { IOpenSettingsOptions, IPreferencesService, ISearchResult, ISetting, ISettingsEditorModel, ISettingsEditorOptions, ISettingsGroup, SettingMatchType, SettingValueType, validateSettingsEditorOptions } from '../../../services/preferences/common/preferences.js';"} {"_id":"doc-en-vscode-1625a804d054f98e0bba87bddd3b3b1a6f24410ca210806b0cb7ebb71cde1ff9","title":"","text":"} const extensionId = extension.identifier.id; // prevent race between extension update handler and this (onConfigUpdate) handler await this.refreshInstalledExtensionsList(); const extensionInstalled = this.installedExtensionIds.includes(extensionId); // Drill down to see whether the group and setting already exist"} {"_id":"doc-en-vscode-a1d99347f353c3b7036697ff8de00d9b735bec86a5cb18b0a844238e798d58b6","title":"","text":"// Create the entry. extensionInstalled is false in this case. let manifest: IExtensionManifest | null = null; try { manifest = await this.extensionGalleryService.getManifest(extension, CancellationToken.None); manifest = await raceTimeout( this.extensionGalleryService.getManifest(extension, CancellationToken.None), EXTENSION_FETCH_TIMEOUT_MS ) ?? null; } catch (e) { // Likely a networking issue. // Skip adding a button for this extension to the Settings editor. continue; } if (manifest === null) { continue; } const contributesConfiguration = manifest?.contributes?.configuration; let groupTitle: string | undefined;"} {"_id":"doc-en-vscode-14f93f2d0a0d42502034a919628506ec29beb12811dac6e0659880b301262e9f","title":"","text":"* Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { raceTimeout } from '../../../../base/common/async.js'; import { CancellationToken } from '../../../../base/common/cancellation.js'; import { IStringDictionary } from '../../../../base/common/collections.js'; import { IExtensionRecommendations } from '../../../../base/common/product.js';"} {"_id":"doc-en-vscode-6ebd3f68f27a9acd6e825aff319dbbe60d3e08077c505e90063cec0c25861be6","title":"","text":"export const ENABLE_LANGUAGE_FILTER = true; export const ENABLE_EXTENSION_TOGGLE_SETTINGS = true; export const EXTENSION_FETCH_TIMEOUT_MS = 1000; export type ExtensionToggleData = { settingsEditorRecommendedExtensions: IStringDictionary;"} {"_id":"doc-en-vscode-5a4fd28da23e7380db20eff8ff623545e5d64ef29e6b4e9ed90cc7c31dbfd9ff","title":"","text":"// Recommend prerelease if not on Stable. const isStable = productService.quality === 'stable'; try { const [extension] = await extensionGalleryService.getExtensions([{ id: extensionId, preRelease: !isStable }], CancellationToken.None); if (extension) { recommendedExtensionsGalleryInfo[key] = extension; const extensions = await raceTimeout(extensionGalleryService.getExtensions([{ id: extensionId, preRelease: !isStable }], CancellationToken.None), EXTENSION_FETCH_TIMEOUT_MS); if (extensions?.length === 1) { recommendedExtensionsGalleryInfo[key] = extensions[0]; } else { // same as network connection fail. we do not want a blank settings page: https://github.com/microsoft/vscode/issues/195722 // so instead of returning partial data we return undefined here"} {"_id":"doc-en-vscode-445348df067ee386bc305e75dadc622f53b89117d078ed3771cdfb9b5a3a06b9","title":"","text":"import { Action2, MenuId } from 'vs/platform/actions/common/actions'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { getCommandsContext, resolveCommandsContext } from 'vs/workbench/browser/parts/editor/editorCommands'; import { IEditorCommandsContext } from 'vs/workbench/common/editor'; import { TextFileEditor } from 'vs/workbench/contrib/files/browser/editors/textFileEditor'; import { MultiDiffEditor } from 'vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditor'; import { MultiDiffEditorInput } from 'vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput'; import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; export class GoToFileAction extends Action2 {"} {"_id":"doc-en-vscode-14c1f3088346b72c50a2fe3fd34e713e23c11933e07a0afe1774691757cfc277","title":"","text":"}); } async run(accessor: ServicesAccessor, ...args: any[]): Promise { const editorService = accessor.get(IEditorService); const activeEditor = editorService.activeEditor; async run(accessor: ServicesAccessor, resourceOrContext?: URI | IEditorCommandsContext, context?: IEditorCommandsContext): Promise { const { editor } = resolveCommandsContext(accessor.get(IEditorGroupsService), getCommandsContext(accessor, resourceOrContext, context)); if (activeEditor instanceof MultiDiffEditorInput) { const viewModel = await activeEditor.getViewModel(); if (editor instanceof MultiDiffEditorInput) { const viewModel = await editor.getViewModel(); viewModel.collapseAll(); } }"} {"_id":"doc-en-vscode-e21e17c1efadcd71239eb6e5d74426e1034f039099b7f0a7afb40cea1c63925b","title":"","text":"}); } async run(accessor: ServicesAccessor, ...args: any[]): Promise { const editorService = accessor.get(IEditorService); const activeEditor = editorService.activeEditor; async run(accessor: ServicesAccessor, resourceOrContext?: URI | IEditorCommandsContext, context?: IEditorCommandsContext): Promise { const { editor } = resolveCommandsContext(accessor.get(IEditorGroupsService), getCommandsContext(accessor, resourceOrContext, context)); if (activeEditor instanceof MultiDiffEditorInput) { const viewModel = await activeEditor.getViewModel(); if (editor instanceof MultiDiffEditorInput) { const viewModel = await editor.getViewModel(); viewModel.expandAll(); } }"} {"_id":"doc-en-vscode-4856ebdd29f66e4c2e5a69beedc6e746ec241fef9bb8eb74e6bfbc8e47e7dfaf","title":"","text":"} }); } else if (e.kind === 'removeRequest') { // TODO@jrieken this currently is buggy when removing not the very last request/response // if (this._session!.lastExchange?.response instanceof ReplyResponse) { // \ttry { // \t\tthis._session!.hunkData.ignoreTextModelNChanges = true; // \t\tawait this._strategy!.undoChanges(this._session!.lastExchange.response.modelAltVersionId); // \t} finally { // \t\tthis._session!.hunkData.ignoreTextModelNChanges = false; // \t} // } // TODO@jrieken this is buggy/weird when having code changes from multiple turns because // logically they are all the same hunks this._strategy?.cancel(); } }));"} {"_id":"doc-en-vscode-bf19f5a8b2c75890cb8bfcad16ee5f5c0d28ced232eed9a983ae22192579fc83","title":"","text":"import { ICommandService } from 'vs/platform/commands/common/commands'; import { TestCommandService } from 'vs/editor/test/browser/editorTestServices'; import { INotebookEditorService } from 'vs/workbench/contrib/notebook/browser/services/notebookEditorService'; import { RerunAction } from 'vs/workbench/contrib/inlineChat/browser/inlineChatActions'; suite('InteractiveChatController', function () {"} {"_id":"doc-en-vscode-866b02f374e3c75433c5cda017b22c357db39fa59b1c71b43937760f1c44d08f","title":"","text":"assert.ok(model.getValue().includes('MANUAL')); }); test('re-run should discard pending edits', async function () { let count = 1; store.add(chatAgentService.registerDynamicAgent({ id: 'testEditorAgent2', ...agentData }, { async invoke(request, progress, history, token) { progress({ kind: 'textEdit', uri: model.uri, edits: [{ range: new Range(1, 1, 1, 1), text: request.message + (count++) }] }); return {}; }, })); ctrl = instaService.createInstance(TestController, editor); const rerun = new RerunAction(); model.setValue(''); const p = ctrl.waitFor([...TestController.INIT_SEQUENCE, State.SHOW_REQUEST, State.SHOW_RESPONSE, State.WAIT_FOR_INPUT]); const r = ctrl.run({ message: 'PROMPT_', autoSend: true }); await p; assert.strictEqual(model.getValue(), 'PROMPT_1'); const p2 = ctrl.waitFor([State.SHOW_REQUEST, State.SHOW_RESPONSE, State.WAIT_FOR_INPUT]); await instaService.invokeFunction(rerun.runInlineChatCommand, ctrl, editor); await p2; assert.strictEqual(model.getValue(), 'PROMPT_2'); ctrl.finishExistingSession(); await r; }); });"} {"_id":"doc-en-vscode-59d6ebb5095f96dbc67c7c9efa9d0ff72679845e6b11c28922c7d87bd0c72234","title":"","text":"// ignore } } return new types.DocumentLink(Range.to(link.range), target); const result = new types.DocumentLink(Range.to(link.range), target); result.tooltip = link.tooltip; return result; } }"} {"_id":"doc-en-vscode-609e285a05f6c9de17da0f0e88a7425ca2b1a3f09829bea70a5e7ea906bba74c","title":"","text":"}); testApiCmd('DocumentLink[] vscode.executeLinkProvider returns lack tooltip #213970', async function () { disposables.push(extHost.registerDocumentLinkProvider(nullExtensionDescription, defaultSelector, { provideDocumentLinks(): any { const link = new types.DocumentLink(new types.Range(0, 0, 0, 20), URI.parse('foo:bar')); link.tooltip = 'Link Tooltip'; return [link]; } })); await rpcProtocol.sync(); const links1 = await commands.executeCommand('vscode.executeLinkProvider', model.uri); assert.strictEqual(links1.length, 1); assert.strictEqual(links1[0].tooltip, 'Link Tooltip'); }); test('Color provider', function () {"} {"_id":"doc-en-vscode-998fc259ced2828386038f44234be3586f1209fa22fa8d6df4e455ebb9211442","title":"","text":"const isAllowed = chatAgentNameService.getAgentNameRestriction(agent); let name = `${isAllowed ? agent.name : getFullyQualifiedId(agent)}`; const isDupe = isAllowed && chatAgentService.getAgentsByName(agent.name).length > 1; const isDupe = isAllowed && chatAgentService.agentHasDupeName(agent.id); if (isDupe) { name += ` (${agent.publisherDisplayName})`; }"} {"_id":"doc-en-vscode-84e77ebe3281f3d849afc721c2990073f23681765ed545d1ae3a2a947868599c","title":"","text":"return { suggestions: agents.map((agent, i): CompletionItem => { const { label: agentLabel, isDupe } = getAgentCompletionDetails(agent, agents, this.chatAgentNameService); const { label: agentLabel, isDupe } = this.getAgentCompletionDetails(agent); return { // Leading space is important because detail has no space at the start by design label: isDupe ?"} {"_id":"doc-en-vscode-5983ed4fb30a99159f8fc698e8382ddb6c154489f33800bbc7ffb46de0799b4e","title":"","text":"const justAgents: CompletionItem[] = agents .filter(a => !a.isDefault) .map(agent => { const { label: agentLabel, isDupe } = getAgentCompletionDetails(agent, agents, this.chatAgentNameService); const { label: agentLabel, isDupe } = this.getAgentCompletionDetails(agent); const detail = agent.description; return {"} {"_id":"doc-en-vscode-86e9465319d5a43bb0ff24e44fab869f0bd6e315865742f6e226e58df2481e27","title":"","text":"return { suggestions: justAgents.concat( agents.flatMap(agent => agent.slashCommands.map((c, i) => { const { label: agentLabel, isDupe } = getAgentCompletionDetails(agent, agents, this.chatAgentNameService); const { label: agentLabel, isDupe } = this.getAgentCompletionDetails(agent); const withSlash = `${chatSubcommandLeader}${c.name}`; return { label: { label: withSlash, description: agentLabel, detail: isDupe ? ` (${agent.publisherDisplayName})` : undefined },"} {"_id":"doc-en-vscode-1c2bb8405e27dca7d3148990a249afc1dd9daacc8fbb64537ec5cb72d7f8981e","title":"","text":"} })); } private getAgentCompletionDetails(agent: IChatAgentData): { label: string; isDupe: boolean } { const isAllowed = this.chatAgentNameService.getAgentNameRestriction(agent); const agentLabel = `${chatAgentLeader}${isAllowed ? agent.name : getFullyQualifiedId(agent)}`; const isDupe = isAllowed && this.chatAgentService.agentHasDupeName(agent.id); return { label: agentLabel, isDupe }; } } Registry.as(WorkbenchExtensions.Workbench).registerWorkbenchContribution(AgentCompletions, LifecyclePhase.Eventually);"} {"_id":"doc-en-vscode-0b5cc98f602c291fc52437c57d036870e8fa2357c74920ea9648c4bb1799e7ad","title":"","text":"} Registry.as(WorkbenchExtensions.Workbench).registerWorkbenchContribution(VariableCompletions, LifecyclePhase.Eventually); function getAgentCompletionDetails(agent: IChatAgentData, otherAgents: IChatAgentData[], chatAgentNameService: IChatAgentNameService): { label: string; isDupe: boolean } { const isAllowed = chatAgentNameService.getAgentNameRestriction(agent); const agentLabel = `${chatAgentLeader}${isAllowed ? agent.name : getFullyQualifiedId(agent)}`; const isDupe = isAllowed && !!otherAgents.find(other => other.name === agent.name && other.id !== agent.id); return { label: agentLabel, isDupe }; } "} {"_id":"doc-en-vscode-5bd9e27d3a64234f95bba5b3a77361c3bfa94378a694051176dd30b2f5d2756c","title":"","text":"getAgents(): IChatAgentData[]; getActivatedAgents(): Array; getAgentsByName(name: string): IChatAgentData[]; agentHasDupeName(id: string): boolean; /** * Get the default agent (only if activated)"} {"_id":"doc-en-vscode-a94c2183dca791f81ffda596a84199390b92eb218ae477ffd2e52f94afaec97f","title":"","text":"return this.getAgents().filter(a => a.name === name); } agentHasDupeName(id: string): boolean { const agent = this.getAgent(id); if (!agent) { return false; } return this.getAgentsByName(agent.name) .filter(a => a.extensionId.value !== agent.extensionId.value).length > 0; } async invokeAgent(id: string, request: IChatAgentRequest, progress: (part: IChatProgress) => void, history: IChatAgentHistoryEntry[], token: CancellationToken): Promise { const data = this._agents.get(id); if (!data?.impl) {"} {"_id":"doc-en-vscode-80cd625d1a65068b96dd50453a458e336104e1eb5fdf6774591f70aea806b73a","title":"","text":"getAgentByFullyQualifiedId(id: string): IChatAgentData | undefined { throw new Error('Method not implemented.'); } registerAgentCompletionProvider(id: string, provider: (query: string, token: CancellationToken) => Promise): IDisposable { throw new Error('Method not implemented.'); } getAgentCompletionItems(id: string, query: string, token: CancellationToken): Promise { throw new Error('Method not implemented.'); } agentHasDupeName(id: string): boolean { throw new Error('Method not implemented.'); } } class TestSpeechService implements ISpeechService {"} {"_id":"doc-en-vscode-e0bab13771d0ef1ab07f73f88952daeba5b387f902d4255b623819ee3e9737e4","title":"","text":"* Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { Emitter } from 'vs/base/common/event'; import { Barrier } from 'vs/base/common/async'; import { Emitter } from 'vs/base/common/event'; import { Disposable } from 'vs/base/common/lifecycle'; import { ILifecycleService, WillShutdownEvent, StartupKind, LifecyclePhase, LifecyclePhaseToString, ShutdownReason, BeforeShutdownErrorEvent, InternalBeforeShutdownEvent } from 'vs/workbench/services/lifecycle/common/lifecycle'; import { ILogService } from 'vs/platform/log/common/log'; import { mark } from 'vs/base/common/performance'; import { ILogService } from 'vs/platform/log/common/log'; import { IStorageService, StorageScope, StorageTarget, WillSaveStateReason } from 'vs/platform/storage/common/storage'; import { BeforeShutdownErrorEvent, ILifecycleService, InternalBeforeShutdownEvent, LifecyclePhase, LifecyclePhaseToString, ShutdownReason, StartupKind, WillShutdownEvent } from 'vs/workbench/services/lifecycle/common/lifecycle'; export abstract class AbstractLifecycleService extends Disposable implements ILifecycleService {"} {"_id":"doc-en-vscode-faf67d4acf230fb9e339f0639b729638be3f83c074da479e33c679dade6fb690","title":"","text":"constructor( @ILogService protected readonly logService: ILogService, @IStorageService protected readonly storageService: IStorageService @IStorageService protected readonly storageService: IStorageService, ) { super();"} {"_id":"doc-en-vscode-31f84321ddac82f9e69368c327a6b7c23023cd282080114a38817c86b4fa8337","title":"","text":"import { AbstractLifecycleService } from 'vs/workbench/services/lifecycle/common/lifecycleService'; import { InstantiationType, registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { INativeHostService } from 'vs/platform/native/common/native'; import { Promises, disposableTimeout, raceCancellation } from 'vs/base/common/async'; import { Promises, disposableTimeout, raceCancellation, timeout } from 'vs/base/common/async'; import { toErrorMessage } from 'vs/base/common/errorMessage'; import { CancellationTokenSource } from 'vs/base/common/cancellation'; import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; export class NativeLifecycleService extends AbstractLifecycleService { private static readonly BEFORE_SHUTDOWN_WARNING_DELAY = 5000; private static readonly WILL_SHUTDOWN_WARNING_DELAY = 800; private static readonly MAX_GRACEFUL_REMOTE_DISCONNECT_TIME = 3000; constructor( @INativeHostService private readonly nativeHostService: INativeHostService, @IStorageService storageService: IStorageService, @ILogService logService: ILogService @ILogService logService: ILogService, @IRemoteAgentService private readonly remoteAgentService: IRemoteAgentService, ) { super(logService, storageService);"} {"_id":"doc-en-vscode-f0e5eee8f410d9e14de5cf13d956bf9e225023b2eaf9d578e8a9bd831737f9ae","title":"","text":"// trigger onWillShutdown events and joining await this.handleWillShutdown(reply.reason); // now that all services have stored their data, it's safe to terminate // the remote connection gracefully before synchronously saying we're shut down await this.handleRemoteAgentDisconnect(); // trigger onDidShutdown event now that we know we will quit this._onDidShutdown.fire();"} {"_id":"doc-en-vscode-9bdd6e8487b259d06e324e0fd130e7097ff4f09a10bfdf241011e8a1909cd811","title":"","text":"}); } private async handleRemoteAgentDisconnect(): Promise { const longRunningWarning = disposableTimeout(() => { this.logService.warn(`[lifecycle] the remote agent is taking a long time to disconnect, waiting...`); }, NativeLifecycleService.BEFORE_SHUTDOWN_WARNING_DELAY); await Promise.race([ this.remoteAgentService.endConnection(), timeout(NativeLifecycleService.MAX_GRACEFUL_REMOTE_DISCONNECT_TIME), ]); longRunningWarning.dispose(); } protected async handleBeforeShutdown(reason: ShutdownReason): Promise { const logService = this.logService;"} {"_id":"doc-en-vscode-247d4e5c98b49bf8817d55523f65a2420629c9eac78dcb8faae36ed08b69570e","title":"","text":"@IProductService productService: IProductService, @IRemoteAuthorityResolverService remoteAuthorityResolverService: IRemoteAuthorityResolverService, @ISignService signService: ISignService, @ILogService logService: ILogService @ILogService logService: ILogService, ) { super(remoteSocketFactoryService, userDataProfileService, environmentService, productService, remoteAuthorityResolverService, signService, logService); }"} {"_id":"doc-en-vscode-12a0deddc773d9625bb9561778a63864876fad9bc6f771bc437fafd87a4376fb","title":"","text":"* Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { Emitter } from 'vs/base/common/event'; import { Disposable } from 'vs/base/common/lifecycle'; import { IChannel, IServerChannel, getDelayedChannel, IPCLogger } from 'vs/base/parts/ipc/common/ipc'; import { getDelayedChannel, IChannel, IPCLogger, IServerChannel } from 'vs/base/parts/ipc/common/ipc'; import { Client } from 'vs/base/parts/ipc/common/ipc.net'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; import { IDiagnosticInfo, IDiagnosticInfoOptions } from 'vs/platform/diagnostics/common/diagnostics'; import { ILogService } from 'vs/platform/log/common/log'; import { IProductService } from 'vs/platform/product/common/productService'; import { connectRemoteAgentManagement, IConnectionOptions, ManagementPersistentConnection, PersistentConnectionEvent } from 'vs/platform/remote/common/remoteAgentConnection'; import { IExtensionHostExitInfo, IRemoteAgentConnection, IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; import { IRemoteAgentEnvironment, RemoteAgentConnectionContext } from 'vs/platform/remote/common/remoteAgentEnvironment'; import { IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remoteAuthorityResolver'; import { RemoteAgentConnectionContext, IRemoteAgentEnvironment } from 'vs/platform/remote/common/remoteAgentEnvironment'; import { RemoteExtensionEnvironmentChannelClient } from 'vs/workbench/services/remote/common/remoteAgentEnvironmentChannel'; import { IDiagnosticInfoOptions, IDiagnosticInfo } from 'vs/platform/diagnostics/common/diagnostics'; import { Emitter } from 'vs/base/common/event'; import { IRemoteSocketFactoryService } from 'vs/platform/remote/common/remoteSocketFactoryService'; import { ISignService } from 'vs/platform/sign/common/sign'; import { ILogService } from 'vs/platform/log/common/log'; import { ITelemetryData, TelemetryLevel } from 'vs/platform/telemetry/common/telemetry'; import { IProductService } from 'vs/platform/product/common/productService'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; import { RemoteExtensionEnvironmentChannelClient } from 'vs/workbench/services/remote/common/remoteAgentEnvironmentChannel'; import { IExtensionHostExitInfo, IRemoteAgentConnection, IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService'; import { IUserDataProfileService } from 'vs/workbench/services/userDataProfile/common/userDataProfile'; import { IRemoteSocketFactoryService } from 'vs/platform/remote/common/remoteSocketFactoryService'; export abstract class AbstractRemoteAgentService extends Disposable implements IRemoteAgentService {"} {"_id":"doc-en-vscode-7db93437c26e59a69b34bc079f325f420dd39375e8696f01dcec96bd9f54089f","title":"","text":"@IProductService productService: IProductService, @IRemoteAuthorityResolverService private readonly _remoteAuthorityResolverService: IRemoteAuthorityResolverService, @ISignService signService: ISignService, @ILogService logService: ILogService @ILogService logService: ILogService, ) { super(); if (this._environmentService.remoteAuthority) {"} {"_id":"doc-en-vscode-f22c1d8b34e33df98514a8366497dba262df94cf206fe297549497e03ddc2530","title":"","text":"let platform: crate::update_service::Platform = PreReqChecker::new().verify().await?; if !args.without_connection_token { // Ensure there's a defined connection token, since if multiple server versions // are excuted, they will need to have a single shared token. let token_path = ctx.paths.root().join(\"serve-web-token\"); let token = mint_connection_token(&token_path, args.connection_token.clone()) .map_err(CodeError::CouldNotCreateConnectionTokenFile)?; args.connection_token = Some(token); args.connection_token_file = Some(token_path.to_string_lossy().to_string()); if let Some(p) = args.connection_token_file.as_deref() { let token = fs::read_to_string(PathBuf::from(p)) .map_err(CodeError::CouldNotReadConnectionTokenFile)?; args.connection_token = Some(token.trim().to_string()); } else { // Ensure there's a defined connection token, since if multiple server versions // are executed, they will need to have a single shared token. let token_path = ctx.paths.root().join(\"serve-web-token\"); let token = mint_connection_token(&token_path, args.connection_token.clone()) .map_err(CodeError::CouldNotCreateConnectionTokenFile)?; args.connection_token = Some(token); args.connection_token_file = Some(token_path.to_string_lossy().to_string()); } } let cm = ConnectionManager::new(&ctx, platform, args.clone());"} {"_id":"doc-en-vscode-0267fb68b8161723800e333623976fd0c9564b3c018cd9aabd287c2358bada4c","title":"","text":"// todo: can be specialized when update service is moved to CodeErrors #[error(\"Could not check for update: {0}\")] UpdateCheckFailed(String), #[error(\"Could not read connection token file: {0}\")] CouldNotReadConnectionTokenFile(std::io::Error), #[error(\"Could not write connection token file: {0}\")] CouldNotCreateConnectionTokenFile(std::io::Error), #[error(\"A tunnel with the name {0} exists and is in-use. Please pick a different name or stop the existing tunnel.\")]"} {"_id":"doc-en-vscode-33c7182c418ecf88e8e0cad71d5bf3645f09ba89d536377446bab7fb2a1aaf33","title":"","text":"// Reset await this.code.dispatchKeybinding('Backspace'); } await this.code.wait(100); await this.code.dispatchKeybinding(altKey ? 'Alt+Enter' : 'enter'); await this.quickinput.waitForQuickInputClosed(); if (commandId === TerminalCommandIdWithValue.NewWithProfile) {"} {"_id":"doc-en-vscode-8202ae162d8fb37e4b16bcc1576cec163cad1a682aa73f581bd86fb8577b5e6f","title":"","text":"'force-color-profile', // disable LCD font rendering, a Chromium flag 'disable-lcd-text' 'disable-lcd-text', // bypass any specified proxy for the given semi-colon-separated list of hosts 'proxy-bypass-list' ]; if (process.platform === 'linux') {"} {"_id":"doc-en-vscode-c4bef8496cef20fbf5baad11893426aa11425b4b1143ec2afd17c15c3872e135","title":"","text":"type: 'boolean', description: localize('argv.disableLcdText', 'Disables LCD font antialiasing.') }, 'proxy-bypass-list': { type: 'string', description: localize('argv.proxyBypassList', 'Bypass any specified proxy for the given semi-colon-separated list of hosts. Example value \";*.microsoft.com;*foo.com;1.2.3.4:5678\", will use the proxy server for all hosts except for local addresses (localhost, 127.0.0.1 etc.), microsoft.com subdomains, hosts that contain the suffix foo.com and anything at 1.2.3.4:5678') }, 'disable-hardware-acceleration': { type: 'boolean', description: localize('argv.disableHardwareAcceleration', 'Disables hardware acceleration. ONLY change this option if you encounter graphic issues.')"} {"_id":"doc-en-vscode-8d6cec63bf598a251eb5d4fd1e2ed0fb3973ff8789cc52f2c537c6d2a1df4fb0","title":"","text":"app.commandLine.appendSwitch(argvKey); } } else if (argvValue) { if (argvKey === 'force-color-profile') { // Color profile app.commandLine.appendSwitch(argvKey, argvValue); } else if (argvKey === 'password-store') { if (argvKey === 'password-store') { // Password store // TODO@TylerLeonhardt: Remove this migration in 3 months let migratedArgvValue = argvValue;"} {"_id":"doc-en-vscode-0999e370c2ec17750b639c55d4bcb7447ddb5a0445e44ba2ea35e7c4daa81fa0","title":"","text":"migratedArgvValue = 'gnome-libsecret'; } app.commandLine.appendSwitch(argvKey, migratedArgvValue); } else { app.commandLine.appendSwitch(argvKey, argvValue); } } }"} {"_id":"doc-en-vscode-cc7b04987e6b17b12112318ceb2ae6885c9560c7643697b492c7061233c6ed43","title":"","text":"color: var(--vscode-textLink-foreground); } .settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-markdown a, .settings-editor > .settings-body .settings-tree-container .setting-item-contents .edit-in-settings-button { text-decoration: var(--text-link-decoration); } .settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-markdown a:focus, .settings-editor > .settings-body .settings-tree-container .setting-item-contents .edit-in-settings-button:focus { outline: 1px solid -webkit-focus-ring-color;"} {"_id":"doc-en-vscode-05d96d68110f31e91b8a6fdd8cf4cf7ea116d64bdf1bf9d50195472a1477ca18","title":"","text":"return new HoverAction(parent, actionOptions, keybindingLabel); } public readonly actionLabel: string; public readonly actionKeybindingLabel: string | null; private readonly actionContainer: HTMLElement; private readonly action: HTMLElement; private constructor(parent: HTMLElement, actionOptions: { label: string; iconClass?: string; run: (target: HTMLElement) => void; commandId: string }, keybindingLabel: string | null) { super(); this.actionLabel = actionOptions.label; this.actionKeybindingLabel = keybindingLabel; this.actionContainer = dom.append(parent, $('div.action-container')); this.actionContainer.setAttribute('tabindex', '0');"} {"_id":"doc-en-vscode-5fb47a5d84f322a37224e492a168f7b45d45a86302ce3a71f59aa8321d43d9ee","title":"","text":"import { localize } from 'vs/nls'; import { InlayHintsHover } from 'vs/editor/contrib/inlayHints/browser/inlayHintsHover'; import { BugIndicatingError } from 'vs/base/common/errors'; import { HoverAction } from 'vs/base/browser/ui/hover/hoverWidget'; export class RenderedContentHover extends Disposable {"} {"_id":"doc-en-vscode-569cbafa40fe6b8f24c4685971678ee832a4783417922d995556457ce7e6880c","title":"","text":"* The HTML element containing the hover status bar. */ hoverElement: HTMLElement; /** * The actions of the hover status bar. */ actions: HoverAction[]; } type IRenderedContentHoverPartOrStatusBar = IRenderedContentHoverPart | IRenderedContentStatusBar;"} {"_id":"doc-en-vscode-4c9cf9e009c76c5dac61789edcfaf54d4deeea1b7d903fbc7efec1b34b34a7b8","title":"","text":"return this._statusBar.hoverElement; } get actions(): HoverAction[] { return this._statusBar.actions; } dispose() { this._statusBar.dispose(); }"} {"_id":"doc-en-vscode-8051eda81658220339f908d675ce09a756dc54b4691d3854df5dd2f5f07ac4f3","title":"","text":"this._renderedParts.push({ type: 'statusBar', hoverElement: renderedStatusBar.hoverElement, actions: renderedStatusBar.actions, }); } return toDisposable(() => { disposables.dispose(); });"} {"_id":"doc-en-vscode-f4c1b1e71bf1d868a7e7d7cb1f8478061d9f04e0a1b2c1a70187ae24467958ab","title":"","text":"return ''; } if (renderedPart.type === 'statusBar') { return localize('hoverAccessibilityStatusBar', \"This is a hover status bar.\"); const statusBarDescription = [localize('hoverAccessibilityStatusBar', \"This is a hover status bar.\")]; for (const action of renderedPart.actions) { const keybinding = action.actionKeybindingLabel; if (keybinding) { statusBarDescription.push(localize('hoverAccessibilityStatusBarActionWithKeybinding', \"It has an action with label {0} and keybinding {1}.\", action.actionLabel, keybinding)); } else { statusBarDescription.push(localize('hoverAccessibilityStatusBarActionWithoutKeybinding', \"It has an action with label {0}.\", action.actionLabel)); } } return statusBarDescription.join('n'); } return renderedPart.participant.getAccessibleContent(renderedPart.hoverPart); }"} {"_id":"doc-en-vscode-ce67a4e50b23064498b17ae2f88af5318115f971866a6c3dab09def6aa3e244b","title":"","text":"export class EditorHoverStatusBar extends Disposable implements IEditorHoverStatusBar { public readonly hoverElement: HTMLElement; public readonly actions: HoverAction[] = []; private readonly actionsElement: HTMLElement; private _hasContent: boolean = false;"} {"_id":"doc-en-vscode-0d051d7a163822d374c10537682e41cde867bd1adaf0a0c2e9de33a16340280b","title":"","text":"const keybinding = this._keybindingService.lookupKeybinding(actionOptions.commandId); const keybindingLabel = keybinding ? keybinding.getLabel() : null; this._hasContent = true; return this._register(HoverAction.render(this.actionsElement, actionOptions, keybindingLabel)); const action = this._register(HoverAction.render(this.actionsElement, actionOptions, keybindingLabel)); this.actions.push(action); return action; } public append(element: HTMLElement): HTMLElement {"} {"_id":"doc-en-vscode-a8267389d53f80ef7b3cf3ece5f233938168d5b9093846aeb6154bf9fe05c664","title":"","text":"} extensionsToInstall.push({ extension: gallery, options: { ...installOptions, installGivenVersion: !!version, isApplicationScoped: installedExtension?.isApplicationScoped }, options: { ...installOptions, installGivenVersion: !!version, isApplicationScoped: installOptions.isApplicationScoped || installedExtension?.isApplicationScoped }, }); }));"} {"_id":"doc-en-vscode-cd0b980b05127da8e451d265cda11a0f60c06cfb2c1b8f529e55ced33f04e5b3","title":"","text":"this._register(this.registerSwitchProfileAction()); this.registerOpenProfileSubMenu(); this.registerNewWindowWithProfileAction(); this.registerProfilesActions(); this._register(this.userDataProfilesService.onDidChangeProfiles(() => this.registerProfilesActions()));"} {"_id":"doc-en-vscode-6edd2c56c4c38289e08763fc5ee573c5b68c55a6245795863dd062699ddb6ae6","title":"","text":"}); } private registerNewWindowWithProfileAction(): IDisposable { return registerAction2(class NewWindowWithProfileAction extends Action2 { constructor() { super({ id: `workbench.profiles.actions.newWindowWithProfile`, title: localize2('newWindowWithProfile', \"New Window with Profile...\"), category: PROFILES_CATEGORY, precondition: HAS_PROFILES_CONTEXT, f1: true, }); } async run(accessor: ServicesAccessor) { const quickInputService = accessor.get(IQuickInputService); const userDataProfilesService = accessor.get(IUserDataProfilesService); const hostService = accessor.get(IHostService); const pick = await quickInputService.pick( userDataProfilesService.profiles.map(profile => ({ label: profile.name, profile })), { title: localize('new window with profile', \"New Window with Profile\"), placeHolder: localize('pick profile', \"Select Profile\"), canPickMany: false }); if (pick) { return hostService.openWindow({ remoteAuthority: null, forceProfile: pick.profile.name }); } } }); } private registerNewWindowAction(profile: IUserDataProfile): IDisposable { const disposables = new DisposableStore();"} {"_id":"doc-en-vscode-687c8f15e202c55a5bffae08ca83fef1607d8f865c50c9cee6a30052ad14fd2f","title":"","text":"} private getVolumeInPercent(): number { const volume = this.configurationService.getValue('accessibilitySignals.volume'); const volume = this.configurationService.getValue('accessibility.signalOptions.volume'); if (typeof volume !== 'number') { return 50; }"} {"_id":"doc-en-vscode-250aa01d8d4d8122cffbb57570fd5172eac47c8e8d612550096cc379fd9af9fa","title":"","text":"\".dsql\" ], \"aliases\": [ \"SQL\" \"MS SQL\", \"T-SQL\" ], \"configuration\": \"./language-configuration.json\" }"} {"_id":"doc-en-vscode-361c2d99d5d5502a455aa2498bacbe7d10d9c638c82c57a4d5809322166406f8","title":"","text":"installed.forEach(ext => this.progressByEvent(`extensionInstalled:${ext.identifier.id.toLowerCase()}`)); }); this._register(this.extensionManagementService.onDidInstallExtensions(async (result) => { const hadLastFoucs = await this.hostService.hadLastFocus(); this._register(this.extensionManagementService.onDidInstallExtensions((result) => { for (const e of result) { const skipWalkthrough = e?.context?.[EXTENSION_INSTALL_SKIP_WALKTHROUGH_CONTEXT] || e?.context?.[EXTENSION_INSTALL_DEP_PACK_CONTEXT]; // If the window had last focus and the install didn't specify to skip the walkthrough // Then add it to the sessionInstallExtensions to be opened if (hadLastFoucs && !skipWalkthrough) { if (!skipWalkthrough) { this.sessionInstalledExtensions.add(e.identifier.id.toLowerCase()); } this.progressByEvent(`extensionInstalled:${e.identifier.id.toLowerCase()}`);"} {"_id":"doc-en-vscode-420c418d62e630c3b1201d7518b8add25299522546d1df904ae9d6e0c9158301","title":"","text":"this.storageService.store(walkthroughMetadataConfigurationKey, JSON.stringify([...this.metadata.entries()]), StorageScope.PROFILE, StorageTarget.USER); if (sectionToOpen && this.configurationService.getValue('workbench.welcomePage.walkthroughs.openOnInstall')) { const hadLastFoucs = await this.hostService.hadLastFocus(); if (hadLastFoucs && sectionToOpen && this.configurationService.getValue('workbench.welcomePage.walkthroughs.openOnInstall')) { type GettingStartedAutoOpenClassification = { owner: 'lramos15'; comment: 'When a walkthrthrough is opened upon extension installation';"} {"_id":"doc-en-vscode-62cf125120a03c8764280e1ea2084754112d8917c19ebd6761f3ccbf5eb2b68f","title":"","text":"if (this._store.isDisposed) { return; } this._currentTitle = ptyProcess.process; // HACK: The node-pty API can return undefined somehow https://github.com/microsoft/vscode/issues/222323 this._currentTitle = (ptyProcess.process ?? ''); this._onDidChangeProperty.fire({ type: ProcessPropertyType.Title, value: this._currentTitle }); // If fig is installed it may change the title of the process const sanitizedTitle = this.currentTitle.replace(/ (figterm)$/g, '');"} {"_id":"doc-en-vscode-b6c78b3bcbdb2337cec49fa40c62e7e7e48d8f9ef0796cb983ededbcb8107449","title":"","text":"{ id: 'workspaceTrust', title: localize('gettingStarted.workspaceTrust.title', \"Safely browse and edit code\"), description: localize('gettingStarted.workspaceTrust.description.interpolated', \"{0} lets you decide whether your project folders should **allow or restrict** automatic code execution __(required for extensions, debugging, etc)__.nOpening a file/folder will prompt to grant trust. You can always {1} later.\", Button(localize('workspaceTrust', \"Workspace Trust\"), 'https://github.com/microsoft/vscode-docs/blob/workspaceTrust/docs/editor/workspace-trust.md'), Button(localize('enableTrust', \"enable trust\"), 'command:toSide:workbench.action.manageTrustedDomain')), description: localize('gettingStarted.workspaceTrust.description.interpolated', \"{0} lets you decide whether your project folders should **allow or restrict** automatic code execution __(required for extensions, debugging, etc)__.nOpening a file/folder will prompt to grant trust. You can always {1} later.\", Button(localize('workspaceTrust', \"Workspace Trust\"), 'https://code.visualstudio.com/docs/editor/workspace-trust'), Button(localize('enableTrust', \"enable trust\"), 'command:toSide:workbench.action.manageTrustedDomain')), when: 'workspacePlatform != 'webworker' && !isWorkspaceTrusted && workspaceFolderCount == 0', media: { type: 'svg', altText: 'Workspace Trust editor in Restricted mode and a primary button for switching to Trusted mode.', path: 'workspaceTrust.svg'"} {"_id":"doc-en-vscode-b19401e7bd364e1f2e194438f5c0226dc3ad6a2e431b33f88717f47d69cef590","title":"","text":"if (styles.backgroundColor) { content.push(`.monaco-workbench { background-color: ${styles.backgroundColor} !important; }`); content.push(`.issue-reporter-body::-webkit-scrollbar-track { background-color: ${styles.backgroundColor}; }`); } if (styles.inputBorder) {"} {"_id":"doc-en-vscode-f9aacd116c883887c801fed9827f144dee9f9ed0d4d23e549360bb15198c4f12","title":"","text":"content.push(`a:hover, .workbenchCommand:hover { color: ${styles.textLinkActiveForeground}; }`); } if (styles.sliderBackgroundColor) { content.push(`::-webkit-scrollbar-thumb { background-color: ${styles.sliderBackgroundColor}; }`); } if (styles.sliderActiveColor) { content.push(`::-webkit-scrollbar-thumb:active { background-color: ${styles.sliderActiveColor}; }`); content.push(`.issue-reporter-body::-webkit-scrollbar-thumb:active { background-color: ${styles.sliderActiveColor}; }`); } if (styles.sliderHoverColor) { content.push(`::--webkit-scrollbar-thumb:hover { background-color: ${styles.sliderHoverColor}; }`); content.push(`.issue-reporter-body::-webkit-scrollbar-thumb { background-color: ${styles.sliderHoverColor}; }`); content.push(`.issue-reporter-body::--webkit-scrollbar-thumb:hover { background-color: ${styles.sliderHoverColor}; }`); } if (styles.buttonBackground) {"} {"_id":"doc-en-vscode-ca9e162db86585e5262e2ff37bcce2ae3ad6e8ec9ec3f2905bd60d188e321a59","title":"","text":"if (issueType === IssueType.PerformanceIssue && this.receivedSystemInfo && this.receivedPerformanceInfo) { return true; } if (issueType === IssueType.FeatureRequest) { return true; } } return false;"} {"_id":"doc-en-vscode-d3ea95b0a167248e42bfaf5b76fa08dab32f550292237aa92976467db5103208","title":"","text":"// Store into config object URL this.configuration = { zoomLevel: data.zoomLevel, appRoot: this.environmentService.appRoot, windowId: 0, userEnv: {},"} {"_id":"doc-en-vscode-9c2478bbe270f84f36a0e3b6143da159cbb4f09678559cf412a8a32f23c08739","title":"","text":"cursor: pointer; appearance: auto; border: none; border-right: 6px solid transparent; padding-left: 10px; } .issue-reporter-body #similar-issues {"} {"_id":"doc-en-vscode-907fd50562f5c73e2ace8193bb7971556a4824c3f76cb47fefb3adb142320b34","title":"","text":"class FastLabelNode { private disposed: boolean | undefined; private _textContent: string | undefined; private _className: string | undefined; private _classNames: string[] | undefined; private _empty: boolean | undefined; constructor(private _element: HTMLElement) {"} {"_id":"doc-en-vscode-4b1169ce8f7824e3843449841e84c2d18decac2a4664f57c5b930c7f6fe2dc3f","title":"","text":"this._element.textContent = content; } set className(className: string) { if (this.disposed || className === this._className) { set classNames(classNames: string[]) { if (this.disposed || equals(classNames, this._classNames)) { return; } this._className = className; this._element.className = className; this._classNames = classNames; this._element.classList.value = ''; this._element.classList.add(...classNames); } set empty(empty: boolean) {"} {"_id":"doc-en-vscode-da550cea92d8af101037b9e8b0bbb26f73ff6beae84dfb717f944b6c9ea994a2","title":"","text":"existingIconNode.remove(); } this.domNode.className = labelClasses.join(' '); this.domNode.classNames = labelClasses; this.domNode.element.setAttribute('aria-label', ariaLabel); this.labelContainer.className = containerClasses.join(' '); this.labelContainer.classList.value = ''; this.labelContainer.classList.add(...containerClasses); this.setupHover(options?.descriptionTitle ? this.labelContainer : this.element, options?.title); this.nameNode.setLabel(label, options);"} {"_id":"doc-en-vscode-b0e9ad8f9b54c8f215ef7e4489de668b8d4527e3dd569994eb870ee58f07c6d5","title":"","text":"} function cssEscape(str: string): string { return str.replace(/[x11x12x14x15x40]/g, '/'); // HTML class names can not contain certain whitespace characters, use / instead, which doesn't exist in file names. return str.replace(/[s]/g, '/'); // HTML class names can not contain certain whitespace characters (https://dom.spec.whatwg.org/#interface-domtokenlist), use / instead, which doesn't exist in file names. }"} {"_id":"doc-en-vscode-f1005521333a5b121cb0f0aa0ea7a3d664ecab095d7d0aa2684f6968acf82a32","title":"","text":"} function escapeCSS(str: string) { str = str.replace(/[x11x12x14x15x40]/g, '/'); // HTML class names can not contain certain whitespace characters, use / instead, which doesn't exist in file names. str = str.replace(/[s]/g, '/'); // HTML class names can not contain certain whitespace characters (https://dom.spec.whatwg.org/#interface-domtokenlist), use / instead, which doesn't exist in file names. return mainWindow.CSS.escape(str); }"} {"_id":"doc-en-vscode-bf4660e437cc01051bc5a223b6dd5f20293ca6444d4bf2b39b9a1c9e15814f14","title":"","text":"return; } const snippet = await this.createUriListSnippet(uriList); const snippet = await this.createUriListSnippet(document.uri, uriList); if (!snippet || token.isCancellationRequested) { return; }"} {"_id":"doc-en-vscode-08f7e4c71937c1cf654ff8b9661a46f088d4a4722bc9ab291525d5912223469a","title":"","text":"return new UriList(uris.map(uri => ({ uri, str: uri.toString(true) }))); } private async createUriListSnippet(uriList: UriList): Promise<{ readonly snippet: vscode.SnippetString; readonly label: string } | undefined> { private async createUriListSnippet(docUri: vscode.Uri, uriList: UriList): Promise<{ readonly snippet: vscode.SnippetString; readonly label: string } | undefined> { if (!uriList.entries.length) { return; }"} {"_id":"doc-en-vscode-d237b6a180d2b41a9fc01a32d1836222502693463a2799c05a3f99136daaf290","title":"","text":"const snippet = new vscode.SnippetString(); for (let i = 0; i < uriList.entries.length; i++) { const uri = uriList.entries[i]; const relativePath = getRelativePath(uri.uri); const relativePath = getRelativePath(getDocumentDir(docUri), uri.uri); const urlText = relativePath ?? uri.str; snippet.appendText(`url(${urlText})`);"} {"_id":"doc-en-vscode-442eca0abbb0af1bf73dca96a1d863d1091de3272f76abf1e18f37cb41865f7b","title":"","text":"} } function getRelativePath(file: vscode.Uri): string | undefined { const dir = getDocumentDir(file); if (dir && dir.scheme === file.scheme && dir.authority === file.authority) { if (file.scheme === Schemes.file) { function getRelativePath(fromFile: vscode.Uri | undefined, toFile: vscode.Uri): string | undefined { if (fromFile && fromFile.scheme === toFile.scheme && fromFile.authority === toFile.authority) { if (toFile.scheme === Schemes.file) { // On windows, we must use the native `path.relative` to generate the relative path // so that drive-letters are resolved cast insensitively. However we then want to // convert back to a posix path to insert in to the document const relativePath = path.relative(dir.fsPath, file.fsPath); const relativePath = path.relative(fromFile.fsPath, toFile.fsPath); return path.posix.normalize(relativePath.split(path.sep).join(path.posix.sep)); } return path.posix.relative(dir.path, file.path); return path.posix.relative(fromFile.path, toFile.path); } return undefined;"} {"_id":"doc-en-vscode-6e5cb511d236642221f0a65d7a9f48bac8b0f4cbe5fb6e7529d5147c708aa07e","title":"","text":"\"@vscode/windows-mutex\": \"^0.5.0\", \"@vscode/windows-process-tree\": \"^0.6.0\", \"@vscode/windows-registry\": \"^1.1.0\", \"@xterm/addon-clipboard\": \"0.2.0-beta.34\", \"@xterm/addon-image\": \"0.9.0-beta.51\", \"@xterm/addon-search\": \"0.16.0-beta.51\", \"@xterm/addon-serialize\": \"0.14.0-beta.51\", \"@xterm/addon-unicode11\": \"0.9.0-beta.51\", \"@xterm/addon-webgl\": \"0.19.0-beta.51\", \"@xterm/headless\": \"5.6.0-beta.51\", \"@xterm/xterm\": \"5.6.0-beta.51\", \"@xterm/addon-clipboard\": \"0.2.0-beta.35\", \"@xterm/addon-image\": \"0.9.0-beta.52\", \"@xterm/addon-search\": \"0.16.0-beta.52\", \"@xterm/addon-serialize\": \"0.14.0-beta.52\", \"@xterm/addon-unicode11\": \"0.9.0-beta.52\", \"@xterm/addon-webgl\": \"0.19.0-beta.52\", \"@xterm/headless\": \"5.6.0-beta.52\", \"@xterm/xterm\": \"5.6.0-beta.52\", \"http-proxy-agent\": \"^7.0.0\", \"https-proxy-agent\": \"^7.0.2\", \"jschardet\": \"3.1.3\","} {"_id":"doc-en-vscode-2c1696eff76f797e22f5bae39fe256f8d0aa2323c474f62e46d5086ccd456f76","title":"","text":"\"@vscode/vscode-languagedetection\": \"1.0.21\", \"@vscode/windows-process-tree\": \"^0.6.0\", \"@vscode/windows-registry\": \"^1.1.0\", \"@xterm/addon-clipboard\": \"0.2.0-beta.34\", \"@xterm/addon-image\": \"0.9.0-beta.51\", \"@xterm/addon-search\": \"0.16.0-beta.51\", \"@xterm/addon-serialize\": \"0.14.0-beta.51\", \"@xterm/addon-unicode11\": \"0.9.0-beta.51\", \"@xterm/addon-webgl\": \"0.19.0-beta.51\", \"@xterm/headless\": \"5.6.0-beta.51\", \"@xterm/xterm\": \"5.6.0-beta.51\", \"@xterm/addon-clipboard\": \"0.2.0-beta.35\", \"@xterm/addon-image\": \"0.9.0-beta.52\", \"@xterm/addon-search\": \"0.16.0-beta.52\", \"@xterm/addon-serialize\": \"0.14.0-beta.52\", \"@xterm/addon-unicode11\": \"0.9.0-beta.52\", \"@xterm/addon-webgl\": \"0.19.0-beta.52\", \"@xterm/headless\": \"5.6.0-beta.52\", \"@xterm/xterm\": \"5.6.0-beta.52\", \"cookie\": \"^0.4.0\", \"http-proxy-agent\": \"^7.0.0\", \"https-proxy-agent\": \"^7.0.2\","} {"_id":"doc-en-vscode-0f1213fb3ac41475eaaf71c8c6fe9e84b0d8aa9a357ddf78503ed07aaaa415e8","title":"","text":"\"@vscode/iconv-lite-umd\": \"0.7.0\", \"@vscode/tree-sitter-wasm\": \"^0.0.1\", \"@vscode/vscode-languagedetection\": \"1.0.21\", \"@xterm/addon-clipboard\": \"0.2.0-beta.34\", \"@xterm/addon-image\": \"0.9.0-beta.51\", \"@xterm/addon-search\": \"0.16.0-beta.51\", \"@xterm/addon-serialize\": \"0.14.0-beta.51\", \"@xterm/addon-unicode11\": \"0.9.0-beta.51\", \"@xterm/addon-webgl\": \"0.19.0-beta.51\", \"@xterm/xterm\": \"5.6.0-beta.51\", \"@xterm/addon-clipboard\": \"0.2.0-beta.35\", \"@xterm/addon-image\": \"0.9.0-beta.52\", \"@xterm/addon-search\": \"0.16.0-beta.52\", \"@xterm/addon-serialize\": \"0.14.0-beta.52\", \"@xterm/addon-unicode11\": \"0.9.0-beta.52\", \"@xterm/addon-webgl\": \"0.19.0-beta.52\", \"@xterm/xterm\": \"5.6.0-beta.52\", \"jschardet\": \"3.1.3\", \"tas-client-umd\": \"0.2.0\", \"vscode-oniguruma\": \"1.7.0\","} {"_id":"doc-en-vscode-3e505c6608cd684a1a8391a3e6aaff69ad06ec382690b935faf2889a5b781ed2","title":"","text":"resolved \"https://registry.yarnpkg.com/@vscode/vscode-languagedetection/-/vscode-languagedetection-1.0.21.tgz#89b48f293f6aa3341bb888c1118d16ff13b032d3\" integrity sha512-zSUH9HYCw5qsCtd7b31yqkpaCU6jhtkKLkvOOA8yTrIRfBSOFb8PPhgmMicD7B/m+t4PwOJXzU1XDtrM9Fd3/g== \"@xterm/addon-clipboard@0.2.0-beta.34\": version \"0.2.0-beta.34\" resolved \"https://registry.yarnpkg.com/@xterm/addon-clipboard/-/addon-clipboard-0.2.0-beta.34.tgz#9a753601e69d3f9aad10e6d22b3a3d05be237d6a\" integrity sha512-Iduj2jGO37VkFLrRzxK5SkE7b2bAPaIvkvcSnw5JCdsvu9cjmPy7jgJkvUu54Tltzt55X+YTkQQ2GIKHqcor8A== \"@xterm/addon-clipboard@0.2.0-beta.35\": version \"0.2.0-beta.35\" resolved \"https://registry.yarnpkg.com/@xterm/addon-clipboard/-/addon-clipboard-0.2.0-beta.35.tgz#4c9b553ea63ce02a3c8075fea7df1637d52092ef\" integrity sha512-B8AulZEjsfvSEaLKp8oyRu7yJ7FJb5R3W0wpPbI/rOMVAuBwxDJsz0CxLvJUXnJX7OJwd5cjnyTnEcXJfMJycA== dependencies: js-base64 \"^3.7.5\" \"@xterm/addon-image@0.9.0-beta.51\": version \"0.9.0-beta.51\" resolved \"https://registry.yarnpkg.com/@xterm/addon-image/-/addon-image-0.9.0-beta.51.tgz#832be645ab04de3ab1af28aa37d4c3bcc72d9960\" integrity sha512-u8f0C8Kae8d8jGo2OGaxy1j4hvXOij41ZUp5fNsGL3quYufwmtVixVHUnc7WfEMVdSaSBNqfDXE+qpV4i3C3ng== \"@xterm/addon-search@0.16.0-beta.51\": version \"0.16.0-beta.51\" resolved \"https://registry.yarnpkg.com/@xterm/addon-search/-/addon-search-0.16.0-beta.51.tgz#4595c6294287a2560abe4b76f6ef2f0aafd2f05e\" integrity sha512-DhnNDP9bAd/7/9TW+0N3BUaF/6Fpv/6RiIiromlzSu+6g1VDmuWsd8JpeTxErOCoWZuEMLpVVje9ky3yj8pN9A== \"@xterm/addon-serialize@0.14.0-beta.51\": version \"0.14.0-beta.51\" resolved \"https://registry.yarnpkg.com/@xterm/addon-serialize/-/addon-serialize-0.14.0-beta.51.tgz#0c9802ba94018e94a727abc9e977a2349279468f\" integrity sha512-EjKIOuzSP+HCtk05iwHk0N3jYfsx81bKRv4pfGXKsc3rN0H6gQ+bvx/abSkndtgIjKtee2cy1H8pggMaezmzIA== \"@xterm/addon-unicode11@0.9.0-beta.51\": version \"0.9.0-beta.51\" resolved \"https://registry.yarnpkg.com/@xterm/addon-unicode11/-/addon-unicode11-0.9.0-beta.51.tgz#c2f2b1ad14b2481648ca7deaa0bf2923d987e2e6\" integrity sha512-6FmA4MOue7SDYjSLmuG8rZC2eeVZ+YjhWEXWiUAAoiZ9X11j9HMdOhWcutca3crAMc6mrHfjx6fNsUxwtELMkQ== \"@xterm/addon-webgl@0.19.0-beta.51\": version \"0.19.0-beta.51\" resolved \"https://registry.yarnpkg.com/@xterm/addon-webgl/-/addon-webgl-0.19.0-beta.51.tgz#14cb115d45c140525eb51427e236189dd800c20c\" integrity sha512-oO6yVuVA+9kNA47bT2c2IkGj9eLWvV6mEEo8wHKN7WXyYUFgw6ivAgmdrIdnKh679xbCq7th3GfcESwwQFH/sg== \"@xterm/xterm@5.6.0-beta.51\": version \"5.6.0-beta.51\" resolved \"https://registry.yarnpkg.com/@xterm/xterm/-/xterm-5.6.0-beta.51.tgz#3b9a5016d9588eb0a05226f6fc090b48a85b7698\" integrity sha512-0i9gkiP2hhCMIRk5ACM8LJXHRd1umzC27ZDHD8n14vutrQRgdW4ENvCdmrWHiVJy4Ui1t7m70zdgg72shOgcEA== \"@xterm/addon-image@0.9.0-beta.52\": version \"0.9.0-beta.52\" resolved \"https://registry.yarnpkg.com/@xterm/addon-image/-/addon-image-0.9.0-beta.52.tgz#a3115a50f884e5ba2f8ce09118a3d7e833fceb7b\" integrity sha512-1fWhnCIvLeO0aQ3CKqkTB9ye1bUsocpgFdDOgmwfW4XhLXpvu+QcyMGQMtWJHt8JWBN2w0cgR9eyfKw7orN+9Q== \"@xterm/addon-search@0.16.0-beta.52\": version \"0.16.0-beta.52\" resolved \"https://registry.yarnpkg.com/@xterm/addon-search/-/addon-search-0.16.0-beta.52.tgz#f8c77629b95ceff7d6b93d95c4b085857f405470\" integrity sha512-ZLVh0O91dcjxCjrU3vadl+40Z/mBnYXhKNA58oU/dGWFtFxtUB9SaZoOUtBvnfDpQIloYAK6raC2AfVsKHzD8A== \"@xterm/addon-serialize@0.14.0-beta.52\": version \"0.14.0-beta.52\" resolved \"https://registry.yarnpkg.com/@xterm/addon-serialize/-/addon-serialize-0.14.0-beta.52.tgz#19708cdd2895ddbd983b771ae9d14d7bc54cf7c9\" integrity sha512-1+ckKya1OURFmELH1Tjjoxz3Gnj78Dxj+NNRrEunfINkvyzaY+n8wT28FQxIlU5gJq+a0VGvlhNgTkMwgOn6aw== \"@xterm/addon-unicode11@0.9.0-beta.52\": version \"0.9.0-beta.52\" resolved \"https://registry.yarnpkg.com/@xterm/addon-unicode11/-/addon-unicode11-0.9.0-beta.52.tgz#15afdf03c20d2e46b4eca68bd461eea71c8dd37f\" integrity sha512-5tZR/8c+vf0YNSYS6B9pEv8gyWWZpPYOf/BRQDkTGtYAnFf04MzggVE/U7tKUXGDzBhzwTPODq5qPNTX1xpGgw== \"@xterm/addon-webgl@0.19.0-beta.52\": version \"0.19.0-beta.52\" resolved \"https://registry.yarnpkg.com/@xterm/addon-webgl/-/addon-webgl-0.19.0-beta.52.tgz#695b20a5fa88ff92e115624149592080fad59594\" integrity sha512-kbPO9iR166xW8qgRkYmKX2Vu0kQHXpxYLQ9jY/01e5kvNrI/rqRDV63FIq14ncOi7N3+dmTuUkjvbg8anCpuIw== \"@xterm/xterm@5.6.0-beta.52\": version \"5.6.0-beta.52\" resolved \"https://registry.yarnpkg.com/@xterm/xterm/-/xterm-5.6.0-beta.52.tgz#ed7456a8b78ea1d00431737d078b5ab0bafbcdfe\" integrity sha512-aZh8IBdZPb2N4NjTt/fQ/C90z/PM3Zxkfoqhmlsp5+v3Otmyw5kd3DepeHK1SFW/pz0/xdj4KFgX8t8Y2lDRbA== js-base64@^3.7.5: version \"3.7.7\""} {"_id":"doc-en-vscode-09571d8a7278cf8e5a8294fd9ea458cc20dc69d0344c395f893c3380da73992c","title":"","text":"resolved \"https://registry.yarnpkg.com/@vscode/windows-registry/-/windows-registry-1.1.0.tgz#03dace7c29c46f658588b9885b9580e453ad21f9\" integrity sha512-5AZzuWJpGscyiMOed0IuyEwt6iKmV5Us7zuwCDCFYMIq7tsvooO9BUiciywsvuthGz6UG4LSpeDeCxvgMVhnIw== \"@xterm/addon-clipboard@0.2.0-beta.34\": version \"0.2.0-beta.34\" resolved \"https://registry.yarnpkg.com/@xterm/addon-clipboard/-/addon-clipboard-0.2.0-beta.34.tgz#9a753601e69d3f9aad10e6d22b3a3d05be237d6a\" integrity sha512-Iduj2jGO37VkFLrRzxK5SkE7b2bAPaIvkvcSnw5JCdsvu9cjmPy7jgJkvUu54Tltzt55X+YTkQQ2GIKHqcor8A== \"@xterm/addon-clipboard@0.2.0-beta.35\": version \"0.2.0-beta.35\" resolved \"https://registry.yarnpkg.com/@xterm/addon-clipboard/-/addon-clipboard-0.2.0-beta.35.tgz#4c9b553ea63ce02a3c8075fea7df1637d52092ef\" integrity sha512-B8AulZEjsfvSEaLKp8oyRu7yJ7FJb5R3W0wpPbI/rOMVAuBwxDJsz0CxLvJUXnJX7OJwd5cjnyTnEcXJfMJycA== dependencies: js-base64 \"^3.7.5\" \"@xterm/addon-image@0.9.0-beta.51\": version \"0.9.0-beta.51\" resolved \"https://registry.yarnpkg.com/@xterm/addon-image/-/addon-image-0.9.0-beta.51.tgz#832be645ab04de3ab1af28aa37d4c3bcc72d9960\" integrity sha512-u8f0C8Kae8d8jGo2OGaxy1j4hvXOij41ZUp5fNsGL3quYufwmtVixVHUnc7WfEMVdSaSBNqfDXE+qpV4i3C3ng== \"@xterm/addon-search@0.16.0-beta.51\": version \"0.16.0-beta.51\" resolved \"https://registry.yarnpkg.com/@xterm/addon-search/-/addon-search-0.16.0-beta.51.tgz#4595c6294287a2560abe4b76f6ef2f0aafd2f05e\" integrity sha512-DhnNDP9bAd/7/9TW+0N3BUaF/6Fpv/6RiIiromlzSu+6g1VDmuWsd8JpeTxErOCoWZuEMLpVVje9ky3yj8pN9A== \"@xterm/addon-serialize@0.14.0-beta.51\": version \"0.14.0-beta.51\" resolved \"https://registry.yarnpkg.com/@xterm/addon-serialize/-/addon-serialize-0.14.0-beta.51.tgz#0c9802ba94018e94a727abc9e977a2349279468f\" integrity sha512-EjKIOuzSP+HCtk05iwHk0N3jYfsx81bKRv4pfGXKsc3rN0H6gQ+bvx/abSkndtgIjKtee2cy1H8pggMaezmzIA== \"@xterm/addon-unicode11@0.9.0-beta.51\": version \"0.9.0-beta.51\" resolved \"https://registry.yarnpkg.com/@xterm/addon-unicode11/-/addon-unicode11-0.9.0-beta.51.tgz#c2f2b1ad14b2481648ca7deaa0bf2923d987e2e6\" integrity sha512-6FmA4MOue7SDYjSLmuG8rZC2eeVZ+YjhWEXWiUAAoiZ9X11j9HMdOhWcutca3crAMc6mrHfjx6fNsUxwtELMkQ== \"@xterm/addon-webgl@0.19.0-beta.51\": version \"0.19.0-beta.51\" resolved \"https://registry.yarnpkg.com/@xterm/addon-webgl/-/addon-webgl-0.19.0-beta.51.tgz#14cb115d45c140525eb51427e236189dd800c20c\" integrity sha512-oO6yVuVA+9kNA47bT2c2IkGj9eLWvV6mEEo8wHKN7WXyYUFgw6ivAgmdrIdnKh679xbCq7th3GfcESwwQFH/sg== \"@xterm/headless@5.6.0-beta.51\": version \"5.6.0-beta.51\" resolved \"https://registry.yarnpkg.com/@xterm/headless/-/headless-5.6.0-beta.51.tgz#76ff548a88305fe476a7d3f991331c0393c0af45\" integrity sha512-ehd4L3c28mQKVEd5cMmUzR1f1XcAVbJukfR1YiD7ohjphHUxSsg6mYb5qGIh50SsQsDI6wHYuIvmNSjvNgHVOw== \"@xterm/xterm@5.6.0-beta.51\": version \"5.6.0-beta.51\" resolved \"https://registry.yarnpkg.com/@xterm/xterm/-/xterm-5.6.0-beta.51.tgz#3b9a5016d9588eb0a05226f6fc090b48a85b7698\" integrity sha512-0i9gkiP2hhCMIRk5ACM8LJXHRd1umzC27ZDHD8n14vutrQRgdW4ENvCdmrWHiVJy4Ui1t7m70zdgg72shOgcEA== \"@xterm/addon-image@0.9.0-beta.52\": version \"0.9.0-beta.52\" resolved \"https://registry.yarnpkg.com/@xterm/addon-image/-/addon-image-0.9.0-beta.52.tgz#a3115a50f884e5ba2f8ce09118a3d7e833fceb7b\" integrity sha512-1fWhnCIvLeO0aQ3CKqkTB9ye1bUsocpgFdDOgmwfW4XhLXpvu+QcyMGQMtWJHt8JWBN2w0cgR9eyfKw7orN+9Q== \"@xterm/addon-search@0.16.0-beta.52\": version \"0.16.0-beta.52\" resolved \"https://registry.yarnpkg.com/@xterm/addon-search/-/addon-search-0.16.0-beta.52.tgz#f8c77629b95ceff7d6b93d95c4b085857f405470\" integrity sha512-ZLVh0O91dcjxCjrU3vadl+40Z/mBnYXhKNA58oU/dGWFtFxtUB9SaZoOUtBvnfDpQIloYAK6raC2AfVsKHzD8A== \"@xterm/addon-serialize@0.14.0-beta.52\": version \"0.14.0-beta.52\" resolved \"https://registry.yarnpkg.com/@xterm/addon-serialize/-/addon-serialize-0.14.0-beta.52.tgz#19708cdd2895ddbd983b771ae9d14d7bc54cf7c9\" integrity sha512-1+ckKya1OURFmELH1Tjjoxz3Gnj78Dxj+NNRrEunfINkvyzaY+n8wT28FQxIlU5gJq+a0VGvlhNgTkMwgOn6aw== \"@xterm/addon-unicode11@0.9.0-beta.52\": version \"0.9.0-beta.52\" resolved \"https://registry.yarnpkg.com/@xterm/addon-unicode11/-/addon-unicode11-0.9.0-beta.52.tgz#15afdf03c20d2e46b4eca68bd461eea71c8dd37f\" integrity sha512-5tZR/8c+vf0YNSYS6B9pEv8gyWWZpPYOf/BRQDkTGtYAnFf04MzggVE/U7tKUXGDzBhzwTPODq5qPNTX1xpGgw== \"@xterm/addon-webgl@0.19.0-beta.52\": version \"0.19.0-beta.52\" resolved \"https://registry.yarnpkg.com/@xterm/addon-webgl/-/addon-webgl-0.19.0-beta.52.tgz#695b20a5fa88ff92e115624149592080fad59594\" integrity sha512-kbPO9iR166xW8qgRkYmKX2Vu0kQHXpxYLQ9jY/01e5kvNrI/rqRDV63FIq14ncOi7N3+dmTuUkjvbg8anCpuIw== \"@xterm/headless@5.6.0-beta.52\": version \"5.6.0-beta.52\" resolved \"https://registry.yarnpkg.com/@xterm/headless/-/headless-5.6.0-beta.52.tgz#7f934a7d7c5bbf88e2d78c22317cd2464bc9638a\" integrity sha512-f4QITQwotblRLW6YOHnK801wHJWfFDnjD7jUEwaaAXtSp32xH3jguWnMP9/uuQX45q9ndjDjnm1t5aXX7gwqBQ== \"@xterm/xterm@5.6.0-beta.52\": version \"5.6.0-beta.52\" resolved \"https://registry.yarnpkg.com/@xterm/xterm/-/xterm-5.6.0-beta.52.tgz#ed7456a8b78ea1d00431737d078b5ab0bafbcdfe\" integrity sha512-aZh8IBdZPb2N4NjTt/fQ/C90z/PM3Zxkfoqhmlsp5+v3Otmyw5kd3DepeHK1SFW/pz0/xdj4KFgX8t8Y2lDRbA== agent-base@^7.0.1, agent-base@^7.0.2, agent-base@^7.1.0: version \"7.1.0\""} {"_id":"doc-en-vscode-866f78083bf9333451c8209793474410b4132aa370981de78a0cc3122546f2b1","title":"","text":"resolved \"https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e\" integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== \"@xterm/addon-clipboard@0.2.0-beta.34\": version \"0.2.0-beta.34\" resolved \"https://registry.yarnpkg.com/@xterm/addon-clipboard/-/addon-clipboard-0.2.0-beta.34.tgz#9a753601e69d3f9aad10e6d22b3a3d05be237d6a\" integrity sha512-Iduj2jGO37VkFLrRzxK5SkE7b2bAPaIvkvcSnw5JCdsvu9cjmPy7jgJkvUu54Tltzt55X+YTkQQ2GIKHqcor8A== \"@xterm/addon-clipboard@0.2.0-beta.35\": version \"0.2.0-beta.35\" resolved \"https://registry.yarnpkg.com/@xterm/addon-clipboard/-/addon-clipboard-0.2.0-beta.35.tgz#4c9b553ea63ce02a3c8075fea7df1637d52092ef\" integrity sha512-B8AulZEjsfvSEaLKp8oyRu7yJ7FJb5R3W0wpPbI/rOMVAuBwxDJsz0CxLvJUXnJX7OJwd5cjnyTnEcXJfMJycA== dependencies: js-base64 \"^3.7.5\" \"@xterm/addon-image@0.9.0-beta.51\": version \"0.9.0-beta.51\" resolved \"https://registry.yarnpkg.com/@xterm/addon-image/-/addon-image-0.9.0-beta.51.tgz#832be645ab04de3ab1af28aa37d4c3bcc72d9960\" integrity sha512-u8f0C8Kae8d8jGo2OGaxy1j4hvXOij41ZUp5fNsGL3quYufwmtVixVHUnc7WfEMVdSaSBNqfDXE+qpV4i3C3ng== \"@xterm/addon-search@0.16.0-beta.51\": version \"0.16.0-beta.51\" resolved \"https://registry.yarnpkg.com/@xterm/addon-search/-/addon-search-0.16.0-beta.51.tgz#4595c6294287a2560abe4b76f6ef2f0aafd2f05e\" integrity sha512-DhnNDP9bAd/7/9TW+0N3BUaF/6Fpv/6RiIiromlzSu+6g1VDmuWsd8JpeTxErOCoWZuEMLpVVje9ky3yj8pN9A== \"@xterm/addon-serialize@0.14.0-beta.51\": version \"0.14.0-beta.51\" resolved \"https://registry.yarnpkg.com/@xterm/addon-serialize/-/addon-serialize-0.14.0-beta.51.tgz#0c9802ba94018e94a727abc9e977a2349279468f\" integrity sha512-EjKIOuzSP+HCtk05iwHk0N3jYfsx81bKRv4pfGXKsc3rN0H6gQ+bvx/abSkndtgIjKtee2cy1H8pggMaezmzIA== \"@xterm/addon-unicode11@0.9.0-beta.51\": version \"0.9.0-beta.51\" resolved \"https://registry.yarnpkg.com/@xterm/addon-unicode11/-/addon-unicode11-0.9.0-beta.51.tgz#c2f2b1ad14b2481648ca7deaa0bf2923d987e2e6\" integrity sha512-6FmA4MOue7SDYjSLmuG8rZC2eeVZ+YjhWEXWiUAAoiZ9X11j9HMdOhWcutca3crAMc6mrHfjx6fNsUxwtELMkQ== \"@xterm/addon-webgl@0.19.0-beta.51\": version \"0.19.0-beta.51\" resolved \"https://registry.yarnpkg.com/@xterm/addon-webgl/-/addon-webgl-0.19.0-beta.51.tgz#14cb115d45c140525eb51427e236189dd800c20c\" integrity sha512-oO6yVuVA+9kNA47bT2c2IkGj9eLWvV6mEEo8wHKN7WXyYUFgw6ivAgmdrIdnKh679xbCq7th3GfcESwwQFH/sg== \"@xterm/headless@5.6.0-beta.51\": version \"5.6.0-beta.51\" resolved \"https://registry.yarnpkg.com/@xterm/headless/-/headless-5.6.0-beta.51.tgz#76ff548a88305fe476a7d3f991331c0393c0af45\" integrity sha512-ehd4L3c28mQKVEd5cMmUzR1f1XcAVbJukfR1YiD7ohjphHUxSsg6mYb5qGIh50SsQsDI6wHYuIvmNSjvNgHVOw== \"@xterm/xterm@5.6.0-beta.51\": version \"5.6.0-beta.51\" resolved \"https://registry.yarnpkg.com/@xterm/xterm/-/xterm-5.6.0-beta.51.tgz#3b9a5016d9588eb0a05226f6fc090b48a85b7698\" integrity sha512-0i9gkiP2hhCMIRk5ACM8LJXHRd1umzC27ZDHD8n14vutrQRgdW4ENvCdmrWHiVJy4Ui1t7m70zdgg72shOgcEA== \"@xterm/addon-image@0.9.0-beta.52\": version \"0.9.0-beta.52\" resolved \"https://registry.yarnpkg.com/@xterm/addon-image/-/addon-image-0.9.0-beta.52.tgz#a3115a50f884e5ba2f8ce09118a3d7e833fceb7b\" integrity sha512-1fWhnCIvLeO0aQ3CKqkTB9ye1bUsocpgFdDOgmwfW4XhLXpvu+QcyMGQMtWJHt8JWBN2w0cgR9eyfKw7orN+9Q== \"@xterm/addon-search@0.16.0-beta.52\": version \"0.16.0-beta.52\" resolved \"https://registry.yarnpkg.com/@xterm/addon-search/-/addon-search-0.16.0-beta.52.tgz#f8c77629b95ceff7d6b93d95c4b085857f405470\" integrity sha512-ZLVh0O91dcjxCjrU3vadl+40Z/mBnYXhKNA58oU/dGWFtFxtUB9SaZoOUtBvnfDpQIloYAK6raC2AfVsKHzD8A== \"@xterm/addon-serialize@0.14.0-beta.52\": version \"0.14.0-beta.52\" resolved \"https://registry.yarnpkg.com/@xterm/addon-serialize/-/addon-serialize-0.14.0-beta.52.tgz#19708cdd2895ddbd983b771ae9d14d7bc54cf7c9\" integrity sha512-1+ckKya1OURFmELH1Tjjoxz3Gnj78Dxj+NNRrEunfINkvyzaY+n8wT28FQxIlU5gJq+a0VGvlhNgTkMwgOn6aw== \"@xterm/addon-unicode11@0.9.0-beta.52\": version \"0.9.0-beta.52\" resolved \"https://registry.yarnpkg.com/@xterm/addon-unicode11/-/addon-unicode11-0.9.0-beta.52.tgz#15afdf03c20d2e46b4eca68bd461eea71c8dd37f\" integrity sha512-5tZR/8c+vf0YNSYS6B9pEv8gyWWZpPYOf/BRQDkTGtYAnFf04MzggVE/U7tKUXGDzBhzwTPODq5qPNTX1xpGgw== \"@xterm/addon-webgl@0.19.0-beta.52\": version \"0.19.0-beta.52\" resolved \"https://registry.yarnpkg.com/@xterm/addon-webgl/-/addon-webgl-0.19.0-beta.52.tgz#695b20a5fa88ff92e115624149592080fad59594\" integrity sha512-kbPO9iR166xW8qgRkYmKX2Vu0kQHXpxYLQ9jY/01e5kvNrI/rqRDV63FIq14ncOi7N3+dmTuUkjvbg8anCpuIw== \"@xterm/headless@5.6.0-beta.52\": version \"5.6.0-beta.52\" resolved \"https://registry.yarnpkg.com/@xterm/headless/-/headless-5.6.0-beta.52.tgz#7f934a7d7c5bbf88e2d78c22317cd2464bc9638a\" integrity sha512-f4QITQwotblRLW6YOHnK801wHJWfFDnjD7jUEwaaAXtSp32xH3jguWnMP9/uuQX45q9ndjDjnm1t5aXX7gwqBQ== \"@xterm/xterm@5.6.0-beta.52\": version \"5.6.0-beta.52\" resolved \"https://registry.yarnpkg.com/@xterm/xterm/-/xterm-5.6.0-beta.52.tgz#ed7456a8b78ea1d00431737d078b5ab0bafbcdfe\" integrity sha512-aZh8IBdZPb2N4NjTt/fQ/C90z/PM3Zxkfoqhmlsp5+v3Otmyw5kd3DepeHK1SFW/pz0/xdj4KFgX8t8Y2lDRbA== \"@xtuc/ieee754@^1.2.0\": version \"1.2.0\""} {"_id":"doc-en-vscode-6ef6893fdce579966a25dabdcd390246c13d69258ae409d2a930154171d45459","title":"","text":"return true; } const quickPick = this._quickInputService.createQuickPick({ useSeparators: true }); const localDisposableStore = new DisposableStore(); const quickPick = localDisposableStore.add(this._quickInputService.createQuickPick({ useSeparators: true })); const quickPickItems = this._getKernelPickerQuickPickItems(notebook, matchResult, this._notebookKernelService, scopedContextKeyService); if (quickPickItems.length === 1 && supportAutoRun(quickPickItems[0]) && !skipAutoRun) { return await this._handleQuickPick(editor, quickPickItems[0], quickPickItems as KernelQuickPickItem[]); const picked = await this._handleQuickPick(editor, quickPickItems[0], quickPickItems as KernelQuickPickItem[]); localDisposableStore.dispose(); return picked; } quickPick.items = quickPickItems;"} {"_id":"doc-en-vscode-fa1caa738a977c7ce52e31164ae504192de281832f14e9c61773071390a41d4a","title":"","text":"}, this); const pick = await new Promise<{ selected: KernelQuickPickItem | undefined; items: KernelQuickPickItem[] }>((resolve, reject) => { quickPick.onDidAccept(() => { localDisposableStore.add(quickPick.onDidAccept(() => { const item = quickPick.selectedItems[0]; if (item) { resolve({ selected: item, items: quickPick.items as KernelQuickPickItem[] });"} {"_id":"doc-en-vscode-a437342dcd24bf9cd3dc22934e0de338dd114d66704d6f9ce0c2393d31f07bb0","title":"","text":"} quickPick.hide(); }); })); quickPick.onDidHide(() => { localDisposableStore.add(quickPick.onDidHide(() => { kernelDetectionTaskListener.dispose(); kernelChangeEventListener.dispose(); quickPick.dispose(); resolve({ selected: undefined, items: quickPick.items as KernelQuickPickItem[] }); }); })); quickPick.show(); }); localDisposableStore.dispose(); if (pick.selected) { return await this._handleQuickPick(editor, pick.selected, pick.items); }"} {"_id":"doc-en-vscode-d4cb44c58e35912cac994291de223d3f8bd87d6c3f5f0a72a7ac1ca1fedfe939","title":"","text":"private async displaySelectAnotherQuickPick(editor: IActiveNotebookEditor, kernelListEmpty: boolean): Promise { const notebook: NotebookTextModel = editor.textModel; const disposables = new DisposableStore(); const quickPick = this._quickInputService.createQuickPick({ useSeparators: true }); const quickPick = disposables.add(this._quickInputService.createQuickPick({ useSeparators: true })); const quickPickItem = await new Promise(resolve => { // select from kernel sources quickPick.title = kernelListEmpty ? localize('select', \"Select Kernel\") : localize('selectAnotherKernel', \"Select Another Kernel\");"} {"_id":"doc-en-vscode-961743cf7fa549550a5f41c000434e3a88a336454f58e42412f179b11b066315","title":"","text":"resolve(button); } })); quickPick.onDidTriggerItemButton(async (e) => { disposables.add(quickPick.onDidTriggerItemButton(async (e) => { if (isKernelSourceQuickPickItem(e.item) && e.item.documentation !== undefined) { const uri = URI.isUri(e.item.documentation) ? URI.parse(e.item.documentation) : await this._commandService.executeCommand(e.item.documentation); void this._openerService.open(uri, { openExternal: true }); } }); })); disposables.add(quickPick.onDidAccept(async () => { resolve(quickPick.selectedItems[0]); }));"} {"_id":"doc-en-vscode-519c47c8db3e66a0f65f79cc52cdb659e73bdf68b31a0a1733734024126e19dc","title":"","text":"private async _selectOneKernel(notebook: NotebookTextModel, source: string, kernels: INotebookKernel[]) { const quickPickItems: QuickPickInput[] = kernels.map(kernel => toKernelQuickPick(kernel, undefined)); const quickPick = this._quickInputService.createQuickPick({ useSeparators: true }); const localDisposableStore = new DisposableStore(); const quickPick = localDisposableStore.add(this._quickInputService.createQuickPick({ useSeparators: true })); quickPick.items = quickPickItems; quickPick.canSelectMany = false; quickPick.title = localize('selectKernelFromExtension', \"Select Kernel from {0}\", source); quickPick.onDidAccept(async () => { localDisposableStore.add(quickPick.onDidAccept(async () => { if (quickPick.selectedItems && quickPick.selectedItems.length > 0 && isKernelPick(quickPick.selectedItems[0])) { await this._selecteKernel(notebook, quickPick.selectedItems[0].kernel); } quickPick.hide(); quickPick.dispose(); }); })); quickPick.onDidHide(() => { quickPick.dispose(); }); localDisposableStore.add(quickPick.onDidHide(() => { localDisposableStore.dispose(); })); quickPick.show(); }"} {"_id":"doc-en-vscode-d883236c854a08cd22f1772bd64f8817fb87fc13b2957967ff6f668c24a915c4","title":"","text":"async getExtensions(extensionInfos: ReadonlyArray, arg1: any, arg2?: any): Promise { const options = CancellationToken.isCancellationToken(arg1) ? {} : arg1 as IExtensionQueryOptions; const token = CancellationToken.isCancellationToken(arg1) ? arg1 : arg2 as CancellationToken; const result = await this.doGetExtensions(extensionInfos, options, token); const uuids = result.map(r => r.identifier.uuid); const extensionInfosByName: IExtensionInfo[] = []; for (const e of extensionInfos) { if (e.uuid && !uuids.includes(e.uuid)) { extensionInfosByName.push({ ...e, uuid: undefined }); } } if (extensionInfosByName.length) { // report telemetry data for additional query this.telemetryService.publicLog2< { count: number }, { owner: 'sandy081'; comment: 'Report the query to the the Marketplace for fetching extensions by name'; readonly count: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Number of extensions to fetch' }; }>('galleryService:additionalQueryByName', { count: extensionInfosByName.length }); const extensions = await this.doGetExtensions(extensionInfosByName, options, token); result.push(...extensions); } return result; } private async doGetExtensions(extensionInfos: ReadonlyArray, options: IExtensionQueryOptions, token: CancellationToken): Promise { const names: string[] = []; const ids: string[] = [], includePreReleases: (IExtensionIdentifier & { includePreRelease: boolean })[] = [], versions: (IExtensionIdentifier & { version: string })[] = []; let isQueryForReleaseVersionFromPreReleaseVersion = true; for (const extensionInfo of extensionInfos) {"} {"_id":"doc-en-vscode-dcc3bf59763205bafde4daf9b48d15dca7c729f45f3f3f251f7ef8517dded18c","title":"","text":"if (walkthroughID) { const selectedCategory = typeof walkthroughID === 'string' ? walkthroughID : walkthroughID.category; const selectedStep = typeof walkthroughID === 'string' ? undefined : walkthroughID.category + '#' + walkthroughID.step; let selectedStep: string | undefined; if (typeof walkthroughID === 'object' && 'category' in walkthroughID && 'step' in walkthroughID) { selectedStep = `${walkthroughID.category}#${walkthroughID.step}`; } else { selectedStep = undefined; } // We're trying to open the welcome page from the Help menu if (!selectedCategory && !selectedStep) {"} {"_id":"doc-en-vscode-3440b2ad3113589a4760eb5299e62310dea316e5c9f6df0b1757daecf9d16d3d","title":"","text":"// Try first to select the walkthrough on an active welcome page with no selected walkthrough for (const group of editorGroupsService.groups) { if (group.activeEditor instanceof GettingStartedInput) { const activeEditor = group.activeEditor as GettingStartedInput; activeEditor.showWelcome = false; (group.activeEditorPane as GettingStartedPage).makeCategoryVisibleWhenAvailable(selectedCategory, selectedStep); return; }"} {"_id":"doc-en-vscode-52374902f6d52fe26785b811773c6e8193e1afe6d96bc7a098c9c206f22d7aa7","title":"","text":"if (!editor.selectedCategory && group) { editor.selectedCategory = selectedCategory; editor.selectedStep = selectedStep; editor.showWelcome = false; group.openEditor(editor, { revealIfOpened: true }); return; }"} {"_id":"doc-en-vscode-a7d2fcb57f99ba6e205b18073507895f3d824f85bb581e1cadabbfc78614de18","title":"","text":"const activeEditor = editorService.activeEditor; // If the walkthrough is already open just reveal the step if (selectedStep && activeEditor instanceof GettingStartedInput && activeEditor.selectedCategory === selectedCategory) { activeEditor.showWelcome = false; commandService.executeCommand('walkthroughs.selectStep', selectedStep); return; }"} {"_id":"doc-en-vscode-6396a8ffe8b0a7517f44701cf3bfea9540772fdc44ce0661b6cead899f22121f","title":"","text":"const activeGroup = editorGroupsService.activeGroup; activeGroup.replaceEditors([{ editor: activeEditor, replacement: instantiationService.createInstance(GettingStartedInput, { selectedCategory: selectedCategory, selectedStep: selectedStep }) replacement: instantiationService.createInstance(GettingStartedInput, { selectedCategory: selectedCategory, selectedStep: selectedStep, showWelcome: false }) }]); } else { // else open respecting toSide const options: GettingStartedEditorOptions = { selectedCategory: selectedCategory, selectedStep: selectedStep, preserveFocus: toSide ?? false }; const options: GettingStartedEditorOptions = { selectedCategory: selectedCategory, selectedStep: selectedStep, showWelcome: false, preserveFocus: toSide ?? false }; editorService.openEditor({ resource: GettingStartedInput.RESOURCE, options"} {"_id":"doc-en-vscode-132efea9f9cf721d44fa1705f20d5167eca65897d8389d1e6dd5bbb513d12cbc","title":"","text":"} else { slideManager.classList.add('showDetails'); slideManager.classList.remove('showCategories'); this.container.querySelector('.prev-button.button-link')!.style.display = 'block'; const showGoBackButton = this.editorInput.showWelcome || this.prevWalkthrough; this.container.querySelector('.prev-button.button-link')!.style.display = showGoBackButton ? 'block' : 'none'; this.container.querySelector('.gettingStartedSlideDetails')!.querySelectorAll('button').forEach(button => button.disabled = false); this.container.querySelector('.gettingStartedSlideCategories')!.querySelectorAll('button').forEach(button => button.disabled = true); this.container.querySelector('.gettingStartedSlideCategories')!.querySelectorAll('input').forEach(button => button.disabled = true);"} {"_id":"doc-en-vscode-01743ee8643bbcc60b2d7b2c699dbe518bb68a70fd1a3de1b859f7b04cdd7216","title":"","text":"export const gettingStartedInputTypeId = 'workbench.editors.gettingStartedInput'; export interface GettingStartedEditorOptions extends IEditorOptions { selectedCategory?: string; selectedStep?: string; showTelemetryNotice?: boolean; selectedCategory?: string; selectedStep?: string; showTelemetryNotice?: boolean; showWelcome?: boolean; } export class GettingStartedInput extends EditorInput {"} {"_id":"doc-en-vscode-b2ca6846979baedaa071fd1b698d1de9ee5bcbc6fb81ec37851121c977fec3c2","title":"","text":"this.selectedCategory = options.selectedCategory; this.selectedStep = options.selectedStep; this.showTelemetryNotice = !!options.showTelemetryNotice; this.showWelcome = options.showWelcome ?? true; } override getName() {"} {"_id":"doc-en-vscode-a18d68da22c5fa2db3c16adc0a131af76f872686ec46b0634ada2971a542e59f","title":"","text":"selectedCategory: string | undefined; selectedStep: string | undefined; showTelemetryNotice: boolean; showWelcome: boolean; }"} {"_id":"doc-en-vscode-bf62afeef3739c546b22d83ebbe37a94602186cbd0c9669d08bd0078c25b8570","title":"","text":"let result: IInsetRenderOutput | undefined = undefined; const [mimeTypes, pick] = this.output.resolveMimeTypes(this._notebookTextModel, undefined); const pickedMimeTypeRenderer = mimeTypes[pick]; const pickedMimeTypeRenderer = this.output.pickedMimeType || mimeTypes[pick]; if (mimeTypes.length > 1) { outputItemDiv.style.position = 'relative'; const mimeTypePicker = DOM.$('.multi-mimetype-output');"} {"_id":"doc-en-vscode-75099090b4b1bba2db6611b0983990d834c0df011141160550b1ecd41294a8d1","title":"","text":"} const parsedInclude = include ? parseSearchExcludeInclude(GlobPattern.from(include)) : undefined; const excludePatterns = include ? globsToISearchPatternBuilder(options.exclude) : undefined; const excludePatterns = globsToISearchPatternBuilder(options.exclude); return { options: {"} {"_id":"doc-en-vscode-5159fa3db4a3afa1f3fc5ba424d8b73929b3314786e53fbefa97342a8aabb852","title":"","text":"{ \"name\": \"code-oss-dev\", \"version\": \"1.94.0\", \"distro\": \"2560b0e8d341a0b6734d28ef71b08e1920ff2501\", \"distro\": \"3617bc772b253b9c3ffd60d2e7165c4d945ac7c7\", \"author\": { \"name\": \"Microsoft Corporation\" },"} {"_id":"doc-en-vscode-8e5bba53f1cf29b07cd4b76274b1128bbea7f085027443f4afafa488beb0c705","title":"","text":"// Running out of sources if (Object.keys(product).length === 0) { Object.assign(product, { version: '1.91.0-dev', version: '1.94.0-dev', nameShort: 'Code - OSS Dev', nameLong: 'Code - OSS Dev', applicationName: 'code-oss',"} {"_id":"doc-en-vscode-49f4af8c4c6fb0f48cc8f91c3f9a95118036d8e73011acd0c5568972793e1ac6","title":"","text":"(emergencyAlert.platform && emergencyAlert.platform !== platform) ||\t// platform mismatch (emergencyAlert.arch && emergencyAlert.arch !== arch)\t\t\t\t\t// arch mismatch ) { return; // skip versions we are not on return; } this.bannerService.show({"} {"_id":"doc-en-vscode-eec32142e62e8738475c2582e5ed71569b4e8a923bdb6f9708732d789a3154c8","title":"","text":".monaco-inputbox > .ibwrapper { position: relative; width: 100%; height: 100%; } .monaco-inputbox > .ibwrapper > .input {"} {"_id":"doc-en-vscode-448ee9bee01939b2c22bd0a2295297156ea1939285ff6b68f295dc0a11ed1358","title":"","text":"this._register(editContextAddDisposableListener(this._editContext, 'textupdate', (e) => { const compositionRangeWithinEditor = this._compositionRangeWithinEditor; if (compositionRangeWithinEditor) { const position = this._context.viewModel.getPrimaryCursorState().viewState.position; const position = this._context.viewModel.getPrimaryCursorState().modelState.position; const newCompositionRangeWithinEditor = Range.fromPositions(compositionRangeWithinEditor.getStartPosition(), position); this._compositionRangeWithinEditor = newCompositionRangeWithinEditor; }"} {"_id":"doc-en-vscode-08ba372cdc4aeb94e8670f4676d26c84c070a32e894276ba98c972664290f6fd","title":"","text":"this._screenReaderSupport.writeScreenReaderContent(); })); this._register(editContextAddDisposableListener(this._editContext, 'compositionstart', (e) => { const position = this._context.viewModel.getPrimaryCursorState().viewState.position; const position = this._context.viewModel.getPrimaryCursorState().modelState.position; const newCompositionRange = Range.fromPositions(position, position); this._compositionRangeWithinEditor = newCompositionRange; // Utlimately fires onDidCompositionStart() on the editor to notify for example suggest model of composition state"} {"_id":"doc-en-vscode-65ee2f98e8f977a194433efb043601fdf2f9e99c4721632949ca7e790c611555","title":"","text":"if (i === this._primarySelection.endLineNumber) { selectionEndOffset += this._primarySelection.endColumn - 1; } else { selectionEndOffset += this._context.viewModel.getLineMaxColumn(i); selectionEndOffset += this._context.viewModel.model.getLineMaxColumn(i); } } const endColumnOfEndLineNumber = this._context.viewModel.getLineMaxColumn(this._primarySelection.endLineNumber); const endColumnOfEndLineNumber = this._context.viewModel.model.getLineMaxColumn(this._primarySelection.endLineNumber); const rangeOfText = new Range(this._primarySelection.startLineNumber, 1, this._primarySelection.endLineNumber, endColumnOfEndLineNumber); const text = this._context.viewModel.getValueInRange(rangeOfText, EndOfLinePreference.TextDefined); const text = this._context.viewModel.model.getValueInRange(rangeOfText, EndOfLinePreference.TextDefined); const textStartPositionWithinEditor = rangeOfText.getStartPosition(); return { text,"} {"_id":"doc-en-vscode-e7ab68f2682b4f7dc96b015b627824da8e50b56010e1a8c71b2a1e923b7c9154","title":"","text":"this.textModelService.createModelReference(CellUri.generateCellPropertyUri(this.cell.originalDocument.uri, this.cell.original.handle, Schemas.vscodeNotebookCellMetadata)), this.textModelService.createModelReference(CellUri.generateCellPropertyUri(this.cell.modifiedDocument.uri, this.cell.modified.handle, Schemas.vscodeNotebookCellMetadata)) ]); if (this._isDisposed) { originalMetadataModel.dispose(); modifiedMetadataModel.dispose(); return; } this._metadataEditorDisposeStore.add(originalMetadataModel); this._metadataEditorDisposeStore.add(modifiedMetadataModel); const vm = this._metadataEditor.createViewModel({ original: originalMetadataModel.object.textEditorModel, modified: modifiedMetadataModel.object.textEditorModel }); this._metadataEditor.setModel(vm); // Reduces flicker (compute this before setting the model) // Else when the model is set, the height of the editor will be x, after diff is computed, then height will be y. // & that results in flicker. await vm.waitForDiff(); this._metadataEditor.setModel(vm); if (this._isDisposed) { return; } this.cell.metadataHeight = this._metadataEditor.getContentHeight();"} {"_id":"doc-en-vscode-b916cde8d283f12bb47a90fd9783a9d1c6a247552ef7c3aaa727237b8f167915","title":"","text":"import { ILanguageService } from '../../../../editor/common/languages/language.js'; import { tokenizeToString } from '../../../../editor/common/languages/textToHtmlTokenizer.js'; import { IExtensionService } from '../../../services/extensions/common/extensions.js'; import { markedGfmHeadingIdPlugin } from './markedGfmHeadingIdPlugin.js'; export const DEFAULT_MARKDOWN_STYLES = ` body {"} {"_id":"doc-en-vscode-be73955bbe57c888689f07500d22fa46e4d18714e7c778c2557a2c46c933318d","title":"","text":"return tokenizeToString(languageService, code, languageId); } }), MarkedGfmHeadings.gfmHeadingId(), markedGfmHeadingIdPlugin(), ...(options?.markedExtensions ?? []), );"} {"_id":"doc-en-vscode-e41d495935a85478e6b4ab75d91f12814086c8ef54f09dc0a9141eb64dd52725","title":"","text":"return html; } } namespace MarkedGfmHeadings { // Copied from https://github.com/Flet/github-slugger since we can't use esm yet. // eslint-disable-next-line no-control-regex, no-misleading-character-class const githubSlugReplaceRegex = /[0-x1F!-,./:-@[-^`{-xA9xAB-xB4xB6-xB9xBB-xBFxD7xF7u02C2-u02C5u02D2-u02DFu02E5-u02EBu02EDu02EF-u02FFu0375u0378u0379u037Eu0380-u0385u0387u038Bu038Du03A2u03F6u0482u0530u0557u0558u055A-u055Fu0589-u0590u05BEu05C0u05C3u05C6u05C8-u05CFu05EB-u05EEu05F3-u060Fu061B-u061Fu066A-u066Du06D4u06DDu06DEu06E9u06FDu06FEu0700-u070Fu074Bu074Cu07B2-u07BFu07F6-u07F9u07FBu07FCu07FEu07FFu082E-u083Fu085C-u085Fu086B-u089Fu08B5u08C8-u08D2u08E2u0964u0965u0970u0984u098Du098Eu0991u0992u09A9u09B1u09B3-u09B5u09BAu09BBu09C5u09C6u09C9u09CAu09CF-u09D6u09D8-u09DBu09DEu09E4u09E5u09F2-u09FBu09FDu09FFu0A00u0A04u0A0B-u0A0Eu0A11u0A12u0A29u0A31u0A34u0A37u0A3Au0A3Bu0A3Du0A43-u0A46u0A49u0A4Au0A4E-u0A50u0A52-u0A58u0A5Du0A5F-u0A65u0A76-u0A80u0A84u0A8Eu0A92u0AA9u0AB1u0AB4u0ABAu0ABBu0AC6u0ACAu0ACEu0ACFu0AD1-u0ADFu0AE4u0AE5u0AF0-u0AF8u0B00u0B04u0B0Du0B0Eu0B11u0B12u0B29u0B31u0B34u0B3Au0B3Bu0B45u0B46u0B49u0B4Au0B4E-u0B54u0B58-u0B5Bu0B5Eu0B64u0B65u0B70u0B72-u0B81u0B84u0B8B-u0B8Du0B91u0B96-u0B98u0B9Bu0B9Du0BA0-u0BA2u0BA5-u0BA7u0BAB-u0BADu0BBA-u0BBDu0BC3-u0BC5u0BC9u0BCEu0BCFu0BD1-u0BD6u0BD8-u0BE5u0BF0-u0BFFu0C0Du0C11u0C29u0C3A-u0C3Cu0C45u0C49u0C4E-u0C54u0C57u0C5B-u0C5Fu0C64u0C65u0C70-u0C7Fu0C84u0C8Du0C91u0CA9u0CB4u0CBAu0CBBu0CC5u0CC9u0CCE-u0CD4u0CD7-u0CDDu0CDFu0CE4u0CE5u0CF0u0CF3-u0CFFu0D0Du0D11u0D45u0D49u0D4F-u0D53u0D58-u0D5Eu0D64u0D65u0D70-u0D79u0D80u0D84u0D97-u0D99u0DB2u0DBCu0DBEu0DBFu0DC7-u0DC9u0DCB-u0DCEu0DD5u0DD7u0DE0-u0DE5u0DF0u0DF1u0DF4-u0E00u0E3B-u0E3Fu0E4Fu0E5A-u0E80u0E83u0E85u0E8Bu0EA4u0EA6u0EBEu0EBFu0EC5u0EC7u0ECEu0ECFu0EDAu0EDBu0EE0-u0EFFu0F01-u0F17u0F1A-u0F1Fu0F2A-u0F34u0F36u0F38u0F3A-u0F3Du0F48u0F6D-u0F70u0F85u0F98u0FBD-u0FC5u0FC7-u0FFFu104A-u104Fu109Eu109Fu10C6u10C8-u10CCu10CEu10CFu10FBu1249u124Eu124Fu1257u1259u125Eu125Fu1289u128Eu128Fu12B1u12B6u12B7u12BFu12C1u12C6u12C7u12D7u1311u1316u1317u135Bu135Cu1360-u137Fu1390-u139Fu13F6u13F7u13FE-u1400u166Du166Eu1680u169B-u169Fu16EB-u16EDu16F9-u16FFu170Du1715-u171Fu1735-u173Fu1754-u175Fu176Du1771u1774-u177Fu17D4-u17D6u17D8-u17DBu17DEu17DFu17EA-u180Au180Eu180Fu181A-u181Fu1879-u187Fu18AB-u18AFu18F6-u18FFu191Fu192C-u192Fu193C-u1945u196Eu196Fu1975-u197Fu19AC-u19AFu19CA-u19CFu19DA-u19FFu1A1C-u1A1Fu1A5Fu1A7Du1A7Eu1A8A-u1A8Fu1A9A-u1AA6u1AA8-u1AAFu1AC1-u1AFFu1B4C-u1B4Fu1B5A-u1B6Au1B74-u1B7Fu1BF4-u1BFFu1C38-u1C3Fu1C4A-u1C4Cu1C7Eu1C7Fu1C89-u1C8Fu1CBBu1CBCu1CC0-u1CCFu1CD3u1CFB-u1CFFu1DFAu1F16u1F17u1F1Eu1F1Fu1F46u1F47u1F4Eu1F4Fu1F58u1F5Au1F5Cu1F5Eu1F7Eu1F7Fu1FB5u1FBDu1FBF-u1FC1u1FC5u1FCD-u1FCFu1FD4u1FD5u1FDC-u1FDFu1FED-u1FF1u1FF5u1FFD-u203Eu2041-u2053u2055-u2070u2072-u207Eu2080-u208Fu209D-u20CFu20F1-u2101u2103-u2106u2108u2109u2114u2116-u2118u211E-u2123u2125u2127u2129u212Eu213Au213Bu2140-u2144u214A-u214Du214F-u215Fu2189-u24B5u24EA-u2BFFu2C2Fu2C5Fu2CE5-u2CEAu2CF4-u2CFFu2D26u2D28-u2D2Cu2D2Eu2D2Fu2D68-u2D6Eu2D70-u2D7Eu2D97-u2D9Fu2DA7u2DAFu2DB7u2DBFu2DC7u2DCFu2DD7u2DDFu2E00-u2E2Eu2E30-u3004u3008-u3020u3030u3036u3037u303D-u3040u3097u3098u309Bu309Cu30A0u30FBu3100-u3104u3130u318F-u319Fu31C0-u31EFu3200-u33FFu4DC0-u4DFFu9FFD-u9FFFuA48D-uA4CFuA4FEuA4FFuA60D-uA60FuA62C-uA63FuA673uA67EuA6F2-uA716uA720uA721uA789uA78AuA7C0uA7C1uA7CB-uA7F4uA828-uA82BuA82D-uA83FuA874-uA87FuA8C6-uA8CFuA8DA-uA8DFuA8F8-uA8FAuA8FCuA92EuA92FuA954-uA95FuA97D-uA97FuA9C1-uA9CEuA9DA-uA9DFuA9FFuAA37-uAA3FuAA4EuAA4FuAA5A-uAA5FuAA77-uAA79uAAC3-uAADAuAADEuAADFuAAF0uAAF1uAAF7-uAB00uAB07uAB08uAB0FuAB10uAB17-uAB1FuAB27uAB2FuAB5BuAB6A-uAB6FuABEBuABEEuABEFuABFA-uABFFuD7A4-uD7AFuD7C7-uD7CAuD7FC-uD7FFuE000-uF8FFuFA6EuFA6FuFADA-uFAFFuFB07-uFB12uFB18-uFB1CuFB29uFB37uFB3DuFB3FuFB42uFB45uFBB2-uFBD2uFD3E-uFD4FuFD90uFD91uFDC8-uFDEFuFDFC-uFDFFuFE10-uFE1FuFE30-uFE32uFE35-uFE4CuFE50-uFE6FuFE75uFEFD-uFF0FuFF1A-uFF20uFF3B-uFF3EuFF40uFF5B-uFF65uFFBF-uFFC1uFFC8uFFC9uFFD0uFFD1uFFD8uFFD9uFFDD-uFFFF]|uD800[uDC0CuDC27uDC3BuDC3EuDC4EuDC4FuDC5E-uDC7FuDCFB-uDD3FuDD75-uDDFCuDDFE-uDE7FuDE9D-uDE9FuDED1-uDEDFuDEE1-uDEFFuDF20-uDF2CuDF4B-uDF4FuDF7B-uDF7FuDF9EuDF9FuDFC4-uDFC7uDFD0uDFD6-uDFFF]|uD801[uDC9EuDC9FuDCAA-uDCAFuDCD4-uDCD7uDCFC-uDCFFuDD28-uDD2FuDD64-uDDFFuDF37-uDF3FuDF56-uDF5FuDF68-uDFFF]|uD802[uDC06uDC07uDC09uDC36uDC39-uDC3BuDC3DuDC3EuDC56-uDC5FuDC77-uDC7FuDC9F-uDCDFuDCF3uDCF6-uDCFFuDD16-uDD1FuDD3A-uDD7FuDDB8-uDDBDuDDC0-uDDFFuDE04uDE07-uDE0BuDE14uDE18uDE36uDE37uDE3B-uDE3EuDE40-uDE5FuDE7D-uDE7FuDE9D-uDEBFuDEC8uDEE7-uDEFFuDF36-uDF3FuDF56-uDF5FuDF73-uDF7FuDF92-uDFFF]|uD803[uDC49-uDC7FuDCB3-uDCBFuDCF3-uDCFFuDD28-uDD2FuDD3A-uDE7FuDEAAuDEAD-uDEAFuDEB2-uDEFFuDF1D-uDF26uDF28-uDF2FuDF51-uDFAFuDFC5-uDFDFuDFF7-uDFFF]|uD804[uDC47-uDC65uDC70-uDC7EuDCBB-uDCCFuDCE9-uDCEFuDCFA-uDCFFuDD35uDD40-uDD43uDD48-uDD4FuDD74uDD75uDD77-uDD7FuDDC5-uDDC8uDDCDuDDDBuDDDD-uDDFFuDE12uDE38-uDE3DuDE3F-uDE7FuDE87uDE89uDE8EuDE9EuDEA9-uDEAFuDEEB-uDEEFuDEFA-uDEFFuDF04uDF0DuDF0EuDF11uDF12uDF29uDF31uDF34uDF3AuDF45uDF46uDF49uDF4AuDF4EuDF4FuDF51-uDF56uDF58-uDF5CuDF64uDF65uDF6D-uDF6FuDF75-uDFFF]|uD805[uDC4B-uDC4FuDC5A-uDC5DuDC62-uDC7FuDCC6uDCC8-uDCCFuDCDA-uDD7FuDDB6uDDB7uDDC1-uDDD7uDDDE-uDDFFuDE41-uDE43uDE45-uDE4FuDE5A-uDE7FuDEB9-uDEBFuDECA-uDEFFuDF1BuDF1CuDF2C-uDF2FuDF3A-uDFFF]|uD806[uDC3B-uDC9FuDCEA-uDCFEuDD07uDD08uDD0AuDD0BuDD14uDD17uDD36uDD39uDD3AuDD44-uDD4FuDD5A-uDD9FuDDA8uDDA9uDDD8uDDD9uDDE2uDDE5-uDDFFuDE3F-uDE46uDE48-uDE4FuDE9A-uDE9CuDE9E-uDEBFuDEF9-uDFFF]|uD807[uDC09uDC37uDC41-uDC4FuDC5A-uDC71uDC90uDC91uDCA8uDCB7-uDCFFuDD07uDD0AuDD37-uDD39uDD3BuDD3EuDD48-uDD4FuDD5A-uDD5FuDD66uDD69uDD8FuDD92uDD99-uDD9FuDDAA-uDEDFuDEF7-uDFAFuDFB1-uDFFF]|uD808[uDF9A-uDFFF]|uD809[uDC6F-uDC7FuDD44-uDFFF]|[uD80AuD80BuD80E-uD810uD812-uD819uD824-uD82BuD82DuD82EuD830-uD833uD837uD839uD83DuD83FuD87B-uD87DuD87FuD885-uDB3FuDB41-uDBFF][uDC00-uDFFF]|uD80D[uDC2F-uDFFF]|uD811[uDE47-uDFFF]|uD81A[uDE39-uDE3FuDE5FuDE6A-uDECFuDEEEuDEEFuDEF5-uDEFFuDF37-uDF3FuDF44-uDF4FuDF5A-uDF62uDF78-uDF7CuDF90-uDFFF]|uD81B[uDC00-uDE3FuDE80-uDEFFuDF4B-uDF4EuDF88-uDF8EuDFA0-uDFDFuDFE2uDFE5-uDFEFuDFF2-uDFFF]|uD821[uDFF8-uDFFF]|uD823[uDCD6-uDCFFuDD09-uDFFF]|uD82C[uDD1F-uDD4FuDD53-uDD63uDD68-uDD6FuDEFC-uDFFF]|uD82F[uDC6B-uDC6FuDC7D-uDC7FuDC89-uDC8FuDC9A-uDC9CuDC9F-uDFFF]|uD834[uDC00-uDD64uDD6A-uDD6CuDD73-uDD7AuDD83uDD84uDD8C-uDDA9uDDAE-uDE41uDE45-uDFFF]|uD835[uDC55uDC9DuDCA0uDCA1uDCA3uDCA4uDCA7uDCA8uDCADuDCBAuDCBCuDCC4uDD06uDD0BuDD0CuDD15uDD1DuDD3AuDD3FuDD45uDD47-uDD49uDD51uDEA6uDEA7uDEC1uDEDBuDEFBuDF15uDF35uDF4FuDF6FuDF89uDFA9uDFC3uDFCCuDFCD]|uD836[uDC00-uDDFFuDE37-uDE3AuDE6D-uDE74uDE76-uDE83uDE85-uDE9AuDEA0uDEB0-uDFFF]|uD838[uDC07uDC19uDC1AuDC22uDC25uDC2B-uDCFFuDD2D-uDD2FuDD3EuDD3FuDD4A-uDD4DuDD4F-uDEBFuDEFA-uDFFF]|uD83A[uDCC5-uDCCFuDCD7-uDCFFuDD4C-uDD4FuDD5A-uDFFF]|uD83B[uDC00-uDDFFuDE04uDE20uDE23uDE25uDE26uDE28uDE33uDE38uDE3AuDE3C-uDE41uDE43-uDE46uDE48uDE4AuDE4CuDE50uDE53uDE55uDE56uDE58uDE5AuDE5CuDE5EuDE60uDE63uDE65uDE66uDE6BuDE73uDE78uDE7DuDE7FuDE8AuDE9C-uDEA0uDEA4uDEAAuDEBC-uDFFF]|uD83C[uDC00-uDD2FuDD4A-uDD4FuDD6A-uDD6FuDD8A-uDFFF]|uD83E[uDC00-uDFEFuDFFA-uDFFF]|uD869[uDEDE-uDEFF]|uD86D[uDF35-uDF3F]|uD86E[uDC1EuDC1F]|uD873[uDEA2-uDEAF]|uD87A[uDFE1-uDFFF]|uD87E[uDE1E-uDFFF]|uD884[uDF4B-uDFFF]|uDB40[uDC00-uDCFFuDDF0-uDFFF]/g; function slugify(heading: string): string { const slugifiedHeading = heading.trim() .toLowerCase() .replace(githubSlugReplaceRegex, '') .replace(/s/g, '-'); // Replace whitespace with - return slugifiedHeading; } // Copied from https://github.com/markedjs/marked-gfm-heading-id/blob/main/src/index.js // Removed logic for handling duplicate header ids for now // unescape from marked helpers const unescapeTest = /&(#(?:d+)|(?:#x[0-9A-Fa-f]+)|(?:w+));?/ig; function unescape(html: string) { // explicitly match decimal, hex, and named HTML entities return html.replace(unescapeTest, (_, n) => { n = n.toLowerCase(); if (n === 'colon') { return ':'; } if (n.charAt(0) === '#') { return n.charAt(1) === 'x' ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1)); } return ''; }); } export function gfmHeadingId({ prefix = '', globalSlugs = false } = {}): marked.MarkedExtension { return { // hooks: { // \tpreprocess(src: string) { // \t\tif (!globalSlugs) { // \t\t\tresetHeadings(); // \t\t} // \t\treturn src; // \t}, // }, renderer: { heading({ tokens, depth }) { const text = this.parser.parseInline(tokens); const raw = unescape(this.parser.parseInline(tokens, this.parser.textRenderer)) .trim() .replace(/<[!/a-z].*?>/gi, ''); const level = depth; const id = `${prefix}${slugify(raw)}`; // const heading = { level, text, id, raw }; // headings.push(heading); return `${text}n`; }, }, }; } } "} {"_id":"doc-en-vscode-d1d54a3c4df5b5046ca45b69d1a14f480020e2cb4e724fdb73678fd102e4e808","title":"","text":"* Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as nls from '../../../../nls.js'; import { IPreferencesService, ISetting } from '../../../services/preferences/common/preferences.js'; import { settingKeyToDisplayFormat } from '../../preferences/browser/settingsTreeModels.js'; import { ActionViewItem } from '../../../../base/browser/ui/actionbar/actionViewItems.js'; import { IAction } from '../../../../base/common/actions.js'; import type { Tokens } from '../../../../base/common/marked/marked.js'; import { Schemas } from '../../../../base/common/network.js'; import { URI } from '../../../../base/common/uri.js'; import * as nls from '../../../../nls.js'; import { IClipboardService } from '../../../../platform/clipboard/common/clipboardService.js'; import { ConfigurationTarget, IConfigurationService } from '../../../../platform/configuration/common/configuration.js'; import { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js'; import { ActionViewItem } from '../../../../base/browser/ui/actionbar/actionViewItems.js'; import { IAction } from '../../../../base/common/actions.js'; import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js'; import { IClipboardService } from '../../../../platform/clipboard/common/clipboardService.js'; import { Schemas } from '../../../../base/common/network.js'; import { Tokens } from '../../../../base/common/marked/marked.js'; import { IPreferencesService, ISetting } from '../../../services/preferences/common/preferences.js'; import { settingKeyToDisplayFormat } from '../../preferences/browser/settingsTreeModels.js'; export class SimpleSettingRenderer { private readonly codeSettingRegex: RegExp;"} {"_id":"doc-en-vscode-036a717461e574d1cc47f141962459cb4187c58676196f39184ad786730b3fc2","title":"","text":" /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as marked from '../../../../base/common/marked/marked.js'; // Copied from https://github.com/Flet/github-slugger since we can't use esm yet. // eslint-disable-next-line no-control-regex, no-misleading-character-class const githubSlugReplaceRegex = /[0-x1F!-,./:-@[-^`{-xA9xAB-xB4xB6-xB9xBB-xBFxD7xF7u02C2-u02C5u02D2-u02DFu02E5-u02EBu02EDu02EF-u02FFu0375u0378u0379u037Eu0380-u0385u0387u038Bu038Du03A2u03F6u0482u0530u0557u0558u055A-u055Fu0589-u0590u05BEu05C0u05C3u05C6u05C8-u05CFu05EB-u05EEu05F3-u060Fu061B-u061Fu066A-u066Du06D4u06DDu06DEu06E9u06FDu06FEu0700-u070Fu074Bu074Cu07B2-u07BFu07F6-u07F9u07FBu07FCu07FEu07FFu082E-u083Fu085C-u085Fu086B-u089Fu08B5u08C8-u08D2u08E2u0964u0965u0970u0984u098Du098Eu0991u0992u09A9u09B1u09B3-u09B5u09BAu09BBu09C5u09C6u09C9u09CAu09CF-u09D6u09D8-u09DBu09DEu09E4u09E5u09F2-u09FBu09FDu09FFu0A00u0A04u0A0B-u0A0Eu0A11u0A12u0A29u0A31u0A34u0A37u0A3Au0A3Bu0A3Du0A43-u0A46u0A49u0A4Au0A4E-u0A50u0A52-u0A58u0A5Du0A5F-u0A65u0A76-u0A80u0A84u0A8Eu0A92u0AA9u0AB1u0AB4u0ABAu0ABBu0AC6u0ACAu0ACEu0ACFu0AD1-u0ADFu0AE4u0AE5u0AF0-u0AF8u0B00u0B04u0B0Du0B0Eu0B11u0B12u0B29u0B31u0B34u0B3Au0B3Bu0B45u0B46u0B49u0B4Au0B4E-u0B54u0B58-u0B5Bu0B5Eu0B64u0B65u0B70u0B72-u0B81u0B84u0B8B-u0B8Du0B91u0B96-u0B98u0B9Bu0B9Du0BA0-u0BA2u0BA5-u0BA7u0BAB-u0BADu0BBA-u0BBDu0BC3-u0BC5u0BC9u0BCEu0BCFu0BD1-u0BD6u0BD8-u0BE5u0BF0-u0BFFu0C0Du0C11u0C29u0C3A-u0C3Cu0C45u0C49u0C4E-u0C54u0C57u0C5B-u0C5Fu0C64u0C65u0C70-u0C7Fu0C84u0C8Du0C91u0CA9u0CB4u0CBAu0CBBu0CC5u0CC9u0CCE-u0CD4u0CD7-u0CDDu0CDFu0CE4u0CE5u0CF0u0CF3-u0CFFu0D0Du0D11u0D45u0D49u0D4F-u0D53u0D58-u0D5Eu0D64u0D65u0D70-u0D79u0D80u0D84u0D97-u0D99u0DB2u0DBCu0DBEu0DBFu0DC7-u0DC9u0DCB-u0DCEu0DD5u0DD7u0DE0-u0DE5u0DF0u0DF1u0DF4-u0E00u0E3B-u0E3Fu0E4Fu0E5A-u0E80u0E83u0E85u0E8Bu0EA4u0EA6u0EBEu0EBFu0EC5u0EC7u0ECEu0ECFu0EDAu0EDBu0EE0-u0EFFu0F01-u0F17u0F1A-u0F1Fu0F2A-u0F34u0F36u0F38u0F3A-u0F3Du0F48u0F6D-u0F70u0F85u0F98u0FBD-u0FC5u0FC7-u0FFFu104A-u104Fu109Eu109Fu10C6u10C8-u10CCu10CEu10CFu10FBu1249u124Eu124Fu1257u1259u125Eu125Fu1289u128Eu128Fu12B1u12B6u12B7u12BFu12C1u12C6u12C7u12D7u1311u1316u1317u135Bu135Cu1360-u137Fu1390-u139Fu13F6u13F7u13FE-u1400u166Du166Eu1680u169B-u169Fu16EB-u16EDu16F9-u16FFu170Du1715-u171Fu1735-u173Fu1754-u175Fu176Du1771u1774-u177Fu17D4-u17D6u17D8-u17DBu17DEu17DFu17EA-u180Au180Eu180Fu181A-u181Fu1879-u187Fu18AB-u18AFu18F6-u18FFu191Fu192C-u192Fu193C-u1945u196Eu196Fu1975-u197Fu19AC-u19AFu19CA-u19CFu19DA-u19FFu1A1C-u1A1Fu1A5Fu1A7Du1A7Eu1A8A-u1A8Fu1A9A-u1AA6u1AA8-u1AAFu1AC1-u1AFFu1B4C-u1B4Fu1B5A-u1B6Au1B74-u1B7Fu1BF4-u1BFFu1C38-u1C3Fu1C4A-u1C4Cu1C7Eu1C7Fu1C89-u1C8Fu1CBBu1CBCu1CC0-u1CCFu1CD3u1CFB-u1CFFu1DFAu1F16u1F17u1F1Eu1F1Fu1F46u1F47u1F4Eu1F4Fu1F58u1F5Au1F5Cu1F5Eu1F7Eu1F7Fu1FB5u1FBDu1FBF-u1FC1u1FC5u1FCD-u1FCFu1FD4u1FD5u1FDC-u1FDFu1FED-u1FF1u1FF5u1FFD-u203Eu2041-u2053u2055-u2070u2072-u207Eu2080-u208Fu209D-u20CFu20F1-u2101u2103-u2106u2108u2109u2114u2116-u2118u211E-u2123u2125u2127u2129u212Eu213Au213Bu2140-u2144u214A-u214Du214F-u215Fu2189-u24B5u24EA-u2BFFu2C2Fu2C5Fu2CE5-u2CEAu2CF4-u2CFFu2D26u2D28-u2D2Cu2D2Eu2D2Fu2D68-u2D6Eu2D70-u2D7Eu2D97-u2D9Fu2DA7u2DAFu2DB7u2DBFu2DC7u2DCFu2DD7u2DDFu2E00-u2E2Eu2E30-u3004u3008-u3020u3030u3036u3037u303D-u3040u3097u3098u309Bu309Cu30A0u30FBu3100-u3104u3130u318F-u319Fu31C0-u31EFu3200-u33FFu4DC0-u4DFFu9FFD-u9FFFuA48D-uA4CFuA4FEuA4FFuA60D-uA60FuA62C-uA63FuA673uA67EuA6F2-uA716uA720uA721uA789uA78AuA7C0uA7C1uA7CB-uA7F4uA828-uA82BuA82D-uA83FuA874-uA87FuA8C6-uA8CFuA8DA-uA8DFuA8F8-uA8FAuA8FCuA92EuA92FuA954-uA95FuA97D-uA97FuA9C1-uA9CEuA9DA-uA9DFuA9FFuAA37-uAA3FuAA4EuAA4FuAA5A-uAA5FuAA77-uAA79uAAC3-uAADAuAADEuAADFuAAF0uAAF1uAAF7-uAB00uAB07uAB08uAB0FuAB10uAB17-uAB1FuAB27uAB2FuAB5BuAB6A-uAB6FuABEBuABEEuABEFuABFA-uABFFuD7A4-uD7AFuD7C7-uD7CAuD7FC-uD7FFuE000-uF8FFuFA6EuFA6FuFADA-uFAFFuFB07-uFB12uFB18-uFB1CuFB29uFB37uFB3DuFB3FuFB42uFB45uFBB2-uFBD2uFD3E-uFD4FuFD90uFD91uFDC8-uFDEFuFDFC-uFDFFuFE10-uFE1FuFE30-uFE32uFE35-uFE4CuFE50-uFE6FuFE75uFEFD-uFF0FuFF1A-uFF20uFF3B-uFF3EuFF40uFF5B-uFF65uFFBF-uFFC1uFFC8uFFC9uFFD0uFFD1uFFD8uFFD9uFFDD-uFFFF]|uD800[uDC0CuDC27uDC3BuDC3EuDC4EuDC4FuDC5E-uDC7FuDCFB-uDD3FuDD75-uDDFCuDDFE-uDE7FuDE9D-uDE9FuDED1-uDEDFuDEE1-uDEFFuDF20-uDF2CuDF4B-uDF4FuDF7B-uDF7FuDF9EuDF9FuDFC4-uDFC7uDFD0uDFD6-uDFFF]|uD801[uDC9EuDC9FuDCAA-uDCAFuDCD4-uDCD7uDCFC-uDCFFuDD28-uDD2FuDD64-uDDFFuDF37-uDF3FuDF56-uDF5FuDF68-uDFFF]|uD802[uDC06uDC07uDC09uDC36uDC39-uDC3BuDC3DuDC3EuDC56-uDC5FuDC77-uDC7FuDC9F-uDCDFuDCF3uDCF6-uDCFFuDD16-uDD1FuDD3A-uDD7FuDDB8-uDDBDuDDC0-uDDFFuDE04uDE07-uDE0BuDE14uDE18uDE36uDE37uDE3B-uDE3EuDE40-uDE5FuDE7D-uDE7FuDE9D-uDEBFuDEC8uDEE7-uDEFFuDF36-uDF3FuDF56-uDF5FuDF73-uDF7FuDF92-uDFFF]|uD803[uDC49-uDC7FuDCB3-uDCBFuDCF3-uDCFFuDD28-uDD2FuDD3A-uDE7FuDEAAuDEAD-uDEAFuDEB2-uDEFFuDF1D-uDF26uDF28-uDF2FuDF51-uDFAFuDFC5-uDFDFuDFF7-uDFFF]|uD804[uDC47-uDC65uDC70-uDC7EuDCBB-uDCCFuDCE9-uDCEFuDCFA-uDCFFuDD35uDD40-uDD43uDD48-uDD4FuDD74uDD75uDD77-uDD7FuDDC5-uDDC8uDDCDuDDDBuDDDD-uDDFFuDE12uDE38-uDE3DuDE3F-uDE7FuDE87uDE89uDE8EuDE9EuDEA9-uDEAFuDEEB-uDEEFuDEFA-uDEFFuDF04uDF0DuDF0EuDF11uDF12uDF29uDF31uDF34uDF3AuDF45uDF46uDF49uDF4AuDF4EuDF4FuDF51-uDF56uDF58-uDF5CuDF64uDF65uDF6D-uDF6FuDF75-uDFFF]|uD805[uDC4B-uDC4FuDC5A-uDC5DuDC62-uDC7FuDCC6uDCC8-uDCCFuDCDA-uDD7FuDDB6uDDB7uDDC1-uDDD7uDDDE-uDDFFuDE41-uDE43uDE45-uDE4FuDE5A-uDE7FuDEB9-uDEBFuDECA-uDEFFuDF1BuDF1CuDF2C-uDF2FuDF3A-uDFFF]|uD806[uDC3B-uDC9FuDCEA-uDCFEuDD07uDD08uDD0AuDD0BuDD14uDD17uDD36uDD39uDD3AuDD44-uDD4FuDD5A-uDD9FuDDA8uDDA9uDDD8uDDD9uDDE2uDDE5-uDDFFuDE3F-uDE46uDE48-uDE4FuDE9A-uDE9CuDE9E-uDEBFuDEF9-uDFFF]|uD807[uDC09uDC37uDC41-uDC4FuDC5A-uDC71uDC90uDC91uDCA8uDCB7-uDCFFuDD07uDD0AuDD37-uDD39uDD3BuDD3EuDD48-uDD4FuDD5A-uDD5FuDD66uDD69uDD8FuDD92uDD99-uDD9FuDDAA-uDEDFuDEF7-uDFAFuDFB1-uDFFF]|uD808[uDF9A-uDFFF]|uD809[uDC6F-uDC7FuDD44-uDFFF]|[uD80AuD80BuD80E-uD810uD812-uD819uD824-uD82BuD82DuD82EuD830-uD833uD837uD839uD83DuD83FuD87B-uD87DuD87FuD885-uDB3FuDB41-uDBFF][uDC00-uDFFF]|uD80D[uDC2F-uDFFF]|uD811[uDE47-uDFFF]|uD81A[uDE39-uDE3FuDE5FuDE6A-uDECFuDEEEuDEEFuDEF5-uDEFFuDF37-uDF3FuDF44-uDF4FuDF5A-uDF62uDF78-uDF7CuDF90-uDFFF]|uD81B[uDC00-uDE3FuDE80-uDEFFuDF4B-uDF4EuDF88-uDF8EuDFA0-uDFDFuDFE2uDFE5-uDFEFuDFF2-uDFFF]|uD821[uDFF8-uDFFF]|uD823[uDCD6-uDCFFuDD09-uDFFF]|uD82C[uDD1F-uDD4FuDD53-uDD63uDD68-uDD6FuDEFC-uDFFF]|uD82F[uDC6B-uDC6FuDC7D-uDC7FuDC89-uDC8FuDC9A-uDC9CuDC9F-uDFFF]|uD834[uDC00-uDD64uDD6A-uDD6CuDD73-uDD7AuDD83uDD84uDD8C-uDDA9uDDAE-uDE41uDE45-uDFFF]|uD835[uDC55uDC9DuDCA0uDCA1uDCA3uDCA4uDCA7uDCA8uDCADuDCBAuDCBCuDCC4uDD06uDD0BuDD0CuDD15uDD1DuDD3AuDD3FuDD45uDD47-uDD49uDD51uDEA6uDEA7uDEC1uDEDBuDEFBuDF15uDF35uDF4FuDF6FuDF89uDFA9uDFC3uDFCCuDFCD]|uD836[uDC00-uDDFFuDE37-uDE3AuDE6D-uDE74uDE76-uDE83uDE85-uDE9AuDEA0uDEB0-uDFFF]|uD838[uDC07uDC19uDC1AuDC22uDC25uDC2B-uDCFFuDD2D-uDD2FuDD3EuDD3FuDD4A-uDD4DuDD4F-uDEBFuDEFA-uDFFF]|uD83A[uDCC5-uDCCFuDCD7-uDCFFuDD4C-uDD4FuDD5A-uDFFF]|uD83B[uDC00-uDDFFuDE04uDE20uDE23uDE25uDE26uDE28uDE33uDE38uDE3AuDE3C-uDE41uDE43-uDE46uDE48uDE4AuDE4CuDE50uDE53uDE55uDE56uDE58uDE5AuDE5CuDE5EuDE60uDE63uDE65uDE66uDE6BuDE73uDE78uDE7DuDE7FuDE8AuDE9C-uDEA0uDEA4uDEAAuDEBC-uDFFF]|uD83C[uDC00-uDD2FuDD4A-uDD4FuDD6A-uDD6FuDD8A-uDFFF]|uD83E[uDC00-uDFEFuDFFA-uDFFF]|uD869[uDEDE-uDEFF]|uD86D[uDF35-uDF3F]|uD86E[uDC1EuDC1F]|uD873[uDEA2-uDEAF]|uD87A[uDFE1-uDFFF]|uD87E[uDE1E-uDFFF]|uD884[uDF4B-uDFFF]|uDB40[uDC00-uDCFFuDDF0-uDFFF]/g; function slugify(heading: string): string { const slugifiedHeading = heading.trim() .toLowerCase() .replace(githubSlugReplaceRegex, '') .replace(/s/g, '-'); // Replace whitespace with - return slugifiedHeading; } // Copied from https://github.com/markedjs/marked-gfm-heading-id/blob/main/src/index.js // Removed logic for handling duplicate header ids for now // unescape from marked helpers const unescapeTest = /&(#(?:d+)|(?:#x[0-9A-Fa-f]+)|(?:w+));?/ig; function unescape(html: string) { // explicitly match decimal, hex, and named HTML entities return html.replace(unescapeTest, (_, n) => { n = n.toLowerCase(); if (n === 'colon') { return ':'; } if (n.charAt(0) === '#') { return n.charAt(1) === 'x' ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1)); } return ''; }); } export function markedGfmHeadingIdPlugin({ prefix = '', globalSlugs = false } = {}): marked.MarkedExtension { return { // hooks: { // \tpreprocess(src: string) { // \t\tif (!globalSlugs) { // \t\t\tresetHeadings(); // \t\t} // \t\treturn src; // \t}, // }, renderer: { heading({ tokens, depth }) { const text = this.parser.parseInline(tokens); const raw = unescape(this.parser.parseInline(tokens, this.parser.textRenderer)) .trim() .replace(/<[!/a-z].*?>/gi, ''); const level = depth; const id = `${prefix}${slugify(raw)}`; // const heading = { level, text, id, raw }; // headings.push(heading); return `${text}n`; }, }, }; } "} {"_id":"doc-en-vscode-2bca6fb342995698fc56fe56120592461e310c735ddd9619862b5f11faee9d1d","title":"","text":"* Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { EditorInput } from '../../../common/editor/editorInput.js'; import { EditorModel } from '../../../common/editor/editorModel.js'; import { URI } from '../../../../base/common/uri.js'; import { Dimension } from '../../../../base/browser/dom.js'; import { DisposableStore, IReference } from '../../../../base/common/lifecycle.js'; import { ITextEditorModel, ITextModelService } from '../../../../editor/common/services/resolverService.js'; import { marked, Tokens } from '../../../../base/common/marked/marked.js'; import * as marked from '../../../../base/common/marked/marked.js'; import { Schemas } from '../../../../base/common/network.js'; import { isEqual } from '../../../../base/common/resources.js'; import { moduleToContent } from '../common/walkThroughContentProvider.js'; import { Dimension } from '../../../../base/browser/dom.js'; import { EditorInputCapabilities, IUntypedEditorInput } from '../../../common/editor.js'; import { URI } from '../../../../base/common/uri.js'; import { ITextEditorModel, ITextModelService } from '../../../../editor/common/services/resolverService.js'; import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js'; import { Schemas } from '../../../../base/common/network.js'; import { EditorInputCapabilities, IUntypedEditorInput } from '../../../common/editor.js'; import { EditorInput } from '../../../common/editor/editorInput.js'; import { EditorModel } from '../../../common/editor/editorModel.js'; import { markedGfmHeadingIdPlugin } from '../../markdown/browser/markedGfmHeadingIdPlugin.js'; import { moduleToContent } from '../common/walkThroughContentProvider.js'; class WalkThroughModel extends EditorModel {"} {"_id":"doc-en-vscode-6191f936a3a92581608827afa5f6bde4774e8d6df8d64fbaae21179a815fa6a7","title":"","text":"const snippets: Promise>[] = []; let i = 0; const renderer = new marked.Renderer(); renderer.code = ({ lang }: Tokens.Code) => { const renderer = new marked.marked.Renderer(); renderer.code = ({ lang }: marked.Tokens.Code) => { i++; const resource = this.options.resource.with({ scheme: Schemas.walkThroughSnippet, fragment: `${i}.${lang}` }); snippets.push(this.textModelResolverService.createModelReference(resource)); return `
`; }; content = marked(content, { async: false, renderer }); const m = new marked.Marked({ renderer }, markedGfmHeadingIdPlugin()); content = m.parse(content, { async: false }); return Promise.all(snippets) .then(refs => new WalkThroughModel(content, refs)); });"} {"_id":"doc-en-vscode-31df3765f37dcfba80c60aff3659b631119951ba1afcd01172437de8323137ce","title":"","text":"/** * Sanitizes the given `value` and reset the given `node` with it. */ export function safeInnerHtml(node: HTMLElement, value: string): void { export function safeInnerHtml(node: HTMLElement, value: string, extraDomPurifyConfig?: dompurify.Config): void { const hook = hookDomPurifyHrefAndSrcSanitizer(defaultSafeProtocols); try { const html = dompurify.sanitize(value, defaultDomPurifyConfig); const html = dompurify.sanitize(value, { ...defaultDomPurifyConfig, ...extraDomPurifyConfig }); node.innerHTML = html as unknown as string; } finally { hook.dispose();"} {"_id":"doc-en-vscode-1508ae898a7cc4592630d726fd7c5c8c2914cd53ac28ac9db436d2f49bd3d496","title":"","text":"readonly token?: CancellationToken; } /*marked.* /** * Renders a string of markdown as a document. * * Uses VS Code's syntax highlighting code blocks."} {"_id":"doc-en-vscode-65db4ab410361e17d9c0a91de4efba1a8910a963e85ee419e526a56aa3ca014d","title":"","text":"const isServerless = platform.isWeb && !accessor.get(IWorkbenchEnvironmentService).remoteAuthority; return ` ## Interactive Editor Playground The core editor in VS Code is packed with features. This page highlights a number of them and lets you interactively try them out through the use of a number of embedded editors. For full details on the editor features for VS Code and more head over to our [documentation](command:workbench.action.openDocumentationUrl). The core editor in VS Code is packed with features. This page highlights a number of them and lets you interactively try them out through the use of a number of embedded editors. For full details on the editor features for VS Code and more head over to our [documentation](https://code.visualstudio.com/docs). * [Multi-cursor Editing](#multi-cursor-editing) - block selection, select all occurrences, add additional cursors and more. * [IntelliSense](#intellisense) - get code assistance and parameter suggestions for your code and external modules."} {"_id":"doc-en-vscode-8033abe2e6eb320d8af233b98cb6b390f0d405b38e0d6860fb07164c715bb4be","title":"","text":"const content = model.main; if (!input.resource.path.endsWith('.md')) { safeInnerHtml(this.content, content); safeInnerHtml(this.content, content, { ALLOW_UNKNOWN_PROTOCOLS: true }); this.updateSizeClasses(); this.decorateContent();"} {"_id":"doc-en-vscode-1ba114a0e53e71573e0416e91c56b7e6f60aa90372fb5dd4e480f41ea8df89da","title":"","text":"const innerContent = document.createElement('div'); innerContent.classList.add('walkThroughContent'); // only for markdown files const markdown = this.expandMacros(content); safeInnerHtml(innerContent, markdown); safeInnerHtml(innerContent, markdown, { ALLOW_UNKNOWN_PROTOCOLS: true }); this.content.appendChild(innerContent); model.snippets.forEach((snippet, i) => {"} {"_id":"doc-en-vscode-6eb5ef0fd47da41f43ddef1e5f0811c1cdc7dadcf1876361e6af4c9bc3d1d277","title":"","text":"import { ServicesAccessor } from '../../../../editor/browser/editorExtensions.js'; import { Schemas } from '../../../../base/common/network.js'; import { ITextEditorOptions } from '../../../../platform/editor/common/editor.js'; import { IUserDataProfileService } from '../../userDataProfile/common/userDataProfile.js'; import { coalesce } from '../../../../base/common/arrays.js'; import { mainWindow, isAuxiliaryWindow } from '../../../../base/browser/window.js'; import { isIOS, isMacintosh } from '../../../../base/common/platform.js';"} {"_id":"doc-en-vscode-b6482e44fca749ceea5bdb106f2387e816cba7bb51b08352ef9872e0b6e1d1bc","title":"","text":"@ILogService private readonly logService: ILogService, @IDialogService private readonly dialogService: IDialogService, @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, @IUserDataProfileService private readonly userDataProfileService: IUserDataProfileService, @IUserDataProfilesService private readonly userDataProfilesService: IUserDataProfilesService, ) { super();"} {"_id":"doc-en-vscode-5e5fa3de9367016e456b2d4b4b0deaf69b62e75208aed64091d428ba10bd8f69","title":"","text":"} } const newWindowProfile = (options?.forceProfile const newWindowProfile = options?.forceProfile ? this.userDataProfilesService.profiles.find(profile => profile.name === options?.forceProfile) : undefined) ?? this.userDataProfileService.currentProfile; if (!newWindowProfile.isDefault) { : undefined; if (newWindowProfile && !newWindowProfile.isDefault) { newPayload.push(['profile', newWindowProfile.name]); }"} {"_id":"doc-en-vscode-47c3faa22f538faabc9e3dd0552633185093dfbf4defbe73af118aa1fbb57af8","title":"","text":"type VoiceChatSessionContext = 'view' | 'inline' | 'terminal' | 'quick' | 'editor'; const VoiceChatSessionContexts: VoiceChatSessionContext[] = ['view', 'inline', 'terminal', 'quick', 'editor']; const TerminalChatExecute = MenuId.for('terminalChatInput'); // unfortunately, terminal decided to go with their own menu (https://github.com/microsoft/vscode/issues/208789) // Global Context Keys (set on global context key service) const CanVoiceChat = ContextKeyExpr.and(CONTEXT_CHAT_ENABLED, HasSpeechProvider); const FocusInChatInput = ContextKeyExpr.or(CTX_INLINE_CHAT_FOCUSED, CONTEXT_IN_CHAT_INPUT);"} {"_id":"doc-en-vscode-986f909118f5f2156810cf1ccbc4e7557c9466d4f6b8818d0dc7f431140e0a11","title":"","text":"), group: 'navigation', order: -1 }, { id: TerminalChatExecute, when: ContextKeyExpr.and( HasSpeechProvider, ScopedChatSynthesisInProgress.negate(),\t// hide when text to speech is in progress AnyScopedVoiceChatInProgress?.negate(),\t// hide when voice chat is in progress ), group: 'navigation', order: -1 }] }); }"} {"_id":"doc-en-vscode-f89ce059d27c18e0d728adf15357a8fccf66f9987ff6696a592bc256566a2017","title":"","text":"when: AnyScopedVoiceChatInProgress, group: 'navigation', order: -1 }, { id: TerminalChatExecute, when: AnyScopedVoiceChatInProgress, group: 'navigation', order: -1 }] }); }"} {"_id":"doc-en-vscode-3e6408b504ac240db4c166d26c6374d93e1d23cf5f6874069882cc85e690ba6e","title":"","text":"group: 'navigation', order: -1 }, { id: TerminalChatExecute, when: ScopedChatSynthesisInProgress, group: 'navigation', order: -1 } ] }); }"} {"_id":"doc-en-vscode-5ea1f1f1552661e362d8d8d2ac56f1e022378d8cb2412a469ee9259e682ddb52","title":"","text":"when: HasSpeechProvider.negate(), group: 'navigation', order: -1 }, { id: TerminalChatExecute, when: HasSpeechProvider.negate(), group: 'navigation', order: -1 }] }); }"} {"_id":"doc-en-vscode-b6e167f991decc06a6cab847b368b25113ab5d9488ebf36ee75d2cbc6e517c0f","title":"","text":"import { IConfigurationService } from '../../../../../platform/configuration/common/configuration.js'; import { IContextKeyService } from '../../../../../platform/contextkey/common/contextkey.js'; import { IListService, IWorkbenchListOptions, WorkbenchList } from '../../../../../platform/list/browser/listService.js'; import { CursorAtBoundary, ICellViewModel, CellEditState, CellFocusMode, ICellOutputViewModel, CellRevealType, CellRevealRangeType, CursorAtLineBoundary, INotebookViewZoneChangeAccessor } from '../notebookBrowser.js'; import { CursorAtBoundary, ICellViewModel, CellEditState, ICellOutputViewModel, CellRevealType, CellRevealRangeType, CursorAtLineBoundary, INotebookViewZoneChangeAccessor } from '../notebookBrowser.js'; import { CellViewModel, NotebookViewModel } from '../viewModel/notebookViewModelImpl.js'; import { diff, NOTEBOOK_EDITOR_CURSOR_BOUNDARY, CellKind, SelectionStateType, NOTEBOOK_EDITOR_CURSOR_LINE_BOUNDARY } from '../../common/notebookCommon.js'; import { ICellRange, cellRangesToIndexes, reduceCellRanges, cellRangesEqual } from '../../common/notebookRange.js';"} {"_id":"doc-en-vscode-128b0885b5b67e42797417a6babb03f273cc01f4e2d637c7323d266711813b30","title":"","text":"notebookEditorCursorAtBoundaryContext.set('none'); })); this._localDisposableStore.add(this.view.onMouseDblClick(() => { const focus = this.getFocusedElements()[0]; if (focus && focus.cellKind === CellKind.Markup && !focus.isInputCollapsed && !this._viewModel?.options.isReadOnly) { // scroll the cell into view if out of viewport const focusedCellIndex = this._getViewIndexUpperBound(focus); if (focusedCellIndex >= 0) { this._revealInViewWithMinimalScrolling(focusedCellIndex); } focus.updateEditState(CellEditState.Editing, 'dbclick'); focus.focusMode = CellFocusMode.Editor; } })); // update visibleRanges const updateVisibleRanges = () => { if (!this.view.length) {"}