{"_id":"doc-en-vscode-50f7c8ea31b468e72b8b792f523e21b94c2ae35191afcb84c9afe7b2dde9e46d","title":"","text":"enableBreakpointsFor?: { languageIds: string[] }; configurationAttributes?: any; initialConfigurations?: any[]; aiKey?: string; win?: IRawEnvAdapter; winx86?: IRawEnvAdapter; windows?: IRawEnvAdapter;"} {"_id":"doc-en-vscode-c409c3170095f67df060bc037a12f96595441d27b19082bb932bcd8b9b10be12","title":"","text":"import { TPromise } from 'vs/base/common/winjs.base'; import editor = require('vs/editor/common/editorCommon'); import aria = require('vs/base/browser/ui/aria/aria'); import { AIAdapter } from 'vs/base/node/aiAdapter'; import editorbrowser = require('vs/editor/browser/editorBrowser'); import { IKeybindingService, IKeybindingContextKey } from 'vs/platform/keybinding/common/keybindingService'; import {IMarkerService} from 'vs/platform/markers/common/markers';"} {"_id":"doc-en-vscode-34166a986d76ea1b0d1e65ab5e8d0f10cb0cc5ae283371d2b67cde892d781e38","title":"","text":"private viewModel: viewmodel.ViewModel; private configurationManager: ConfigurationManager; private debugStringEditorInputs: DebugStringEditorInput[]; private telemetryAdapter: AIAdapter; private lastTaskEvent: TaskEvent; private toDispose: lifecycle.IDisposable[]; private inDebugMode: IKeybindingContextKey;"} {"_id":"doc-en-vscode-4c685dc3fe9aa74d3589f73d1f6ba803c907770fd6be58998b9725907b2a31ae","title":"","text":"this.toDispose.push(this.session.addListener2(debug.SessionEvents.OUTPUT, (event: DebugProtocol.OutputEvent) => { if (event.body && event.body.category === 'telemetry') { this.telemetryService.publicLog(event.body.output, event.body.data); const key = this.configurationManager.getAdapter().aiKey; // only log telemetry events from debug adapter if the adapter provided the telemetry key if (key) { if (!this.telemetryAdapter) { this.telemetryAdapter = new AIAdapter(key, this.session.getType()); } this.telemetryAdapter.log(event.body.output, event.body.data); } } else if (event.body && typeof event.body.output === 'string' && event.body.output.length > 0) { this.onOutput(event); }"} {"_id":"doc-en-vscode-0f687f89139185cb13b5786c135121baca7c9c8bdc29c6f388efaf9ea1876883","title":"","text":"}); this.model.updateBreakpoints(data); if (this.telemetryAdapter) { this.telemetryAdapter.dispose(); this.telemetryAdapter = null; } this.inDebugMode.reset(); }"} {"_id":"doc-en-vscode-129e83f64f19f4973c1405b639b1ae8c58eba015c0c82f24a77add076e07bb0b","title":"","text":"private configurationAttributes: any; public initialConfigurations: any[]; public enableBreakpointsFor: { languageIds: string[] }; public aiKey: string; constructor(rawAdapter: debug.IRawAdapter, systemVariables: SystemVariables, extensionFolderPath: string) { if (rawAdapter.windows) {"} {"_id":"doc-en-vscode-d0d840071caf9f56c2595f047f5a3b3da5ef045e570a22cdc8190fc491d5fd91","title":"","text":"this.initialConfigurations = rawAdapter.initialConfigurations; this._label = rawAdapter.label; this.enableBreakpointsFor = rawAdapter.enableBreakpointsFor; this.aiKey = rawAdapter.aiKey; } public get label() {"} {"_id":"doc-en-vscode-1ee20a6b959f948608b88620570b76379af1c73c995e51760fba0c49d4a0d2a5","title":"","text":"// Trim whitespaces path = strings.trim(strings.trim(path, ' '), 't'); // Remove trailing dots path = strings.rtrim(path, '.'); return path; }"} {"_id":"doc-en-vscode-c7bd72889b19c4d8156b23a64d2038822422cf3403aa481f2fbbedebca814101","title":"","text":".monaco-editor .detected-link, .monaco-editor .detected-link-active { text-decoration: underline; text-underline-position: under; } .monaco-editor .detected-link-active {"} {"_id":"doc-en-vscode-95b39fd06de823aa14bd3b338bcc40ef579eb7d16ff25b8e22a11393a33fd081","title":"","text":"\"type\": \"boolean\", \"description\": \"%config.enableSmartCommit%\", \"default\": false }, \"git.enableCommitSigning\": { \"type\": \"boolean\", \"description\": \"%config.enableCommitSigning%\", \"default\": false } } }"} {"_id":"doc-en-vscode-0f64457f48abe431df9ff0629b048c80627c0b6e0287784d65982e87a01d189d","title":"","text":"\"config.ignoreLegacyWarning\": \"Ignores the legacy Git warning\", \"config.ignoreLimitWarning\": \"Ignores the warning when there are too many changes in a repository\", \"config.defaultCloneDirectory\": \"The default location where to clone a git repository\", \"config.enableSmartCommit\": \"Commit all changes when there are no staged changes.\" \"config.enableSmartCommit\": \"Commit all changes when there are no staged changes.\", \"config.enableCommitSigning\": \"Enables commit signing with GPG.\" } No newline at end of file"} {"_id":"doc-en-vscode-073bac355700a299eb7fd6a73de450c7aec8ef9c995328223b3b5f3a2ebea923","title":"","text":"): Promise { const config = workspace.getConfiguration('git'); const enableSmartCommit = config.get('enableSmartCommit') === true; const enableCommitSigning = config.get('enableCommitSigning') === true; const noStagedChanges = this.model.indexGroup.resources.length === 0; const noUnstagedChanges = this.model.workingTreeGroup.resources.length === 0;"} {"_id":"doc-en-vscode-51cd954e7002b4ec1d4f7ef4eb78d04eb881960e3edf674f2cdaf5ce87d7757c","title":"","text":"opts = { all: noStagedChanges }; } // enable signing of commits if configurated opts.signCommit = enableCommitSigning; if ( // no changes (noStagedChanges && noUnstagedChanges)"} {"_id":"doc-en-vscode-4adb30b17faada10df0fa96e25f50f0a712e51b3207da76202e59065594a03c0","title":"","text":"} } async commit(message: string, opts: { all?: boolean, amend?: boolean, signoff?: boolean } = Object.create(null)): Promise { async commit(message: string, opts: { all?: boolean, amend?: boolean, signoff?: boolean, signCommit?: boolean } = Object.create(null)): Promise { const args = ['commit', '--quiet', '--allow-empty-message', '--file', '-']; if (opts.all) {"} {"_id":"doc-en-vscode-88ac536184d03a6791dc5cf815828ca51711bf9a2c9cc5ac12aab7412e69de43","title":"","text":"args.push('--signoff'); } if (opts.signCommit) { args.push('-S'); } try { await this.run(args, { input: message || '' }); } catch (commitErr) {"} {"_id":"doc-en-vscode-0b05d4ed04cbe72bc3922ec427d38a2d18ba3d7152d97c0a233556450ebb84e1","title":"","text":"all?: boolean; amend?: boolean; signoff?: boolean; signCommit?: boolean; } export class Model implements Disposable {"} {"_id":"doc-en-vscode-8a4d188eafa4345410c82db981119c50323157e22ca6540d6a6779cb8089a0fc","title":"","text":"return function () { var desktop = gulp.src('resources/linux/code.desktop', { base: '.' }) .pipe(replace('@@NAME_LONG@@', product.nameLong)) .pipe(replace('@@NAME_SHORT@@', product.nameShort)) .pipe(replace('@@NAME@@', product.applicationName)) .pipe(rename('usr/share/applications/' + product.applicationName + '.desktop'));"} {"_id":"doc-en-vscode-d7d2f05763d4f40d8706452202cbf5fc80ac7ac15495baa7168b977fab484d3b","title":"","text":"return function () { var desktop = gulp.src('resources/linux/code.desktop', { base: '.' }) .pipe(replace('@@NAME_LONG@@', product.nameLong)) .pipe(replace('@@NAME_SHORT@@', product.nameShort)) .pipe(replace('@@NAME@@', product.applicationName)) .pipe(rename('BUILD/usr/share/applications/' + product.applicationName + '.desktop'));"} {"_id":"doc-en-vscode-e457439addf0efa99afadc4066a40b8813a99b57ea5a5051077d2718f09835e6","title":"","text":"Name=@@NAME_LONG@@ Comment=Code Editing. Redefined. GenericName=Text Editor Exec=/usr/bin/@@NAME@@ %U Exec=/usr/share/@@NAME@@/@@NAME@@ %U Icon=@@NAME@@ Type=Application StartupNotify=true StartupWMClass=@@NAME@@ StartupWMClass=@@NAME_SHORT@@ Categories=Utility;TextEditor;Development;IDE; MimeType=text/plain; Actions=new-window;"} {"_id":"doc-en-vscode-7533be9d1b448851258b1f70678638c92835451c253acf30c19147a0ba6bdb95","title":"","text":"Name[ru]=Новое окно Name[zh_CN]=新建窗口 Name[zh_TW]=開新視窗 Exec=/usr/bin/@@NAME@@ --new-window %U Exec=/usr/share/@@NAME@@/@@NAME@@ --new-window %U Icon=@@NAME@@"} {"_id":"doc-en-vscode-1eabafa33a4f25cb502e7858f02b2025a3f44d5f759f4e28b6f7e7b8262ac7d1","title":"","text":"this.focusTerminal(); } })); this.toDispose.push(DOM.addDisposableListener(this.parentDomElement, 'keyup', (event: KeyboardEvent) => { // Keep terminal open on escape if (event.keyCode === 27) { event.stopPropagation(); } })); this.toDispose.push(this.themeService.onDidThemeChange((themeId) => { this.setTerminalTheme(themeId); this.setTerminalTheme(); })); this.toDispose.push(this.configurationService.onDidUpdateConfiguration((e) => { this.setTerminalFont(); })); this.terminal.open(this.terminalDomElement); this.parentDomElement.appendChild(terminalScrollbar.getDomNode()); let config = this.configurationService.getConfiguration(); this.terminalDomElement.style.fontFamily = config.terminal.integrated.fontFamily; this.setTerminalTheme(this.themeService.getTheme()); this.setTerminalFont(); this.setTerminalTheme(); resolve(void 0); }); } private setTerminalTheme(themeId: string) { private setTerminalTheme() { if (!this.terminal) { return; } let baseThemeId = getBaseThemeId(themeId); let baseThemeId = getBaseThemeId(this.themeService.getTheme()); this.terminal.colors = DEFAULT_ANSI_COLORS[baseThemeId]; this.terminal.refresh(0, this.terminal.rows); } private setTerminalFont() { let config = this.configurationService.getConfiguration(); this.terminalDomElement.style.fontFamily = config.terminal.integrated.fontFamily; } public focus(): void { this.focusTerminal(true); }"} {"_id":"doc-en-vscode-f684eb936dfa914156012d840839b4a8f5fc8240fb40ed0afd912d2313a1c4b4","title":"","text":"private static COMMIT_KEYBINDING = Platform.isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter'; private static NEED_MESSAGE = nls.localize('needMessage', \"Please provide a commit message. You can always press **{0}** to commit changes. If there are any staged changes, only those will be committed; otherwise, all changes will.\", ChangesView.COMMIT_KEYBINDING); private static NOTHING_TO_COMMIT = nls.localize('nothingToCommit', \"Once there are some changes to commit, type in the commit message and either press **{0}** to commit changes. If there are any staged changes, only those will be committed; otherwise, all changes will.\", ChangesView.COMMIT_KEYBINDING); private static LONG_COMMIT = nls.localize('longCommit', \"Great commit summaries are 50 characters or less. Place extra information in next lines.\"); private instantiationService: IInstantiationService; private editorService: IWorkbenchEditorService;"} {"_id":"doc-en-vscode-4e253ebac02be36d275306e5d2641840c7dfd89bc6a731842a8ecef772ce3bc4","title":"","text":"placeholder: nls.localize('commitMessage', \"Message (press {0} to commit)\", ChangesView.COMMIT_KEYBINDING), validationOptions: { showMessage: true, validation: (): InputBox.IMessage => null validation: (value): InputBox.IMessage => { if (Strings.trim(value.split('n')[0]).length > 50) { return { content: ChangesView.LONG_COMMIT, type: InputBox.MessageType.WARNING }; } return null; } }, ariaLabel: nls.localize('commitMessageAriaLabel', \"Git: Type commit message and press {0} to commit\", ChangesView.COMMIT_KEYBINDING), flexibleHeight: true"} {"_id":"doc-en-vscode-d3064d55f230dc43a4dd1213e990ff5c5cef71a167eda43f50d37be80e4fb11e","title":"","text":"class NoUnexternalizedStringsRuleWalker extends Lint.RuleWalker { private static ImportFailureMessage = 'Do not use double qoutes for imports.'; private static ImportFailureMessage = 'Do not use double quotes for imports.'; private static DOUBLE_QUOTE: string = '\"';"} {"_id":"doc-en-vscode-6d6b59ff74f9e45be9a72920fad3662a82904326ecddfd8eecc4b1635f8c4f3b","title":"","text":"* Writes text to the system clipboard. */ writeText(text: string): void; /** * Reads the content of the clipboard in plain text */ readText(): string; } No newline at end of file"} {"_id":"doc-en-vscode-7a85cae5220d9e77607527ca27cc49f0ebd5abfc8544ca3ea130ff0e7797ed52","title":"","text":"public writeText(text: string): void { clipboard.writeText(text); } public readText(): string { return clipboard.readText(); } } No newline at end of file"} {"_id":"doc-en-vscode-fbd80b2e63c1a97fcdf9c8ca62c03a8042a032003a3e1b183f57fb50f3ba64ba","title":"","text":"import { Action, IAction } from 'vs/base/common/actions'; import { ActionItem, BaseActionItem, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions, ActionBarContributor } from 'vs/workbench/browser/actions'; import { GlobalNewUntitledFileAction, SaveFileAsAction, ShowOpenedFileInNewWindow, CopyPathAction, GlobalCopyPathAction, RevealInOSAction, GlobalRevealInOSAction, pasteIntoFocusedFilesExplorerViewItem, FocusOpenEditorsView, FocusFilesExplorer, GlobalCompareResourcesAction, GlobalNewFileAction, GlobalNewFolderAction, RevertFileAction, SaveFilesAction, SaveAllAction, SaveFileAction, MoveFileToTrashAction, TriggerRenameFileAction, PasteFileAction, CopyFileAction, SelectResourceForCompareAction, CompareResourcesAction, NewFolderAction, NewFileAction, OpenToSideAction, ShowActiveFileInExplorer, CollapseExplorerView, RefreshExplorerView, CompareWithSavedAction } from 'vs/workbench/parts/files/browser/fileActions'; import { GlobalNewUntitledFileAction, SaveFileAsAction, ShowOpenedFileInNewWindow, CopyPathAction, GlobalCopyPathAction, RevealInOSAction, GlobalRevealInOSAction, pasteIntoFocusedFilesExplorerViewItem, FocusOpenEditorsView, FocusFilesExplorer, GlobalCompareResourcesAction, GlobalNewFileAction, GlobalNewFolderAction, RevertFileAction, SaveFilesAction, SaveAllAction, SaveFileAction, MoveFileToTrashAction, TriggerRenameFileAction, PasteFileAction, CopyFileAction, SelectResourceForCompareAction, CompareResourcesAction, NewFolderAction, NewFileAction, OpenToSideAction, ShowActiveFileInExplorer, CollapseExplorerView, RefreshExplorerView, CompareWithSavedAction, CompareWithClipboardAction } from 'vs/workbench/parts/files/browser/fileActions'; import { revertLocalChangesCommand, acceptLocalChangesCommand, CONFLICT_RESOLUTION_CONTEXT } from 'vs/workbench/parts/files/browser/saveErrorHandler'; import { SyncActionDescriptor, MenuId, MenuRegistry } from 'vs/platform/actions/common/actions'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions';"} {"_id":"doc-en-vscode-29f127d9e4d50bd641083ad32972db27d2def204fa9feb04e02941b64bddc2f3","title":"","text":"registry.registerWorkbenchAction(new SyncActionDescriptor(GlobalRevealInOSAction, GlobalRevealInOSAction.ID, GlobalRevealInOSAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_R) }), 'File: Reveal Active File', category); registry.registerWorkbenchAction(new SyncActionDescriptor(ShowOpenedFileInNewWindow, ShowOpenedFileInNewWindow.ID, ShowOpenedFileInNewWindow.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_O) }), 'File: Open Active File in New Window', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CompareWithSavedAction, CompareWithSavedAction.ID, CompareWithSavedAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_D) }), 'File: Compare Active File with Saved', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CompareWithClipboardAction, CompareWithClipboardAction.ID, CompareWithClipboardAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_C) }), 'File: Compare Active File with Clipboard', category); // Commands CommandsRegistry.registerCommand('_files.windowOpen', openWindowCommand);"} {"_id":"doc-en-vscode-86fd04aa4f629b39b24fb714f60eb3b942391e85e3ef61bd48381d1bca6be132","title":"","text":"import { IMessageService, IMessageWithAction, IConfirmation, Severity, CancelAction, IConfirmationResult } from 'vs/platform/message/common/message'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { getCodeEditor } from 'vs/editor/browser/services/codeEditorService'; import { IEditorViewState } from 'vs/editor/common/editorCommon'; import { IEditorViewState, IModel } from 'vs/editor/common/editorCommon'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { IWindowsService } from 'vs/platform/windows/common/windows'; import { withFocusedFilesExplorer, revealInOSCommand, revealInExplorerCommand, copyPathCommand } from 'vs/workbench/parts/files/browser/fileCommands'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { ITextModelService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; import { once } from 'vs/base/common/event'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IModelService } from 'vs/editor/common/services/modelService'; export interface IEditableData { action: IAction;"} {"_id":"doc-en-vscode-9308ae6cd354a215d13c340d5842f4037373ea11e233dfacf405d00149417780","title":"","text":"} } export class CompareWithClipboardAction extends Action { public static ID = 'workbench.files.action.compareWithClipboard'; public static LABEL = nls.localize('compareWithClipboard', \"Compare Active File with Clipboard\"); private static SCHEME = 'clipboard'; private toDispose: IDisposable[]; constructor( id: string, label: string, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IInstantiationService private instantiationService: IInstantiationService, @ITextModelService private textModelService: ITextModelService, ) { super(id, label); this.enabled = true; this.toDispose = []; } public run(): TPromise { let resource: URI = toResource(this.editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' } ); const provider = this.instantiationService.createInstance(ClipboardContentProvider); const registrationDisposal = this.textModelService.registerTextModelContentProvider(CompareWithClipboardAction.SCHEME, provider); this.toDispose.push(registrationDisposal); if (resource) { const name = paths.basename(resource.fsPath); const editorLabel = nls.localize('clipboardComparisonLabel', \"Clipboard ↔ {0}\", name); return this.editorService.openEditor({ leftResource: URI.from({ scheme: CompareWithClipboardAction.SCHEME, path: resource.fsPath }), rightResource: resource, label: editorLabel }); } return TPromise.as(true); } public dispose(): void { super.dispose(); this.toDispose = dispose(this.toDispose); } } class ClipboardContentProvider implements ITextModelContentProvider { constructor( @IClipboardService private clipboardService: IClipboardService, @IModeService private modeService: IModeService, @IModelService private modelService: IModelService ) { } provideTextContent(resource: URI): TPromise { const model = this.modelService.createModel(this.clipboardService.readText(), this.modeService.getOrCreateMode('text/plain'), resource); return TPromise.as(model); } } // Diagnostics support let diag: (...args: any[]) => void; if (!diag) {"} {"_id":"doc-en-vscode-7ce41709c55ab77826924e39ee7384b4b1c0781452547e406d944cea94d51744","title":"","text":"getLineNumberAtVerticalOffset(verticalOffset: number): number; getVerticalOffsetForLineNumber(lineNumber: number): number; getWhitespaceAtVerticalOffset(verticalOffset:number): editorCommon.IViewWhitespaceViewportData; shouldSuppressMouseDownOnViewZone(viewZoneId:number): boolean; shouldSuppressMouseDownOnViewZone(viewZoneId: number): boolean; shouldSuppressMouseDownOnWidget(widgetId: string): boolean; /** * Decode an Editor.IPosition from a rendered dom node"} {"_id":"doc-en-vscode-c62e4f9abbaebf9fb4a63fefe6b9cb12f5eb20f9739b0b46b882817c094035af","title":"","text":"let targetIsLineNumbers = (t.type === editorCommon.MouseTargetType.GUTTER_LINE_NUMBERS); let selectOnLineNumbers = this._context.configuration.editor.viewInfo.selectOnLineNumbers; let targetIsViewZone = (t.type === editorCommon.MouseTargetType.CONTENT_VIEW_ZONE || t.type === editorCommon.MouseTargetType.GUTTER_VIEW_ZONE); let targetIsWidget = (t.type === editorCommon.MouseTargetType.CONTENT_WIDGET); let shouldHandle = e.leftButton; if (platform.isMacintosh && e.ctrlKey) { shouldHandle = false; } if (shouldHandle && (targetIsContent || (targetIsLineNumbers && selectOnLineNumbers))) { var focus = () => { if (browser.isIE11orEarlier) { // IE does not want to focus when coming in from the browser's address bar if ((e.browserEvent).fromElement) {"} {"_id":"doc-en-vscode-ee36ef308bf2d2da39bc808b38fe1a5849a0b4f5c80cc6fcf19be70e7d8fce56","title":"","text":"e.preventDefault(); this.viewHelper.focusTextArea(); } }; if (shouldHandle && (targetIsContent || (targetIsLineNumbers && selectOnLineNumbers))) { focus(); this._mouseDownOperation.start(t.type, e); } else if (targetIsGutter) {"} {"_id":"doc-en-vscode-1c6cd73b18b7d60f3e36bc190e09477e815fb65c9a13318b1ca9e1e83cff368d","title":"","text":"} else if (targetIsViewZone) { let viewZoneData = t.detail; if (this.viewHelper.shouldSuppressMouseDownOnViewZone(viewZoneData.viewZoneId)) { focus(); this._mouseDownOperation.start(t.type, e); e.preventDefault(); } } else if (targetIsWidget && this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)) { focus(); e.preventDefault(); } this.viewController.emitMouseDown({"} {"_id":"doc-en-vscode-b8ba47461734f84c433e41ce53f0b660d06d813f5d9a39ba31eb31caecf40213","title":"","text":"} return this.viewZones.shouldSuppressMouseDownOnViewZone(viewZoneId); }, shouldSuppressMouseDownOnWidget: (widgetId: string) => { if (this._isDisposed) { throw new Error('ViewImpl.pointerHandler.shouldSuppressMouseDownOnWidget: View is disposed'); } return this.contentWidgets.shouldSuppressMouseDownOnWidget(widgetId); }, getPositionFromDOMInfo: (spanNode: HTMLElement, offset: number) => { if (this._isDisposed) { throw new Error('ViewImpl.pointerHandler.getPositionFromDOMInfo: View is disposed');"} {"_id":"doc-en-vscode-5f3211ccf3237a363060522814194793f764d097b2856106b3e09483fb56ef66","title":"","text":"} } public shouldSuppressMouseDownOnWidget(widgetId: string): boolean { if (this._widgets.hasOwnProperty(widgetId)) { let widgetData = this._widgets[widgetId]; return widgetData.widget.suppressMouseDown; } return false; } private _layoutBoxInViewport(position:Position, domNode:HTMLElement, ctx:IRenderingContext): IBoxLayoutResult { let visibleRange = ctx.visibleRangeForPosition(position);"} {"_id":"doc-en-vscode-5ce23d7743ce78f024273db7303d6c2fc68df8038322bad3858b8a2a541772fe","title":"","text":"private static ID: number = 0; public suppressMouseDown: boolean; private _id: string; private _domNode: HTMLElement;"} {"_id":"doc-en-vscode-e62248c6afa5621ee4a8e912331db2d3f6d21be958df408a0c3f7fd6f614a0c6","title":"","text":"this._id = 'codeLensWidget' + (++CodeLensContentWidget.ID); this._editor = editor; this.suppressMouseDown = true; this.setSymbolRange(symbolRange); this._domNode = document.createElement('span');"} {"_id":"doc-en-vscode-832b607656d488c495de0ee328874be0da3b7118b1bc10743694051e37255c56","title":"","text":"* Render this content widget in a location where it could overflow the editor's view dom node. */ allowEditorOverflow?: boolean; suppressMouseDown?: boolean; /** * Get a unique identifier of the content widget. */"} {"_id":"doc-en-vscode-5311db0cae2a2eaae4ad45f778ecc7930a348de9ebdfceae6d3f2a453be42739","title":"","text":"public $show(terminalId: number, preserveFocus: boolean): void { this._terminalService.show(!preserveFocus).then((terminalPanel) => { this._terminalService.setActiveTerminalById(terminalId); if (!preserveFocus) { // If the panel was already showing an explicit focus call is necessary here. terminalPanel.focus(); } }); }"} {"_id":"doc-en-vscode-fef8a4b702ab05c9572fb4d07fe306732fe1328dcc62c209dd811d691d2a1548","title":"","text":"export interface ITerminalPanel { closeTerminalById(terminalId: number): TPromise; focus(): void; sendTextToActiveTerminal(text: string, addNewLine: boolean): void; }"} {"_id":"doc-en-vscode-38755db06c2f5693ebddaa353e9bcded051b104e22dbfdc643c273ccaeffaba4","title":"","text":"return this.show(false).then((terminalPanel) => { this.activeTerminalIndex = index; terminalPanel.setActiveTerminal(this.activeTerminalIndex); terminalPanel.focus(); this._onActiveInstanceChanged.fire(); }); }"} {"_id":"doc-en-vscode-057f8c4a4a3e8425aabaa27634b9a8807e5b61fd29b83da32dd43df861f48d45","title":"","text":"// Escape codes // http://en.wikipedia.org/wiki/ANSI_escape_code const EL = /x1Bx5B[12]?K/g; // Erase in line const LF = /xA/g; // line feed const COLOR_START = /x1b[d+m/g; // Color const COLOR_END = /x1b[0?m/g; // Color export function removeAnsiEscapeCodes(str: string): string { if (str) { str = str.replace(EL, ''); str = str.replace(LF, 'n'); str = str.replace(COLOR_START, ''); str = str.replace(COLOR_END, ''); }"} {"_id":"doc-en-vscode-0d2f5a85913e86ec82244b291822827e443c7b9dd76d741f50695c3c529dc474","title":"","text":"return clb(startPort); }); client.connect(startPort); client.connect(startPort, '127.0.0.1'); } function dispose(socket: net.Socket): void {"} {"_id":"doc-en-vscode-ce05c326b29c1a7cacb7acc33a7240cfa97fadd032066d5ea5ebe0ee308f84dc","title":"","text":"} .monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) { max-width: 500px; word-wrap: break-word; }"} {"_id":"doc-en-vscode-0430d88e31c3c72621c1d7ba75dbc1636ae85f6fd6075fd3c1d63c7eca4e1930","title":"","text":"position: absolute; width: 100%; height: 100%; background: transparent; background: red; } .monaco-workbench:not(.reduce-motion) .monaco-sash:before {"} {"_id":"doc-en-vscode-cbb3e9e06f49bfb5b34c1005e92adcf2d587b67e32399f851ce558d8aa2655f2","title":"","text":"import { Context as SuggestContext } from 'vs/editor/contrib/suggest/browser/suggest'; import { AsyncIterableObject } from 'vs/base/common/async'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { ResizableHoverWidget } from 'vs/editor/contrib/hover/browser/resizableHoverWidget'; const $ = dom.$; export class ContentHoverController extends Disposable { private readonly _participants: IEditorHoverParticipant[]; private readonly _widget = this._register(this._instantiationService.createInstance(ContentHoverWidget, this._editor)); // INITIALLY: private readonly _widget = this._register(this._instantiationService.createInstance(ContentHoverWidget, this._editor)); private readonly _widget; private readonly _computer: ContentHoverComputer; private readonly _hoverOperation: HoverOperation;"} {"_id":"doc-en-vscode-bee2c7bd12b632248a1a8f95b4040273599e0905261fa26cb6981cc75e48ebd9","title":"","text":") { super(); this._widget = this._register(this._instantiationService.createInstance(ResizableHoverWidget, this._editor)); // Instantiate participants and sort them by `hoverOrdinal` which is relevant for rendering order. this._participants = []; for (const participant of HoverParticipantRegistry.getAll()) {"} {"_id":"doc-en-vscode-964ede88c1a453e01702460de097ca25b00c72c5b4236e441131464192801d45","title":"","text":" /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ .monaco-editor .resizable-widget { z-index: 40; display: block; } "} {"_id":"doc-en-vscode-b6461bd37893d813d70cb5125334ff3dc57828825c0534e4b8ca84ffbd01b1ab","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 { IResizeEvent, ResizableHTMLElement } from 'vs/base/browser/ui/resizable/resizable'; import { DisposableStore, IDisposable } from 'vs/base/common/lifecycle'; import { ResourceMap } from 'vs/base/common/map'; import { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentWidgetPosition } from 'vs/editor/browser/editorBrowser'; import { IPosition } from 'vs/editor/common/core/position'; import { PositionAffinity } from 'vs/editor/common/model'; import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; import * as dom from 'vs/base/browser/dom'; import { clamp } from 'vs/base/common/numbers'; import { EditorOption } from 'vs/editor/common/config/editorOptions'; import { Emitter, Event } from 'vs/base/common/event'; export abstract class ResizableWidget implements IDisposable { readonly element: ResizableHTMLElement; private readonly _disposables = new DisposableStore(); private readonly _persistingMechanism: IPersistingMechanism; constructor( private readonly _editor: ICodeEditor, private readonly _persistingOptions: IPersistingOptions, ) { console.log('Inside of ResizableWidget constructor'); this.element = new ResizableHTMLElement(); this.element.domNode.classList.add('editor-widget', 'resizable-widget'); if (this._persistingOptions instanceof SingleSizePersistingOptions) { this._persistingMechanism = new SingleSizePersistingMechanism(this, this.element, this._editor, this._persistingOptions); } else if (this._persistingOptions instanceof MultipleSizePersistingOptions) { this._persistingMechanism = new MultipleSizePersistingMechanism(this, this.element, this._editor); } else { throw new Error('Please specify a valid persisting mechanism'); } } dispose(): void { this._disposables.dispose(); this.element.dispose(); } resize(dimension: dom.Dimension): void { } hide(): void { this.element.clearSashHoverState(); } findMaximumRenderingHeight(): number | undefined { return Infinity; } findMaximumRenderingWidth(): number | undefined { return Infinity; } findPersistedSize(): dom.Dimension | undefined { return this._persistingMechanism.findSize(); } } export abstract class ResizableContentWidget implements IContentWidget { abstract ID: string; private _position: IPosition | null = null; private _secondaryPosition: IPosition | null = null; private _preference: ContentWidgetPositionPreference[] = []; private _positionAffinity: PositionAffinity | undefined = undefined; constructor(private readonly resizableWidget: ResizableWidget, private readonly editor: ICodeEditor) { this.editor.addContentWidget(this); console.log('Inisde of ResizableContentWidget constructor'); } findPersistedSize(): dom.Dimension | undefined { return this.resizableWidget.findPersistedSize(); } getId(): string { console.log('this.ID : ', this.ID); return this.ID; } getDomNode(): HTMLElement { console.log('Inside of getDomNode of ResizableContentWidget'); console.log('this.resizableWidget.element.domNode : ', this.resizableWidget.element.domNode); this.resizableWidget.element.domNode.style.zIndex = '49'; this.resizableWidget.element.domNode.style.position = 'fixed'; // this.resizableWidget.element.domNode.style.display = 'block'; return this.resizableWidget.element.domNode; } getPosition(): IContentWidgetPosition | null { console.log('Inside of getPosition of ResizableContentWidget'); const contentWidgetPosition = { position: this._position, secondaryPosition: this._secondaryPosition, preference: (this._preference), positionAffinity: this._positionAffinity }; console.log('contentWidgetPosition: ', contentWidgetPosition); return contentWidgetPosition; } hide(): void { this.editor.layoutContentWidget(this); } set position(position: IPosition | null) { this._position = position; } set secondaryPosition(position: IPosition | null) { this._secondaryPosition = position; } set preference(preference: ContentWidgetPositionPreference[]) { this._preference = preference; } set positionAffinity(affinity: PositionAffinity | undefined) { this._positionAffinity = affinity; } } interface IPersistingOptions { } export class SingleSizePersistingOptions implements IPersistingOptions { constructor( public readonly key: string, public readonly defaultSize: dom.Dimension, @IStorageService public readonly storageService: IStorageService ) { } } export class MultipleSizePersistingOptions implements IPersistingOptions { constructor() { } } interface IPersistingMechanism extends IDisposable { findSize(): dom.Dimension | undefined; } // TODO: maybe need to make more generic, this is specific to the suggest widget class SingleSizePersistingMechanism implements IPersistingMechanism { private readonly _persistedWidgetSize: PersistedWidgetSize | null = null; private readonly _disposables = new DisposableStore(); constructor( private readonly resizableWidget: ResizableWidget, private readonly element: ResizableHTMLElement, private readonly editor: ICodeEditor, private readonly persistingOptions: SingleSizePersistingOptions ) { this._persistedWidgetSize = new PersistedWidgetSize(this.persistingOptions.key, this.persistingOptions.storageService, this.editor); class ResizeState { constructor( readonly persistedSize: dom.Dimension | undefined, readonly currentSize: dom.Dimension, public persistHeight = false, public persistWidth = false, ) { } } let state: ResizeState | undefined; this._disposables.add(this.element.onDidWillResize(() => { // TODO: add back, this._contentWidget.lockPreference(); state = new ResizeState(this._persistedWidgetSize!.restore(), this.element.size); })); this._disposables.add(this.element.onDidResize(e => { this.resizableWidget.resize(new dom.Dimension(e.dimension.width, e.dimension.height)); if (state) { state.persistHeight = state.persistHeight || !!e.north || !!e.south; state.persistWidth = state.persistWidth || !!e.east || !!e.west; } if (!e.done) { return; } if (state) { const fontInfo = this.editor.getOption(EditorOption.fontInfo); const itemHeight = clamp(this.editor.getOption(EditorOption.suggestLineHeight) || fontInfo.lineHeight, 8, 1000); const threshold = Math.round(itemHeight / 2); let { width, height } = this.element.size; if (!state.persistHeight || Math.abs(state.currentSize.height - height) <= threshold) { height = state.persistedSize?.height ?? this.persistingOptions.defaultSize.height; } if (!state.persistWidth || Math.abs(state.currentSize.width - width) <= threshold) { width = state.persistedSize?.width ?? this.persistingOptions.defaultSize.width; } this._persistedWidgetSize!.store(new dom.Dimension(width, height)); } // TODO: add back, reset working state // this._contentWidget.unlockPreference(); state = undefined; })); } findSize(): dom.Dimension | undefined { return undefined; } dispose(): void { this._disposables.dispose(); } } class MultipleSizePersistingMechanism implements IPersistingMechanism { private readonly _persistedWidgetSizes: ResourceMap> = new ResourceMap>(); private readonly _disposables = new DisposableStore(); private _tooltipPosition: IPosition | null = null; // TODO: not sure if I need the following // private _initialHeight: number = 0; // private _initialTop: number = 0; private _resizing: boolean = false; private _size: dom.Dimension | undefined = undefined; private _maxRenderingHeight: number | undefined = Infinity; private _maxRenderingWidth: number | undefined = Infinity; private readonly _onDidResize = new Emitter(); readonly onDidResize: Event = this._onDidResize.event; // private _renderingAbove: ContentWidgetPositionPreference | undefined = undefined; constructor( private readonly resizableWidget: ResizableWidget, private readonly element: ResizableHTMLElement, public readonly editor: ICodeEditor ) { this.element.minSize = new dom.Dimension(10, 24); this._disposables.add(this.editor.onDidChangeModelContent((e) => { const uri = this.editor.getModel()?.uri; if (!uri || !this._persistedWidgetSizes.has(uri)) { return; } const persistedSizesForUri = this._persistedWidgetSizes.get(uri)!; const updatedPersistedSizesForUri = new Map(); for (const change of e.changes) { const changeOffset = change.rangeOffset; const rangeLength = change.rangeLength; const endOffset = changeOffset + rangeLength; const textLength = change.text.length; for (const key of persistedSizesForUri.keys()) { const parsedKey = JSON.parse(key); const tokenOffset = parsedKey[0]; const tokenLength = parsedKey[1]; if (endOffset < tokenOffset) { const oldSize = persistedSizesForUri.get(key)!; const newKey: [number, number] = [tokenOffset - rangeLength + textLength, tokenLength]; updatedPersistedSizesForUri.set(JSON.stringify(newKey), oldSize); } else if (changeOffset >= tokenOffset + tokenLength) { updatedPersistedSizesForUri.set(key, persistedSizesForUri.get(key)!); } } } this._persistedWidgetSizes.set(uri, updatedPersistedSizesForUri); })); this._disposables.add(this.element.onDidWillResize(() => { this._resizing = true; // this._initialHeight = this.element.domNode.clientHeight; // this._initialTop = this.element.domNode.offsetTop; })); this._disposables.add(this.element.onDidResize(e => { let height = e.dimension.height; let width = e.dimension.width; const maxWidth = this.element.maxSize.width; const maxHeight = this.element.maxSize.height; width = Math.min(maxWidth, width); height = Math.min(maxHeight, height); if (!this._maxRenderingHeight) { return; } this._size = new dom.Dimension(width, height); this.element.layout(height, width); // Calling the resize function of the this.resizableWidget.resize(new dom.Dimension(width, height)); // Update the top parameters only when we decided to render above // TODO: presumably do not need to resize the element // if (this._renderingAbove === ContentWidgetPositionPreference.ABOVE) { // \tthis.element.domNode.style.top = this._initialTop - (height - this._initialHeight) + 'px'; // } // const horizontalSashWidth = width - 2 * SASH_WIDTH + 2 * TOTAL_BORDER_WIDTH + 'px'; // this.element.northSash.el.style.width = horizontalSashWidth; // this.element.southSash.el.style.width = horizontalSashWidth; // const verticalSashWidth = height - 2 * SASH_WIDTH + 2 * TOTAL_BORDER_WIDTH + 'px'; // this.element.eastSash.el.style.height = verticalSashWidth; // this.element.westSash.el.style.height = verticalSashWidth; // this.element.eastSash.el.style.top = TOTAL_BORDER_WIDTH + 'px'; // Fire the current dimension // TODO: probably don't need to listen on the firing event? // this._onDidResize.fire({ dimension: this._size, done: false }); this._maxRenderingWidth = this.resizableWidget.findMaximumRenderingWidth(); this._maxRenderingHeight = this.resizableWidget.findMaximumRenderingHeight(); // this._maxRenderingHeight = this.resizableWidget.findMaximumRenderingHeight(this._renderingAbove); if (!this._maxRenderingHeight || !this._maxRenderingWidth) { return; } this.element.maxSize = new dom.Dimension(this._maxRenderingWidth, this._maxRenderingHeight); // Persist the height only when the resizing has stopped if (e.done) { if (!this.editor.hasModel()) { return; } const uri = this.editor.getModel().uri; if (!uri || !this._tooltipPosition) { return; } const persistedSize = new dom.Dimension(width, height); const wordPosition = this.editor.getModel().getWordAtPosition(this._tooltipPosition); if (!wordPosition) { return; } const offset = this.editor.getModel().getOffsetAt({ lineNumber: this._tooltipPosition.lineNumber, column: wordPosition.startColumn }); const length = wordPosition.word.length; // Suppose that the uri does not exist in the persisted widget hover sizes, then create a map if (!this._persistedWidgetSizes.get(uri)) { const persistedWidgetSizesForUri = new Map([]); persistedWidgetSizesForUri.set(JSON.stringify([offset, length]), persistedSize); this._persistedWidgetSizes.set(uri, persistedWidgetSizesForUri); } else { const persistedWidgetSizesForUri = this._persistedWidgetSizes.get(uri)!; persistedWidgetSizesForUri.set(JSON.stringify([offset, length]), persistedSize); } this._resizing = false; } // this.editor.layoutOverlayWidget(this); // this.editor.render(); })); } set tooltipPosition(position: IPosition) { this._tooltipPosition = position; } findSize(): dom.Dimension | undefined { console.log('Inside of findSize of the MultiplePersistingMechanisms'); if (!this._tooltipPosition || !this.editor.hasModel()) { return; } const wordPosition = this.editor.getModel().getWordAtPosition(this._tooltipPosition); if (!wordPosition) { return; } const offset = this.editor.getModel().getOffsetAt({ lineNumber: this._tooltipPosition.lineNumber, column: wordPosition.startColumn }); const length = wordPosition.word.length; const uri = this.editor.getModel().uri; const persistedSizesForUri = this._persistedWidgetSizes.get(uri); if (!persistedSizesForUri) { return; } return persistedSizesForUri.get(JSON.stringify([offset, length])); } dispose(): void { this._disposables.dispose(); } } class PersistedWidgetSize { constructor( private readonly _key: string, private readonly _service: IStorageService, editor: ICodeEditor ) { } restore(): dom.Dimension | undefined { const raw = this._service.get(this._key, StorageScope.PROFILE) ?? ''; try { const obj = JSON.parse(raw); if (dom.Dimension.is(obj)) { return dom.Dimension.lift(obj); } } catch { // ignore } return undefined; } store(size: dom.Dimension) { this._service.store(this._key, JSON.stringify(size), StorageScope.PROFILE, StorageTarget.MACHINE); } reset(): void { this._service.remove(this._key, StorageScope.PROFILE); } } "} {"_id":"doc-en-vscode-ecdd0fa3ef2c21ed8c9b05d82b3e53261b0655fa9e31d8f9479e000c0f1017ef","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 { HoverWidget } from 'vs/base/browser/ui/hover/hoverWidget'; import { DisposableStore } from 'vs/base/common/lifecycle'; import { ContentWidgetPositionPreference, ICodeEditor, IContentWidgetPosition } from 'vs/editor/browser/editorBrowser'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { MultipleSizePersistingOptions, ResizableContentWidget, ResizableWidget } from 'vs/editor/contrib/hover/browser/resizableContentWidget'; import * as dom from 'vs/base/browser/dom'; import { ConfigurationChangedEvent, EditorOption } from 'vs/editor/common/config/editorOptions'; import { Position } from 'vs/editor/common/core/position'; import { HoverStartSource } from 'vs/editor/contrib/hover/browser/hoverOperation'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { PositionAffinity } from 'vs/editor/common/model'; import { IEditorHoverColorPickerWidget } from 'vs/editor/contrib/hover/browser/hoverTypes'; const SCROLLBAR_WIDTH = 10; // TODO: maybe don't need the resizable widget class export class ResizableHoverWidget extends ResizableWidget { public ID = 'editor.contrib.resizableContentHoverWidget'; private hoverDisposables = new DisposableStore(); // The ContentWidget is a child of the resizable widget private resizableContentWidget: ResizableContentHoverWidget; public readonly allowEditorOverflow = true; public readonly _hover: HoverWidget = this.hoverDisposables.add(new HoverWidget()); private readonly editor: ICodeEditor; private readonly _hoverVisibleKey = EditorContextKeys.hoverVisible.bindTo(this._contextKeyService); private readonly _hoverFocusedKey = EditorContextKeys.hoverFocused.bindTo(this._contextKeyService); private readonly _focusTracker = this.hoverDisposables.add(dom.trackFocus(this.getDomNode())); private readonly _horizontalScrollingBy: number = 30; private _visibleData: ContentHoverVisibleData | null = null; private _renderingAbove: ContentWidgetPositionPreference; constructor( editor: ICodeEditor, @IContextKeyService private readonly _contextKeyService: IContextKeyService ) { super(editor, new MultipleSizePersistingOptions()); this.editor = editor; // create here the dom node and all other logic should go here that was in the super abstract class this.resizableContentWidget = new ResizableContentHoverWidget(this, editor); this._renderingAbove = this.editor.getOption(EditorOption.hover).above ? ContentWidgetPositionPreference.ABOVE : ContentWidgetPositionPreference.BELOW; this.hoverDisposables.add(this.element.onDidResize((e) => { // When the resizable hover overlay changes, resize the widget // this._widget.resize(e.dimension); })); this.hoverDisposables.add(this.editor.onDidLayoutChange(() => this._layout())); this.hoverDisposables.add(this.editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => { if (e.hasChanged(EditorOption.fontInfo)) { this._updateFont(); } })); this._setVisibleData(null); this._layout(); this.hoverDisposables.add(this._focusTracker.onDidFocus(() => { this._hoverFocusedKey.set(true); })); this.hoverDisposables.add(this._focusTracker.onDidBlur(() => { this._hoverFocusedKey.set(false); })); dom.append(this.element.domNode, this._hover.containerDomNode); } public get position(): Position | null { return this._visibleData?.showAtPosition ?? null; } public get isColorPickerVisible(): boolean { return Boolean(this._visibleData?.colorPicker); } public get isVisibleFromKeyboard(): boolean { return (this._visibleData?.source === HoverStartSource.Keyboard); } public get isVisible(): boolean { return this._hoverVisibleKey.get() ?? false; } public get renderingAbove(): ContentWidgetPositionPreference { return this._renderingAbove; } public set renderingAbove(renderingAbove: ContentWidgetPositionPreference) { this._renderingAbove = renderingAbove; } // NEW public override resize(size: dom.Dimension) { console.log('Inside of resize'); // Removing the max height and max width here - the max size is controlled by the resizable overlay this._hover.contentsDomNode.style.maxHeight = 'none'; this._hover.contentsDomNode.style.maxWidth = 'none'; const width = size.width + 'px'; // const width = size.width - 2 * SASH_WIDTH + TOTAL_BORDER_WIDTH + 'px'; this._hover.containerDomNode.style.width = width; this._hover.contentsDomNode.style.width = width; // const height = size.height - 2 * SASH_WIDTH + TOTAL_BORDER_WIDTH + 'px'; const height = size.height + 'px'; this._hover.containerDomNode.style.height = height; this._hover.contentsDomNode.style.height = height; const scrollDimensions = this._hover.scrollbar.getScrollDimensions(); const hasHorizontalScrollbar = (scrollDimensions.scrollWidth > scrollDimensions.width); if (hasHorizontalScrollbar) { // When there is a horizontal scroll-bar use a different height to make the scroll-bar visible const extraBottomPadding = `${this._hover.scrollbar.options.horizontalScrollbarSize}px`; if (this._hover.contentsDomNode.style.paddingBottom !== extraBottomPadding) { this._hover.contentsDomNode.style.paddingBottom = extraBottomPadding; } this._hover.contentsDomNode.style.height = size.height - SCROLLBAR_WIDTH + 'px'; // - 2 * SASH_WIDTH + TOTAL_BORDER_WIDTH } this._hover.scrollbar.scanDomNode(); this.editor.layoutContentWidget(this.resizableContentWidget); this.editor.render(); } public override findMaximumRenderingHeight(): number | undefined { if (!this.editor || !this.editor.hasModel() || !this._visibleData?.showAtPosition) { return; } const editorBox = dom.getDomNodePagePosition(this.editor.getDomNode()); const mouseBox = this.editor.getScrolledVisiblePosition(this._visibleData.showAtPosition); const bodyBox = dom.getClientArea(document.body); let availableSpace: number; if (this._renderingAbove === ContentWidgetPositionPreference.ABOVE) { availableSpace = editorBox.top + mouseBox.top - 30; } else { const mouseBottom = editorBox.top + mouseBox!.top + mouseBox!.height; availableSpace = bodyBox.height - mouseBottom; } let divMaxHeight = 0; for (const childHtmlElement of this._hover.contentsDomNode.children) { divMaxHeight += childHtmlElement.clientHeight; } if (this._hover.contentsDomNode.clientWidth < this._hover.contentsDomNode.scrollWidth) { divMaxHeight += SCROLLBAR_WIDTH; } return Math.min(availableSpace, divMaxHeight); } public findMaxRenderingWidth(): number | undefined { if (!this.editor || !this.editor.hasModel()) { return; } const editorBox = dom.getDomNodePagePosition(this.editor.getDomNode()); const widthOfEditor = editorBox.width; const leftOfEditor = editorBox.left; const glyphMarginWidth = this.editor.getLayoutInfo().glyphMarginWidth; const leftOfContainer = this._hover.containerDomNode.offsetLeft; return widthOfEditor + leftOfEditor - leftOfContainer - glyphMarginWidth; } public override dispose(): void { this.editor.removeContentWidget(this.resizableContentWidget); if (this._visibleData) { this._visibleData.disposables.dispose(); } super.dispose(); } public getDomNode() { return this._hover.containerDomNode; } public getContentsDomNode() { return this._hover.contentsDomNode; } public isMouseGettingCloser(posx: number, posy: number): boolean { if (!this._visibleData) { return false; } if (typeof this._visibleData.initialMousePosX === 'undefined' || typeof this._visibleData.initialMousePosY === 'undefined') { this._visibleData.initialMousePosX = posx; this._visibleData.initialMousePosY = posy; return false; } const widgetRect = dom.getDomNodePagePosition(this.resizableContentWidget.getDomNode()); if (typeof this._visibleData.closestMouseDistance === 'undefined') { this._visibleData.closestMouseDistance = computeDistanceFromPointToRectangle(this._visibleData.initialMousePosX, this._visibleData.initialMousePosY, widgetRect.left, widgetRect.top, widgetRect.width, widgetRect.height); } const distance = computeDistanceFromPointToRectangle(posx, posy, widgetRect.left, widgetRect.top, widgetRect.width, widgetRect.height); if (!distance || !this._visibleData.closestMouseDistance || distance > this._visibleData.closestMouseDistance + 4 /* tolerance of 4 pixels */) { // The mouse is getting farther away return false; } this._visibleData.closestMouseDistance = Math.min(this._visibleData.closestMouseDistance, distance); return true; } private _setVisibleData(visibleData: ContentHoverVisibleData | null): void { if (this._visibleData) { this._visibleData.disposables.dispose(); } this._visibleData = visibleData; this._hoverVisibleKey.set(!!this._visibleData); this._hover.containerDomNode.classList.toggle('hidden', !this._visibleData); } private _layout(): void { const height = Math.max(this.editor.getLayoutInfo().height / 4, 250); const { fontSize, lineHeight } = this.editor.getOption(EditorOption.fontInfo); this._hover.contentsDomNode.style.fontSize = `${fontSize}px`; this._hover.contentsDomNode.style.lineHeight = `${lineHeight / fontSize}`; this._hover.contentsDomNode.style.maxHeight = `${height}px`; this._hover.contentsDomNode.style.maxWidth = `${Math.max(this.editor.getLayoutInfo().width * 0.66, 500)}px`; } private _updateFont(): void { const codeClasses: HTMLElement[] = Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName('code')); codeClasses.forEach(node => this.editor.applyFontInfo(node)); } public showAt(node: DocumentFragment, visibleData: ContentHoverVisibleData): void { this.editor.addContentWidget(this.resizableContentWidget); const persistedSize = this.findPersistedSize(); if (!this.editor || !this.editor.hasModel()) { return; } this._setVisibleData(visibleData); this._hover.contentsDomNode.textContent = ''; this._hover.contentsDomNode.appendChild(node); this._hover.contentsDomNode.style.paddingBottom = ''; this._updateFont(); const containerDomNode = this.resizableContentWidget.getDomNode(); let height; // If the persisted size has already been found then set a maximum height and width if (!persistedSize) { this._hover.contentsDomNode.style.maxHeight = `${Math.max(this.editor.getLayoutInfo().height / 4, 250)}px`; this._hover.contentsDomNode.style.maxWidth = `${Math.max(this.editor.getLayoutInfo().width * 0.66, 500)}px`; this.onContentsChanged(); // Simply force a synchronous render on the editor // such that the widget does not really render with left = '0px' this.editor.render(); height = containerDomNode.clientHeight; } // When there is a persisted size then do not use a maximum height or width else { this._hover.contentsDomNode.style.maxHeight = 'none'; this._hover.contentsDomNode.style.maxWidth = 'none'; height = persistedSize.height; } // The dimensions of the document in which we are displaying the hover const bodyBox = dom.getClientArea(document.body); // Hard-coded in the hover.css file as 1.5em or 24px const minHeight = 24; // The full height is already passed in as a parameter const fullHeight = height; const editorBox = dom.getDomNodePagePosition(this.editor.getDomNode()); const mouseBox = this.editor.getScrolledVisiblePosition(visibleData.showAtPosition); // Position where the editor box starts + the top of the mouse box relatve to the editor + mouse box height const mouseBottom = editorBox.top + mouseBox.top + mouseBox.height; // Total height of the box minus the position of the bottom of the mouse, this is the maximum height below the mouse position const availableSpaceBelow = bodyBox.height - mouseBottom; // Max height below is the minimum of the available space below and the full height of the widget const maxHeightBelow = Math.min(availableSpaceBelow, fullHeight); // The available space above the mouse position is the height of the top of the editor plus the top of the mouse box relative to the editor const availableSpaceAbove = editorBox.top + mouseBox.top - 30; const maxHeightAbove = Math.min(availableSpaceAbove, fullHeight); // We find the maximum height of the widget possible on the top or on the bottom const maxHeight = Math.min(Math.max(maxHeightAbove, maxHeightBelow), fullHeight); if (height < minHeight) { height = minHeight; } if (height > maxHeight) { height = maxHeight; } // Determining whether we should render above or not ideally if (this.editor.getOption(EditorOption.hover).above) { this._renderingAbove = height <= maxHeightAbove ? ContentWidgetPositionPreference.ABOVE : ContentWidgetPositionPreference.BELOW; } else { this._renderingAbove = height <= maxHeightBelow ? ContentWidgetPositionPreference.BELOW : ContentWidgetPositionPreference.ABOVE; } // See https://github.com/microsoft/vscode/issues/140339 // TODO: Doing a second layout of the hover after force rendering the editor if (!persistedSize) { this.onContentsChanged(); } if (visibleData.stoleFocus) { this._hover.containerDomNode.focus(); } visibleData.colorPicker?.layout(); if (!this._visibleData) { return; } const clientHeight = this._hover.containerDomNode.clientHeight; const clientWidth = this._hover.containerDomNode.clientWidth; this.element.layout(clientHeight, clientWidth); this.resizableContentWidget.position = this._visibleData.showAtPosition; this.resizableContentWidget.secondaryPosition = this._visibleData.showAtSecondaryPosition; this.resizableContentWidget.preference = [this._renderingAbove]; this.resizableContentWidget.positionAffinity = this._visibleData.isBeforeContent ? PositionAffinity.LeftOfInjectedText : undefined; this.editor.layoutContentWidget(this.resizableContentWidget); this.editor.render(); console.log('At the end of showAt'); } public override hide(): void { this.element.clearSashHoverState(); if (this._visibleData) { const stoleFocus = this._visibleData.stoleFocus; this._setVisibleData(null); this.editor.layoutContentWidget(this.resizableContentWidget); if (stoleFocus) { this.editor.focus(); } } } // NEW public onContentsChanged(persistedSize?: dom.Dimension | undefined): void { console.log('Inside of onContentsChanged'); const containerDomNode = this.getDomNode(); const contentsDomNode = this.getContentsDomNode(); // Suppose a persisted size is defined if (persistedSize) { const widthMinusSash = Math.min(this.findMaximumRenderingWidth() ?? Infinity, persistedSize.width); // - SASH_WIDTH // const heightMinusSash = Math.min(this.findMaxRenderingHeight(this._renderingAbove) ?? Infinity, persistedSize.height - SASH_WIDTH); const heightMinusSash = Math.min(this.findMaximumRenderingHeight() ?? Infinity, persistedSize.height); // SASH_WIDTH // Already setting directly the height and width parameters containerDomNode.style.width = widthMinusSash + 'px'; containerDomNode.style.height = heightMinusSash + 'px'; contentsDomNode.style.width = widthMinusSash + 'px'; contentsDomNode.style.height = heightMinusSash + 'px'; } else { // Otherwise the height and width are set to auto containerDomNode.style.width = 'auto'; containerDomNode.style.height = 'auto'; contentsDomNode.style.width = 'auto'; contentsDomNode.style.height = 'auto'; } this.editor.layoutContentWidget(this.resizableContentWidget); this._hover.onContentsChanged(); const scrollDimensions = this._hover.scrollbar.getScrollDimensions(); const hasHorizontalScrollbar = (scrollDimensions.scrollWidth > scrollDimensions.width); if (hasHorizontalScrollbar) { // There is just a horizontal scrollbar const extraBottomPadding = `${this._hover.scrollbar.options.horizontalScrollbarSize}px`; let reposition = false; if (this._hover.contentsDomNode.style.paddingBottom !== extraBottomPadding) { this._hover.contentsDomNode.style.paddingBottom = extraBottomPadding; reposition = true; } const maxRenderingHeight = this.findMaximumRenderingHeight(); // Need the following code since we are using an exact height when using the persisted size. If not used the horizontal scrollbar would just not be visible. if (persistedSize && maxRenderingHeight) { containerDomNode.style.height = Math.min(maxRenderingHeight, persistedSize.height) + 'px'; // - SASH_WIDTH contentsDomNode.style.height = Math.min(maxRenderingHeight, persistedSize.height - SCROLLBAR_WIDTH) + 'px'; // - SASH_WIDTH reposition = true; } if (reposition) { this.editor.layoutContentWidget(this.resizableContentWidget); this._hover.onContentsChanged(); } } } // OLD FUNCTION /* public onContentsChanged(): void { this.editor.layoutContentWidget(this.resizableContentWidget); this._hover.onContentsChanged(); const scrollDimensions = this._hover.scrollbar.getScrollDimensions(); const hasHorizontalScrollbar = (scrollDimensions.scrollWidth > scrollDimensions.width); if (hasHorizontalScrollbar) { // There is just a horizontal scrollbar const extraBottomPadding = `${this._hover.scrollbar.options.horizontalScrollbarSize}px`; if (this._hover.contentsDomNode.style.paddingBottom !== extraBottomPadding) { this._hover.contentsDomNode.style.paddingBottom = extraBottomPadding; this.editor.layoutContentWidget(this.resizableContentWidget); this._hover.onContentsChanged(); } } } */ public clear(): void { this._hover.contentsDomNode.textContent = ''; } public focus(): void { this._hover.containerDomNode.focus(); } public scrollUp(): void { const scrollTop = this._hover.scrollbar.getScrollPosition().scrollTop; const fontInfo = this.editor.getOption(EditorOption.fontInfo); this._hover.scrollbar.setScrollPosition({ scrollTop: scrollTop - fontInfo.lineHeight }); } public scrollDown(): void { const scrollTop = this._hover.scrollbar.getScrollPosition().scrollTop; const fontInfo = this.editor.getOption(EditorOption.fontInfo); this._hover.scrollbar.setScrollPosition({ scrollTop: scrollTop + fontInfo.lineHeight }); } public scrollLeft(): void { const scrollLeft = this._hover.scrollbar.getScrollPosition().scrollLeft; this._hover.scrollbar.setScrollPosition({ scrollLeft: scrollLeft - this._horizontalScrollingBy }); } public scrollRight(): void { const scrollLeft = this._hover.scrollbar.getScrollPosition().scrollLeft; this._hover.scrollbar.setScrollPosition({ scrollLeft: scrollLeft + this._horizontalScrollingBy }); } public pageUp(): void { const scrollTop = this._hover.scrollbar.getScrollPosition().scrollTop; const scrollHeight = this._hover.scrollbar.getScrollDimensions().height; this._hover.scrollbar.setScrollPosition({ scrollTop: scrollTop - scrollHeight }); } public pageDown(): void { const scrollTop = this._hover.scrollbar.getScrollPosition().scrollTop; const scrollHeight = this._hover.scrollbar.getScrollDimensions().height; this._hover.scrollbar.setScrollPosition({ scrollTop: scrollTop + scrollHeight }); } public goToTop(): void { this._hover.scrollbar.setScrollPosition({ scrollTop: 0 }); } public goToBottom(): void { this._hover.scrollbar.setScrollPosition({ scrollTop: this._hover.scrollbar.getScrollDimensions().scrollHeight }); } public escape(): void { this.editor.focus(); } } export class ResizableContentHoverWidget extends ResizableContentWidget { public ID = 'editor.contrib.resizableContentHoverWidget'; private hoverDisposables = new DisposableStore(); constructor(resizableHoverWidget: ResizableHoverWidget, editor: ICodeEditor) { super(resizableHoverWidget, editor); console.log('Inside of resizable content hover widget'); } } class ContentHoverVisibleData { public closestMouseDistance: number | undefined = undefined; constructor( public readonly colorPicker: IEditorHoverColorPickerWidget | null, public readonly showAtPosition: Position, public readonly showAtSecondaryPosition: Position, public readonly preferAbove: boolean, public readonly stoleFocus: boolean, public readonly source: HoverStartSource, public readonly isBeforeContent: boolean, public initialMousePosX: number | undefined, public initialMousePosY: number | undefined, public readonly disposables: DisposableStore ) { } } function computeDistanceFromPointToRectangle(pointX: number, pointY: number, left: number, top: number, width: number, height: number): number { const x = (left + width / 2); // x center of rectangle const y = (top + height / 2); // y center of rectangle const dx = Math.max(Math.abs(pointX - x) - width / 2, 0); const dy = Math.max(Math.abs(pointY - y) - height / 2, 0); return Math.sqrt(dx * dx + dy * dy); } "} {"_id":"doc-en-vscode-ccafbca59e43e2c155d746015bb1da3c9ae59b9df9a3d69825cd57bc3f5a8091","title":"","text":"}, 'emmet.excludeLanguages': { 'type': 'array', 'default': [], 'default': ['markdown'], 'description': nls.localize('emmetExclude', \"An array of languages where emmet abbreviations should not be expanded.\") }, }"} {"_id":"doc-en-vscode-2f12b1a741b8f136aaeac337f5faae93fe34fa3b07227c7d8b45017e129d8459","title":"","text":"public show(configFileName: string, largeRoots: string, onExecute: () => void) { this._currentHint = { message: largeRoots.length > 0 ? localize('hintExclude', \"For better performance exclude folders with many files, like: {0}\", largeRoots) : localize('hintExclude.generic', \"For better performance exclude folders with many files.\"), ? localize('hintExclude', \"To enable JavaScript/TypeScript IntelliSense, exclude folders with many files, like: {0}\", largeRoots) : localize('hintExclude.generic', \"To enable JavaScript/TypeScript IntelliSense, exclude large folders with source files that you do not work on.\"), options: [{ title: localize('open', \"Configure Excludes\"), execute: () => {"} {"_id":"doc-en-vscode-6850b82036d9888886a0c8392020993c0cd0d8d941eeb06fb6bf482ff65a540d","title":"","text":"}; this._item.tooltip = this._currentHint.message; this._item.text = localize('large.label', \"Configure Excludes\"); this._item.tooltip = localize('hintExclude.tooltip', \"For better performance exclude folders with many files.\"); this._item.tooltip = localize('hintExclude.tooltip', \"To enable JavaScript/TypeScript IntelliSense, exclude large folders with source files that you do not work on.\"); this._item.color = '#A5DF3B'; this._item.show(); this._client.logTelemetry('js.hintProjectExcludes');"} {"_id":"doc-en-vscode-abbfc7b2bf93e8b05889dbfdd2ad1a2f666295453062bb81ee6af0ca3615eb1b","title":"","text":"} else if (enterAction.indentAction === IndentAction.Indent) { // Indent once executeCommand = TypeOperations.typeCommand(range, beforeText + 'n' + config.normalizeIndentation(indentation + 't' + enterAction.appendText), keepPosition); executeCommand = TypeOperations.typeCommand(range, beforeText + 'n' + config.normalizeIndentation(indentation + enterAction.appendText), keepPosition); } else if (enterAction.indentAction === IndentAction.IndentOutdent) { // Ultra special let normalIndent = config.normalizeIndentation(indentation); let increasedIndent = config.normalizeIndentation(indentation + 't' + enterAction.appendText); let increasedIndent = config.normalizeIndentation(indentation + enterAction.appendText); let typeText = beforeText + 'n' + increasedIndent + 'n' + normalIndent;"} {"_id":"doc-en-vscode-57a545c79e9c12fef8dfa56252731d538d26c5bef0c46f413cb4e7e99c5716d9","title":"","text":"if (!enterResult) { enterResult = { indentAction: IndentAction.None, appendText: '' }; } else { // Here we add `t` to appendText first because enterAction is leveraging appendText and removeText to change indentation. if (!enterResult.appendText) { enterResult.appendText = ''; if ( (enterResult.indentAction === IndentAction.Indent) || (enterResult.indentAction === IndentAction.IndentOutdent) ) { enterResult.appendText = 't'; } else { enterResult.appendText = ''; } } }"} {"_id":"doc-en-vscode-0fc04f62d8d00e404247744c83ce4b062884902b6238bbc51971ffa47d506c10","title":"","text":"}); ptyProcess.on('exit', function (exitCode) { ptyProcess.kill(); process.exit(exitCode); });"} {"_id":"doc-en-vscode-a0772aab5998ebfb8536cbadcb6941cd8d9c80eaa1c518f7cf1986a6476a4ace","title":"","text":"const pathSeparatorClause = '/'; const excludedPathCharactersClause = '[^0s!$`&*()[]+'\":;]'; // '\":; are allowed in paths but they are often separators so ignore them const escapedExcludedPathCharactersClause = '(s|!|$|`|&|*|(|)|+)'; /** A regex that matches paths in the form /path, ~/path, ./path, ../path */ const UNIX_LIKE_LOCAL_LINK_REGEX = new RegExp('(' + pathPrefix + '?(' + pathSeparatorClause + '(' + excludedPathCharactersClause + '|' + escapedExcludedPathCharactersClause + ')+)+)'); const winPathPrefix = '([a-zA-Z]:|..?|~)'; /** A regex that matches paths in the form /foo, ~/foo, ./foo, ../foo, foo/bar */ const UNIX_LIKE_LOCAL_LINK_REGEX = new RegExp('((' + pathPrefix + '|(' + excludedPathCharactersClause + '|' + escapedExcludedPathCharactersClause + ')+)?(' + pathSeparatorClause + '(' + excludedPathCharactersClause + '|' + escapedExcludedPathCharactersClause + ')+)+)'); const winDrivePrefix = '[a-zA-Z]:'; const winPathPrefix = '(' + winDrivePrefix + '|..?|~)'; const winPathSeparatorClause = '(|/)'; const winExcludedPathCharactersClause = '[^0<>?|/s!$`&*()[]+'\":;]'; /** A regex that matches paths in the form c:path, ~path, .path */ const WINDOWS_LOCAL_LINK_REGEX = new RegExp('(' + winPathPrefix + '?(' + winPathSeparatorClause + '(' + winExcludedPathCharactersClause + ')+)+)'); /** A regex that matches paths in the form c:foo, ~foo, .foo, ..foo, foobar */ const WINDOWS_LOCAL_LINK_REGEX = new RegExp('((' + winPathPrefix + '|(' + winExcludedPathCharactersClause + ')+)?(' + winPathSeparatorClause + '(' + winExcludedPathCharactersClause + ')+)+)'); /** Higher than local link, lower than hypertext */ const CUSTOM_LINK_PRIORITY = -1; /** Lowest */"} {"_id":"doc-en-vscode-f0cad3044295844a033d7d4b8b9f57fb012cdd2e79fa50fbd216e51c831c7bba","title":"","text":"}); } private _resolvePath(link: string): TPromise { protected _preprocessPath(link: string): string { if (this._platform === platform.Platform.Windows) { // Resolve ~ -> %HOMEDRIVE%%HOMEPATH% if (link.charAt(0) === '~') { if (!process.env.HOMEDRIVE || !process.env.HOMEPATH) { return TPromise.as(void 0); return null; } link = `${process.env.HOMEDRIVE}${process.env.HOMEPATH + link.substring(1)}`; } } else { // Resolve workspace path . / .. -> /. / // Resolve relative paths (.a, ..a, ~a, ab) if (!link.match('^' + winDrivePrefix)) { if (!this._contextService.hasWorkspace()) { // Abort if no workspace is open return TPromise.as(void 0); return null; } link = path.join(this._contextService.getWorkspace().resource.fsPath, link); } } // Resolve workspace path . / .. -> /. / // Resolve workspace path . | .. | -> /. | /.. | / else if (link.charAt(0) !== '/' && link.charAt(0) !== '~') { if (!this._contextService.hasWorkspace()) { // Abort if no workspace is open return TPromise.as(void 0); return null; } link = path.join(this._contextService.getWorkspace().resource.fsPath, link); } return link; } private _resolvePath(link: string): TPromise { link = this._preprocessPath(link); if (!link) { return TPromise.as(void 0); } // Open an editor if the path exists return pfs.fileExists(link).then(isFile => {"} {"_id":"doc-en-vscode-0563f3a546443edb8bf59830787ae83c46b34faca9432422274b45fb440c3a71","title":"","text":"import * as assert from 'assert'; import { Platform } from 'vs/base/common/platform'; import { TerminalLinkHandler } from 'vs/workbench/parts/terminal/electron-browser/terminalLinkHandler'; import { IWorkspace, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import URI from 'vs/base/common/uri'; import * as path from 'path'; import * as sinon from 'sinon'; class TestTerminalLinkHandler extends TerminalLinkHandler { public get localLinkRegex(): RegExp { return this._localLinkRegex; } public preprocessPath(link: string): string { return this._preprocessPath(link); } } class TestXterm {"} {"_id":"doc-en-vscode-1d78782a8e09508091d2f237c95b35cac48f45747455331a21bd9e18468d17bb","title":"","text":"public setHypertextValidationCallback() { } } class TestURI extends URI { constructor(private _fakePath: string) { super(); }; get fsPath(): string { return this._fakePath; } } class TestWorkspace implements IWorkspace { resource: URI; constructor(basePath: string) { this.resource = new TestURI(basePath); } } suite('Workbench - TerminalLinkHandler', () => { suite('localLinkRegex', () => { test('Windows', () => {"} {"_id":"doc-en-vscode-f9cfb048a6b33256730912489c6364dd27aad13273eb8fd17970a188444688d5","title":"","text":"testLink('c:/a/long/path'); testLink('c:alongpath'); testLink('c:mixed/slashpath'); testLink('a/relative/path'); }); test('Linux', () => {"} {"_id":"doc-en-vscode-623ddc1a3321d69a1eb3e31fc65f2fc5f6cd26e773d19c55f95723eee03a4085","title":"","text":"testLink('./foo'); testLink('../foo'); testLink('/a/long/path'); testLink('a/relative/path'); }); }); suite('preprocessPath', () => { test('Windows', () => { const linkHandler = new TestTerminalLinkHandler(null, new TestXterm(), Platform.Windows, null, new WorkspaceContextService(new TestWorkspace('C:base'))); let stub = sinon.stub(path, 'join', function (arg1, arg2) { return arg1 + '' + arg2; }); assert.equal(linkHandler.preprocessPath('./src/file1'), 'C:base./src/file1'); assert.equal(linkHandler.preprocessPath('srcfile2'), 'C:basesrcfile2'); assert.equal(linkHandler.preprocessPath('C:absolutepathfile3'), 'C:absolutepathfile3'); stub.restore(); }); test('Linux', () => { const linkHandler = new TestTerminalLinkHandler(null, new TestXterm(), Platform.Linux, null, new WorkspaceContextService(new TestWorkspace('/base'))); let stub = sinon.stub(path, 'join', function (arg1, arg2) { return arg1 + '/' + arg2; }); assert.equal(linkHandler.preprocessPath('./src/file1'), '/base/./src/file1'); assert.equal(linkHandler.preprocessPath('src/file2'), '/base/src/file2'); assert.equal(linkHandler.preprocessPath('/absolute/path/file3'), '/absolute/path/file3'); stub.restore(); }); test('No Workspace', () => { const linkHandler = new TestTerminalLinkHandler(null, new TestXterm(), Platform.Linux, null, new WorkspaceContextService(null)); assert.equal(linkHandler.preprocessPath('./src/file1'), null); assert.equal(linkHandler.preprocessPath('src/file2'), null); assert.equal(linkHandler.preprocessPath('/absolute/path/file3'), '/absolute/path/file3'); }); }); }); No newline at end of file"} {"_id":"doc-en-vscode-2cc5ba4db4d00aec0aab5f4714b382470ea7fa5b8f11ee2bd8544e3b966d856c","title":"","text":"} export class TerminalInstance implements ITerminalInstance { private static readonly EOL_REGEX = /r?n/g; private static readonly WINDOWS_EOL_REGEX = /r?n/g; private static _terminalProcessFactory: ITerminalProcessFactory = new StandardTerminalProcessFactory(); private static _lastKnownDimensions: Dimension = null;"} {"_id":"doc-en-vscode-40cac31e8f2d7246e1034c26ef0e152e383db68704cb606dc830552c6d0ec11d","title":"","text":"} public sendText(text: string, addNewLine: boolean): void { if (addNewLine && text.substr(text.length - os.EOL.length) !== os.EOL) { text += os.EOL; text = this._sanitizeInput(text); if (addNewLine && text.substr(text.length - 1) !== 'r') { text += 'r'; } this._process.send({ event: 'input',"} {"_id":"doc-en-vscode-02a3ce0bffec8dfb00d56bf07bdce1a0ee5e2f4d70a57a27b1f6c5aba477d3d3","title":"","text":"} private _sanitizeInput(data: any) { return typeof data === 'string' ? data.replace(TerminalInstance.EOL_REGEX, os.EOL) : data; return typeof data === 'string' ? data.replace(TerminalInstance.WINDOWS_EOL_REGEX, 'r') : data; } protected _getCwd(shell: IShellLaunchConfig, workspace: IWorkspace): string {"} {"_id":"doc-en-vscode-229ad0ad8d208e75e6952cb084f7c912ae0835a7d6343a940848f5e11b6bd2cb","title":"","text":"*--------------------------------------------------------------------------------------------*/ import uri from 'vs/base/common/uri'; import * as paths from 'vs/base/common/paths'; import { localize } from 'vs/nls'; import { TPromise } from 'vs/base/common/winjs.base'; import { guessMimeTypes, MIME_TEXT } from 'vs/base/common/mime';"} {"_id":"doc-en-vscode-01ea4cc64284a4b41729bd28e69965cebd893825c0f6bbd69a84ab3ab92450d9","title":"","text":"return TPromise.wrapError(localize('unable', \"Unable to resolve the resource without a debug session\")); } const source = process.sources.get(resource.toString()); const rawSource = source ? source.raw : { path: paths.normalize(resource.fsPath, true) }; let rawSource: DebugProtocol.Source; if (source) { rawSource = source.raw; } else { // Remove debug: scheme rawSource = { path: resource.with({ scheme: '' }).toString(true) }; } return process.session.source({ sourceReference: source ? source.reference : undefined, source: rawSource }).then(response => { const mime = response.body.mimeType || guessMimeTypes(resource.toString())[0];"} {"_id":"doc-en-vscode-bfa9ec9d323eab34c983011887bcd480f31d7f7f3987c8c5592581db6b9b4a30","title":"","text":"return ''; } private get selectedText(): string { const activeEditor = this.editorService.getActiveEditor(); if (activeEditor) { const editorControl = (activeEditor.getControl()); if (editorControl) { const editorModel = editorControl.getModel(); const editorSelection = editorControl.getSelection(); if (editorModel && editorSelection) { return editorModel.getValueInRange(editorSelection); } } } return ''; } private getFilePath(): string { let input = this.editorService.getActiveEditorInput(); if (input instanceof DiffEditorInput) {"} {"_id":"doc-en-vscode-fbbdccd8bc4033e6e95bc4eb2fea3db842d3a7ceb6035d12494601a287da1626","title":"","text":"assert.strictEqual(configurationResolverService.resolve(workspace, 'abc ${lineNumber} xyz'), `abc ${editorService.mockLineNumber} xyz`); }); test('current selected text', () => { assert.strictEqual(configurationResolverService.resolve(workspace, 'abc ${selectedText} xyz'), `abc ${editorService.mockSelectedText} xyz`); }); test('substitute many', () => { if (platform.isWindows) { assert.strictEqual(configurationResolverService.resolve(workspace, '${workspaceFolder} - ${workspaceFolder}'), 'VSCodeworkspaceLocation - VSCodeworkspaceLocation');"} {"_id":"doc-en-vscode-b72ebd4472fdcd84ac50c5b566760938713778d907ce1162af65e5e96f2a11ab","title":"","text":"public activeEditorOptions: IEditorOptions; public activeEditorPosition: Position; public mockLineNumber: number; public mockSelectedText: string; private callback: (method: string) => void; constructor(callback?: (method: string) => void) { this.callback = callback || ((s: string) => { }); this.mockLineNumber = 15; this.mockSelectedText = 'selected text'; } public openEditors(inputs: any[]): Promise {"} {"_id":"doc-en-vscode-3ff1d64b9ee3e7a1a02c33ff8f54b0e6f3e002f3628799237a230a0bf63da909","title":"","text":"getId: () => { return null; }, getControl: () => { return { getSelection: () => { return { positionLineNumber: this.mockLineNumber }; } getSelection: () => { return { positionLineNumber: this.mockLineNumber }; }, getModel: () => { return { getValueInRange: () => this.mockSelectedText }; } }; }, focus: () => { },"} {"_id":"doc-en-vscode-4d2a827dc3434b0f1dbb06ac32812f4e763311394d83b21349ca8ea9c56c25e2","title":"","text":") { super(null, action, [], 0); this.toDispose.push(this.outputService.onOutputChannel(() => this.setOptions(this.getOptions(), this.getSelected(undefined)))); this.toDispose.push(this.outputService.onOutputChannel(() => { const activeChannelIndex = this.getSelected(this.outputService.getActiveChannel().id); this.setOptions(this.getOptions(), activeChannelIndex); })); this.toDispose.push(this.outputService.onActiveOutputChannel(activeChannelId => this.setOptions(this.getOptions(), this.getSelected(activeChannelId)))); this.toDispose.push(attachSelectBoxStyler(this.selectBox, themeService));"} {"_id":"doc-en-vscode-d1f6dc4beb6743c592913a9e5046330f2bfda2598b3b8c90f778f38200429540","title":"","text":"display: flex; padding: 4px; align-items: center; width: 220px; max-width: calc(100% - 28px - 28px - 8px); -webkit-transition: top 200ms linear; -o-transition: top 200ms linear;"} {"_id":"doc-en-vscode-de14a099ae1a7b3a26195af9c7c61aa6d1956f38130ce7812cb10fc0a4824da6","title":"","text":"top: 0; } .monaco-workbench .simple-find-part .monaco-findInput { flex: 1; } /* Temporarily we don't show match numbers */ .monaco-workbench .simple-find-part .monaco-findInput .controls { display: none;"} {"_id":"doc-en-vscode-88398a87a2de4cbf4cd2ce9149329b904b26f66475a0dc449c1a6bacddaf9ebe","title":"","text":") { super(); this._findInput = this._register(new FindInput(null, this._contextViewService, { width: 155, label: NLS_FIND_INPUT_LABEL, placeholder: NLS_FIND_INPUT_\", }));"} {"_id":"doc-en-vscode-5977c2cc7b16cb656f0dc56ad56daf19e4dba975b7423b78f2aac16facd03f44","title":"","text":"* * @param listener The listener function which takes the processes' data stream (including * ANSI escape sequences). * * @deprecated onLineData will replace this. */ onData(listener: (data: string) => void): IDisposable; /** * Attach a listener to listen for new lines added to this terminal instance. * * @param listener The listener function which takes new line strings added to the terminal, * excluding ANSI escape sequences. The line event will fire when an LF character is added to * the terminal (ie. the line is not wrapped), note that this means taht the line data will * never fire for the last line, until the line is ended with a LF character. The lineData * string will contain the fully wrapped line, not containing any LF/CR characters. */ onLineData(listener: (lineData: string) => void): IDisposable; /** * Attach a listener that fires when the terminal's pty process exits. * * @param listener The listener function which takes the processes' exit code, an exit code of"} {"_id":"doc-en-vscode-c57c1f2a52c12dc5f88060a420f0967618f112ae7e2150737921db4d4f33ca8c","title":"","text":"}; } public onLineData(listener: (lineData: string) => void): lifecycle.IDisposable { if (!this._xterm) { throw new Error('xterm must be initialized'); } const lineFeedListener = () => { const buffer = (this._xterm.buffer); const newLine = buffer.lines.get(buffer.ybase + buffer.y); if (!newLine.isWrapped) { let i = buffer.ybase + buffer.y - 1; let lineData = buffer.translateBufferLineToString(i, true); while (i >= 0 && buffer.lines.get(i--).isWrapped) { lineData = buffer.translateBufferLineToString(i, true) + lineData; } listener(lineData); } }; this._xterm.on('lineFeed', lineFeedListener); return { dispose: () => { if (this._xterm) { this._xterm.off('lineFeed', lineFeedListener); } } }; } public onExit(listener: (exitCode: number) => void): lifecycle.IDisposable { if (this._process) { this._process.on('exit', listener);"} {"_id":"doc-en-vscode-6d023fd56ee44dfd1d266c7d888b01543028949a7d4589e4cc94b0792235e3f2","title":"","text":"const text = data.contents.join('n'); const newDocument = new DOMParser().parseFromString(text, 'text/html'); newDocument.querySelectorAll('a').forEach(a => { if (!a.title) { a.title = a.href; } }); // set base-url if applicable if (initData.baseUrl && newDocument.head.getElementsByTagName('base').length === 0) { const baseElement = newDocument.createElement('base');"} {"_id":"doc-en-vscode-6a6b05e93cb4615ee07b8aababf2f7124abebc69929d17e505f16ae8ba8a82a7","title":"","text":"position: absolute; bottom: 0; top: 0; padding-bottom: 2px; } .monaco-workbench .panel.integrated-terminal .xterm a:not(.xterm-invalid-link) {"} {"_id":"doc-en-vscode-6e4b1b58badb25473113a68f5aec7f64cc7e5cb49aead337a4b9dec3524de015","title":"","text":"} const padding = parseInt(getComputedStyle(document.querySelector('.terminal-outer-container')).paddingLeft.split('px')[0], 10); const paddingBottom = parseInt(getComputedStyle(document.querySelector('.terminal-wrapper.active')).paddingBottom.split('px')[0], 10); // Use left padding as right padding, right padding is not defined in CSS just in case // xterm.js causes an unexpected overflow. const innerWidth = width - padding * 2; TerminalInstance._lastKnownDimensions = new Dimension(innerWidth, height); const innerHeight = height - paddingBottom; TerminalInstance._lastKnownDimensions = new Dimension(innerWidth, innerHeight); return TerminalInstance._lastKnownDimensions; }"} {"_id":"doc-en-vscode-15c52aab163d8e76fc62dd0896d507c8b78bcf004e95fc5cf136e38d1bfe8e84","title":"","text":"dom.addClass(this._wrapperElement, 'terminal-wrapper'); this._xtermElement = document.createElement('div'); // Attach the xterm object to the DOM, exposing it to the smoke tests (this._wrapperElement).xterm = this._xterm; this._xterm.open(this._xtermElement); this._xterm.attachCustomKeyEventHandler((event: KeyboardEvent) => { // Disable all input if the terminal is exiting"} {"_id":"doc-en-vscode-4b694bae90d96ba4bc4575f9d9adb124e98b0274c1c08a61b4a68202e55dd56d","title":"","text":"import { SpectronApplication } from '../../spectron/application'; export class Terminal { static TERMINAL_SELECTOR = '.panel.integrated-terminal'; static TERMINAL_ROWS_SELECTOR = `${Terminal.TERMINAL_SELECTOR} .xterm-rows > div`; static TERMINAL_CURSOR = `${Terminal.TERMINAL_SELECTOR} .terminal-cursor`; const PANEL_SELECTOR = 'div[id=\"workbench.panel.terminal\"]'; const XTERM_SELECTOR = `${PANEL_SELECTOR} .terminal-wrapper`; export class Terminal { constructor(private spectron: SpectronApplication) { } public async showTerminal(): Promise { if (!await this.isVisible()) { await this.spectron.workbench.quickopen.runCommand('View: Toggle Integrated Terminal'); await this.spectron.client.waitForElement(Terminal.TERMINAL_CURSOR); await this.spectron.client.waitForElement(XTERM_SELECTOR); await this.waitForTerminalText(text => text.length > 0, 'Waiting for Terminal to be ready'); } } public async isVisible(): Promise { const element = await this.spectron.client.element(Terminal.TERMINAL_SELECTOR); const element = await this.spectron.client.element(PANEL_SELECTOR); return !!element; }"} {"_id":"doc-en-vscode-1b6f1bab9159ce50873bab80b6ec83905b62dae0d572344b4c96c68fbcde4290","title":"","text":"} private async getTerminalText(): Promise { const linesText: string[] = await this.spectron.webclient.selectorExecute(Terminal.TERMINAL_ROWS_SELECTOR, div => (Array.isArray(div) ? div : [div]) .map(element => { function getTextFromAll(spanElements: NodeList): string { let text = ''; for (let i = 0; i < spanElements.length; i++) { text += getText(spanElements.item(i) as HTMLElement); } return text; } function getText(spanElement: HTMLElement): string { if (spanElement.hasChildNodes()) { return getTextFromAll(spanElement.childNodes); } return spanElement.textContent || ''; } return getTextFromAll(element.querySelectorAll('span')); })); let lastLineIndex = 0; for (let index = 0; index < linesText.length; index++) { if (linesText[index].trim()) { lastLineIndex = index; return await this.spectron.webclient.selectorExecute(XTERM_SELECTOR, div => { const xterm = ((Array.isArray(div) ? div[0] : div)).xterm; const buffer = xterm.buffer; const lines: string[] = []; for (let i = 0; i < buffer.lines.length; i++) { lines.push(buffer.translateBufferLineToString(i, true)); } return lines; } } return linesText.slice(0, lastLineIndex + 1); ); } } No newline at end of file"} {"_id":"doc-en-vscode-90765122f038c83be65ba2eedebf7733f14d65c08bfef1df52ee1dbc4bb78646","title":"","text":"if (ref === '~') { const fileUri = Uri.file(path); const uriString = fileUri.toString(); const [indexStatus] = repository.indexGroup.resourceStates.filter(r => r.original.toString() === uriString); const [indexStatus] = repository.indexGroup.resourceStates.filter(r => r.resourceUri.toString() === uriString); ref = indexStatus ? '' : 'HEAD'; }"} {"_id":"doc-en-vscode-0edba7bd76637e4fc3d73ba9ef93e54a282f0d8e9287efb0872b5eaaa9cb7789","title":"","text":"\"Import external module.\": { \"prefix\": \"import statement\", \"body\": [ \"import ${1:name} = require('$0');\" \"import { $0 } from \"${1:module}\";\" ], \"description\": \"Import external module.\" },"} {"_id":"doc-en-vscode-62ff40c91334a9ae1b62b6aef7d08644d4dd5cd087d51b1b06f1645db94295ef","title":"","text":"if (offset + needleLength > haystackLength) { return false; } const haystackUpper = haystack.toUpperCase(); const needleUpper = needle.toUpperCase(); for (let i = 0; i < needleLength; i++) { if (haystack.charCodeAt(offset + i) !== needle.charCodeAt(i)) { if (haystackUpper.charCodeAt(offset + i) !== needleUpper.charCodeAt(i)) { return false; } }"} {"_id":"doc-en-vscode-2cf9ce1743d5095d49cfceee43559f025644efafb2a0afbdf5611e8c1d7ba4f9","title":"","text":"}, \"css.webkitProperties\": { \"type\": \"string\", \"default\": \"\", \"default\": \"animation, animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, appearance, backface-visibility, background-clip, background-composite, background-origin, background-size, border-fit, border-horizontal-spacing, border-image, border-vertical-spacing, box-align, box-direction, box-flex, box-flex-group, box-lines, box-ordinal-group, box-orient, box-pack, box-reflect, box-shadow, color-correction, column-break-after, column-break-before, column-break-inside, column-count, column-gap, column-rule-color, column-rule-style, column-rule-width, column-span, column-width, dashboard-region, font-smoothing, highlight, hyphenate-character, hyphenate-limit-after, hyphenate-limit-before, hyphens, line-box-contain, line-break, line-clamp, locale, margin-before-collapse, margin-after-collapse, marquee-direction, marquee-increment, marquee-repetition, marquee-style, mask-attachment, mask-box-image, mask-box-image-outset, mask-box-image-repeat, mask-box-image-slice, mask-box-image-source, mask-box-image-width, mask-clip, mask-composite, mask-image, mask-origin, mask-position, mask-repeat, mask-size, nbsp-mode, perspective, perspective-origin, rtl-ordering, text-combine, text-decorations-in-effect, text-emphasis-color, text-emphasis-position, text-emphasis-style, text-fill-color, text-orientation, text-security, text-stroke-color, text-stroke-width, transform, transition, transform-origin, transform-style, transition-delay, transition-duration, transition-property, transition-timing-function, user-drag, user-modify, user-select, writing-mode, svg-shadow, box-sizing, border-radius\", \"description\": \"%emmetPreferencesCssWebkitProperties%\" }, \"css.mozProperties\": { \"type\": \"string\", \"default\": \"\", \"default\": \"animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, appearance, backface-visibility, background-inline-policy, binding, border-bottom-colors, border-image, border-left-colors, border-right-colors, border-top-colors, box-align, box-direction, box-flex, box-ordinal-group, box-orient, box-pack, box-shadow, box-sizing, column-count, column-gap, column-rule-color, column-rule-style, column-rule-width, column-width, float-edge, font-feature-settings, font-language-override, force-broken-image-icon, hyphens, image-region, orient, outline-radius-bottomleft, outline-radius-bottomright, outline-radius-topleft, outline-radius-topright, perspective, perspective-origin, stack-sizing, tab-size, text-blink, text-decoration-color, text-decoration-line, text-decoration-style, text-size-adjust, transform, transform-origin, transform-style, transition, transition-delay, transition-duration, transition-property, transition-timing-function, user-focus, user-input, user-modify, user-select, window-shadow, background-clip, border-radius\", \"description\": \"%emmetPreferencesCssMozProperties%\" }, \"css.oProperties\": { \"type\": \"string\", \"default\": \"\", \"default\": \"dashboard-region, animation, animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, border-image, link, link-source, object-fit, object-position, tab-size, table-baseline, transform, transform-origin, transition, transition-delay, transition-duration, transition-property, transition-timing-function, accesskey, input-format, input-required, marquee-dir, marquee-loop, marquee-speed, marquee-style\", \"description\": \"%emmetPreferencesCssOProperties%\" }, \"css.msProperties\": { \"type\": \"string\", \"default\": \"\", \"default\": \"accelerator, backface-visibility, background-position-x, background-position-y, behavior, block-progression, box-align, box-direction, box-flex, box-line-progression, box-lines, box-ordinal-group, box-orient, box-pack, content-zoom-boundary, content-zoom-boundary-max, content-zoom-boundary-min, content-zoom-chaining, content-zoom-snap, content-zoom-snap-points, content-zoom-snap-type, content-zooming, filter, flow-from, flow-into, font-feature-settings, grid-column, grid-column-align, grid-column-span, grid-columns, grid-layer, grid-row, grid-row-align, grid-row-span, grid-rows, high-contrast-adjust, hyphenate-limit-chars, hyphenate-limit-lines, hyphenate-limit-zone, hyphens, ime-mode, interpolation-mode, layout-flow, layout-grid, layout-grid-char, layout-grid-line, layout-grid-mode, layout-grid-type, line-break, overflow-style, perspective, perspective-origin, perspective-origin-x, perspective-origin-y, scroll-boundary, scroll-boundary-bottom, scroll-boundary-left, scroll-boundary-right, scroll-boundary-top, scroll-chaining, scroll-rails, scroll-snap-points-x, scroll-snap-points-y, scroll-snap-type, scroll-snap-x, scroll-snap-y, scrollbar-arrow-color, scrollbar-base-color, scrollbar-darkshadow-color, scrollbar-face-color, scrollbar-highlight-color, scrollbar-shadow-color, scrollbar-track-color, text-align-last, text-autospace, text-justify, text-kashida-space, text-overflow, text-size-adjust, text-underline-position, touch-action, transform, transform-origin, transform-origin-x, transform-origin-y, transform-origin-z, transform-style, transition, transition-delay, transition-duration, transition-property, transition-timing-function, user-select, word-break, wrap-flow, wrap-margin, wrap-through, writing-mode\", \"description\": \"%emmetPreferencesCssMsProperties%\" } }"} {"_id":"doc-en-vscode-838f421d06a09380b7ef00a1bfa9d870de7ed1cd80b9d81b885da8c136240e75","title":"","text":": nls.localize('links.command', \"Ctrl + click to execute command\") ); const HOVER_MESSAGE_GENERAL_ALT = new MarkdownString().appendText(nls.localize('links.navigate.al', \"Alt + click to follow link\")); const HOVER_MESSAGE_COMMAND_ALT = new MarkdownString().appendText(nls.localize('links.command.al', \"Alt + click to execute command\")); const HOVER_MESSAGE_GENERAL_ALT = new MarkdownString().appendText( platform.isMacintosh ? nls.localize('links.navigate.al.mac', \"Option + click to follow link\") : nls.localize('links.navigate.al', \"Alt + click to follow link\") ); const HOVER_MESSAGE_COMMAND_ALT = new MarkdownString().appendText( platform.isMacintosh ? nls.localize('links.command.al.mac', \"Option + click to execute command\") : nls.localize('links.command.al', \"Alt + click to execute command\") ); const decoration = { meta: ModelDecorationOptions.register({"} {"_id":"doc-en-vscode-abaa047ebc3a15540c519d2b2e0609c343e35bc609e3fb84b3cb31faee08b34f","title":"","text":"const position = this.validatePosition(_position); const lineContent = this.getLineContent(position.lineNumber); const lineTokens = this._getLineTokens(position.lineNumber); const offset = position.column - 1; const tokenIndex = lineTokens.findTokenIndexAtOffset(offset); const tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1); // (1). First try checking right biased word const [rbStartOffset, rbEndOffset] = TextModel._findLanguageBoundaries(lineTokens, tokenIndex); const rightBiasedWord = getWordAtText( position.column, LanguageConfigurationRegistry.getWordDefinition(lineTokens.getLanguageId(tokenIndex)), lineContent.substring(rbStartOffset, rbEndOffset), rbStartOffset ); if (rightBiasedWord) { return rightBiasedWord; } // (2). Else, if we were at a language boundary, check the left biased word if (tokenIndex > 0 && rbStartOffset === position.column - 1) { // edge case, where `position` sits between two tokens belonging to two different languages const [lbStartOffset, lbEndOffset] = TextModel._findLanguageBoundaries(lineTokens, tokenIndex - 1); const leftBiasedWord = getWordAtText( position.column, LanguageConfigurationRegistry.getWordDefinition(lineTokens.getLanguageId(tokenIndex - 1)), lineContent.substring(lbStartOffset, lbEndOffset), lbStartOffset ); if (leftBiasedWord) { return leftBiasedWord; } } return null; } private static _findLanguageBoundaries(lineTokens: LineTokens, tokenIndex: number): [number, number] { const languageId = lineTokens.getLanguageId(tokenIndex); // go left until a different language is hit"} {"_id":"doc-en-vscode-badca6e4a5643c150668e546ec9080be3204aff31181686e7ccb790bad30a768","title":"","text":"endOffset = lineTokens.getEndOffset(i); } return getWordAtText( position.column, LanguageConfigurationRegistry.getWordDefinition(languageId), lineContent.substring(startOffset, endOffset), startOffset ); return [startOffset, endOffset]; } public getWordUntilPosition(position: IPosition): model.IWordAtPosition {"} {"_id":"doc-en-vscode-de48735072bc58b7295e2d582cf9fafbedb25f0626d7bff98695584b2c914137","title":"","text":"} const pos = editor.getPosition(); model.tokenizeIfCheap(pos.lineNumber); const word = model.getWordAtPosition(pos); if (!word) { return false;"} {"_id":"doc-en-vscode-b2326884104213705ecedba9f0514123fcaafc3dee5f4cb162e81b726dcf0e0d","title":"","text":"import * as assert from 'assert'; import { Event } from 'vs/base/common/event'; import URI from 'vs/base/common/uri'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IDisposable, dispose, Disposable } from 'vs/base/common/lifecycle'; import { TextModel } from 'vs/editor/common/model/textModel'; import { Handler } from 'vs/editor/common/editorCommon'; import { ISuggestSupport, ISuggestResult, SuggestRegistry, SuggestTriggerKind } from 'vs/editor/common/modes'; import { ISuggestSupport, ISuggestResult, SuggestRegistry, SuggestTriggerKind, LanguageIdentifier, TokenizationRegistry, IState, MetadataConsts } from 'vs/editor/common/modes'; import { SuggestModel, LineContext } from 'vs/editor/contrib/suggest/suggestModel'; import { TestCodeEditor, MockScopeLocation } from 'vs/editor/test/browser/testCodeEditor'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';"} {"_id":"doc-en-vscode-8ba76b3c94dceed37ba7a8e6e2995c648686452fe30cff26bf658bc1f89fba42","title":"","text":"import { IStorageService, NullStorageService } from 'vs/platform/storage/common/storage'; import { SnippetController2 } from 'vs/editor/contrib/snippet/snippetController2'; import { ISelectedSuggestion } from 'vs/editor/contrib/suggest/suggestWidget'; import { MockMode } from 'vs/editor/test/common/mocks/mockMode'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { TokenizationResult2 } from 'vs/editor/common/core/token'; import { NULL_STATE } from 'vs/editor/common/modes/nullMode'; function createMockEditor(model: TextModel): TestCodeEditor { const contextKeyService = new MockContextKeyService();"} {"_id":"doc-en-vscode-c11c7883e95eae3228317b384d37c44d25c83ae7635c61d11d5201ec8034d13e","title":"","text":"} suite('SuggestModel - Context', function () { const OUTER_LANGUAGE_ID = new LanguageIdentifier('outerMode', 3); const INNER_LANGUAGE_ID = new LanguageIdentifier('innerMode', 4); class OuterMode extends MockMode { constructor() { super(OUTER_LANGUAGE_ID); this._register(LanguageConfigurationRegistry.register(this.getLanguageIdentifier(), {})); this._register(TokenizationRegistry.register(this.getLanguageIdentifier().language, { getInitialState: (): IState => NULL_STATE, tokenize: undefined, tokenize2: (line: string, state: IState): TokenizationResult2 => { const tokensArr: number[] = []; let prevLanguageId: LanguageIdentifier = undefined; for (let i = 0; i < line.length; i++) { const languageId = (line.charAt(i) === 'x' ? INNER_LANGUAGE_ID : OUTER_LANGUAGE_ID); if (prevLanguageId !== languageId) { tokensArr.push(i); tokensArr.push((languageId.id << MetadataConsts.LANGUAGEID_OFFSET)); } prevLanguageId = languageId; } const tokens = new Uint32Array(tokensArr.length); for (let i = 0; i < tokens.length; i++) { tokens[i] = tokensArr[i]; } return new TokenizationResult2(tokens, state); } })); } } let model: TextModel; class InnerMode extends MockMode { constructor() { super(INNER_LANGUAGE_ID); this._register(LanguageConfigurationRegistry.register(this.getLanguageIdentifier(), {})); } } setup(function () { model = TextModel.createFromString('Das Pferd frisst keinen Gurkensalat - Philipp Reis 1861.nWer hat's erfunden?'); const assertAutoTrigger = (model: TextModel, offset: number, expected: boolean, message?: string): void => { const pos = model.getPositionAt(offset); const editor = createMockEditor(model); editor.setPosition(pos); assert.equal(LineContext.shouldAutoTrigger(editor), expected, message); editor.dispose(); }; let disposables: Disposable[] = []; setup(() => { disposables = []; }); teardown(function () { model.dispose(); dispose(disposables); disposables = []; }); test('Context - shouldAutoTrigger', function () { const model = TextModel.createFromString('Das Pferd frisst keinen Gurkensalat - Philipp Reis 1861.nWer hat's erfunden?'); disposables.push(model); function assertAutoTrigger(offset: number, expected: boolean): void { const pos = model.getPositionAt(offset); const editor = createMockEditor(model); editor.setPosition(pos); assert.equal(LineContext.shouldAutoTrigger(editor), expected); editor.dispose(); } assertAutoTrigger(3, true); // end of word, Das| assertAutoTrigger(4, false); // no word Das | assertAutoTrigger(1, false); // middle of word D|as assertAutoTrigger(55, false); // number, 1861| assertAutoTrigger(model, 3, true, 'end of word, Das|'); assertAutoTrigger(model, 4, false, 'no word Das |'); assertAutoTrigger(model, 1, false, 'middle of word D|as'); assertAutoTrigger(model, 55, false, 'number, 1861|'); }); test('shouldAutoTrigger at embedded language boundaries', () => { const outerMode = new OuterMode(); const innerMode = new InnerMode(); disposables.push(outerMode, innerMode); const model = TextModel.createFromString('aa', undefined, outerMode.getLanguageIdentifier()); disposables.push(model); assertAutoTrigger(model, 1, true, 'a| — should trigger at boundary between languages'); assertAutoTrigger(model, 5, false, 'a|a — should NOT trigger at start of word'); assertAutoTrigger(model, 6, true, 'aa|< — should trigger at end of word'); assertAutoTrigger(model, 8, true, 'aa — should trigger at end of word at boundary'); }); }); suite('SuggestModel - TriggerAndCancelOracle', function () {"} {"_id":"doc-en-vscode-8f6206dbe947b0579de9542df791dbe8fba343aca41f37d49e5fa6ed8bf0a78c","title":"","text":"ModelRawLinesDeleted, ModelRawLinesInserted } from 'vs/editor/common/model/textModelEvents'; import { TextModel } from 'vs/editor/common/model/textModel'; import { LanguageIdentifier, TokenizationRegistry, IState, MetadataConsts } from 'vs/editor/common/modes'; import { MockMode } from 'vs/editor/test/common/mocks/mockMode'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { TokenizationResult2 } from 'vs/editor/common/core/token'; import { NULL_STATE } from 'vs/editor/common/modes/nullMode'; import { dispose, Disposable } from 'vs/base/common/lifecycle'; // --------- utils"} {"_id":"doc-en-vscode-182fed8484c5dcdfa9d3754cfe183ea15c5868100bfac8600958e03210960307","title":"","text":"suite('Editor Model - Words', () => { var thisModel: TextModel; const OUTER_LANGUAGE_ID = new LanguageIdentifier('outerMode', 3); const INNER_LANGUAGE_ID = new LanguageIdentifier('innerMode', 4); class OuterMode extends MockMode { constructor() { super(OUTER_LANGUAGE_ID); this._register(LanguageConfigurationRegistry.register(this.getLanguageIdentifier(), {})); this._register(TokenizationRegistry.register(this.getLanguageIdentifier().language, { getInitialState: (): IState => NULL_STATE, tokenize: undefined, tokenize2: (line: string, state: IState): TokenizationResult2 => { const tokensArr: number[] = []; let prevLanguageId: LanguageIdentifier = undefined; for (let i = 0; i < line.length; i++) { const languageId = (line.charAt(i) === 'x' ? INNER_LANGUAGE_ID : OUTER_LANGUAGE_ID); if (prevLanguageId !== languageId) { tokensArr.push(i); tokensArr.push((languageId.id << MetadataConsts.LANGUAGEID_OFFSET)); } prevLanguageId = languageId; } const tokens = new Uint32Array(tokensArr.length); for (let i = 0; i < tokens.length; i++) { tokens[i] = tokensArr[i]; } return new TokenizationResult2(tokens, state); } })); } } class InnerMode extends MockMode { constructor() { super(INNER_LANGUAGE_ID); this._register(LanguageConfigurationRegistry.register(this.getLanguageIdentifier(), {})); } } let disposables: Disposable[] = []; setup(() => { var text = ['This text has some words. ']; thisModel = TextModel.createFromString(text.join('n')); disposables = []; }); teardown(() => { thisModel.dispose(); dispose(disposables); disposables = []; }); test('Get word at position', () => { const text = ['This text has some words. ']; const thisModel = TextModel.createFromString(text.join('n')); disposables.push(thisModel); assert.deepEqual(thisModel.getWordAtPosition(new Position(1, 1)), { word: 'This', startColumn: 1, endColumn: 5 }); assert.deepEqual(thisModel.getWordAtPosition(new Position(1, 2)), { word: 'This', startColumn: 1, endColumn: 5 }); assert.deepEqual(thisModel.getWordAtPosition(new Position(1, 4)), { word: 'This', startColumn: 1, endColumn: 5 });"} {"_id":"doc-en-vscode-b18131a4554e874a74279cd0484acf60c1d34a5c8b348ccbe0e857477cf110de","title":"","text":"assert.deepEqual(thisModel.getWordAtPosition(new Position(1, 27)), null); assert.deepEqual(thisModel.getWordAtPosition(new Position(1, 28)), null); }); test('getWordAtPosition at embedded language boundaries', () => { const outerMode = new OuterMode(); const innerMode = new InnerMode(); disposables.push(outerMode, innerMode); const model = TextModel.createFromString('abab', undefined, outerMode.getLanguageIdentifier()); disposables.push(model); assert.deepEqual(model.getWordAtPosition(new Position(1, 1)), { word: 'ab', startColumn: 1, endColumn: 3 }); assert.deepEqual(model.getWordAtPosition(new Position(1, 2)), { word: 'ab', startColumn: 1, endColumn: 3 }); assert.deepEqual(model.getWordAtPosition(new Position(1, 3)), { word: 'ab', startColumn: 1, endColumn: 3 }); assert.deepEqual(model.getWordAtPosition(new Position(1, 4)), { word: 'xx', startColumn: 4, endColumn: 6 }); assert.deepEqual(model.getWordAtPosition(new Position(1, 5)), { word: 'xx', startColumn: 4, endColumn: 6 }); assert.deepEqual(model.getWordAtPosition(new Position(1, 6)), { word: 'xx', startColumn: 4, endColumn: 6 }); assert.deepEqual(model.getWordAtPosition(new Position(1, 7)), { word: 'ab', startColumn: 7, endColumn: 9 }); }); });"} {"_id":"doc-en-vscode-c2cff4428015554e99fda3695cc53d34a3b0a4db08b7d3b509b9f7b7b038f184","title":"","text":"constructor(line: number, character: number); /** * Check if `other` is before this position. * Check if this position is before `other`. * * @param other A position. * @return `true` if position is on a smaller line"} {"_id":"doc-en-vscode-4c224cfc83afae52548444af6ba86f9c2c892c66c2721482cde9ddfd54abe456","title":"","text":"isBefore(other: Position): boolean; /** * Check if `other` is before or equal to this position. * Check if this position is before or equal to `other`. * * @param other A position. * @return `true` if position is on a smaller line"} {"_id":"doc-en-vscode-c41a77af82183166bc4ddfb6cd6a9239323bb0e6f8a1687006fcec385dcd63bb","title":"","text":"isBeforeOrEqual(other: Position): boolean; /** * Check if `other` is after this position. * Check if this position is after `other`. * * @param other A position. * @return `true` if position is on a greater line"} {"_id":"doc-en-vscode-ff142b4a93a3621c04ba0d01857177f4fc21b97e1d09c78405ab0ef2c1251b57","title":"","text":"isAfter(other: Position): boolean; /** * Check if `other` is after or equal to this position. * Check if this position is after or equal to `other`. * * @param other A position. * @return `true` if position is on a greater line"} {"_id":"doc-en-vscode-a694ffc2c2bdac7c56c7012db63e718968c2510fc500423f1c6114a4600c09d1","title":"","text":"isAfterOrEqual(other: Position): boolean; /** * Check if `other` equals this position. * Check if this position is equal to `other`. * * @param other A position. * @return `true` if the line and character of the given position are equal to"} {"_id":"doc-en-vscode-79efa635b56f6b311633cf1659d4cd969092640d18e2db1eb6e2997f2f32e409","title":"","text":"import { toDisposable, DisposableStore, dispose } from 'vs/base/common/lifecycle'; import { StableEditorScrollState } from 'vs/editor/browser/core/editorState'; import { ICodeEditor, MouseTargetType, IViewZoneChangeAccessor, IActiveCodeEditor } from 'vs/editor/browser/editorBrowser'; import { registerEditorContribution } from 'vs/editor/browser/editorExtensions'; import { registerEditorContribution, EditorCommand, ServicesAccessor } from 'vs/editor/browser/editorExtensions'; import { IEditorContribution } from 'vs/editor/common/editorCommon'; import { IModelDecorationsChangeAccessor } from 'vs/editor/common/model'; import { CodeLensProviderRegistry, CodeLens } from 'vs/editor/common/modes';"} {"_id":"doc-en-vscode-2a042938d2d569014dfbc96817877f7a12bff1c1e81982b780b0a2649923172e","title":"","text":"import { EditorOption } from 'vs/editor/common/config/editorOptions'; import * as dom from 'vs/base/browser/dom'; import { hash } from 'vs/base/common/hash'; import { IQuickInputService, IQuickPickItem, IQuickPickSeparator } from 'vs/platform/quickinput/common/quickInput'; export class CodeLensContribution implements IEditorContribution {"} {"_id":"doc-en-vscode-33585692863646e922816ea540861955f503dfe1644fe9c288810255f540b5c1","title":"","text":"} }); } public getLenses(): CodeLensWidget[] { return this._lenses; } } export class ShowLensesInCurrentLineCommand extends EditorCommand { public runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: any): void | Promise { const quickInputService = accessor.get(IQuickInputService); const commandService = accessor.get(ICommandService); const notificationService = accessor.get(INotificationService); const lineNumber = editor.getSelection()?.positionLineNumber; const codelensController = editor.getContribution(CodeLensContribution.ID) as CodeLensContribution; const activeLensesWidgets = codelensController.getLenses().filter(lens => lens.getLineNumber() === lineNumber); const commandArguments: Map = new Map(); const items: (IQuickPickItem | IQuickPickSeparator)[] = []; activeLensesWidgets.forEach(widget => { widget.getItems().forEach(codelens => { const command = codelens.symbol.command; if (!command) { return; } items.push({ id: command.id, label: command.title }); commandArguments.set(command.id, command.arguments); }); }); // We dont want an empty picker if (!items.length) { return; } quickInputService.pick(items, { canPickMany: false }).then(item => { const id = item.id!; commandService.executeCommand(id, ...(commandArguments.get(id) || [])).catch(err => notificationService.error(err)); }); } } registerEditorContribution(CodeLensContribution.ID, CodeLensContribution); const showLensesInCurrentLineCommand = new ShowLensesInCurrentLineCommand({ id: 'codelens.showLensesInCurrentLine', precondition: undefined }); showLensesInCurrentLineCommand.register(); "} {"_id":"doc-en-vscode-a761d9dab5647a4ce4397edab2f0bc451b7951bbd096ef801571d8551bdac489","title":"","text":"} } } getItems(): CodeLensItem[] { return this._data; } } registerThemingParticipant((theme, collector) => {"} {"_id":"doc-en-vscode-3528a417a50e4f629ccc267fb4d6dce8d50ba3dcf545ca5aafc492863d3d7918","title":"","text":"import { CancellationToken } from 'vs/base/common/cancellation'; import { IQuickPickItem, IPickOptions, IInputOptions, IQuickNavigateConfiguration, IQuickPick, IQuickInputButton, IInputBox, QuickPickInput } from 'vs/base/parts/quickinput/common/quickInput'; export { IQuickPickItem, IPickOptions, IInputOptions, IQuickNavigateConfiguration, IQuickPick, IQuickInput, IQuickInputButton, IInputBox, IQuickPickItemButtonEvent, QuickPickInput, IQuickPickSeparator, IKeyMods } from 'vs/base/parts/quickinput/common/quickInput'; export * from 'vs/base/parts/quickinput/common/quickInput'; export const IQuickInputService = createDecorator('quickInputService');"} {"_id":"doc-en-vscode-510acae7609c4f0d6fd506ac14320029d094be531a39c806a20f5749a69e7949","title":"","text":"import { IPartService, Position } from 'vs/workbench/services/part/common/partService'; const SPLIT_PANE_MIN_SIZE = 120; const TERMINAL_MIN_USEFUL_SIZE = 250; class SplitPaneContainer { private _height: number;"} {"_id":"doc-en-vscode-791473a924e1aa98766f9ff8908aaf60a70539d783bffd74e373f99858aa94cc","title":"","text":"configHelper: ITerminalConfigHelper, shellLaunchConfig: IShellLaunchConfig ): ITerminalInstance { const newTerminalSize = ((this._panelPosition === Position.BOTTOM ? this._container.clientWidth : this._container.clientHeight) / (this._terminalInstances.length + 1)); if (newTerminalSize < TERMINAL_MIN_USEFUL_SIZE) { return undefined; } const instance = this._terminalService.createInstance( terminalFocusContextKey, configHelper,"} {"_id":"doc-en-vscode-229ade6875fe181b2e34e1f5a208f421ddaa5939602fc29ff356516e51811bc5","title":"","text":"} protected abstract _showTerminalCloseConfirmation(): TPromise; protected abstract _showNotEnoughSpaceToast(): void; public abstract createTerminal(shell?: IShellLaunchConfig, wasNewTerminalAction?: boolean): ITerminalInstance; public abstract createTerminalRenderer(name: string): ITerminalInstance; public abstract createInstance(terminalFocusContextKey: IContextKey, configHelper: ITerminalConfigHelper, container: HTMLElement, shellLaunchConfig: IShellLaunchConfig, doCreateProcess: boolean): ITerminalInstance;"} {"_id":"doc-en-vscode-7c374c9b0ecb00fdbaed01c46d43401f148dd0fa209f3818088f1d11dffebc31","title":"","text":"} const instance = tab.split(this._terminalFocusContextKey, this.configHelper, shellLaunchConfig); this._initInstanceListeners(instance); this._onInstancesChanged.fire(); if (instance) { this._initInstanceListeners(instance); this._onInstancesChanged.fire(); this._terminalTabs.forEach((t, i) => t.setVisible(i === this._activeTabIndex)); this._terminalTabs.forEach((t, i) => t.setVisible(i === this._activeTabIndex)); } else { this._showNotEnoughSpaceToast(); } } protected _initInstanceListeners(instance: ITerminalInstance): void {"} {"_id":"doc-en-vscode-67ef2936ac111e7785f8c031aed9680cb874653f91475199190603cade2dbc61","title":"","text":"this._terminalTabs = []; this._configHelper = this._instantiationService.createInstance(TerminalConfigHelper); ipc.on('vscode:openFiles', (_event: any, request: IOpenFileRequest) => { // if the request to open files is coming in from the integrated terminal (identified though // the termProgram variable) and we are instructed to wait for editors close, wait for the"} {"_id":"doc-en-vscode-3139900828195ea1df3407291fa9ca0014b46a799c1cb17abdd2000324b3554d","title":"","text":"}).then(res => !res.confirmed); } protected _showNotEnoughSpaceToast(): void { this._notificationService.warn(nls.localize('terminal.minWidth', \"Not enough space to split terminal.\")); } public setContainers(panelContainer: HTMLElement, terminalContainer: HTMLElement): void { this._configHelper.panelContainer = panelContainer; this._terminalContainer = terminalContainer;"} {"_id":"doc-en-vscode-d0661c1c4233ab7a83ce25396cac8ee9b94a7c46fb054744de36ddf1c2ec545e","title":"","text":"import { ModelDecorationMinimapOptions } from 'vs/editor/common/model/textModel'; import { Selection } from 'vs/editor/common/core/selection'; import { Color } from 'vs/base/common/color'; import { GestureEvent, EventType, Gesture } from 'vs/base/browser/touch'; function getMinimapLineHeight(renderMinimap: RenderMinimap): number { if (renderMinimap === RenderMinimap.Large) {"} {"_id":"doc-en-vscode-73bacf4611c43db7274a6950517939ca1a82a0595c7b1a032c48a2edbb34d4be","title":"","text":"return Math.round(desiredSliderPosition / this._computedSliderRatio); } public getDesiredScrollTopFromTouchLocation(pageY: number): number { return Math.round((pageY - this.sliderHeight / 2) / this._computedSliderRatio); } public static create( options: MinimapOptions, viewportStartLineNumber: number,"} {"_id":"doc-en-vscode-2ac4f7b524058d17d97b3b0b4459d14bef1fd73309cbd5cadeb8b3819bc2cb1f","title":"","text":"private readonly _mouseDownListener: IDisposable; private readonly _sliderMouseMoveMonitor: GlobalMouseMoveMonitor; private readonly _sliderMouseDownListener: IDisposable; private readonly _sliderTouchStartListener: IDisposable; private readonly _sliderTouchMoveListener: IDisposable; private readonly _sliderTouchEndListener: IDisposable; private _options: MinimapOptions; private _lastRenderData: RenderData | null; private _selections: Selection[] = []; private _selectionColor: Color | undefined; private _renderDecorations: boolean = false; private _gestureInProgress: boolean = false; private _buffers: MinimapBuffers | null; constructor(context: ViewContext) {"} {"_id":"doc-en-vscode-254289966fe733c36d2c9273970e8b2b307f202a23e641619b37ad52ce18d26a","title":"","text":"); } }); Gesture.addTarget(this._domNode.domNode); this._sliderTouchStartListener = dom.addDisposableListener(this._domNode.domNode, EventType.Start, (e: GestureEvent) => { e.preventDefault(); e.stopPropagation(); if (this._lastRenderData) { this._slider.toggleClassName('active', true); this._gestureInProgress = true; this.scrollDueToTouchEvent(e); } }); this._sliderTouchMoveListener = dom.addStandardDisposableListener(this._domNode.domNode, EventType.Change, (e: GestureEvent) => { e.preventDefault(); e.stopPropagation(); if (this._lastRenderData && this._gestureInProgress) { this.scrollDueToTouchEvent(e); } }); this._sliderTouchEndListener = dom.addStandardDisposableListener(this._domNode.domNode, EventType.End, (e: GestureEvent) => { e.preventDefault(); e.stopPropagation(); this._gestureInProgress = false; this._slider.toggleClassName('active', false); }); } private scrollDueToTouchEvent(touch: GestureEvent) { const startY = this._domNode.domNode.getBoundingClientRect().top; const scrollTop = this._lastRenderData!.renderedLayout.getDesiredScrollTopFromTouchLocation(touch.pageY - startY); this._context.viewLayout.setScrollPositionNow({ scrollTop: scrollTop }); } public dispose(): void { this._mouseDownListener.dispose(); this._sliderMouseMoveMonitor.dispose(); this._sliderMouseDownListener.dispose(); this._sliderTouchStartListener.dispose(); this._sliderTouchMoveListener.dispose(); this._sliderTouchEndListener.dispose(); super.dispose(); }"} {"_id":"doc-en-vscode-d21a83ad14b060e9396e6a6a8e5eac4750f425ef42b604264c3d4bdbf39202c1","title":"","text":"\"native-watchdog\": \"0.3.0\", \"node-pty\": \"0.7.7\", \"semver\": \"^5.5.0\", \"spdlog\": \"0.7.1\", \"spdlog\": \"0.7.2\", \"sudo-prompt\": \"8.2.0\", \"v8-inspect-profiler\": \"^0.0.8\", \"vscode-chokidar\": \"1.6.4\","} {"_id":"doc-en-vscode-b784a5f1eba0f5323f59abececddf50c8cfceea9b9d2874dee078a9db93b6030","title":"","text":"version \"1.0.0\" resolved \"https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3\" spdlog@0.7.1: version \"0.7.1\" resolved \"https://registry.yarnpkg.com/spdlog/-/spdlog-0.7.1.tgz#960b8cdced12e8c482d1df9fa65220789f276979\" spdlog@0.7.2: version \"0.7.2\" resolved \"https://registry.yarnpkg.com/spdlog/-/spdlog-0.7.2.tgz#9298753d7694b9ee9bbfd7e01ea1e4c6ace1e64d\" dependencies: bindings \"^1.3.0\" mkdirp \"^0.5.1\""} {"_id":"doc-en-vscode-6013adcf8831f42a26afe5f9ca7f21fba89a98ea02d01b745af302e0e00d37fc","title":"","text":"return candidate; } if (element === document.body) { if (element === this.scrollableElement.getDomNode() || element === document.body) { return null; } } while (element = element.parentElement);"} {"_id":"doc-en-vscode-602e09a9e1f540a336ee0bd773087404c55883c30e5b207ffae9d430c3c746ac","title":"","text":"import { Schemas } from 'vs/base/common/network'; import { IDialogService, IConfirmationResult, IConfirmation, getConfirmMessage } from 'vs/platform/dialogs/common/dialogs'; import { INotificationService, Severity } from 'vs/platform/notification/common/notification'; import { Constants } from 'vs/editor/common/core/uint'; export interface IEditableData { action: IAction;"} {"_id":"doc-en-vscode-75c92c06cb43721696242fcafa8614ed1bfccb46eac5dc6a35d3c5aa9e39b14b","title":"","text":"export function incrementFileName(name: string, isFolder: boolean): string { const separators = '[.-_]'; const maxNumber = Constants.MAX_SAFE_SMALL_INTEGER; // file.1.txt=>file.2.txt let suffixFileRegex = RegExp('(.*' + separators + ')(d+)(..*)$'); if (!isFolder && name.match(suffixFileRegex)) { return name.replace(suffixFileRegex, (match, g1?, g2?, g3?) => { return g1 + strings.pad(parseInt(g2) + 1, g2.length) + g3; let number = parseInt(g2); return number < maxNumber ? g1 + strings.pad(number + 1, g2.length) + g3 : strings.format('{0}{1}.1{2}', g1, g2, g3); }); }"} {"_id":"doc-en-vscode-e5a76acff5b0b018d018938ad6597726c40026bba3b5f59314056da2e74adf4c","title":"","text":"let prefixFileRegex = RegExp('(d+)(' + separators + '.*)(..*)$'); if (!isFolder && name.match(prefixFileRegex)) { return name.replace(prefixFileRegex, (match, g1?, g2?, g3?) => { return strings.pad(parseInt(g1) + 1, g1.length) + g2 + g3; let number = parseInt(g1); return number < maxNumber ? strings.pad(number + 1, g1.length) + g2 + g3 : strings.format('{0}{1}.1{2}', g1, g2, g3); }); }"} {"_id":"doc-en-vscode-bd1b7b9a21b0b589e34e8ffdf11f686537502086f7ca5d0aa67c94ae3aaf3077","title":"","text":"// folder.1=>folder.2 if (isFolder && name.match(/(d+)$/)) { return name.replace(/(d+)$/, (match: string, ...groups: any[]) => { return strings.pad(parseInt(groups[0]) + 1, groups[0].length); }); return name.replace(/(d+)$/, (match: string, ...groups: any[]) => { let number = parseInt(groups[0]); return number < maxNumber ? strings.pad(number + 1, groups[0].length) : strings.format('{0}.1', groups[0]); }); } // 1.folder=>2.folder if (isFolder && name.match(/^(d+)/)) { return name.replace(/^(d+)/, (match: string, ...groups: any[]) => { return strings.pad(parseInt(groups[0]) + 1, groups[0].length); }); return name.replace(/^(d+)(.*)$/, (match: string, ...groups: any[]) => { let number = parseInt(groups[0]); return number < maxNumber ? strings.pad(number + 1, groups[0].length) + groups[1] : strings.format('{0}{1}.1', groups[0], groups[1]); }); } // file/folder=>file.1/folder.1"} {"_id":"doc-en-vscode-f39778450d3e0861eb2d0bc72d0d5771e25fc558e0c71dc3e7d553143d07e6b1","title":"","text":"assert.strictEqual(result, 'test_2'); }); test('Increment file name with suffix version, too big number', function () { const name = 'test.9007199254740992.js'; const result = incrementFileName(name, false); assert.strictEqual(result, 'test.9007199254740992.1.js'); }); test('Increment folder name with suffix version, too big number', function () { const name = 'test.9007199254740992'; const result = incrementFileName(name, true); assert.strictEqual(result, 'test.9007199254740992.1'); }); test('Increment file name with prefix version', function () { const name = '1.test.js'; const result = incrementFileName(name, false);"} {"_id":"doc-en-vscode-7e7b80e0fb4bf018f7544ab9f094c8b8828218db2b7a8aab19bb6dceb48f4a11","title":"","text":"assert.strictEqual(result, '2_test.js'); }); test('Increment folder name with suffix version', function () { test('Increment file name with prefix version, too big number', function () { const name = '9007199254740992.test.js'; const result = incrementFileName(name, false); assert.strictEqual(result, '9007199254740992.test.1.js'); }); test('Increment folder name with prefix version', function () { const name = '1.test'; const result = incrementFileName(name, true); assert.strictEqual(result, '2.test'); }); test('Increment folder name with suffix version, trailing zeros', function () { test('Increment folder name with prefix version, too big number', function () { const name = '9007199254740992.test'; const result = incrementFileName(name, true); assert.strictEqual(result, '9007199254740992.test.1'); }); test('Increment folder name with prefix version, trailing zeros', function () { const name = '001.test'; const result = incrementFileName(name, true); assert.strictEqual(result, '002.test'); }); test('Increment folder name with suffix version with `-` as separator', function () { test('Increment folder name with prefix version with `-` as separator', function () { const name = '1-test'; const result = incrementFileName(name, true); assert.strictEqual(result, '2-test');"} {"_id":"doc-en-vscode-4556573f9d330ca266537b5890c6907c326b43194447e2e2eea7e095176e94c0","title":"","text":"import { nullTokenize2 } from 'vs/editor/common/modes/nullMode'; import { generateTokensCSSForColorMap } from 'vs/editor/common/modes/supports/tokenization'; import { Color } from 'vs/base/common/color'; import { INotificationService } from 'vs/platform/notification/common/notification'; import URI from 'vs/base/common/uri'; export class TMScopeRegistry {"} {"_id":"doc-en-vscode-7f2f4b59059eff94b06c9323a0ec4101d32267e9fd9066b3583be232f1f4d2a9","title":"","text":"private _scopeRegistry: TMScopeRegistry; private _injections: { [scopeName: string]: string[]; }; private _injectedEmbeddedLanguages: { [scopeName: string]: IEmbeddedLanguagesMap[]; }; private _notificationService: INotificationService; private _languageToScope: Map; private _styleElement: HTMLStyleElement;"} {"_id":"doc-en-vscode-127fd3a853d5a74711857c261c7bd5e66ec619b52a9a219ecfa209c10cebfbff","title":"","text":"constructor( @IModeService modeService: IModeService, @IWorkbenchThemeService themeService: IWorkbenchThemeService @IWorkbenchThemeService themeService: IWorkbenchThemeService, @INotificationService notificationService: INotificationService ) { this._styleElement = dom.createStyleSheet(); this._styleElement.className = 'vscode-tokens-styles';"} {"_id":"doc-en-vscode-040793ca4aab3e7e1e2abea0e9fee4912c1e921c7ad9d8445499d0951748bbe1","title":"","text":"this._injections = {}; this._injectedEmbeddedLanguages = {}; this._languageToScope = new Map(); this._notificationService = notificationService; this._grammarRegistry = null;"} {"_id":"doc-en-vscode-f8236f86a18976f5349aed9d6979d41a1429a1e0445644243da388b7d13e2525","title":"","text":"private registerDefinition(modeId: string): void { this._createGrammar(modeId).then((r) => { TokenizationRegistry.register(modeId, new TMTokenization(this._scopeRegistry, r.languageId, r.grammar, r.initialState, r.containsEmbeddedLanguages)); TokenizationRegistry.register(modeId, new TMTokenization(this._scopeRegistry, r.languageId, r.grammar, r.initialState, r.containsEmbeddedLanguages, this._notificationService)); }, onUnexpectedError); } }"} {"_id":"doc-en-vscode-9d9e028ab8b2c4ff27bc19d54d2f53f031fa4d63c57bf4351e8de777cb4ef954","title":"","text":"private readonly _containsEmbeddedLanguages: boolean; private readonly _seenLanguages: boolean[]; private readonly _initialState: StackElement; private _tokenizationWarningAlreadyShown: boolean; constructor(scopeRegistry: TMScopeRegistry, languageId: LanguageId, grammar: IGrammar, initialState: StackElement, containsEmbeddedLanguages: boolean) { constructor(scopeRegistry: TMScopeRegistry, languageId: LanguageId, grammar: IGrammar, initialState: StackElement, containsEmbeddedLanguages: boolean, @INotificationService private notificationService: INotificationService) { this._scopeRegistry = scopeRegistry; this._languageId = languageId; this._grammar = grammar;"} {"_id":"doc-en-vscode-764769850aa69115eee77bd22a58d5036b66851c9e5c49f346ab441e5b402b74","title":"","text":"// Do not attempt to tokenize if a line has over 20k if (line.length >= 20000) { if (!this._tokenizationWarningAlreadyShown) { this._tokenizationWarningAlreadyShown = true; this.notificationService.warn(nls.localize('too many characters', \"Tokenization is skipped for lines longer than 20k characters for performance reasons.\")); } console.log(`Line (${line.substr(0, 15)}...): longer than 20k characters, tokenization skipped.`); return nullTokenize2(this._languageId, line, state, offsetDelta); }"} {"_id":"doc-en-vscode-f1313ea0b14cededd460ea29b8c326b3aa63f503cc1d44000ebd5626b20a3d6c","title":"","text":"'use strict'; import { localize } from 'vs/nls'; import { append, $, addClass, removeClass, toggleClass } from 'vs/base/browser/dom'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { Action } from 'vs/base/common/actions';"} {"_id":"doc-en-vscode-0ad880501c2ec77b34f0737e4a607e43ea01fb43815374d8a2dc57bff75645a1","title":"","text":"private updateRecommendationStatus(extension: IExtension, data: ITemplateData) { const extRecommendations = this.extensionTipsService.getAllRecommendationsWithReason(); let ariaLabel = extension.displayName + '. '; if (!extRecommendations[extension.id.toLowerCase()]) { data.root.setAttribute('aria-label', extension.displayName); data.root.title = ''; removeClass(data.root, 'recommended'); data.root.title = ''; } else { data.root.setAttribute('aria-label', extension.displayName + '. ' + extRecommendations[extension.id]); data.root.title = extRecommendations[extension.id.toLowerCase()].reasonText; addClass(data.root, 'recommended'); ariaLabel += extRecommendations[extension.id.toLowerCase()].reasonText + ' '; data.root.title = extRecommendations[extension.id.toLowerCase()].reasonText; } ariaLabel += localize('viewExtensionDetailsAria', \"Press enter for extension details.\"); data.root.setAttribute('aria-label', ariaLabel); } disposeTemplate(data: ITemplateData): void {"} {"_id":"doc-en-vscode-764caa0285746d0195fed26333dc11d61e2d5606c33535f4127df7cd9de540fc","title":"","text":"this.disposables.push(this.list.onOpen(e => { let isSingleClick = false; let isDoubleClick = false; let isMiddleClick = false; let openToSide = false; const browserEvent = e.browserEvent; if (browserEvent instanceof MouseEvent) { isSingleClick = browserEvent.detail === 1; isDoubleClick = browserEvent.detail === 2; isMiddleClick = browserEvent.button === 1; openToSide = (browserEvent.ctrlKey || browserEvent.metaKey || browserEvent.altKey); } const focused = this.list.getFocusedElements(); const element = focused.length ? focused[0] : undefined; if (isMiddleClick) { if (element instanceof Breakpoint) { this.debugService.removeBreakpoints(element.getId()); } else if (element instanceof FunctionBreakpoint) { this.debugService.removeFunctionBreakpoints(element.getId()); } return; } if (element instanceof Breakpoint) { openBreakpointSource(element, openToSide, isSingleClick, this.debugService, this.editorService).done(undefined, onUnexpectedError); }"} {"_id":"doc-en-vscode-c02a37087df68c390f55a0ebb28ad8e0d72a66ccc963f95c3ea4fb524300fdcd","title":"","text":"this.searchBox.setModel(this.modelService.createModel('', null, uri.parse('extensions:searchinput'), true)); this.disposables.push(this.searchBox.onDidPaste(() => { this.searchBox.setValue(this.searchBox.getValue().replace(/s+/g, ' ')); let trimmed = this.searchBox.getValue().replace(/s+/g, ' '); this.searchBox.setValue(trimmed); this.searchBox.setScrollTop(0); this.searchBox.setPosition(new Position(1, trimmed.length + 1)); })); this.disposables.push(this.searchBox.onDidFocusEditorText(() => addClass(this.monacoStyleContainer, 'synthetic-focus'))); this.disposables.push(this.searchBox.onDidBlurEditorText(() => removeClass(this.monacoStyleContainer, 'synthetic-focus')));"} {"_id":"doc-en-vscode-26e1a291a6aa7ab76b45ceefe06221c6a00170613d0c065ed4bd0a54a7564aab","title":"","text":"}, \"Insert link\": { \"prefix\": \"link\", \"body\": \"[${1:text}](http://${2:link})$0\", \"body\": \"[${1:text}](https://${2:link})$0\", \"description\": \"Insert link\" }, \"Insert image\": { \"prefix\": \"image\", \"body\": \"![${1:alt}](http://${2:link})$0\", \"body\": \"![${1:alt}](https://${2:link})$0\", \"description\": \"Insert image\" } }"} {"_id":"doc-en-vscode-7baa9d20657a36929b31b039d3a6ef0d7620b9da98f39a99133e13bacbb42e72","title":"","text":"this.addDisposable(this._configurationService.onDidChangeConfiguration(e => { if (e.affectsConfiguration('terminal.integrated')) { this.updateConfig(); // HACK: Trigger another async layout to ensure xterm's CharMeasure is ready to use, // this hack can be removed when https://github.com/xtermjs/xterm.js/issues/702 is // supported. this.setVisible(this._isVisible); } if (e.affectsConfiguration('editor.accessibilitySupport')) { this.updateAccessibilitySupport();"} {"_id":"doc-en-vscode-7ef5cf283b3a7224de0c1b068f8676b46c0b83395b30c4a7771ca4c90e0a5c35","title":"","text":"VERTICAL_REVERSE, } export interface ActionTrigger { keys: KeyCode[]; keyDown: boolean; } export interface IActionItemProvider { (action: IAction): IActionItem; }"} {"_id":"doc-en-vscode-02c5651e799987389dff0afedfbc1fd27126551c8aab3c7e0193cd39dc920db4","title":"","text":"actionRunner?: IActionRunner; ariaLabel?: string; animated?: boolean; triggerKeys?: ActionTrigger; } let defaultOptions: IActionBarOptions = { orientation: ActionsOrientation.HORIZONTAL, context: null context: null, triggerKeys: { keys: [KeyCode.Enter, KeyCode.Space], keyDown: false } }; export interface IActionOptions extends IActionItemOptions {"} {"_id":"doc-en-vscode-da2f1c12f991c2821cd88f3ea1df1250633e86cecf3e392c2589c02169db44bd","title":"","text":"this.focusNext(); } else if (event.equals(KeyCode.Escape)) { this.cancel(); } else if (event.equals(KeyCode.Enter) || event.equals(KeyCode.Space)) { // Nothing, just staying out of the else branch } else if (this.isTriggerKeyEvent(event)) { // Staying out of the else branch even if not triggered if (this.options.triggerKeys && this.options.triggerKeys.keyDown) { this.doTrigger(event); } } else { eventHandled = false; }"} {"_id":"doc-en-vscode-6215aaf07af086ff1b4f11ba8d68d2b10e3213a3f941c939ee3089160975727f","title":"","text":"let event = new StandardKeyboardEvent(e as KeyboardEvent); // Run action on Enter/Space if (event.equals(KeyCode.Enter) || event.equals(KeyCode.Space)) { this.doTrigger(event); if (this.isTriggerKeyEvent(event)) { if (!this.options.triggerKeys.keyDown) { this.doTrigger(event); } event.preventDefault(); event.stopPropagation(); }"} {"_id":"doc-en-vscode-c2245f9a58d2bfa351624382b06a90a1281de2e9042eea01f72941e2d25175ea","title":"","text":"} } private isTriggerKeyEvent(event: StandardKeyboardEvent): boolean { let ret = false; if (this.options.triggerKeys) { this.options.triggerKeys.keys.forEach(keyCode => { ret = ret || event.equals(keyCode); }); } return ret; } private updateFocusedItem(): void { for (let i = 0; i < this.actionsList.children.length; i++) { let elem = this.actionsList.children[i];"} {"_id":"doc-en-vscode-ad17396b8817d3e9c5ec7f2e0690be3a1afb9425a8aa03367108f7cdbe05b4b9","title":"","text":"actionItemProvider: action => this.doGetActionItem(action, options, parentData), context: options.context, actionRunner: options.actionRunner, ariaLabel: options.ariaLabel ariaLabel: options.ariaLabel, triggerKeys: { keys: [KeyCode.Enter], keyDown: true } }); this.actionsList.setAttribute('role', 'menu');"} {"_id":"doc-en-vscode-a0b1291b3a287ba7ec8ddeae4300679e9890f2b50b1bf71e59c1ffcb45054d80","title":"","text":"if (defaultUri && defaultUri.scheme !== Schemas.file) { return Promise.reject(new Error('Not supported - Open-dialogs can only be opened on `file`-uris.')); } const filters = []; if (options.filters) { for (let name in options.filters) { filters.push({ name, extensions: options.filters[name] }); } } const newOptions: OpenDialogOptions = { title: options.title, defaultPath: defaultUri && defaultUri.fsPath, buttonLabel: options.openLabel, filters, filters: options.filters, properties: [] }; newOptions.properties.push('createDirectory');"} {"_id":"doc-en-vscode-be19ac4520561100f1f70e09e28c2063eb847a0b182959aef1f9f31e3989099f","title":"","text":"resetStateMachine = true; } } else if (state === State.End) { const chClass = classifier.get(chCode); let chClass: CharacterClass; if (chCode === CharCode.OpenSquareBracket) { // Allow for the authority part to contain ipv6 addresses which contain [ and ] hasOpenSquareBracket = true; chClass = CharacterClass.None; } else { chClass = classifier.get(chCode); } // Check if character terminates link if (chClass === CharacterClass.ForceTermination) {"} {"_id":"doc-en-vscode-770ec0923009de630e3460741c8623055b83ef402dc7c0781df2920c020319ab","title":"","text":"' https://msdn.microsoft.com/en-us/library/windows/desktop/ms687414(v=vs.85).aspx ' ); }); test('issue #62278: \"Ctrl + click to follow link\" for IPv6 URLs', () => { assertLink( 'let x = \"http://[::1]:5000/connect/token\"', ' http://[::1]:5000/connect/token ' ); }); });"} {"_id":"doc-en-vscode-dca0a1c69d781293123634aec1c6c81aeae386d0f6868d854f1af999533416b6","title":"","text":"const position = this.getWindowPosition(this._issueParentWindow, 700, 800); this._issueWindow = new BrowserWindow({ fullscreen: false, width: position.width, height: position.height, minWidth: 300,"} {"_id":"doc-en-vscode-caa0a187ea446679bdf96cc6ec03c9d2c20b48b56182ef02d8de080ca7fc6239","title":"","text":"this._processExplorerWindow = new BrowserWindow({ skipTaskbar: true, resizable: true, fullscreen: false, width: position.width, height: position.height, minWidth: 300,"} {"_id":"doc-en-vscode-d1d5193a92b747ef6e13b42d599af0a1addf5253730e5190d91e5accb0ae791c","title":"","text":"} const resultsSelectedBackground = theme.getColor(peekViewResultsSelectionBackground); if (resultsSelectedBackground) { collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: ${resultsSelectedBackground}; }`); collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ${resultsSelectedBackground}; }`); } const resultsSelectedForeground = theme.getColor(peekViewResultsSelectionForeground); if (resultsSelectedForeground) { collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: ${resultsSelectedForeground} !important; }`); collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${resultsSelectedForeground} !important; }`); } const editorBackground = theme.getColor(peekViewEditorBackground); if (editorBackground) {"} {"_id":"doc-en-vscode-0899bf3d58fb921563e51ea8f851eead62b15b6a6ee0e2c0217511a7fa27d415","title":"","text":"}, description: { description: nls.localize('snippetSchema.json.description', 'The snippet description.'), type: 'string' type: ['string', 'array'] } }, additionalProperties: false"} {"_id":"doc-en-vscode-f1639527387815ddbe70a6aeaf188c2cb75d71df88432e40ad193e1e46cab0fa","title":"","text":"body = body.join('n'); } if (Array.isArray(description)) { description = description.join('n'); } if ((typeof prefix !== 'string' && !Array.isArray(prefix)) || typeof body !== 'string') { return; }"} {"_id":"doc-en-vscode-cbae5aadf2e9e4f411f889fb0114d1cb4fae30abafdc31972095b87e11af57c0","title":"","text":"return; } if (this.extension.type !== ExtensionType.User) { this.enabled = false; this.class = UpdateAction.DisabledClass; this.label = this.getLabel(); return; } const canInstall = await this.extensionsWorkbenchService.canInstall(this.extension); const isInstalled = this.extension.state === ExtensionState.Installed;"} {"_id":"doc-en-vscode-9fa0b9ea54a91ae9e587dfc5f2bcfb70b69e0273ad13695b179e5160efb0fa0f","title":"","text":"import { IExtensionManifestPropertiesService } from 'vs/workbench/services/extensions/common/extensionManifestPropertiesService'; import { IExtensionService, IExtensionsStatus } from 'vs/workbench/services/extensions/common/extensions'; import { ExtensionEditor } from 'vs/workbench/contrib/extensions/browser/extensionEditor'; import { isWeb } from 'vs/base/common/platform'; interface IExtensionStateProvider { (extension: Extension): T;"} {"_id":"doc-en-vscode-82249f36c806d5dafcb3103741e2400f06ac680ac4635c2bdd4e6f77a9c70283","title":"","text":"if (!this.gallery || !this.local) { return false; } if (this.type !== ExtensionType.User) { return false; } if (!this.local.preRelease && this.gallery.properties.isPreReleaseVersion) { return false; }"} {"_id":"doc-en-vscode-7eed5698cde866440d8d4fea0804bb4444c7b6679b28a41b881e0c4e486c48a2","title":"","text":"this.queryLocal().then(() => { this.resetIgnoreAutoUpdateExtensions(); this.eventuallyCheckForUpdates(true); // Always auto update builtin extensions if (!this.isAutoUpdateEnabled()) { // Always auto update builtin extensions in web if (isWeb && !this.isAutoUpdateEnabled()) { this.autoUpdateBuiltinExtensions(); } });"} {"_id":"doc-en-vscode-78a70cb4e793974432ddb6fd1ea5107e7ad7f4d1654c1746d8dcd6eedfcba9d9","title":"","text":"} const infos: IExtensionInfo[] = []; for (const installed of this.local) { if (installed.type === ExtensionType.User && (!onlyBuiltin || installed.isBuiltin)) { if (!onlyBuiltin || installed.isBuiltin) { infos.push({ ...installed.identifier, preRelease: !!installed.local?.preRelease }); } }"} {"_id":"doc-en-vscode-4aef2dd6c63897d3ce1010ddbce4ca0e2c6d416b611a67aeb44f238c94b45f65","title":"","text":"assert.strictEqual(extension.outdated, true); }); test('extension is not outdated when local is built in and older than gallery', () => { test('extension is outdated when local is built in and older than gallery', () => { const extension = instantiationService.createInstance(Extension, () => ExtensionState.Installed, undefined, aLocalExtension('somext', { version: '1.0.0' }, { type: ExtensionType.System }), aGalleryExtension('somext', { version: '1.0.1' })); assert.strictEqual(extension.outdated, false); assert.strictEqual(extension.outdated, true); }); test('extension is outdated when local and gallery are on same version but on different target platforms', () => {"} {"_id":"doc-en-vscode-9c24af11d4e54a8769140cfb67a27db6519bc135dd8ef7ee09871553d591d4bc","title":"","text":"}); test('findFiles', () => { return vscode.workspace.findFiles('*.png').then((res) => { return vscode.workspace.findFiles('**/*.png').then((res) => { assert.equal(res.length, 2); assert.equal(basename(vscode.workspace.asRelativePath(res[0])), 'image.png'); }); }); test('findFiles, exclude', () => { return vscode.workspace.findFiles('**/*.png', '**/sub/**').then((res) => { assert.equal(res.length, 1); assert.equal(basename(vscode.workspace.asRelativePath(res[0])), 'image.png'); });"} {"_id":"doc-en-vscode-4135e97c8c0b973099dd71be567b19861da3bcf5d1e1565f5ea07da5f6c313a4","title":"","text":"disregardSearchExcludeSettings: true, disregardIgnoreFiles: true, includePattern, excludePattern: typeof excludePatternOrDisregardExcludes === 'string' ? excludePatternOrDisregardExcludes : undefined, _reason: 'startFileSearch' });"} {"_id":"doc-en-vscode-a7f0fd706fdb7565168e781921a0e01032d82d2a0fa88d881c72f199d11d65d9","title":"","text":"const query = queryBuilder.file(folders, { _reason: 'checkExists', includePattern: includes.join(', '), expandPatterns: true, exists: true });"} {"_id":"doc-en-vscode-3e712722307f044cd19c31e95eaa2b4a2aa4b70e31b121e7237f4a21c01b7e0a","title":"","text":"if (options.includePattern) { includeSearchPathsInfo = options.expandPatterns ? this.parseSearchPaths(options.includePattern) : { pattern: patternListToIExpression(...splitGlobPattern(options.includePattern)) }; { pattern: patternListToIExpression(options.includePattern) }; } let excludeSearchPathsInfo: ISearchPathsInfo = {}; if (options.excludePattern) { excludeSearchPathsInfo = options.expandPatterns ? this.parseSearchPaths(options.excludePattern) : { pattern: patternListToIExpression(...splitGlobPattern(options.excludePattern)) }; { pattern: patternListToIExpression(options.excludePattern) }; } // Build folderQueries from searchPaths, if given, otherwise folderResources"} {"_id":"doc-en-vscode-dd6dded117e49a15258ac3dd7b37a4e68c4871d7ed3e9d611de4d7ca42a0ac17","title":"","text":"}); }); test('splits glob pattern even with expandPatterns disabled', () => { test('does not split glob pattern when expandPatterns disabled', () => { assertEqualQueries( queryBuilder.file([ROOT_1_URI], { includePattern: '**/foo, **/bar' }), {"} {"_id":"doc-en-vscode-8f4d1e744073db9eed3306c3044ef0ea4d0f4dfc743edf75734678d45b48a7db","title":"","text":"}], type: QueryType.File, includePattern: { '**/foo': true, '**/bar': true '**/foo, **/bar': true } }); });"} {"_id":"doc-en-vscode-a92e352276b7e47b4f671d7b3e2af9f9f2c38d53aae848376187fab7c2d1b26a","title":"","text":"} // Handle empty to restore if (emptyToRestore.length > 0) { emptyToRestore.forEach(emptyWindowBackupInfo => { const allEmptyToRestore = arrays.distinct(emptyToRestore, info => info.backupFolder); // prevent duplicates if (allEmptyToRestore.length > 0) { allEmptyToRestore.forEach(emptyWindowBackupInfo => { const remoteAuthority = emptyWindowBackupInfo.remoteAuthority; const fileInputsForWindow = (fileInputs && fileInputs.remoteAuthority === remoteAuthority) ? fileInputs : undefined;"} {"_id":"doc-en-vscode-f607ed00302756433d6166dc32d24e15d050de26ed25cc9bd73c82b58b3058d6","title":"","text":"// Rewrite `#editor.fontSize#` to link format text = fixSettingLinks(text); const renderedMarkdown = renderMarkdown({ value: text }, { const renderedMarkdown = renderMarkdown({ value: text, isTrusted: true }, { actionHandler: { callback: (content: string) => { if (startsWith(content, '#')) {"} {"_id":"doc-en-vscode-10e61334f47c316936c289d65970c930742b625736de003d6791350e3ff1e47d","title":"","text":"// Filename not allowed this.filePickBox.validationMessage = nls.localize('remoteFileDialog.validateBadFilename', 'Please enter a valid file name.'); return Promise.resolve(false); } else if (!statDirname || !statDirname.isDirectory) { } else if (!statDirname) { // Folder to save in doesn't exist const message = nls.localize('remoteFileDialog.validateCreateDirectory', 'The folder {0} does not exist. Would you like to create it?', resources.basename(resources.dirname(uri))); return this.yesNoPrompt(uri, message); } else if (!statDirname.isDirectory) { this.filePickBox.validationMessage = nls.localize('remoteFileDialog.validateNonexistentDir', 'Please enter a path that exists.'); return Promise.resolve(false); }"} {"_id":"doc-en-vscode-c4c497b43fe5a5a0356f489033331c9753beabdd51f0690bd7d2d99ae105cd2c","title":"","text":"const picks = formatter.map((formatter, index) => { return { index, label: formatter.displayName || formatter.extensionId || '?' label: formatter.displayName || formatter.extensionId || '?', description: formatter.extensionId && formatter.extensionId.value }; }); const langName = this._modeService.getLanguageName(document.getModeId()) || document.getModeId();"} {"_id":"doc-en-vscode-bb64e6cf816ba0b76ebc76ab53314c645741454e1729101807527dae11cacda1","title":"","text":"{ \"open\": \"{\", \"close\": \"}\" }, { \"open\": \"(\", \"close\": \")\" }, { \"open\": \"'\", \"close\": \"'\", \"notIn\": [\"string\", \"comment\"] }, { \"open\": \"\"\", \"close\": \"\"\", \"notIn\": [\"string\"] } { \"open\": \"\"\", \"close\": \"\"\", \"notIn\": [\"string\"] }, { \"open\": \"/*\", \"close\": \" */\", \"notIn\": [\"string\", \"comment\"] } ], \"surroundingPairs\": [ [\"{\", \"}\"],"} {"_id":"doc-en-vscode-425b552c40648291b32e4995a7aca657fb8542f85c727845dd6b380b545f6e65","title":"","text":"return; } this._set(nodes, false, browserEvent); } private _set(nodes: ITreeNode[], silent: boolean, browserEvent?: UIEvent): void { this.nodes = [...nodes]; this.elements = undefined; this._nodeSet = undefined; const that = this; this._onDidChange.fire({ get elements() { return that.get(); }, browserEvent }); if (!silent) { const that = this; this._onDidChange.fire({ get elements() { return that.get(); }, browserEvent }); } } get(): T[] {"} {"_id":"doc-en-vscode-e8eed49ae27290c5e1d6ed80205ce2a42e7213298ffca197b87a8f1815a61321","title":"","text":"insertedNodes.forEach(node => dfs(node, insertedNodesVisitor)); const nodes: ITreeNode[] = []; let silent = true; for (const node of this.nodes) { const id = this.identityProvider.getId(node.element).toString();"} {"_id":"doc-en-vscode-e4c5aa8e07b9f5907700873f7e95d5a52d5449e3fa5b76e89ce5c87dc6f9eba6","title":"","text":"if (insertedNode) { nodes.push(insertedNode); } else { silent = false; } } } this.set(nodes); this._set(nodes, silent); } private createNodeSet(): Set> {"} {"_id":"doc-en-vscode-f73909b4098d13b4593bbea38b6bac62c3b7012df3eb75b029ac7b42edd65721","title":"","text":"this.parent.removeAttribute('aria-label'); this.parent.title = this.getTooltip(); if (this.extension) { this.parent.setAttribute('aria-label', localize('extension-arialabel', \"{0}. {1} Press enter for extension details.\", this.extension.displayName)); this.parent.setAttribute('aria-label', localize('extension-arialabel', \"{0}. Press enter for extension details.\", this.extension.displayName)); } }"} {"_id":"doc-en-vscode-fe582ac1668a9b714bc0843fb8549a04237ee3e3785867fae6813bb60e5a14d7","title":"","text":"return; } const extensionName = 'vscode-smoketest-check'; await app.workbench.extensions.openExtensionsViewlet(); await app.workbench.extensions.installExtension(extensionName); await app.workbench.extensions.installExtension('michelkaporin.vscode-smoketest-check', 'vscode-smoketest-check'); await app.workbench.extensions.waitForExtensionsViewlet(); await app.workbench.quickopen.runCommand('Smoke Test Check');"} {"_id":"doc-en-vscode-3701b644bd1d14781185d676012671e203162e39cce1e60630df2a58cdb3e153","title":"","text":"await this.code.waitForElement(SEARCH_BOX); } async searchForExtension(name: string): Promise { async searchForExtension(id: string): Promise { await this.code.waitAndClick(SEARCH_BOX); await this.code.waitForActiveElement(SEARCH_BOX); await this.code.waitForTypeInEditor(SEARCH_BOX, `name:\"${name}\"`); await this.code.waitForTypeInEditor(SEARCH_BOX, `@id:${id}`); } async installExtension(name: string): Promise { await this.searchForExtension(name); async installExtension(id: string, name: string): Promise { await this.searchForExtension(id); const ariaLabel = `${name}. Press enter for extension details.`; await this.code.waitAndClick(`div.extensions-viewlet[id=\"workbench.view.extensions\"] .monaco-list-row[aria-label=\"${ariaLabel}\"] .extension li[class='action-item'] .extension-action.install`); await this.code.waitForElement(`.extension-editor .monaco-action-bar .action-item:not(.disabled) .extension-action.uninstall`);"} {"_id":"doc-en-vscode-07aa9d3c50dc73e6520400277b81e0fa9a8928cd2e05c9bc333887c5a64fec70","title":"","text":"return; } const extensionName = 'German Language Pack for Visual Studio Code'; await app.workbench.extensions.openExtensionsViewlet(); await app.workbench.extensions.installExtension(extensionName); await app.workbench.extensions.installExtension('ms-ceintl.vscode-language-pack-de', 'German Language Pack for Visual Studio Code'); await app.restart({ extraArgs: ['--locale=DE'] }); });"} {"_id":"doc-en-vscode-373af428a48cd60d196255a143b75c28f6d74f4daabc7b51e92991f053c38d70","title":"","text":"import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IWindowService } from 'vs/platform/windows/common/windows'; import Severity from 'vs/base/common/severity'; import { URI } from 'vs/base/common/uri'; import { IExtension, ExtensionState, IExtensionsWorkbenchService, AutoUpdateConfigurationKey, AutoCheckUpdatesConfigurationKey } from 'vs/workbench/contrib/extensions/common/extensions'; import { IEditorService, SIDE_GROUP, ACTIVE_GROUP } from 'vs/workbench/services/editor/common/editorService';"} {"_id":"doc-en-vscode-a93760560a327779f6d027143325f3fdc662d0ddf9f228ccebe81b170fd1f4eb","title":"","text":"return this.windowService.focusWindow() .then(() => this.open(extension)); } return this.queryGallery({ names: [extensionId], source: 'uri' }, CancellationToken.None).then(result => { if (result.total < 1) { return Promise.resolve(null);"} {"_id":"doc-en-vscode-599a1c64eb2d97f27423b0bb21d55928d1f494c246783663de3264561e8bc691","title":"","text":"const extension = result.firstPage[0]; return this.windowService.focusWindow().then(() => { return this.open(extension).then(() => { this.notificationService.prompt( Severity.Info, nls.localize('installConfirmation', \"Would you like to install the '{0}' extension?\", extension.displayName, extension.publisher), [{ label: nls.localize('install', \"Install\"), run: () => this.install(extension).then(undefined, error => this.onError(error)) }], { sticky: true } ); }); return this.open(extension); }); }); }).then(undefined, error => this.onError(error));"} {"_id":"doc-en-vscode-63db3b9b377826431c660206f6910bccfeaca8bb9328066b8528e52e73a0d44d","title":"","text":"import { lstat, Stats } from 'fs'; import * as os from 'os'; import * as path from 'path'; import { commands, Disposable, LineChange, MessageOptions, OutputChannel, Position, ProgressLocation, QuickPickItem, Range, SourceControlResourceState, TextDocumentShowOptions, TextEditor, Uri, ViewColumn, window, workspace, WorkspaceEdit, WorkspaceFolder } from 'vscode'; import { Selection, commands, Disposable, LineChange, MessageOptions, OutputChannel, Position, ProgressLocation, QuickPickItem, Range, SourceControlResourceState, TextDocumentShowOptions, TextEditor, Uri, ViewColumn, window, workspace, WorkspaceEdit, WorkspaceFolder } from 'vscode'; import TelemetryReporter from 'vscode-extension-telemetry'; import * as nls from 'vscode-nls'; import { Branch, GitErrorCodes, Ref, RefType, Status } from './api/git';"} {"_id":"doc-en-vscode-60c1fa66f81d6b07f428d541bab6df557febebd8cc1883b3c27972a2d381f7da","title":"","text":"} await this._stageChanges(textEditor, [changes[index]]); const firstStagedLine = changes[index].modifiedStartLineNumber - 1; textEditor.selections = [new Selection(firstStagedLine, 0, firstStagedLine, 0)]; } @command('git.stageSelectedRanges', { diff: true })"} {"_id":"doc-en-vscode-ed2ddf76a9cae2ccb08bb924e801215707f04ce8699eef9af84879b8a3617a2c","title":"","text":"} await this._revertChanges(textEditor, [...changes.slice(0, index), ...changes.slice(index + 1)]); const firstStagedLine = changes[index].modifiedStartLineNumber - 1; textEditor.selections = [new Selection(firstStagedLine, 0, firstStagedLine, 0)]; } @command('git.revertSelectedRanges', { diff: true })"} {"_id":"doc-en-vscode-42770145c3d669ab977e4fa8afb9feb82392816d1175152328946b0b281fd7de","title":"","text":"return; } const selectionsBeforeRevert = textEditor.selections; await this._revertChanges(textEditor, selectedChanges); textEditor.selections = selectionsBeforeRevert; } private async _revertChanges(textEditor: TextEditor, changes: LineChange[]): Promise {"} {"_id":"doc-en-vscode-c29066261046d086bafeca6ee40dba6ec0409e22dfc45b71d5f3a3e780e06104","title":"","text":"const originalUri = toGitUri(modifiedUri, '~'); const originalDocument = await workspace.openTextDocument(originalUri); const selectionsBeforeRevert = textEditor.selections; const visibleRangesBeforeRevert = textEditor.visibleRanges; const result = applyLineChanges(originalDocument, modifiedDocument, changes);"} {"_id":"doc-en-vscode-a428617f4f8323f7971691060062fab529537c8970a6dec3471d3f5c1555d028","title":"","text":"await modifiedDocument.save(); textEditor.selections = selectionsBeforeRevert; textEditor.revealRange(visibleRangesBeforeRevert[0]); }"} {"_id":"doc-en-vscode-959d4d1750d770cac8ffe3c4282a0fe6cfecd797f1dc202e0435c8fb04d1e486","title":"","text":"function begin ((?i:function|filter|configuration|workflow))s+((?:p{L}|d|_|-|.)+) (?<!S)(?i)(function|filter|configuration|workflow)s+(?:(global|local|script|private):)?((?:p{L}|d|_|-|.)+) beginCaptures 0"} {"_id":"doc-en-vscode-b77d6b97d821fd4b583917a0a4c654d4cd1abbfb764ea4e6f170201780e38252","title":"","text":"2 name entity.name.function storage.modifier.scope.powershell 3 name entity.name.function.powershell end"} {"_id":"doc-en-vscode-d8711053209a95b59b35649f17316715f4cf9d3bdbfff181ecb94a05694d7549","title":"","text":"uuid f8f5ffb0-503e-11df-9879-0800200c9a66 No newline at end of file "} {"_id":"doc-en-vscode-1981a21c0484542f90cd1147268134bb8fd55c910fa01ff21c63316a686f55b3","title":"","text":"if (jsFlags) { app.commandLine.appendSwitch('--js-flags', jsFlags); } // Disable smooth scrolling for Webviews if (cliArgs['disable-smooth-scrolling']) { app.commandLine.appendSwitch('disable-smooth-scrolling'); } } /**"} {"_id":"doc-en-vscode-5d0ad41e4b2d3a1fc9946eb9a8460999f32456f677dd8702dc17ac885872d15f","title":"","text":".then(extensions => { for (const extension of extensions) { const requireReload = !(extension.local && this.extensionService.canAddExtension(toExtensionDescription(extension.local))); const message = requireReload ? localize('InstallVSIXAction.successReload', \"Please reload Visual Studio Code to complete installing the extension {0}.\", extension.identifier.id) : localize('InstallVSIXAction.success', \"Completed installing the extension {0}.\", extension.identifier.id); const message = requireReload ? localize('InstallVSIXAction.successReload', \"Please reload Visual Studio Code to complete installing the extension {0}.\", extension.displayName || extension.name) : localize('InstallVSIXAction.success', \"Completed installing the extension {0}.\", extension.displayName || extension.name); const actions = requireReload ? [{ label: localize('InstallVSIXAction.reloadNow', \"Reload Now\"), run: () => this.windowService.reloadWindow()"} {"_id":"doc-en-vscode-438e765f3447323d117bd278354a8ce5013cc51871a8d4131fac93422062114d","title":"","text":"export class AbstractVariableResolverService implements IConfigurationResolverService { static readonly VARIABLE_LHS = '${'; static readonly VARIABLE_REGEXP = /${(.*?)}/g; declare readonly _serviceBrand: undefined;"} {"_id":"doc-en-vscode-c9efe15ac372fd21eef888f5aba2885b706184ce7a5745e1393832fb5dcf1429","title":"","text":"// loop through all variables occurrences in 'value' const replaced = value.replace(AbstractVariableResolverService.VARIABLE_REGEXP, (match: string, variable: string) => { // disallow attempted nesting, see #77289 if (variable.includes(AbstractVariableResolverService.VARIABLE_LHS)) { return match; } let resolvedValue = this.evaluateSingleVariable(match, variable, folderUri, commandValueMapping);"} {"_id":"doc-en-vscode-4b7c42403b361b9ddc3644864978e7cba598d4d829a5d194ec327a3fd7b54f32","title":"","text":"} }); test('disallows nested keys (#77289)', () => { assert.strictEqual(configurationResolverService!.resolve(workspace, '${env:key1} ${env:key1${env:key2}}'), 'Value for key1 ${env:key1${env:key2}}'); }); // test('substitute keys and values in object', () => { // \tconst myObject = { // \t\t'${workspaceRootFolderName}': '${lineNumber}',"} {"_id":"doc-en-vscode-e30a3a3e9fbedc4e8a4d7158f6758129564910bb61f448684e0a826e56145ba9","title":"","text":"} } }); KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.focusParent', weight: KeybindingWeight.WorkbenchContrib, when: WorkbenchListFocusContextKey, primary: KeyCode.Shift | KeyCode.LeftArrow, handler: (accessor) => { const focused = accessor.get(IListService).lastFocusedList; // Tree only if (focused && !(focused instanceof List || focused instanceof PagedList)) { if (focused instanceof ObjectTree || focused instanceof DataTree || focused instanceof AsyncDataTree) { const tree = focused; const focusedElements = tree.getFocus(); if (focusedElements.length === 0) { return; } const focus = focusedElements[0]; const parent = tree.getParentElement(focus); if (parent) { const fakeKeyboardEvent = new KeyboardEvent('keydown'); tree.setFocus([parent], fakeKeyboardEvent); tree.reveal(parent); } } else { const tree = focused; tree.focusParent({ origin: 'keyboard' }); } } } }); No newline at end of file"} {"_id":"doc-en-vscode-6a0a07c11d6905f0c4abd42a0262e10cfc3dd3e28fb9c3c61eccb60f826ddc63","title":"","text":"// If a single setting is being refreshed, it's ok to refresh now if that is not the focused setting if (key) { const focusedKey = focusedSetting.getAttribute(AbstractSettingRenderer.SETTING_KEY_ATTR); /** * Update `list`s live if focused item is whole list or list item, * as they have a separate \"submit edit\" step built in before this */ if ( focusedKey === key && !DOM.hasClass(focusedSetting, 'setting-item-list') && !DOM.hasClass(focusedSetting, 'setting-item-contents') if (focusedKey === key && // update `list`s live, as they have a separate \"submit edit\" step built in before this (focusedSetting.parentElement && !DOM.hasClass(focusedSetting.parentElement, 'setting-item-list')) ) { this.updateModifiedLabelForKey(key);"} {"_id":"doc-en-vscode-e81c47a3eb1fe73517c898a39d0a791841ff9eb464eb650a859291e15bac9598","title":"","text":"const onKeyDown = Event.chain(domEvent(this.view.getHTMLElement(), 'keydown')) .filter(e => !isInputElement(e.target as HTMLElement) || e.target === this.filterOnTypeDomNode) .filter(e => e.key !== 'Dead') .filter(e => e.key !== 'Dead' && !/^Media/.test(e.key)) .map(e => new StandardKeyboardEvent(e)) .filter(this.keyboardNavigationEventFilter || (() => true)) .filter(() => this.automaticKeyboardNavigation || this.triggered)"} {"_id":"doc-en-vscode-842edf254d6d94b7a20433d02804e497300822f92a26999da155f112aaa28b6d","title":"","text":"private async doRefresh(elements: ITreeItem[]): Promise { if (this.tree) { this.refreshing = true; await Promise.all(elements.map(element => this.tree.updateChildren(element, true))); elements.map(element => this.tree.rerender(element)); const parents: Set = new Set(); elements.forEach(element => { if (element !== this.root) { const parent = this.tree.getParentElement(element); parents.add(parent); } else { parents.add(element); } }); await Promise.all(Array.from(parents.values()).map(element => this.tree.updateChildren(element, true))); this.refreshing = false; this.updateContentAreas(); if (this.focused) {"} {"_id":"doc-en-vscode-1cc01d9aa392ec127617512e6090c6fd54294dd5a9861cc873ec0a1bfc1b8955","title":"","text":"} } const dataPaths: string[] = params.initializationOptions.dataPaths; const dataPaths: string[] = params.initializationOptions.dataPaths || []; const customDataProviders = getDataProviders(dataPaths); function getClientCapability(name: string, def: T) {"} {"_id":"doc-en-vscode-031ce846aba1debb808c21ad0d4a3938340e1a6b451a84aa4141b7e3a3718cd4","title":"","text":"viewStates[handle] = { visible: input === group.activeEditor, active: input === activeInput, position: editorGroupToViewColumn(this._editorGroupService, group.id || 0), position: editorGroupToViewColumn(this._editorGroupService, group.id), }; } }"} {"_id":"doc-en-vscode-26ccadcaf787e91b9a310f642e7d368a5355440678d89235136b84df3e1fd302","title":"","text":"} private onDidClickLink(handle: WebviewPanelHandle, link: URI): void { if (!link) { return; } const webview = this.getWebviewEditorInput(handle); if (this.isSupportedLink(webview, link)) { this._openerService.open(link);"} {"_id":"doc-en-vscode-942638dc22ee0871e81d5e305acaed8498c948c87fa6d716b4083476fc2ae7aa","title":"","text":"return; case 'did-click-link': let [uri] = event.args; const [uri] = event.args; this._onDidClickLink.fire(URI.parse(uri)); return;"} {"_id":"doc-en-vscode-9a9b3e7541b1613b1f03eae8342112cf0638ffb7e69ce7eb3b784f52387dda36","title":"","text":"clientY: rawEvent.clientY + bounds.top, })); return; } catch (TypeError) { } catch { // CustomEvent was treated as MouseEvent so don't do anything - https://github.com/microsoft/vscode/issues/78915 return; } } case 'did-set-content':"} {"_id":"doc-en-vscode-f4c990b86260ef563c77c1d67e1c22e3c2f16546af130d4027fe2ab03c124881","title":"","text":"export function addDisposableNonBubblingMouseOutListener(node: Element, handler: (event: MouseEvent) => void): IDisposable { return addDisposableListener(node, 'mouseout', (e: MouseEvent) => { // Mouse out bubbles, so this is an attempt to ignore faux mouse outs coming from children elements let toElement: Node | null = (e.relatedTarget || e.target); let toElement: Node | null = (e.relatedTarget); while (toElement && toElement !== node) { toElement = toElement.parentNode; }"} {"_id":"doc-en-vscode-02d5073fe152b7c00e725dadc7709fab7ea351bf92532e2c538157ce047e25c0","title":"","text":"export function addDisposableNonBubblingPointerOutListener(node: Element, handler: (event: MouseEvent) => void): IDisposable { return addDisposableListener(node, 'pointerout', (e: MouseEvent) => { // Mouse out bubbles, so this is an attempt to ignore faux mouse outs coming from children elements let toElement: Node | null = (e.relatedTarget || e.target); let toElement: Node | null = (e.relatedTarget); while (toElement && toElement !== node) { toElement = toElement.parentNode; }"} {"_id":"doc-en-vscode-4593e9e365356e760b7a4f63e11d059161dd6860c15bd12699f47e40218de7ad","title":"","text":"export function buildReplaceStringWithCasePreserved(matches: string[] | null, pattern: string): string { if (matches && (matches[0] !== '')) { const containsHyphens = validateSpecificSpecialCharacter(matches, pattern, '-'); const containsUnderscores = validateSpecificSpecialCharacter(matches, pattern, '_'); if (containsHyphens && !containsUnderscores) { return buildReplaceStringForSpecificSpecialCharacter(matches, pattern, '-'); } else if (!containsHyphens && containsUnderscores) { return buildReplaceStringForSpecificSpecialCharacter(matches, pattern, '_'); } if (matches[0].toUpperCase() === matches[0]) { return pattern.toUpperCase(); } else if (matches[0].toLowerCase() === matches[0]) { return pattern.toLowerCase(); } else if (strings.containsUppercaseCharacter(matches[0][0])) { const containsHyphens = validateSpecificSpecialCharacter(matches, pattern, '-'); const containsUnderscores = validateSpecificSpecialCharacter(matches, pattern, '_'); if (containsHyphens && !containsUnderscores) { return buildReplaceStringForSpecificSpecialCharacter(matches, pattern, '-'); } else if (!containsHyphens && containsUnderscores) { return buildReplaceStringForSpecificSpecialCharacter(matches, pattern, '_'); } else { return pattern[0].toUpperCase() + pattern.substr(1); } return pattern[0].toUpperCase() + pattern.substr(1); } else { // we don't understand its pattern yet. return pattern;"} {"_id":"doc-en-vscode-09c2fa07afb52960b41a4f3b9bd311e65948e6528f0b36b52320595d66cd04e3","title":"","text":"assert.equal(buildReplaceStringWithCasePreserved(actual, 'newfoo-newbar-newabc'), 'Newfoo-Newbar-Newabc'); actual = ['Foo-Bar-abc']; assert.equal(buildReplaceStringWithCasePreserved(actual, 'newfoo-newbar'), 'Newfoo-newbar'); actual = ['foo-Bar']; assert.equal(buildReplaceStringWithCasePreserved(actual, 'newfoo-newbar'), 'newfoo-Newbar'); actual = ['foo-BAR']; assert.equal(buildReplaceStringWithCasePreserved(actual, 'newfoo-newbar'), 'newfoo-NEWBAR'); actual = ['Foo_Bar']; assert.equal(buildReplaceStringWithCasePreserved(actual, 'newfoo_newbar'), 'Newfoo_Newbar');"} {"_id":"doc-en-vscode-29fdebeb77a13e253bf21dea5fca4058e4a37e49d7c830a7b4a4b4580a470a84","title":"","text":"assert.equal(buildReplaceStringWithCasePreserved(actual, 'newfoo_newbar'), 'Newfoo_newbar'); actual = ['Foo_Bar-abc']; assert.equal(buildReplaceStringWithCasePreserved(actual, 'newfoo_newbar-abc'), 'Newfoo_newbar-abc'); actual = ['foo_Bar']; assert.equal(buildReplaceStringWithCasePreserved(actual, 'newfoo_newbar'), 'newfoo_Newbar'); actual = ['Foo_BAR']; assert.equal(buildReplaceStringWithCasePreserved(actual, 'newfoo_newbar'), 'Newfoo_NEWBAR'); }); test('preserve case', () => {"} {"_id":"doc-en-vscode-9032ac562e3cee88e97b72bdb55df7e58b9182c6b1aafe4fc8ebf31336d8105d","title":"","text":"actual = replacePattern.buildReplaceString(['Foo-Bar-abc'], true); assert.equal(actual, 'Newfoo-newbar'); replacePattern = parseReplaceString('newfoo-newbar'); actual = replacePattern.buildReplaceString(['foo-Bar'], true); assert.equal(actual, 'newfoo-Newbar'); replacePattern = parseReplaceString('newfoo-newbar'); actual = replacePattern.buildReplaceString(['foo-BAR'], true); assert.equal(actual, 'newfoo-NEWBAR'); replacePattern = parseReplaceString('newfoo_newbar'); actual = replacePattern.buildReplaceString(['Foo_Bar'], true); assert.equal(actual, 'Newfoo_Newbar');"} {"_id":"doc-en-vscode-32bc7d2f0ea738624b0ee8a829e5396c700ec00a8d19a13d8cfe1f94a43207d5","title":"","text":"replacePattern = parseReplaceString('newfoo_newbar-abc'); actual = replacePattern.buildReplaceString(['Foo_Bar-abc'], true); assert.equal(actual, 'Newfoo_newbar-abc'); replacePattern = parseReplaceString('newfoo_newbar'); actual = replacePattern.buildReplaceString(['foo_Bar'], true); assert.equal(actual, 'newfoo_Newbar'); replacePattern = parseReplaceString('newfoo_newbar'); actual = replacePattern.buildReplaceString(['foo_BAR'], true); assert.equal(actual, 'newfoo_NEWBAR'); }); });"} {"_id":"doc-en-vscode-36b1c07a7f9100d1d828e0509435947a2518111f74131701bcbdd80c233b48d3","title":"","text":"const extensionPacks: ExtensionSuggestion[] = [ { name: localize('welcomePage.javaScript', \"JavaScript\"), id: 'dbaeumer.vscode-eslint' }, { name: localize('welcomePage.typeScript', \"TypeScript\"), id: 'ms-vscode.vscode-typescript-tslint-plugin' }, { name: localize('welcomePage.python', \"Python\"), id: 'ms-python.python' }, // { name: localize('welcomePage.go', \"Go\"), id: 'lukehoban.go' }, { name: localize('welcomePage.php', \"PHP\"), id: 'felixfbecker.php-pack' },"} {"_id":"doc-en-vscode-cae309366b8e4dcda5a3665b7bb089e079f05af5e5649ac4d91ef4a8cd13bb56","title":"","text":"if (item.isDisposed) { return this.onSelectResource(resource, reveal, retry + 1); } this.tree.reveal(item, 0.5); // Don't scroll to the item if it's already visible if (this.tree.getRelativeTop(item) === null) { this.tree.reveal(item, 0.5); } } this.tree.setFocus([item]);"} {"_id":"doc-en-vscode-3999822792c3518bc851a7dc63622aa54f949bc96658351720f1e65d87eafb07","title":"","text":"\"config.scanRepositories\": \"List of paths to search for git repositories in.\", \"config.showProgress\": \"Controls whether git actions should show progress.\", \"config.rebaseWhenSync\": \"Force git to use rebase when running the sync command.\", \"config.confirmEmptyCommits\": \"Always confirm the creation of empty commits.\", \"config.confirmEmptyCommits\": \"Always confirm the creation of empty commits for the 'Git: Commit Empty' command.\", \"config.fetchOnPull\": \"Fetch all branches when pulling or just the current one.\", \"config.pullTags\": \"Fetch all tags when pulling.\", \"config.autoStash\": \"Stash any changes before pulling and restore them after successful pull.\","} {"_id":"doc-en-vscode-923ff51d90b0f6179b1a55fc74eb18bf246d0d22ee8cf55b38f9fb49b523e073","title":"","text":"\"url\": \"https://schemastore.azurewebsites.net/schemas/json/babelrc.json\" }, { \"fileMatch\": \"babel.config.json\", \"url\": \"https://schemastore.azurewebsites.net/schemas/json/babelrc.json\" }, { \"fileMatch\": \"jsconfig.json\", \"url\": \"https://schemastore.azurewebsites.net/schemas/json/jsconfig.json\" },"} {"_id":"doc-en-vscode-e5430b3e2df4a598a497b97353c8d7ff905b48c970d55a05aadde9ada5c479ed","title":"","text":"if (this._terminalService.terminalInstances.length > 0) { this._updateFont(); this._updateTheme(); this._terminalService.getActiveTab()?.setVisible(visible); } else { // Check if instances were already restored as part of workbench restore if (this._terminalService.terminalInstances.length === 0) {"} {"_id":"doc-en-vscode-85c10484a2787d075d31dc3a60001d736660dce2c7d4dd3a896b1582e675158f","title":"","text":"return; } this._currentResolveCodeLensSymbolsPromise = createCancelablePromise(token => { const resolvePromise = createCancelablePromise(token => { const promises = toResolve.map((request, i) => {"} {"_id":"doc-en-vscode-a4bd79530d67cd11680aef1882fc966d47d19cf5d0b013ea8fdf99db7a664e78","title":"","text":"return Promise.all(promises); }); this._currentResolveCodeLensSymbolsPromise = resolvePromise; this._currentResolveCodeLensSymbolsPromise.then(() => { if (this._currentCodeLensModel) { // update the cached state with new resolved items this._codeLensCache.put(model, this._currentCodeLensModel); } this._oldCodeLensModels.clear(); // dispose old models once we have updated the UI with the current model this._currentResolveCodeLensSymbolsPromise = undefined; if (resolvePromise === this._currentResolveCodeLensSymbolsPromise) { this._currentResolveCodeLensSymbolsPromise = undefined; } }, err => { onUnexpectedError(err); // can also be cancellation! this._currentResolveCodeLensSymbolsPromise = undefined; if (resolvePromise === this._currentResolveCodeLensSymbolsPromise) { this._currentResolveCodeLensSymbolsPromise = undefined; } }); } }"} {"_id":"doc-en-vscode-6213c185ebfb9046fe36e380b1fe21aaa8eda199e93717d2e35bed5566f9f526","title":"","text":"} export function findValidPasteFileTarget(explorerService: IExplorerService, targetFolder: ExplorerItem, fileToPaste: { resource: URI; isDirectory?: boolean; allowOverwrite: boolean }, incrementalNaming: 'simple' | 'smart'): URI { export function findValidPasteFileTarget(explorerService: IExplorerService, targetFolder: ExplorerItem, fileToPaste: { resource: URI; isDirectory?: boolean; allowOverwrite: boolean }, incrementalNaming: 'simple' | 'smart' | 'disabled'): URI { let name = resources.basenameOrAuthority(fileToPaste.resource); let candidate = resources.joinPath(targetFolder.resource, name);"} {"_id":"doc-en-vscode-eb26e614d10370ed9d3cbf3a0d6d83c2780d8126bdfaece77acadb697ecd176d","title":"","text":"break; } name = incrementFileName(name, !!fileToPaste.isDirectory, incrementalNaming); if (incrementalNaming !== 'disabled') { name = incrementFileName(name, !!fileToPaste.isDirectory, incrementalNaming); } candidate = resources.joinPath(targetFolder.resource, name); }"} {"_id":"doc-en-vscode-e2159fd25b5882bd5d61cb1e8d019a8a685e7f30126ff93eff7a0ebb973f5350","title":"","text":"const context = explorerService.getContext(true); const toPaste = resources.distinctParents(await clipboardService.readResources(), r => r); const element = context.length ? context[0] : explorerService.roots[0]; const incrementalNaming = configurationService.getValue().explorer.incrementalNaming; try { // Check if target is ancestor of pasted folder"} {"_id":"doc-en-vscode-abd2aabb8174bfce1d079cdb8fece89857b400ef742d8ef8ed51cbc874eaec01","title":"","text":"target = element.isDirectory ? element : element.parent!; } const incrementalNaming = configurationService.getValue().explorer.incrementalNaming; const targetFile = findValidPasteFileTarget(explorerService, target, { resource: fileToPaste, isDirectory: fileToPasteStat.isDirectory, allowOverwrite: pasteShouldMove }, incrementalNaming); const targetFile = findValidPasteFileTarget(explorerService, target, { resource: fileToPaste, isDirectory: fileToPasteStat.isDirectory, allowOverwrite: pasteShouldMove || incrementalNaming === 'disabled' }, incrementalNaming); return { source: fileToPaste, target: targetFile }; }));"} {"_id":"doc-en-vscode-a3f3a1d02f624b4cbfb465b5b6bcf0a08bb9837f0ffb0839c468a4d7e92747ff","title":"","text":"}; await explorerService.applyBulkEdit(resourceFileEdits, options); } else { const resourceFileEdits = sourceTargetPairs.map(pair => new ResourceFileEdit(pair.source, pair.target, { copy: true })); const resourceFileEdits = sourceTargetPairs.map(pair => new ResourceFileEdit(pair.source, pair.target, { copy: true, overwrite: incrementalNaming === 'disabled' })); const undoLevel = configurationService.getValue().explorer.confirmUndo; const options = { confirmBeforeUndo: undoLevel === UndoConfirmLevel.Default || undoLevel === UndoConfirmLevel.Verbose,"} {"_id":"doc-en-vscode-681c49d5483f7b2c7b618e992db560297cc15f3c53f1eb1bad522c4d844df6cd","title":"","text":"}, 'explorer.incrementalNaming': { 'type': 'string', enum: ['simple', 'smart'], enum: ['simple', 'smart', 'disabled'], enumDescriptions: [ nls.localize('simple', \"Appends the word \"copy\" at the end of the duplicated name potentially followed by a number\"), nls.localize('smart', \"Adds a number at the end of the duplicated name. If some number is already part of the name, tries to increase that number\") nls.localize('smart', \"Adds a number at the end of the duplicated name. If some number is already part of the name, tries to increase that number\"), nls.localize('disabled', \"Disables incremental naming. If two files with the same name exist you will be prompted to overwrite the existing file\") ], description: nls.localize('explorer.incrementalNaming', \"Controls what naming strategy to use when a giving a new name to a duplicated explorer item on paste.\"), default: 'simple'"} {"_id":"doc-en-vscode-62072756089611d3da46ba59a39d5d7f98d8ce73b853c518ad973de300bd4669","title":"","text":"colors: boolean; badges: boolean; }; incrementalNaming: 'simple' | 'smart'; incrementalNaming: 'simple' | 'smart' | 'disabled'; excludeGitIgnore: boolean; fileNesting: { enabled: boolean;"} {"_id":"doc-en-vscode-20ca8f34555758ae02afd59981504f36b0b91aad24b7a8047326c8fa14ca1eef","title":"","text":"} public disable(): void { this.blur(); this.input.disabled = true; this._hideMessage(); }"} {"_id":"doc-en-vscode-367f5d0f1b0a4e2d2fdfc171d159f40e951b0870f5c2b9b18a5e0ccf7eaeb7ad","title":"","text":"], \"folding\": { \"markers\": { \"start\": \"^=pods*$\", \"end\": \"^=cuts*$\" \"start\": \"^(?:(?:=pods*$)|(?:s*#regionb))\", \"end\": \"^(?:(?:=cuts*$)|(?:s*#endregionb))\" } } } No newline at end of file"} {"_id":"doc-en-vscode-09adf1a1c592b5c38eaa93426ef3de728120c02f02756a6def6cde761ec85823","title":"","text":"description: localize('symbolSortOrder', \"Controls how symbols are sorted in the breadcrumbs outline view.\"), type: 'string', default: 'position', overridable: true, enum: ['position', 'name', 'type'], enumDescriptions: [ localize('symbolSortOrder.position', \"Show symbol outline in file position order.\"),"} {"_id":"doc-en-vscode-e77c4e42b0dadb2802ebbfa3bb629959e22e510376202a79f0bbf99af3c73f14","title":"","text":"import { URI } from 'vs/base/common/uri'; import 'vs/css!./media/breadcrumbscontrol'; import { OutlineElement, OutlineModel, TreeElement } from 'vs/editor/contrib/documentSymbols/outlineModel'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IConfigurationService, IConfigurationOverrides } from 'vs/platform/configuration/common/configuration'; import { FileKind, IFileService, IFileStat } from 'vs/platform/files/common/files'; import { IConstructorSignature1, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { WorkbenchDataTree, WorkbenchAsyncDataTree } from 'vs/platform/list/browser/listService';"} {"_id":"doc-en-vscode-7c544ec327ffa5a95056047a102ce46b5bc5f6773cd49f72ec9097661dd4b3ce","title":"","text":"export class BreadcrumbsOutlinePicker extends BreadcrumbsPicker { protected readonly _symbolSortOrder: BreadcrumbsConfig<'position' | 'name' | 'type'>; protected _outlineComparator: OutlineItemComparator; constructor( parent: HTMLElement,"} {"_id":"doc-en-vscode-ed0d5de5f7682dcc547d33e84e791c4bcfbaf7603c1786e8a5fb987af908a4e8","title":"","text":") { super(parent, instantiationService, themeService, configurationService); this._symbolSortOrder = BreadcrumbsConfig.SymbolSortOrder.bindTo(this._configurationService); this._outlineComparator = new OutlineItemComparator(); } protected _createTree(container: HTMLElement) {"} {"_id":"doc-en-vscode-f33528c4e61fbcf0fc2379b29de0cddf3528167e82b7ec15009f737c714900d5","title":"","text":"collapseByDefault: true, expandOnlyOnTwistieClick: true, multipleSelectionSupport: false, sorter: new OutlineItemComparator(this._getOutlineItemCompareType()), sorter: this._outlineComparator, identityProvider: new OutlineIdentityProvider(), keyboardNavigationLabelProvider: new OutlineNavigationLabelProvider(), filter: this._instantiationService.createInstance(OutlineFilter, 'breadcrumbs')"} {"_id":"doc-en-vscode-ea15c63118d4d79279690d6abf91a98ad563cb8732efe82457fa763409f0c728","title":"","text":"const tree = this._tree as WorkbenchDataTree; tree.setInput(model); const textModel = model.textModel; const overrideConfiguration = { resource: textModel.uri, overrideIdentifier: textModel.getLanguageIdentifier().language }; this._outlineComparator.type = this._getOutlineItemCompareType(overrideConfiguration); if (element !== model) { tree.reveal(element, 0.5); tree.setFocus([element], this._fakeEvent);"} {"_id":"doc-en-vscode-8a628391e95bcd2ed30f536903bcab0e9e462d13c491f603f43ecd689bf1d8e7","title":"","text":"} } private _getOutlineItemCompareType(): OutlineSortOrder { switch (this._symbolSortOrder.getValue()) { private _getOutlineItemCompareType(overrideConfiguration?: IConfigurationOverrides): OutlineSortOrder { switch (this._symbolSortOrder.getValue(overrideConfiguration)) { case 'name': return OutlineSortOrder.ByName; case 'type':"} {"_id":"doc-en-vscode-c4b548c98983b7beeb1eceec924b5bad8c70fc8eedd84e24bd6c53742edb7337","title":"","text":"this.focus(); } getContextMenuActions(): IAction[] { getContextMenuActions(viewDescriptor?: IViewDescriptor): IAction[] { const result: IAction[] = []; if (viewDescriptor) { result.push({ id: `${viewDescriptor.id}.removeView`, label: localize('hideView', \"Hide\"), enabled: viewDescriptor.canToggleVisibility, run: () => this.toggleViewVisibility(viewDescriptor.id) }); } const viewToggleActions = this.viewsModel.viewDescriptors.map(viewDescriptor => ({ id: `${viewDescriptor.id}.toggleVisibility`, label: viewDescriptor.name,"} {"_id":"doc-en-vscode-a93fcc8a1cccfd17a5d74787b7615e1f387a688ac9a31261ea99842577160e55","title":"","text":"run: () => this.toggleViewVisibility(viewDescriptor.id) })); if (result.length && viewToggleActions.length) { result.push(new Separator()); } result.push(...viewToggleActions); const parentActions = this.getViewletContextMenuActions(); if (viewToggleActions.length && parentActions.length) { if (result.length && parentActions.length) { result.push(new Separator()); } result.push(...parentActions); return result; }"} {"_id":"doc-en-vscode-7c5b01a2b09fab3ab020c2a204079049fa8ed5232201bdf10f5edbc3a8ed797c","title":"","text":"event.stopPropagation(); event.preventDefault(); const actions: IAction[] = []; actions.push({ id: `${viewDescriptor.id}.removeView`, label: localize('hideView', \"Hide\"), enabled: viewDescriptor.canToggleVisibility, run: () => this.toggleViewVisibility(viewDescriptor.id) }); const otherActions = this.getContextMenuActions(); if (otherActions.length) { actions.push(...[new Separator(), ...otherActions]); } const actions: IAction[] = this.getContextMenuActions(viewDescriptor); let anchor: { x: number, y: number } = { x: event.posx, y: event.posy }; this.contextMenuService.showContextMenu({"} {"_id":"doc-en-vscode-a051cddc2917ee85fdfecaab15dae3de31a3480a65068e71579af77f608ac4fc","title":"","text":"if (contribution.scopes) { if ((!Array.isArray(contribution.scopes) || contribution.scopes.some(s => typeof s !== 'string'))) { collector.error(nls.localize('invalid.scopes', \"If defined, 'configuration.tokenStyleDefaults.scopes' must must be an array or strings\")); collector.error(nls.localize('invalid.scopes', \"If defined, 'configuration.tokenStyleDefaults.scopes' must be an array or strings\")); continue; } tokenStyleDefault.scopesToProbe = [contribution.scopes];"} {"_id":"doc-en-vscode-91676ca0463626cb1552d14bb19792bd3106a4d529ba914dbe884cee6f580f2d","title":"","text":"if (ranges.length > 0) { this._emitModelTokensChangedEvent({ tokenizationSupportChanged: false, semanticTokensApplied: false, ranges: ranges }); }"} {"_id":"doc-en-vscode-141d13b39b4fab449146a5ee3cb72fece161ac75d6e7951f704731a009c4d5f1","title":"","text":"this._emitModelTokensChangedEvent({ tokenizationSupportChanged: false, semanticTokensApplied: tokens !== null, ranges: [{ fromLineNumber: 1, toLineNumber: this.getLineCount() }] }); }"} {"_id":"doc-en-vscode-54521915eb1bf971adb9783c68a668ed5448c17a82227fdd81eea6d1f470533b","title":"","text":"this._tokens.flush(); this._emitModelTokensChangedEvent({ tokenizationSupportChanged: true, semanticTokensApplied: false, ranges: [{ fromLineNumber: 1, toLineNumber: this._buffer.getLineCount()"} {"_id":"doc-en-vscode-af9a7a6dcc66b9eb8a63c9de3401bd3bd0b3014f8c22062eb56027affdec2960","title":"","text":"this._emitModelTokensChangedEvent({ tokenizationSupportChanged: false, semanticTokensApplied: false, ranges: [{ fromLineNumber: 1, toLineNumber: this.getLineCount() }] }); }"} {"_id":"doc-en-vscode-840c4340f9fc62b8456db2a4673d1536e3bf08ea18cd74ed0aeea561e9f4caef","title":"","text":"*/ export interface IModelTokensChangedEvent { readonly tokenizationSupportChanged: boolean; readonly semanticTokensApplied: boolean; readonly ranges: { /** * The start of the range (inclusive)"} {"_id":"doc-en-vscode-05e4ca169dcc77bb54123885755ed6a4d74b5372a345c60edf8574bf7ede24ae","title":"","text":"import './largeFileOptimizations'; import './inspectEditorTokens/inspectEditorTokens'; import './saveParticipants'; import './semanticTokensHelp'; import './toggleColumnSelection'; import './toggleMinimap'; import './toggleMultiCursorModifier';"} {"_id":"doc-en-vscode-c32e297855c3274000bf9c2847cc9d9301d1a4e930ea491106a8593f5aaf7168","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 nls from 'vs/nls'; import * as path from 'vs/base/common/path'; import { Disposable, DisposableStore } from 'vs/base/common/lifecycle'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { registerEditorContribution } from 'vs/editor/browser/editorExtensions'; import { IEditorContribution } from 'vs/editor/common/editorCommon'; import { INotificationService, Severity } from 'vs/platform/notification/common/notification'; import { IOpenerService } from 'vs/platform/opener/common/opener'; import { URI } from 'vs/base/common/uri'; import { ITextModel } from 'vs/editor/common/model'; import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; /** * Shows a message when semantic tokens are shown the first time. */ export class SemanticTokensHelp extends Disposable implements IEditorContribution { public static readonly ID = 'editor.contrib.semanticHighlightHelp'; constructor( _editor: ICodeEditor, @INotificationService _notificationService: INotificationService, @IOpenerService _openerService: IOpenerService, @IWorkbenchThemeService _themeService: IWorkbenchThemeService ) { super(); const toDispose = this._register(new DisposableStore()); const localToDispose = toDispose.add(new DisposableStore()); const installChangeTokenListener = (model: ITextModel) => { localToDispose.add(model.onDidChangeTokens((e) => { if (!e.semanticTokensApplied) { return; } toDispose.dispose(); // uninstall all listeners, makes sure the notification is only shown once per window const message = nls.localize( { key: 'semanticTokensHelp', comment: [ 'Variable 0 will be a file name.', 'Variable 1 will be a theme name.' ] }, \"Semantic highlighting has been applied to '{0}' as the theme '{1}' has semantic highlighting enabled.\", path.basename(model.uri.path), _themeService.getColorTheme().label ); _notificationService.prompt(Severity.Info, message, [ { label: nls.localize('learnMoreButton', \"Learn More\"), run: () => { const url = 'https://go.microsoft.com/fwlink/?linkid=2122588'; _openerService.open(URI.parse(url)); } } ], { neverShowAgain: { id: 'editor.contrib.semanticTokensHelp' } }); })); }; const model = _editor.getModel(); if (model !== null) { installChangeTokenListener(model); } toDispose.add(_editor.onDidChangeModel((e) => { localToDispose.clear(); const model = _editor.getModel(); if (!model) { return; } installChangeTokenListener(model); })); } } registerEditorContribution(SemanticTokensHelp.ID, SemanticTokensHelp); "} {"_id":"doc-en-vscode-6135f2398d620143de164f5424b3d986e3ca955a2ea22393c9e2639085824465","title":"","text":"import { IHoverService } from 'vs/workbench/services/hover/browser/hover'; import { IHoverDelegate, IHoverDelegateOptions } from 'vs/base/browser/ui/iconLabel/iconHoverDelegate'; import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity'; import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions'; const ItemHeight = 22;"} {"_id":"doc-en-vscode-ad1d9760292c2116b9d92fbe1e3b4d4427a517a5fb5a7c4aab99d72529dd54d2","title":"","text":"@IThemeService themeService: IThemeService, @ITelemetryService telemetryService: ITelemetryService, @ILabelService private readonly labelService: ILabelService, @IUriIdentityService private readonly uriIdentityService: IUriIdentityService @IUriIdentityService private readonly uriIdentityService: IUriIdentityService, @IExtensionService private readonly extensionService: IExtensionService, ) { super({ ...options, titleMenuId: MenuId.TimelineTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);"} {"_id":"doc-en-vscode-8494c3bc0ff614edbcaeff6808a05c26772b6a2e601b6e1f82fcdefc6df21517","title":"","text":"override setVisible(visible: boolean): void { if (visible) { this.extensionService.activateByEvent('onView:timeline'); this.visibilityDisposables = new DisposableStore(); this.editorService.onDidActiveEditorChange(this.onActiveEditorChanged, this, this.visibilityDisposables);"} {"_id":"doc-en-vscode-640869d149e5b47222e5d20032c98e769cf44263fc1a8938a983a7f98619dca4","title":"","text":"const viewContainer = this.getViewContainer(panelDescriptor.id); if (viewContainer?.hideIfEmpty) { const viewDescriptors = this.viewDescriptorService.getViewDescriptors(viewContainer); if (viewDescriptors.activeViewDescriptors.length === 0) { if (viewDescriptors.activeViewDescriptors.length === 0 && this.compositeBar.getPinnedComposites().length > 1) { this.hideComposite(panelDescriptor.id); // Update the composite bar by hiding } }"} {"_id":"doc-en-vscode-971d2dc510d110c441e510652f06317474dd727715848f7e6639c6ef4b34f801","title":"","text":"\"config.enableSmartCommit\": \"Commit all changes when there are no staged changes.\", \"config.smartCommitChanges\": \"Control which changes are automatically staged by Smart Commit.\", \"config.smartCommitChanges.all\": \"Automatically stage all changes.\", \"config.smartCommitChanges.tracked\": \"Automatically staged tracked changes only.\", \"config.smartCommitChanges.tracked\": \"Automatically stage tracked changes only.\", \"config.suggestSmartCommit\": \"Suggests to enable smart commit (commit all changes when there are no staged changes).\", \"config.enableCommitSigning\": \"Enables commit signing with GPG.\", \"config.discardAllScope\": \"Controls what changes are discarded by the `Discard all changes` command. `all` discards all changes. `tracked` discards only tracked files. `prompt` shows a prompt dialog every time the action is run.\","} {"_id":"doc-en-vscode-7fe3ea40204204501b598a4d922d8a8a71f6f70e77499dbc38c624a49a4b2918","title":"","text":"fi fi if [ ! -L $0 ]; then if [ ! -L \"$0\" ]; then # if path is not a symlink, find relatively VSCODE_PATH=\"$(dirname $0)/..\" VSCODE_PATH=\"$(dirname \"$0\")/..\" else if command -v readlink >/dev/null; then # if readlink exists, follow the symlink and find relatively VSCODE_PATH=\"$(dirname $(readlink -f $0))/..\" VSCODE_PATH=\"$(dirname $(readlink -f \"$0\"))/..\" else # else use the standard install location VSCODE_PATH=\"/usr/share/@@NAME@@\""} {"_id":"doc-en-vscode-144bc7c402a35b7176c026ae0b653e3fa5a14b9a15672c9f3cb3a2c7f6a904f7","title":"","text":"// create the suggestion resolver if (typeof provider.resolveCompletionItem !== 'function') { this._resolveCache = Promise.resolve(); this._isResolved = true; } } // resolving get isResolved() { return Boolean(this._resolveCache); return Boolean(this._isResolved); } private _resolveCache?: Promise; private _isResolved?: boolean; async resolve(token: CancellationToken) { if (!this._resolveCache) { const sub = token.onCancellationRequested(() => { this._resolveCache = undefined; this._isResolved = false; }); this._resolveCache = Promise.resolve(this.provider.resolveCompletionItem!(this.completion, token)).then(value => { Object.assign(this.completion, value); this._isResolved = true; sub.dispose(); }, err => { if (isPromiseCanceledError(err)) { // the IPC queue will reject the request with the // cancellation error -> reset cached this._resolveCache = undefined; this._isResolved = false; } }); }"} {"_id":"doc-en-vscode-7e37cb09ea19c4e88aa358824579d6ed1dbeaf72b86ab7c9d98e8dc7bfdc10dc","title":"","text":"import { EditorOption } from 'vs/editor/common/config/editorOptions'; import * as platform from 'vs/base/common/platform'; import { MenuRegistry } from 'vs/platform/actions/common/actions'; import { CancellationTokenSource } from 'vs/base/common/cancellation'; // sticky suggest widget which doesn't disappear on focus out and such let _sticky = false;"} {"_id":"doc-en-vscode-740736fa59194bde8ee9c7b52b32db832e6846788c416a3a96bdf721417cf03c","title":"","text":"const modelVersionNow = model.getAlternativeVersionId(); const { item } = event; // const tasks: Promise[] = []; const cts = new CancellationTokenSource(); // pushing undo stops *before* additional text edits and // *after* the main edit if (!(flags & InsertFlags.NoBeforeUndoStop)) {"} {"_id":"doc-en-vscode-3bb46772a83bf1cace1ea0103618c97288a89e0a7f27300e915fb354d1e7e26b","title":"","text":"// keep item in memory this._memoryService.memorize(model, this.editor.getPosition(), item); const scrollState = StableEditorScrollState.capture(this.editor); if (Array.isArray(item.completion.additionalTextEdits)) { this.editor.executeEdits('suggestController.additionalTextEdits', item.completion.additionalTextEdits.map(edit => EditOperation.replace(Range.lift(edit.range), edit.text))); // sync additional edits const scrollState = StableEditorScrollState.capture(this.editor); this.editor.executeEdits( 'suggestController.additionalTextEdits.sync', item.completion.additionalTextEdits.map(edit => EditOperation.replace(Range.lift(edit.range), edit.text)) ); scrollState.restoreRelativeVerticalPositionOfCursor(this.editor); } else if (!item.isResolved) { // async additional edits let position: IPosition | undefined; const docListener = model.onDidChangeContent(e => { if (e.isFlush) { cts.cancel(); docListener.dispose(); return; } for (let change of e.changes) { const thisPosition = Range.getEndPosition(change.range); if (!position || Position.isBefore(thisPosition, position)) { position = thisPosition; } } }); let oldFlags = flags; flags |= InsertFlags.NoAfterUndoStop; let didType = false; let typeListener = this.editor.onWillType(() => { typeListener.dispose(); didType = true; if (!(oldFlags & InsertFlags.NoAfterUndoStop)) { this.editor.pushUndoStop(); } }); tasks.push(item.resolve(cts.token).then(() => { if (!item.completion.additionalTextEdits || cts.token.isCancellationRequested) { return; } if (position && item.completion.additionalTextEdits.some(edit => Position.isBefore(position!, Range.getStartPosition(edit.range)))) { return; } if (didType) { this.editor.pushUndoStop(); } this.editor.executeEdits( 'suggestController.additionalTextEdits.async', item.completion.additionalTextEdits.map(edit => EditOperation.replace(Range.lift(edit.range), edit.text)) ); if (didType || !(oldFlags & InsertFlags.NoAfterUndoStop)) { this.editor.pushUndoStop(); } }).finally(() => { docListener.dispose(); typeListener.dispose(); })); } let { insertText } = item.completion;"} {"_id":"doc-en-vscode-691a7f2b90f70f8df67cf51cf52d492e30755e522ae9cedf98d4f6df68a48194","title":"","text":"adjustWhitespace: !(item.completion.insertTextRules! & CompletionItemInsertTextRule.KeepWhitespace) }); scrollState.restoreRelativeVerticalPositionOfCursor(this.editor); if (!(flags & InsertFlags.NoAfterUndoStop)) { this.editor.pushUndoStop(); }"} {"_id":"doc-en-vscode-a2d26c14d37bad1726b9c40aa189c05d836651fcf0b00a2b13025f32012e3259","title":"","text":"if (!item.completion.command) { // done this.model.cancel(); this.model.clear(); } else if (item.completion.command.id === TriggerSuggestAction.id) { // retigger"} {"_id":"doc-en-vscode-dc025a75e3870c5c079209247f530ba71028d381447e23d7434665c38b8fd0d8","title":"","text":"} else { // exec command, done this._commandService.executeCommand(item.completion.command.id, ...(item.completion.command.arguments ? [...item.completion.command.arguments] : [])) .catch(onUnexpectedError) .finally(() => this.model.clear()); // <- clear only now, keep commands alive tasks.push(this._commandService.executeCommand(item.completion.command.id, ...(item.completion.command.arguments ? [...item.completion.command.arguments] : [])).catch(onUnexpectedError)); this.model.cancel(); } if (flags & InsertFlags.KeepAlternativeSuggestions) { this._alternatives.value.set(event, next => { // cancel resolving of additional edits cts.cancel(); // this is not so pretty. when inserting the 'next' // suggestion we undo until we are at the state at // which we were before inserting the previous suggestion..."} {"_id":"doc-en-vscode-dcba478c00282f07dbc20aac1f5073f6e1ed45475b89fc6665b0bc145737a28c","title":"","text":"} this._alertCompletionItem(item); // clear only now - after all tasks are done Promise.all(tasks).finally(() => { this.model.clear(); cts.dispose(); }); } getOverwriteInfo(item: CompletionItem, toggleMode: boolean): { overwriteBefore: number, overwriteAfter: number } {"} {"_id":"doc-en-vscode-7d3768d147f02f8fe7021a5510e936e0994e773487d69a7fe70de0ad8d148343","title":"","text":"import { SnippetController2 } from 'vs/editor/contrib/snippet/snippetController2'; import { IMenuService, IMenu } from 'vs/platform/actions/common/actions'; import { createTextModel } from 'vs/editor/test/common/editorTestUtils'; import { Range } from 'vs/editor/common/core/range'; import { timeout } from 'vs/base/common/async'; suite('SuggestController', function () {"} {"_id":"doc-en-vscode-1401d39494d82d6a0dc3b4a6630f3778f49236150564c7a9cc61276746b4072c","title":"","text":"assert.equal(editor.getValue(), ' let name = foo'); }); test('use additionalTextEdits sync when possible', async function () { disposables.add(CompletionProviderRegistry.register({ scheme: 'test-ctrl' }, { provideCompletionItems(doc, pos) { return { suggestions: [{ kind: CompletionItemKind.Snippet, label: 'let', insertText: 'hello', range: Range.fromPositions(pos), additionalTextEdits: [{ text: 'I came sync', range: { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 1 } }] }] }; }, async resolveCompletionItem(item) { return item; } })); editor.setValue('hellonhallo'); editor.setSelection(new Selection(2, 6, 2, 6)); // trigger let p1 = Event.toPromise(controller.model.onDidSuggest); controller.triggerSuggest(); await p1; // let p2 = Event.toPromise(controller.model.onDidCancel); controller.acceptSelectedSuggestion(false, false); await p2; // insertText happens sync! assert.equal(editor.getValue(), 'I came synchellonhallohello'); }); test('resolve additionalTextEdits async when needed', async function () { let resolveCallCount = 0; disposables.add(CompletionProviderRegistry.register({ scheme: 'test-ctrl' }, { provideCompletionItems(doc, pos) { return { suggestions: [{ kind: CompletionItemKind.Snippet, label: 'let', insertText: 'hello', range: Range.fromPositions(pos) }] }; }, async resolveCompletionItem(item) { resolveCallCount += 1; await timeout(10); item.additionalTextEdits = [{ text: 'I came late', range: { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 1 } }]; return item; } })); editor.setValue('hellonhallo'); editor.setSelection(new Selection(2, 6, 2, 6)); // trigger let p1 = Event.toPromise(controller.model.onDidSuggest); controller.triggerSuggest(); await p1; // let p2 = Event.toPromise(controller.model.onDidCancel); controller.acceptSelectedSuggestion(false, false); await p2; // insertText happens sync! assert.equal(editor.getValue(), 'hellonhallohello'); assert.equal(resolveCallCount, 1); // additional edits happened after a litte wait await timeout(20); assert.equal(editor.getValue(), 'I came latehellonhallohello'); // single undo stop editor.getModel()?.undo(); assert.equal(editor.getValue(), 'hellonhallo'); }); test('resolve additionalTextEdits async when needed (typing)', async function () { let resolveCallCount = 0; let resolve: Function = () => { }; disposables.add(CompletionProviderRegistry.register({ scheme: 'test-ctrl' }, { provideCompletionItems(doc, pos) { return { suggestions: [{ kind: CompletionItemKind.Snippet, label: 'let', insertText: 'hello', range: Range.fromPositions(pos) }] }; }, async resolveCompletionItem(item) { resolveCallCount += 1; await new Promise(_resolve => resolve = _resolve); item.additionalTextEdits = [{ text: 'I came late', range: { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 1 } }]; return item; } })); editor.setValue('hellonhallo'); editor.setSelection(new Selection(2, 6, 2, 6)); // trigger let p1 = Event.toPromise(controller.model.onDidSuggest); controller.triggerSuggest(); await p1; // let p2 = Event.toPromise(controller.model.onDidCancel); controller.acceptSelectedSuggestion(false, false); await p2; // insertText happens sync! assert.equal(editor.getValue(), 'hellonhallohello'); assert.equal(resolveCallCount, 1); // additional edits happened after a litte wait assert.ok(editor.getSelection()?.equalsSelection(new Selection(2, 11, 2, 11))); editor.trigger('test', 'type', { text: 'TYPING' }); assert.equal(editor.getValue(), 'hellonhallohelloTYPING'); resolve(); await timeout(10); assert.equal(editor.getValue(), 'I came latehellonhallohelloTYPING'); assert.ok(editor.getSelection()?.equalsSelection(new Selection(2, 17, 2, 17))); }); // additional edit come late and are AFTER the selection -> cancel test('resolve additionalTextEdits async when needed (simple conflict)', async function () { let resolveCallCount = 0; let resolve: Function = () => { }; disposables.add(CompletionProviderRegistry.register({ scheme: 'test-ctrl' }, { provideCompletionItems(doc, pos) { return { suggestions: [{ kind: CompletionItemKind.Snippet, label: 'let', insertText: 'hello', range: Range.fromPositions(pos) }] }; }, async resolveCompletionItem(item) { resolveCallCount += 1; await new Promise(_resolve => resolve = _resolve); item.additionalTextEdits = [{ text: 'I came late', range: { startLineNumber: 1, startColumn: 6, endLineNumber: 1, endColumn: 6 } }]; return item; } })); editor.setValue(''); editor.setSelection(new Selection(1, 1, 1, 1)); // trigger let p1 = Event.toPromise(controller.model.onDidSuggest); controller.triggerSuggest(); await p1; // let p2 = Event.toPromise(controller.model.onDidCancel); controller.acceptSelectedSuggestion(false, false); await p2; // insertText happens sync! assert.equal(editor.getValue(), 'hello'); assert.equal(resolveCallCount, 1); resolve(); await timeout(10); assert.equal(editor.getValue(), 'hello'); }); // additional edit come late and are AFTER the position at which the user typed -> cancelled test('resolve additionalTextEdits async when needed (conflict)', async function () { let resolveCallCount = 0; let resolve: Function = () => { }; disposables.add(CompletionProviderRegistry.register({ scheme: 'test-ctrl' }, { provideCompletionItems(doc, pos) { return { suggestions: [{ kind: CompletionItemKind.Snippet, label: 'let', insertText: 'hello', range: Range.fromPositions(pos) }] }; }, async resolveCompletionItem(item) { resolveCallCount += 1; await new Promise(_resolve => resolve = _resolve); item.additionalTextEdits = [{ text: 'I came late', range: { startLineNumber: 1, startColumn: 2, endLineNumber: 1, endColumn: 2 } }]; return item; } })); editor.setValue('hellonhallo'); editor.setSelection(new Selection(2, 6, 2, 6)); // trigger let p1 = Event.toPromise(controller.model.onDidSuggest); controller.triggerSuggest(); await p1; // let p2 = Event.toPromise(controller.model.onDidCancel); controller.acceptSelectedSuggestion(false, false); await p2; // insertText happens sync! assert.equal(editor.getValue(), 'hellonhallohello'); assert.equal(resolveCallCount, 1); // additional edits happened after a litte wait editor.setSelection(new Selection(1, 1, 1, 1)); editor.trigger('test', 'type', { text: 'TYPING' }); assert.equal(editor.getValue(), 'TYPINGhellonhallohello'); resolve(); await timeout(10); assert.equal(editor.getValue(), 'TYPINGhellonhallohello'); assert.ok(editor.getSelection()?.equalsSelection(new Selection(1, 7, 1, 7))); }); test('resolve additionalTextEdits async when needed (cancel)', async function () { let resolve: Function[] = []; disposables.add(CompletionProviderRegistry.register({ scheme: 'test-ctrl' }, { provideCompletionItems(doc, pos) { return { suggestions: [{ kind: CompletionItemKind.Snippet, label: 'let', insertText: 'hello', range: Range.fromPositions(pos) }, { kind: CompletionItemKind.Snippet, label: 'let', insertText: 'hallo', range: Range.fromPositions(pos) }] }; }, async resolveCompletionItem(item) { await new Promise(_resolve => resolve.push(_resolve)); item.additionalTextEdits = [{ text: 'additionalTextEdits', range: { startLineNumber: 1, startColumn: 2, endLineNumber: 1, endColumn: 2 } }]; return item; } })); editor.setValue('abc'); editor.setSelection(new Selection(1, 1, 1, 1)); // trigger let p1 = Event.toPromise(controller.model.onDidSuggest); controller.triggerSuggest(); await p1; // let p2 = Event.toPromise(controller.model.onDidCancel); controller.acceptSelectedSuggestion(true, false); await p2; // insertText happens sync! assert.equal(editor.getValue(), 'helloabc'); // next controller.acceptNextSuggestion(); // resolve additional edits (MUST be cancelled) resolve.forEach(fn => fn); resolve.length = 0; await timeout(10); // next suggestion used assert.equal(editor.getValue(), 'halloabc'); }); });"} {"_id":"doc-en-vscode-45cf77111b20bd805f6f7a5930f173cf43f68dc46f3337a66cd15e1bd7b0d15d","title":"","text":"private cleanUp(): void { const cache = this.doLoad(); // Remove groups from states that no longer exist cache.forEach((mapGroupToMemento, resource) => { // Remove groups from states that no longer exist. Since we modify the // cache and its is a LRU cache make a copy to ensure iteration succeeds const entries = [...cache.entries()]; for (const [resource, mapGroupToMemento] of entries) { Object.keys(mapGroupToMemento).forEach(group => { const groupId: GroupIdentifier = Number(group); if (!this.editorGroupService.getGroup(groupId)) { delete mapGroupToMemento[groupId]; if (isEmptyObject(mapGroupToMemento)) { cache.delete(resource); } } }); }); } } }"} {"_id":"doc-en-vscode-2d7095b7d0c4a58c4a31b365b7f09b4f6ff6ef51f60963cfadcc56d8f812b14c","title":"","text":"return; } if (e.browserEvent.defaultPrevented) { return; } const focus = e.index; if (typeof focus === 'undefined') {"} {"_id":"doc-en-vscode-9725661aa5916b718530533909a3cdc8106610b0767f6be359eaf79e910f29d8","title":"","text":"this.list.setSelection([focus], e.browserEvent); } e.browserEvent.preventDefault(); this._onPointer.fire(e); }"} {"_id":"doc-en-vscode-aafd0455ac87f0965670b393260185b676e739f157139468ccaaa376b30f4fca","title":"","text":"return; } if (e.browserEvent.defaultPrevented) { return; } const focus = this.list.getFocus(); this.list.setSelection(focus, e.browserEvent); e.browserEvent.preventDefault(); } private changeSelection(e: IListMouseEvent | IListTouchEvent): void {"} {"_id":"doc-en-vscode-96eb9fcd30c1f3d7a5c77d170912ebae74f976f9300c3d350435f684066ae734","title":"","text":"return; } if (e.browserEvent.defaultPrevented) { return; } const node = e.element; if (!node) {"} {"_id":"doc-en-vscode-f32bd210b9a0c20145e64b2a49110012dee19084ce3c4dfcf98c39152abbffd5","title":"","text":"return; } if (e.browserEvent.defaultPrevented) { return; } super.onDoubleClick(e); } }"} {"_id":"doc-en-vscode-e6d9a71298b6bb25ed6d9a9426b65d84c7dfd40cd4df17d9e425d1a1f1f185ba","title":"","text":"} if (node.collapsible) { // Do not set this before calling a handler on the super class, because it will reject it as handled e.browserEvent.isHandledByList = true; const location = this.tree.getNodeLocation(node); const recursive = e.browserEvent.altKey; this.tree.setFocus([location]); this.tree.toggleCollapsed(location, recursive); if (expandOnlyOnTwistieClick && onTwistie) { // Do not set this before calling a handler on the super class, because it will reject it as handled e.browserEvent.isHandledByList = true; return; } }"} {"_id":"doc-en-vscode-4cb60f8895cb7b498465bec9e3da57e7a130324d65cf4d917342d78ab0c565af","title":"","text":"return message.replace(/^s*#.*$n?/gm, '').trim(); } async getSquashMessage(): Promise { const squashMsgPath = path.join(this.repositoryRoot, '.git', 'SQUASH_MSG'); try { const raw = await fs.readFile(squashMsgPath, 'utf8'); return this.stripCommitMessageComments(raw); } catch { return undefined; } } async getMergeMessage(): Promise { const mergeMsgPath = path.join(this.repositoryRoot, '.git', 'MERGE_MSG');"} {"_id":"doc-en-vscode-de63d3799f65fda975820f3750e959c521c8a8e27d0c79ce3e79215d677d79ef","title":"","text":"} async getInputTemplate(): Promise { const mergeMessage = await this.repository.getMergeMessage(); const commitMessage = (await Promise.all([this.repository.getMergeMessage(), this.repository.getSquashMessage()])).find(msg => msg !== undefined); if (mergeMessage) { return mergeMessage; if (commitMessage) { return commitMessage; } return await this.repository.getCommitTemplate();"} {"_id":"doc-en-vscode-9dbde128f1865b00ebf6b2371041547336cb81e94834450db32b20c729f26b59","title":"","text":"} } // New item was added else if (template.objectWidget.isItemNew(e.originalItem)) { else if (template.objectWidget.isItemNew(e.originalItem) && e.item.key.data !== '') { newValue[e.item.key.data] = e.item.value.data; newItems.push(e.item); }"} {"_id":"doc-en-vscode-aa5f34d5d6d34c29c1d5e03b6be67a0f8d0652934b05a7b84865f0859a8f9494","title":"","text":"} .monaco-workbench .repl .repl-tree .output.expression.value-and-source .value { flex: 1; margin-right: 4px; } .monaco-workbench .repl .repl-tree .monaco-tl-contents .arrow {"} {"_id":"doc-en-vscode-bce359c8bac83270ed07d13ef8ae2981727dcb437a85d5f6fb64babd863cbdb9","title":"","text":"} .monaco-workbench .repl .repl-tree .output.expression.value-and-source .source { margin-left: 4px; margin-left: auto; margin-right: 8px; cursor: pointer; text-decoration: underline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; text-align: right; } .monaco-workbench .repl .repl-tree .output.expression > .value,"} {"_id":"doc-en-vscode-53bb11e6e61f56e95bd077933e94b72e7bdbb11318955844cd382c7c2b01ea47","title":"","text":"const filesExcludeByRoot = Array.isArray(filesExclude) ? filesExclude : []; const excludesExpression: IExpression = Array.isArray(filesExclude) ? getEmptyExpression() : filesExclude; for (const { expression } of filesExcludeByRoot) { for (const pattern of Object.keys(expression)) { if (!pattern.endsWith('/**')) { // Append `/**` to pattern to match a parent folder #103631 expression[`${strings.rtrim(pattern, '/')}/**`] = expression[pattern]; } } } const negate = filter.startsWith('!'); this.textFilter = { text: (negate ? strings.ltrim(filter, '!') : filter).trim(), negate }; const includeExpression: IExpression = getEmptyExpression();"} {"_id":"doc-en-vscode-a7ff9b5995e9c5c16f203ba50aec615c2145ee1dbf2b670bec227d2d2693967c","title":"","text":"this.render(previousRenderRange, e.scrollTop, e.height, e.scrollLeft, e.scrollWidth); if (this.supportDynamicHeights) { this._rerender(e.scrollTop, e.height); // Don't update scrollTop from within an scroll event // so we don't break smooth scrolling. #104144 this._rerender(e.scrollTop, e.height, false); } } catch (err) { console.error('Got bad scroll event:', e);"} {"_id":"doc-en-vscode-bc617f4d7963d05bd8a5c6b3e0c302b0ffc4bd4d4d3ebde7d5197a90819d04f7","title":"","text":"* Given a stable rendered state, checks every rendered element whether it needs * to be probed for dynamic height. Adjusts scroll height and top if necessary. */ private _rerender(renderTop: number, renderHeight: number): void { private _rerender(renderTop: number, renderHeight: number, updateScrollTop: boolean = true): void { const previousRenderRange = this.getRenderRange(renderTop, renderHeight); // Let's remember the second element's position, this helps in scrolling up"} {"_id":"doc-en-vscode-195cce9332696cbccf83f448754687394a98bb1c60c1d93c6a638e21916fe03d","title":"","text":"} } if (typeof anchorElementIndex === 'number') { if (updateScrollTop && typeof anchorElementIndex === 'number') { this.scrollTop = this.elementTop(anchorElementIndex) - anchorElementTopDelta!; }"} {"_id":"doc-en-vscode-c97caa732ea92f49a39fd9424be8ea8cee7abbc47a37252c1f6a963d62241a18","title":"","text":"import { GetErrRoutingTsServer, ITypeScriptServer, ProcessBasedTsServer, SyntaxRoutingTsServer, TsServerDelegate, TsServerProcessFactory, TsServerProcessKind } from './server'; import { TypeScriptVersionManager } from './versionManager'; import { ITypeScriptVersionProvider, TypeScriptVersion } from './versionProvider'; import * as semver from 'semver'; const enum CompositeServerType { /** Run a single server that handles all commands */"} {"_id":"doc-en-vscode-45fb78c588c9ceda9c55c80eb8703804b1f3f253c8ed6ad434224408bd928108","title":"","text":"let tsServerLogFile: string | undefined; if (kind === TsServerProcessKind.Syntax) { if (semver.gte(API.v400rc.fullVersionString, apiVersion.fullVersionString)) { args.push('--serverMode'); args.push('partialSemantic'); } else { if (apiVersion.gte(API.v401)) { args.push('--serverMode', 'partialSemantic'); } else { args.push('--syntaxOnly'); } }"} {"_id":"doc-en-vscode-17af0a524a9397d103baf9a1b1318f63cf3967f632a59afd729b1aa33946dfc9","title":"","text":"public static readonly v380 = API.fromSimpleString('3.8.0'); public static readonly v381 = API.fromSimpleString('3.8.1'); public static readonly v390 = API.fromSimpleString('3.9.0'); public static readonly v400rc = API.fromSimpleString('4.0.0-rc'); public static readonly v400 = API.fromSimpleString('4.0.0'); public static readonly v401 = API.fromSimpleString('4.0.1'); public static fromVersionString(versionString: string): API { let version = semver.valid(versionString);"} {"_id":"doc-en-vscode-77589a0cc7e6ce9831e367cfeb6a1e47fa1c693fe6e376341d4c606871b1be1a","title":"","text":"} }, { \"name\": \"Markdown Headings\", \"scope\": \"markup.heading.markdown\", \"settings\": { \"fontStyle\": \"bold\" } }, { \"name\": \"Markdown Quote\", \"scope\": \"markup.quote.markdown\", \"settings\": { \"fontStyle\": \"italic\", \"foreground\": \"\" } }, { \"name\": \"Markdown Bold\", \"scope\": \"markup.bold.markdown\", \"settings\": { \"fontStyle\": \"bold\" } }, { \"name\": \"Markdown Link Title/Description\", \"scope\": \"string.other.link.title.markdown,string.other.link.description.markdown\", \"settings\": { \"foreground\": \"#AE81FF\" } }, { \"name\": \"Markdown Underline Link/Image\", \"scope\": \"markup.underline.link.markdown,markup.underline.link.image.markdown\", \"settings\": { \"foreground\": \"\" } }, { \"name\": \"Markdown Emphasis\", \"scope\": \"markup.italic.markdown\", \"settings\": { \"fontStyle\": \"italic\" } }, { \"name\": \"Markdown Punctuation Definition Link\", \"scope\": \"markup.list.unnumbered.markdown, markup.list.numbered.markdown\", \"settings\": { \"foreground\": \"\" } }, { \"name\": \"Markdown List Punctuation\", \"scope\": [ \"punctuation.definition.list.begin.markdown\" ], \"settings\": { \"foreground\": \"\" } }, { \"scope\": \"token.info-token\", \"settings\": { \"foreground\": \"#6796e6\""} {"_id":"doc-en-vscode-d6021d487b24c1b43f5532e4e96a0b55ef6e754fb9fce870e7e67490179141e1","title":"","text":"* Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { ExtensionContext } from 'vscode'; import { ExtensionContext, Uri } from 'vscode'; import { LanguageClientOptions } from 'vscode-languageclient'; import { startClient, LanguageClientConstructor } from '../cssClient'; import { LanguageClient } from 'vscode-languageclient/browser';"} {"_id":"doc-en-vscode-c51421c7f49933aa2ebf2fcb9c69ff5e14ec2097b6eb171f0aa87467862e9bac","title":"","text":"// this method is called when vs code is activated export function activate(context: ExtensionContext) { const serverMain = context.asAbsolutePath('server/dist/browser/cssServerMain.js'); const serverMain = Uri.joinPath(context.extensionUri, 'server/dist/browser/cssServerMain.js'); try { const worker = new Worker(serverMain); const worker = new Worker(serverMain.toString()); const newLanguageClient: LanguageClientConstructor = (id: string, name: string, clientOptions: LanguageClientOptions) => { return new LanguageClient(id, name, clientOptions, worker); };"} {"_id":"doc-en-vscode-de394e3f710bc34fc9b9120dafd6de326578d2d46e036495a03b59f67c019ca7","title":"","text":"* Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { ExtensionContext } from 'vscode'; import { ExtensionContext, Uri } from 'vscode'; import { LanguageClientOptions } from 'vscode-languageclient'; import { startClient, LanguageClientConstructor } from '../htmlClient'; import { LanguageClient } from 'vscode-languageclient/browser';"} {"_id":"doc-en-vscode-09df6e66aaa3a8b6dd966467bbb4bfb12b96cae632c6ba0bda7303f6b6895318","title":"","text":"// this method is called when vs code is activated export function activate(context: ExtensionContext) { const serverMain = context.asAbsolutePath('server/dist/browser/htmlServerMain.js'); const serverMain = Uri.joinPath(context.extensionUri, 'server/dist/browser/htmlServerMain.js'); try { const worker = new Worker(serverMain); const worker = new Worker(serverMain.toString()); const newLanguageClient: LanguageClientConstructor = (id: string, name: string, clientOptions: LanguageClientOptions) => { return new LanguageClient(id, name, clientOptions, worker); };"} {"_id":"doc-en-vscode-7dfd4c179ddc87591fb79353fcfd4baa0b2efe454d029e33e9d7f6113fe3a334","title":"","text":"* Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { ExtensionContext } from 'vscode'; import { ExtensionContext, Uri } from 'vscode'; import { LanguageClientOptions } from 'vscode-languageclient'; import { startClient, LanguageClientConstructor } from '../jsonClient'; import { LanguageClient } from 'vscode-languageclient/browser';"} {"_id":"doc-en-vscode-25131dc0217ddbd95edcf3f39057cc0400ee0bf00dd82542322e0bd09ed51c89","title":"","text":"// this method is called when vs code is activated export function activate(context: ExtensionContext) { const serverMain = context.asAbsolutePath('server/dist/browser/jsonServerMain.js'); const serverMain = Uri.joinPath(context.extensionUri, 'server/dist/browser/jsonServerMain.js'); try { const worker = new Worker(serverMain); const worker = new Worker(serverMain.toString()); const newLanguageClient: LanguageClientConstructor = (id: string, name: string, clientOptions: LanguageClientOptions) => { return new LanguageClient(id, name, clientOptions, worker); };"} {"_id":"doc-en-vscode-e255070e97b4bbbd1a5dd83ccb70eb5d541d7ed61b672be00b96a055d1170925","title":"","text":"const versionProvider = new StaticVersionProvider( new TypeScriptVersion( TypeScriptVersionSource.Bundled, context.asAbsolutePath('dist/browser/typescript-web/tsserver.web.js'), vscode.Uri.joinPath(context.extensionUri, 'dist/browser/typescript-web/tsserver.web.js').toString(), API.v400)); const lazyClientHost = createLazyClientHost(context, false, {"} {"_id":"doc-en-vscode-00a608068a821ad08ada553392eac3055356928858e48c5080b59fc97a316223","title":"","text":"return getExtensionApi(onCompletionAccepted.event, pluginManager); }"} {"_id":"doc-en-vscode-f01c17a12f09ad8cee28a82b51557f6dba9b57f4d978e511578a069f5c82165a","title":"","text":"\"vscode-ripgrep\": \"^1.8.0\", \"vscode-sqlite3\": \"4.0.10\", \"vscode-textmate\": \"5.2.0\", \"xterm\": \"4.9.0-beta.8\", \"xterm\": \"4.9.0-beta.24\", \"xterm-addon-search\": \"0.7.0\", \"xterm-addon-unicode11\": \"0.2.0\", \"xterm-addon-webgl\": \"0.8.0\","} {"_id":"doc-en-vscode-8c570f9f51eb9571e338012cc3e611445c65b524a45e7b4f8d3f0b61fda71ace","title":"","text":"\"vscode-proxy-agent\": \"^0.5.2\", \"vscode-ripgrep\": \"^1.8.0\", \"vscode-textmate\": \"5.2.0\", \"xterm\": \"4.9.0-beta.8\", \"xterm\": \"4.9.0-beta.24\", \"xterm-addon-search\": \"0.7.0\", \"xterm-addon-unicode11\": \"0.2.0\", \"xterm-addon-webgl\": \"0.8.0\","} {"_id":"doc-en-vscode-497129a461ded04f5728b51f129601902f4f4233be16e8363d93b18f54161358","title":"","text":"\"semver-umd\": \"^5.5.7\", \"vscode-oniguruma\": \"1.3.1\", \"vscode-textmate\": \"5.2.0\", \"xterm\": \"4.9.0-beta.8\", \"xterm\": \"4.9.0-beta.24\", \"xterm-addon-search\": \"0.7.0\", \"xterm-addon-unicode11\": \"0.2.0\", \"xterm-addon-webgl\": \"0.8.0\""} {"_id":"doc-en-vscode-f26f78c5e818f0a485d20264fde6855ecd67b96169763fc8d233daa404254db4","title":"","text":"resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.8.0.tgz#4bc6bb4dbfea5b0d2d7978d6c5cef922d584fb4f\" integrity sha512-dlpYPsv0C9S6v6+T/h/d/otSbdUTizMJdxvSoS34tUpMOHev6iW7Zqt5KRFqYxl4vCqpDk9Wmhb3fKL3kwX5fQ== xterm@4.9.0-beta.8: version \"4.9.0-beta.8\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-4.9.0-beta.8.tgz#ca121934d63f88668d2d5b11d9b2fc3bde7bd805\" integrity sha512-EEonYBLANDUBfEeEnHG632bZdgBaAUWst8LFr6oC6f2uLFfJGHQvVJuLaEkPtRvS+jOeoorEXZRPmso1/ANHXA== xterm@4.9.0-beta.24: version \"4.9.0-beta.24\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-4.9.0-beta.24.tgz#48f0990c6d32ad3a9bcc4fb49531d7effdaccea5\" integrity sha512-CIVxxxbBiSw1WOMkIjjivaiIC9jNgih4klfWsRGx0qiDF5nbzHuLXkPTt+yAQUu9FCyTUwECm9Pkl3gUsSaGKg== "} {"_id":"doc-en-vscode-3035f38fa6b761357585729540b69322cb739c7f5f1ec05810cd15bf8e2c0ded","title":"","text":"resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.8.0.tgz#4bc6bb4dbfea5b0d2d7978d6c5cef922d584fb4f\" integrity sha512-dlpYPsv0C9S6v6+T/h/d/otSbdUTizMJdxvSoS34tUpMOHev6iW7Zqt5KRFqYxl4vCqpDk9Wmhb3fKL3kwX5fQ== xterm@4.9.0-beta.8: version \"4.9.0-beta.8\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-4.9.0-beta.8.tgz#ca121934d63f88668d2d5b11d9b2fc3bde7bd805\" integrity sha512-EEonYBLANDUBfEeEnHG632bZdgBaAUWst8LFr6oC6f2uLFfJGHQvVJuLaEkPtRvS+jOeoorEXZRPmso1/ANHXA== xterm@4.9.0-beta.24: version \"4.9.0-beta.24\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-4.9.0-beta.24.tgz#48f0990c6d32ad3a9bcc4fb49531d7effdaccea5\" integrity sha512-CIVxxxbBiSw1WOMkIjjivaiIC9jNgih4klfWsRGx0qiDF5nbzHuLXkPTt+yAQUu9FCyTUwECm9Pkl3gUsSaGKg== yauzl@^2.9.2: version \"2.10.0\""} {"_id":"doc-en-vscode-8cf046b3cdb5e5f3ed73e921be20494c85a52944e701e7c40e800dd10bae26ef","title":"","text":"// Listen for modifier before handing it off to the hover to handle so it gets disposed correctly this._hoverListeners = new DisposableStore(); this._hoverListeners.add(dom.addDisposableListener(document, 'keydown', e => { if (this._isModifierDown(e)) { if (!e.repeat && this._isModifierDown(e)) { this._enableDecorations(); } })); this._hoverListeners.add(dom.addDisposableListener(document, 'keyup', e => { if (!this._isModifierDown(e)) { if (!e.repeat && !this._isModifierDown(e)) { this._disableDecorations(); } }));"} {"_id":"doc-en-vscode-aa443c26ecb78248fb67528d6fdf3019e81615002c08a9b2849f5ec63157cbb2","title":"","text":"resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.8.0.tgz#4bc6bb4dbfea5b0d2d7978d6c5cef922d584fb4f\" integrity sha512-dlpYPsv0C9S6v6+T/h/d/otSbdUTizMJdxvSoS34tUpMOHev6iW7Zqt5KRFqYxl4vCqpDk9Wmhb3fKL3kwX5fQ== xterm@4.9.0-beta.8: version \"4.9.0-beta.8\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-4.9.0-beta.8.tgz#ca121934d63f88668d2d5b11d9b2fc3bde7bd805\" integrity sha512-EEonYBLANDUBfEeEnHG632bZdgBaAUWst8LFr6oC6f2uLFfJGHQvVJuLaEkPtRvS+jOeoorEXZRPmso1/ANHXA== xterm@4.9.0-beta.24: version \"4.9.0-beta.24\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-4.9.0-beta.24.tgz#48f0990c6d32ad3a9bcc4fb49531d7effdaccea5\" integrity sha512-CIVxxxbBiSw1WOMkIjjivaiIC9jNgih4klfWsRGx0qiDF5nbzHuLXkPTt+yAQUu9FCyTUwECm9Pkl3gUsSaGKg== y18n@^3.2.1: version \"3.2.1\""} {"_id":"doc-en-vscode-2c28de651c027e5d1f3f5c6d96566cc3bedb437c58a1e8c9acecdd1fb8d0681c","title":"","text":"export interface PickRemoteSourceOptions { readonly providerLabel?: (provider: RemoteSourceProvider) => string; readonly urlLabel?: string; readonly providerName?: string; } export async function pickRemoteSource(model: Model, options: PickRemoteSourceOptions = {}): Promise { const quickpick = window.createQuickPick<(QuickPickItem & { provider?: RemoteSourceProvider, url?: string })>(); quickpick.ignoreFocusOut = true; const providers = model.getRemoteProviders() .map(provider => ({ label: (provider.icon ? `$(${provider.icon}) ` : '') + (options.providerLabel ? options.providerLabel(provider) : provider.name), alwaysShow: true, provider })); quickpick.placeholder = providers.length === 0 ? localize('provide url', \"Provide repository URL\") : localize('provide url or pick', \"Provide repository URL or pick a repository source.\"); const updatePicks = (value?: string) => { if (value) { quickpick.items = [{ label: options.urlLabel ?? localize('url', \"URL\"), description: value, alwaysShow: true, url: value }, ...providers]; } else { quickpick.items = providers; } }; quickpick.onDidChangeValue(updatePicks); updatePicks(); const result = await getQuickPickResult(quickpick); if (result) { if (result.url) { return result.url; } else if (result.provider) { const quickpick = new RemoteSourceProviderQuickPick(result.provider); const remote = await quickpick.pick(); if (remote) { if (typeof remote.url === 'string') { return remote.url; } else if (remote.url.length > 0) { return await window.showQuickPick(remote.url, { ignoreFocusOut: true, placeHolder: localize('pick url', \"Choose a URL to clone from.\") }); } const targetedProvider = model.getRemoteProviders().filter(provider => provider.name === options.providerName); if (targetedProvider && targetedProvider.length === 1) { return await pickProviderSource(targetedProvider[0]); } else { const providers = model.getRemoteProviders() .map(provider => ({ label: (provider.icon ? `$(${provider.icon}) ` : '') + (options.providerLabel ? options.providerLabel(provider) : provider.name), alwaysShow: true, provider })); quickpick.placeholder = providers.length === 0 ? localize('provide url', \"Provide repository URL\") : localize('provide url or pick', \"Provide repository URL or pick a repository source.\"); const updatePicks = (value?: string) => { if (value) { quickpick.items = [{ label: options.urlLabel ?? localize('url', \"URL\"), description: value, alwaysShow: true, url: value }, ...providers]; } else { quickpick.items = providers; } }; quickpick.onDidChangeValue(updatePicks); updatePicks(); const result = await getQuickPickResult(quickpick); if (result) { if (result.url) { return result.url; } else if (result.provider) { return await pickProviderSource(result.provider); } } } return undefined; } async function pickProviderSource(provider: RemoteSourceProvider): Promise { const quickpick = new RemoteSourceProviderQuickPick(provider); const remote = await quickpick.pick(); if (remote) { if (typeof remote.url === 'string') { return remote.url; } else if (remote.url.length > 0) { return await window.showQuickPick(remote.url, { ignoreFocusOut: true, placeHolder: localize('pick url', \"Choose a URL to clone from.\") }); } } return undefined; } "} {"_id":"doc-en-vscode-167386d0bade2017766e65c172a2e61c4cfb5fbc587e61fdf72af9a59bcb9f24","title":"","text":"{ \"view\": \"scm\", \"contents\": \"%view.workbench.scm.empty%\", \"when\": \"config.git.enabled && git.state == initialized && workbenchState == empty\", \"when\": \"config.git.enabled && workbenchState == empty\", \"enablement\": \"git.state == initialized\", \"group\": \"2_open@1\" }, { \"view\": \"scm\", \"contents\": \"%view.workbench.scm.folder%\", \"when\": \"config.git.enabled && git.state == initialized && workbenchState == folder\", \"when\": \"config.git.enabled && workbenchState == folder\", \"enablement\": \"git.state == initialized\", \"group\": \"5_scm@1\" }, { \"view\": \"scm\", \"contents\": \"%view.workbench.scm.workspace%\", \"when\": \"config.git.enabled && git.state == initialized && workbenchState == workspace && workspaceFolderCount != 0\", \"enablement\": \"git.state == initialized\", \"group\": \"5_scm@1\" }, { \"view\": \"scm\", \"contents\": \"%view.workbench.scm.emptyWorkspace%\", \"when\": \"config.git.enabled && git.state == initialized && workbenchState == workspace && workspaceFolderCount == 0\", \"when\": \"config.git.enabled && workbenchState == workspace && workspaceFolderCount == 0\", \"enablement\": \"git.state == initialized\", \"group\": \"2_open@1\" }, { \"view\": \"explorer\", \"contents\": \"%view.workbench.cloneRepository%\", \"when\": \"config.git.enabled && git.state == initialized\", \"when\": \"config.git.enabled\", \"enablement\": \"git.state == initialized\", \"group\": \"5_scm@1\" } ]"} {"_id":"doc-en-vscode-10a8de5de290732b4442f2b5fd023cccfd3ff5956ef72262edbdc98ddc307e43","title":"","text":"\"view.workbench.scm.folder\": \"The folder currently open doesn't have a git repository. You can initialize a repository which will enable source control features powered by git.n[Initialize Repository](command:git.init?%5Btrue%5D)nTo learn more about how to use git and source control in VS Code [read our docs](https://aka.ms/vscode-scm).\", \"view.workbench.scm.workspace\": \"The workspace currently open doesn't have any folders containing git repositories. You can initialize a repository on a folder which will enable source control features powered by git.n[Initialize Repository](command:git.init)nTo learn more about how to use git and source control in VS Code [read our docs](https://aka.ms/vscode-scm).\", \"view.workbench.scm.emptyWorkspace\": \"The workspace currently open doesn't have any folders containing git repositories.n[Add Folder to Workspace](command:workbench.action.addRootFolder)nTo learn more about how to use git and source control in VS Code [read our docs](https://aka.ms/vscode-scm).\", \"view.workbench.cloneRepository\": \"You can also clone a repository from a URL. To learn more about how to use git and source control in VS Code [read our docs](https://aka.ms/vscode-scm).n[Clone Repository](command:git.clone)\" \"view.workbench.cloneRepository\": \"You can also clone a repository from a URL. To learn more about how to use git and source control in VS Code [read our docs](https://aka.ms/vscode-scm).n[Clone Repository](command:git.clone 'Clone a repository once the git extension has activated')\" }"} {"_id":"doc-en-vscode-c7e145a215b565198f8d8eeb6d661a065c74add783a121962436e5edefaa078d","title":"","text":"this.bodyContainer.classList.add('welcome'); this.viewWelcomeContainer.innerText = ''; let buttonIndex = 0; for (const { content, preconditions } of contents) { let buttonIndex = 0; const lines = content.split('n'); for (let line of lines) {"} {"_id":"doc-en-vscode-d92dcc6724c1bb084d2ae05292e3f2fdf452c7daa65e34b4e608b654e64d8455","title":"","text":"for (const welcome of contribution.value) { const id = ViewIdentifierMap[welcome.view] ?? welcome.view; const { group, order } = parseGroupAndOrder(welcome, contribution); const enablement = ContextKeyExpr.deserialize(welcome.enablement); const disposable = viewsRegistry.registerViewWelcomeContent(id, { content: welcome.contents, when: ContextKeyExpr.deserialize(welcome.when), // supply the enablement clause for each line in case the line defines a button preconditions: welcome.contents.split('n').map((_) => enablement), group, order });"} {"_id":"doc-en-vscode-323a02f624338371fbc74b26f8541280dad243c8f76a93e161a9efdc796109e2","title":"","text":"contents = 'contents', when = 'when', group = 'group', enablement = 'enablement', } export interface ViewWelcome {"} {"_id":"doc-en-vscode-7d747f69a6c898341afe709f058dd8406e4ae6297782fa9bd34993f1f4de932c","title":"","text":"readonly [ViewsWelcomeExtensionPointFields.contents]: string; readonly [ViewsWelcomeExtensionPointFields.when]: string; readonly [ViewsWelcomeExtensionPointFields.group]: string; readonly [ViewsWelcomeExtensionPointFields.enablement]: string; } export type ViewsWelcomeExtensionPoint = ViewWelcome[];"} {"_id":"doc-en-vscode-c99d56f0c288070a282ce4c49009ff294870304aef5bc90d2e19294fb6b8ad7b","title":"","text":"type: 'string', description: nls.localize('contributes.viewsWelcome.view.group', \"Group to which this welcome content belongs.\"), }, [ViewsWelcomeExtensionPointFields.enablement]: { type: 'string', description: nls.localize('contributes.viewsWelcome.view.enablement', \"Condition when the welcome content buttons should be enabled.\"), }, } } });"} {"_id":"doc-en-vscode-814528b88934719a49ddf7e2f161ef448e27d076c990b8f715873e14635f5b8b","title":"","text":"Package: @@NAME@@ Version: @@VERSION@@ Section: devel Depends: libnss3 (>= 2:3.26), gnupg, apt, libxkbfile1, libsecret-1-0, libgtk-3-0 (>= 3.10.0), libxss1 Depends: libnss3 (>= 2:3.26), gnupg, apt, libxkbfile1, libsecret-1-0, libgtk-3-0 (>= 3.10.0), libxss1, libgbm1 Priority: optional Architecture: @@ARCHITECTURE@@ Maintainer: Microsoft Corporation "} {"_id":"doc-en-vscode-e7b5ed080eba5c5cf1688fcc7bd06488f73c8c4d6e610d5cd98101f9d6d03183","title":"","text":"\"libc.so.6(GLIBC_2.9)(64bit)\", \"libxcb.so.1()(64bit)\", \"libxkbfile.so.1()(64bit)\", \"libsecret-1.so.0()(64bit)\" \"libsecret-1.so.0()(64bit)\", \"libgbm.so.1()(64bit)\" ], \"aarch64\": [ \"libpthread.so.0()(aarch64)\","} {"_id":"doc-en-vscode-16f3479cd50d781d9a89f694257df10b5ac616a36712f00183a0a048fc57244b","title":"","text":"- libgconf-2-4 - libglib2.0-bin - libgnome-keyring0 - libgbm1 - libgtk-3-0 - libnotify4 - libnspr4"} {"_id":"doc-en-vscode-45e2b0490a088f2c68acaa275873641f2c213e7c2ce0eaa15f0a338a52b69a63","title":"","text":"const editorService = accessor.get(IEditorService); const viewsService = accessor.get(IViewsService); const notificationService = accessor.get(INotificationService); const workingCopyFileService = accessor.get(IWorkingCopyFileService); await viewsService.openView(VIEW_ID, true);"} {"_id":"doc-en-vscode-47621c52105070e7bf16b608120825b5e54135cc233a625a124fdcdc53c75265","title":"","text":"const onSuccess = async (value: string): Promise => { try { const created = isFolder ? await fileService.createFolder(resources.joinPath(folder.resource, value)) : await textFileService.create(resources.joinPath(folder.resource, value)); const created = isFolder ? await workingCopyFileService.createFolder(resources.joinPath(folder.resource, value)) : await textFileService.create(resources.joinPath(folder.resource, value)); await refreshIfSeparator(value, explorerService); isFolder ?"} {"_id":"doc-en-vscode-6071caab4a2b613b72d4f30795d945780ab0820c8d6b401b263f400be4535d66","title":"","text":"create(resource: URI, contents?: VSBuffer | VSBufferReadable | VSBufferReadableStream, options?: { overwrite?: boolean }): Promise; /** * Will create a folder and any parent folder that needs to be created. * * Working copy owners can listen to the `onWillRunWorkingCopyFileOperation` and * `onDidRunWorkingCopyFileOperation` events to participate. * * Note: events will only be emitted for the provided resource, but not any * parent folders that are being created as part of the operation. */ createFolder(resource: URI): Promise; /** * Will move working copies matching the provided resources and corresponding children * to the target resources using the associated file service for those resources. *"} {"_id":"doc-en-vscode-c5d173ce64ada57a59aad97c366e5afbf17dd0ef4faa999841e1749692f580e4","title":"","text":"//#region File operations async create(resource: URI, contents?: VSBuffer | VSBufferReadable | VSBufferReadableStream, options?: { overwrite?: boolean }): Promise { create(resource: URI, contents?: VSBuffer | VSBufferReadable | VSBufferReadableStream, options?: { overwrite?: boolean }): Promise { return this.doCreateFileOrFolder(resource, true, contents, options); } createFolder(resource: URI, options?: { overwrite?: boolean }): Promise { return this.doCreateFileOrFolder(resource, false); } async doCreateFileOrFolder(resource: URI, isFile: boolean, contents?: VSBuffer | VSBufferReadable | VSBufferReadableStream, options?: { overwrite?: boolean }): Promise { // validate create operation before starting const validateCreate = await this.fileService.canCreateFile(resource, options); if (validateCreate instanceof Error) { throw validateCreate; if (isFile) { const validateCreate = await this.fileService.canCreateFile(resource, options); if (validateCreate instanceof Error) { throw validateCreate; } } // file operation participant"} {"_id":"doc-en-vscode-d4fc7e85dbacff585935ccc76b6c014ed0f47dc0674efe7c93942a30bb7b1325","title":"","text":"// now actually create on disk let stat: IFileStatWithMetadata; try { stat = await this.fileService.createFile(resource, contents, { overwrite: options?.overwrite }); if (isFile) { stat = await this.fileService.createFile(resource, contents, { overwrite: options?.overwrite }); } else { stat = await this.fileService.createFolder(resource); } } catch (error) { // error event"} {"_id":"doc-en-vscode-c4add506df96b07b07778a3fcc5a02cd1f6f25467d86d89553112b418fb13d64","title":"","text":"model1.dispose(); }); test('createFolder', async function () { let eventCounter = 0; let correlationId: number | undefined = undefined; const resource = toResource.call(this, '/path/folder'); const participant = accessor.workingCopyFileService.addFileOperationParticipant({ participate: async (files, operation) => { assert.equal(files.length, 1); const file = files[0]; assert.equal(file.target.toString(), resource.toString()); assert.equal(operation, FileOperation.CREATE); eventCounter++; } }); const listener1 = accessor.workingCopyFileService.onWillRunWorkingCopyFileOperation(e => { assert.equal(e.files.length, 1); const file = e.files[0]; assert.equal(file.target.toString(), resource.toString()); assert.equal(e.operation, FileOperation.CREATE); correlationId = e.correlationId; eventCounter++; }); const listener2 = accessor.workingCopyFileService.onDidRunWorkingCopyFileOperation(e => { assert.equal(e.files.length, 1); const file = e.files[0]; assert.equal(file.target.toString(), resource.toString()); assert.equal(e.operation, FileOperation.CREATE); assert.equal(e.correlationId, correlationId); eventCounter++; }); await accessor.workingCopyFileService.createFolder(resource); assert.equal(eventCounter, 3); participant.dispose(); listener1.dispose(); listener2.dispose(); }); async function testEventsMoveOrCopy(files: { source: URI, target: URI }[], move?: boolean): Promise { let eventCounter = 0;"} {"_id":"doc-en-vscode-8429e79801d1188f59257bb8e53ffa9b97809bfed3e48386b8b961a627ea5c32","title":"","text":"move(_source: URI, _target: URI, _overwrite?: boolean): Promise { return Promise.resolve(null!); } copy(_source: URI, _target: URI, _overwrite?: boolean): Promise { return Promise.resolve(null!); } createFile(_resource: URI, _content?: VSBuffer | VSBufferReadable, _options?: ICreateFileOptions): Promise { return Promise.resolve(null!); } createFolder(_resource: URI): Promise { throw new Error('not implemented'); } createFolder(_resource: URI): Promise { return Promise.resolve(null!); } onDidChangeFileSystemProviderRegistrations = Event.None;"} {"_id":"doc-en-vscode-e3b9022a0d798333d2fbc8b59b7424837dfdc1854f05d121b4e10ae803ccc79f","title":"","text":"getDirty(resource: URI): IWorkingCopy[] { return []; } create(resource: URI, contents?: VSBuffer | VSBufferReadable | VSBufferReadableStream, options?: { overwrite?: boolean | undefined; } | undefined): Promise { throw new Error('Method not implemented.'); } createFolder(resource: URI): Promise { throw new Error('Method not implemented.'); } move(files: { source: URI; target: URI; }[], options?: { overwrite?: boolean }): Promise { throw new Error('Method not implemented.'); }"} {"_id":"doc-en-vscode-5e53b4729473efb7a13bddfed5ba885ec502856d70349e6da79cbf5cadf929a0","title":"","text":"* @param pattern A file glob pattern like `*.{ts,js}` that will be matched on file paths * relative to the base path. */ constructor(base: WorkspaceFolder | string, pattern: string) constructor(base: Uri | WorkspaceFolder | string, pattern: string) } /**"} {"_id":"doc-en-vscode-8375038373bb59bb8d5c4edb207cf36fb7a848a88e8eca93df1462b9f95773c8","title":"","text":"pattern: string; constructor(base: vscode.WorkspaceFolder | string, pattern: string) { constructor(base: URI | vscode.WorkspaceFolder | string, pattern: string) { if (typeof base !== 'string') { if (!base || !URI.isUri(base.uri)) { if (!base || !URI.isUri(base) && !URI.isUri(base.uri)) { throw illegalArgument('base'); } }"} {"_id":"doc-en-vscode-751b0779c14cdb123caa2f074238102f52dbd459c1d56e7825d09dfd68973a2a","title":"","text":"if (typeof base === 'string') { this.base = base; } else if (URI.isUri(base)) { this.baseFolder = base; this.base = base.fsPath; } else { this.baseFolder = base.uri; this.base = base.uri.fsPath;"} {"_id":"doc-en-vscode-d31db9f2b8394a282fff21985af020286d248738cad53ca97848cbcdf859eb18","title":"","text":"import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { createAndFillInActionBarActions } from 'vs/platform/actions/browser/menuEntryActionViewItem'; import { getCurrentAuthenticationSessionInfo } from 'vs/workbench/services/authentication/browser/authenticationService'; import { AuthenticationSession, IAuthenticationService } from 'vs/workbench/services/authentication/common/authentication'; import { AuthenticationSessionAccount, IAuthenticationService } from 'vs/workbench/services/authentication/common/authentication'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IProductService } from 'vs/platform/product/common/productService';"} {"_id":"doc-en-vscode-957887733b942fb0a580ccc6c60722ce59d49390c5f0400f32bcfde6897ff590","title":"","text":"import { ICredentialsService } from 'vs/platform/credentials/common/credentials'; import { IUserDataProfileService } from 'vs/workbench/services/userDataProfile/common/userDataProfile'; import { StandardMouseEvent } from 'vs/base/browser/mouseEvent'; import { ILogService } from 'vs/platform/log/common/log'; export class ViewContainerActivityAction extends ActivityAction {"} {"_id":"doc-en-vscode-9357a40506b26ed5eb37ea561e74b1be267e7425e2fa2161888370abfc97579d","title":"","text":"static readonly ACCOUNTS_VISIBILITY_PREFERENCE_KEY = 'workbench.activity.showAccounts'; private readonly groupedAccounts: Map = new Map(); private readonly problematicProviders: Set = new Set(); private initialized = false; private sessionFromEmbedder = getCurrentAuthenticationSessionInfo(this.credentialsService, this.productService); constructor( action: ActivityAction, contextMenuActionsProvider: () => IAction[],"} {"_id":"doc-en-vscode-363a7dda0c985bfaee94d9c0884ad883d9c7987e7408110560e2916ee68393f9","title":"","text":"@IStorageService private readonly storageService: IStorageService, @IKeybindingService keybindingService: IKeybindingService, @ICredentialsService private readonly credentialsService: ICredentialsService, @ILogService private readonly logService: ILogService ) { super(MenuId.AccountsContext, action, contextMenuActionsProvider, true, colors, activityHoverOptions, themeService, hoverService, menuService, contextMenuService, contextKeyService, configurationService, environmentService, keybindingService); this.registerListeners(); this.initialize(); } private registerListeners(): void { this._register(this.authenticationService.onDidRegisterAuthenticationProvider(async (e) => { await this.addAccountsFromProvider(e.id); })); this._register(this.authenticationService.onDidUnregisterAuthenticationProvider((e) => { this.groupedAccounts.delete(e.id); this.problematicProviders.delete(e.id); })); this._register(this.authenticationService.onDidChangeSessions(async e => { const promises = []; for (const changed of e.event.changed) { promises.push(this.addOrUpdateAccount(e.providerId, changed.account)); } for (const added of e.event.added) { promises.push(this.addOrUpdateAccount(e.providerId, added.account)); } const result = await Promise.allSettled(promises); for (const r of result) { if (r.status === 'rejected') { this.logService.error(r.reason); } } for (const removed of e.event.removed) { this.removeAccount(e.providerId, removed.account); } })); } // This function exists to ensure that the accounts are added for auth providers that had already been registered // before the menu was created. private async initialize(): Promise { const providerIds = this.authenticationService.getProviderIds(); const results = await Promise.allSettled(providerIds.map(providerId => this.addAccountsFromProvider(providerId))); // Log any errors that occurred while initializing. We try to be best effort here to show the most amount of accounts for (const result of results) { if (result.status === 'rejected') { this.logService.error(result.reason); } } this.initialized = true; } //#region overrides protected override async resolveMainMenuActions(accountsMenu: IMenu, disposables: DisposableStore): Promise { await super.resolveMainMenuActions(accountsMenu, disposables); const otherCommands = accountsMenu.getActions(); const providers = this.authenticationService.getProviderIds(); const allSessions = providers.map(async providerId => { try { const sessions = await this.authenticationService.getSessions(providerId); const groupedSessions: { [label: string]: AuthenticationSession[] } = {}; sessions.forEach(session => { if (groupedSessions[session.account.label]) { groupedSessions[session.account.label].push(session); } else { groupedSessions[session.account.label] = [session]; } }); const otherCommands = accountsMenu.getActions(); let menus: IAction[] = []; return { providerId, sessions: groupedSessions }; } catch { return { providerId }; for (const providerId of providers) { if (!this.initialized) { const noAccountsAvailableAction = disposables.add(new Action('noAccountsAvailable', localize('loading', \"Loading...\"), undefined, false)); menus.push(noAccountsAvailableAction); break; } const providerLabel = this.authenticationService.getLabel(providerId); const accounts = this.groupedAccounts.get(providerId); if (!accounts) { if (this.problematicProviders.has(providerId)) { const providerUnavailableAction = disposables.add(new Action('providerUnavailable', localize('authProviderUnavailable', '{0} is currently unavailable', providerLabel), undefined, false)); menus.push(providerUnavailableAction); // try again in the background so that if the failure was intermittent, we can resolve it on the next showing of the menu try { await this.addAccountsFromProvider(providerId); } catch (e) { this.logService.error(e); } } continue; } }); const result = await Promise.all(allSessions); let menus: IAction[] = []; const authenticationSession = await getCurrentAuthenticationSessionInfo(this.credentialsService, this.productService); result.forEach(sessionInfo => { const providerDisplayName = this.authenticationService.getLabel(sessionInfo.providerId); if (sessionInfo.sessions) { Object.keys(sessionInfo.sessions).forEach(accountName => { const manageExtensionsAction = disposables.add(new Action(`configureSessions${accountName}`, localize('manageTrustedExtensions', \"Manage Trusted Extensions\"), '', true, () => { return this.authenticationService.manageTrustedExtensionsForAccount(sessionInfo.providerId, accountName); })); const signOutAction = disposables.add(new Action('signOut', localize('signOut', \"Sign Out\"), '', true, () => { return this.authenticationService.removeAccountSessions(sessionInfo.providerId, accountName, sessionInfo.sessions[accountName]); })); for (const account of accounts) { const manageExtensionsAction = disposables.add(new Action(`configureSessions${account.label}`, localize('manageTrustedExtensions', \"Manage Trusted Extensions\"), undefined, true, () => { return this.authenticationService.manageTrustedExtensionsForAccount(providerId, account.label); })); const providerSubMenuActions = [manageExtensionsAction]; const providerSubMenuActions: Action[] = [manageExtensionsAction]; const hasEmbedderAccountSession = sessionInfo.sessions[accountName].some(session => session.id === (authenticationSession?.id)); if (!hasEmbedderAccountSession || authenticationSession?.canSignOut) { providerSubMenuActions.push(signOutAction); } if (account.canSignOut) { const signOutAction = disposables.add(new Action('signOut', localize('signOut', \"Sign Out\"), undefined, true, async () => { const allSessions = await this.authenticationService.getSessions(providerId); const sessionsForAccount = allSessions.filter(s => s.account.id === account.id); return await this.authenticationService.removeAccountSessions(providerId, account.label, sessionsForAccount); })); providerSubMenuActions.push(signOutAction); } const providerSubMenu = new SubmenuAction('activitybar.submenu', `${accountName} (${providerDisplayName})`, providerSubMenuActions); menus.push(providerSubMenu); }); } else { const providerUnavailableAction = disposables.add(new Action('providerUnavailable', localize('authProviderUnavailable', '{0} is currently unavailable', providerDisplayName))); menus.push(providerUnavailableAction); const providerSubMenu = new SubmenuAction('activitybar.submenu', `${account.label} (${providerLabel})`, providerSubMenuActions); menus.push(providerSubMenu); } }); } if (providers.length && !menus.length) { const noAccountsAvailableAction = disposables.add(new Action('noAccountsAvailable', localize('noAccounts', \"You are not signed in to any accounts\"), undefined, false));"} {"_id":"doc-en-vscode-be68aa859c79a4aed5e6c07c42c021d18a4682c587efb1de20a97dfdc99dff0d","title":"","text":"return actions; } //#endregion //#region groupedAccounts helpers private async addOrUpdateAccount(providerId: string, account: AuthenticationSessionAccount): Promise { const accounts = this.groupedAccounts.get(providerId); const existingAccount = accounts?.find(a => a.id === account.id); if (existingAccount) { if (existingAccount.label !== account.label) { existingAccount.label = account.label; } return; } const sessionFromEmbedder = await this.sessionFromEmbedder; // If the session stored from the embedder allows sign out, then we can treat it and all others as sign out-able let canSignOut = !!sessionFromEmbedder?.canSignOut; if (!canSignOut) { if (sessionFromEmbedder?.id) { const sessions = (await this.authenticationService.getSessions(providerId)).filter(s => s.account.id === account.id); canSignOut = !sessions.some(s => s.id === sessionFromEmbedder.id); } else { // The default if we don't have a session from the embedder is to allow sign out canSignOut = true; } } if (!accounts) { this.groupedAccounts.set(providerId, [{ ...account, canSignOut }]); return; } accounts.push({ ...account, canSignOut }); } private removeAccount(providerId: string, account: AuthenticationSessionAccount): void { const accounts = this.groupedAccounts.get(providerId); if (!accounts) { return; } const index = accounts.findIndex(a => a.id === account.id); if (index === -1) { return; } accounts.splice(index, 1); if (accounts.length === 0) { this.groupedAccounts.delete(providerId); } } private async addAccountsFromProvider(providerId: string): Promise { try { const sessions = await this.authenticationService.getSessions(providerId); this.problematicProviders.delete(providerId); const result = await Promise.allSettled(sessions.map(s => this.addOrUpdateAccount(providerId, s.account))); for (const r of result) { if (r.status === 'rejected') { this.logService.error(r.reason); } } } catch (e) { this.logService.error(e); this.problematicProviders.add(providerId); } } //#endregion } export interface IProfileActivity extends IActivity {"} {"_id":"doc-en-vscode-acf9443eba3fb8ae609d460cf56289a53ba79ccc11763c6cbe13a9bbd7b3bcaa","title":"","text":"import { Event } from 'vs/base/common/event'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; export interface AuthenticationSessionAccount { label: string; id: string; } export interface AuthenticationSession { id: string; accessToken: string; account: { label: string; id: string; }; account: AuthenticationSessionAccount; scopes: ReadonlyArray; idToken?: string; }"} {"_id":"doc-en-vscode-5013f423116ad96615f18b281828001830e68a7517c90ee35b460ba2610a9e04","title":"","text":"} private _delayedUpdateHistory() { this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)); this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(undefined, onUnexpectedError); } private _updateHistory() {"} {"_id":"doc-en-vscode-c30d41773cae28470f328cfd31a3fe6650a4085fec29f7532d24fe9bcb9104eb","title":"","text":"import { exec } from 'child_process'; import * as resources from 'vs/base/common/resources'; import * as fs from 'fs'; import * as pfs from 'vs/base/node/pfs'; import { isLinux } from 'vs/base/common/platform'; import { IExtHostTunnelService, TunnelDto } from 'vs/workbench/api/common/extHostTunnelService'; import { asPromise } from 'vs/base/common/async'; import { Event, Emitter } from 'vs/base/common/event'; import { TunnelOptions, TunnelCreationOptions } from 'vs/platform/remote/common/tunnel'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { promisify } from 'util'; import { MovingAverage } from 'vs/base/common/numbers'; class ExtensionTunnel implements vscode.Tunnel { private _onDispose: Emitter = new Emitter();"} {"_id":"doc-en-vscode-384491a39eaed3522b0c7c0902f0aa4a75c637c693dd3a0b31435c19aeffe336","title":"","text":") { super(); this._proxy = extHostRpc.getProxy(MainContext.MainThreadTunnelService); if (initData.remote.isRemote && initData.remote.authority && !process.env['VSCODE_DISABLE_PROC_READING']) { if (initData.remote.isRemote && initData.remote.authority) { this.registerCandidateFinder(); } }"} {"_id":"doc-en-vscode-fc2e2cfa0f115d48d1c5c467ac95dd2dc479dddf50c9ad5f28c4b79c8ed5b0bd","title":"","text":"return this._proxy.$getTunnels(); } registerCandidateFinder(): void { // Every two seconds, scan to see if the candidate ports have changed; if (isLinux) { let oldPorts: { host: string, port: number, detail: string }[] | undefined = undefined; setInterval(async () => { const newPorts = await this.findCandidatePorts(); if (!oldPorts || (JSON.stringify(oldPorts) !== JSON.stringify(newPorts))) { oldPorts = newPorts; this._proxy.$onFoundNewCandidates(oldPorts.filter(async (candidate) => await this._showCandidatePort(candidate.host, candidate.port, candidate.detail))); return; } }, 2000); private calculateDelay(movingAverage: number) { // Some local testing indicated that the moving average might be between 50-100 ms. return Math.max(movingAverage * 20, 2000); } async registerCandidateFinder(): Promise { // Regularly scan to see if the candidate ports have changed. if (!isLinux) { return; } let movingAverage = new MovingAverage(); let oldPorts: { host: string, port: number, detail: string }[] | undefined = undefined; while (1) { const startTime = new Date().getTime(); const newPorts = await this.findCandidatePorts(); const timeTaken = new Date().getTime() - startTime; movingAverage.update(timeTaken); if (!oldPorts || (JSON.stringify(oldPorts) !== JSON.stringify(newPorts))) { oldPorts = newPorts; await this._proxy.$onFoundNewCandidates(oldPorts.filter(async (candidate) => await this._showCandidatePort(candidate.host, candidate.port, candidate.detail))); } await (new Promise(resolve => setTimeout(() => resolve(), this.calculateDelay(movingAverage.value)))); } }"} {"_id":"doc-en-vscode-84c53c332d13a2f78e9ad3817641c94b621741d05d07be9c67b3e6e025db9e75","title":"","text":"let tcp: string = ''; let tcp6: string = ''; try { tcp = fs.readFileSync('/proc/net/tcp', 'utf8'); tcp6 = fs.readFileSync('/proc/net/tcp6', 'utf8'); tcp = await pfs.readFile('/proc/net/tcp', 'utf8'); tcp6 = await pfs.readFile('/proc/net/tcp6', 'utf8'); } catch (e) { // File reading error. No additional handling needed. }"} {"_id":"doc-en-vscode-7a0178144f41e04ca2f8fa46ff309c61390e239a3304a12b9fa576ff905013c9","title":"","text":"}); })); const procChildren = fs.readdirSync('/proc'); const processes: { pid: number, cwd: string, cmd: string }[] = []; const procChildren = await pfs.readdir('/proc'); const processes: { pid: number, cwd: string, cmd: string }[] = []; for (let childName of procChildren) { try { const pid: number = Number(childName); const childUri = resources.joinPath(URI.file('/proc'), childName); const childStat = fs.statSync(childUri.fsPath); const childStat = await pfs.stat(childUri.fsPath); if (childStat.isDirectory() && !isNaN(pid)) { const cwd = fs.readlinkSync(resources.joinPath(childUri, 'cwd').fsPath); const cmd = fs.readFileSync(resources.joinPath(childUri, 'cmdline').fsPath, 'utf8'); const cwd = await promisify(fs.readlink)(resources.joinPath(childUri, 'cwd').fsPath); const cmd = await pfs.readFile(resources.joinPath(childUri, 'cmdline').fsPath, 'utf8'); processes.push({ pid, cwd, cmd }); } } catch (e) {"} {"_id":"doc-en-vscode-54724007c67df27747ca1f50a9d1c699c1d2c6e868794b26f6cf34a3ff54bd17","title":"","text":"// Menu registration - open editors const isFileOrUntitledResourceContextKey = ContextKeyExpr.or(ResourceContextKey.IsFileSystemResource, ResourceContextKey.Scheme.isEqualTo(Schemas.untitled)); const openToSideCommand = { id: OPEN_TO_SIDE_COMMAND_ID, title: nls.localize('openToSide', \"Open to the Side\")"} {"_id":"doc-en-vscode-7b339984e540e9a249729a4116cae898d5a01fccd5ff7e4a8f48b11bec8b5b4e","title":"","text":"group: 'navigation', order: 10, command: openToSideCommand, when: ContextKeyExpr.or(ResourceContextKey.IsFileSystemResource, ResourceContextKey.Scheme.isEqualTo(Schemas.untitled)) when: isFileOrUntitledResourceContextKey }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {"} {"_id":"doc-en-vscode-6f413ce7a4269a8dca1ba86497e236bf7010dc8040327b21ac33273ba4529cc1","title":"","text":"group: '3_compare', order: 20, command: compareResourceCommand, when: ContextKeyExpr.and(ResourceContextKey.HasResource, ResourceSelectedForCompareContext, WorkbenchListDoubleSelection.toNegated()) when: ContextKeyExpr.and(ResourceContextKey.HasResource, ResourceSelectedForCompareContext, isFileOrUntitledResourceContextKey, WorkbenchListDoubleSelection.toNegated()) }); const selectForCompareCommand = {"} {"_id":"doc-en-vscode-96fcd71df3f2d77c0c3e147f9b8c405786d5658259fed6adccec1ea83f45a065","title":"","text":"group: '3_compare', order: 30, command: selectForCompareCommand, when: ContextKeyExpr.and(ResourceContextKey.HasResource, WorkbenchListDoubleSelection.toNegated()) when: ContextKeyExpr.and(ResourceContextKey.HasResource, isFileOrUntitledResourceContextKey, WorkbenchListDoubleSelection.toNegated()) }); const compareSelectedCommand = {"} {"_id":"doc-en-vscode-be365c800b391f45b33f338f8c72aa7de3864f7982cba84f008cb2f7e228b7a7","title":"","text":"group: '3_compare', order: 30, command: compareSelectedCommand, when: ContextKeyExpr.and(ResourceContextKey.HasResource, WorkbenchListDoubleSelection) when: ContextKeyExpr.and(ResourceContextKey.HasResource, WorkbenchListDoubleSelection, isFileOrUntitledResourceContextKey) }); MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {"} {"_id":"doc-en-vscode-aa9c285c81e979b58d7f5dabd68e86b38f5a990ea621cf73e97df3cb8fa57aff","title":"","text":"if (this.accessor.partOptions.wrapTabs) { const visibleTabsWidth = tabsContainer.offsetWidth; const allTabsWidth = tabsContainer.scrollWidth; const lastTabFitsWrapped = () => { const lastTab = this.getLastTab(); if (!lastTab) { return true; // no tab always fits } return lastTab.offsetWidth <= (dimensions.available.width - editorToolbarContainer.offsetWidth); }; // If tabs wrap or should start to wrap (when width exceeds visible width) // we must trigger `updateWrapping` to set the `last-tab-margin-right` // accordingly based on the number of actions. The margin is important to // properly position the last tab apart from the actions if (tabsWrapMultiLine || allTabsWidth > visibleTabsWidth) { // // We already check here if the last tab would fit when wrapped given the // editor toolbar will also show right next to it. This ensures we are not // enabling wrapping only to disable it again in the code below (this fixes // flickering issue https://github.com/microsoft/vscode/issues/115050) if (tabsWrapMultiLine || (allTabsWidth > visibleTabsWidth && lastTabFitsWrapped())) { updateTabsWrapping(true); } // Tabs wrap multiline: remove wrapping under certain size constraint conditions if (tabsWrapMultiLine) { const lastTab = this.getLastTab(); if ( (tabsContainer.offsetHeight > dimensions.available.height) ||\t\t\t\t\t\t\t\t\t\t\t// if height exceeds available height (allTabsWidth === visibleTabsWidth && tabsContainer.offsetHeight === TabsTitleControl.TAB_HEIGHT) ||\t// if wrapping is not needed anymore (lastTab && lastTab.offsetWidth > (dimensions.available.width - editorToolbarContainer.offsetWidth))\t// if editor actions occupy too much space (!lastTabFitsWrapped())\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// if last tab does not fit anymore ) { updateTabsWrapping(false); }"} {"_id":"doc-en-vscode-842746c68d6e53c57cc4a158861c74ee1a1c1d04a246667244f737ff2016895a","title":"","text":".monaco-workbench .pane-body.integrated-terminal .split-view-view { box-sizing: border-box; overflow: hidden; } /* border-color is set by theme key terminal.border */"} {"_id":"doc-en-vscode-e1bd37b58ae0c982fb863ff43ab08c33bbd8aa18f7c98a6ed6a7b7e0e482c079","title":"","text":"if (lens.command) { const title = renderLabelWithIcons(lens.command.title.trim()); if (lens.command.id) { children.push(dom.$('a', { id: String(i) }, ...title)); children.push(dom.$('a', { id: String(i), title: lens.command.tooltip }, ...title)); this._commands.set(String(i), lens.command); } else { children.push(dom.$('span', undefined, ...title)); children.push(dom.$('span', { title: lens.command.tooltip }, ...title)); } if (i + 1 < lenses.length) { children.push(dom.$('span', undefined, 'u00a0|u00a0'));"} {"_id":"doc-en-vscode-c0ca269cd801fdb5b1c6664c1409b4c4adc9a90a2a92f73dad633d8d815bc39d","title":"","text":"* Submitting pull requests ## Related Projects Many of the core components and extensions to Code live in their own repositories on GitHub. For example, the [node debug adapter](https://github.com/microsoft/vscode-node-debug), the [mono debug adapter](https://github.com/microsoft/vscode-mono-debug). Many of the core components and extensions to Code live in their own repositories on GitHub. For example, the [node debug adapter](https://github.com/microsoft/vscode-node-debug) and the [mono debug adapter](https://github.com/microsoft/vscode-mono-debug). For a complete list, please see the [Related Projects](https://github.com/Microsoft/vscode/wiki/Related-Projects) page on our wiki."} {"_id":"doc-en-vscode-b4d7308bb391d8a8c7dfda0565b5a1e8e6a9b31b9b0793f2cc49722cfadc155a","title":"","text":"unhideMarkdownPreview(cell: ICellViewModel): Promise; hideMarkdownPreview(cell: ICellViewModel): Promise; removeMarkdownPreview(cell: ICellViewModel): Promise; updateMarkdownPreviewSelectionState(cell: ICellViewModel, isSelected: boolean): Promise; /** * Render the output in webview layer"} {"_id":"doc-en-vscode-6e757ecd85718f0e40b6e6388e7193ba3d83dfa175adbe41e5009d52eec27f50","title":"","text":"await this._webview?.removeMarkdownPreview(cell.id); } async updateMarkdownPreviewSelectionState(cell: ICellViewModel, isSelected: boolean): Promise { if (!this._webview) { return; } await this._resolveWebview(); await this._webview?.updateMarkdownPreviewSelectionState(cell.id, isSelected); } async createInset(cell: CodeCellViewModel, output: IInsetRenderOutput, offset: number): Promise { this._insetModifyQueueByOutputId.queue(output.source.model.outputId, async () => { if (!this._webview) {"} {"_id":"doc-en-vscode-7ad8d8b4e5de7d5dca4beb8bb258e0c42eaac1d85d464562212a9de532bcad81","title":"","text":"top: number; } export interface IUpdateMarkdownPreviewSelectionState { readonly type: 'updateMarkdownPreviewSelectionState', readonly id: string; readonly isSelected: boolean; } export interface IInitializeMarkdownMessage { type: 'initializeMarkdownPreview'; cells: Array<{ cellId: string, content: string }>;"} {"_id":"doc-en-vscode-cd95a1f15b5b74e3df5a8de22d45472e3ce82f7964df1b8ebccb5ba44fe187a8","title":"","text":"| IShowMarkdownMessage | IHideMarkdownMessage | IUnhideMarkdownMessage | IUpdateMarkdownPreviewSelectionState | IInitializeMarkdownMessage | IViewScrollMarkdownRequestMessage;"} {"_id":"doc-en-vscode-1cbe9697c9e24f7bdd29cd7cdcb1f1d46b22e0b581654e399b8f2f64c53aecb4","title":"","text":"padding-left: ${this.options.leftMargin}px; } #container > div > div.preview.selected { background: var(--vscode-notebook-selectedCellBackground); } #container > div > div.preview img { max-width: 100%; max-height: 100%;"} {"_id":"doc-en-vscode-a50e9e8b685223f770affb5aeea5862d47db887155ab2eae5212d7e0828a8910","title":"","text":"}); } async updateMarkdownPreviewSelectionState(cellId: any, isSelected: boolean) { if (this._disposed) { return; } this._sendMessageToWebview({ type: 'updateMarkdownPreviewSelectionState', id: cellId, isSelected }); } async updateMarkdownPreviewDecpratopms(cellId: any, isSelected: boolean) { if (this._disposed) { return; } this._sendMessageToWebview({ type: 'updateMarkdownPreviewSelectionState', id: cellId, isSelected }); } async initializeMarkdown(cells: Array<{ cellId: string, content: string }>) { await this._loaded;"} {"_id":"doc-en-vscode-1d587786efb38ccd666740f8953f9e8d23bd761fe8f3b3ab586dd204ca7cef4a","title":"","text":"} private updateForLayout(element: MarkdownCellViewModel, templateData: MarkdownCellRenderTemplate): void { // templateData.focusIndicatorLeft.style.height = `${element.layoutInfo.indicatorHeight}px`; templateData.focusIndicatorBottom.style.top = `${element.layoutInfo.totalHeight - BOTTOM_CELL_TOOLBAR_GAP - CELL_BOTTOM_MARGIN}px`; const focusSideHeight = element.layoutInfo.totalHeight - BOTTOM_CELL_TOOLBAR_GAP;"} {"_id":"doc-en-vscode-1ca2f597ca6f966407342eb67be4b872015d87dc07b55115ff9a4d7af5427779","title":"","text":"} })); // Update for selection if (this.useRenderer) { this._register(this.notebookEditor.onDidChangeSelection(() => { const selectedCells = this.notebookEditor.getSelectionViewModels(); const isSelected = selectedCells.length > 1 && selectedCells.some(selectedCell => selectedCell === viewCell); this.notebookEditor.updateMarkdownPreviewSelectionState(viewCell, isSelected); })); } // apply decorations this._register(viewCell.onCellDecorationsChanged((e) => { e.added.forEach(options => { if (options.className) { templateData.rootContainer.classList.add(options.className); if (this.useRenderer) { this.notebookEditor.deltaCellOutputContainerClassNames(this.viewCell.id, [options.className], []); } else { templateData.rootContainer.classList.add(options.className); } } }); e.removed.forEach(options => { if (options.className) { templateData.rootContainer.classList.remove(options.className); if (this.useRenderer) { this.notebookEditor.deltaCellOutputContainerClassNames(this.viewCell.id, [], [options.className]); } else { templateData.rootContainer.classList.remove(options.className); } } }); })); // apply decorations viewCell.getCellDecorations().forEach(options => { if (options.className) { templateData.rootContainer.classList.add(options.className); if (this.useRenderer) { this.notebookEditor.deltaCellOutputContainerClassNames(this.viewCell.id, [options.className], []); } else { templateData.rootContainer.classList.add(options.className); } } });"} {"_id":"doc-en-vscode-4d234368aa840a8bd5b40b1be39bf326a2a40ae1b6676d61cf9755061100f607","title":"","text":"const data = event.data; let cellContainer = document.getElementById(data.id); if (cellContainer) { cellContainer?.parentElement?.removeChild(cellContainer); cellContainer.parentElement?.removeChild(cellContainer); } } break; case 'updateMarkdownPreviewSelectionState': { const data = event.data; const previewNode = document.getElementById(`${data.id}_preview`); if (previewNode) { previewNode.classList.toggle('selected', data.isSelected); } } break;"} {"_id":"doc-en-vscode-b15cbf86c764f8129e3ab67ac25686ceaf5c5a2c4c0a14ac133a45d3e1300e83","title":"","text":"markdownCellDragEnd(cellId: string, position: { clientY: number }): void { throw new Error('Method not implemented.'); } updateMarkdownPreviewSelectionState(cell: ICellViewModel, isSelected: boolean): Promise { throw new Error('Method not implemented.'); } async beginComputeContributedKernels(): Promise { return []; }"} {"_id":"doc-en-vscode-6629b77221cfba12f2de90c60c4468354d3a159780e394868c7e48c92774eb85","title":"","text":"protected _modifyText(text: string, wordSeparators: string): string { return (text .replace(/(p{Ll})(p{Lu})/gmu, '$1_$2') .replace(/([^b_])(p{Lu})(p{Ll})/gmu, '$1_$2$3') .replace(/(p{Lu}|p{N})(p{Lu})(p{Ll})/gmu, '$1_$2$3') .toLocaleLowerCase() ); }"} {"_id":"doc-en-vscode-16f625718485b954778d0ee96a14bf1d8c231becd69debfd209a6b17ff68d1a2","title":"","text":"`function helloWorld() { return someGlobalObject.printHelloWorld(\"en\", \"utf-8\"); } helloWorld();`.replace(/^s+/gm, '') helloWorld();`.replace(/^s+/gm, ''), `'JavaScript'`, 'parseHTML4String', '_accessor: ServicesAccessor' ], {}, (editor) => { let model = editor.getModel()!; let uppercaseAction = new UpperCaseAction();"} {"_id":"doc-en-vscode-54f2032b9634400a8d047879b0cdd7cd46ef9e3dc785089a187d4aab6f1e425b","title":"","text":"} hello_world();`.replace(/^s+/gm, '')); assertSelection(editor, new Selection(14, 1, 17, 15)); editor.setSelection(new Selection(18, 1, 18, 13)); executeAction(snakecaseAction, editor); assert.strictEqual(model.getLineContent(18), `'java_script'`); assertSelection(editor, new Selection(18, 1, 18, 14)); editor.setSelection(new Selection(19, 1, 19, 17)); executeAction(snakecaseAction, editor); assert.strictEqual(model.getLineContent(19), 'parse_html4_string'); assertSelection(editor, new Selection(19, 1, 19, 19)); editor.setSelection(new Selection(20, 1, 20, 28)); executeAction(snakecaseAction, editor); assert.strictEqual(model.getLineContent(20), '_accessor: services_accessor'); assertSelection(editor, new Selection(20, 1, 20, 29)); } );"} {"_id":"doc-en-vscode-11af3fb3f2af3be3946c915b0ed43e7fba7e9bf1b64f564dcd20d47c5e281d8c","title":"","text":"- use the `--debug` to see an electron window with dev tools which allows for debugging - to run only a subset of tests use the `--run` or `--glob` options - use `yarn watch` to automatically compile changes For instance, `./scripts/test.sh --debug --glob **/extHost*.test.js` runs all tests from `extHost`-files and enables you to debug them."} {"_id":"doc-en-vscode-a95973c12aa3fb04681971e972708c104aa65c87063de2c6835616df312f5253","title":"","text":"## Run (with node) yarn run mocha --run src/vs/editor/test/browser/controller/cursor.test.ts yarn run mocha --ui tdd --run src/vs/editor/test/browser/controller/cursor.test.ts ## Coverage"} {"_id":"doc-en-vscode-2d61704c5951ff86fc7a1606cc2582a6133b22e767898e8d8276a53bc3c7c214","title":"","text":"return this._remoteTerminalChannel.setTerminalLayoutInfo(layout); } public getTerminalLayoutInfo(): Promise { public async getTerminalLayoutInfo(): Promise { await this._remoteTerminalChannel?.listProcesses(true); if (!this._remoteTerminalChannel) { throw new Error(`Cannot call getActiveInstanceId when there is no remote`); }"} {"_id":"doc-en-vscode-2034ee5b1abd59a1da629fd21d2e84772a127ec7e36233ff48343b69e08c47af","title":"","text":"private async onDidClickPreviewLink(href: string) { let [hrefPath, fragment] = decodeURIComponent(href).split('#'); // We perviously already resolve absolute paths. // Now make sure we handle relative file paths if (hrefPath[0] !== '/') { // Fix #93691, use this.resource.fsPath instead of this.resource.path hrefPath = path.join(path.dirname(this.resource.fsPath), hrefPath); // We perviously already resolve absolute paths. // Now make sure we handle relative file paths const dirnameUri = vscode.Uri.parse(path.dirname(this.resource.path)); hrefPath = vscode.Uri.joinPath(dirnameUri, hrefPath).path; } else { // Handle any normalized file paths hrefPath = vscode.Uri.parse(hrefPath.replace('/file', '')).fsPath; hrefPath = vscode.Uri.parse(hrefPath.replace('/file', '')).path; } const config = vscode.workspace.getConfiguration('markdown', this.resource);"} {"_id":"doc-en-vscode-e0c3d25ad661d58e1e69e7c7417ad5cefa421f52273b37cf5f4a97c2395da1ef","title":"","text":"}); }); // https://github.com/microsoft/vscode/issues/119826 suite.skip('environmentVariableCollection', () => { suite('environmentVariableCollection', () => { test('should have collection variables apply to terminals immediately after setting', (done) => { // Text to match on before passing the test const expectedText = ["} {"_id":"doc-en-vscode-5e590cd3f2c660bdd5e9dc208bd6f175b89fbc0f8af12204b8d66a881e914def","title":"","text":"assert.strictEqual(count, 0); }); test('correct cell selection on undo/redo of cell creation', async function () { const resource = await createRandomFile('', undefined, '.vsctestnb'); await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest'); await vscode.commands.executeCommand('notebook.cell.insertCodeCellBelow'); await vscode.commands.executeCommand('undo'); const selectionUndo = [...vscode.window.activeNotebookEditor!.selections]; await vscode.commands.executeCommand('redo'); const selectionRedo = vscode.window.activeNotebookEditor!.selections; // On undo, the selected cell must be the upper cell, ie the first one assert.strictEqual(selectionUndo.length, 1); assert.strictEqual(selectionUndo[0].start, 0); assert.strictEqual(selectionUndo[0].end, 1); // On redo, the selected cell must be the new cell, ie the second one assert.strictEqual(selectionRedo.length, 1); assert.strictEqual(selectionRedo[0].start, 1); assert.strictEqual(selectionRedo[0].end, 2); }); test('editor editing event 2', async function () { const resource = await createRandomFile('', undefined, '.vsctestnb'); await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest');"} {"_id":"doc-en-vscode-3d1b3bd9e63066976f7066e17cf1ee4738ea9718cd3ee3de50b5f792cc8eb53f","title":"","text":"} async runWithContext(accessor: ServicesAccessor, context: INotebookActionContext): Promise { const newCell = context.notebookEditor.insertNotebookCell(context.cell, this.kind, this.direction, undefined, true); if (newCell) { context.notebookEditor.focusNotebookCell(newCell, 'editor'); } context.notebookEditor.insertNotebookCell(context.cell, this.kind, this.direction, undefined, true); } }"} {"_id":"doc-en-vscode-d739f9a6ea6c0d7a0fb63610e46ad5ffac3064a7d189499c65d940851c0ac331","title":"","text":"createCell(index: number, source: string, language: string, type: CellKind, metadata: NotebookCellMetadata | undefined, outputs: IOutputDto[], synchronous: boolean, pushUndoStop: boolean = true, previouslyPrimary: number | null = null, previouslyFocused: ICellViewModel[] = []): CellViewModel { const beforeSelections = previouslyFocused.map(e => e.handle); const endSelections: ISelectionState = { kind: SelectionStateType.Index, focus: { start: index, end: index + 1 }, selections: [{ start: index, end: index + 1 }] }; this._notebook.applyEdits([ { editType: CellEditType.Replace,"} {"_id":"doc-en-vscode-2bbe207d22639ae5468204c63e3d824146ba92d941d05b139e1fd9322f8176a1","title":"","text":"} ] } ], synchronous, { kind: SelectionStateType.Handle, primary: previouslyPrimary, selections: beforeSelections }, () => undefined, undefined); ], synchronous, { kind: SelectionStateType.Handle, primary: previouslyPrimary, selections: beforeSelections }, () => endSelections, undefined); return this._viewCells[index]; }"} {"_id":"doc-en-vscode-d1f671d8828be154f2e45791ac5f521771519770110200231d3cf6eb8bb3785a","title":"","text":"if (useWslProfiles) { const distroOutput = await new Promise((resolve, reject) => { // wsl.exe output is encoded in utf16le (ie. A -> 0x4100) cp.exec('wsl.exe -l', { encoding: 'utf16le' }, (err, stdout) => { cp.exec('wsl.exe -l -q', { encoding: 'utf16le' }, (err, stdout) => { if (err) { return reject('Problem occurred when getting wsl distros'); }"} {"_id":"doc-en-vscode-873ff6631fff4e0713ff24601a000c58c9712cc74d3b19e4b0b2a9d8ad676052","title":"","text":"if (distroOutput) { const regex = new RegExp(/[r?n]/); const distroNames = distroOutput.split(regex).filter(t => t.trim().length > 0 && t !== ''); // don't need the Windows Subsystem for Linux Distributions header distroNames.shift(); for (let distroName of distroNames) { // Remove default from distro name distroName = distroName.replace(/ (Default)$/, ''); // Skip empty lines if (distroName === '') { continue;"} {"_id":"doc-en-vscode-599f5c0cf7f5e4ed5d49b183dffff5a5d8b2422e59dbf2fc2d8f8bfc5a42a090","title":"","text":"this.textArea.setAttribute('aria-haspopup', 'false'); this.textArea.setAttribute('aria-autocomplete', 'both'); if (options.get(EditorOption.domReadOnly)) { if (options.get(EditorOption.domReadOnly) && options.get(EditorOption.readOnly)) { this.textArea.setAttribute('readonly', 'true'); }"} {"_id":"doc-en-vscode-998a703fdfabdaca4c864726efa0db1a5368e04fcb2bca8ca8b3783a0edc15a5","title":"","text":"this.textArea.setAttribute('aria-label', this._getAriaLabel(options)); this.textArea.setAttribute('tabindex', String(options.get(EditorOption.tabIndex))); if (e.hasChanged(EditorOption.domReadOnly)) { if (options.get(EditorOption.domReadOnly)) { if (e.hasChanged(EditorOption.domReadOnly) || e.hasChanged(EditorOption.readOnly)) { if (options.get(EditorOption.domReadOnly) && options.get(EditorOption.readOnly)) { this.textArea.setAttribute('readonly', 'true'); } else { this.textArea.removeAttribute('readonly');"} {"_id":"doc-en-vscode-3e5a10e650bc6ea6e5a6fa2d8e81ceab809184fe0d0abe4023d994b0ef134fcc","title":"","text":"import { ModesGlyphHoverWidget } from 'vs/editor/contrib/hover/modesGlyphHover'; import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { IOpenerService } from 'vs/platform/opener/common/opener'; import { editorHoverBackground, editorHoverBorder, editorHoverHighlight, textCodeBlockBackground, textLinkForeground, editorHoverStatusBarBackground, editorHoverForeground } from 'vs/platform/theme/common/colorRegistry'; import { editorHoverBackground, editorHoverBorder, editorHoverHighlight, textCodeBlockBackground, textLinkForeground, editorHoverStatusBarBackground, editorHoverForeground, textLinkActiveForeground } from 'vs/platform/theme/common/colorRegistry'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { AccessibilitySupport } from 'vs/platform/accessibility/common/accessibility'; import { GotoDefinitionAtPositionEditorContribution } from 'vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition';"} {"_id":"doc-en-vscode-7ef011d771a313f8ce704a0b13709e165201bb182bba6a1e4b2cda4baf49aecb","title":"","text":"if (link) { collector.addRule(`.monaco-editor .monaco-hover a { color: ${link}; }`); } const linkHover = theme.getColor(textLinkActiveForeground); if (linkHover) { collector.addRule(`.monaco-editor .monaco-hover a:hover { color: ${linkHover}; }`); } const hoverForeground = theme.getColor(editorHoverForeground); if (hoverForeground) { collector.addRule(`.monaco-editor .monaco-hover { color: ${hoverForeground}; }`);"} {"_id":"doc-en-vscode-fd9b5bff73325f0240fb50b55eb7b9128b76cfd544f22c57355576911c2b3175","title":"","text":"return result; } if (node !== this.root) { const treeNode = this.tree.getNode(node); if (treeNode.collapsed) { node.hasChildren = !!this.dataSource.hasChildren(node.element!); node.stale = true; return; } } return this.doRefreshSubTree(node, recursive, viewStateContext); }"} {"_id":"doc-en-vscode-6288dad3e390a925585529818b5b2148b242756feb862ec79772de1e5dd5c0c6","title":"","text":"import { AsyncDataTree } from 'vs/base/browser/ui/tree/asyncDataTree'; import { IAsyncDataSource, ITreeNode, ITreeRenderer } from 'vs/base/browser/ui/tree/tree'; import { timeout } from 'vs/base/common/async'; import { Iterable } from 'vs/base/common/iterator'; interface Element { id: string;"} {"_id":"doc-en-vscode-a04a6d5cbfea88112c5b977372eb8d30d996ab4efe42564589ef402b08d432b6","title":"","text":"assert.deepStrictEqual(Array.from(container.querySelectorAll('.monaco-list-row')).map(e => e.textContent), ['a', 'b2']); }); test('issue #121567', async () => { const container = document.createElement('div'); const calls: Element[] = []; const dataSource = new class implements IAsyncDataSource { hasChildren(element: Element): boolean { return !!element.children && element.children.length > 0; } async getChildren(element: Element) { calls.push(element); return element.children ?? Iterable.empty(); } }; const model = new Model({ id: 'root', children: [{ id: 'a', children: [{ id: 'aa' }] }] }); const a = model.get('a'); const tree = new AsyncDataTree('test', container, new VirtualDelegate(), [new Renderer()], dataSource, { identityProvider: new IdentityProvider() }); tree.layout(200); await tree.setInput(model.root); assert.strictEqual(calls.length, 1, 'There should be a single getChildren call for the root'); assert(tree.isCollapsible(a), 'a is collapsible'); assert(tree.isCollapsed(a), 'a is collapsed'); await tree.updateChildren(a, false); assert.strictEqual(calls.length, 1, 'There should be no changes to the calls list, since a was collapsed'); assert(tree.isCollapsible(a), 'a is collapsible'); assert(tree.isCollapsed(a), 'a is collapsed'); const children = a.children; a.children = []; await tree.updateChildren(a, false); assert.strictEqual(calls.length, 1, 'There should still be no changes to the calls list, since a was collapsed'); assert(!tree.isCollapsible(a), 'a is no longer collapsible'); assert(tree.isCollapsed(a), 'a is collapsed'); a.children = children; await tree.updateChildren(a, false); assert.strictEqual(calls.length, 1, 'There should still be no changes to the calls list, since a was collapsed'); assert(tree.isCollapsible(a), 'a is collapsible again'); assert(tree.isCollapsed(a), 'a is collapsed'); await tree.expand(a); assert.strictEqual(calls.length, 2, 'Finally, there should be a getChildren call for a'); assert(tree.isCollapsible(a), 'a is still collapsible'); assert(!tree.isCollapsed(a), 'a is expanded'); }); });"} {"_id":"doc-en-vscode-675b16496bc7bbbe694f716ca18c80f3eacb4263e380a2379cf52ed449caa381","title":"","text":"import { Event } from 'vs/base/common/event'; const WAIT_TIME_TO_SHOW_SURVEY = 1000 * 60 * 60; // 1 hour const MIN_WAIT_TIME_TO_SHOW_SURVEY = 1000 * 60 * 5; // 5 minutes const MIN_WAIT_TIME_TO_SHOW_SURVEY = 1000 * 60 * 2; // 2 minutes const MAX_INSTALL_AGE = 1000 * 60 * 60 * 24; // 24 hours const REMIND_LATER_DELAY = 1000 * 60 * 60 * 4; // 4 hours const SKIP_SURVEY_KEY = 'ces/skipSurvey';"} {"_id":"doc-en-vscode-4d4239e220b48891959f317ee536440344eb16ad0f2502cc57d5402a0795e75a","title":"","text":"run: () => { sendTelemetry('accept'); this.telemetryService.getTelemetryInfo().then(info => { this.openerService.open(URI.parse(`${this.productService.cesSurveyUrl}?o=${encodeURIComponent(platform)}&v=${encodeURIComponent(this.productService.version)}&m=${encodeURIComponent(info.machineId)}`)); let surveyUrl = `${this.productService.cesSurveyUrl}?o=${encodeURIComponent(platform)}&v=${encodeURIComponent(this.productService.version)}&m=${encodeURIComponent(info.machineId)}`; const usedParams = this.productService.surveys ?.filter(surveyData => surveyData.surveyId && surveyData.languageId) // Counts provided by contrib/surveys/browser/languageSurveys .filter(surveyData => this.storageService.getNumber(`${surveyData.surveyId}.editedCount`, StorageScope.GLOBAL, 0) > 0) .map(surveyData => `${encodeURIComponent(surveyData.languageId)}Lang=1`) .join('&'); if (usedParams) { surveyUrl += `&${usedParams}`; } this.openerService.open(URI.parse(surveyUrl)); this.skipSurvey(); }); }"} {"_id":"doc-en-vscode-650ce316956c9cc88c7c054b279cb2914fa48fcb99c96311c231101520190746","title":"","text":"import { ContributedEditorInfo, ContributedEditorPriority, ContributionPointOptions, DEFAULT_EDITOR_ASSOCIATION, DiffEditorInputFactoryFunction, EditorAssociation, EditorAssociations, EditorInputFactoryFunction, editorsAssociationsSettingId, globMatchesResource, IEditorOverrideService, priorityToRank } from 'vs/workbench/services/editor/common/editorOverrideService'; import { IKeyMods, IQuickInputService, IQuickPickItem, IQuickPickSeparator } from 'vs/platform/quickinput/common/quickInput'; import { localize } from 'vs/nls'; import { Codicon } from 'vs/base/common/codicons'; import { INotificationService, Severity } from 'vs/platform/notification/common/notification'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions';"} {"_id":"doc-en-vscode-a93dcaec32343c04f1bd207ec16dec487473941dc7fec062b32b741c886f6702","title":"","text":"export class EditorOverrideService extends Disposable implements IEditorOverrideService { readonly _serviceBrand: undefined; private static readonly configureDefaultID = 'promptOpenWith.configureDefault'; private _contributionPoints: Map = new Map(); private static readonly overrideCacheStorageID = 'editorOverrideService.cache'; private cache: Set | undefined;"} {"_id":"doc-en-vscode-0094f42776b9e536bbc87fb82bf20b6432987ea92b9564295bcee3e6e5d8be38","title":"","text":"}); } private mapContributionsToQuickPickEntry(resource: URI, group: IEditorGroup, alwaysUpdateSetting?: boolean) { private mapContributionsToQuickPickEntry(resource: URI, group: IEditorGroup, showDefaultPicker?: boolean) { const currentEditor = firstOrDefault(group.findEditors(resource)); // If untitled, we want all contribution points let contributionPoints = resource.scheme === Schemas.untitled ? distinct(flatten(Array.from(this._contributionPoints.values())), (contrib) => contrib.editorInfo.id) : this.findMatchingContributions(resource);"} {"_id":"doc-en-vscode-5bb6597fc6b163efe2beb5046e208b4e33ef357aff72b0d96b3d8a6e662b9fbd","title":"","text":"return priorityToRank(b.editorInfo.priority) - priorityToRank(a.editorInfo.priority); } }); const contribGroups: { defaults: Array, optional: Array } = { defaults: [ { type: 'separator', label: localize('editorOverride.picker.default', 'Defaults') } ], optional: [ { type: 'separator', label: localize('editorOverride.picker.optional', 'Optional') } ], }; const quickPickEntries: Array = []; // Get the matching contribtuions and call resolve whether they're active for the picker contributionPoints.forEach(contribPoint => { const isActive = currentEditor ? contribPoint.editorInfo.describes(currentEditor) : false; const quickPickEntry = { const quickPickEntry: IQuickPickItem = { id: contribPoint.editorInfo.id, label: contribPoint.editorInfo.label, description: isActive ? localize('promptOpenWith.currentlyActive', \"Currently Active\") : undefined, detail: contribPoint.editorInfo.detail ?? contribPoint.editorInfo.priority, buttons: alwaysUpdateSetting ? [] : [{ iconClass: Codicon.gear.classNames, tooltip: localize('promptOpenWith.setDefaultTooltip', \"Set as default editor for '{0}' files\", extname(resource)) }], }; if (contribPoint.editorInfo.priority === ContributedEditorPriority.option) { contribGroups.optional.push(quickPickEntry); } else { contribGroups.defaults.push(quickPickEntry); } quickPickEntries.push(quickPickEntry); }); return [...contribGroups.defaults, ...contribGroups.optional]; if (!showDefaultPicker) { const separator: IQuickPickSeparator = { type: 'separator' }; quickPickEntries.push(separator); const configureDefaultEntry = { id: EditorOverrideService.configureDefaultID, label: localize('promptOpenWith.configureDefault', \"Configure default editor....\") }; quickPickEntries.push(configureDefaultEntry); } return quickPickEntries; } private async doPickEditorOverride(editor: IEditorInput, options: IEditorOptions | undefined, group: IEditorGroup, alwaysUpdateSetting?: boolean): Promise<[IEditorOptions, IEditorGroup | undefined] | undefined> { private async doPickEditorOverride(editor: IEditorInput, options: IEditorOptions | undefined, group: IEditorGroup, showDefaultPicker?: boolean): Promise<[IEditorOptions, IEditorGroup | undefined] | undefined> { type EditorOverridePick = { readonly item: IQuickPickItem;"} {"_id":"doc-en-vscode-5c167208f21c0c84ddc44c829674771eaea08e86d5fe46cc648d1ba8f392c3fc","title":"","text":"} // Text editor has the lowest priority because we const editorOverridePicks = this.mapContributionsToQuickPickEntry(resource, group, alwaysUpdateSetting); const editorOverridePicks = this.mapContributionsToQuickPickEntry(resource, group, showDefaultPicker); // Create editor override picker const editorOverridePicker = this.quickInputService.createQuickPick(); const placeHolderMessage = alwaysUpdateSetting ? const placeHolderMessage = showDefaultPicker ? localize('prompOpenWith.updateDefaultPlaceHolder', \"Select new default editor for '{0}'\", basename(resource)) : localize('promptOpenWith.placeHolder', \"Select editor for '{0}'\", basename(resource)); editorOverridePicker.placeholder = placeHolderMessage;"} {"_id":"doc-en-vscode-ceb6a351d28dd68ce21ed4399c9beaecc733f6728dcab1c90d17d5377982f72c","title":"","text":"} // If asked to always update the setting then update it even if the gear isn't clicked if (alwaysUpdateSetting && result?.item.id) { if (showDefaultPicker && result?.item.id) { this.updateUserAssociations(`*${extname(resource)}`, result.item.id,); }"} {"_id":"doc-en-vscode-17b425e799e821f050104d8db67bc581e0582714e868e65580d9fefe9c498d17","title":"","text":"// options and group to use accordingly if (picked) { // If the user selected to configure default we trigger this picker again and tell it to show the default picker if (picked.item.id === EditorOverrideService.configureDefaultID) { return this.doPickEditorOverride(editor, options, group, true); } // Figure out target group let targetGroup: IEditorGroup | undefined; if (picked.keyMods?.alt || picked.keyMods?.ctrlCmd) {"} {"_id":"doc-en-vscode-21067e7faba742f80857ea0769ca88d0f439b0cb3f63ac6cdc6038d39c55121e","title":"","text":"collector.addRule(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row > .cell-inner-container { padding-top: ${CELL_TOP_MARGIN}px; }`); collector.addRule(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .markdown-cell-row > .cell-inner-container { padding-bottom: ${MARKDOWN_CELL_BOTTOM_MARGIN}px; padding-top: ${MARKDOWN_CELL_TOP_MARGIN}px; }`); collector.addRule(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .markdown-cell-row > .cell-inner-container.webview-backed-markdown-cell { padding: 0; }`); collector.addRule(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .markdown-cell-row > .webview-backed-markdown-cell.markdown-cell-edit-mode .cell.code { padding-top: ${MARKDOWN_CELL_TOP_MARGIN}px; }`); collector.addRule(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .markdown-cell-row > .webview-backed-markdown-cell.markdown-cell-edit-mode .cell.code { padding-bottom: ${MARKDOWN_CELL_BOTTOM_MARGIN}px; padding-top: ${MARKDOWN_CELL_TOP_MARGIN}px; }`); collector.addRule(`.notebookOverlay .output { margin: 0px ${CELL_RIGHT_MARGIN}px 0px ${CODE_CELL_LEFT_MARGIN + CELL_RUN_GUTTER}px; }`); collector.addRule(`.notebookOverlay .output { width: calc(100% - ${CODE_CELL_LEFT_MARGIN + CELL_RUN_GUTTER + CELL_RIGHT_MARGIN}px); }`);"} {"_id":"doc-en-vscode-c4c5c1b4ec9fafb335335bbbdacb801cecda6ea5352e3bb9def54106be04578f","title":"","text":"readonly onDidTriggerButton: Event; /** * Items to pick from. * Items to pick from. This can be read and updated by the extension. */ items: readonly T[];"} {"_id":"doc-en-vscode-996da7af8bae947587db50bd6f6f2a8dc9ffa1b8ae2c2ca5a17d6087146fed2d","title":"","text":"fileMatch?: string[]; url?: string; schema?: any; folderUri?: string; }; export namespace SettingIds {"} {"_id":"doc-en-vscode-b16f9b2f8ad312cd45aafd3246a7f7129b4feef8db94921d164403c95219da8c","title":"","text":"jsonFoldingLimit = normalizeLimit(workspace.getConfiguration(SettingIds.editorSection, { languageId: 'json' }).get(SettingIds.foldingMaximumRegions)); jsoncFoldingLimit = normalizeLimit(workspace.getConfiguration(SettingIds.editorSection, { languageId: 'jsonc' }).get(SettingIds.foldingMaximumRegions)); const schemas: JSONSchemaSettings[] = []; const settings: Settings = { http: { proxy: httpSettings.get('proxy'),"} {"_id":"doc-en-vscode-c17ac29c3cb974c9d836dbf92c8e0c722c2cb1e61e20f231b260d5cc740139c0","title":"","text":"validate: { enable: configuration.get(SettingIds.enableValidation) }, format: { enable: configuration.get(SettingIds.enableFormatter) }, keepLines: { enable: configuration.get(SettingIds.enableKeepLines) }, schemas: [], schemas, resultLimit: resultLimit + 1, // ask for one more so we can detect if the limit has been exceeded jsonFoldingLimit: jsonFoldingLimit + 1, jsoncFoldingLimit: jsoncFoldingLimit + 1 } }; const schemaSettingsById: { [schemaId: string]: JSONSchemaSettings } = Object.create(null); const collectSchemaSettings = (schemaSettings: JSONSchemaSettings[], folderUri?: Uri, isMultiRoot?: boolean) => { let fileMatchPrefix = undefined; if (folderUri && isMultiRoot) { fileMatchPrefix = folderUri.toString(); if (fileMatchPrefix[fileMatchPrefix.length - 1] === '/') { fileMatchPrefix = fileMatchPrefix.substr(0, fileMatchPrefix.length - 1); } } const collectSchemaSettings = (schemaSettings: JSONSchemaSettings[], folderUri?: Uri) => { for (const setting of schemaSettings) { const url = getSchemaId(setting, folderUri); if (!url) { continue; } let schemaSetting = schemaSettingsById[url]; if (!schemaSetting) { schemaSetting = schemaSettingsById[url] = { url, fileMatch: [] }; settings.json!.schemas!.push(schemaSetting); } const fileMatches = setting.fileMatch; if (Array.isArray(fileMatches)) { const resultingFileMatches = schemaSetting.fileMatch || []; schemaSetting.fileMatch = resultingFileMatches; const addMatch = (pattern: string) => { // filter duplicates if (resultingFileMatches.indexOf(pattern) === -1) { resultingFileMatches.push(pattern); } }; for (const fileMatch of fileMatches) { if (fileMatchPrefix) { if (fileMatch[0] === '/') { addMatch(fileMatchPrefix + fileMatch); addMatch(fileMatchPrefix + '/*' + fileMatch); } else { addMatch(fileMatchPrefix + '/' + fileMatch); addMatch(fileMatchPrefix + '/*/' + fileMatch); } } else { addMatch(fileMatch); } } } if (setting.schema && !schemaSetting.schema) { schemaSetting.schema = setting.schema; if (url) { const schemaSetting: JSONSchemaSettings = { url, fileMatch: setting.fileMatch, folderUri: folderUri?.toString(false), schema: setting.schema }; schemas.push(schemaSetting); } } }; const folders = workspace.workspaceFolders; // merge global and folder settings. Qualify all file matches with the folder path. const globalSettings = workspace.getConfiguration('json', null).get('schemas'); if (Array.isArray(globalSettings)) { if (!folders) { collectSchemaSettings(globalSettings); } collectSchemaSettings(globalSettings); } const folders = workspace.workspaceFolders; if (folders) { const isMultiRoot = folders.length > 1; for (const folder of folders) { const folderUri = folder.uri; const schemaConfigInfo = workspace.getConfiguration('json', folderUri).inspect('schemas'); const folderSchemas = schemaConfigInfo!.workspaceFolderValue; if (Array.isArray(folderSchemas)) { collectSchemaSettings(folderSchemas, folderUri, isMultiRoot); const schemaConfigInfo = workspace.getConfiguration('json', folder.uri).inspect('schemas'); if (schemaConfigInfo && Array.isArray(schemaConfigInfo.workspaceFolderValue)) { collectSchemaSettings(schemaConfigInfo.workspaceFolderValue, folder.uri); } if (Array.isArray(globalSettings)) { collectSchemaSettings(globalSettings, folderUri, isMultiRoot); } } } return settings;"} {"_id":"doc-en-vscode-7b4e71310bf6ea1ea21ecc95eaea6f82aef22b26153714e7a69e69f32614f4e4","title":"","text":"url = schema.schema.id || `vscode://schemas/custom/${encodeURIComponent(hash(schema.schema).toString(16))}`; } } else if (folderUri && (url[0] === '.' || url[0] === '/')) { url = Uri.joinPath(folderUri, url).toString(); url = Uri.joinPath(folderUri, url).toString(false); } return url; }"} {"_id":"doc-en-vscode-94e018a73f84c7e959444d01efd7579f42ff47aa8c2241b81b1b064cf76b1202","title":"","text":"- `schemas`: Configures association of file names to schema URL or schemas and/or associations of schema URL to schema content. - `fileMatch`: an array of file names or paths (separated by `/`). `*` can be used as a wildcard. Exclusion patterns can also be defined and start with '!'. A file matches when there is at least one matching pattern and the last matching pattern is not an exclusion pattern. - `url`: The URL of the schema, optional when also a schema is provided. - `schema`: The schema content. - `schema`: The schema content, optional - `folderUri`: If provided, the association is only used if the document is located in the given folder (directly or indirectly) - `resultLimit`: The max number of color decorators and outline symbols to be computed (for performance reasons) - `jsonFoldingLimit`: The max number of folding ranges to be computed for json documents (for performance reasons) - `jsoncFoldingLimit`: The max number of folding ranges to be computed for jsonc documents (for performance reasons)"} {"_id":"doc-en-vscode-40ee53c0a9a5953bb85a1842c6b88dd9c1cd2ca5b4cc9fed125e8593b4c6457a","title":"","text":"* A match succeeds when there is at least one pattern matching and last matching pattern does not start with '!'. */ fileMatch: string[]; /** * If provided, the association is only used if the validated document is located in the given folder (directly or indirectly) */ folderUri?: string; /* * The schema for the given URI. * If no schema is provided, the schema will be fetched with the schema request service (if available)."} {"_id":"doc-en-vscode-61f4e6a3f322c078be3defd4d36dc2c901ef0579779cc24aeb269d1a3472f836","title":"","text":"}, \"main\": \"./out/node/jsonServerMain\", \"dependencies\": { \"@vscode/l10n\": \"^0.0.11\", \"jsonc-parser\": \"^3.2.0\", \"request-light\": \"^0.7.0\", \"vscode-json-languageservice\": \"^5.1.4\", \"vscode-json-languageservice\": \"^5.2.0\", \"vscode-languageserver\": \"^8.1.0-next.6\", \"vscode-uri\": \"^3.0.7\", \"@vscode/l10n\": \"^0.0.11\" \"vscode-uri\": \"^3.0.7\" }, \"devDependencies\": { \"@types/mocha\": \"^9.1.1\","} {"_id":"doc-en-vscode-e4b6804a044c00f9fdcf9e0930f87cb321027b5cbd24ebc64c9af04001e34732","title":"","text":"fileMatch?: string[]; url?: string; schema?: JSONSchema; folderUri?: string; }"} {"_id":"doc-en-vscode-12ad7afeca37128dfa35bf4e09b6c72f428dbc090271db22eae2f3e5db73b590","title":"","text":"uri = schema.schema.id || `vscode://schemas/custom/${index}`; } if (uri) { languageSettings.schemas.push({ uri, fileMatch: schema.fileMatch, schema: schema.schema }); languageSettings.schemas.push({ uri, fileMatch: schema.fileMatch, schema: schema.schema, folderUri: schema.folderUri }); } }); }"} {"_id":"doc-en-vscode-9e833a1d28844ae1e1fe695ebd5d9ca77377c4c1dbc8d62689a605d14b4a7caa","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.1.4: version \"5.1.4\" resolved \"https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-5.1.4.tgz#cbdb447f281dcd107705e7fe8fbfc0b71db7610d\" integrity sha512-ROZ1ezYQUbq9b/07xYpHtZSyyhoUk3oTTGVAEr6bU1DKr8ELaz9fsDoHno34tKtHj/Tf3deQqfjQNGKdbRuvTw== vscode-json-languageservice@^5.2.0: version \"5.2.0\" resolved \"https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-5.2.0.tgz#884b7f108be4310e3332167c3ea60ab17f03418c\" integrity sha512-q8Rdhu2HEddRxvlhVqwh0cWmKK+OtyMB2xRhtqXEQ7cjb0iZ14madb90iJe9fCHPjoj9CGBrq6QzuOp8OE6XWg== dependencies: \"@vscode/l10n\" \"^0.0.11\" jsonc-parser \"^3.2.0\""} {"_id":"doc-en-vscode-8f4cf26c80774bdadeea3be1de3bf0d8c47e1cb1b596e184f85039aec06b4c2b","title":"","text":"} }; const collectSchemaSettings = (schemaSettings: JSONSchemaSettings[], folderUri?: Uri) => { for (const setting of schemaSettings) { const url = getSchemaId(setting, folderUri); if (url) { const schemaSetting: JSONSchemaSettings = { url, fileMatch: setting.fileMatch, folderUri: folderUri?.toString(false), schema: setting.schema }; schemas.push(schemaSetting); const collectSchemaSettings = (schemaSettings: JSONSchemaSettings[] | undefined, folderUri?: Uri) => { if (schemaSettings) { for (const setting of schemaSettings) { const url = getSchemaId(setting, folderUri); if (url) { const schemaSetting: JSONSchemaSettings = { url, fileMatch: setting.fileMatch, folderUri: folderUri?.toString(false), schema: setting.schema }; schemas.push(schemaSetting); } } } }; const globalSettings = workspace.getConfiguration('json', null).get('schemas'); if (Array.isArray(globalSettings)) { collectSchemaSettings(globalSettings); const schemaConfigInfo = workspace.getConfiguration('json', null).inspect('schemas'); if (schemaConfigInfo) { if (workspace.workspaceFile) { collectSchemaSettings(schemaConfigInfo.workspaceValue, workspace.workspaceFile); } collectSchemaSettings(schemaConfigInfo.globalValue); } const folders = workspace.workspaceFolders; if (folders) { for (const folder of folders) { const schemaConfigInfo = workspace.getConfiguration('json', folder.uri).inspect('schemas'); if (schemaConfigInfo && Array.isArray(schemaConfigInfo.workspaceFolderValue)) { collectSchemaSettings(schemaConfigInfo.workspaceFolderValue, folder.uri); } collectSchemaSettings(schemaConfigInfo?.workspaceFolderValue, folder.uri); } } return settings;"} {"_id":"doc-en-vscode-15c2def108e488797b4dc5669341cde40f43651a1ffee15bb96c9eee429bda68","title":"","text":"} }; const collectSchemaSettings = (schemaSettings: JSONSchemaSettings[] | undefined, folderUri?: Uri) => { const collectSchemaSettings = (schemaSettings: JSONSchemaSettings[] | undefined, folderUri: Uri | undefined = undefined, settingsLocation = folderUri) => { if (schemaSettings) { for (const setting of schemaSettings) { const url = getSchemaId(setting, folderUri); const url = getSchemaId(setting, settingsLocation); if (url) { const schemaSetting: JSONSchemaSettings = { url, fileMatch: setting.fileMatch, folderUri: folderUri?.toString(false), schema: setting.schema }; schemas.push(schemaSetting);"} {"_id":"doc-en-vscode-4ba95b7cc53ec8ce011a9d5f1f997bb6832de4afb7fd268e178eb30c70887a3c","title":"","text":"} }; const folders = workspace.workspaceFolders; const schemaConfigInfo = workspace.getConfiguration('json', null).inspect('schemas'); if (schemaConfigInfo) { if (workspace.workspaceFile) { collectSchemaSettings(schemaConfigInfo.workspaceValue, workspace.workspaceFile); if (schemaConfigInfo.workspaceValue && workspace.workspaceFile && folders && folders.length) { const settingsLocation = Uri.joinPath(workspace.workspaceFile, '..'); for (const folder of folders) { collectSchemaSettings(schemaConfigInfo.workspaceValue, folder.uri, settingsLocation); } } collectSchemaSettings(schemaConfigInfo.globalValue); } const folders = workspace.workspaceFolders; if (folders) { for (const folder of folders) { const schemaConfigInfo = workspace.getConfiguration('json', folder.uri).inspect('schemas');"} {"_id":"doc-en-vscode-0c269f4261b3a1958506a310f307faa246c34f6d882d92df022b5306c6c9f108","title":"","text":"return settings; } function getSchemaId(schema: JSONSchemaSettings, folderUri?: Uri): string | undefined { function getSchemaId(schema: JSONSchemaSettings, settingsLocation?: Uri): string | undefined { let url = schema.url; if (!url) { if (schema.schema) { url = schema.schema.id || `vscode://schemas/custom/${encodeURIComponent(hash(schema.schema).toString(16))}`; } } else if (folderUri && (url[0] === '.' || url[0] === '/')) { url = Uri.joinPath(folderUri, url).toString(false); } else if (settingsLocation && (url[0] === '.' || url[0] === '/')) { url = Uri.joinPath(settingsLocation, url).toString(false); } return url; }"} {"_id":"doc-en-vscode-def605a89f82d72b2c84b86d8cc890c22889bdd216c407002e20568fb3eeae58","title":"","text":"if (isWeb()) { // On web, treat absolute paths as pointing to standard lib files if (filepath.startsWith('/')) { return vscode.Uri.joinPath(this.context.extensionUri, 'node_modules', 'typescript', 'lib', filepath.slice(1)); return vscode.Uri.joinPath(this.context.extensionUri, 'dist', 'browser', 'typescript', filepath.slice(1)); } }"} {"_id":"doc-en-vscode-1ae6b742269e54f6f8d2a61021d548e9faacd1b2bea58b682304a81f832aeb03","title":"","text":"import { IWorkspaceTrustManagementService, IWorkspaceTrustRequestService, workspaceTrustToString } from 'vs/platform/workspace/common/workspaceTrust'; import { Extensions as WorkbenchExtensions, IWorkbenchContribution, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions'; import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle'; import { Codicon, registerCodicon } from 'vs/base/common/codicons'; import { Codicon } from 'vs/base/common/codicons'; import { ThemeColor } from 'vs/workbench/api/common/extHostTypes'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';"} {"_id":"doc-en-vscode-45a18462215e9a6decaa65ba4bd7305dcb9b877b44425e509f138d112afb048f","title":"","text":"import { LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID } from 'vs/workbench/contrib/extensions/common/extensions'; const BANNER_RESTRICTED_MODE = 'workbench.banner.restrictedMode'; const BANNER_VIRTUAL_WORKSPACE = 'workbench.banner.virtualWorkspace'; const BANNER_VIRTUAL_AND_RESTRICTED = 'workbench.banner.virtualAndRestricted'; const STARTUP_PROMPT_SHOWN_KEY = 'workspace.trust.startupPrompt.shown'; const BANNER_RESTRICTED_MODE_DISMISSED_KEY = 'workbench.banner.restrictedMode.dismissed'; const BANNER_VIRTUAL_WORKSPACE_DISMISSED_KEY = 'workbench.banner.virtualWorkspace.dismissed'; const infoIcon = registerCodicon('workspace-banner-warning-icon', Codicon.info); /* * Trust Request via Service UX handler"} {"_id":"doc-en-vscode-21c47bff26587ef14ebe0bd52d0b06888a06c919ea26a004f9cd71236b73290d","title":"","text":"break; case 'Manage': this.workspaceTrustRequestService.cancelRequest(); await this.commandService.executeCommand('workbench.trust.manage'); await this.commandService.executeCommand(MANAGE_TRUST_COMMAND_ID); break; case 'Cancel': this.workspaceTrustRequestService.cancelRequest();"} {"_id":"doc-en-vscode-00cf4020bd212d17b5d2747bc81694c9f9378cf986ede8fe5ad2cb8c251c1c3b","title":"","text":"this.statusbarService.updateEntryVisibility(this.entryId, false); } private getBannerItem(isInVirtualWorkspace: boolean, restrictedMode: boolean): IBannerItem | undefined { private getBannerItem(restrictedMode: boolean): IBannerItem | undefined { const dismissedVirtual = this.storageService.getBoolean(BANNER_VIRTUAL_WORKSPACE_DISMISSED_KEY, StorageScope.WORKSPACE, false); const dismissedRestricted = this.storageService.getBoolean(BANNER_RESTRICTED_MODE_DISMISSED_KEY, StorageScope.WORKSPACE, false); // all important info has been dismissed if (dismissedVirtual && dismissedRestricted) { return undefined; } // don't show restricted mode only banner if (dismissedRestricted && !isInVirtualWorkspace) { // info has been dismissed if (dismissedRestricted) { return undefined; } // don't show virtual workspace only banner if (dismissedVirtual && !restrictedMode) { return undefined; } const choose = (virtual: any, restricted: any, virtualAndRestricted: any) => { return (isInVirtualWorkspace && !dismissedVirtual) && (restrictedMode && !dismissedRestricted) ? virtualAndRestricted : ((isInVirtualWorkspace && !dismissedVirtual) ? virtual : restricted); }; const id = choose(BANNER_VIRTUAL_WORKSPACE, BANNER_RESTRICTED_MODE, BANNER_VIRTUAL_AND_RESTRICTED); const icon = choose(infoIcon, shieldIcon, infoIcon); const [virtualAriaLabel, restrictedModeAriaLabel, virtualAndRestrictedModeAriaLabel] = this.getBannerItemAriaLabels(); const ariaLabel = choose(virtualAriaLabel, restrictedModeAriaLabel, virtualAndRestrictedModeAriaLabel); const [virtualMessage, restrictedModeMessage, virtualAndRestrictedModeMessage] = this.getBannerItemMessages(); const message = choose(virtualMessage, restrictedModeMessage, virtualAndRestrictedModeMessage); const actions = choose( [ { label: localize('virtualBannerLearnMore', \"Learn More\"), href: 'https://aka.ms/vscode-virtual-workspaces' } ], const actions = [ { label: localize('restrictedModeBannerManage', \"Manage\"), href: 'command:workbench.trust.manage' href: 'command:' + MANAGE_TRUST_COMMAND_ID }, { label: localize('restrictedModeBannerLearnMore', \"Learn More\"), href: 'https://aka.ms/vscode-workspace-trust' } ], [ { label: localize('virtualAndRestrictedModeBannerManage', \"Manage Trust\"), href: 'command:workbench.trust.manage' }, { label: localize('virtualBannerLearnMore', \"Learn More\"), href: 'https://aka.ms/vscode-virtual-workspaces' } ] ); ]; return { id, icon, ariaLabel, message, id: BANNER_RESTRICTED_MODE, icon: shieldIcon, ariaLabel: this.getBannerItemAriaLabels(), message: this.getBannerItemMessages(), actions, onClose: () => { if (isInVirtualWorkspace) { this.storageService.store(BANNER_VIRTUAL_WORKSPACE_DISMISSED_KEY, true, StorageScope.WORKSPACE, StorageTarget.MACHINE); } if (restrictedMode) { this.storageService.store(BANNER_RESTRICTED_MODE_DISMISSED_KEY, true, StorageScope.WORKSPACE, StorageTarget.MACHINE); }"} {"_id":"doc-en-vscode-c50882dd183f1786c6eef8e319210882a8e5dec7c7f9a68c8d54c202237520d7","title":"","text":"}; } private getBannerItemAriaLabels(): [string, string, string] { private getBannerItemAriaLabels(): string { switch (this.workspaceContextService.getWorkbenchState()) { case WorkbenchState.EMPTY: return [ localize('virtualBannerAriaLabelWindow', \"Some features are not available because the current window is backed by a virtual file system. Use navigation keys to access banner actions.\"), localize('restrictedModeBannerAriaLabelWindow', \"Restricted Mode is intended for safe code browsing. Trust this window to enable all features. Use navigation keys to access banner actions.\"), localize('virtualAndRestrictedModeBannerAriaLabelWindow', \"Some features are not available because the current window is backed by a virtual file system and is not trusted. You can trust this window to enable some of these features. Use navigation keys to access banner actions.\") ]; return localize('restrictedModeBannerAriaLabelWindow', \"Restricted Mode is intended for safe code browsing. Trust this window to enable all features. Use navigation keys to access banner actions.\"); case WorkbenchState.FOLDER: return [ localize('virtualBannerAriaLabelFolder', \"Some features are not available because the current folder is backed by a virtual file system. Use navigation keys to access banner actions.\"), localize('restrictedModeBannerAriaLabelFolder', \"Restricted Mode is intended for safe code browsing. Trust this folder to enable all features. Use navigation keys to access banner actions.\"), localize('virtualAndRestrictedModeBannerAriaLabelFolder', \"Some features are not available because the current folder is backed by a virtual file system and is not trusted. You can trust this folder to enable some of these features. Use navigation keys to access banner actions.\") ]; return localize('restrictedModeBannerAriaLabelFolder', \"Restricted Mode is intended for safe code browsing. Trust this folder to enable all features. Use navigation keys to access banner actions.\"); case WorkbenchState.WORKSPACE: return [ localize('virtualBannerAriaLabelWorkspace', \"Some features are not available because the current workspace is backed by a virtual file system. Use navigation keys to access banner actions.\"), localize('restrictedModeBannerAriaLabelWorkspace', \"Restricted Mode is intended for safe code browsing. Trust this workspace to enable all features. Use navigation keys to access banner actions.\"), localize('virtualAndRestrictedModeBannerAriaLabelWorkspace', \"Some features are not available because the current workspace is backed by a virtual file system and is not trusted. You can trust this workspace to enable some of these features. Use navigation keys to access banner actions.\") ]; return localize('restrictedModeBannerAriaLabelWorkspace', \"Restricted Mode is intended for safe code browsing. Trust this workspace to enable all features. Use navigation keys to access banner actions.\"); } } private getBannerItemMessages(): [string, string, string] { private getBannerItemMessages(): string { switch (this.workspaceContextService.getWorkbenchState()) { case WorkbenchState.EMPTY: return [ localize('virtualBannerMessageWindow', \"Some features are not available because the current workspace is backed by a virtual file system.\"), localize('restrictedModeBannerMessageWindow', \"Restricted Mode is intended for safe code browsing. Trust this window to enable all features.\"), localize('virtualAndRestrictedModeBannerMessageWindow', \"Some features are not available because the current window is backed by a virtual file system and is not trusted. You can trust this window to enable some of these features.\") ]; return localize('restrictedModeBannerMessageWindow', \"Restricted Mode is intended for safe code browsing. Trust this window to enable all features.\"); case WorkbenchState.FOLDER: return [ localize('virtualBannerMessageFolder', \"Some features are not available because the current folder is backed by a virtual file system.\"), localize('restrictedModeBannerMessageFolder', \"Restricted Mode is intended for safe code browsing. Trust this folder to enable all features.\"), localize('virtualAndRestrictedModeBannerMessageFolder', \"Some features are not available because the current folder is backed by a virtual file system and is not trusted. You can trust this folder to enable some of these features.\") ]; return localize('restrictedModeBannerMessageFolder', \"Restricted Mode is intended for safe code browsing. Trust this folder to enable all features.\"); case WorkbenchState.WORKSPACE: return [ localize('virtualBannerMessageWorkspace', \"Some features are not available because the current workspace is backed by a virtual file system.\"), localize('restrictedModeBannerMessageWorkspace', \"Restricted Mode is intended for safe code browsing. Trust this workspace to enable all features.\"), localize('virtualAndRestrictedModeBannerMessageWorkspace', \"Some features are not available because the current workspace is backed by a virtual file system and is not trusted. You can trust this workspace to enable some of these features.\") ]; return localize('restrictedModeBannerMessageWorkspace', \"Restricted Mode is intended for safe code browsing. Trust this workspace to enable all features.\"); } }"} {"_id":"doc-en-vscode-7327b4a48eac7c15d78d49e287a95ca956fe50ced84ea5a10fb724945765e2c6","title":"","text":"text: trusted ? `$(shield)` : `$(shield) ${text}`, ariaLabel: ariaLabel, tooltip: toolTip, command: 'workbench.trust.manage', command: MANAGE_TRUST_COMMAND_ID, backgroundColor, color };"} {"_id":"doc-en-vscode-94ffcb7a411ceccc6c0f53724cc6ba9adb2952fe9c995812700ca52db0c998c4","title":"","text":"} private updateWorkbenchIndicators(trusted: boolean): void { const isInVirtualWorkspace = isVirtualWorkspace(this.workspaceContextService.getWorkspace()); const isEmptyWorkspace = this.workspaceContextService.getWorkbenchState() === WorkbenchState.EMPTY; const bannerItem = this.getBannerItem(isInVirtualWorkspace, !trusted); const bannerItem = this.getBannerItem(!trusted); if (!isEmptyWorkspace || this.showIndicatorsInEmptyWindow) { this.updateStatusbarEntry(trusted); if (bannerItem) { if (!isInVirtualWorkspace) { if (!trusted) { this.bannerService.show(bannerItem); } else { this.bannerService.hide(BANNER_RESTRICTED_MODE); } } else { if (!trusted) { this.bannerService.show(bannerItem); } else { this.bannerService.hide(BANNER_RESTRICTED_MODE); } } }"} {"_id":"doc-en-vscode-9b00584359cb0c1108cabb7cb17fd71dde5f6bc80a525c33991cef08facfebad","title":"","text":"[ConsolidatedRunButton]: { description: nls.localize('notebook.consolidatedRunButton.description', \"Control whether extra actions are shown in a dropdown next to the run button.\"), type: 'boolean', default: true, default: false, tags: ['notebookLayout'] }, [NotebookCellEditorOptionsCustomizations]: editorOptionsCustomizationSchema"} {"_id":"doc-en-vscode-c24652f9284a8d6f23fd5925a815a5b712f5f6fc05fdf299c0118ebf400c5045","title":"","text":"[ localize('untrustedTasks', \"Tasks are disabled\"), localize('untrustedDebugging', \"Debugging is disabled\"), localize('untrustedExtensions', \"[{0} extensions](command:{1}) are disabled or have limited functionality\", numExtensions, LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID) localize('untrustedExtensions', \"[{0} extensions]({1}) are disabled or have limited functionality\", numExtensions, `command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`) ] : [ localize('untrustedTasks', \"Tasks are disabled\"), localize('untrustedDebugging', \"Debugging is disabled\"), numSettings ? localize('untrustedSettings', \"[{0} workspace settings](command:{1}) are not applied\", numSettings, 'settings.filterUntrusted') : localize('no untrustedSettings', \"Workspace settings requiring trust are not applied\"), localize('untrustedExtensions', \"[{0} extensions](command:{1}) are disabled or have limited functionality\", numExtensions, LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID) numSettings ? localize('untrustedSettings', \"[{0} workspace settings]({1}) are not applied\", numSettings, 'command:settings.filterUntrusted') : localize('no untrustedSettings', \"Workspace settings requiring trust are not applied\"), localize('untrustedExtensions', \"[{0} extensions]({1}) are disabled or have limited functionality\", numExtensions, `command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`) ]; this.renderLimitationsListElement(untrustedContainer, untrustedContainerItems, xListIcon.classNamesArray);"} {"_id":"doc-en-vscode-5456ca84f37ec6a68271ec5823fc7e01fc33f5bc283afd0a13c8218f014f225e","title":"","text":"import { disposableTimeout, Throttler } from 'vs/base/common/async'; import { CancellationTokenSource } from 'vs/base/common/cancellation'; import { Disposable, toDisposable } from 'vs/base/common/lifecycle'; import { ICellVisibilityChangeEvent, NotebookVisibleCellObserver } from 'vs/workbench/contrib/notebook/browser/contrib/statusBar/notebookVisibleCellObserver'; import { NotebookVisibleCellObserver } from 'vs/workbench/contrib/notebook/browser/contrib/statusBar/notebookVisibleCellObserver'; import { ICellViewModel, INotebookEditor, INotebookEditorContribution } from 'vs/workbench/contrib/notebook/browser/notebookBrowser'; import { registerNotebookContribution } from 'vs/workbench/contrib/notebook/browser/notebookEditorExtensions'; import { NotebookViewModel } from 'vs/workbench/contrib/notebook/browser/viewModel/notebookViewModel'; import { CellViewModel, NotebookViewModel } from 'vs/workbench/contrib/notebook/browser/viewModel/notebookViewModel'; import { INotebookCellStatusBarService } from 'vs/workbench/contrib/notebook/common/notebookCellStatusBarService'; import { INotebookCellStatusBarItemList } from 'vs/workbench/contrib/notebook/common/notebookCommon';"} {"_id":"doc-en-vscode-adf77a60671b7374cec9de1db29f462aa22e724482ec6d7c23dc5b1c270a783c","title":"","text":"} private _updateEverything(): void { this._visibleCells.forEach(cell => cell.dispose()); this._visibleCells.clear(); this._updateVisibleCells({ added: this._observer.visibleCells, removed: [] }); const newCells = this._observer.visibleCells.filter(cell => !this._visibleCells.has(cell.handle)); const visibleCellHandles = new Set(this._observer.visibleCells.map(item => item.handle)); const currentCellHandles = Array.from(this._visibleCells.keys()); const removedCells = currentCellHandles.filter(handle => !visibleCellHandles.has(handle)); const itemsToUpdate = currentCellHandles.filter(handle => visibleCellHandles.has(handle)); this._updateVisibleCells({ added: newCells, removed: removedCells.map(handle => ({ handle })) }); itemsToUpdate.forEach(handle => this._visibleCells.get(handle)?.update()); } private _updateVisibleCells(e: ICellVisibilityChangeEvent): void { private _updateVisibleCells(e: { added: CellViewModel[]; removed: { handle: number }[]; }): void { const vm = this._notebookEditor.viewModel; if (!vm) { return;"} {"_id":"doc-en-vscode-57ee8029513f313f1d2fb20dd5d9d0ad5068769a3846e17765d7cb0966048b2b","title":"","text":"this._register(this._cell.model.onDidChangeOutputs(() => this._updateSoon())); } public update(): void { this._updateSoon(); } private _updateSoon(): void { // Wait a tick to make sure that the event is fired to the EH before triggering status bar providers this._register(disposableTimeout(() => {"} {"_id":"doc-en-vscode-97c41061390cb376853acb2a2f0e1c9e8f89d652387183f1f909e2eb365052e5","title":"","text":"override dispose() { super.dispose(); this._activeToken?.dispose(true); this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds, [{ handle: this._cell.handle, items: [] }]); this._currentItemLists.forEach(itemList => itemList.dispose && itemList.dispose());"} {"_id":"doc-en-vscode-2173b4f32918bf62f640f20889145e694c8ba428b7c9f3becb79ddb7d3c4bc36","title":"","text":"import { IEditorContribution } from 'vs/editor/common/editorCommon'; import { ITextModel } from 'vs/editor/common/model'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; import { basename } from 'vs/base/common/resources'; const ignoreUnusualLineTerminators = 'ignoreUnusualLineTerminators';"} {"_id":"doc-en-vscode-526542d6375fd6e3509de4c68cefe2bd9e400d51205c52495c1cecca24b57114","title":"","text":"const result = await this._dialogService.confirm({ title: nls.localize('unusualLineTerminators.title', \"Unusual Line Terminators\"), message: nls.localize('unusualLineTerminators.message', \"Detected unusual line terminators\"), detail: nls.localize('unusualLineTerminators.detail', \"This file contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).nnIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.\"), primaryButton: nls.localize('unusualLineTerminators.fix', \"Fix this file\"), secondaryButton: nls.localize('unusualLineTerminators.ignore', \"Ignore problem for this file\") detail: nls.localize('unusualLineTerminators.detail', \"The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).nnIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.\", basename(model.uri)), primaryButton: nls.localize('unusualLineTerminators.fix', \"Remove Unusual Line Terminators\"), secondaryButton: nls.localize('unusualLineTerminators.ignore', \"Ignore\") }); if (!result.confirmed) {"} {"_id":"doc-en-vscode-0f7744111ec32ac745200d0e49c4d3b8ac69f99a2c77780830ec24d6d8eb67aa","title":"","text":"import { ExtHostDocuments } from 'vs/workbench/api/common/extHostDocuments'; import * as extHostTypeConverter from 'vs/workbench/api/common/extHostTypeConverters'; import * as types from 'vs/workbench/api/common/extHostTypes'; import { checkProposedApiEnabled } from 'vs/workbench/services/extensions/common/extensions'; import type * as vscode from 'vscode'; import { ExtHostCommentsShape, IMainContext, MainContext, CommentThreadChanges, CommentChanges } from './extHost.protocol'; import { ExtHostCommands } from './extHostCommands';"} {"_id":"doc-en-vscode-d5d0d6e5d28f62bf69a3e079767722d25a8ea8295e39676d9da46e02a82cba12","title":"","text":"private _state?: vscode.CommentThreadState; get state(): vscode.CommentThreadState { checkProposedApiEnabled(this.extensionDescription, 'commentsResolvedState'); return this._state!; } set state(newState: vscode.CommentThreadState) { checkProposedApiEnabled(this.extensionDescription, 'commentsResolvedState'); this._state = newState; this.modifications.state = newState; this._onDidUpdateCommentThread.fire();"} {"_id":"doc-en-vscode-9767618989df8eb7db4b7a2bf5b4405d019ba8a9baaf43ada276c12801db7892","title":"","text":"export const allApiProposals = Object.freeze({ authSession: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.authSession.d.ts', codiconDecoration: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.codiconDecoration.d.ts', commentsResolvedState: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.commentsResolvedState.d.ts', contribCommentEditorActionsMenu: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribCommentEditorActionsMenu.d.ts', contribCommentPeekContext: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribCommentPeekContext.d.ts', contribCommentThreadAdditionalMenu: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribCommentThreadAdditionalMenu.d.ts',"} {"_id":"doc-en-vscode-e211fbd32416757e495c74ca1f223b98a00b7e9b058819e2314fea32d5e49c41","title":"","text":"} /** * The state of a comment thread. */ export enum CommentThreadState { Unresolved = 0, Resolved = 1 } /** * A collection of {@link Comment comments} representing a conversation at a particular range in a document. */ export interface CommentThread {"} {"_id":"doc-en-vscode-8ed41996c31606d89abd9d0087660ccdcfe91e31eae96bf61c5f38bc5f8a2e87","title":"","text":"label?: string; /** * The optional state of a comment thread, which may affect how the comment is displayed. */ state?: CommentThreadState; /** * Dispose this comment thread. * * Once disposed, this comment thread will be removed from visible editors and Comment Panel when appropriate."} {"_id":"doc-en-vscode-cfad4513858c3c355cd2703263af128cbff813d8d45c8cb701d068a837948de4","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 'vscode' { // https://github.com/microsoft/vscode/issues/127473 /** * The state of a comment thread. */ export enum CommentThreadState { Unresolved = 0, Resolved = 1 } export interface CommentThread { /** * The optional state of a comment thread, which may affect how the comment is displayed. */ state?: CommentThreadState; } } "} {"_id":"doc-en-vscode-ab232485014b80355477aa850a8d45a0fe042b499c2061254c0f8ff03126c3db","title":"","text":"} else { this._onDidChangeViewWelcomeState.fire(); } if (!this._terminalService.activeInstance?.shellLaunchConfig.extHostTerminalId) { // showPanel is already called with !preserveFocus // when extension host terminals are created this._terminalGroupService.showPanel(true); } // we don't know here whether or not it should be focused, so // defer focusing the panel to the focus() call // to prevent overriding preserveFocus for extensions this._terminalGroupService.showPanel(false); if (hadTerminals) { this._terminalGroupService.activeGroup?.setVisible(visible); }"} {"_id":"doc-en-vscode-b7b7ba26ce529097207afeebbd32a545f085002ff97d030a237627f97e57c383","title":"","text":"// Only focus the terminal if the activeElement has not changed since focus() was called // TODO hack if (document.activeElement === activeElement) { this._focus(); this._terminalGroupService.showPanel(true); } })); return; } this._focus(); } private _focus() { this._terminalService.activeInstance?.focusWhenReady(); this._terminalGroupService.showPanel(true); } override shouldShowWelcome(): boolean {"} {"_id":"doc-en-vscode-c1c45fc5f2ee2fdb0edc03dcc1da3e14ac465899ce61607dadc8083923b909f2","title":"","text":"globalStorageHome: URI; workspaceStorageHome: URI; useHostProxy?: boolean; skipWorkspaceStorageLock?: boolean; } export interface IStaticWorkspaceData {"} {"_id":"doc-en-vscode-103708b467ed3a365ba4baf90934c97f322ab1e5cce0e5f639fe69b8922def24","title":"","text":"return workspaceStorageURI; } if (this._environment.skipWorkspaceStorageLock) { this._logService.info(`Skipping acquiring lock for ${workspaceStorageURI.fsPath}.`); return workspaceStorageURI; } const workspaceStorageBase = workspaceStorageURI.fsPath; let attempt = 0; do {"} {"_id":"doc-en-vscode-5db20d3f1d049b3e525fcc955c2367ec7c31a3ea7707614ec021ef77f3340aea","title":"","text":"} // Run Extension Host as fork of current process this._extensionHostProcess = fork(FileAccess.asFileUri('bootstrap-fork', require).fsPath, ['--type=extensionHost'], opts); this._extensionHostProcess = fork(FileAccess.asFileUri('bootstrap-fork', require).fsPath, ['--type=extensionHost', '--skipWorkspaceStorageLock'], opts); // Catch all output coming from the extension host process type Output = { data: string, format: string[] };"} {"_id":"doc-en-vscode-c69815ea1d23f6bffc7218cca544bcc93c0ec89409d98138303802556df831dc","title":"","text":"import { realpath } from 'vs/base/node/extpath'; import { IHostUtils } from 'vs/workbench/api/common/extHostExtensionService'; import { RunOnceScheduler } from 'vs/base/common/async'; import { boolean } from 'vs/editor/common/config/editorOptions'; import 'vs/workbench/api/common/extHost.common.services'; import 'vs/workbench/api/node/extHost.node.services'; interface ParsedExtHostArgs { uriTransformerPath?: string; skipWorkspaceStorageLock?: boolean; useHostProxy?: string; }"} {"_id":"doc-en-vscode-7e4d47ba0410eb4f1802696795afa14aff4ac50b4701eaddbd66dae86ba23acf","title":"","text":"string: [ 'uriTransformerPath', 'useHostProxy' ], boolean: [ 'skipWorkspaceStorageLock' ] }) as ParsedExtHostArgs;"} {"_id":"doc-en-vscode-bb23b36570613b8765a53e81a14527fdf09e3b946b651aaef55cb148eb8a9d65","title":"","text":"// setup things patchProcess(!!initData.environment.extensionTestsLocationURI); // to support other test frameworks like Jasmin that use process.exit (https://github.com/microsoft/vscode/issues/37708) initData.environment.useHostProxy = args.useHostProxy !== undefined ? args.useHostProxy !== 'false' : undefined; initData.environment.skipWorkspaceStorageLock = boolean(args.skipWorkspaceStorageLock, false); // host abstraction const hostUtils = new class NodeHost implements IHostUtils {"} {"_id":"doc-en-vscode-21c35d0d196a652012df6400a79221dd676b31ee83694708419ac9c6efad23b4","title":"","text":"const editorInput = InteractiveEditorInput.create(accessor.get(IInstantiationService), notebookUri, inputUri); historyService.clearHistory(notebookUri); await editorService.openEditor(editorInput, editorOptions, group); await editorService.openEditor(editorInput, { ...editorOptions, pinned: true }, group); // Extensions must retain references to these URIs to manipulate the interactive editor return { notebookUri, inputUri }; }"} {"_id":"doc-en-vscode-f0324e639ed225e2e86e352fdefeb6b004d49ea0b365879f1c666d1a3951c300","title":"","text":"if (args.verbose) { fancyLog(`${ansiColors.magenta('BuiltIn extensions')}: ${dedupedBuiltInExtensions.map(e => path.basename(e.extensionPath)).join(', ')}`); fancyLog(`${ansiColors.magenta('Additional extensions')}: ${additionalBuiltinExtensions.map(e => path.basename(e.extensionLocation.path)).join(', ') || 'None'}`); fancyLog(`${ansiColors.magenta('Additional extensions')}: ${additionalBuiltinExtensions.map(e => path.basename(e.path)).join(', ') || 'None'}`); } const secondaryHost = ("} {"_id":"doc-en-vscode-fcb3133adfcd0aabf198f292b896848fc766d7744789f28bce27966ddaac9f86","title":"","text":"import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { XtermLinkMatcherHandler } from 'vs/workbench/contrib/terminal/browser/links/terminalLinkManager'; import { TerminalBaseLinkProvider } from 'vs/workbench/contrib/terminal/browser/links/terminalBaseLinkProvider'; import { normalize } from 'vs/base/common/path'; import { normalize, isAbsolute } from 'vs/base/common/path'; import { convertLinkRangeToBuffer, getXtermLineContent } from 'vs/workbench/contrib/terminal/browser/links/terminalLinkHelpers'; import { isWindows } from 'vs/base/common/platform'; import { IFileService } from 'vs/platform/files/common/files'; import { URI } from 'vs/base/common/uri'; import { Schemas } from 'vs/base/common/network'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; const MAX_LENGTH = 2000;"} {"_id":"doc-en-vscode-03309347250162cfbea147ac601743128306a510ab15ef9ca8f73b30b22c2552","title":"","text":"@IQuickInputService private readonly _quickInputService: IQuickInputService, @IWorkspaceContextService private readonly _workspaceContextService: IWorkspaceContextService, @ISearchService private readonly _searchService: ISearchService, @IEditorService private readonly _editorService: IEditorService @IEditorService private readonly _editorService: IEditorService, @IFileService private readonly _fileService: IFileService, @IWorkbenchEnvironmentService private readonly _environmentService: IWorkbenchEnvironmentService ) { super(); }"} {"_id":"doc-en-vscode-2df1d60d5a51e2a1b00814db020711e2ff3bbfde29c1c9ea57a6b1d945db70db","title":"","text":"} private async _activate(link: string) { // Normalize the link and remove any leading ./ or ../ since quick access doesn't understand // that format // Remove file:/// and any leading ./ or ../ since quick access doesn't understand that format link = link.replace(/^file:///?/, ''); link = normalize(link).replace(/^(.+[/])+/, ''); // Remove `:in` from the end which is how Ruby outputs stack traces"} {"_id":"doc-en-vscode-b26e935efb400f0512ab12d2f4bbea2201f0b312bfa21175a85c41a82ecd4549","title":"","text":"}); const sanitizedLink = link.replace(/:d+(:d+)?$/, ''); const results = await this._searchService.fileSearch( this._fileQueryBuilder.file(this._workspaceContextService.getWorkspace().folders, { // Remove optional :row:col from the link as openEditor supports it filePattern: sanitizedLink, maxResults: 2 }) ); // If there was exactly one match, open it if (results.results.length === 1) { let exactMatch = await this._getExactMatch(sanitizedLink, link); if (exactMatch) { // If there was exactly one match, open it const match = link.match(/:(d+)?(:(d+))?$/); const startLineNumber = match?.[1]; const startColumn = match?.[3]; await this._editorService.openEditor({ resource: results.results[0].resource, resource: exactMatch, options: { pinned: true, revealIfOpened: true,"} {"_id":"doc-en-vscode-163a1493e750518b972dd6840fd369200b9b5c9d8353c857d7d180258e09446d","title":"","text":"}); return; } // Fallback to searching quick access this._quickInputService.quickAccess.show(link); return this._quickInputService.quickAccess.show(link); } private async _getExactMatch(sanitizedLink: string, link: string): Promise { let exactResource: URI | undefined; if (isAbsolute(sanitizedLink)) { const scheme = this._environmentService.remoteAuthority ? Schemas.vscodeRemote : Schemas.file; const resource = URI.from({ scheme, path: sanitizedLink }); const fileStat = await this._fileService.resolve(resource); if (fileStat.isFile) { exactResource = resource; } } if (!exactResource) { const results = await this._searchService.fileSearch( this._fileQueryBuilder.file(this._workspaceContextService.getWorkspace().folders, { // Remove optional :row:col from the link as openEditor supports it filePattern: sanitizedLink, maxResults: 2 }) ); if (results.results.length === 1) { exactResource = results.results[0].resource; } } return exactResource; } }"} {"_id":"doc-en-vscode-bc1071d792ad637592e1e60e0613582c6fa499fbe84e3be3524acfe48c14c78c","title":"","text":"await configurationService.setUserConfiguration('terminal', { integrated: { wordSeparators: ' ' } }); await assertLink('', []); }); test('should support file scheme links', async () => { await configurationService.setUserConfiguration('terminal', { integrated: { wordSeparators: ' ' } }); await assertLink('file:///C:/users/test/file.txt ', [{ range: [[1, 1], [30, 1]], text: 'file:///C:/users/test/file.txt' }]); await assertLink('file:///C:/users/test/file.txt:1:10 ', [{ range: [[1, 1], [35, 1]], text: 'file:///C:/users/test/file.txt:1:10' }]); }); });"} {"_id":"doc-en-vscode-0255b4d9e556fdd318193ba855d5788e70dea6687ff29f555324d62b9020a8dc","title":"","text":"} if (e.element instanceof InstructionBreakpoint) { const disassemblyView = await this.editorService.openEditor(DisassemblyViewInput.instance); (disassemblyView as DisassemblyView).goToAddress(e.element.instructionReference); // Focus on double click (disassemblyView as DisassemblyView).goToAddress(e.element.instructionReference, e.browserEvent instanceof MouseEvent && e.browserEvent.detail === 2); } if (e.browserEvent instanceof MouseEvent && e.browserEvent.detail === 2 && e.element instanceof FunctionBreakpoint && e.element !== this.inputBoxData?.breakpoint) { // double click"} {"_id":"doc-en-vscode-f0f1b8683e686e36c7d1350e38386fb55051becf6374f31b17aaa4de7ea94d62","title":"","text":"multipleSelectionSupport: false, setRowLineHeight: false, openOnSingleClick: false, accessibilityProvider: new AccessibilityProvider() accessibilityProvider: new AccessibilityProvider(), mouseSupport: false } )) as WorkbenchTable;"} {"_id":"doc-en-vscode-28adc0b0c99beba28ac7f948d4dde05bd3e6c82086007c1467bec347394addd0","title":"","text":"/** * Go to the address provided. If no address is provided, reveal the address of the currently focused stack frame. */ goToAddress(address?: string): void { goToAddress(address?: string, focus?: boolean): void { if (!this._disassembledInstructions) { return; }"} {"_id":"doc-en-vscode-a4fea3101424d3a9d219e0eeebb9737a372bb84c99ebf417f21cc09c425d61f3","title":"","text":"const bottomElement = Math.floor((this._disassembledInstructions.scrollTop + this._disassembledInstructions.renderHeight) / this.fontInfo.lineHeight); if (index > topElement && index < bottomElement) { // Inside the viewport, don't do anything here return; } else if (index <= topElement && index > topElement - 5) { // Not too far from top, review it at the top return this._disassembledInstructions.reveal(index, 0); this._disassembledInstructions.reveal(index, 0); } else if (index >= bottomElement && index < bottomElement + 5) { // Not too far from bottom, review it at the bottom return this._disassembledInstructions.reveal(index, 1); this._disassembledInstructions.reveal(index, 1); } else { // Far from the current viewport, reveal it return this._disassembledInstructions.reveal(index, 0.5); this._disassembledInstructions.reveal(index, 0.5); } if (focus) { this._disassembledInstructions.domFocus(); this._disassembledInstructions.setFocus([index]); } } else if (this._debugService.state === State.Stopped) { // Address is not provided or not in the table currently, clear the table // and reload if we are in the state where we can load disassembly. return this.reloadDisassembly(address); this.reloadDisassembly(address); } }"} {"_id":"doc-en-vscode-d1fe484a34d903646882ec1392c98847f36d0a98dec2cf17953d02013bf67c60","title":"","text":"this.loadDisassembledInstructions(targetAddress, -DisassemblyView.NUM_INSTRUCTIONS_TO_LOAD, DisassemblyView.NUM_INSTRUCTIONS_TO_LOAD * 2).then(() => { // on load, set the target instruction in the middle of the page. if (this._disassembledInstructions!.length > 0) { this._disassembledInstructions!.reveal(Math.floor(this._disassembledInstructions!.length / 2), 0.5); const targetIndex = Math.floor(this._disassembledInstructions!.length / 2); this._disassembledInstructions!.reveal(targetIndex, 0.5); // Always focus the target address on reload, or arrow key navigation would look terrible this._disassembledInstructions!.domFocus(); this._disassembledInstructions!.setFocus([targetIndex]); } }); }"} {"_id":"doc-en-vscode-670735a3b267cc14e7675e2f21093f25e8122c0f9be54cac0587fc9346fe4158","title":"","text":"// Without formatting we still need to support the separator // as provided in options (https://github.com/microsoft/vscode/issues/130019) if (!formatting && options.separator) { switch (options.separator) { case paths.win32.sep: return paths.win32.normalize(label); case paths.posix.sep: return paths.posix.normalize(label); } return label.replace(sepRegexp, options.separator); } return label;"} {"_id":"doc-en-vscode-5f21f1084f95e331a9910334aca73feac42a3f2d46814a7728cfd12533ab2161","title":"","text":"assert.strictEqual(generated, label); }); }); test('relative label with explicit path separator', () => { let generated = labelService.getUriLabel(URI.parse('myscheme://myauthority/some/folder/test.txt'), { relative: true, separator: '/' }); assert.strictEqual(generated, 'some/folder/test.txt'); generated = labelService.getUriLabel(URI.parse('myscheme://myauthority/some/folder/test.txt'), { relative: true, separator: '' }); assert.strictEqual(generated, 'somefoldertest.txt'); }); });"} {"_id":"doc-en-vscode-5d970e8195b180bbf215ee6cca0a48ac81cdec5d0de336dba5324cb35825e111","title":"","text":"} .monaco-editor .find-widget .button { width: 20px; height: 20px; width: 16px; height: 16px; padding: 3px; border-radius: 5px; display: flex; flex: initial; margin-left: 3px;"} {"_id":"doc-en-vscode-557ff302c11c782da3d60c28287fed657d3736593959aca8db4a1d95591cf037","title":"","text":"justify-content: center; } /* find in selection button */ .monaco-editor .find-widget .codicon-find-selection { width: 22px; height: 22px; padding: 3px; border-radius: 5px; } .monaco-editor .find-widget .button.left { margin-left: 0; margin-right: 3px;"} {"_id":"doc-en-vscode-7de46fca829ee2d7b0a900af2b0bbe475dea8b96355f9c0fd4e0d98d8bb924c5","title":"","text":"import { FindReplaceState, FindReplaceStateChangedEvent } from 'vs/editor/contrib/find/findState'; import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { contrastBorder, editorFindMatch, editorFindMatchBorder, editorFindMatchHighlight, editorFindMatchHighlightBorder, editorFindRangeHighlight, editorFindRangeHighlightBorder, editorWidgetBackground, editorWidgetBorder, editorWidgetResizeBorder, errorForeground, inputActiveOptionBorder, inputActiveOptionBackground, inputActiveOptionForeground, inputBackground, inputBorder, inputForeground, inputValidationErrorBackground, inputValidationErrorBorder, inputValidationErrorForeground, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationInfoForeground, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationWarningForeground, widgetShadow, editorWidgetForeground, focusBorder } from 'vs/platform/theme/common/colorRegistry'; import { contrastBorder, editorFindMatch, editorFindMatchBorder, editorFindMatchHighlight, editorFindMatchHighlightBorder, editorFindRangeHighlight, editorFindRangeHighlightBorder, editorWidgetBackground, editorWidgetBorder, editorWidgetResizeBorder, errorForeground, inputActiveOptionBorder, inputActiveOptionBackground, inputActiveOptionForeground, inputBackground, inputBorder, inputForeground, inputValidationErrorBackground, inputValidationErrorBorder, inputValidationErrorForeground, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationInfoForeground, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationWarningForeground, widgetShadow, editorWidgetForeground, focusBorder, toolbarHoverBackground } from 'vs/platform/theme/common/colorRegistry'; import { IColorTheme, IThemeService, registerThemingParticipant, ThemeIcon } from 'vs/platform/theme/common/themeService'; import { ContextScopedFindInput, ContextScopedReplaceInput } from 'vs/platform/browser/contextScopedHistoryWidget'; import { AccessibilitySupport } from 'vs/platform/accessibility/common/accessibility';"} {"_id":"doc-en-vscode-801bc2a0227f79dc246ecfd6c3897d4c9accbaba94ba536e2ea51e2b1cec4bb5","title":"","text":"} } // Action bars const toolbarHoverBackgroundColor = theme.getColor(toolbarHoverBackground); if (toolbarHoverBackgroundColor) { collector.addRule(` .monaco-editor .find-widget .button:not(.disabled):hover, .monaco-editor .find-widget .codicon-find-selection:hover { background-color: ${toolbarHoverBackgroundColor} !important; } `); } // This rule is used to override the outline color for synthetic-focus find input. const focusOutline = theme.getColor(focusBorder); if (focusOutline) {"} {"_id":"doc-en-vscode-6cfdc6ccfa7a44a8b199b3277d3e9ffb00969b42846a80b7d15f970c4085ddfc","title":"","text":"const media = stepToExpand.media; const mediaElement = $('img'); clearNode(this.stepMediaComponent); this.stepMediaComponent.appendChild(mediaElement); mediaElement.setAttribute('alt', media.altText); this.updateMediaSourceForColorMode(mediaElement, media.path);"} {"_id":"doc-en-vscode-3b3249de979fb0fe2d541f93b378a84db5a216f9ae21040007fd91bc7ab10849","title":"","text":"this.container.classList.toggle('height-constrained', size.height <= 600); this.container.classList.toggle('width-constrained', size.width <= 400); this.container.classList.toggle('width-semi-constrained', size.width <= 800); this.categoriesPageScrollbar?.scanDomNode(); this.detailsPageScrollbar?.scanDomNode(); this.detailsScrollbar?.scanDomNode(); } private updateCategoryProgress() {"} {"_id":"doc-en-vscode-e2a997c880c904188eaa3e85535b9b6361a3d689f68c110444386dc596b1864e","title":"","text":" "} {"_id":"doc-en-vscode-4852ffef50fcb26cf7d4fdffebfa14906c65c090d0952bb5ff126e777acd0bff","title":"","text":"weight: weight, kbExpr: EditorContextKeys.textInputFocus, primary: KeyMod.CtrlCmd | KeyCode.Space, mac: { primary: KeyMod.WinCtrl | KeyCode.Space } secondary: [KeyMod.CtrlCmd | KeyCode.KEY_I], mac: { primary: KeyMod.WinCtrl | KeyCode.Space, secondary: [KeyMod.CtrlCmd | KeyCode.KEY_I] } }, menuOpts: [{ menuId: suggestWidgetStatusbarMenu,"} {"_id":"doc-en-vscode-667d2e2653758e0165294206f4ffa62a660e2dbc2bda39f26724805c91f9366c","title":"","text":"return new vscode.FoldingRange(start, end, kind); } private static readonly foldEndPairCharacters = ['}', ']', ')', '`']; private static readonly foldEndPairCharacters = ['}', ']', ')', '`', '>']; private adjustFoldingEnd(range: vscode.Range, document: vscode.TextDocument) { // workaround for #47240"} {"_id":"doc-en-vscode-45566beae4a1b0349abc7ffaa16885aa916f9670f68b511e0b0abefbb695e408","title":"","text":"return; } const title = this.getTooltip() ?? ''; this.updateAriaLabel(); this.updateAriaLabel(title); if (!this.options.hoverDelegate) { this.element.title = title; } else {"} {"_id":"doc-en-vscode-ed77ab7bb1c941a1b85c7a8950cf273d43005d1c5dfefcd148b0ff989600d796","title":"","text":"} } protected updateAriaLabel(): void { protected updateAriaLabel(title: string): void { if (this.element) { const title = this.getTooltip() ?? ''; this.element.setAttribute('aria-label', title); } }"} {"_id":"doc-en-vscode-1362c88f3035659500dfb0f9bfc0d5cdfda931fb8d4101882609bfa4f38b5d27","title":"","text":"} } protected override updateAriaLabel(): void { protected override updateAriaLabel(title: string): void { if (this.label) { const title = this.getTooltip() ?? ''; this.label.setAttribute('aria-label', title); this.label.title = title; } }"} {"_id":"doc-en-vscode-f0abd91d315288ebff06c763e877d38371c693ba9be715bd8f112bc9f6ae6136","title":"","text":"autoplayPolicy: 'user-gesture-required', // Enable experimental css highlight api https://chromestatus.com/feature/5436441440026624 // Refs https://github.com/microsoft/vscode/issues/140098 enableBlinkFeatures: 'HighlightAPI', enableBlinkFeatures: 'HighlightAPI, KeyboardAccessibleTooltip', ...overrides?.webPreferences, sandbox: true },"} {"_id":"doc-en-vscode-86eb71fada9cce8e8d7bf7f20076f2995f249e1e542603e707766b31b1c21898","title":"","text":"render(container: HTMLElement): void { // file/folder const label = this._labels.create(container); this._disposables.add(label.onDidRender(() => { container.title = container.children[0]?.ariaLabel ?? ''; })); label.setFile(this.element.uri, { hidePath: true, hideIcon: this.element.kind === FileKind.FOLDER || !this.options.showFileIcons,"} {"_id":"doc-en-vscode-ec09e9f9240f548e2bd634e735c27fa64b40ac5c628a72776827ccd262473dfa","title":"","text":"renderElement(node: ITreeNode, _index: number, template: DocumentSymbolTemplate): void { const { element } = node; const extraClasses = ['nowrap']; const title = localize('title.template', \"{0} ({1})\", element.symbol.name, symbolKindNames[element.symbol.kind]); const options: IIconLabelValueOptions = { matches: createMatches(node.filterData), labelEscapeNewLines: true, extraClasses, title: localize('title.template', \"{0} ({1})\", element.symbol.name, symbolKindNames[element.symbol.kind]) title }; template.container.title = title; if (this._configurationService.getValue(OutlineConfigKeys.icons)) { // add styles for the icons template.iconClass.className = '';"} {"_id":"doc-en-vscode-6d1acd95a2a805c67fc3d6a1419a9f6615beb1fbdbfe782b7ecb30226053111d","title":"","text":"hoverPreparation = toDispose; }; const mouseOverDomEmitter = dom.addDisposableListener(htmlElement, dom.EventType.MOUSE_OVER, onMouseOver, true); const onFocus = () => { if (hoverPreparation) { return; } const target: IHoverDelegateTarget = { targetElements: [htmlElement], dispose: () => { } }; const toDispose: DisposableStore = new DisposableStore(); const onBlur = () => hideHover(true, true); toDispose.add(dom.addDisposableListener(htmlElement, dom.EventType.BLUR, onBlur, true)); toDispose.add(triggerShowHover(hoverDelegate.delay, false, target)); hoverPreparation = toDispose; }; const focusDomEmitter = dom.addDisposableListener(htmlElement, dom.EventType.FOCUS, onFocus, true); const hover: ICustomHover = { show: focus => { hideHover(false, true); // terminate a ongoing mouse over preparation"} {"_id":"doc-en-vscode-67d38e89b04c08c05abd3c2398485d5e21bfcb9365c7db0010961cd494ccc68a","title":"","text":"}, dispose: () => { mouseOverDomEmitter.dispose(); focusDomEmitter.dispose(); hideHover(true, true); } };"} {"_id":"doc-en-vscode-4ed13dde6bcc9873f6b590222e850bbc574db9342e75e7a3fbf8493cc9022851","title":"","text":"} })); this._register(toDisposable(() => { this.cache.clear(); })); this._register(this.editor.onDidChangeCursorPosition((e) => { if (this.cache.value) { this.onDidChangeEmitter.fire();"} {"_id":"doc-en-vscode-938ba28d8f76e0a34e354e4d7a6becf01bd72c3b3e154be4b771b02430bf6092","title":"","text":"]); }); }); test('Do not reuse cache from previous session (#132516)', async function () { const provider = new MockInlineCompletionsProvider(); await withAsyncTestCodeEditorAndInlineCompletionsModel('', { fakeClock: true, provider, inlineSuggest: { enabled: true } }, async ({ editor, editorViewModel, model, context }) => { model.setActive(true); context.keyboardType('hellon'); context.cursorLeft(); provider.setReturnValue({ text: 'helloworld', range: new Range(1, 1, 1, 6) }, 1000); await timeout(2000); assert.deepStrictEqual(provider.getAndClearCallHistory(), [ { position: '(1,6)', text: 'hellon', triggerKind: 0, } ]); provider.setReturnValue({ text: 'helloworld', range: new Range(2, 1, 2, 6) }, 1000); context.cursorDown(); context.keyboardType('hello'); await timeout(100); context.cursorLeft(); // Cause the ghost text to update context.cursorRight(); await timeout(2000); assert.deepStrictEqual(provider.getAndClearCallHistory(), [ { position: '(2,6)', text: 'hellonhello', triggerKind: 0, } ]); assert.deepStrictEqual(context.getAndClearViewStates(), [ '', 'hello[world]n', 'hellon', 'hellonhello[world]', ]); }); }); }); async function withAsyncTestCodeEditorAndInlineCompletionsModel("} {"_id":"doc-en-vscode-a7683e9df4b610ea92128e8658e0cff2d492f57d8454b36c373f520365bcb9ed","title":"","text":"import { timeout } from 'vs/base/common/async'; import { CancellationToken } from 'vs/base/common/cancellation'; import { Disposable } from 'vs/base/common/lifecycle'; import { CoreEditingCommands } from 'vs/editor/browser/controller/coreCommands'; import { CoreEditingCommands, CoreNavigationCommands } from 'vs/editor/browser/controller/coreCommands'; import { Position } from 'vs/editor/common/core/position'; import { ITextModel } from 'vs/editor/common/model'; import { InlineCompletionsProvider, InlineCompletion, InlineCompletionContext } from 'vs/editor/common/modes';"} {"_id":"doc-en-vscode-08bdfdd834fcab2a360696e44d150d0bfbcea71db82ac479ce303b869963aa97","title":"","text":"this.editor.trigger('keyboard', 'type', { text }); } public cursorUp(): void { CoreNavigationCommands.CursorUp.runEditorCommand(null, this.editor, null); } public cursorRight(): void { CoreNavigationCommands.CursorRight.runEditorCommand(null, this.editor, null); } public cursorLeft(): void { CoreNavigationCommands.CursorLeft.runEditorCommand(null, this.editor, null); } public cursorDown(): void { CoreNavigationCommands.CursorDown.runEditorCommand(null, this.editor, null); } public cursorLineEnd(): void { CoreNavigationCommands.CursorLineEnd.runEditorCommand(null, this.editor, null); } public leftDelete(): void { CoreEditingCommands.DeleteLeft.runEditorCommand(null, this.editor, null); }"} {"_id":"doc-en-vscode-d9355bf30060e3d3008d3a5a7a777b9aa16fa8303f89f429d624571c2301c39a","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 'mocha'; import { ExtensionContext, extensions } from 'vscode'; suite('vscode API - globalState / workspaceState', () => { let extensionContext: ExtensionContext; suiteSetup(async () => { // Trigger extension activation and grab the context as some tests depend on it await extensions.getExtension('vscode.vscode-api-tests')?.activate(); extensionContext = (global as any).testExtensionContext; }); test.only('state', async () => { for (const state of [extensionContext.globalState, extensionContext.workspaceState]) { let keys = state.keys(); assert.strictEqual(keys.length, 0); let res = state.get('state.test.get', 'default'); assert.strictEqual(res, 'default'); await state.update('state.test.get', 'testvalue'); keys = state.keys(); assert.strictEqual(keys.length, 1); assert.strictEqual(keys[0], 'state.test.get'); res = state.get('state.test.get', 'default'); assert.strictEqual(res, 'testvalue'); await state.update('state.test.get', undefined); keys = state.keys(); assert.strictEqual(keys.length, 0); res = state.get('state.test.get', 'default'); assert.strictEqual(res, 'default'); } }); }); "} {"_id":"doc-en-vscode-6685798bf2ec6ac7451bcdd6a2f61d7fcf59b297186528ce77e4c28e5b2d80dc","title":"","text":"import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers'; import { IDisposable } from 'vs/base/common/lifecycle'; import { IExtensionIdWithVersion, IExtensionsStorageSyncService } from 'vs/platform/userDataSync/common/extensionsStorageSync'; import { ILogService } from 'vs/platform/log/common/log'; @extHostNamedCustomer(MainContext.MainThreadStorage) export class MainThreadStorage implements MainThreadStorageShape {"} {"_id":"doc-en-vscode-2f3c555b661ce5aa8a1e420cd23bc8fc5251cd61bbe2685283ecd2db322d7013","title":"","text":"extHostContext: IExtHostContext, @IStorageService storageService: IStorageService, @IExtensionsStorageSyncService extensionsStorageSyncService: IExtensionsStorageSyncService, @ILogService private readonly _logService: ILogService ) { this._storageService = storageService; this._extensionsStorageSyncService = extensionsStorageSyncService;"} {"_id":"doc-en-vscode-84fc9e81451427a08e65a0191e314fb1da6bfe4c220b30a02971bc5adb9ac1f4","title":"","text":"this._storageListener = this._storageService.onDidChangeValue(e => { const shared = e.scope === StorageScope.GLOBAL; if (shared && this._sharedStorageKeysToWatch.has(e.key)) { try { this._proxy.$acceptValue(shared, e.key, this._getValue(shared, e.key)); } catch (error) { // ignore parsing errors that can happen } this._proxy.$acceptValue(shared, e.key, this._getValue(shared, e.key)); } }); }"} {"_id":"doc-en-vscode-3a09c99c939dafdae633810f65f7b92df09895a71188e5b3206625209b874dc9","title":"","text":"this._storageListener.dispose(); } $getValue(shared: boolean, key: string): Promise { async $getValue(shared: boolean, key: string): Promise { if (shared) { this._sharedStorageKeysToWatch.set(key, true); } try { return Promise.resolve(this._getValue(shared, key)); } catch (error) { return Promise.reject(error); } return this._getValue(shared, key); } private _getValue(shared: boolean, key: string): T | undefined { const jsonValue = this._storageService.get(key, shared ? StorageScope.GLOBAL : StorageScope.WORKSPACE); if (!jsonValue) { return undefined; if (jsonValue) { try { return JSON.parse(jsonValue); } catch (error) { // Do not fail this call but log it for diagnostics // https://github.com/microsoft/vscode/issues/132777 this._logService.error(`[mainThreadStorage] unexpected error parsing storage contents (key: ${key}, shared: ${shared}): ${error}`); } } return JSON.parse(jsonValue); return undefined; } $setValue(shared: boolean, key: string, value: object): Promise { let jsonValue: string; try { jsonValue = JSON.stringify(value); // Extension state is synced separately through extensions this._storageService.store(key, jsonValue, shared ? StorageScope.GLOBAL : StorageScope.WORKSPACE, StorageTarget.MACHINE); } catch (err) { return Promise.reject(err); } return Promise.resolve(undefined); async $setValue(shared: boolean, key: string, value: object): Promise { this._storageService.store(key, JSON.stringify(value), shared ? StorageScope.GLOBAL : StorageScope.WORKSPACE, StorageTarget.MACHINE /* Extension state is synced separately through extensions */); } $registerExtensionStorageKeysToSync(extension: IExtensionIdWithVersion, keys: string[]): void {"} {"_id":"doc-en-vscode-d7bd0d62fad1bb1dbbf45803807fe69bf3667c6090227f5f82dcac0b0def3297","title":"","text":"import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers'; import { revive } from 'vs/base/common/marshalling'; import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions'; import { SerializableObjectWithBuffers } from 'vs/workbench/services/extensions/common/proxyIdentifier'; @extHostNamedCustomer(MainContext.MainThreadCommands) export class MainThreadCommands implements MainThreadCommandsShape {"} {"_id":"doc-en-vscode-0f3e851d5ab32220f6308e28ffd733c623973869b6bf2fea297b01def6be3639","title":"","text":"} } async $executeCommand(id: string, args: any[], retry: boolean): Promise { async $executeCommand(id: string, args: any[] | SerializableObjectWithBuffers, retry: boolean): Promise { if (args instanceof SerializableObjectWithBuffers) { args = args.value; } for (let i = 0; i < args.length; i++) { args[i] = revive(args[i]); }"} {"_id":"doc-en-vscode-f9302cab5c35960093e5aa42488c8ddb6a1ceb25eede1aaa0455403cd3f9afb6","title":"","text":"export interface MainThreadCommandsShape extends IDisposable { $registerCommand(id: string): void; $unregisterCommand(id: string): void; $executeCommand(id: string, args: any[], retry: boolean): Promise; $executeCommand(id: string, args: any[] | SerializableObjectWithBuffers, retry: boolean): Promise; $getCommands(): Promise; }"} {"_id":"doc-en-vscode-d5c9f91a8802a9344323b937db41128f69bf3d3bd1344f28c250bbd0a461a4ed","title":"","text":"import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService'; import { ISelection } from 'vs/editor/common/core/selection'; import { TestItemImpl } from 'vs/workbench/api/common/extHostTestingPrivateApi'; import { VSBuffer } from 'vs/base/common/buffer'; import { SerializableObjectWithBuffers } from 'vs/workbench/services/extensions/common/proxyIdentifier'; interface CommandHandler { callback: Function;"} {"_id":"doc-en-vscode-e3ae7f27a60a062aa67d33e7d6722d3874d48f3b3e11903182354da65c40cfdb","title":"","text":"if (Range.isIRange((obj as modes.Location).range) && URI.isUri((obj as modes.Location).uri)) { return extHostTypeConverter.location.to(obj); } if (obj instanceof VSBuffer) { return obj.buffer.buffer; } if (!Array.isArray(obj)) { return obj; }"} {"_id":"doc-en-vscode-72b4d1f6cced42f6b0558b4b72baa08072c7aa5b6f7049805d5d14d8ba125913","title":"","text":"} else { // automagically convert some argument types let hasBuffers = false; const toArgs = cloneAndChange(args, function (value) { if (value instanceof extHostTypes.Position) { return extHostTypeConverter.Position.from(value);"} {"_id":"doc-en-vscode-e57d0f915098dbed35ddf9aee42888090ac7ce073a141eedc321fce95c379b97","title":"","text":"return extHostTypeConverter.location.from(value); } else if (extHostTypes.NotebookRange.isNotebookRange(value)) { return extHostTypeConverter.NotebookRange.from(value); } else if (value instanceof ArrayBuffer) { hasBuffers = true; return VSBuffer.wrap(new Uint8Array(value)); } else if (value instanceof Uint8Array) { hasBuffers = true; return VSBuffer.wrap(value); } if (!Array.isArray(value)) { return value;"} {"_id":"doc-en-vscode-0c5cd6e31fbd51379613a840b1c2de90bc62edf667a5b0d443a6e537d30ebcf3","title":"","text":"}); try { const result = await this._proxy.$executeCommand(id, toArgs, retry); const result = await this._proxy.$executeCommand(id, hasBuffers ? new SerializableObjectWithBuffers(toArgs) : toArgs, retry); return revive(result); } catch (e) { // Rerun the command when it wasn't known, had arguments, and when retry"} {"_id":"doc-en-vscode-67b62b6f0c27587b388485e5f4874f51f0be65c4f1737e4a1564450a02810507","title":"","text":"constructor() { super({ id: 'editor.gotoPreviousFold', label: nls.localize('gotoPreviousFold.label', \"Go to Previous Fold\"), alias: 'Go to Previous Fold', label: nls.localize('gotoPreviousFold.label', \"Go to Previous Folding Range\"), alias: 'Go to Previous Folding Range', precondition: CONTEXT_FOLDING_ENABLED, kbOpts: { kbExpr: EditorContextKeys.editorTextFocus,"} {"_id":"doc-en-vscode-94472b4bd3f8f9d8b8023d16613bd1a0771ae79c329b72aec028bdeb16f960b0","title":"","text":"constructor() { super({ id: 'editor.gotoNextFold', label: nls.localize('gotoNextFold.label', \"Go to Next Fold\"), alias: 'Go to Next Fold', label: nls.localize('gotoNextFold.label', \"Go to Next Folding Range\"), alias: 'Go to Next Folding Range', precondition: CONTEXT_FOLDING_ENABLED, kbOpts: { kbExpr: EditorContextKeys.editorTextFocus,"} {"_id":"doc-en-vscode-434d56c763af7b9c0447abb785b3a1d44653b6ed7291a902b209b0e46ad23239","title":"","text":"*/ export function getPreviousFoldLine(lineNumber: number, foldingModel: FoldingModel): number | null { let foldingRegion = foldingModel.getRegionAtLine(lineNumber); if (foldingRegion !== null) { // If on the folding range start line, go to previous sibling. if (foldingRegion !== null && foldingRegion.startLineNumber === lineNumber) { // If current line is not the start of the current fold, go to top line of current fold. If not, go to previous fold. if (lineNumber !== foldingRegion.startLineNumber) { return foldingRegion.startLineNumber;"} {"_id":"doc-en-vscode-ccae3f58c0bd9cae9dda39bea00fef11d2cc946cfd88def3d5005c472aed4adf","title":"","text":"if (foldingModel.regions.length > 0) { foldingRegion = foldingModel.regions.toRegion(foldingModel.regions.length - 1); while (foldingRegion !== null) { // Found non-parent fold before current line. if (foldingRegion.parentIndex === -1 && foldingRegion.startLineNumber < lineNumber) { // Found fold before current line. if (foldingRegion.startLineNumber < lineNumber) { return foldingRegion.startLineNumber; } if (foldingRegion.regionIndex > 0) {"} {"_id":"doc-en-vscode-beb7807cc366cf8822118b55af6d79912defc580fedf6dd7959f91c274ceeffc","title":"","text":"*/ export function getNextFoldLine(lineNumber: number, foldingModel: FoldingModel): number | null { let foldingRegion = foldingModel.getRegionAtLine(lineNumber); if (foldingRegion !== null) { // If on the folding range start line, go to next sibling. if (foldingRegion !== null && foldingRegion.startLineNumber === lineNumber) { // Find max line number to stay within parent. let expectedParentIndex = foldingRegion.parentIndex; let maxLineNumber = 0;"} {"_id":"doc-en-vscode-317c72a597d81ed9df09cfee652d3d88937aca8d34f329e051678dd906c575c3","title":"","text":"if (foldingModel.regions.length > 0) { foldingRegion = foldingModel.regions.toRegion(0); while (foldingRegion !== null) { // Found non-parent fold after current line. if (foldingRegion.parentIndex === -1 && foldingRegion.startLineNumber > lineNumber) { // Found fold after current line. if (foldingRegion.startLineNumber > lineNumber) { return foldingRegion.startLineNumber; } if (foldingRegion.regionIndex < foldingModel.regions.length) {"} {"_id":"doc-en-vscode-37057a35ff46e8cd29ce4ccc2dc3cb9ae8416d21a56d06a277ce10ad7c343876","title":"","text":"assert.strictEqual(getPreviousFoldLine(9, foldingModel), 5); assert.strictEqual(getPreviousFoldLine(5, foldingModel), 3); assert.strictEqual(getPreviousFoldLine(3, foldingModel), null); // Test when not on a folding region start line. assert.strictEqual(getPreviousFoldLine(4, foldingModel), 3); assert.strictEqual(getPreviousFoldLine(7, foldingModel), 6); assert.strictEqual(getPreviousFoldLine(8, foldingModel), 6); // Test jump to next. assert.strictEqual(getNextFoldLine(3, foldingModel), 5); assert.strictEqual(getNextFoldLine(4, foldingModel), 5); assert.strictEqual(getNextFoldLine(5, foldingModel), 9); assert.strictEqual(getNextFoldLine(9, foldingModel), null); // Test when not on a folding region start line. assert.strictEqual(getNextFoldLine(4, foldingModel), 5); assert.strictEqual(getNextFoldLine(7, foldingModel), 9); assert.strictEqual(getNextFoldLine(8, foldingModel), 9); } finally { textModel.dispose();"} {"_id":"doc-en-vscode-1813f7dbc24d0d2a0b3091fd101b45e82a8c2bc3d7b89f1e4343781228d69ebe","title":"","text":"} override get capabilities(): EditorInputCapabilities { return EditorInputCapabilities.Readonly | EditorInputCapabilities.Singleton | EditorInputCapabilities.CanDropIntoEditor; return EditorInputCapabilities.Readonly | EditorInputCapabilities.Singleton | EditorInputCapabilities.CanDropIntoEditor | EditorInputCapabilities.ForceDescription; } setTerminalInstance(instance: ITerminalInstance): void {"} {"_id":"doc-en-vscode-af8a4530d5f25fbf7e00ac940b9847da6ede5693d02bdab5055d6b6f5f99619f","title":"","text":"async attachToProcess(id: number): Promise { try { this._throwIfNoPty(id).attach(); await this._throwIfNoPty(id).attach(); this._logService.trace(`Persistent process reconnection \"${id}\"`); } catch (e) { this._logService.trace(`Persistent process reconnection \"${id}\" failed`, e.message); throw e; } }"} {"_id":"doc-en-vscode-d9b864ef217598c42f7772bbcb41f6c2b6b9005cc3b8394b2fa852e2a64a7f35","title":"","text":"})); } attach(): void { async attach(): Promise { this._logService.trace('persistentTerminalProcess#attach', this._persistentProcessId); if (!this._disconnectRunner1.isScheduled() && !this._disconnectRunner2.isScheduled()) { // Something wrong happened if the disconnect runner is not canceled, this likely means // multiple windows attempted to attach. if (!await this._isOrphaned()) { throw new Error(`Cannot attach to persistent process \"${this._persistentProcessId}\", it is already adopted`); } this._logService.warn(`Persistent process \"${this._persistentProcessId}\": Process had no disconnect runners but was an orphan`); } this._disconnectRunner1.cancel(); this._disconnectRunner2.cancel(); }"} {"_id":"doc-en-vscode-99b2ce21bc7609aee45af4620469fa6081e7ba3453ed072a2c46e83c2ddf4783","title":"","text":"this._dimensions.rows = rows; this._isScreenReaderModeEnabled = isScreenReaderModeEnabled; let newProcess: ITerminalChildProcess; let newProcess: ITerminalChildProcess | undefined; if (shellLaunchConfig.customPtyImplementation) { this._processType = ProcessType.PsuedoTerminal;"} {"_id":"doc-en-vscode-96a24fab0a71eade7874c07826757a793d9780b80b1c31082383783a89ed864e","title":"","text":"if (result) { newProcess = result; } else { this._logService.trace(`Attach to process failed for terminal ${shellLaunchConfig.attachPersistentProcess}`); return undefined; // Warn and just create a new terminal if attach failed for some reason this._logService.warn(`Attach to process failed for terminal`, shellLaunchConfig.attachPersistentProcess); shellLaunchConfig.attachPersistentProcess = undefined; } } else { } if (!newProcess) { await this._terminalProfileResolverService.resolveShellLaunchConfig(shellLaunchConfig, { remoteAuthority: this.remoteAuthority, os: this.os"} {"_id":"doc-en-vscode-0126c7472c33e10c44104aa1870220df441bc325d45a5ac2cffbcb82f426e395","title":"","text":"if (result) { newProcess = result; } else { this._logService.trace(`Attach to process failed for terminal ${shellLaunchConfig.attachPersistentProcess}`); return undefined; // Warn and just create a new terminal if attach failed for some reason this._logService.warn(`Attach to process failed for terminal`, shellLaunchConfig.attachPersistentProcess); shellLaunchConfig.attachPersistentProcess = undefined; } } else { } if (!newProcess) { newProcess = await this._launchLocalProcess(backend, shellLaunchConfig, cols, rows, this.userHome, isScreenReaderModeEnabled, variableResolver); } if (!this._isDisposed) {"} {"_id":"doc-en-vscode-9fb4ec0a1c5d0d0c15a0631120f747ea349ba8aba9b9fac4e25d7af9d0650b08","title":"","text":"if (this._preLaunchInputQueue.length > 0 && this._process) { // Send any queued data that's waiting newProcess.input(this._preLaunchInputQueue.join('')); newProcess!.input(this._preLaunchInputQueue.join('')); this._preLaunchInputQueue.length = 0; } }),"} {"_id":"doc-en-vscode-e94a721dc35019858a03bf16a0243ae01d6c685245c0ea19dc84f73ea9c92739","title":"","text":"private async _expandTerminalInstance(t: ITerminalInstanceLayoutInfoById): Promise> { try { const revivedPtyId = this._revivedPtyIdMap.get(t.terminal)?.newId; this._revivedPtyIdMap.delete(t.terminal); const persistentProcessId = revivedPtyId ?? t.terminal; const persistentProcess = this._throwIfNoPty(persistentProcessId); const processDetails = persistentProcess && await this._buildProcessDetails(t.terminal, persistentProcess, revivedPtyId !== undefined);"} {"_id":"doc-en-vscode-6046d0ff63969c62d93d97a6d35229ba98e17754d7a7a4d31d66c6cbad44524e","title":"","text":"DefaultCols = 80, DefaultRows = 30, MaxSupportedCols = 5000, MaxCanvasWidth = 8000 MaxCanvasWidth = 4096 } let xtermConstructor: Promise | undefined;"} {"_id":"doc-en-vscode-04ecf3a824bef768171cb944d9453d1f40b6c891dcdd60b2555ae022ba8eacf2","title":"","text":"this._initDimensions(); await this._resize(); } else { const font = this.xterm ? this.xterm.getFont() : this._configHelper.getFont(dom.getWindow(this.domElement)); const maxColsForTexture = Math.floor(Constants.MaxCanvasWidth / (font.charWidth ?? 20)); // Fixed columns should be at least xterm.js' regular column count const proposedCols = Math.max(this.maxCols, Math.min(this.xterm.getLongestViewportWrappedLineLength(), Constants.MaxSupportedCols)); const proposedCols = Math.max(this.maxCols, Math.min(this.xterm.getLongestViewportWrappedLineLength(), maxColsForTexture)); // Don't switch to fixed dimensions if the content already fits as it makes the scroll // bar look bad being off the edge if (proposedCols > this.xterm.raw.cols) {"} {"_id":"doc-en-vscode-372c66f15fb9f432d456173261d3ec74d5c17d3b8c2179599875b93da4991815","title":"","text":"private _widgetManager: TerminalWidgetManager | undefined; private _processCwd: string | undefined; private _standardLinkProviders: ILinkProvider[] = []; private _standardLinkProvidersDisposables: IDisposable[] = []; private _linkProvidersDisposables: IDisposable[] = []; constructor( private _xterm: Terminal,"} {"_id":"doc-en-vscode-840d232500a0da8af2bbd786b5a9b6b811acbc3314901cbc84eb3055510c8ff5","title":"","text":"this._processCwd = processCwd; } private _clearLinkProviders(): void { dispose(this._linkProvidersDisposables); this._linkProvidersDisposables = []; } private _registerStandardLinkProviders(): void { dispose(this._standardLinkProvidersDisposables); this._standardLinkProvidersDisposables = []; for (const p of this._standardLinkProviders) { this._standardLinkProvidersDisposables.push(this._xterm.registerLinkProvider(p)); this._linkProvidersDisposables.push(this._xterm.registerLinkProvider(p)); } } registerExternalLinkProvider(instance: ITerminalInstance, linkProvider: ITerminalExternalLinkProvider): IDisposable { // Clear and re-register the standard link providers so they are a lower priority that the new one this._clearLinkProviders(); const wrappedLinkProvider = this._instantiationService.createInstance(TerminalExternalLinkProviderAdapter, this._xterm, instance, linkProvider, this._wrapLinkHandler.bind(this), this._tooltipCallback.bind(this)); const newLinkProvider = this._xterm.registerLinkProvider(wrappedLinkProvider); // Re-register the standard link providers so they are a lower priority that the new one this._linkProvidersDisposables.push(newLinkProvider); this._registerStandardLinkProviders(); return newLinkProvider; }"} {"_id":"doc-en-vscode-5a7fbf9a21b0c0bb1d36e29c9ad1677cadf2377eced9272a81311398ce32219a","title":"","text":"// Init winpty compat and link handler after process creation as they rely on the // underlying process OS this._processManager.onProcessReady((processTraits) => { // If links are ready, do not re-create the manager. if (this._areLinksReady) { return; } if (this._processManager.os === OperatingSystem.Windows) { xterm.setOption('windowsMode', processTraits.requiresWindowsMode || false); // Force line data to be sent when the cursor is moved, the main purpose for"} {"_id":"doc-en-vscode-aa01e0cd45e769ed60f66979b1685b12534b80437cf660bc9af3c792ca34bf67","title":"","text":"// similar to if the app was launched from the dock // https://github.com/microsoft/vscode/issues/102975 const spawnArgs = ['-n'];\t\t\t\t// -n: launches even when opened already // The following args are for the open command itself, rather than for VS Code: // -n creates a new instance. // Without -n, the open command re-opens the existing instance as-is. // -g starts the new instance in the background. // Later, Electron brings the instance to the foreground. // This way, Mac does not automatically try to foreground the new instance, which causes // focusing issues when the new instance only sends data to a previous instance and then closes. const spawnArgs = ['-n', '-g']; // -a opens the given application. spawnArgs.push('-a', process.execPath); // -a: opens a specific application if (verbose) {"} {"_id":"doc-en-vscode-440e6e4590e4f077b98af5825290436b35aca101af1e5edc62ad4361bdec62c4","title":"","text":"const majorNodeVersion = parseInt(/^(d+)./.exec(process.versions.node)[1]); if (majorNodeVersion < 14 || majorNodeVersion >= 17) { console.error('033[1;31m*** Please use node.js versions >=14 and <=17.033[0;0m'); console.error('033[1;31m*** Please use node.js versions >=14 and <17.033[0;0m'); err = true; }"} {"_id":"doc-en-vscode-5164236bcef76bbde71a25203a161d84668753fbebf426ed75f52303fb1593ca","title":"","text":"#!/bin/sh VSCODE_GIT_ASKPASS_PIPE=`mktemp` ELECTRON_RUN_AS_NODE=\"1\" VSCODE_GIT_ASKPASS_PIPE=\"$VSCODE_GIT_ASKPASS_PIPE\" \"$VSCODE_GIT_ASKPASS_NODE\" \"$VSCODE_GIT_ASKPASS_EXTRA_ARGS\" \"$VSCODE_GIT_ASKPASS_MAIN\" $* ELECTRON_RUN_AS_NODE=\"1\" VSCODE_GIT_ASKPASS_PIPE=\"$VSCODE_GIT_ASKPASS_PIPE\" \"$VSCODE_GIT_ASKPASS_NODE\" \"$VSCODE_GIT_ASKPASS_MAIN\" $VSCODE_GIT_ASKPASS_EXTRA_ARGS $* cat $VSCODE_GIT_ASKPASS_PIPE rm $VSCODE_GIT_ASKPASS_PIPE"} {"_id":"doc-en-vscode-a69e9b2edc9d8ac9bd1ba2effb575d237ffd8d019e41998376d94ba452058f54","title":"","text":"margin-top: -1px; } .codicon-debug-breakpoint.codicon-debug-stackframe-focused::after, .codicon-debug-breakpoint.codicon-debug-stackframe::after { content: 'eb8a'; position: absolute; } .monaco-editor .debug-top-stack-frame-column { font: normal normal normal 16px/1 codicon; text-rendering: auto;"} {"_id":"doc-en-vscode-ba0873e34bd8c02677f4be38cd15dc695bdf8fd7442d1f0395fd0917f0b99753","title":"","text":"import { XtermTerminal } from 'vs/workbench/contrib/terminal/browser/xterm/xtermTerminal'; import { escapeNonWindowsPath } from 'vs/platform/terminal/common/terminalEnvironment'; import { IWorkspaceTrustRequestService } from 'vs/platform/workspace/common/workspaceTrust'; import { isFirefox } from 'vs/base/browser/browser'; const enum Constants { /**"} {"_id":"doc-en-vscode-2e5997e72e3aa676a913cc92cf128f771724b9f5386e739ea7141fcc36b4c7a8","title":"","text":"} this.xterm?.dispose(); // HACK: Workaround for Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=559561, // as 'blur' event in xterm.raw.textarea is not triggered on xterm.dispose() // See https://github.com/microsoft/vscode/issues/138358 if (isFirefox) { this._terminalFocusContextKey.reset(); this._terminalHasTextContextKey.reset(); this._onDidBlur.fire(this); } if (this._pressAnyKeyToCloseListener) { this._pressAnyKeyToCloseListener.dispose(); this._pressAnyKeyToCloseListener = undefined;"} {"_id":"doc-en-vscode-9ae36a6e507f37bef46513cdb6f3e0d48ae7ba7de1c7998df2f834b941fa6827","title":"","text":"properties: { searchString: { type: 'string' }, replaceString: { type: 'string' }, regex: { type: 'boolean' }, regexOverride: { type: 'number', description: nls.localize('actions.find.isRegexOverride', 'Overrides \"Use Regular Expression\" flag.nThe flag will not be saved for the future.n0: Do Nothingn1: Truen2: False') }, wholeWord: { type: 'boolean' }, wholeWordOverride: { type: 'number', description: nls.localize('actions.find.wholeWordOverride', 'Overrides \"Match Whole Word\" flag.nThe flag will not be saved for the future.n0: Do Nothingn1: Truen2: False') }, matchCase: { type: 'boolean' }, matchCaseOverride: { type: 'number', description: nls.localize('actions.find.matchCaseOverride', 'Overrides \"Math Case\" flag.nThe flag will not be saved for the future.n0: Do Nothingn1: Truen2: False') }, isRegex: { type: 'boolean' }, matchWholeWord: { type: 'boolean' }, isCaseSensitive: { type: 'boolean' }, preserveCase: { type: 'boolean' }, preserveCaseOverride: { type: 'number', description: nls.localize('actions.find.preserveCaseOverride', 'Overrides \"Preserve Case\" flag.nThe flag will not be saved for the future.n0: Do Nothingn1: Truen2: False') }, findInSelection: { type: 'boolean' }, } }"} {"_id":"doc-en-vscode-54d33b3bb5ee9b3c9c4a9ee115d1cb0d21960891ba8661edd42623f21ec187b8","title":"","text":"readonly identifier = this.task.identifier; readonly source = this.task.source; readonly operation = this.task.operation; get operation() { return this.task.operation; } get verificationStatus() { return this.task.verificationStatus;"} {"_id":"doc-en-vscode-4ba16176f52529c1aab5f17c74ed20e425eb5257a769a97f2d2a4b7099c98f14","title":"","text":"this._container = undefined; } attachToElement(container: HTMLElement): Promise | void { // The container did not change, do nothing if (this._container === container) {"} {"_id":"doc-en-vscode-736e0ef7f1f6a95c6fca20424c725922e2db4ae0154386882bd3eb410103d55a","title":"","text":"this._attachBarrier.open(); this.xterm?.attachToElement(container); // Attach has not occurred yet if (!this._wrapperElement) { return this._attachToElement(container); } this.xterm?.attachToElement(this._wrapperElement); // The container changed, reattach this._container = container;"} {"_id":"doc-en-vscode-6567a4b277d3c7d47903930382048de788a6ec15b7fada08c2e5003f92e9e455","title":"","text":"\"explorer/context\": [ { \"command\": \"markdown.showPreview\", \"when\": \"resourceLangId == markdown\", \"when\": \"resourceLangId == markdown && !hasCustomMarkdownPreview\", \"group\": \"navigation\" } ], \"editor/title/context\": [ { \"command\": \"markdown.showPreview\", \"when\": \"resourceLangId == markdown\", \"when\": \"resourceLangId == markdown && !hasCustomMarkdownPreview\", \"group\": \"1_open\" } ],"} {"_id":"doc-en-vscode-3969ea180157d9d8df4f8fdf700bf53494304d51864d5c382136a11a3a0e4459","title":"","text":"'out-build/vs/base/node/ps.sh', // Terminal shell integration 'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration.fish', 'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration.ps1', 'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh', 'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration-env.zsh', 'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration-profile.zsh', 'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration-rc.zsh', 'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration-login.zsh', 'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration.fish', 'out-build/vs/workbench/contrib/terminal/browser/media/fish_xdg_data/fish/vendor_conf.d/shellIntegration.fish', '!**/test/**' ];"} {"_id":"doc-en-vscode-06a4ba449ee2037dcdb3d51be1362ddb9fcc5798e425dfc8e8a8ca1e1607bd8f","title":"","text":"'out-build/vs/workbench/browser/media/*-theme.css', 'out-build/vs/workbench/contrib/debug/**/*.json', 'out-build/vs/workbench/contrib/externalTerminal/**/*.scpt', 'out-build/vs/workbench/contrib/terminal/browser/media/*.fish', 'out-build/vs/workbench/contrib/terminal/browser/media/fish_xdg_data/fish/vendor_conf.d/*.fish', 'out-build/vs/workbench/contrib/terminal/browser/media/*.ps1', 'out-build/vs/workbench/contrib/terminal/browser/media/*.sh', 'out-build/vs/workbench/contrib/terminal/browser/media/*.zsh',"} {"_id":"doc-en-vscode-264e0f847adaf3b070c69aa9ff81bdb51b171f98ae114559e03bbba004560abb","title":"","text":"// Usage: `[[ \"$TERM_PROGRAM\" == \"vscode\" ]] && . \"$(code --locate-shell-integration-path zsh)\"` case 'zsh': file = 'shellIntegration-rc.zsh'; break; // Usage: `string match -q \"$TERM_PROGRAM\" \"vscode\"; and . (code --locate-shell-integration-path fish)` case 'fish': file = 'shellIntegration.fish'; break; case 'fish': file = 'fish_xdg_data/fish/vendor_conf.d/shellIntegration.fish'; break; default: throw new Error('Error using --locate-shell-integration-path: Invalid shell type'); } console.log(join(getAppRoot(), 'out', 'vs', 'workbench', 'contrib', 'terminal', 'browser', 'media', file));"} {"_id":"doc-en-vscode-c9dfff49d85e3b526a3effcc23eee550147f8e939eebdec80d1e9e36b59f6fe6","title":"","text":"// The injection mechanism used for fish is to add a custom dir to $XDG_DATA_DIRS which // is similar to $ZDOTDIR in zsh but contains a list of directories to run from. const oldDataDirs = env?.XDG_DATA_DIRS ?? '/usr/local/share:/usr/share'; const newDataDir = path.join(appRoot, 'out/vs/workbench/contrib/xdg_data'); const newDataDir = path.join(appRoot, 'out/vs/workbench/contrib/terminal/browser/media/fish_xdg_data'); envMixin['XDG_DATA_DIRS'] = `${oldDataDirs}:${newDataDir}`; addEnvMixinPathPrefix(options, envMixin); return { newArgs: undefined, envMixin };"} {"_id":"doc-en-vscode-b68955c06c610121b75a5e04a7cb7151b185bca81f577ef3d588345df03babe4","title":"","text":" # --------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------------------------------- # # Visual Studio Code terminal integration for fish # # Manual installation: # # (1) Add the following to the end of `$__fish_config_dir/config.fish`: # # string match -q \"$TERM_PROGRAM\" \"vscode\" # and . (code --locate-shell-integration-path fish) # # (2) Restart fish. # Don't run in scripts, other terminals, or more than once per session. status is-interactive and string match --quiet \"$TERM_PROGRAM\" \"vscode\" and ! set --query VSCODE_SHELL_INTEGRATION or exit set --global VSCODE_SHELL_INTEGRATION 1 # Apply any explicit path prefix (see #99878) if status --is-login; and set -q VSCODE_PATH_PREFIX fish_add_path -p $VSCODE_PATH_PREFIX 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]\") 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 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 # Handle the shell integration nonce if set -q VSCODE_NONCE set -l __vsc_nonce $VSCODE_NONCE set -e VSCODE_NONCE end # Helper function function __vsc_esc -d \"Emit escape sequences for VS Code shell integration\" builtin printf \"e]633;%sa\" (string join \";\" $argv) end # Sent right before executing an interactive command. # Marks the beginning of command output. function __vsc_cmd_executed --on-event fish_preexec __vsc_esc C __vsc_esc E (__vsc_escape_value \"$argv\") $__vsc_nonce # Creates a marker to indicate a command was run. set --global _vsc_has_cmd end # Escape a value for use in the 'P' (\"Property\") or 'E' (\"Command Line\") sequences. # Backslashes are doubled and non-alphanumeric characters are hex encoded. function __vsc_escape_value # Escape backslashes and semi-colons echo $argv | string replace --all '' '' | string replace --all ';' 'x3b' ; end # Sent right after an interactive command has finished executing. # Marks the end of command output. function __vsc_cmd_finished --on-event fish_postexec __vsc_esc D $status end # Sent when a command line is cleared or reset, but no command was run. # Marks the cleared line with neither success nor failure. function __vsc_cmd_clear --on-event fish_cancel __vsc_esc D end # Sent whenever a new fish prompt is about to be displayed. # Updates the current working directory. function __vsc_update_cwd --on-event fish_prompt __vsc_esc P Cwd=(__vsc_escape_value \"$PWD\") # If a command marker exists, remove it. # Otherwise, the commandline is empty and no command was run. if set --query _vsc_has_cmd set --erase _vsc_has_cmd else __vsc_cmd_clear end end # Sent at the start of the prompt. # Marks the beginning of the prompt (and, implicitly, a new line). function __vsc_fish_prompt_start __vsc_esc A end # Sent at the end of the prompt. # Marks the beginning of the user's command input. function __vsc_fish_cmd_start __vsc_esc B end function __vsc_fish_has_mode_prompt -d \"Returns true if fish_mode_prompt is defined and not empty\" functions fish_mode_prompt | string match -rvq '^ *(#|function |end$|$)' end # Preserve the user's existing prompt, to wrap in our escape sequences. functions --copy fish_prompt __vsc_fish_prompt # Preserve and wrap fish_mode_prompt (which appears to the left of the regular # prompt), but only if it's not defined as an empty function (which is the # officially documented way to disable that feature). if __vsc_fish_has_mode_prompt functions --copy fish_mode_prompt __vsc_fish_mode_prompt function fish_mode_prompt __vsc_fish_prompt_start __vsc_fish_mode_prompt end function fish_prompt __vsc_fish_prompt __vsc_fish_cmd_start end else # No fish_mode_prompt, so put everything in fish_prompt. function fish_prompt __vsc_fish_prompt_start __vsc_fish_prompt __vsc_fish_cmd_start end end "} {"_id":"doc-en-vscode-c53309dc146adf555d3b750b111e5ae3862211a5320c19b812769cc9434ce7b8","title":"","text":" # --------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------------------------------- # # Visual Studio Code terminal integration for fish # # Manual installation: # # (1) Add the following to the end of `$__fish_config_dir/config.fish`: # # string match -q \"$TERM_PROGRAM\" \"vscode\" # and . (code --locate-shell-integration-path fish) # # (2) Restart fish. # Don't run in scripts, other terminals, or more than once per session. status is-interactive and string match --quiet \"$TERM_PROGRAM\" \"vscode\" and ! set --query VSCODE_SHELL_INTEGRATION or exit set --global VSCODE_SHELL_INTEGRATION 1 # Apply any explicit path prefix (see #99878) if status --is-login; and set -q VSCODE_PATH_PREFIX fish_add_path -p $VSCODE_PATH_PREFIX 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]\") 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 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 # Handle the shell integration nonce if set -q VSCODE_NONCE set -l __vsc_nonce $VSCODE_NONCE set -e VSCODE_NONCE end # Helper function function __vsc_esc -d \"Emit escape sequences for VS Code shell integration\" builtin printf \"e]633;%sa\" (string join \";\" $argv) end # Sent right before executing an interactive command. # Marks the beginning of command output. function __vsc_cmd_executed --on-event fish_preexec __vsc_esc C __vsc_esc E (__vsc_escape_value \"$argv\") $__vsc_nonce # Creates a marker to indicate a command was run. set --global _vsc_has_cmd end # Escape a value for use in the 'P' (\"Property\") or 'E' (\"Command Line\") sequences. # Backslashes are doubled and non-alphanumeric characters are hex encoded. function __vsc_escape_value # Escape backslashes and semi-colons echo $argv | string replace --all '' '' | string replace --all ';' 'x3b' ; end # Sent right after an interactive command has finished executing. # Marks the end of command output. function __vsc_cmd_finished --on-event fish_postexec __vsc_esc D $status end # Sent when a command line is cleared or reset, but no command was run. # Marks the cleared line with neither success nor failure. function __vsc_cmd_clear --on-event fish_cancel __vsc_esc D end # Sent whenever a new fish prompt is about to be displayed. # Updates the current working directory. function __vsc_update_cwd --on-event fish_prompt __vsc_esc P Cwd=(__vsc_escape_value \"$PWD\") # If a command marker exists, remove it. # Otherwise, the commandline is empty and no command was run. if set --query _vsc_has_cmd set --erase _vsc_has_cmd else __vsc_cmd_clear end end # Sent at the start of the prompt. # Marks the beginning of the prompt (and, implicitly, a new line). function __vsc_fish_prompt_start __vsc_esc A end # Sent at the end of the prompt. # Marks the beginning of the user's command input. function __vsc_fish_cmd_start __vsc_esc B end function __vsc_fish_has_mode_prompt -d \"Returns true if fish_mode_prompt is defined and not empty\" functions fish_mode_prompt | string match -rvq '^ *(#|function |end$|$)' end # Preserve the user's existing prompt, to wrap in our escape sequences. functions --copy fish_prompt __vsc_fish_prompt # Preserve and wrap fish_mode_prompt (which appears to the left of the regular # prompt), but only if it's not defined as an empty function (which is the # officially documented way to disable that feature). if __vsc_fish_has_mode_prompt functions --copy fish_mode_prompt __vsc_fish_mode_prompt function fish_mode_prompt __vsc_fish_prompt_start __vsc_fish_mode_prompt end function fish_prompt __vsc_fish_prompt __vsc_fish_cmd_start end else # No fish_mode_prompt, so put everything in fish_prompt. function fish_prompt __vsc_fish_prompt_start __vsc_fish_prompt __vsc_fish_cmd_start end end "} {"_id":"doc-en-vscode-423979297e3313782339699630764667b17fa7ecc5249a046229ec3c01742d79","title":"","text":"case 'fish': { // The injection mechanism used for fish is to add a custom dir to $XDG_DATA_DIRS which // is similar to $ZDOTDIR in zsh but contains a list of directories to run from. // const oldDataDirs = env?.XDG_DATA_DIRS ?? '/usr/local/share:/usr/share'; // const newDataDir = path.join(appRoot, 'out/vs/workbench/contrib/terminal/browser/media/fish_xdg_data'); // envMixin['XDG_DATA_DIRS'] = `${oldDataDirs}:${newDataDir}`; // addEnvMixinPathPrefix(options, envMixin); // return { newArgs: undefined, envMixin }; return undefined; const oldDataDirs = env?.XDG_DATA_DIRS ?? '/usr/local/share:/usr/share'; const newDataDir = path.join(appRoot, 'out/vs/workbench/contrib/terminal/browser/media/fish_xdg_data'); envMixin['XDG_DATA_DIRS'] = `${oldDataDirs}:${newDataDir}`; addEnvMixinPathPrefix(options, envMixin); return { newArgs: undefined, envMixin }; } case 'pwsh': { if (!originalArgs || arePwshImpliedArgs(originalArgs)) {"} {"_id":"doc-en-vscode-4af8efd9c1629ea77cfdf7cb050732eb17c68f01964c256261a95ff6224c32a4","title":"","text":"__vsc_esc D end # Preserve the user's existing prompt, to wrap in our escape sequences. function __preserve_fish_prompt --on-event fish_prompt if functions --query fish_prompt if functions --query __vsc_fish_prompt # Erase the fallback so it can be set to the user's prompt functions --erase __vsc_fish_prompt end functions --copy fish_prompt __vsc_fish_prompt functions --erase __preserve_fish_prompt # Now __vsc_fish_prompt is guaranteed to be defined __init_vscode_shell_integration else if functions --query __vsc_fish_prompt # There is no fish_prompt set, so stick with the default functions --erase __preserve_fish_prompt # Now __vsc_fish_prompt is guaranteed to be defined __init_vscode_shell_integration else function __vsc_fish_prompt echo -n (whoami)@(prompt_hostname) (prompt_pwd) '~> ' end end end end __preserve_fish_prompt # Sent whenever a new fish prompt is about to be displayed. # Updates the current working directory. function __vsc_update_cwd --on-event fish_prompt"} {"_id":"doc-en-vscode-9d1793e75f8c9a0b88c75e45f78eb470f525e25fbb409e9886e650d96a4515e0","title":"","text":"functions fish_mode_prompt | string match -rvq '^ *(#|function |end$|$)' end # Preserve the user's existing prompt, to wrap in our escape sequences. functions --copy fish_prompt __vsc_fish_prompt # Preserve and wrap fish_mode_prompt (which appears to the left of the regular # prompt), but only if it's not defined as an empty function (which is the # officially documented way to disable that feature). if __vsc_fish_has_mode_prompt functions --copy fish_mode_prompt __vsc_fish_mode_prompt function fish_mode_prompt __vsc_fish_prompt_start __vsc_fish_mode_prompt end function fish_prompt __vsc_fish_prompt __vsc_fish_cmd_start end else # No fish_mode_prompt, so put everything in fish_prompt. function fish_prompt __vsc_fish_prompt_start __vsc_fish_prompt __vsc_fish_cmd_start function __init_vscode_shell_integration if __vsc_fish_has_mode_prompt functions --copy fish_mode_prompt __vsc_fish_mode_prompt function fish_mode_prompt __vsc_fish_prompt_start __vsc_fish_mode_prompt end function fish_prompt __vsc_fish_prompt __vsc_fish_cmd_start end else # No fish_mode_prompt, so put everything in fish_prompt. function fish_prompt __vsc_fish_prompt_start __vsc_fish_prompt __vsc_fish_cmd_start end end end"} {"_id":"doc-en-vscode-d6b0f888696eb1f0a88647c02b55386e9fdb88c4979dee98e4cdad972f0bfccd","title":"","text":"resourceProvider: WebviewResourceProvider, ): Promise { const rendered = await this.engine.render(markdownDocument, resourceProvider); const html = `
${rendered.html}
`;
const html = `
${rendered.html}
`;
return { html, containingImages: rendered.containingImages"} {"_id":"doc-en-vscode-e1c8b25de3a0d986357d558c1c90c3546f144db9b9bc749a5af8bc1bce45972c","title":"","text":"if (token.map && token.type !== 'inline') { token.attrSet('data-line', String(token.map[0])); token.attrJoin('class', 'code-line'); token.attrJoin('dir', 'auto'); } } });"} {"_id":"doc-en-vscode-3058dede9555e96c4977514128e56770fa347a4c504507278e57c6b432293f40","title":"","text":"return engine.parse(text.replace(UNICODE_NEWLINE_REGEX, ''), {}); } public resetSlugCount(): void { this._slugCount = new Map(); }"} {"_id":"doc-en-vscode-c199ed605e87e5bcb4468e016a7f0a888b927da8d6298495333c5f34ae87ed25","title":"","text":"*--------------------------------------------------------------------------------------------*/ // @ts-check const path = require('path'); const fs = require('fs'); const esbuild = require('esbuild'); const args = process.argv.slice(2);"} {"_id":"doc-en-vscode-6710494abf54e163a0c9fd0d0b1c517f2c5bc785c477911e6e83752de500a6a5","title":"","text":"const outDir = path.join(outputRoot, 'media'); async function build() { fs.copyFileSync( path.join(__dirname, 'node_modules', 'vscode-codicons', 'dist', 'codicon.css'), path.join(outDir, 'codicon.css')); fs.copyFileSync( path.join(__dirname, 'node_modules', 'vscode-codicons', 'dist', 'codicon.ttf'), path.join(outDir, 'codicon.ttf')); await esbuild.build({ entryPoints: [ path.join(srcDir, 'index.ts') ], entryPoints: { 'index': path.join(srcDir, 'index.ts'), 'codicon': path.join(__dirname, 'node_modules', 'vscode-codicons', 'dist', 'codicon.css'), }, loader: { '.ttf': 'dataurl', }, bundle: true, minify: true, sourcemap: false,"} {"_id":"doc-en-vscode-b014c238147bbe6aaa15b657ae260473468de382263536f2ffc888ce232314d0","title":"","text":" font-src ${this._webviewPanel.webview.cspSource};
font-src data:; style-src ${this._webviewPanel.webview.cspSource}; script-src 'nonce-${nonce}'; frame-src *;"} {"_id":"doc-en-vscode-2b4273f43c7476e01021267da1c1c532eeb0c4e05c5afa3482378f182e115394","title":"","text":"disposables.push(server.onServerStart(path => { defaultStatus.text = '$(flame) Runnning'; defaultStatus.text = '$(flame) Running'; defaultStatus.command = 'o.pickProjectAndStart'; defaultStatus.color = ''; render();"} {"_id":"doc-en-vscode-b6d24fc58ee66af9edc61b965c94b7b9f07a7f0d1363c25d1348c94245ed418d","title":"","text":"const newRenderMode = e.altKey && e.ctrlKey ? altMode : defaultMode; if (newRenderMode !== this._activeRenderMode) { this._activeRenderMode = newRenderMode; const ranges = this._getHintsRanges(); const copies = this._copyInlayHintsWithCurrentAnchor(this._editor.getModel()); this._updateHintsDecorators(ranges, copies); const model = this._editor.getModel(); const copies = this._copyInlayHintsWithCurrentAnchor(model); this._updateHintsDecorators([model.getFullModelRange()], copies); scheduler.schedule(0); } }));"} {"_id":"doc-en-vscode-441a800900325571e0033953aba7a031149bcff0856e2e63d364a15746a73201","title":"","text":"} // return inlay hints but with an anchor that reflects \"updates\" // that happens after receiving them, e.g adding new lines before a hint // that happened after receiving them, e.g adding new lines before a hint private _copyInlayHintsWithCurrentAnchor(model: ITextModel): InlayHintItem[] { const items = new Map(); for (const [id, obj] of this._decorationsMetadata) {"} {"_id":"doc-en-vscode-b64684817e2d53d435f22a1ff8495944b9d7fd42f3088f0642d03f5aa95df186","title":"","text":"const container = document.createElement('span'); container.classList.add('all-options'); parent.appendChild(container); const action = new Action('all', localize('all', \"Show Quick Pick Options...\"), Codicon.chevronDown.classNames, true, () => { const action = new Action('all', localize('all', \"Show Search Modes...\"), Codicon.chevronDown.classNames, true, () => { quickInputService.quickAccess.show('?'); }); const dropdown = new ActionViewItem(undefined, action, { icon: true, label: false, hoverDelegate });"} {"_id":"doc-en-vscode-ca4ab6b62df407747f55251bedfaf29797ee16d4151b29a0cf166010d3f75c16","title":"","text":"import 'vs/css!./media/extensionEditor'; import { localize } from 'vs/nls'; import * as arrays from 'vs/base/common/arrays'; import { OS } from 'vs/base/common/platform'; import { OS, locale } from 'vs/base/common/platform'; import { Event, Emitter } from 'vs/base/common/event'; import { Cache, CacheResult } from 'vs/base/common/cache'; import { Action, IAction } from 'vs/base/common/actions';"} {"_id":"doc-en-vscode-1becc7e76ad631ea7c3a8063929c4a9c463561f4096fde1e7b8d2e0b41cdd555","title":"","text":"append(moreInfo, $('.more-info-entry', undefined, $('div', undefined, localize('release date', \"Released on\")), $('div', undefined, new Date(gallery.releaseDate).toLocaleString(undefined, { hourCycle: 'h23' })) $('div', undefined, new Date(gallery.releaseDate).toLocaleString(locale, { hourCycle: 'h23' })) ), $('.more-info-entry', undefined, $('div', undefined, localize('last updated', \"Last updated\")), $('div', undefined, new Date(gallery.lastUpdated).toLocaleString(undefined, { hourCycle: 'h23' })) $('div', undefined, new Date(gallery.lastUpdated).toLocaleString(locale, { hourCycle: 'h23' })) ) ); }"} {"_id":"doc-en-vscode-3ac3b9c8d981a793ab96a71387bcbd073737922ada63b6f6b30d38c47a290446","title":"","text":"const repoPath = path.normalize(result.stdout.trimLeft().replace(/[rn]+$/, '')); if (isWindows) { // On Git 2.25+ if you call `rev-parse --show-toplevel` on a mapped drive, instead of getting the mapped drive path back, you get the UNC path for the mapped drive. // So we will try to normalize it back to the mapped drive path, if possible // On Git 2.25+ if you call `rev-parse --show-toplevel` on a mapped drive, instead of getting the mapped // drive path back, you get the UNC path for the mapped drive. So we will try to normalize it back to the // mapped drive path, if possible const repoUri = Uri.file(repoPath); const pathUri = Uri.file(repositoryPath); if (repoUri.authority.length !== 0 && pathUri.authority.length === 0) {"} {"_id":"doc-en-vscode-4de055045257213920bfdb991d0acbd91e80d7edd9dfbd6a168d154797a5eed9","title":"","text":"return path.normalize(pathUri.fsPath); } // On Windows, there are cases in which the normalized path for a mapped folder contains a trailing `` // character (ex: serverfolder) due to the implementation of `path.normalize()`. This behaviour is // by design as documented in https://github.com/nodejs/node/issues/1765. if (repoUri.authority.length !== 0) { return repoPath.replace(/$/, ''); } } return repoPath;"} {"_id":"doc-en-vscode-dd95d7252679baff8400476752ff16f1357bd89d42a8417431e77ba849511289","title":"","text":"return false; } const match = /^(?:https://github.com/|git@github.com:)([^/]+)/([^/.]+)(?:.git)?$/i.exec(remoteUrl); const match = /^(?:https://github.com/|git@github.com:)([^/]+)/([^/.]+)/i.exec(remoteUrl); if (!match) { return false; }"} {"_id":"doc-en-vscode-ebd47da9b8fb86017e561da920c1cd8f8829a84545db7e2fd060fd652a882b65","title":"","text":"this._onDidDeleteFile.fire(Object.freeze({ files: files.map(f => URI.revive(f.target)) })); break; case FileOperation.CREATE: case FileOperation.COPY: this._onDidCreateFile.fire(Object.freeze({ files: files.map(f => URI.revive(f.target)) })); break; default:"} {"_id":"doc-en-vscode-231a0bc571fafb7f2238ccbd46130352a9278465c29e331917fc497c32879e6f","title":"","text":"case FileOperation.DELETE: return await this._fireWillEvent(this._onWillDeleteFile, { files: files.map(f => URI.revive(f.target)) }, timeout, token); case FileOperation.CREATE: case FileOperation.COPY: return await this._fireWillEvent(this._onWillCreateFile, { files: files.map(f => URI.revive(f.target)) }, timeout, token); } return undefined;"} {"_id":"doc-en-vscode-50d6d4f32e2069ad555e82698e1887ce1fde66d1931f67a2c6d5864ff4c8f53a","title":"","text":" "} {"_id":"doc-en-vscode-88c803d04dca0adc97e43b50aacf424192d6411ba31d886d458081c17a2d7188","title":"","text":"return new Promise((resolve, reject) => { debugAdapter.sendRequest('initialize', { adapterID: 'test' }, (result) => { resolve(result); }); }, 3000); }); }"} {"_id":"doc-en-vscode-3380db85ce5a7d026e2644c7f9fe12de4a3a003d3bfee2d4283578b638fc230e","title":"","text":"super.dispose(); dispose(this._editorListeners); this._undoRedoService.removeElements(this.uri); // Only remove the undo redo stack if we map this cell uri to itself // If we are not in perCell mode, it will map to the full NotebookDocument and // we don't want to remove that entire document undo / redo stack when a cell is deleted if (this._undoRedoService.getUriComparisonKey(this.uri) === this.uri.toString()) { this._undoRedoService.removeElements(this.uri); } if (this._textModelRef) { this._textModelRef.dispose();"} {"_id":"doc-en-vscode-33ede6b488c4e6c44de76200e14d59a3c9722b3585caaa1eb000fcc99083f549","title":"","text":"readonly executingCommandObject: ITerminalCommand | undefined; /** The current cwd at the cursor's position. */ readonly cwd: string | undefined; /** * Whether a command is currently being input. If the a command is current not being input or * the state cannot reliably be detected the fallback of undefined will be used. */ readonly hasInput: boolean | undefined; readonly onCommandStarted: Event; readonly onCommandFinished: Event; readonly onCommandInvalidated: Event;"} {"_id":"doc-en-vscode-f1341c7e72f8693510070c9e35966c60f0e71e7a36c481897126d1098f4c8e40","title":"","text":"return undefined; } get cwd(): string | undefined { return this._cwd; } private get _isInputting(): boolean { return !!(this._currentCommand.commandStartMarker && !this._currentCommand.commandExecutedMarker); } get hasInput(): boolean | undefined { if (!this._isInputting || !this._currentCommand?.commandStartMarker) { return undefined; } if (this._terminal.buffer.active.baseY + this._terminal.buffer.active.cursorY === this._currentCommand.commandStartMarker?.line) { const line = this._terminal.buffer.active.getLine(this._terminal.buffer.active.cursorY)?.translateToString(true, this._currentCommand.commandStartX); if (line === undefined) { return undefined; } return line.length > 0; } return true; } private readonly _onCommandStarted = new Emitter(); readonly onCommandStarted = this._onCommandStarted.event;"} {"_id":"doc-en-vscode-6ceb9c859c0a46f86bc7ef72d0c9468dff7fa2611479fbfcaefa19fe2bdd1842","title":"","text":"} this._currentCommand.commandStartX = this._terminal.buffer.active.cursorX; this._currentCommand.commandStartMarker = options?.marker || this._terminal.registerMarker(0); // Clear executed as it must happen after command start this._currentCommand.commandExecutedMarker?.dispose(); this._currentCommand.commandExecutedMarker = undefined; this._currentCommand.commandExecutedX = undefined; for (const m of this._commandMarkers) { m.dispose(); } this._commandMarkers.length = 0; this._onCommandStarted.fire({ marker: options?.marker || this._currentCommand.commandStartMarker, markProperties: options?.markProperties } as ITerminalCommand); this._logService.debug('CommandDetectionCapability#handleCommandStart', this._currentCommand.commandStartX, this._currentCommand.commandStartMarker?.line); }"} {"_id":"doc-en-vscode-439269ddac3cea3b10b9457ca7b4eb107c61eac4cb82a1352c3d8c5ef95c694a","title":"","text":"import { showWithPinnedItems } from 'vs/platform/quickinput/browser/quickPickPin'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { timeout } from 'vs/base/common/async'; export async function showRunRecentQuickPick( accessor: ServicesAccessor,"} {"_id":"doc-en-vscode-7842f3f97d5cd8bd5598c7a8d7fb07980fcbcbd5f1733c806bb8bc02cd437171","title":"","text":"} else { // command text = result.rawLabel; } instance.sendText(text, !quickPick.keyMods.alt, true); quickPick.hide(); runCommand(instance, text, !quickPick.keyMods.alt); if (quickPick.keyMods.alt) { instance.focus(); }"} {"_id":"doc-en-vscode-198401ea0305579bbf77397a24263f4668459e73a6178ddca3936fa8980513e7","title":"","text":"}); } async function runCommand(instance: ITerminalInstance, commandLine: string, addNewLine: boolean): Promise { // Determine whether to send ETX (ctrl+c) before running the command. This should always // happen unless command detection can reliably say that a command is being entered and // there is no content in the prompt if (instance.capabilities.get(TerminalCapability.CommandDetection)?.hasInput !== false) { await instance.sendText('x03', false); // Wait a little before running the command to avoid the sequences being echoed while the ^C // is being evaluated await timeout(100); } // Use bracketed paste mode only when not running the command await instance.sendText(commandLine, addNewLine, !addNewLine); } class TerminalOutputProvider implements ITextModelContentProvider { static scheme = 'TERMINAL_OUTPUT';"} {"_id":"doc-en-vscode-a9ad458c3b316c695f2c46822f945e09d71e3cd0f36f06c72d2f28dea162d7a0","title":"","text":"import { IWorkbenchExtensionEnablementService, EnablementState } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { createDecorator, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { INotificationService, Severity } from 'vs/platform/notification/common/notification'; import { INotificationService } from 'vs/platform/notification/common/notification'; import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; import { IURLHandler, IURLService, IOpenURLOptions } from 'vs/platform/url/common/url'; import { IHostService } from 'vs/workbench/services/host/browser/host'; import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions'; import { IExtensionService, toExtensionDescription } from 'vs/workbench/services/extensions/common/extensions'; import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { Registry } from 'vs/platform/registry/common/platform';"} {"_id":"doc-en-vscode-f848a3387d5c531364032c40b56b0184f2b53d9c3f00a31ab069656459b63f7c","title":"","text":"const extension = await this.extensionService.getExtension(extensionId); if (!extension) { await this.handleUnhandledURL(uri, { id: extensionId }); await this.handleUnhandledURL(uri, { id: extensionId }, options); return true; }"} {"_id":"doc-en-vscode-afd1860a76fb7da3982ec7be59b52b3c5020d9a6d9e22404d593cbba563185b3","title":"","text":"return await handler.handleURL(uri, options); } private async handleUnhandledURL(uri: URI, extensionIdentifier: IExtensionIdentifier): Promise { private async handleUnhandledURL(uri: URI, extensionIdentifier: IExtensionIdentifier, options?: IOpenURLOptions): Promise { const installedExtensions = await this.extensionManagementService.getInstalled(); const extension = installedExtensions.filter(e => areSameExtensions(e.identifier, extensionIdentifier))[0]; // Extension is installed if (extension) { const enabled = this.extensionEnablementService.isEnabled(extension); // Extension is not running. Reload the window to handle. if (enabled) { this.telemetryService.publicLog2('uri_invoked/activate_extension/start', { extensionId: extensionIdentifier.id }); const result = await this.dialogService.confirm({ message: localize('reloadAndHandle', \"Extension '{0}' is not loaded. Would you like to reload the window to load the extension and open the URL?\", extension.manifest.displayName || extension.manifest.name), detail: `${extension.manifest.displayName || extension.manifest.name} (${extensionIdentifier.id}) wants to open a URL:nn${uri.toString()}`, primaryButton: localize('reloadAndOpen', \"&&Reload Window and Open\"), type: 'question' }); if (!result.confirmed) { this.telemetryService.publicLog2('uri_invoked/activate_extension/cancel', { extensionId: extensionIdentifier.id }); return; } this.telemetryService.publicLog2('uri_invoked/activate_extension/accept', { extensionId: extensionIdentifier.id }); await this.reloadAndHandle(uri); } // Extension is disabled. Enable the extension and reload the window to handle. else if (this.extensionEnablementService.canChangeEnablement(extension)) { this.telemetryService.publicLog2('uri_invoked/enable_extension/start', { extensionId: extensionIdentifier.id }); const result = await this.dialogService.confirm({ message: localize('enableAndHandle', \"Extension '{0}' is disabled. Would you like to enable the extension and reload the window to open the URL?\", extension.manifest.displayName || extension.manifest.name), detail: `${extension.manifest.displayName || extension.manifest.name} (${extensionIdentifier.id}) wants to open a URL:nn${uri.toString()}`, primaryButton: localize('enableAndReload', \"&&Enable and Open\"), type: 'question' }); if (!result.confirmed) { this.telemetryService.publicLog2('uri_invoked/enable_extension/cancel', { extensionId: extensionIdentifier.id }); return; } this.telemetryService.publicLog2('uri_invoked/enable_extension/accept', { extensionId: extensionIdentifier.id }); await this.extensionEnablementService.setEnablement([extension], EnablementState.EnabledGlobally); await this.reloadAndHandle(uri); } } let extension = installedExtensions.find(e => areSameExtensions(e.identifier, extensionIdentifier)); // Extension is not installed else { if (!extension) { let galleryExtension: IGalleryExtension | undefined; try {"} {"_id":"doc-en-vscode-fb784ac084752e03b867606d1eebc947ad68cae222bb772a6be084d0e3c2f2bb","title":"","text":"// Install the Extension and reload the window to handle. const result = await this.dialogService.confirm({ message: localize('installAndHandle', \"Extension '{0}' is not installed. Would you like to install the extension and reload the window to open this URL?\", galleryExtension.displayName || galleryExtension.name), message: localize('installAndHandle', \"Extension '{0}' is not installed. Would you like to install the extension and open this URL?\", galleryExtension.displayName || galleryExtension.name), detail: `${galleryExtension.displayName || galleryExtension.name} (${extensionIdentifier.id}) wants to open a URL:nn${uri.toString()}`, primaryButton: localize('install', \"&&Install\"), primaryButton: localize('install and open', \"&&Install and Open\"), type: 'question' });"} {"_id":"doc-en-vscode-7c1103ca92d7cdfbf52d244fd3e0375beaf291c514ad6eefd05ea9c8c5769a68","title":"","text":"this.telemetryService.publicLog2('uri_invoked/install_extension/accept', { extensionId: extensionIdentifier.id }); try { await this.progressService.withProgress({ extension = await this.progressService.withProgress({ location: ProgressLocation.Notification, title: localize('Installing', \"Installing Extension '{0}'...\", galleryExtension.displayName || galleryExtension.name) }, () => this.extensionManagementService.installFromGallery(galleryExtension!)); this.notificationService.prompt( Severity.Info, localize('reload', \"Would you like to reload the window and open the URL '{0}'?\", uri.toString()), [{ label: localize('Reload', \"Reload Window and Open\"), run: async () => { this.telemetryService.publicLog2('uri_invoked/install_extension/reload', { extensionId: extensionIdentifier.id }); await this.reloadAndHandle(uri); } }], { sticky: true } ); } catch (error) { this.notificationService.error(error); return; } } // Extension is installed but not enabled if (!this.extensionEnablementService.isEnabled(extension)) { this.telemetryService.publicLog2('uri_invoked/enable_extension/start', { extensionId: extensionIdentifier.id }); const result = await this.dialogService.confirm({ message: localize('enableAndHandle', \"Extension '{0}' is disabled. Would you like to enable the extension and open the URL?\", extension.manifest.displayName || extension.manifest.name), detail: `${extension.manifest.displayName || extension.manifest.name} (${extensionIdentifier.id}) wants to open a URL:nn${uri.toString()}`, primaryButton: localize('enableAndReload', \"&&Enable and Open\"), type: 'question' }); if (!result.confirmed) { this.telemetryService.publicLog2('uri_invoked/enable_extension/cancel', { extensionId: extensionIdentifier.id }); return; } this.telemetryService.publicLog2('uri_invoked/enable_extension/accept', { extensionId: extensionIdentifier.id }); await this.extensionEnablementService.setEnablement([extension], EnablementState.EnabledGlobally); } if (this.extensionService.canAddExtension(toExtensionDescription(extension))) { await this.waitUntilExtensionIsAdded(extensionIdentifier); await this.handleURL(uri, { ...options, trusted: true }); } /* Extension cannot be added and require window reload */ else { this.telemetryService.publicLog2('uri_invoked/activate_extension/start', { extensionId: extensionIdentifier.id }); const result = await this.dialogService.confirm({ message: localize('reloadAndHandle', \"Extension '{0}' is not loaded. Would you like to reload the window to load the extension and open the URL?\", extension.manifest.displayName || extension.manifest.name), detail: `${extension.manifest.displayName || extension.manifest.name} (${extensionIdentifier.id}) wants to open a URL:nn${uri.toString()}`, primaryButton: localize('reloadAndOpen', \"&&Reload Window and Open\"), type: 'question' }); if (!result.confirmed) { this.telemetryService.publicLog2('uri_invoked/activate_extension/cancel', { extensionId: extensionIdentifier.id }); return; } this.telemetryService.publicLog2('uri_invoked/activate_extension/accept', { extensionId: extensionIdentifier.id }); this.storageService.store(URL_TO_HANDLE, JSON.stringify(uri.toJSON()), StorageScope.WORKSPACE, StorageTarget.MACHINE); await this.hostService.reload(); } } private async reloadAndHandle(url: URI): Promise { this.storageService.store(URL_TO_HANDLE, JSON.stringify(url.toJSON()), StorageScope.WORKSPACE, StorageTarget.MACHINE); await this.hostService.reload(); private async waitUntilExtensionIsAdded(extensionId: IExtensionIdentifier): Promise { if (!(await this.extensionService.getExtension(extensionId.id))) { await new Promise((c, e) => { const disposable = this.extensionService.onDidChangeExtensions(async () => { try { if (await this.extensionService.getExtension(extensionId.id)) { disposable.dispose(); c(); } } catch (error) { e(error); } }); }); } } // forget about all uris buffered more than 5 minutes ago"} {"_id":"doc-en-vscode-f0922bbcb898853f97114f80507b6f27c40037c23a99ccb4d740d8bfa7a5cddd","title":"","text":"update_prompt() { PRIOR_PROMPT=\"$PS1\" IN_COMMAND_EXECUTION=\"\" PS1=\"$(prompt_start)$PREFIX$PS1$(prompt_end)\" PS2=\"$(continuation_start)$PS2$(continuation_end)\" PS1=\"[$(prompt_start)]$PREFIX$PS1[$(prompt_end)]\" PS2=\"[$(continuation_start)]$PS2[$(continuation_end)]\" } precmd() {"} {"_id":"doc-en-vscode-c112476ad3659ad509e2f8c5a026dae5d78025c6a283a8d182c70838f8f13864","title":"","text":"update_prompt() { PRIOR_PROMPT=\"$PS1\" IN_COMMAND_EXECUTION=\"\" PS1=\"$(prompt_start)$PREFIX$PS1$(prompt_end)\" PS2=\"$(continuation_start)$PS2$(continuation_end)\" PS1=\"%{$(prompt_start)%}$PREFIX$PS1%{$(prompt_end)%}\" PS2=\"%{$(continuation_start)%}$PS2%{$(continuation_end)%}\" } precmd() {"} {"_id":"doc-en-vscode-507408a32dea6902aecd318c2970f889f060039715006da4b03387e7eb208df6","title":"","text":"this.show(dto.revealLocation.range, TestingOutputPeek.lastHeightInLines || hintMessagePeekHeight(message)); this.editor.revealPositionNearTop(dto.revealLocation.range.getStartPosition(), ScrollType.Smooth); this.editor.focus(); return this.showInPlace(dto); }"} {"_id":"doc-en-vscode-20727827b0916643b99291a50f36bd677cdf73f7915549f949ddfa054d007849","title":"","text":"this.tree.setFocus([messageNode]); this.tree.setSelection([messageNode]); this.tree.domFocus(); })); this._register(this.tree.onDidOpen(async e => {"} {"_id":"doc-en-vscode-05a583908c04e5e0e1cdd58388c34547a7b1cb377d4209d488544be30a6fe6c1","title":"","text":"} } const lineBreakRe = /r?ns*/; const lineBreakRe = /r?ns*/g; class TestMessageDecoration implements ITestDecoration { public static readonly inlineClassName = 'test-message-inline-content';"} {"_id":"doc-en-vscode-a6683143a80e747c291b3881716eb3932f3bb984233b5d378ad4674bdc72690e","title":"","text":"if (pick) { const languageId = this.languageService.getLanguageIdByLanguageName(pick.label); if (typeof languageId === 'string') { return this.preferencesService.openUserSettings({ jsonEditor: true, revealSetting: { key: `[${languageId}]`, edit: true } }); return this.preferencesService.openLanguageSpecificSettings(languageId); } } return undefined;"} {"_id":"doc-en-vscode-6cab5b7456da05210f9e1cb65a3a77d435ca351e4d68de65cf897968f297729d","title":"","text":"return this.open(this.userSettingsResource, options); } openLanguageSpecificSettings(languageId: string, options: IOpenSettingsOptions = {}): Promise { if (this.shouldOpenJsonByDefault()) { options.query = undefined; options.revealSetting = { key: `[${languageId}]`, edit: true }; } else { options.query = `@lang:${languageId}${options.query ? ` ${options.query}` : ''}`; } options.target = options.target ?? ConfigurationTarget.USER_LOCAL; return this.open(this.userSettingsResource, options); } private open(settingsResource: URI, options: IOpenSettingsOptions): Promise { options = { ...options,"} {"_id":"doc-en-vscode-4e03aa6e168b55766504f49b771cc99726b81ba39f43b2806cdf868f00b76a24","title":"","text":"openFolderSettings(options: IOpenSettingsOptions & { folderUri: IOpenSettingsOptions['folderUri'] }): Promise; openGlobalKeybindingSettings(textual: boolean, options?: IKeybindingsEditorOptions): Promise; openDefaultKeybindingsFile(): Promise; openLanguageSpecificSettings(language: string, options?: IOpenSettingsOptions): Promise; getEditableSettingsURI(configurationTarget: ConfigurationTarget, resource?: URI): Promise; createSplitJsonEditorInput(configurationTarget: ConfigurationTarget, resource: URI): EditorInput;"} {"_id":"doc-en-vscode-ea2ddf4cb2c188789da1d5b19ee8a6c6af4e6713fd3aa0d0c854fdc9af6dfe7a","title":"","text":"return localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'callStackAriaLabel' }, \"Debug Call Stack\"); } getWidgetRole(): string { // Use treegrid as a role since each element can have additional actions inside #146210 return 'treegrid'; } getRole(_element: CallStackItem): string | undefined { return 'row'; } getAriaLabel(element: CallStackItem): string { if (element instanceof Thread) { return localize({ key: 'threadAriaLabel', comment: ['Placeholders stand for the thread name and the thread state.For example \"Thread 1\" and \"Stopped'] }, \"Thread {0} {1}\", element.name, element.stateLabel);"} {"_id":"doc-en-vscode-93bcff459065db5c31e92bc7de64c7dcc9d786c8fc8b596599b2e1518c1f668b","title":"","text":"dispose(): void; } function clearContainer(container: HTMLElement) { while (container.firstChild) { container.removeChild(container.firstChild); } } function renderImage(outputInfo: OutputItem, element: HTMLElement): IDisposable {"} {"_id":"doc-en-vscode-19ef89ae16b533395e9c63712662f4af2a58fe4ee613f8e9d6bbe07bbe5072ee","title":"","text":"}; function renderHTML(outputInfo: OutputItem, container: HTMLElement): void { clearContainer(container); const htmlContent = outputInfo.text(); const element = document.createElement('div'); const trustedHtml = ttPolicy?.createHTML(htmlContent) ?? htmlContent;"} {"_id":"doc-en-vscode-15734889420ff3645dd0854db443e788e149af48e6940dc0ac4564b12d4050d8","title":"","text":"} function renderText(outputInfo: OutputItem, container: HTMLElement, ctx: RendererContext & { readonly settings: { readonly lineLimit: number } }): void { clearContainer(container); const contentNode = document.createElement('div'); contentNode.classList.add('output-plaintext'); const text = outputInfo.text();"} {"_id":"doc-en-vscode-6d25116e3c70fb724933a6d714591b394d6b9bdf340a1b59029df6542d36865f","title":"","text":"disturl \"https://electronjs.org/headers\" target \"17.4.6\" target \"17.4.7\" runtime \"electron\" build_from_source \"true\""} {"_id":"doc-en-vscode-e7169fa967daabeb4802e7c0f2a0c09cae544cdfc4f452a11adddf014ce62385","title":"","text":"\"git\": { \"name\": \"electron\", \"repositoryUrl\": \"https://github.com/electron/electron\", \"commitHash\": \"3a1945bd6c62459a457bd8d0b922259234816e22\" \"commitHash\": \"66dd03293be5c6c7a06e1517bb80100030973be6\" } }, \"isOnlyProductionDependency\": true, \"license\": \"MIT\", \"version\": \"17.4.6\" \"version\": \"17.4.7\" }, { \"component\": {"} {"_id":"doc-en-vscode-fd5e157c3d1a7d80078e852fd51df21421547c149452fc2768d1cc4b58568b50","title":"","text":"\"cssnano\": \"^4.1.11\", \"debounce\": \"^1.0.0\", \"deemon\": \"^1.4.0\", \"electron\": \"17.4.6\", \"electron\": \"17.4.7\", \"eslint\": \"8.7.0\", \"eslint-plugin-header\": \"3.1.1\", \"eslint-plugin-jsdoc\": \"^19.1.0\","} {"_id":"doc-en-vscode-95a98dcb9a1f81eb0946f8773d28b59c85c90583da8a4bbfebfc93ff07f4f4df","title":"","text":"resolved \"https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.45.tgz#cf1144091d6683cbd45a231954a745f02fb24598\" integrity sha512-czF9eYVuOmlY/vxyMQz2rGlNSjZpxNQYBe1gmQv7al171qOIhgyO9k7D5AKlgeTCSPKk+LHhj5ZyIdmEub9oNg== electron@17.4.6: version \"17.4.6\" resolved \"https://registry.yarnpkg.com/electron/-/electron-17.4.6.tgz#4837b3adb2636992a33da734a77794dd932fb05c\" integrity sha512-9aPjlyWoVxchD/iw5KcbQ7ZaC5ezxsObBrMbGjpdMmDL5dktI0EkT6x2l2CYPZCi4rQG/6qlPfTZJeVPIIwI2Q== electron@17.4.7: version \"17.4.7\" resolved \"https://registry.yarnpkg.com/electron/-/electron-17.4.7.tgz#5ae9105f2ee28e6405c79c7101f0c956676da697\" integrity sha512-CMdUpd6oEwqbF7wcXwy9VNNXfTTbaeRg+zrGZciPzyzsEmJ9vzWcR1WpOxIQ4sIMjUyo1pFbvaD0VOgI2t4x3A== dependencies: \"@electron/get\" \"^1.13.0\" \"@types/node\" \"^14.6.2\""} {"_id":"doc-en-vscode-6a748e482d7b184e8b2045d626d7da41df15a7a48ea52d6fc5ffe99ede0a87dd","title":"","text":"disturl \"https://electronjs.org/headers\" target \"19.0.11\" target \"19.0.12\" runtime \"electron\" build_from_source \"true\""} {"_id":"doc-en-vscode-744ebe4bf77b601b91d6c389b46887de3de2cbb5ab571106cf4553a914a3832f","title":"","text":"\"git\": { \"name\": \"electron\", \"repositoryUrl\": \"https://github.com/electron/electron\", \"commitHash\": \"a5cafd174d2027529d0b251e5b8e58da2b364e5b\" \"commitHash\": \"b05ccd812e3bb3de5b1546a313e298961653e942\" } }, \"isOnlyProductionDependency\": true, \"license\": \"MIT\", \"version\": \"19.0.11\" \"version\": \"19.0.12\" }, { \"component\": {"} {"_id":"doc-en-vscode-92d76e3ccb4c3c5e4f1277d33dac138a018dd68799c7e178142d97c0830511a5","title":"","text":"\"cssnano\": \"^4.1.11\", \"debounce\": \"^1.0.0\", \"deemon\": \"^1.4.0\", \"electron\": \"19.0.11\", \"electron\": \"19.0.12\", \"eslint\": \"8.7.0\", \"eslint-plugin-header\": \"3.1.1\", \"eslint-plugin-jsdoc\": \"^39.3.2\","} {"_id":"doc-en-vscode-a4bf17629b8fa006d37baf2e13228eb7633bf5a30c6e257c3c0686bfa999f37e","title":"","text":"constructor(modulePath: string, args?: string[] | undefined, options?: UtilityProcessOptions); postMessage(channel: string, message: any, transfer?: Electron.MessagePortMain[]): void; kill(signal?: number | string): boolean; on(event: 'exit', listener: (code: number | undefined) => void): this; on(event: 'exit', listener: (event: Electron.Event, code: number) => void): this; on(event: 'spawn', listener: () => void): this; } }"} {"_id":"doc-en-vscode-c06917c007fb09262873950f452cda4744035616dc97e7ae4a906271e35e41e9","title":"","text":"this._register(Event.fromNodeEventEmitter(this._process, 'spawn')(() => { this._logService.info(`UtilityProcess<${this.id}>: received spawn event.`); })); this._register(Event.fromNodeEventEmitter(this._process, 'exit')((code: number | undefined) => { code = code || 0; const onExit = Event.fromNodeEventEmitter(this._process, 'exit', (_, code: number) => code); this._register(onExit((code: number) => { this._logService.info(`UtilityProcess<${this.id}>: received exit event with code ${code}.`); this._hasExited = true; this._onExit.fire({ pid: this._process!.pid!, code, signal: '' });"} {"_id":"doc-en-vscode-211688f9b6445ba29dc408ced4f38234e620e22b06cc2c3b30909e8f90da9872","title":"","text":"resolved \"https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.207.tgz#9c3310ebace2952903d05dcaba8abe3a4ed44c01\" integrity sha512-piH7MJDJp4rJCduWbVvmUd59AUne1AFBJ8JaRQvk0KzNTSUnZrVXHCZc+eg+CGE4OujkcLJznhGKD6tuAshj5Q== electron@19.0.11: version \"19.0.11\" resolved \"https://registry.yarnpkg.com/electron/-/electron-19.0.11.tgz#0c0a52abc08694fd38916d9270baf45bb7752a27\" integrity sha512-GPM6C1Ze17/gR4koTE171MxrI5unYfFRgXQdkMdpWM2Cd55LMUrVa0QHCsfKpsaloufv9T65lsOn0uZuzCw5UA== electron@19.0.12: version \"19.0.12\" resolved \"https://registry.yarnpkg.com/electron/-/electron-19.0.12.tgz#73d11cc2a3e4dbcd61fdc1c39561e7a7911046e9\" integrity sha512-GOvG0t2NCeJYIfmC3g/dnEAQ71k3nQDbRVqQhpi2YbsYMury0asGJwqnVAv2uZQEwCwSx4XOwOQARTFEG/msWw== dependencies: \"@electron/get\" \"^1.14.1\" \"@types/node\" \"^16.11.26\""} {"_id":"doc-en-vscode-c720007ccdc72622ab72c3a889267ef6fa4cd9c2426fa8879051a411fdc9373c","title":"","text":"code { font-size: 1em; font-family: var(--vscode-editor-font-family); } pre code { font-family: var(--vscode-editor-font-family); line-height: 1.357em; white-space: pre-wrap; }"} {"_id":"doc-en-vscode-11abde32baee8d6666696670af8437afffdb5dac36ae9b19022f16fadef4ea75","title":"","text":"if (token.type === 'heading') { yield { depth: token.depth, text: renderMarkdownAsPlaintext({ value: token.text }).trim() text: renderMarkdownAsPlaintext({ value: token.raw }).trim() }; } }"} {"_id":"doc-en-vscode-339361f00f817e15bad04e64bb616be2e160a6d341d9ac4eece88ed0679c0e37","title":"","text":"} } } const newDecorationIds = this._editor.deltaDecorations(decorationIdsToReplace, newDecorationsData.map(d => d.decoration)); for (let i = 0; i < newDecorationIds.length; i++) { const data = newDecorationsData[i]; this._decorationsMetadata.set(newDecorationIds[i], data); } this._editor.changeDecorations(accessor => { const newDecorationIds = accessor.deltaDecorations(decorationIdsToReplace, newDecorationsData.map(d => d.decoration)); for (let i = 0; i < newDecorationIds.length; i++) { const data = newDecorationsData[i]; this._decorationsMetadata.set(newDecorationIds[i], data); } }); } private _fillInColors(props: CssProperties, hint: languages.InlayHint): void {"} {"_id":"doc-en-vscode-3f1b8e222f7039ff75f529e5c6266d4006e1f9a159642879396bb2be12b77638","title":"","text":"import { IRequestContext, IRequestOptions, OfflineError } from 'vs/base/parts/request/common/request'; export function request(options: IRequestOptions, token: CancellationToken): Promise { if (!navigator.onLine) { throw new OfflineError(); } if (options.proxyAuthorization) { options.headers = { ...(options.headers || {}),"} {"_id":"doc-en-vscode-40a5a56f5d71ec6e39b08518bdede24b38bb544ca72f1d113dae9ac47235fc8b","title":"","text":"setRequestHeaders(xhr, options); xhr.responseType = 'arraybuffer'; xhr.onerror = e => reject(new Error(xhr.statusText && ('XHR failed: ' + xhr.statusText) || 'XHR failed')); xhr.onerror = e => reject( navigator.onLine ? new Error(xhr.statusText && ('XHR failed: ' + xhr.statusText) || 'XHR failed') : new OfflineError() ); xhr.onload = (e) => { resolve({ res: {"} {"_id":"doc-en-vscode-185fa931f98e2ff42494b1d0092af60a6f4e102d5650b3ea378b015950b85af0","title":"","text":"\"vscode-proxy-agent\": \"^0.12.0\", \"vscode-regexpp\": \"^3.1.0\", \"vscode-textmate\": \"7.0.1\", \"xterm\": \"4.19.0-beta.24\", \"xterm-addon-search\": \"0.9.0-beta.21\", \"xterm\": \"4.19.0-beta.25\", \"xterm-addon-search\": \"0.9.0-beta.22\", \"xterm-addon-serialize\": \"0.7.0-beta.12\", \"xterm-addon-unicode11\": \"0.4.0-beta.3\", \"xterm-addon-webgl\": \"0.12.0-beta.28\", \"xterm-headless\": \"4.19.0-beta.24\", \"xterm-addon-webgl\": \"0.12.0-beta.29\", \"xterm-headless\": \"4.19.0-beta.25\", \"yauzl\": \"^2.9.2\", \"yazl\": \"^2.4.3\" },"} {"_id":"doc-en-vscode-32a431e78be37cb943d52f877835907b847426e7efaaddae9a3ace34e23328e9","title":"","text":"\"tas-client-umd\": \"0.1.4\", \"vscode-oniguruma\": \"1.6.1\", \"vscode-textmate\": \"7.0.1\", \"xterm\": \"4.19.0-beta.24\", \"xterm-addon-search\": \"0.9.0-beta.21\", \"xterm\": \"4.19.0-beta.25\", \"xterm-addon-search\": \"0.9.0-beta.22\", \"xterm-addon-unicode11\": \"0.4.0-beta.3\", \"xterm-addon-webgl\": \"0.12.0-beta.28\" \"xterm-addon-webgl\": \"0.12.0-beta.29\" } }"} {"_id":"doc-en-vscode-4fd1b01337749835dcd0184774d8ab5fe8b9c5122c70f379866431c4366fd9b5","title":"","text":"resolved \"https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-7.0.1.tgz#8118a32b02735dccd14f893b495fa5389ad7de79\" integrity sha512-zQ5U/nuXAAMsh691FtV0wPz89nSkHbs+IQV8FDk+wew9BlSDhf4UmWGlWJfTR2Ti6xZv87Tj5fENzKf6Qk7aLw== xterm-addon-search@0.9.0-beta.21: version \"0.9.0-beta.21\" resolved \"https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0-beta.21.tgz#5348fe25676cdd89ce3be52ae62a316b6f266176\" integrity sha512-jh6kfRCpWRvZZkV9QghFYesSYHjybaLNEyYAD6uilZYfNHoGLa0zPgUkLOqoECL7K6rhBmSYOkKbc9MG4wNFMQ== xterm-addon-search@0.9.0-beta.22: version \"0.9.0-beta.22\" resolved \"https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0-beta.22.tgz#18f2eabda82709cdd64dee003879b586869e28a3\" integrity sha512-1I8W0bwjg6bUoNaESKHSkS9BN3Z9Xe44/zbUb6Un+pbb5Nun4LQvFwSLkAIdRrslxcbcHYIU/2Q7F1wCOWLbaA== xterm-addon-unicode11@0.4.0-beta.3: version \"0.4.0-beta.3\" resolved \"https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.4.0-beta.3.tgz#f350184155fafd5ad0d6fbf31d13e6ca7dea1efa\" integrity sha512-FryZAVwbUjKTmwXnm1trch/2XO60F5JsDvOkZhzobV1hm10sFLVuZpFyHXiUx7TFeeFsvNP+S77LAtWoeT5z+Q== xterm-addon-webgl@0.12.0-beta.28: version \"0.12.0-beta.28\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.12.0-beta.28.tgz#252f88fd15816c23789659a0e2545682cf1eec9c\" integrity sha512-xpqZRYlyv+aNdDl46W2Hi2fxakNvdJDmWhOwGHPjOmex+kOYdBvVn4rRZmJ7xrKFuQVOfzb3SQCmpZ/njCpBJA== xterm-addon-webgl@0.12.0-beta.29: version \"0.12.0-beta.29\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.12.0-beta.29.tgz#7a508595c4521d14d7ed4315a121f9e3f230a0f0\" integrity sha512-NcZBsD0ar3ZpQX070hDIsyEBl/StRMNu6U+9crNpiD2rQVfkM1vcWkOv31Zlj3eu6/f8z5aStyZLRMCGFwiRbA== xterm@4.19.0-beta.24: version \"4.19.0-beta.24\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-4.19.0-beta.24.tgz#12b62877d4cf133f4626db3a15f6ed267b3bbcb5\" integrity sha512-GydvC2ExdsfjkiXhUVuZtDhc89IZfyMLFgw/nwWHrvkyq4iCVsHbMloEObV3lZmv+0oRpcGtTiorfzdWGiHG0A== xterm@4.19.0-beta.25: version \"4.19.0-beta.25\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-4.19.0-beta.25.tgz#38f92d0fef1cfdb290ef8994449a04fa1a8c90a7\" integrity sha512-pDiMWKN1Cj4+X/K9Xegp0SA0ZDEGVqiq7RPSy8oZO2wo2rze1BF20PAZb3/RSp30eY5WyOKilKnck4yNOsPzHw== "} {"_id":"doc-en-vscode-03e97742a64c9088483106e3767fd6afa8adbbed1800674fb4f740b94a979314","title":"","text":"resolved \"https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f\" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= xterm-addon-search@0.9.0-beta.21: version \"0.9.0-beta.21\" resolved \"https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0-beta.21.tgz#5348fe25676cdd89ce3be52ae62a316b6f266176\" integrity sha512-jh6kfRCpWRvZZkV9QghFYesSYHjybaLNEyYAD6uilZYfNHoGLa0zPgUkLOqoECL7K6rhBmSYOkKbc9MG4wNFMQ== xterm-addon-search@0.9.0-beta.22: version \"0.9.0-beta.22\" resolved \"https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0-beta.22.tgz#18f2eabda82709cdd64dee003879b586869e28a3\" integrity sha512-1I8W0bwjg6bUoNaESKHSkS9BN3Z9Xe44/zbUb6Un+pbb5Nun4LQvFwSLkAIdRrslxcbcHYIU/2Q7F1wCOWLbaA== xterm-addon-serialize@0.7.0-beta.12: version \"0.7.0-beta.12\""} {"_id":"doc-en-vscode-5b0cf15afb4c151a5191547e90540041bc4c17b5cd1f78b3677a612d698a92c9","title":"","text":"resolved \"https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.4.0-beta.3.tgz#f350184155fafd5ad0d6fbf31d13e6ca7dea1efa\" integrity sha512-FryZAVwbUjKTmwXnm1trch/2XO60F5JsDvOkZhzobV1hm10sFLVuZpFyHXiUx7TFeeFsvNP+S77LAtWoeT5z+Q== xterm-addon-webgl@0.12.0-beta.28: version \"0.12.0-beta.28\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.12.0-beta.28.tgz#252f88fd15816c23789659a0e2545682cf1eec9c\" integrity sha512-xpqZRYlyv+aNdDl46W2Hi2fxakNvdJDmWhOwGHPjOmex+kOYdBvVn4rRZmJ7xrKFuQVOfzb3SQCmpZ/njCpBJA== xterm-addon-webgl@0.12.0-beta.29: version \"0.12.0-beta.29\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.12.0-beta.29.tgz#7a508595c4521d14d7ed4315a121f9e3f230a0f0\" integrity sha512-NcZBsD0ar3ZpQX070hDIsyEBl/StRMNu6U+9crNpiD2rQVfkM1vcWkOv31Zlj3eu6/f8z5aStyZLRMCGFwiRbA== xterm-headless@4.19.0-beta.24: version \"4.19.0-beta.24\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-4.19.0-beta.24.tgz#17dab68ae1b2600b0926d4c47032599f3b2f24cc\" integrity sha512-Coq8gQ9f5/kNr1yhpXTZqatTOHOYDF4XVp93SM12vRROH64bM0rUMec6ukuTAd8DD97UOWYUgR+n7+xD0iTTSg== xterm-headless@4.19.0-beta.25: version \"4.19.0-beta.25\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-4.19.0-beta.25.tgz#a0a1b59f386c44458f06b8ced64e3567371cc983\" integrity sha512-UswSgymk3g9i6XTpFAasnqqIvWhi+AEWT+iO3kkjII6ll+dYEQgeZAv92EnCmeRHp11u5TP+IBAo8jy+aTYbtA== xterm@4.19.0-beta.24: version \"4.19.0-beta.24\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-4.19.0-beta.24.tgz#12b62877d4cf133f4626db3a15f6ed267b3bbcb5\" integrity sha512-GydvC2ExdsfjkiXhUVuZtDhc89IZfyMLFgw/nwWHrvkyq4iCVsHbMloEObV3lZmv+0oRpcGtTiorfzdWGiHG0A== xterm@4.19.0-beta.25: version \"4.19.0-beta.25\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-4.19.0-beta.25.tgz#38f92d0fef1cfdb290ef8994449a04fa1a8c90a7\" integrity sha512-pDiMWKN1Cj4+X/K9Xegp0SA0ZDEGVqiq7RPSy8oZO2wo2rze1BF20PAZb3/RSp30eY5WyOKilKnck4yNOsPzHw== yallist@^4.0.0: version \"4.0.0\""} {"_id":"doc-en-vscode-c8c3ec4661b754f2e6bbd2a19af6d95213f610d7bd22a1a25d50e9ec4035ef85","title":"","text":"import { KeyCode } from 'vs/base/common/keyCodes'; import { FindReplaceState } from 'vs/editor/contrib/find/browser/findState'; import { IMessage as InputBoxMessage } from 'vs/base/browser/ui/inputbox/inputBox'; import { SimpleButton, findPreviousMatchIcon, findNextMatchIcon } from 'vs/editor/contrib/find/browser/findWidget'; import { SimpleButton, findPreviousMatchIcon, findNextMatchIcon, NLS_NO_RESULTS, NLS_MATCHES_LOCATION } from 'vs/editor/contrib/find/browser/findWidget'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { editorWidgetBackground, inputActiveOptionBorder, inputActiveOptionBackground, inputActiveOptionForeground, inputBackground, inputBorder, inputForeground, inputValidationErrorBackground, inputValidationErrorBorder, inputValidationErrorForeground, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationInfoForeground, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationWarningForeground, widgetShadow, editorWidgetForeground, errorForeground } from 'vs/platform/theme/common/colorRegistry'; import { IColorTheme, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { ContextScopedFindInput } from 'vs/platform/history/browser/contextScopedHistoryWidget'; import { widgetClose } from 'vs/platform/theme/common/iconRegistry'; import * as strings from 'vs/base/common/strings'; const NLS_FIND_INPUT_LABEL = nls.localize('label.find', \"Find\"); const NLS_FIND_INPUT_\" = nls.localize('placeholder.find', \"Find\");"} {"_id":"doc-en-vscode-91f12faf963f671dc0cb75ebc61655b8ce12ea88d4da5895010fb2c1b8987de6","title":"","text":"this._matchesCount.className = 'matchesCount'; } this._matchesCount.innerText = ''; const label = count === undefined || count.resultCount === 0 ? `No Results` : `${count.resultIndex + 1} of ${count.resultCount}`; let label; if (count?.resultCount === -1) { label = ''; } else { label = count === undefined || count.resultCount === 0 ? NLS_NO_RESULTS : strings.format(NLS_MATCHES_LOCATION, count.resultIndex + 1, count?.resultCount); } this._matchesCount.appendChild(document.createTextNode(label)); this._matchesCount.classList.toggle('no-results', !count || count.resultCount === 0); this._findInput?.domNode.insertAdjacentElement('afterend', this._matchesCount);"} {"_id":"doc-en-vscode-f24a9f52937e7a1cc027b73dcfcb55c0bea18f40fcdc83686fdb61eab1b8a109","title":"","text":"dependencies: object-keys \"~0.4.0\" xterm-addon-search@0.9.0-beta.21: version \"0.9.0-beta.21\" resolved \"https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0-beta.21.tgz#5348fe25676cdd89ce3be52ae62a316b6f266176\" integrity sha512-jh6kfRCpWRvZZkV9QghFYesSYHjybaLNEyYAD6uilZYfNHoGLa0zPgUkLOqoECL7K6rhBmSYOkKbc9MG4wNFMQ== xterm-addon-search@0.9.0-beta.22: version \"0.9.0-beta.22\" resolved \"https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0-beta.22.tgz#18f2eabda82709cdd64dee003879b586869e28a3\" integrity sha512-1I8W0bwjg6bUoNaESKHSkS9BN3Z9Xe44/zbUb6Un+pbb5Nun4LQvFwSLkAIdRrslxcbcHYIU/2Q7F1wCOWLbaA== xterm-addon-serialize@0.7.0-beta.12: version \"0.7.0-beta.12\""} {"_id":"doc-en-vscode-1915c79c07d9daf93eef235a01fec1e672becb6e2a1eebafcec8221b51a5f1bd","title":"","text":"resolved \"https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.4.0-beta.3.tgz#f350184155fafd5ad0d6fbf31d13e6ca7dea1efa\" integrity sha512-FryZAVwbUjKTmwXnm1trch/2XO60F5JsDvOkZhzobV1hm10sFLVuZpFyHXiUx7TFeeFsvNP+S77LAtWoeT5z+Q== xterm-addon-webgl@0.12.0-beta.28: version \"0.12.0-beta.28\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.12.0-beta.28.tgz#252f88fd15816c23789659a0e2545682cf1eec9c\" integrity sha512-xpqZRYlyv+aNdDl46W2Hi2fxakNvdJDmWhOwGHPjOmex+kOYdBvVn4rRZmJ7xrKFuQVOfzb3SQCmpZ/njCpBJA== xterm-addon-webgl@0.12.0-beta.29: version \"0.12.0-beta.29\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.12.0-beta.29.tgz#7a508595c4521d14d7ed4315a121f9e3f230a0f0\" integrity sha512-NcZBsD0ar3ZpQX070hDIsyEBl/StRMNu6U+9crNpiD2rQVfkM1vcWkOv31Zlj3eu6/f8z5aStyZLRMCGFwiRbA== xterm-headless@4.19.0-beta.24: version \"4.19.0-beta.24\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-4.19.0-beta.24.tgz#17dab68ae1b2600b0926d4c47032599f3b2f24cc\" integrity sha512-Coq8gQ9f5/kNr1yhpXTZqatTOHOYDF4XVp93SM12vRROH64bM0rUMec6ukuTAd8DD97UOWYUgR+n7+xD0iTTSg== xterm-headless@4.19.0-beta.25: version \"4.19.0-beta.25\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-4.19.0-beta.25.tgz#a0a1b59f386c44458f06b8ced64e3567371cc983\" integrity sha512-UswSgymk3g9i6XTpFAasnqqIvWhi+AEWT+iO3kkjII6ll+dYEQgeZAv92EnCmeRHp11u5TP+IBAo8jy+aTYbtA== xterm@4.19.0-beta.24: version \"4.19.0-beta.24\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-4.19.0-beta.24.tgz#12b62877d4cf133f4626db3a15f6ed267b3bbcb5\" integrity sha512-GydvC2ExdsfjkiXhUVuZtDhc89IZfyMLFgw/nwWHrvkyq4iCVsHbMloEObV3lZmv+0oRpcGtTiorfzdWGiHG0A== xterm@4.19.0-beta.25: version \"4.19.0-beta.25\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-4.19.0-beta.25.tgz#38f92d0fef1cfdb290ef8994449a04fa1a8c90a7\" integrity sha512-pDiMWKN1Cj4+X/K9Xegp0SA0ZDEGVqiq7RPSy8oZO2wo2rze1BF20PAZb3/RSp30eY5WyOKilKnck4yNOsPzHw== y18n@^3.2.1: version \"3.2.2\""} {"_id":"doc-en-vscode-37c33e564799c5df09fdad754ccdb36611db458f986d468830babea60926324f","title":"","text":"const no = localize('no', \"No\"); const answer = await window.showInformationMessage(localize('fork', \"You don't have permissions to push to '{0}/{1}' on GitHub. Would you like to create a fork and push to it instead?\", owner, repo), yes, no); if (answer === no) { if (answer !== yes) { return; }"} {"_id":"doc-en-vscode-351e7aad25a151c3bff94109b74537e91790bd30fe146ed31063f9312edaa68e","title":"","text":"import { IEditorContribution } from 'vs/editor/common/editorCommon'; import { ITextModel } from 'vs/editor/common/model'; import * as nls from 'vs/nls'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; import { IConfirmationResult, IDialogService } from 'vs/platform/dialogs/common/dialogs'; const ignoreUnusualLineTerminators = 'ignoreUnusualLineTerminators';"} {"_id":"doc-en-vscode-c745152bd9e3fa02e99beeaec727ad251762544f3d2ca81749882012f32af295","title":"","text":"public static readonly ID = 'editor.contrib.unusualLineTerminatorsDetector'; private _config: 'auto' | 'off' | 'prompt'; private _isPresentingDialog: boolean = false; constructor( private readonly _editor: ICodeEditor,"} {"_id":"doc-en-vscode-3bf7d955cb557223aa22ccbcf400285a3a9616014acf4267bfb9a9923c9c4c8a","title":"","text":"return; } const result = await this._dialogService.confirm({ title: nls.localize('unusualLineTerminators.title', \"Unusual Line Terminators\"), message: nls.localize('unusualLineTerminators.message', \"Detected unusual line terminators\"), detail: nls.localize('unusualLineTerminators.detail', \"The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).nnIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.\", basename(model.uri)), primaryButton: nls.localize('unusualLineTerminators.fix', \"Remove Unusual Line Terminators\"), secondaryButton: nls.localize('unusualLineTerminators.ignore', \"Ignore\") }); if (this._isPresentingDialog) { // we're currently showing the dialog, which is async. // avoid spamming the user return; } let result: IConfirmationResult; try { this._isPresentingDialog = true; result = await this._dialogService.confirm({ title: nls.localize('unusualLineTerminators.title', \"Unusual Line Terminators\"), message: nls.localize('unusualLineTerminators.message', \"Detected unusual line terminators\"), detail: nls.localize('unusualLineTerminators.detail', \"The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).nnIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.\", basename(model.uri)), primaryButton: nls.localize('unusualLineTerminators.fix', \"Remove Unusual Line Terminators\"), secondaryButton: nls.localize('unusualLineTerminators.ignore', \"Ignore\") }); } finally { this._isPresentingDialog = false; } if (!result.confirmed) { // this model should be ignored"} {"_id":"doc-en-vscode-4fff5cdcc550edfc7624921e8422770be2aa555c7227340fc8e6783821f43fd4","title":"","text":"contextKey.set(true); this.compositeBar.addComposite({ id: viewContainer.id, name: viewContainer.title, order: viewContainer.order, requestedIndex: viewContainer.requestedIndex }); const activeComposite = this.getActiveComposite(); if (activeComposite === undefined || activeComposite.getId() === viewContainer.id) { this.compositeBar.activateComposite(viewContainer.id); if (this.layoutService.isVisible(this.partId)) { const activeComposite = this.getActiveComposite(); if (activeComposite === undefined || activeComposite.getId() === viewContainer.id) { this.compositeBar.activateComposite(viewContainer.id); } } this.layoutCompositeBar();"} {"_id":"doc-en-vscode-0e29f36735e0b1acccfcbabce24c790b01e1135eccb26d4a377b7d5b3fb9f2a3","title":"","text":"// User data let userDataProvider; if (indexedDB) { userDataProvider = new IndexedDBFileSystemProvider(logsPath.scheme, indexedDB, userDataStore, false); userDataProvider = new IndexedDBFileSystemProvider(Schemas.vscodeUserData, indexedDB, userDataStore, true); this.registerDeveloperActions(userDataProvider); } else { logService.info('Using in-memory user data provider');"} {"_id":"doc-en-vscode-b58800ba2a7c2aa0692ef325a8304bf89cbc541f3f033fca58b59af82390f230","title":"","text":"public static readonly layoutStatusbar = new Codicon('layout-statusbar', { fontCharacter: 'ebf5' }); public static readonly layoutMenubar = new Codicon('layout-menubar', { fontCharacter: 'ebf6' }); public static readonly layoutCentered = new Codicon('layout-centered', { fontCharacter: 'ebf7' }); public static readonly layoutSidebarRightOff = new Codicon('layout-sidebar-right-off', { fontCharacter: 'ec00' }); public static readonly layoutPanelOff = new Codicon('layout-panel-off', { fontCharacter: 'ec01' }); public static readonly layoutSidebarLeftOff = new Codicon('layout-sidebar-left-off', { fontCharacter: 'ec02' }); public static readonly target = new Codicon('target', { fontCharacter: 'ebf8' }); public static readonly indent = new Codicon('indent', { fontCharacter: 'ebf9' }); public static readonly recordSmall = new Codicon('record-small', { fontCharacter: 'ebfa' });"} {"_id":"doc-en-vscode-2b5420c92a4946e76b19a3bf9a3c1e925a81cd60873256d87aea1ebc2358a424","title":"","text":"if (beforeCommandExecution && !this._placeholderDecoration) { this._placeholderDecoration = decoration; this._placeholderDecoration.onDispose(() => this._placeholderDecoration = undefined); } else { } else if (!this._decorations.get(decoration.marker.id)) { decoration.onDispose(() => this._decorations.delete(decoration.marker.id)); this._decorations.set(decoration.marker.id, {"} {"_id":"doc-en-vscode-cac51cb5f0ad7c46fd2a86fee7d2d2fa77ddd2222b40fe8806d202d758513c9d","title":"","text":"getTargetPlatform(): Promise; scanAllExtensions(systemScanOptions: ScanOptions, userScanOptions: ScanOptions): Promise; scanAllExtensions(systemScanOptions: ScanOptions, userScanOptions: ScanOptions, includeExtensionsUnderDev: boolean): Promise; scanSystemExtensions(scanOptions: ScanOptions): Promise; scanUserExtensions(scanOptions: ScanOptions): Promise; scanExtensionsUnderDevelopment(scanOptions: ScanOptions, existingExtensions: IScannedExtension[]): Promise;"} {"_id":"doc-en-vscode-aa03121fb794f06a62a43b2b8b9bafe746287459430a6f8cde2b26bdaa1ffc5c","title":"","text":"return this._targetPlatformPromise; } async scanAllExtensions(systemScanOptions: ScanOptions, userScanOptions: ScanOptions): Promise { async scanAllExtensions(systemScanOptions: ScanOptions, userScanOptions: ScanOptions, includeExtensionsUnderDev: boolean): Promise { const [system, user] = await Promise.all([ this.scanSystemExtensions(systemScanOptions), this.scanUserExtensions(userScanOptions), ]); const development = await this.scanExtensionsUnderDevelopment(systemScanOptions, [...system, ...user]); const development = includeExtensionsUnderDev ? await this.scanExtensionsUnderDevelopment(systemScanOptions, [...system, ...user]) : []; return this.dedupExtensions(system, user, development, await this.getTargetPlatform(), true); }"} {"_id":"doc-en-vscode-12904f20072493b97ff6f14cb6fa67895825cdef54e5da85cfe7c6b62f51f610","title":"","text":"const userScanOptions: ScanOptions = { includeInvalid: true, profileLocation }; let scannedExtensions: IScannedExtension[] = []; if (type === null || type === ExtensionType.System) { scannedExtensions.push(...await this.extensionsScannerService.scanAllExtensions({ includeInvalid: true }, userScanOptions)); scannedExtensions.push(...await this.extensionsScannerService.scanAllExtensions({ includeInvalid: true }, userScanOptions, false)); } else if (type === ExtensionType.User) { scannedExtensions.push(...await this.extensionsScannerService.scanUserExtensions(userScanOptions)); }"} {"_id":"doc-en-vscode-469edf69b545b227b34eaa75f27426c41ce2062a504e30c27cc0172e57e4ae88","title":"","text":"export default class TypeScriptServiceClient extends Disposable implements ITypeScriptServiceClient { private readonly pathSeparator: string; private readonly emptyAuthority = 'ts-nul-authority'; private readonly inMemoryResourcePrefix = '^'; private readonly workspaceState: vscode.Memento;"} {"_id":"doc-en-vscode-cde8f4634d59ad9480fc6597f2c8cc81c6da11f248ca0714b40e7de2c9623331","title":"","text":"{ return this.inMemoryResourcePrefix + '/' + resource.scheme + '/' + resource.authority + '/' + (resource.authority || this.emptyAuthority) + (resource.path.startsWith('/') ? resource.path : '/' + resource.path) + (resource.fragment ? '#' + resource.fragment : ''); }"} {"_id":"doc-en-vscode-961702f063b902a051ef37f96f7e1f2033948e46b39ae89bdb8a83cd08193b5c","title":"","text":"} if (filepath.startsWith(this.inMemoryResourcePrefix)) { const parts = filepath.match(/^^/([^/]+)/(.+)$/); const parts = filepath.match(/^^/([^/]+)/([^/]*)/(.+)$/); if (parts) { const resource = vscode.Uri.parse(parts[1] + '://' + parts[2]); const resource = vscode.Uri.parse(parts[1] + '://' + (parts[2] === this.emptyAuthority ? '' : parts[2]) + '/' + parts[3]); return this.bufferSyncSupport.toVsCodeResource(resource); } }"} {"_id":"doc-en-vscode-6265706ac384ae9b2ee8fbbcc036e2c5d4a74af73fb34ddf8bbdcadfd623863b","title":"","text":"this._buttonElements.forEach(b => b.remove()); const groups = menu.getActions({ shouldForwardArgs: true }); let isPrimary: boolean = true; for (const group of groups) { const [, actions] = group; this._actions = actions; actions.forEach(action => { const button = new Button(this.container); for (const action of actions) { const button = new Button(this.container, { secondary: !isPrimary }); isPrimary = false; this._buttonElements.push(button.element); this._toDispose.add(button);"} {"_id":"doc-en-vscode-c28fb3aa6d4289adeffefcb23dcdc72e48c49d4f6f8034123a605e7adfec8b7d","title":"","text":"button.enabled = action.enabled; button.label = action.label; }); } } }"} {"_id":"doc-en-vscode-2acc1c6c6e3dfd2b901852a00e778fb348be95410c2373b536132d4397e710a7","title":"","text":"padding: 10px 0; } .review-widget .body .edit-container .form-actions { display: flex; justify-content: flex-end; } .review-widget .body .edit-textarea { height: 90px; margin: 5px 0 10px 0;"} {"_id":"doc-en-vscode-6f05de8dec5630a798c8407124e4bbac75bbd178834a3eecd21f284c4ced825f","title":"","text":"margin-bottom: 5px; } .review-widget .body .comment-form .monaco-text-button { .review-widget .body .form-actions .monaco-text-button { float: right; }"} {"_id":"doc-en-vscode-900724a6576ae9b662a4a86e66a109aa9c699e033a72398de935ed0625a34ddf","title":"","text":"} } async function runCell(accessor: ServicesAccessor, context: INotebookActionContext): Promise { const editorGroupService = accessor.get(IEditorGroupsService); const group = editorGroupService.activeGroup; async function runCell(editorGroupsService: IEditorGroupsService, context: INotebookActionContext): Promise { const group = editorGroupsService.activeGroup; if (group) { if (group.activeEditor) {"} {"_id":"doc-en-vscode-5e84018ca5e195f028420ae8009d0fa0c975e12e69d112e9ce143d6aebeb3b33","title":"","text":"} async runWithContext(accessor: ServicesAccessor, context: INotebookCommandContext | INotebookCellToolbarActionContext): Promise { const editorGroupsService = accessor.get(IEditorGroupsService); if (context.ui) { await context.notebookEditor.focusNotebookCell(context.cell, 'container', { skipReveal: true }); } return runCell(accessor, context); return runCell(editorGroupsService, context); } });"} {"_id":"doc-en-vscode-5a07216f5daa1f3dc379535fc1e996330880d805cc9203561681c336bbba0438","title":"","text":"} async runWithContext(accessor: ServicesAccessor, context: INotebookCommandContext | INotebookCellToolbarActionContext): Promise { const editorGroupsService = accessor.get(IEditorGroupsService); if (context.ui) { await context.notebookEditor.focusNotebookCell(context.cell, 'container', { skipReveal: true }); } else {"} {"_id":"doc-en-vscode-2bb5fe77ad00dafab9d56ec1f30939e088b1550951896df7759e40301bdb915c","title":"","text":"} } await runCell(accessor, context); await runCell(editorGroupsService, context); } });"} {"_id":"doc-en-vscode-39c3881d3147066d2796bc09024925e3e1772b7eba1e5416effcd1134a5c0828","title":"","text":"} async runWithContext(accessor: ServicesAccessor, context: INotebookCellActionContext): Promise { const editorGroupsService = accessor.get(IEditorGroupsService); const idx = context.notebookEditor.getCellIndex(context.cell); if (typeof idx !== 'number') { return;"} {"_id":"doc-en-vscode-09f707af2465c96e7bf1642b82f842e90f946a50b36439f56f6170a5887f2a56","title":"","text":"} } return runCell(accessor, context); return runCell(editorGroupsService, context); } } });"} {"_id":"doc-en-vscode-8a2af520612c33b744f177057479a8438957a49bfbfd44c6c8eead8c37451908","title":"","text":"} async runWithContext(accessor: ServicesAccessor, context: INotebookCellActionContext): Promise { const editorGroupsService = accessor.get(IEditorGroupsService); const idx = context.notebookEditor.getCellIndex(context.cell); const languageService = accessor.get(ILanguageService); const newFocusMode = context.cell.focusMode === CellFocusMode.Editor ? 'editor' : 'container';"} {"_id":"doc-en-vscode-b987e949b346351178de05fd757b9da86952d90d27fd9897c8813fbba7549385","title":"","text":"if (context.cell.cellKind === CellKind.Markup) { context.cell.updateEditState(CellEditState.Preview, EXECUTE_CELL_INSERT_BELOW); } else { runCell(accessor, context); runCell(editorGroupsService, context); } } });"} {"_id":"doc-en-vscode-87a0064a3274e8a7081ab600f9cb609e256fb1b74305e05b7bf86faf987d591c","title":"","text":"\"vscode-proxy-agent\": \"^0.12.0\", \"vscode-regexpp\": \"^3.1.0\", \"vscode-textmate\": \"7.0.1\", \"xterm\": \"4.19.0-beta.47\", \"xterm\": \"4.19.0-beta.49\", \"xterm-addon-search\": \"0.9.0-beta.37\", \"xterm-addon-serialize\": \"0.7.0-beta.12\", \"xterm-addon-unicode11\": \"0.4.0-beta.3\", \"xterm-addon-webgl\": \"0.12.0-beta.36\", \"xterm-headless\": \"4.19.0-beta.47\", \"xterm-headless\": \"4.19.0-beta.49\", \"yauzl\": \"^2.9.2\", \"yazl\": \"^2.4.3\" },"} {"_id":"doc-en-vscode-0dbdd63776128722025f61733c3ac588f441223c843064e0475913e4e1cdc23a","title":"","text":"\"tas-client-umd\": \"0.1.5\", \"vscode-oniguruma\": \"1.6.1\", \"vscode-textmate\": \"7.0.1\", \"xterm\": \"4.19.0-beta.47\", \"xterm\": \"4.19.0-beta.49\", \"xterm-addon-search\": \"0.9.0-beta.37\", \"xterm-addon-unicode11\": \"0.4.0-beta.3\", \"xterm-addon-webgl\": \"0.12.0-beta.36\""} {"_id":"doc-en-vscode-ac435fa8c2f150ac7641650dc438bc0ccd49ef41238db5fe9faef77a7cc4cddd","title":"","text":"resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.12.0-beta.36.tgz#460f80829a78c979a448d5b764699af3f0366ff1\" integrity sha512-sgX7OHSGZQZE5b4xtPqd/5NEcll0Z+00tnTVxKZlXf5XEENcG0tnBF4I4f+k9K3cmjE1UIUVG2yYPrqWlYCdpA== xterm@4.19.0-beta.47: version \"4.19.0-beta.47\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-4.19.0-beta.47.tgz#f5931201346a485e3bcb29d24e83583727e55707\" integrity sha512-c8EcCSWCHnFYNdRMTnJIpYTV9J2Ze7kdB1GhTcPO2ipMEsqaP/u6Ca8rgBWwV9HeEVfe4rGRqWW2qcSy4U9hMQ== xterm@4.19.0-beta.49: version \"4.19.0-beta.49\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-4.19.0-beta.49.tgz#96d0d748c97a2f0cfa4c6112bc4de8b0d5d559fe\" integrity sha512-qPhOeGtnB357mZOvfDckVlPDR7EDkSASQrB3aujhjgJlOiBBqcNRJcuSvF7v1DOho7xdEI9UQxiSiT5diHhMlg== "} {"_id":"doc-en-vscode-9c3ed7ab28b083064dc8e6791ef36a9bb7c591c7d385c27a46c1b060f18418f6","title":"","text":"resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.12.0-beta.36.tgz#460f80829a78c979a448d5b764699af3f0366ff1\" integrity sha512-sgX7OHSGZQZE5b4xtPqd/5NEcll0Z+00tnTVxKZlXf5XEENcG0tnBF4I4f+k9K3cmjE1UIUVG2yYPrqWlYCdpA== xterm-headless@4.19.0-beta.47: version \"4.19.0-beta.47\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-4.19.0-beta.47.tgz#9d5af8145c42b9a6241a040bb244b877c149761b\" integrity sha512-chVTURPMNDEerQIsN4lIRotpXCfJsTHioZGQxDBNdktZO1gMXGvNxDjzsbsJg5ikLN5llz/HLDfXZrjCeb3elg== xterm@4.19.0-beta.47: version \"4.19.0-beta.47\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-4.19.0-beta.47.tgz#f5931201346a485e3bcb29d24e83583727e55707\" integrity sha512-c8EcCSWCHnFYNdRMTnJIpYTV9J2Ze7kdB1GhTcPO2ipMEsqaP/u6Ca8rgBWwV9HeEVfe4rGRqWW2qcSy4U9hMQ== xterm-headless@4.19.0-beta.49: version \"4.19.0-beta.49\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-4.19.0-beta.49.tgz#8e4178620be9a9dee25a586ef992a6fc621a829a\" integrity sha512-uRnHpR2pv1MJPbE3sa7XbP6x0uHubAWVMbiD26e3a5ICtWJQVVpLojkA0t4qU7CoMX85pRL1rIclg9CKY0B0xA== xterm@4.19.0-beta.49: version \"4.19.0-beta.49\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-4.19.0-beta.49.tgz#96d0d748c97a2f0cfa4c6112bc4de8b0d5d559fe\" integrity sha512-qPhOeGtnB357mZOvfDckVlPDR7EDkSASQrB3aujhjgJlOiBBqcNRJcuSvF7v1DOho7xdEI9UQxiSiT5diHhMlg== yallist@^4.0.0: version \"4.0.0\""} {"_id":"doc-en-vscode-98dda5e34e8f6c15fbfe92f74439f5d0ac8fc7466d69cd37e441c8ecf6d2d7b6","title":"","text":"resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.12.0-beta.36.tgz#460f80829a78c979a448d5b764699af3f0366ff1\" integrity sha512-sgX7OHSGZQZE5b4xtPqd/5NEcll0Z+00tnTVxKZlXf5XEENcG0tnBF4I4f+k9K3cmjE1UIUVG2yYPrqWlYCdpA== xterm-headless@4.19.0-beta.47: version \"4.19.0-beta.47\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-4.19.0-beta.47.tgz#9d5af8145c42b9a6241a040bb244b877c149761b\" integrity sha512-chVTURPMNDEerQIsN4lIRotpXCfJsTHioZGQxDBNdktZO1gMXGvNxDjzsbsJg5ikLN5llz/HLDfXZrjCeb3elg== xterm@4.19.0-beta.47: version \"4.19.0-beta.47\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-4.19.0-beta.47.tgz#f5931201346a485e3bcb29d24e83583727e55707\" integrity sha512-c8EcCSWCHnFYNdRMTnJIpYTV9J2Ze7kdB1GhTcPO2ipMEsqaP/u6Ca8rgBWwV9HeEVfe4rGRqWW2qcSy4U9hMQ== xterm-headless@4.19.0-beta.49: version \"4.19.0-beta.49\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-4.19.0-beta.49.tgz#8e4178620be9a9dee25a586ef992a6fc621a829a\" integrity sha512-uRnHpR2pv1MJPbE3sa7XbP6x0uHubAWVMbiD26e3a5ICtWJQVVpLojkA0t4qU7CoMX85pRL1rIclg9CKY0B0xA== xterm@4.19.0-beta.49: version \"4.19.0-beta.49\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-4.19.0-beta.49.tgz#96d0d748c97a2f0cfa4c6112bc4de8b0d5d559fe\" integrity sha512-qPhOeGtnB357mZOvfDckVlPDR7EDkSASQrB3aujhjgJlOiBBqcNRJcuSvF7v1DOho7xdEI9UQxiSiT5diHhMlg== y18n@^3.2.1: version \"3.2.2\""} {"_id":"doc-en-vscode-3131a8110962fb13603852f248e787d46d0fc0ecbceaaf7b997641fd7ef7e570","title":"","text":"color: var(--vscode-descriptionForeground); } .monaco-list-row.selected .extension-list-item > .details > .description{ color: unset; } .hc-black .extension-list-item > .details > .description, .hc-light .extension-list-item > .details > .description { color: unset;"} {"_id":"doc-en-vscode-14c2a55c355b34599f4f36eef58dca3fad792523ddab0b694d3bd9168796c2f7","title":"","text":"\"configuration.markdown.links.openLocation.currentGroup\": \"Open links in the active editor group.\", \"configuration.markdown.links.openLocation.beside\": \"Open links beside the active editor.\", \"configuration.markdown.suggest.paths.enabled.description\": \"Enable/disable path suggestions for markdown links\", \"configuration.markdown.editor.drop.enabled\": \"Enable/disable dropping into the markdown editor to insert shift. Requires enabling `#workbenck.experimental.editor.dropIntoEditor.enabled#`.\", \"configuration.markdown.editor.drop.enabled\": \"Enable/disable dropping into the markdown editor to insert shift. Requires enabling `#workbench.experimental.editor.dropIntoEditor.enabled#`.\", \"configuration.markdown.experimental.validate.enabled.description\": \"Enable/disable all error reporting in Markdown files.\", \"configuration.markdown.experimental.validate.referenceLinks.enabled.description\": \"Validate reference links in Markdown files, e.g. `[link][ref]`. Requires enabling `#markdown.experimental.validate.enabled#`.\", \"configuration.markdown.experimental.validate.headerLinks.enabled.description\": \"Validate links to headers in Markdown files, e.g. `[link](#header)`. Requires enabling `#markdown.experimental.validate.enabled#`.\","} {"_id":"doc-en-vscode-3c3994a75e605a67853fe7a2520ff94bfe84096dc6341846e2f3132e619693e0","title":"","text":"\"configuration.markdown.links.openLocation.currentGroup\": \"Open links in the active editor group.\", \"configuration.markdown.links.openLocation.beside\": \"Open links beside the active editor.\", \"configuration.markdown.suggest.paths.enabled.description\": \"Enable/disable path suggestions for markdown links\", \"configuration.markdown.editor.drop.enabled\": \"Enable/disable dropping into the markdown editor to insert shift. Requires enabling `#workbenck.experimental.editor.dropIntoEditor.enabled#`.\", \"configuration.markdown.editor.drop.enabled\": \"Enable/disable dropping into the markdown editor to insert shift. Requires enabling `#workbench.experimental.editor.dropIntoEditor.enabled#`.\", \"configuration.markdown.editor.pasteLinks.enabled\": \"Enable/disable pasting files into a Markdown editor inserts Markdown links.\", \"configuration.markdown.experimental.validate.enabled.description\": \"Enable/disable all error reporting in Markdown files.\", \"configuration.markdown.experimental.validate.referenceLinks.enabled.description\": \"Validate reference links in Markdown files, e.g. `[link][ref]`. Requires enabling `#markdown.experimental.validate.enabled#`.\","} {"_id":"doc-en-vscode-5d756c4bf9292bd92713edefdd03fb20bb8fabb5912d771f02e18ff23ada4583","title":"","text":"}); } MenuRegistry.appendMenuItem(MenuId.TitleMenu, { command: { id: NavigateBackwardsAction.ID, title: NavigateBackwardsAction.LABEL, icon: Codicon.arrowLeft } }); MenuRegistry.appendMenuItem(MenuId.TitleMenu, { command: { id: NavigateForwardAction.ID, title: NavigateForwardAction.LABEL, icon: Codicon.arrowRight } }); MenuRegistry.appendMenuItem(MenuId.TitleMenu, { order: 1, command: { id: NavigateBackwardsAction.ID, title: NavigateBackwardsAction.LABEL, icon: Codicon.arrowLeft } }); MenuRegistry.appendMenuItem(MenuId.TitleMenu, { order: 2, command: { id: NavigateForwardAction.ID, title: NavigateForwardAction.LABEL, icon: Codicon.arrowRight } }); // Empty Editor Group Toolbar MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroup, { command: { id: UNLOCK_GROUP_COMMAND_ID, title: localize('unlockGroupAction', \"Unlock Group\"), icon: Codicon.lock }, group: 'navigation', order: 10, when: ActiveEditorGroupLockedContext });"} {"_id":"doc-en-vscode-4f00b880941978367c64e6ffba8cf33bdcf17a4fb8ef092f09c9a2f845dfba9e","title":"","text":"// Shared before/after handling installAllHandlers(logger); // skipped until translations are available https://github.com/microsoft/vscode/issues/150324 it.skip('starts with \"DE\" locale and verifies title and viewlets text is in German', async function () { it('starts with \"DE\" locale and verifies title and viewlets text is in German', async function () { const app = this.app as Application; await app.workbench.extensions.openExtensionsViewlet();"} {"_id":"doc-en-vscode-7d4ab017a1bf9f3a8c8ea10f83e08ce81402da194014ca2e6e749ed3b6252f84","title":"","text":"// Check for invalid file name. if (names.some(folderName => !pathService.hasValidBasename(item.resource, os, folderName))) { // Escape * characters const escapedName = name.replace(/*/g, '*'); return { content: nls.localize('invalidFileNameError', \"The name **{0}** is not valid as a file or folder name. Please choose a different name.\", trimLongName(name)), content: nls.localize('invalidFileNameError', \"The name **{0}** is not valid as a file or folder name. Please choose a different name.\", trimLongName(escapedName)), severity: Severity.Error }; }"} {"_id":"doc-en-vscode-dd93a9914487cc0f1081ddddee63661aad891b533db71b699bf32b1551cfba22","title":"","text":"/** * Matches `[text](link)` */ const linkPattern = /([((![[^]]*?](s*)([^s()]+?)s*)]|(?:]|[^]])*])(s*)(([^s()]|([^s()]*?))+)s*(\"[^\"]*\"|'[^']*'|([^()]*))?s*)/g; const linkPattern = /([((![[^]]*?](s*)([^s()]+?)s*)]|(?:]|[^]]|][^(])*])(s*)(([^s()]|([^s()]*?))+)s*(\"[^\"]*\"|'[^']*'|([^()]*))?s*)/g; /** * Matches `[text]()` */ const linkPatternAngle = /([((![[^]]*?](s*)([^s()]+?)s*)]|(?:]|[^]])*])(s*<)(([^<>]|([^s()]*?))+)>s*(\"[^\"]*\"|'[^']*'|([^()]*))?s*)/g; const linkPatternAngle = /([((![[^]]*?](s*)([^s()]+?)s*)]|(?:]|[^]]|][^(])*])(s*<)(([^<>]|([^s()]*?))+)>s*(\"[^\"]*\"|'[^']*'|([^()]*))?s*)/g; /**"} {"_id":"doc-en-vscode-1b1af614609dfb00475e149cc3dc1a486b704cdabc8160d565aa0c3d586c122e","title":"","text":"} }); test('Should ignore texts in brackets inside link title (#150921)', async () => { { const links = await getLinksForFile('[some [inner bracket pairs] in title]()'); assertLinksEqual(links, [ new vscode.Range(0, 39, 0, 43), ]); } { const links = await getLinksForFile('[some [inner bracket pairs] in title](link)'); assertLinksEqual(links, [ new vscode.Range(0, 38, 0, 42) ]); } }); test('Should handle two links without space', async () => { const links = await getLinksForFile('a ([test](test)[test2](test2)) c'); assertLinksEqual(links, ["} {"_id":"doc-en-vscode-285dc653227adc9aebb60a10d0cfa492677909ab5a044d13fb7465170d2dd50b","title":"","text":"private *getReferenceLinks(document: ITextDocument, noLinkRanges: NoLinkRanges): Iterable { const text = document.getText(); for (const match of text.matchAll(referenceLinkPattern)) { const linkStart = document.positionAt(match.index ?? 0); const linkStartOffset = (match.index ?? 0) + match[1].length; const linkStart = document.positionAt(linkStartOffset); if (noLinkRanges.contains(linkStart)) { continue; }"} {"_id":"doc-en-vscode-6f13d52b8a2de2d847a87cbc2ae49843e0aa4082710ba072bc2b201a58818219","title":"","text":"let reference = match[4]; if (reference === '') { // [ref][], reference = match[3]; const offset = ((match.index ?? 0) + match[1].length) + 1; const offset = linkStartOffset + 1; hrefStart = document.positionAt(offset); hrefEnd = document.positionAt(offset + reference.length); } else if (reference) { // [text][ref] const pre = match[2]; const offset = ((match.index ?? 0) + match[1].length) + pre.length; const offset = linkStartOffset + pre.length; hrefStart = document.positionAt(offset); hrefEnd = document.positionAt(offset + reference.length); } else if (match[5]) { // [ref] reference = match[5]; const offset = ((match.index ?? 0) + match[1].length) + 1; const offset = linkStartOffset + 1; hrefStart = document.positionAt(offset); const line = getLine(document, hrefStart.line); // See if link looks like a checkbox"} {"_id":"doc-en-vscode-ccaa8e1173ec008e6edb8b5033ce5d1039eb0391e8e697d21475afed5a82cc8c","title":"","text":"continue; } const linkEnd = linkStart.translate(0, match[0].length); const linkEnd = linkStart.translate(0, match[0].length - match[1].length); yield { kind: 'link', source: {"} {"_id":"doc-en-vscode-ec10242934a474eb8d2699b536853e6215ea6e0376b18761665d6c49228e6fd1","title":"","text":"new vscode.Range(0, 35, 0, 39), ]); } { const links = await getLinksForFile(joinLines( `# h`, `[[a]](http://example.com)`, )); assertLinksEqual(links, [ new vscode.Range(1, 6, 1, 24), ]); } }); test('Should handle two links without space', async () => {"} {"_id":"doc-en-vscode-d292bdcec8bcf94bde6b3e2b6702e656d84c7b1a9eceae663d0592e8d1db6741","title":"","text":"import { dispose } from 'vs/base/common/lifecycle'; import { IExtension, ExtensionState, IExtensionsWorkbenchService, VIEWLET_ID, IExtensionsViewPaneContainer, IExtensionContainer, TOGGLE_IGNORE_EXTENSION_ACTION_ID, SELECT_INSTALL_VSIX_EXTENSION_COMMAND_ID, THEME_ACTIONS_GROUP, INSTALL_ACTIONS_GROUP } from 'vs/workbench/contrib/extensions/common/extensions'; import { ExtensionsConfigurationInitialContent } from 'vs/workbench/contrib/extensions/common/extensionsFileTemplate'; import { IGalleryExtension, IExtensionGalleryService, ILocalExtension, InstallOptions, InstallOperation, TargetPlatformToString, ExtensionManagementErrorCode } from 'vs/platform/extensionManagement/common/extensionManagement'; import { IGalleryExtension, IExtensionGalleryService, ILocalExtension, InstallOptions, InstallOperation, TargetPlatformToString, ExtensionManagementErrorCode, isTargetPlatformCompatible } from 'vs/platform/extensionManagement/common/extensionManagement'; import { IWorkbenchExtensionEnablementService, EnablementState, IExtensionManagementServerService, IExtensionManagementServer, IWorkbenchExtensionManagementService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { ExtensionRecommendationReason, IExtensionIgnoredRecommendationsService, IExtensionRecommendationsService } from 'vs/workbench/services/extensionRecommendations/common/extensionRecommendations'; import { areSameExtensions, getExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil';"} {"_id":"doc-en-vscode-4ca8cc8cb6abe6378320419038e4d26e44cec68e43e43e04c99ac014ce8ef51e","title":"","text":"@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, @IExtensionManagementServerService protected readonly extensionManagementServerService: IExtensionManagementServerService, @IExtensionManifestPropertiesService private readonly extensionManifestPropertiesService: IExtensionManifestPropertiesService, @IExtensionGalleryService private readonly extensionGalleryService: IExtensionGalleryService, ) { super(id, InstallInOtherServerAction.INSTALL_LABEL, InstallInOtherServerAction.Class, false); this.update();"} {"_id":"doc-en-vscode-6a975e8c99af9ab5505a6d9539a487ac60892cbe01bd02b011ee63ac4689ed74","title":"","text":"} override async run(): Promise { if (!this.extension) { if (!this.extension?.local) { return; } if (this.server) { this.extensionsWorkbenchService.open(this.extension); alert(localize('installExtensionStart', \"Installing extension {0} started. An editor is now open with more details on this extension\", this.extension.displayName)); if (this.extension.gallery) { await this.server.extensionManagementService.installFromGallery(this.extension.gallery, { installPreReleaseVersion: this.extension.local?.preRelease }); } else { const vsix = await this.extension.server!.extensionManagementService.zip(this.extension.local!); await this.server.extensionManagementService.install(vsix); } if (!this.extension?.server) { return; } if (!this.server) { return; } this.extensionsWorkbenchService.open(this.extension); alert(localize('installExtensionStart', \"Installing extension {0} started. An editor is now open with more details on this extension\", this.extension.displayName)); const gallery = this.extension.gallery ?? (this.extensionGalleryService.isEnabled() && (await this.extensionGalleryService.getExtensions([this.extension.identifier], CancellationToken.None))[0]); if (gallery) { await this.server.extensionManagementService.installFromGallery(gallery, { installPreReleaseVersion: this.extension.local.preRelease }); return; } const targetPlatform = await this.server.extensionManagementService.getTargetPlatform(); if (!isTargetPlatformCompatible(this.extension.local.targetPlatform, [this.extension.local.targetPlatform], targetPlatform)) { throw new Error(localize('incompatible', \"Can't install '{0}' extension because it is not compatible.\", this.extension.identifier.id)); } const vsix = await this.extension.server.extensionManagementService.zip(this.extension.local); await this.server.extensionManagementService.install(vsix); } protected abstract getInstallLabel(): string;"} {"_id":"doc-en-vscode-438168f3926e22e1277e2266931a59a7a90018688c247eb6b0a19da6f5c7b13c","title":"","text":"@IExtensionsWorkbenchService extensionsWorkbenchService: IExtensionsWorkbenchService, @IExtensionManagementServerService extensionManagementServerService: IExtensionManagementServerService, @IExtensionManifestPropertiesService extensionManifestPropertiesService: IExtensionManifestPropertiesService, @IExtensionGalleryService extensionGalleryService: IExtensionGalleryService, ) { super(`extensions.remoteinstall`, extensionManagementServerService.remoteExtensionManagementServer, canInstallAnyWhere, extensionsWorkbenchService, extensionManagementServerService, extensionManifestPropertiesService); super(`extensions.remoteinstall`, extensionManagementServerService.remoteExtensionManagementServer, canInstallAnyWhere, extensionsWorkbenchService, extensionManagementServerService, extensionManifestPropertiesService, extensionGalleryService); } protected getInstallLabel(): string {"} {"_id":"doc-en-vscode-41d41c61f5f563151d76ba6da5bcc2cc2f310177c6a5f9da98fb0ef8cf3e732a","title":"","text":"@IExtensionsWorkbenchService extensionsWorkbenchService: IExtensionsWorkbenchService, @IExtensionManagementServerService extensionManagementServerService: IExtensionManagementServerService, @IExtensionManifestPropertiesService extensionManifestPropertiesService: IExtensionManifestPropertiesService, @IExtensionGalleryService extensionGalleryService: IExtensionGalleryService, ) { super(`extensions.localinstall`, extensionManagementServerService.localExtensionManagementServer, false, extensionsWorkbenchService, extensionManagementServerService, extensionManifestPropertiesService); super(`extensions.localinstall`, extensionManagementServerService.localExtensionManagementServer, false, extensionsWorkbenchService, extensionManagementServerService, extensionManifestPropertiesService, extensionGalleryService); } protected getInstallLabel(): string {"} {"_id":"doc-en-vscode-0e5de99d34245385f37f44dab5fa9800cd0fb02ed53a75fd304fc3c26b5063fb","title":"","text":"@IExtensionsWorkbenchService extensionsWorkbenchService: IExtensionsWorkbenchService, @IExtensionManagementServerService extensionManagementServerService: IExtensionManagementServerService, @IExtensionManifestPropertiesService extensionManifestPropertiesService: IExtensionManifestPropertiesService, @IExtensionGalleryService extensionGalleryService: IExtensionGalleryService, ) { super(`extensions.webInstall`, extensionManagementServerService.webExtensionManagementServer, false, extensionsWorkbenchService, extensionManagementServerService, extensionManifestPropertiesService); super(`extensions.webInstall`, extensionManagementServerService.webExtensionManagementServer, false, extensionsWorkbenchService, extensionManagementServerService, extensionManifestPropertiesService, extensionGalleryService); } protected getInstallLabel(): string {"} {"_id":"doc-en-vscode-7860fec03bca45f55045d6c61eefd6c1b3e09285ff78495f6c00debfe878d999","title":"","text":"renderElement(node: ITreeNode, _index: number, template: CallRenderingTemplate): void { const { element, filterData } = node; const deprecated = element.item.tags?.includes(SymbolTag.Deprecated); template.icon.className = ''; template.icon.classList.add('inline', ...CSSIcon.asClassNameArray(SymbolKinds.toIcon(element.item.kind))); template.label.setLabel( element.item.name,"} {"_id":"doc-en-vscode-1becb7b7861d8dacba83f2d0e26bf8bf7f314fdfb31e61885344065e0d81f6b5","title":"","text":"comment: ['The task command line or label'] }, 'Executing task: {0}', commandLine), { excludeLeadingNewLine: true }) + taskShellIntegrationOutputSequence; } } else { shellLaunchConfig.initialText = taskShellIntegrationStartSequence + taskShellIntegrationOutputSequence; } } else { const commandExecutable = (task.command.runtime !== RuntimeType.CustomExecution) ? CommandString.value(command) : undefined;"} {"_id":"doc-en-vscode-22210c5c72a5725e9f89b37a45e98178657c9b75d6120a04829c01b68139b995","title":"","text":"comment: ['The task command line or label'] }, 'Executing task: {0}', `${shellLaunchConfig.executable} ${getArgsToEcho(shellLaunchConfig.args)}`), { excludeLeadingNewLine: true }) + taskShellIntegrationOutputSequence; } } else { shellLaunchConfig.initialText = taskShellIntegrationStartSequence + taskShellIntegrationOutputSequence; } }"} {"_id":"doc-en-vscode-7489328e8673c65fd49d17923c07fdcce32ce64a5263bd16a6c800baf9969f29","title":"","text":"/** * A string including ANSI escape sequences that will be written to the terminal emulator * _before_ the terminal process has launched, a trailing n is added at the end of the string. * This allows for example the terminal instance to display a styled message as the first line * of the terminal. Use x1b over 033 or e for the escape control character. * _before_ the terminal process has launched, when a string is specified, a trailing n is * added at the end. This allows for example the terminal instance to display a styled message * as the first line of the terminal. Use x1b over 033 or e for the escape control character. */ initialText?: string; initialText?: string | { text: string; trailingNewLine: boolean }; /** * Custom PTY/pseudoterminal process to use."} {"_id":"doc-en-vscode-f0e50956160f9a0d390fa9dc34c61a313fd758ba4e30b7fa10e74baa51bb5e31","title":"","text":"executableEnv, options }; const persistentProcess = new PersistentTerminalProcess(id, process, workspaceId, workspaceName, shouldPersist, cols, rows, processLaunchOptions, unicodeVersion, this._reconnectConstants, this._logService, isReviving ? shellLaunchConfig.initialText : undefined, rawReviveBuffer, shellLaunchConfig.icon, shellLaunchConfig.color, shellLaunchConfig.name, shellLaunchConfig.fixedDimensions); const persistentProcess = new PersistentTerminalProcess(id, process, workspaceId, workspaceName, shouldPersist, cols, rows, processLaunchOptions, unicodeVersion, this._reconnectConstants, this._logService, isReviving && typeof shellLaunchConfig.initialText === 'string' ? shellLaunchConfig.initialText : undefined, rawReviveBuffer, shellLaunchConfig.icon, shellLaunchConfig.color, shellLaunchConfig.name, shellLaunchConfig.fixedDimensions); process.onDidChangeProperty(property => this._onDidChangeProperty.fire({ id, property })); process.onProcessExit(event => { persistentProcess.dispose();"} {"_id":"doc-en-vscode-75eb04f349377ee4cc4deafd111b20805ea63e427fa9070d0a23e149625fec79","title":"","text":"}, 'Executing task: {0}', commandLine), { excludeLeadingNewLine: true }) + this.taskShellIntegrationOutputSequence; } } else { shellLaunchConfig.initialText = this.taskShellIntegrationStartSequence + this.taskShellIntegrationOutputSequence; shellLaunchConfig.initialText = { text: this.taskShellIntegrationStartSequence + this.taskShellIntegrationOutputSequence, trailingNewLine: false }; } } else { const commandExecutable = (task.command.runtime !== RuntimeType.CustomExecution) ? CommandString.value(command) : undefined;"} {"_id":"doc-en-vscode-9aa8dd194895e38b214a653a15655a49aa9c27dd4605ca51a66a28139c2696f5","title":"","text":"}, 'Executing task: {0}', `${shellLaunchConfig.executable} ${getArgsToEcho(shellLaunchConfig.args)}`), { excludeLeadingNewLine: true }) + this.taskShellIntegrationOutputSequence; } } else { shellLaunchConfig.initialText = this.taskShellIntegrationStartSequence + this.taskShellIntegrationOutputSequence; shellLaunchConfig.initialText = { text: this.taskShellIntegrationStartSequence + this.taskShellIntegrationOutputSequence, trailingNewLine: false }; } }"} {"_id":"doc-en-vscode-9831830cf5954573ffa8df26cb82b12a6c862a80c0223c6016593be446948d56","title":"","text":"// Write initial text, deferring onLineFeed listener when applicable to avoid firing // onLineData events containing initialText if (this._shellLaunchConfig.initialText) { this.xterm.raw.writeln(this._shellLaunchConfig.initialText, () => { this._writeInitialText(this.xterm, () => { lineDataEventAddon.onLineData(e => this._onLineData.fire(e)); }); } else {"} {"_id":"doc-en-vscode-b8c50d883da0d74b2820ee299f72e0cfefb4ae2c55cec6f1f8c93f7fd8c0856d","title":"","text":"} } private _writeInitialText(xterm: XtermTerminal, callback?: () => void): void { if (!this._shellLaunchConfig.initialText) { callback?.(); return; } const text = typeof this._shellLaunchConfig.initialText === 'string' ? this._shellLaunchConfig.initialText : this._shellLaunchConfig.initialText?.text; if (typeof this._shellLaunchConfig.initialText === 'string') { xterm.raw.writeln(text, callback); } else { if (this._shellLaunchConfig.initialText.trailingNewLine) { xterm.raw.writeln(text, callback); } else { xterm.raw.write(text, callback); } } } async reuseTerminal(shell: IShellLaunchConfig, reset: boolean = false): Promise { // Unsubscribe any key listener we may have. this._pressAnyKeyToCloseListener?.dispose(); this._pressAnyKeyToCloseListener = undefined; if (this.xterm) { const xterm = this.xterm; if (xterm) { if (!reset) { // Ensure new processes' output starts at start of new line await new Promise(r => this.xterm!.raw.write('nx1b[G', r)); await new Promise(r => xterm.raw.write('nx1b[G', r)); } // Print initialText if specified if (shell.initialText) { await new Promise(r => this.xterm!.raw.writeln(shell.initialText!, r)); await new Promise(r => this._writeInitialText(xterm, r)); } // Clean up waitOnExit state if (this._isExiting && this._shellLaunchConfig.waitOnExit) { this.xterm.raw.options.disableStdin = false; xterm.raw.options.disableStdin = false; this._isExiting = false; } if (reset) { this.xterm.clearDecorations(); xterm.clearDecorations(); } }"} {"_id":"doc-en-vscode-cbf143afb98aa38866c9fb648a1b2dc6f1438b0f19bf0602d3741870b2129d06","title":"","text":"private async smartCommit( repository: Repository, getCommitMessage: () => Promise, opts?: CommitOptions opts: CommitOptions ): Promise { const config = workspace.getConfiguration('git', Uri.file(repository.root)); let promptToSaveFilesBeforeCommit = config.get<'always' | 'staged' | 'never'>('promptToSaveFilesBeforeCommit');"} {"_id":"doc-en-vscode-4cce2f44b7a38973809a2e5edc69fc9f3a585db137d99c893b28b3a036429770","title":"","text":"} } if (!opts) { opts = { all: noStagedChanges }; } else if (!opts.all && noStagedChanges && !opts.empty) { opts = { ...opts, all: true }; } // no changes, and the user has not configured to commit all in this case if (!noUnstagedChanges && noStagedChanges && !enableSmartCommit && !opts.empty) { if (!noUnstagedChanges && noStagedChanges && !enableSmartCommit && !opts.empty && !opts.all) { const suggestSmartCommit = config.get('suggestSmartCommit') === true; if (!suggestSmartCommit) {"} {"_id":"doc-en-vscode-8ebc8cefb848f50932b4dfea3393036a692b6533020a68ca85414df1bd42df50","title":"","text":"} } if (opts.all === undefined) { opts = { all: noStagedChanges }; } else if (!opts.all && noStagedChanges && !opts.empty) { opts = { ...opts, all: true }; } // enable signing of commits if configured opts.signCommit = enableCommitSigning;"} {"_id":"doc-en-vscode-4a1cc3148c1ef7c67764c69eb9cec1b016220e09ba78174ba28849f68b3f89e3","title":"","text":"return true; } private async commitWithAnyInput(repository: Repository, opts?: CommitOptions): Promise { private async commitWithAnyInput(repository: Repository, opts: CommitOptions): Promise { const message = repository.inputBox.value; const root = Uri.file(repository.root); const config = workspace.getConfiguration('git', root);"} {"_id":"doc-en-vscode-2a31e927b71dea29e4dabec500cbcecea3aa7537d0e65ab14c36475de2cb9d5a","title":"","text":"import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ITerminalCommand, TerminalCapability } from 'vs/platform/terminal/common/capabilities/capabilities'; import { TerminalCapabilityStoreMultiplexer } from 'vs/platform/terminal/common/capabilities/terminalCapabilityStore'; import { IProcessDataEvent, IProcessPropertyMap, IShellLaunchConfig, ITerminalDimensionsOverride, ITerminalLaunchError, ProcessPropertyType, TerminalIcon, TerminalLocation, TerminalSettingId, TerminalShellType, TitleEventSource, WindowsShellType } from 'vs/platform/terminal/common/terminal'; import { IProcessDataEvent, IProcessPropertyMap, IShellLaunchConfig, ITerminalDimensionsOverride, ITerminalLaunchError, PosixShellType, ProcessPropertyType, TerminalIcon, TerminalLocation, TerminalSettingId, TerminalShellType, TitleEventSource, WindowsShellType } from 'vs/platform/terminal/common/terminal'; import { escapeNonWindowsPath } from 'vs/platform/terminal/common/terminalEnvironment'; import { activeContrastBorder, scrollbarSliderActiveBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground } from 'vs/platform/theme/common/colorRegistry'; import { IColorTheme, ICssStyleCollector, IThemeService, registerThemingParticipant, ThemeIcon } from 'vs/platform/theme/common/themeService';"} {"_id":"doc-en-vscode-a0a2393b0adf4e4c6320b0085158862577c6aabfd1e8f82bdb9aa7bbc8016350","title":"","text":"rows: number; } const shellIntegrationSupportedShellTypes = [PosixShellType.Bash, PosixShellType.Zsh, PosixShellType.PowerShell, WindowsShellType.PowerShell]; const scrollbarHeight = 5; class TerminalOutputProvider implements ITextModelContentProvider {"} {"_id":"doc-en-vscode-518edd70242ae0df76c80d483022abda65efa5e2077b23962a3403292ff5c71f","title":"","text":"} get disableShellIntegrationReporting(): boolean { if (this._disableShellIntegrationReporting === undefined) { this._disableShellIntegrationReporting = this.shellLaunchConfig.isFeatureTerminal || this.shellLaunchConfig.hideFromUser || this.shellLaunchConfig.executable === undefined; this._disableShellIntegrationReporting = (this.shellLaunchConfig.hideFromUser || this.shellLaunchConfig.executable === undefined || this.shellType === undefined) || !shellIntegrationSupportedShellTypes.includes(this.shellType); } return this._disableShellIntegrationReporting; }"} {"_id":"doc-en-vscode-83916f7f3376c17d3be9987e500008c258662ea81b67fcd977bfa664bb089f79","title":"","text":"\"terminal.ansiBrightMagenta\": \"#6c71c4\", \"terminal.ansiBrightCyan\": \"#93a1a1\", \"terminal.ansiBrightWhite\": \"#fdf6e3\", // Set terminal background explicitly, otherwise selection becomes invisible when the // terminal is in the side bar \"terminal.background\": \"#FDF6E3\", // Interactive Playground \"walkThrough.embeddedEditorBackground\": \"#00000014\" },"} {"_id":"doc-en-vscode-efdb056c888d0081166ab7b85c1c3fffd5ab771e7f4f9dc02326b4909f04ad0d","title":"","text":"DataTransfers.RESOURCES, ]); export function addExternalEditorsDropData(dataTransfer: VSDataTransfer, dragEvent: DragEvent) { if (dragEvent.dataTransfer && !dataTransfer.has(Mimes.uriList)) { export function addExternalEditorsDropData(dataTransfer: VSDataTransfer, dragEvent: DragEvent, overwriteUriList = false) { if (dragEvent.dataTransfer && (overwriteUriList || !dataTransfer.has(Mimes.uriList))) { const editorData = extractEditorsDropData(dragEvent) .filter(input => input.resource) .map(input => input.resource!.toString());"} {"_id":"doc-en-vscode-c359769341e30c8ba9bb3db3d8e0da7fce40d4e1ffb74c90344a12fd2fbdf41a","title":"","text":"} const originalDataTransfer = toVSDataTransfer(originalEvent.dataTransfer); addExternalEditorsDropData(originalDataTransfer, originalEvent); addExternalEditorsDropData(originalDataTransfer, originalEvent, true); const outDataTransfer = new VSDataTransfer(); for (const [type, item] of originalDataTransfer.entries()) {"} {"_id":"doc-en-vscode-09f42fdf900e692051f3816bc456f0cf73316cf4320b9da3b2dfaa8955dbb343","title":"","text":"return notebook.cellAt(notebook.cellCount - 1); } async function addCellAndRun(code: string, notebook: vscode.NotebookDocument) { async function addCellAndRun(code: string, notebook: vscode.NotebookDocument, i: number) { const cell = await addCell(code, notebook); await vscode.commands.executeCommand('notebook.execute'); await vscode.commands.executeCommand('notebook.cell.execute', { start: i, end: i + 1 }); assert.strictEqual(cell.outputs.length, 1, 'execute failed'); return cell; }"} {"_id":"doc-en-vscode-0dedbd6f8034be302ecbc468ddc3eb3e989e81c59d9c58a1d9f2ac6c0f9627ae","title":"","text":"// Run and add a bunch of cells for (let i = 0; i < 10; i++) { await addCellAndRun(`print ${i}`, notebookEditor.notebook); await addCellAndRun(`print ${i}`, notebookEditor.notebook, i); } // Verify visible range has the last cell"} {"_id":"doc-en-vscode-772a094a8032779c8de97e490e58491e417425f7bd636d36dcd553dad4530a7a","title":"","text":"} }, required: [ 'settings', 'scope' 'settings' ], additionalProperties: false }"} {"_id":"doc-en-vscode-080a40ed651034c18b69ddbfbfbb11a5e41bb114614b4824b3b3d0d566cd172e","title":"","text":"} update(mode: OutputChannelUpdateMode, till?: number): void { this.model.update(mode, till); this.model.update(mode, till, true); } clear(): void {"} {"_id":"doc-en-vscode-a58d292c056891fad591ffc39c21ce286a7c266e16c9afa961c4ecb7ec20e0a9","title":"","text":"export interface IOutputChannelModel extends IDisposable { readonly onDispose: Event; append(output: string): void; update(mode: OutputChannelUpdateMode, till?: number): void; update(mode: OutputChannelUpdateMode, till: number | undefined, immediate: boolean): void; loadModel(): Promise; clear(): void; replace(value: string): void;"} {"_id":"doc-en-vscode-104c73773cdca1d2df2f0b8a7153182aa26f93fccddf74e933381500436a88c3","title":"","text":"} clear(): void { this.update(OutputChannelUpdateMode.Clear, this.endOffset); this.update(OutputChannelUpdateMode.Clear, this.endOffset, true); } update(mode: OutputChannelUpdateMode, till?: number): void { update(mode: OutputChannelUpdateMode, till: number | undefined, immediate: boolean): void { const loadModelPromise: Promise = this.loadModelPromise ? this.loadModelPromise : Promise.resolve(); loadModelPromise.then(() => this.doUpdate(mode, till)); loadModelPromise.then(() => this.doUpdate(mode, till, immediate)); } loadModel(): Promise {"} {"_id":"doc-en-vscode-9e90530fbd805fd54109e6e699d7034c5183116fe3cfc847cf8b6adcc9dae2d4","title":"","text":"return this.model; } private doUpdate(mode: OutputChannelUpdateMode, till?: number): void { private doUpdate(mode: OutputChannelUpdateMode, till: number | undefined, immediate: boolean): void { if (mode === OutputChannelUpdateMode.Clear || mode === OutputChannelUpdateMode.Replace) { this.startOffset = this.endOffset = isNumber(till) ? till : this.endOffset; this.cancelModelUpdate();"} {"_id":"doc-en-vscode-a3102984a91c6159be1312bddb5de56afe988b24383840f8aac60d03926053f2","title":"","text":"} else { this.appendContent(this.model, token); this.appendContent(this.model, immediate, token); } }"} {"_id":"doc-en-vscode-3ccc5b85e0f3c1108a09a0a2ade0fe2288e59b7ecab5ae5e9385e5bbdc6fc682","title":"","text":"this.doUpdateModel(model, [EditOperation.delete(model.getFullModelRange())], VSBuffer.fromString('')); } private async appendContent(model: ITextModel, token: CancellationToken): Promise { private async appendContent(model: ITextModel, immediate: boolean, token: CancellationToken): Promise { this.appendThrottler.trigger(async () => { /* Abort if operation is cancelled */ if (token.isCancellationRequested) {"} {"_id":"doc-en-vscode-288ff2a315f087dc12dd75a14159b0dbcb7ce712c0c7fce3e5fff5aac0a20930","title":"","text":"const lastLineMaxColumn = model.getLineMaxColumn(lastLine); const edits = [EditOperation.insert(new Position(lastLine, lastLineMaxColumn), contentToAppend.toString())]; this.doUpdateModel(model, edits, contentToAppend); }); }, immediate ? 0 : undefined); } private async replaceContent(model: ITextModel, token: CancellationToken): Promise {"} {"_id":"doc-en-vscode-7d82728b4173b809af5585d3b9af26d6516bc805a95d415acbcd0a8d084ed850","title":"","text":"if (!this.modelUpdateInProgress) { if (isNumber(size) && this.endOffset > size) { // Reset - Content is removed this.update(OutputChannelUpdateMode.Clear, 0); this.update(OutputChannelUpdateMode.Clear, 0, true); } } this.update(OutputChannelUpdateMode.Append); this.update(OutputChannelUpdateMode.Append, undefined, false /* Not needed to update immediately. Wait to collect more changes and update. */); } }"} {"_id":"doc-en-vscode-150d50b92c4e633dac1762f7b31bd2ceab9b84264deec4356f5c3f91fda587aa","title":"","text":"override append(message: string): void { this.write(message); this.update(OutputChannelUpdateMode.Append); this.update(OutputChannelUpdateMode.Append, undefined, this.isVisible()); } override replace(message: string): void { const till = this._offset; this.write(message); this.update(OutputChannelUpdateMode.Replace, till); this.update(OutputChannelUpdateMode.Replace, till, true); } private write(content: string): void {"} {"_id":"doc-en-vscode-bf6355eab0d03fa52455024327f056c0e532a0cd9ab05721518a6e9da2dc5b25","title":"","text":"this.outputChannelModel.then(outputChannelModel => outputChannelModel.append(output)); } update(mode: OutputChannelUpdateMode, till?: number): void { this.outputChannelModel.then(outputChannelModel => outputChannelModel.update(mode, till)); update(mode: OutputChannelUpdateMode, till: number | undefined, immediate: boolean): void { this.outputChannelModel.then(outputChannelModel => outputChannelModel.update(mode, till, immediate)); } loadModel(): Promise {"} {"_id":"doc-en-vscode-cb394fba311080c61385ed5f2bad004e730db73ff7e3c86bf506c71512943e33","title":"","text":"if (uri === undefined) { return; } // Run the store action to get back a ref const ref = await that.storeEditSession(); const ref = await that.storeEditSession(false); // Append the ref to the URI if (ref !== undefined) {"} {"_id":"doc-en-vscode-b97c0e180805bd4ab503e4cc57e937721d45e615e04bd8aad5b0e812f13f9f8d","title":"","text":"await that.progressService.withProgress({ location: ProgressLocation.Notification, title: localize('storing edit session', 'Storing edit session...') }, async () => await that.storeEditSession()); }, async () => await that.storeEditSession(true)); } })); }"} {"_id":"doc-en-vscode-84bfbb2cf2296c408c63933ddf421f703a47ad0de51518cf705122d510a4b258","title":"","text":"} } async storeEditSession(): Promise { async storeEditSession(fromStoreCommand: boolean): Promise { const folders: Folder[] = []; let hasEdits = false; for (const repository of this.scmService.repositories) { // Look through all resource groups and compute which files were added/modified/deleted"} {"_id":"doc-en-vscode-de1e43e558cd6312f5b541c48432b385c24a14670915a240f32b8ab90729b6d0","title":"","text":"} } catch { } hasEdits = true; if (await this.fileService.exists(uri)) { workingChanges.push({ type: ChangeType.Addition, fileType: FileType.File, contents: (await this.fileService.readFile(uri)).value.toString(), relativeFilePath: relativeFilePath }); } else {"} {"_id":"doc-en-vscode-f70a61783fa045a553fcf3688610e459dc31325c6f79712eb3b1ba30d4b68f09","title":"","text":"folders.push({ workingChanges, name: name ?? '' }); } if (!hasEdits) { this.logService.info('Edit Sessions: Skipping storing edit session as there are no edits to store.'); if (fromStoreCommand) { this.notificationService.info(localize('no edits to store', 'Skipped storing edit session as there are no edits to store.')); } return undefined; } const data: EditSession = { folders, version: 1 }; try {"} {"_id":"doc-en-vscode-f7c49c97a5187b15969c70f2ae5d1a04a2a59535abad524666bd4f11a22fad3c","title":"","text":"let instantiationService: TestInstantiationService; let sessionSyncContribution: SessionSyncContribution; let fileService: FileService; let sandbox: sinon.SinonSandbox; const disposables = new DisposableStore(); setup(() => { suiteSetup(() => { sandbox = sinon.createSandbox(); instantiationService = new TestInstantiationService(); // Set up filesystem"} {"_id":"doc-en-vscode-9dced8eb3aca9316c36af93cd6a9b6ab11f5329f3e93266ef0c1c7affffcb871","title":"","text":"} }); // Stub repositories instantiationService.stub(ISCMService, '_repositories', new Map()); sessionSyncContribution = instantiationService.createInstance(SessionSyncContribution); });"} {"_id":"doc-en-vscode-b8a649f01bc468c45e56cd19f2c092ba4aaea9592525a822b18d88d965f49640","title":"","text":"}; // Stub sync service to return edit session data const sandbox = sinon.createSandbox(); const readStub = sandbox.stub().returns({ editSession, ref: '0' }); instantiationService.stub(ISessionSyncWorkbenchService, 'read', readStub); // Stub repositories instantiationService.stub(ISCMService, '_repositories', new Map()); // Create root folder await fileService.createFolder(folderUri);"} {"_id":"doc-en-vscode-8ddeddfc5dac9884d953d4674a483cc816c020680e19c02638e1724d718b1a82","title":"","text":"// Verify edit session was correctly applied assert.equal((await fileService.readFile(fileUri)).value.toString(), fileContents); }); test('Edit session not stored if there are no edits', async function () { const writeStub = sandbox.stub(); instantiationService.stub(ISessionSyncWorkbenchService, 'write', writeStub); // Create root folder await fileService.createFolder(folderUri); await sessionSyncContribution.storeEditSession(true); // Verify that we did not attempt to write the edit session assert.equal(writeStub.called, false); }); });"} {"_id":"doc-en-vscode-8c18f395cf27a8cc64f94ea0e3cd4a70bb3357fa0827dc644e55d29a6da79c3a","title":"","text":"} extension.contributes?.walkthroughs?.forEach(section => { const categoryID = extension.identifier.value + '#walkthrough#' + section.id; const categoryID = extension.identifier.value + '#' + section.id; section.steps.forEach(step => { const fullyQualifiedID = extension.identifier.value + '#' + section.id + '#' + step.id; this.steps.delete(fullyQualifiedID);"} {"_id":"doc-en-vscode-d9562a01123e0a8f9a8d2972499f619b8de7cda6241b6e0aca2a35dad44254d0","title":"","text":"* @returns whether the provided parameter is of type `Buffer` or Uint8Array dervived type */ export function isTypedArray(obj: unknown): obj is Object { const TypedArray = Object.getPrototypeOf(Uint8Array); return typeof obj === 'object' && (obj instanceof Uint8Array || obj instanceof Uint16Array || obj instanceof Uint32Array || obj instanceof Float32Array || obj instanceof Float64Array || obj instanceof Int8Array || obj instanceof Int16Array || obj instanceof Int32Array || obj instanceof BigInt64Array || obj instanceof BigUint64Array || obj instanceof Uint8ClampedArray); && obj instanceof TypedArray; } /**"} {"_id":"doc-en-vscode-dc1441ca828f7b2b260d1cfe9bca7b10f49c45c4542faf571f068b7207e3266e","title":"","text":"import { IIdentityProvider } from 'vs/base/browser/ui/list/list'; import { ObjectTree } from 'vs/base/browser/ui/tree/objectTree'; import { ITreeElement } from 'vs/base/browser/ui/tree/tree'; import { IActionableTestTreeElement, TestExplorerTreeElement, TestItemTreeElement } from 'vs/workbench/contrib/testing/browser/explorerProjections/index'; import { IActionableTestTreeElement, TestExplorerTreeElement, TestItemTreeElement, TestTreeErrorMessage } from 'vs/workbench/contrib/testing/browser/explorerProjections/index'; export const testIdentityProvider: IIdentityProvider = { export const testIdentityProvider: IIdentityProvider = { getId(element) { return element.treeId + '0' + element.test.expand; return element.treeId + '0' + (element instanceof TestTreeErrorMessage ? 'error' : element.test.expand); } };"} {"_id":"doc-en-vscode-da3d3504c96158a0bdf8c9353ef0b83a5d419fee202123d99d176014c8781619","title":"","text":"* Actions */ // Configure Workspace Trust // Configure Workspace Trust Settings const CONFIGURE_TRUST_COMMAND_ID = 'workbench.trust.configure'; const WORKSPACES_CATEGORY = { value: localize('workspacesCategory', \"Workspaces\"), original: 'Workspaces' };"} {"_id":"doc-en-vscode-32fd590ad56ff005608bf09b3563e52facbe9e0ce4d5cb04ab72365f58f416ae","title":"","text":"constructor() { super({ id: CONFIGURE_TRUST_COMMAND_ID, title: { original: 'Configure Workspace Trust', value: localize('configureWorkspaceTrust', \"Configure Workspace Trust\") }, title: { original: 'Configure Workspace Trust Settings', value: localize('configureWorkspaceTrustSettings', \"Configure Workspace Trust Settings\") }, precondition: ContextKeyExpr.and(WorkspaceTrustContext.IsEnabled, ContextKeyExpr.equals(`config.${WORKSPACE_TRUST_ENABLED}`, true)), category: WORKSPACES_CATEGORY, f1: true"} {"_id":"doc-en-vscode-4c384dace9f3bd8f1fc81e1d1014f657c109069c15a9c795082dd42c647d7c84","title":"","text":"this.os = OS; this.userHome = pathService.defaultUriScheme === Schemas.file ? this.pathService.userHome({ preferLocal: true }) : undefined; const memento = this.storedFormattersMemento = new Memento('cachedResourceLabelFormatters', storageService); const memento = this.storedFormattersMemento = new Memento('cachedResourceLabelFormatters2', storageService); this.storedFormatters = memento.getMemento(StorageScope.PROFILE, StorageTarget.MACHINE); this.formatters = this.storedFormatters?.formatters || []; this.formatters = this.storedFormatters?.formatters?.slice() || []; // Remote environment is potentially long running this.resolveRemoteEnvironment();"} {"_id":"doc-en-vscode-40e416c6c9a664eec2c5fa923c62997adc8240112f8a6c6529a463ecb89398ac","title":"","text":"test('label caching', () => { const m = new Memento('cachedResourceLabelFormatters', storageService).getMemento(StorageScope.PROFILE, StorageTarget.MACHINE); const m = new Memento('cachedResourceLabelFormatters2', storageService).getMemento(StorageScope.PROFILE, StorageTarget.MACHINE); const makeFormatter = (scheme: string): ResourceLabelFormatter => ({ formatting: { label: `${path} (${scheme})`, separator: '/' }, scheme }); assert.deepStrictEqual(m, {});"} {"_id":"doc-en-vscode-9cc168f104db467eb91828eff8841d7519313c66f8d3ded9ad2df84b5277e69b","title":"","text":"}, { \"name\": \"border-image-width\", \"desc\": \"The four values of 'border-image-width' specify offsets that are used to divide the border image area into nine parts. They represent inward distances from the the top, right, bottom, and left sides of the area, respectively.\", \"desc\": \"The four values of 'border-image-width' specify offsets that are used to divide the border image area into nine parts. They represent inward distances from the top, right, bottom, and left sides of the area, respectively.\", \"browsers\": \"FF13,IE11\", \"restriction\": \"length, percentage, number\", \"values\": []"} {"_id":"doc-en-vscode-47b44ec49c24b15eee7f14e84b6264d7d6082cbf576a744f6c6b7d21d792eb32","title":"","text":"}, { \"name\": \"counter-increment\", \"desc\": \"Counters are used with the 'counter()' and 'counters()' functions of the the 'content' property.\", \"desc\": \"Counters are used with the 'counter()' and 'counters()' functions of the 'content' property.\", \"browsers\": \"C,FF1.5,IE8,O10.5,S3\", \"restriction\": \"identifier, integer\", \"values\": []"} {"_id":"doc-en-vscode-1fd1398245dae1e96ee3fed16a9af72db5370c879c16b2de112a2733a1060d03","title":"","text":"\"values\": [ { \"name\": \"center\", \"desc\": \"Places the center of the Grid Item's margin box at the center of the the Grid Item's column.\" \"desc\": \"Places the center of the Grid Item's margin box at the center of the Grid Item's column.\" }, { \"name\": \"end\","} {"_id":"doc-en-vscode-c6fe81f4d67bdd9f59410b4f23a624c41c0d78219ffa63fdaaa97e6b416e622b","title":"","text":"\"values\": [ { \"name\": \"center\", \"desc\": \"Places the center of the Grid Item's margin box at the center of the the Grid Item's row.\" \"desc\": \"Places the center of the Grid Item's margin box at the center of the Grid Item's row.\" }, { \"name\": \"end\","} {"_id":"doc-en-vscode-d218fa499eda32e6ecfd4c7bd76235aea33e3adf46223d01908019700de8001e","title":"","text":"async performReplace(element: FolderMatch | FileMatch | Match): Promise { // since multiple elements can be selected, we need to check the type of the FolderMatch/FileMatch/Match before we perform the replace. const elementsToReplace = getElementsToOperateOnInfo(this.viewer, element, this.configurationService.getValue('search')); const opInfo = getElementsToOperateOnInfo(this.viewer, element, this.configurationService.getValue('search')); const elementsToReplace = opInfo.elements; await Promise.all(elementsToReplace.map(async (elem) => { const parent = elem.parent();"} {"_id":"doc-en-vscode-0727d458db9fb0fb35ae75548ddbd54ff9136760e098ec6208d268246ecd0c00","title":"","text":"} override run(): Promise { const elementsToRemove = getElementsToOperateOnInfo(this.viewer, this.element, this.configurationService.getValue('search')); const opInfo = getElementsToOperateOnInfo(this.viewer, this.element, this.configurationService.getValue('search')); const elementsToRemove = opInfo.elements; const currentBottomFocusElement = elementsToRemove[elementsToRemove.length - 1]; const nextFocusElement = !currentBottomFocusElement || currentBottomFocusElement instanceof SearchResult || arrayContainsElementOrParent(currentBottomFocusElement, elementsToRemove) ? const nextFocusElement = opInfo.mustReselect && (!currentBottomFocusElement || currentBottomFocusElement instanceof SearchResult || arrayContainsElementOrParent(currentBottomFocusElement, elementsToRemove)) ? this.getElementToFocusAfterRemoved(this.viewer, currentBottomFocusElement) : null;"} {"_id":"doc-en-vscode-78ede45b82dd5d74564d842792e329093c417864c18842c74eebbda58d054c92","title":"","text":"}); }; function getElementsToOperateOnInfo(viewer: WorkbenchObjectTree, currElement: RenderableMatch, sortConfig: ISearchConfigurationProperties): RenderableMatch[] { function getElementsToOperateOnInfo(viewer: WorkbenchObjectTree, currElement: RenderableMatch, sortConfig: ISearchConfigurationProperties): { elements: RenderableMatch[]; mustReselect: boolean } { let elements: RenderableMatch[] = viewer.getSelection().filter((x): x is RenderableMatch => x !== null).sort((a, b) => searchComparer(a, b, sortConfig.sortOrder)); const mustReselect = elements.includes(currElement); // this indicates whether we need to re-focus/re-select on a remove. // if selection doesn't include multiple elements, just return current focus element. if (!(elements.length > 1 && elements.includes(currElement))) { elements = [currElement]; } return elements; return { elements, mustReselect }; }"} {"_id":"doc-en-vscode-9c8c460aae989c99fcbf87003697aa612fde992cda047582e72c2c23ad8d121a","title":"","text":"const pendingCommentText = this._pendingCommentCache[e.owner] && this._pendingCommentCache[e.owner][thread.threadId!]; this.displayCommentThread(e.owner, thread, pendingCommentText); this._commentInfos.filter(info => info.owner === e.owner)[0].threads.push(thread); this.tryUpdateReservedSpace(); }); this._commentThreadRangeDecorator.update(this.editor, commentInfo); }));"} {"_id":"doc-en-vscode-68c7a70cdb8e13263b9a89a10d056093067714ce4d45e90a9a4325a2ea0c4ee3","title":"","text":"return; } private setComments(commentInfos: ICommentInfo[]): void { if (!this.editor || !this.commentService.isCommentingEnabled) { return; } this._commentInfos = commentInfos; private tryUpdateReservedSpace() { let lineDecorationsWidth: number = this.editor.getLayoutInfo().decorationsWidth; const hasCommentsOrRanges = this._commentInfos.some(info => { const hasRanges = Boolean(info.commentingRanges && (Array.isArray(info.commentingRanges) ? info.commentingRanges : info.commentingRanges.ranges).length); return hasRanges || (info.threads.length > 0); }); if (this._commentInfos.some(info => Boolean(info.commentingRanges && (Array.isArray(info.commentingRanges) ? info.commentingRanges : info.commentingRanges.ranges).length))) { if (hasCommentsOrRanges) { this._workspaceHasCommenting.set(true); if (!this._commentingRangeSpaceReserved) { this._commentingRangeSpaceReserved = true;"} {"_id":"doc-en-vscode-a41ff9b4a97c76238e12a06e0a360638a4be21e64a0200dcfb013f6f00a849c4","title":"","text":"}); } } } private setComments(commentInfos: ICommentInfo[]): void { if (!this.editor || !this.commentService.isCommentingEnabled) { return; } this._commentInfos = commentInfos; this.tryUpdateReservedSpace(); // create viewzones this.removeCommentWidgetsAndStoreCache();"} {"_id":"doc-en-vscode-8c156d830dbf4f44b6e24fa19ded96ace1533477cd8765a839cbd52017492df9","title":"","text":"/** * Optional commenting range provider. Provide a list {@link Range ranges} which support commenting to any given resource uri. * * If not provided, users can leave comments in any document opened in the editor. * If not provided, users cannot leave any comments. */ commentingRangeProvider?: CommentingRangeProvider;"} {"_id":"doc-en-vscode-9de6e6d507fa0512ea7ae1949b0222b666591248ff152d5cd21e96de58ffc62d","title":"","text":"public removeManualRanges(ranges: ILineRange[]) { const newFoldingRanges: FoldRange[] = new Array(); const containedBy = (foldRange: FoldRange) => { const intersects = (foldRange: FoldRange) => { for (const range of ranges) { if (range.startLineNumber <= foldRange.startLineNumber && range.endLineNumber >= foldRange.endLineNumber) { if (!(range.startLineNumber > foldRange.endLineNumber || foldRange.startLineNumber > range.endLineNumber)) { return true; } }"} {"_id":"doc-en-vscode-fddd86c9e7aa839fbb532395f4050694cb23d4df168e40bf027ec97d4e831bb9","title":"","text":"}; for (let i = 0; i < this._regions.length; i++) { const foldRange = this._regions.toFoldRange(i); if (!foldRange.isUserDefined && !foldRange.isRecovered || !containedBy(foldRange)) { if (!foldRange.isUserDefined && !foldRange.isRecovered || !intersects(foldRange)) { newFoldingRanges.push(foldRange); } }"} {"_id":"doc-en-vscode-57b8c1627ef25b315a65fb5d42169c7888765319f0cc14e6fa09d668e93c186a","title":"","text":"if (selections) { const ranges: ILineRange[] = []; for (const selection of selections) { let endLineNumber = selection.endLineNumber; if (selection.endColumn === 1) { --endLineNumber; } const startLineNumber = selection.startLineNumber; ranges.push(endLineNumber >= selection.startLineNumber ? { startLineNumber, endLineNumber } : { endLineNumber, startLineNumber }); const { startLineNumber, endLineNumber } = selection; ranges.push(endLineNumber >= startLineNumber ? { startLineNumber, endLineNumber } : { endLineNumber, startLineNumber }); } foldingModel.removeManualRanges(ranges); foldingController.triggerFoldingModelChanged();"} {"_id":"doc-en-vscode-3bc9242b768e57526a9cd0f6bb436bffdd62c3d7b7ec58a95c28650b4c5ae713","title":"","text":"private registerListeners(): void { this._register(addDisposableListener(this.container, EventType.DRAG_ENTER, e => this.onDragEnter(e))); this._register(addDisposableListener(this.container, EventType.DRAG_LEAVE, () => this.onDragLeave())); this._register(addDisposableListener(this.container, EventType.DRAG_OVER, e => { if (!this.overlay) { this.onDragEnter(e); } })); [this.container, window].forEach(node => this._register(addDisposableListener(node as HTMLElement, EventType.DRAG_END, () => this.onDragEnd()))); }"} {"_id":"doc-en-vscode-c75abe7b1741f2550dcc2365a41bc18384a90655cd0ea507501625ccae169f22","title":"","text":"builtin printf \"x1b]633;P;IsWindows=Truex07\" fi # Allow verifying $BASH_COMMAND doesn't have aliases resolved via history when the right HISTCONTROL # configuration is used if [[ \"$HISTCONTROL\" =~ .*(erasedups|ignoreboth|ignoredups).* ]]; then __vsc_history_verify=0 else __vsc_history_verify=1 fi __vsc_initialized=0 __vsc_original_PS1=\"$PS1\" __vsc_original_PS2=\"$PS2\""} {"_id":"doc-en-vscode-5ce8a9d882ef3e82f11dacc9abd477a95d58f460c5fcc9be93800e4804fe7dc3","title":"","text":"__vsc_preexec() { __vsc_initialized=1 if [[ ! \"$BASH_COMMAND\" =~ ^__vsc_prompt* ]]; then __vsc_current_command=$BASH_COMMAND # Use history if it's available to verify the command as BASH_COMMAND comes in with aliases # resolved if [ \"$__vsc_history_verify\" = \"1\" ]; then __vsc_current_command=\"$(builtin history 1 | sed -r 's/ *[0-9]+ +//')\" else __vsc_current_command=$BASH_COMMAND fi else __vsc_current_command=\"\" fi"} {"_id":"doc-en-vscode-2f594709e103f4cdc8141614bb3615dfa343ce097e555612d005638fa9674784","title":"","text":"import { OutlineModel, OutlineElement } from 'vs/editor/contrib/documentSymbols/browser/outlineModel'; import { CancellationToken, CancellationTokenSource, } from 'vs/base/common/cancellation'; import * as dom from 'vs/base/browser/dom'; import { EditorLayoutInfo, EditorOption } from 'vs/editor/common/config/editorOptions'; import { EditorLayoutInfo, EditorOption, RenderLineNumbersType } from 'vs/editor/common/config/editorOptions'; import { createStringBuilder } from 'vs/editor/common/core/stringBuilder'; import { RenderLineInput, renderViewLine } from 'vs/editor/common/viewLayout/viewLineRenderer'; import { SymbolKind } from 'vs/editor/common/languages';"} {"_id":"doc-en-vscode-05f5e8ccec777a1ca098296a79a15ec2cd05a623fb092ca43b14ceeb5ba7746c","title":"","text":"this._sessionStore.add(this._editor.onDidLayoutChange(() => this._onDidResize())); this._sessionStore.add(this._editor.onDidChangeModelContent(() => this._updateSoon.schedule())); this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(() => this._update(true))); const lineNumberOption = this._editor.getOption(EditorOption.lineNumbers); if (lineNumberOption.renderType === RenderLineNumbersType.Relative) { this._sessionStore.add(this._editor.onDidChangeCursorPosition(() => this._update(false))); } this._update(true); } }"} {"_id":"doc-en-vscode-aa353922148fba5dcb07d5df21e0bc3e3794ac1c658787a850ddd1117c525612","title":"","text":"} const innerLineNumberHTML = document.createElement('span'); innerLineNumberHTML.innerText = this._lineNumber.toString(); const lineNumberOption = this._editor.getOption(EditorOption.lineNumbers); if (lineNumberOption.renderType === RenderLineNumbersType.On || lineNumberOption.renderType === RenderLineNumbersType.Interval && this._lineNumber % 10 === 0) { innerLineNumberHTML.innerText = this._lineNumber.toString(); } else if (lineNumberOption.renderType === RenderLineNumbersType.Relative) { innerLineNumberHTML.innerText = Math.abs(this._lineNumber - this._editor.getPosition().lineNumber).toString(); } innerLineNumberHTML.className = 'sticky-line-number'; innerLineNumberHTML.style.lineHeight = `${lineHeight}px`; innerLineNumberHTML.style.width = `${layoutInfo.lineNumbersWidth}px`;"} {"_id":"doc-en-vscode-e44d5a1f632b0968e9e24d829ef09cf7edeb69162e30d5c4f86e869b22e0ae6a","title":"","text":"} add-zsh-hook precmd __vsc_precmd add-zsh-hook preexec __vsc_preexec if [[ $options[login] = off ]]; then ZDOTDIR=$USER_ZDOTDIR fi "} {"_id":"doc-en-vscode-e3d0d6b72c6613c80c46536bb862f5e608ac533eead3781c740ebfecb0a9d380","title":"","text":"# Prevent the script recursing when setting up if [ -n \"$VSCODE_SHELL_INTEGRATION\" ]; then ZDOTDIR=$USER_ZDOTDIR builtin return fi"} {"_id":"doc-en-vscode-2f7df1e93f7570437d3bb23076cba06f77de1de2208b950b16fe5e7683306160","title":"","text":"\"vscode-proxy-agent\": \"^0.12.0\", \"vscode-regexpp\": \"^3.1.0\", \"vscode-textmate\": \"7.0.1\", \"xterm\": \"5.0.0-beta.32\", \"xterm-addon-canvas\": \"0.2.0-beta.15\", \"xterm-addon-search\": \"0.10.0-beta.3\", \"xterm-addon-serialize\": \"0.8.0-beta.3\", \"xterm-addon-unicode11\": \"0.4.0-beta.3\", \"xterm-addon-webgl\": \"0.13.0-beta.32\", \"xterm\": \"5.0.0-beta.35\", \"xterm-addon-canvas\": \"0.2.0-beta.17\", \"xterm-addon-search\": \"0.10.0-beta.5\", \"xterm-addon-serialize\": \"0.8.0-beta.5\", \"xterm-addon-unicode11\": \"0.4.0-beta.5\", \"xterm-addon-webgl\": \"0.13.0-beta.35\", \"xterm-headless\": \"5.0.0-beta.5\", \"yauzl\": \"^2.9.2\", \"yazl\": \"^2.4.3\""} {"_id":"doc-en-vscode-b2079e441e1eb79b5ba5d52e874817cc0c68af1abe4d2e21dcf38eea6fa88c38","title":"","text":"\"tas-client-umd\": \"0.1.6\", \"vscode-oniguruma\": \"1.6.1\", \"vscode-textmate\": \"7.0.1\", \"xterm\": \"5.0.0-beta.32\", \"xterm-addon-canvas\": \"0.2.0-beta.15\", \"xterm-addon-search\": \"0.10.0-beta.3\", \"xterm-addon-unicode11\": \"0.4.0-beta.3\", \"xterm-addon-webgl\": \"0.13.0-beta.32\" \"xterm\": \"5.0.0-beta.35\", \"xterm-addon-canvas\": \"0.2.0-beta.17\", \"xterm-addon-search\": \"0.10.0-beta.5\", \"xterm-addon-unicode11\": \"0.4.0-beta.5\", \"xterm-addon-webgl\": \"0.13.0-beta.35\" } }"} {"_id":"doc-en-vscode-02a4b0f5d203113c6d6cda6f76869c5e9a3df4049b473e70cad689161c918fb5","title":"","text":"resolved \"https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-7.0.1.tgz#8118a32b02735dccd14f893b495fa5389ad7de79\" integrity sha512-zQ5U/nuXAAMsh691FtV0wPz89nSkHbs+IQV8FDk+wew9BlSDhf4UmWGlWJfTR2Ti6xZv87Tj5fENzKf6Qk7aLw== xterm-addon-canvas@0.2.0-beta.15: version \"0.2.0-beta.15\" resolved \"https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.2.0-beta.15.tgz#de863e46410b1de357b153abf1984227777760e4\" integrity sha512-E1pNCDSVTINchwWLysZ9ZD/BPv1WLGV52xRHB00US1PHHELbhtvms+6dZ44WZEDXhtfpptRZ1VBx+QpvfJIuvw== xterm-addon-search@0.10.0-beta.3: version \"0.10.0-beta.3\" resolved \"https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.10.0-beta.3.tgz#5194434d86105637c71f6f20139a9d0b5c1a956a\" integrity sha512-UeGm/ymnp7HUYJJtsP0D+bljOWbdk3MctcLJ+0jv8AmU6YlAzJFtouvYSQrD5SAMyht5CRsvjzFgqic9X02JYg== xterm-addon-unicode11@0.4.0-beta.3: version \"0.4.0-beta.3\" resolved \"https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.4.0-beta.3.tgz#f350184155fafd5ad0d6fbf31d13e6ca7dea1efa\" integrity sha512-FryZAVwbUjKTmwXnm1trch/2XO60F5JsDvOkZhzobV1hm10sFLVuZpFyHXiUx7TFeeFsvNP+S77LAtWoeT5z+Q== xterm-addon-webgl@0.13.0-beta.32: version \"0.13.0-beta.32\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.13.0-beta.32.tgz#ae7335f788ae611733e03f6ca38280ab7b86d212\" integrity sha512-xOudNzYXaRh9QZ+IigXM5EB3bM8l3/F8F35EpJRYvvsylVxiB6Km8X8l7+nxlWt+uYdnHZs0ka2rvtL8kOP/uw== xterm@5.0.0-beta.32: version \"5.0.0-beta.32\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.0.0-beta.32.tgz#62bb9902429c0055fd2fd85c9eecfbf1756ed31c\" integrity sha512-OAM1GaBs/chK63Cr86XbVhfVCLLXLpNxxFrv3RK9xoyb9dwiY3gaMxK9jeGzTnrbGLWJb+k5nxaC0rx2YsHvUA== xterm-addon-canvas@0.2.0-beta.17: version \"0.2.0-beta.17\" resolved \"https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.2.0-beta.17.tgz#e84a86530b20bd3edcce16b4566f346cd186ab4d\" integrity sha512-2ukPdCA92VTFYQRE56ylzvI3cfaQYDWd/Mc4jlEItI6sV/EA5RnUbbP+2sFIx0JlmHK6nVYXXNY2p6QRB7MRew== xterm-addon-search@0.10.0-beta.5: version \"0.10.0-beta.5\" resolved \"https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.10.0-beta.5.tgz#a2cb16bda4ddf8783b80433155ad94f5822271f8\" integrity sha512-kjog7cm1iEZ2XyQFVs3KAvoI2pKoX0cq2WWjL0FuXYXpKQ9vXmfrWSR7PiJ6zpTIRvr6UtaSGKhmZVHLNA79WA== xterm-addon-unicode11@0.4.0-beta.5: version \"0.4.0-beta.5\" resolved \"https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.4.0-beta.5.tgz#3900e66f10d2e506133b61d7421aab6878d32665\" integrity sha512-+g+fuxAd/tkCEJ/jhdnebXKtdPrhsu4VKWNnB/3qM35GbuGQOasmYFYnKL+HYZMpbQ6YqeZcXTVg/wnCTttz0g== xterm-addon-webgl@0.13.0-beta.35: version \"0.13.0-beta.35\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.13.0-beta.35.tgz#98b5dc102583120de25c7c6e0f35cd34ab6bef98\" integrity sha512-powgeb3ifEZK7zWwLJuE8YRz/Z0UzDrrVA9NTx9mH7+vWxrGt9ZgroychoeCqZBvKMofiUM5vlf1oWdSmsMfzw== xterm@5.0.0-beta.35: version \"5.0.0-beta.35\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.0.0-beta.35.tgz#3bbf5780c98aaaa6476e7590dff1d8f5014fce9d\" integrity sha512-tzJTel1E/FmB0VQDb44xApVB+ln+BifIbHD4V9x9Z3D9m1cMmPHy8J8efdILkn1TxXGlCl7VC35nG122Qq5exw== "} {"_id":"doc-en-vscode-3c37e5bc2a3cf0c3e224ea0e8666af1fc49dfdb98213ee7610b75059d381615e","title":"","text":"resolved \"https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f\" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= xterm-addon-canvas@0.2.0-beta.15: version \"0.2.0-beta.15\" resolved \"https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.2.0-beta.15.tgz#de863e46410b1de357b153abf1984227777760e4\" integrity sha512-E1pNCDSVTINchwWLysZ9ZD/BPv1WLGV52xRHB00US1PHHELbhtvms+6dZ44WZEDXhtfpptRZ1VBx+QpvfJIuvw== xterm-addon-search@0.10.0-beta.3: version \"0.10.0-beta.3\" resolved \"https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.10.0-beta.3.tgz#5194434d86105637c71f6f20139a9d0b5c1a956a\" integrity sha512-UeGm/ymnp7HUYJJtsP0D+bljOWbdk3MctcLJ+0jv8AmU6YlAzJFtouvYSQrD5SAMyht5CRsvjzFgqic9X02JYg== xterm-addon-serialize@0.8.0-beta.3: version \"0.8.0-beta.3\" resolved \"https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.8.0-beta.3.tgz#47ade3fedacbb75bd26e63cfe0120586623e0e4f\" integrity sha512-gvfempZCYuAhLqN4O6fA2TuoavPjOxFKlh8hLcOzPackiLUhwKr1jQpDXcnq8VgqUiGgb+XNZpPEbI0Q7EhTgA== xterm-addon-unicode11@0.4.0-beta.3: version \"0.4.0-beta.3\" resolved \"https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.4.0-beta.3.tgz#f350184155fafd5ad0d6fbf31d13e6ca7dea1efa\" integrity sha512-FryZAVwbUjKTmwXnm1trch/2XO60F5JsDvOkZhzobV1hm10sFLVuZpFyHXiUx7TFeeFsvNP+S77LAtWoeT5z+Q== xterm-addon-webgl@0.13.0-beta.32: version \"0.13.0-beta.32\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.13.0-beta.32.tgz#ae7335f788ae611733e03f6ca38280ab7b86d212\" integrity sha512-xOudNzYXaRh9QZ+IigXM5EB3bM8l3/F8F35EpJRYvvsylVxiB6Km8X8l7+nxlWt+uYdnHZs0ka2rvtL8kOP/uw== xterm-addon-canvas@0.2.0-beta.17: version \"0.2.0-beta.17\" resolved \"https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.2.0-beta.17.tgz#e84a86530b20bd3edcce16b4566f346cd186ab4d\" integrity sha512-2ukPdCA92VTFYQRE56ylzvI3cfaQYDWd/Mc4jlEItI6sV/EA5RnUbbP+2sFIx0JlmHK6nVYXXNY2p6QRB7MRew== xterm-addon-search@0.10.0-beta.5: version \"0.10.0-beta.5\" resolved \"https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.10.0-beta.5.tgz#a2cb16bda4ddf8783b80433155ad94f5822271f8\" integrity sha512-kjog7cm1iEZ2XyQFVs3KAvoI2pKoX0cq2WWjL0FuXYXpKQ9vXmfrWSR7PiJ6zpTIRvr6UtaSGKhmZVHLNA79WA== xterm-addon-serialize@0.8.0-beta.5: version \"0.8.0-beta.5\" resolved \"https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.8.0-beta.5.tgz#3d2f3be173f4f1c31ae7bf25179e8ecddf2b33b2\" integrity sha512-rkSUaO1XBcy3ipScZMA5PrOKu/DfXo8XC/V7hZlhMiBNbZKlbk2rFb3X0FB1f07hw7oEkHLjuIJEY5Qtxfe9/w== xterm-addon-unicode11@0.4.0-beta.5: version \"0.4.0-beta.5\" resolved \"https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.4.0-beta.5.tgz#3900e66f10d2e506133b61d7421aab6878d32665\" integrity sha512-+g+fuxAd/tkCEJ/jhdnebXKtdPrhsu4VKWNnB/3qM35GbuGQOasmYFYnKL+HYZMpbQ6YqeZcXTVg/wnCTttz0g== xterm-addon-webgl@0.13.0-beta.35: version \"0.13.0-beta.35\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.13.0-beta.35.tgz#98b5dc102583120de25c7c6e0f35cd34ab6bef98\" integrity sha512-powgeb3ifEZK7zWwLJuE8YRz/Z0UzDrrVA9NTx9mH7+vWxrGt9ZgroychoeCqZBvKMofiUM5vlf1oWdSmsMfzw== xterm-headless@5.0.0-beta.5: version \"5.0.0-beta.5\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.0.0-beta.5.tgz#e29b6c5081f31f887122b7263ba996b0c46b3c22\" integrity sha512-CMQ1+prBNF92oBMeZzc2rfTcmOaCGfwwSaoPYNTjyziZT6mZsEg7amajYkb0YAnqJ29MFm4kPGZbU78/dX4k2A== xterm@5.0.0-beta.32: version \"5.0.0-beta.32\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.0.0-beta.32.tgz#62bb9902429c0055fd2fd85c9eecfbf1756ed31c\" integrity sha512-OAM1GaBs/chK63Cr86XbVhfVCLLXLpNxxFrv3RK9xoyb9dwiY3gaMxK9jeGzTnrbGLWJb+k5nxaC0rx2YsHvUA== xterm@5.0.0-beta.35: version \"5.0.0-beta.35\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.0.0-beta.35.tgz#3bbf5780c98aaaa6476e7590dff1d8f5014fce9d\" integrity sha512-tzJTel1E/FmB0VQDb44xApVB+ln+BifIbHD4V9x9Z3D9m1cMmPHy8J8efdILkn1TxXGlCl7VC35nG122Qq5exw== yallist@^4.0.0: version \"4.0.0\""} {"_id":"doc-en-vscode-7adf0388cba0a20bd9e3b2695af0408227b00f5219720132aec0460ab7dea69c","title":"","text":"dependencies: object-keys \"~0.4.0\" xterm-addon-canvas@0.2.0-beta.15: version \"0.2.0-beta.15\" resolved \"https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.2.0-beta.15.tgz#de863e46410b1de357b153abf1984227777760e4\" integrity sha512-E1pNCDSVTINchwWLysZ9ZD/BPv1WLGV52xRHB00US1PHHELbhtvms+6dZ44WZEDXhtfpptRZ1VBx+QpvfJIuvw== xterm-addon-search@0.10.0-beta.3: version \"0.10.0-beta.3\" resolved \"https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.10.0-beta.3.tgz#5194434d86105637c71f6f20139a9d0b5c1a956a\" integrity sha512-UeGm/ymnp7HUYJJtsP0D+bljOWbdk3MctcLJ+0jv8AmU6YlAzJFtouvYSQrD5SAMyht5CRsvjzFgqic9X02JYg== xterm-addon-serialize@0.8.0-beta.3: version \"0.8.0-beta.3\" resolved \"https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.8.0-beta.3.tgz#47ade3fedacbb75bd26e63cfe0120586623e0e4f\" integrity sha512-gvfempZCYuAhLqN4O6fA2TuoavPjOxFKlh8hLcOzPackiLUhwKr1jQpDXcnq8VgqUiGgb+XNZpPEbI0Q7EhTgA== xterm-addon-unicode11@0.4.0-beta.3: version \"0.4.0-beta.3\" resolved \"https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.4.0-beta.3.tgz#f350184155fafd5ad0d6fbf31d13e6ca7dea1efa\" integrity sha512-FryZAVwbUjKTmwXnm1trch/2XO60F5JsDvOkZhzobV1hm10sFLVuZpFyHXiUx7TFeeFsvNP+S77LAtWoeT5z+Q== xterm-addon-webgl@0.13.0-beta.32: version \"0.13.0-beta.32\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.13.0-beta.32.tgz#ae7335f788ae611733e03f6ca38280ab7b86d212\" integrity sha512-xOudNzYXaRh9QZ+IigXM5EB3bM8l3/F8F35EpJRYvvsylVxiB6Km8X8l7+nxlWt+uYdnHZs0ka2rvtL8kOP/uw== xterm-addon-canvas@0.2.0-beta.17: version \"0.2.0-beta.17\" resolved \"https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.2.0-beta.17.tgz#e84a86530b20bd3edcce16b4566f346cd186ab4d\" integrity sha512-2ukPdCA92VTFYQRE56ylzvI3cfaQYDWd/Mc4jlEItI6sV/EA5RnUbbP+2sFIx0JlmHK6nVYXXNY2p6QRB7MRew== xterm-addon-search@0.10.0-beta.5: version \"0.10.0-beta.5\" resolved \"https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.10.0-beta.5.tgz#a2cb16bda4ddf8783b80433155ad94f5822271f8\" integrity sha512-kjog7cm1iEZ2XyQFVs3KAvoI2pKoX0cq2WWjL0FuXYXpKQ9vXmfrWSR7PiJ6zpTIRvr6UtaSGKhmZVHLNA79WA== xterm-addon-serialize@0.8.0-beta.5: version \"0.8.0-beta.5\" resolved \"https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.8.0-beta.5.tgz#3d2f3be173f4f1c31ae7bf25179e8ecddf2b33b2\" integrity sha512-rkSUaO1XBcy3ipScZMA5PrOKu/DfXo8XC/V7hZlhMiBNbZKlbk2rFb3X0FB1f07hw7oEkHLjuIJEY5Qtxfe9/w== xterm-addon-unicode11@0.4.0-beta.5: version \"0.4.0-beta.5\" resolved \"https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.4.0-beta.5.tgz#3900e66f10d2e506133b61d7421aab6878d32665\" integrity sha512-+g+fuxAd/tkCEJ/jhdnebXKtdPrhsu4VKWNnB/3qM35GbuGQOasmYFYnKL+HYZMpbQ6YqeZcXTVg/wnCTttz0g== xterm-addon-webgl@0.13.0-beta.35: version \"0.13.0-beta.35\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.13.0-beta.35.tgz#98b5dc102583120de25c7c6e0f35cd34ab6bef98\" integrity sha512-powgeb3ifEZK7zWwLJuE8YRz/Z0UzDrrVA9NTx9mH7+vWxrGt9ZgroychoeCqZBvKMofiUM5vlf1oWdSmsMfzw== xterm-headless@5.0.0-beta.5: version \"5.0.0-beta.5\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.0.0-beta.5.tgz#e29b6c5081f31f887122b7263ba996b0c46b3c22\" integrity sha512-CMQ1+prBNF92oBMeZzc2rfTcmOaCGfwwSaoPYNTjyziZT6mZsEg7amajYkb0YAnqJ29MFm4kPGZbU78/dX4k2A== xterm@5.0.0-beta.32: version \"5.0.0-beta.32\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.0.0-beta.32.tgz#62bb9902429c0055fd2fd85c9eecfbf1756ed31c\" integrity sha512-OAM1GaBs/chK63Cr86XbVhfVCLLXLpNxxFrv3RK9xoyb9dwiY3gaMxK9jeGzTnrbGLWJb+k5nxaC0rx2YsHvUA== xterm@5.0.0-beta.35: version \"5.0.0-beta.35\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.0.0-beta.35.tgz#3bbf5780c98aaaa6476e7590dff1d8f5014fce9d\" integrity sha512-tzJTel1E/FmB0VQDb44xApVB+ln+BifIbHD4V9x9Z3D9m1cMmPHy8J8efdILkn1TxXGlCl7VC35nG122Qq5exw== y18n@^3.2.1: version \"3.2.2\""} {"_id":"doc-en-vscode-770adf3916dbf851dcc8531b320bedd3c165fa10a0569d81bbea73a1f9e43d15","title":"","text":"); } async cloneRepository(url?: string, parentPath?: string, options: { recursive?: boolean } = {}): Promise { async cloneRepository(url?: string, parentPath?: string, options: { recursive?: boolean; ref?: string } = {}): Promise { if (!url || typeof url !== 'string') { url = await pickRemoteSource({ providerLabel: provider => localize('clonefrom', \"Clone from {0}\", provider.name),"} {"_id":"doc-en-vscode-9a76fb1743fbefae4f57573b0387195dd85ead2466738534723c5b24ca4dd8ea","title":"","text":"(progress, token) => this.git.clone(url!, { parentPath: parentPath!, progress, recursive: options.recursive }, token) ); if (options.ref !== undefined) { const repository = this.model.getRepository(Uri.file(repositoryPath)); await repository?.checkout(options.ref); } const config = workspace.getConfiguration('git'); const openAfterClone = config.get<'always' | 'alwaysNewWindow' | 'whenNoFolderOpen' | 'prompt'>('openAfterClone');"} {"_id":"doc-en-vscode-8f212f640d7d1049cdae28271c79c4d5b70f353c44ed37efcc305587455d96dd","title":"","text":"} @command('git.clone') async clone(url?: string, parentPath?: string): Promise { await this.cloneRepository(url, parentPath); async clone(url?: string, parentPath?: string, options?: { ref?: string }): Promise { await this.cloneRepository(url, parentPath, options); } @command('git.cloneRecursive')"} {"_id":"doc-en-vscode-ea706fcf088315ae659e34112a46cd80888a5e186edb481c5441b37be8ca22ba","title":"","text":"private clone(uri: Uri): void { const data = querystring.parse(uri.query); const ref = data.ref; if (!data.url) { console.warn('Failed to open URI:', uri);"} {"_id":"doc-en-vscode-d4d7df6bb8ae37aa976060f148003a9c170a69c1089d9872695d3957f0ffcb41","title":"","text":"return; } if (ref !== undefined && typeof ref !== 'string') { console.warn('Failed to open URI:', uri); return; } let cloneUri: Uri; try { let rawUri = Array.isArray(data.url) ? data.url[0] : data.url;"} {"_id":"doc-en-vscode-0407c6a7cd57d14d637a08f4c35ad642712c0933316379b6e28b8ba69d67a1ad","title":"","text":"return; } commands.executeCommand('git.clone', cloneUri.toString(true)); commands.executeCommand('git.clone', cloneUri.toString(true), undefined, { ref: ref }); } dispose(): void {"} {"_id":"doc-en-vscode-12bc8d2be47305aa9cd96a7b4fc875712e42fdbf886f33087794771bdbfad536","title":"","text":"import { Disposable } from 'vs/base/common/lifecycle'; import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions, IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { Registry } from 'vs/platform/registry/common/platform'; import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle'; import { ILifecycleService, LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle'; import { Action2, IAction2Options, MenuRegistry, registerAction2 } from 'vs/platform/actions/common/actions'; import { ServicesAccessor } from 'vs/editor/browser/editorExtensions'; import { localize } from 'vs/nls';"} {"_id":"doc-en-vscode-4018a0218cb3879686a71bc49ffed128e4c0c258952aec076e7c80009764e506","title":"","text":"@IQuickInputService private readonly quickInputService: IQuickInputService, @ICommandService private commandService: ICommandService, @IContextKeyService private readonly contextKeyService: IContextKeyService, @IFileDialogService private readonly fileDialogService: IFileDialogService @IFileDialogService private readonly fileDialogService: IFileDialogService, @ILifecycleService private readonly lifecycleService: ILifecycleService ) { super();"} {"_id":"doc-en-vscode-b638ddfdb11c5f8e8f4450fc41e12e5f24f522f049ec88186b9c41503cad3f3b","title":"","text":"this.shouldShowViewsContext = EDIT_SESSIONS_SHOW_VIEW.bindTo(this.contextKeyService); this._register(this.fileService.registerProvider(EditSessionsFileSystemProvider.SCHEMA, new EditSessionsFileSystemProvider(this.editSessionsWorkbenchService))); this.lifecycleService.onWillShutdown((e) => e.join(this.autoStoreEditSession(), { id: 'autoStoreEditSession', label: localize('autoStoreEditSession', 'Storing current edit session...') })); } private async autoStoreEditSession() { if (this.configurationService.getValue('workbench.experimental.editSessions.autoStore') === 'onShutdown') { await this.progressService.withProgress({ location: ProgressLocation.Window, type: 'syncing', title: localize('store edit session', 'Storing edit session...') }, async () => this.storeEditSession(false)); } } private registerViews() {"} {"_id":"doc-en-vscode-843b8f718c206403f137a07dea21a6b1bdfd024d8ffc34e854c213b0cf364029","title":"","text":"Registry.as(Extensions.Configuration).registerConfiguration({ ...workbenchConfigurationNodeBase, 'properties': { 'workbench.experimental.editSessions.autoStore': { enum: ['onShutdown', 'off'], enumDescriptions: [ localize('autoStore.onShutdown', \"Automatically store current edit session on window close.\"), localize('autoStore.off', \"Never attempt to automatically store an edit session.\") ], 'type': 'string', 'tags': ['experimental', 'usesOnlineServices'], 'default': 'off', 'markdownDescription': localize('autoStore', \"Controls whether to automatically store an available edit session for the current workspace.\"), }, 'workbench.experimental.editSessions.enabled': { 'type': 'boolean', 'tags': ['experimental', 'usesOnlineServices'],"} {"_id":"doc-en-vscode-685709466499ffa2600dcbadccfb3fc895578531d8812b68cf5be2df40a5c999","title":"","text":"import { Event } from 'vs/base/common/event'; import { IViewDescriptorService } from 'vs/workbench/common/views'; import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { ILifecycleService } from 'vs/workbench/services/lifecycle/common/lifecycle'; const folderName = 'test-folder'; const folderUri = URI.file(`/${folderName}`);"} {"_id":"doc-en-vscode-be5bcf0d7f5857b3b5525829a3856886d3a83107e7d9528b83215fc290746630","title":"","text":"// Stub out all services instantiationService.stub(IEditSessionsLogService, logService); instantiationService.stub(IFileService, fileService); instantiationService.stub(ILifecycleService, new class extends mock() { override onWillShutdown = Event.None; }); instantiationService.stub(INotificationService, new TestNotificationService()); instantiationService.stub(IEditSessionsWorkbenchService, new class extends mock() { }); instantiationService.stub(IProgressService, ProgressService);"} {"_id":"doc-en-vscode-eafd55f31d8aaa050ced447e46c82b51efb8e04b91da1b9d3b78df02f9c8f8dd","title":"","text":"const codeActionGroups = Object.freeze([ { kind: CodeActionKind.QuickFix, title: localize('codeAction.widget.id.quickfix', 'Quick Fix...') }, { kind: CodeActionKind.Extract, title: localize('codeAction.widget.id.extract', 'Extract...'), icon: { codicon: Codicon.wrench } }, { kind: CodeActionKind.Convert, title: localize('codeAction.widget.id.convert', 'Convert...'), icon: { codicon: Codicon.zap, color: 'var(--vscode-editorLightBulbAutoFix-foreground)' } }, { kind: CodeActionKind.SurroundWith, title: localize('codeAction.widget.id.surround', 'Surround With...'), icon: { codicon: Codicon.symbolArray } }, { kind: CodeActionKind.Source, title: localize('codeAction.widget.id.source', 'Source Action...'), icon: { codicon: Codicon.lightBulb, color: 'var(--vscode-editorLightBulb-foreground)' } }, { kind: CodeActionKind.RefactorExtract, title: localize('codeAction.widget.id.extract', 'Extract...'), icon: { codicon: Codicon.wrench } }, { kind: CodeActionKind.RefactorInline, title: localize('codeAction.widget.id.inline', 'Inline...'), icon: { codicon: Codicon.wrench } }, { kind: CodeActionKind.RefactorRewrite, title: localize('codeAction.widget.id.convert', 'Rewrite...'), icon: { codicon: Codicon.wrench } }, { kind: CodeActionKind.RefactorMove, title: localize('codeAction.widget.id.move', 'Move...'), icon: { codicon: Codicon.wrench } }, { kind: CodeActionKind.SurroundWith, title: localize('codeAction.widget.id.surround', 'Surround With...'), icon: { codicon: Codicon.symbolSnippet } }, { kind: CodeActionKind.Source, title: localize('codeAction.widget.id.source', 'Source Action...'), icon: { codicon: Codicon.symbolFile } }, uncategorizedCodeActionGroup, ]);"} {"_id":"doc-en-vscode-ffdf5c8bc10f00ee8d977e21a49c6674743156ee0b70e79905bb48690d075bc0","title":"","text":"public static readonly Empty = new CodeActionKind(''); public static readonly QuickFix = new CodeActionKind('quickfix'); public static readonly Refactor = new CodeActionKind('refactor'); public static readonly Extract = CodeActionKind.Refactor.append('extract'); public static readonly Convert = CodeActionKind.Refactor.append('rewrite'); public static readonly RefactorExtract = CodeActionKind.Refactor.append('extract'); public static readonly RefactorInline = CodeActionKind.Refactor.append('inline'); public static readonly RefactorMove = CodeActionKind.Refactor.append('move'); public static readonly RefactorRewrite = CodeActionKind.Refactor.append('rewrite'); public static readonly Source = new CodeActionKind('source'); public static readonly SourceOrganizeImports = CodeActionKind.Source.append('organizeImports'); public static readonly SourceFixAll = CodeActionKind.Source.append('fixAll');"} {"_id":"doc-en-vscode-99658f9f2c97b0751a8bfb4048b7db10a17b98555d94f5f83c07f8351bf4afa5","title":"","text":"\"vscode-proxy-agent\": \"^0.12.0\", \"vscode-regexpp\": \"^3.1.0\", \"vscode-textmate\": \"8.0.0\", \"xterm\": \"5.2.0-beta.2\", \"xterm-addon-canvas\": \"0.4.0-beta.1\", \"xterm-addon-search\": \"0.11.0-beta.7\", \"xterm\": \"5.2.0-beta.10\", \"xterm-addon-canvas\": \"0.4.0-beta.6\", \"xterm-addon-search\": \"0.11.0\", \"xterm-addon-serialize\": \"0.9.0\", \"xterm-addon-unicode11\": \"0.5.0-beta.5\", \"xterm-addon-webgl\": \"0.15.0-beta.1\", \"xterm-headless\": \"5.2.0-beta.2\", \"xterm-addon-unicode11\": \"0.5.0\", \"xterm-addon-webgl\": \"0.15.0-beta.4\", \"xterm-headless\": \"5.2.0-beta.10\", \"yauzl\": \"^2.9.2\", \"yazl\": \"^2.4.3\" },"} {"_id":"doc-en-vscode-f03a72782d778387b63d89a625f82fc16acd9fab4d03b3055016c296f2e68de9","title":"","text":"\"tas-client-umd\": \"0.1.6\", \"vscode-oniguruma\": \"1.7.0\", \"vscode-textmate\": \"8.0.0\", \"xterm\": \"5.2.0-beta.2\", \"xterm-addon-canvas\": \"0.4.0-beta.1\", \"xterm-addon-search\": \"0.11.0-beta.7\", \"xterm-addon-unicode11\": \"0.5.0-beta.5\", \"xterm-addon-webgl\": \"0.15.0-beta.1\" \"xterm\": \"5.2.0-beta.10\", \"xterm-addon-canvas\": \"0.4.0-beta.6\", \"xterm-addon-search\": \"0.11.0\", \"xterm-addon-unicode11\": \"0.5.0\", \"xterm-addon-webgl\": \"0.15.0-beta.4\" } }"} {"_id":"doc-en-vscode-33269929ee37a2b956e8538878e93d8c682a9b52e99f9943d5ef269703690103","title":"","text":"resolved \"https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d\" integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== xterm-addon-canvas@0.4.0-beta.1: version \"0.4.0-beta.1\" resolved \"https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.4.0-beta.1.tgz#f2742b88cd3eb1840b9e7f986c4bfe31e0f4684f\" integrity sha512-EfjaN0ujHJ4D8CsVpBig3xPvfRhbzAyOh8piAbNpePZmTpBzc2OQQQvEeklPriKVNDv28WbmY0Zzl5tgYM7vwg== xterm-addon-search@0.11.0-beta.7: version \"0.11.0-beta.7\" resolved \"https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.11.0-beta.7.tgz#d90bcbe9e8f9238c18ba6145bd7ec2f8e3240052\" integrity sha512-i/c774V0/Eon3BIFRsRR3OjKTnMGkccBo12yDkOa40tnAD4aa8FjspE3bxW/Hh1mUEhCSgBSLnMDlK/GwnUC+g== xterm-addon-unicode11@0.5.0-beta.5: version \"0.5.0-beta.5\" resolved \"https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.5.0-beta.5.tgz#6992a6f56349e67b903201d52b1ad41ba3469d93\" integrity sha512-MaqnU34WTHCUAo7moB4KhynGn03RckI0JJ8E/gXe96EzuCP6bVJIKSc5pc9iFeLF4BX1SuemOqIHYl2Q3u3NTA== xterm-addon-webgl@0.15.0-beta.1: version \"0.15.0-beta.1\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.15.0-beta.1.tgz#bc3f784c3c467a70542b8a9a8998dbe996287796\" integrity sha512-8f4cNXG0+dBMqp+Nvk/ZQ8Wo8s4/KbF24b2VTHTt8DuY5QXt4wSA6+NEdnABV98VYDoHl+KfXl9yyFqkcJYr8Q== xterm@5.2.0-beta.2: version \"5.2.0-beta.2\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.2.tgz#67369235a54f41179922e662df40ff4c7c974787\" integrity sha512-MRAdWRfV80ae0Q3Caq/mfmCwnZZZ89Z8i/sAleio5g5dpsst9IXc0zeFpPnOvUWmtVy5P1LbfU9YCy47449DWw== xterm-addon-canvas@0.4.0-beta.6: version \"0.4.0-beta.6\" resolved \"https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.4.0-beta.6.tgz#f8cb09ef980f1fa9d73f067e00f7a879c374ad68\" integrity sha512-x5OY0VOJxqvXdyXpW9aug3vaeQX/+r7TZk13MujReuJRLRAjCHaH6ep6g9ZOVlqa8VCBWPwmm/eXH05SGUbnQQ== xterm-addon-search@0.11.0: version \"0.11.0\" resolved \"https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.11.0.tgz#2a00ff7f9848f6140e7c4d1782486b0b18b06e0d\" integrity sha512-6U4uHXcQ7G5igsdaGqrJ9ehm7vep24bXqWxuy3AnIosXF2Z5uy2MvmYRyTGNembIqPV/x1YhBQ7uShtuqBHhOQ== xterm-addon-unicode11@0.5.0: version \"0.5.0\" resolved \"https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.5.0.tgz#41c0d96acc1e3bb6c6596eee64e163b6bca74be7\" integrity sha512-Jm4/g4QiTxiKiTbYICQgC791ubhIZyoIwxAIgOW8z8HWFNY+lwk+dwaKEaEeGBfM48Vk8fklsUW9u/PlenYEBg== xterm-addon-webgl@0.15.0-beta.4: version \"0.15.0-beta.4\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.15.0-beta.4.tgz#d03a98e446372a5dbb7d92075d1f125eec23b030\" integrity sha512-W9N0+5i3trQhgBOHDsnNiBbBiJpleFenY668wWaZ9GlvWseCTnjnWis1kfnM9WASDh/0+7aOjWrD089o+QeHGQ== xterm@5.2.0-beta.10: version \"5.2.0-beta.10\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.10.tgz#33e67a8397937dd8b731a2f315c67f4bd63f3c28\" integrity sha512-3zVxU/0XrUWpvOIU/KkXREweq7hCxNGFt4asT4D/SsRlRKYOnO+vooz1CjLO6USY++iHXicgf8PdgRDeYj5fFQ== "} {"_id":"doc-en-vscode-04f993dabc3f82b897cb715c4f359a0c8b718b360829f34f46501e34200de83d","title":"","text":"resolved \"https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f\" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= xterm-addon-canvas@0.4.0-beta.1: version \"0.4.0-beta.1\" resolved \"https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.4.0-beta.1.tgz#f2742b88cd3eb1840b9e7f986c4bfe31e0f4684f\" integrity sha512-EfjaN0ujHJ4D8CsVpBig3xPvfRhbzAyOh8piAbNpePZmTpBzc2OQQQvEeklPriKVNDv28WbmY0Zzl5tgYM7vwg== xterm-addon-canvas@0.4.0-beta.6: version \"0.4.0-beta.6\" resolved \"https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.4.0-beta.6.tgz#f8cb09ef980f1fa9d73f067e00f7a879c374ad68\" integrity sha512-x5OY0VOJxqvXdyXpW9aug3vaeQX/+r7TZk13MujReuJRLRAjCHaH6ep6g9ZOVlqa8VCBWPwmm/eXH05SGUbnQQ== xterm-addon-search@0.11.0-beta.7: version \"0.11.0-beta.7\" resolved \"https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.11.0-beta.7.tgz#d90bcbe9e8f9238c18ba6145bd7ec2f8e3240052\" integrity sha512-i/c774V0/Eon3BIFRsRR3OjKTnMGkccBo12yDkOa40tnAD4aa8FjspE3bxW/Hh1mUEhCSgBSLnMDlK/GwnUC+g== xterm-addon-search@0.11.0: version \"0.11.0\" resolved \"https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.11.0.tgz#2a00ff7f9848f6140e7c4d1782486b0b18b06e0d\" integrity sha512-6U4uHXcQ7G5igsdaGqrJ9ehm7vep24bXqWxuy3AnIosXF2Z5uy2MvmYRyTGNembIqPV/x1YhBQ7uShtuqBHhOQ== xterm-addon-serialize@0.9.0: version \"0.9.0\" resolved \"https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.9.0.tgz#3eee5f5c34b16e48891ec59b213716bab2354bf4\" integrity sha512-qJju2YJFh8c8pbtCYtHaG7gDDHBpDJ4a4JQZvOzuiMxOjgeM1oCnFNjbhzMuK/fOUa59FmvIUGQyqn3WL9q7qw== xterm-addon-unicode11@0.5.0-beta.5: version \"0.5.0-beta.5\" resolved \"https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.5.0-beta.5.tgz#6992a6f56349e67b903201d52b1ad41ba3469d93\" integrity sha512-MaqnU34WTHCUAo7moB4KhynGn03RckI0JJ8E/gXe96EzuCP6bVJIKSc5pc9iFeLF4BX1SuemOqIHYl2Q3u3NTA== xterm-addon-webgl@0.15.0-beta.1: version \"0.15.0-beta.1\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.15.0-beta.1.tgz#bc3f784c3c467a70542b8a9a8998dbe996287796\" integrity sha512-8f4cNXG0+dBMqp+Nvk/ZQ8Wo8s4/KbF24b2VTHTt8DuY5QXt4wSA6+NEdnABV98VYDoHl+KfXl9yyFqkcJYr8Q== xterm-headless@5.2.0-beta.2: version \"5.2.0-beta.2\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.2.0-beta.2.tgz#db8d4cc45a2bba062622d7784a2264030aa7d56d\" integrity sha512-aP3+K47bJu5AkdtekML5LZZUh/zAkDc5ONNFgQ+7eUBh7RkFy3JYRuaG5Nj3LbdkUMjWqQZXzc3BW5Vo9KQNgA== xterm@5.2.0-beta.2: version \"5.2.0-beta.2\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.2.tgz#67369235a54f41179922e662df40ff4c7c974787\" integrity sha512-MRAdWRfV80ae0Q3Caq/mfmCwnZZZ89Z8i/sAleio5g5dpsst9IXc0zeFpPnOvUWmtVy5P1LbfU9YCy47449DWw== xterm-addon-unicode11@0.5.0: version \"0.5.0\" resolved \"https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.5.0.tgz#41c0d96acc1e3bb6c6596eee64e163b6bca74be7\" integrity sha512-Jm4/g4QiTxiKiTbYICQgC791ubhIZyoIwxAIgOW8z8HWFNY+lwk+dwaKEaEeGBfM48Vk8fklsUW9u/PlenYEBg== xterm-addon-webgl@0.15.0-beta.4: version \"0.15.0-beta.4\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.15.0-beta.4.tgz#d03a98e446372a5dbb7d92075d1f125eec23b030\" integrity sha512-W9N0+5i3trQhgBOHDsnNiBbBiJpleFenY668wWaZ9GlvWseCTnjnWis1kfnM9WASDh/0+7aOjWrD089o+QeHGQ== xterm-headless@5.2.0-beta.10: version \"5.2.0-beta.10\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.2.0-beta.10.tgz#fc7b11b0395f6bb934b0c9373b412bc4d3247148\" integrity sha512-jjylqERzLWWrPLpehL1v0Y3JaZqQksoqE04g5H+tNceQemoBlIpbA5OgPrbcjz5xxFIR9mVWppFR7klWox5/Sg== xterm@5.2.0-beta.10: version \"5.2.0-beta.10\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.10.tgz#33e67a8397937dd8b731a2f315c67f4bd63f3c28\" integrity sha512-3zVxU/0XrUWpvOIU/KkXREweq7hCxNGFt4asT4D/SsRlRKYOnO+vooz1CjLO6USY++iHXicgf8PdgRDeYj5fFQ== yallist@^4.0.0: version \"4.0.0\""} {"_id":"doc-en-vscode-9ba68263addf26f1df913ba3adb615fa29a81e0c0ee3ee3841bbef09bdee1136","title":"","text":"dependencies: object-keys \"~0.4.0\" xterm-addon-canvas@0.4.0-beta.1: version \"0.4.0-beta.1\" resolved \"https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.4.0-beta.1.tgz#f2742b88cd3eb1840b9e7f986c4bfe31e0f4684f\" integrity sha512-EfjaN0ujHJ4D8CsVpBig3xPvfRhbzAyOh8piAbNpePZmTpBzc2OQQQvEeklPriKVNDv28WbmY0Zzl5tgYM7vwg== xterm-addon-canvas@0.4.0-beta.6: version \"0.4.0-beta.6\" resolved \"https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.4.0-beta.6.tgz#f8cb09ef980f1fa9d73f067e00f7a879c374ad68\" integrity sha512-x5OY0VOJxqvXdyXpW9aug3vaeQX/+r7TZk13MujReuJRLRAjCHaH6ep6g9ZOVlqa8VCBWPwmm/eXH05SGUbnQQ== xterm-addon-search@0.11.0-beta.7: version \"0.11.0-beta.7\" resolved \"https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.11.0-beta.7.tgz#d90bcbe9e8f9238c18ba6145bd7ec2f8e3240052\" integrity sha512-i/c774V0/Eon3BIFRsRR3OjKTnMGkccBo12yDkOa40tnAD4aa8FjspE3bxW/Hh1mUEhCSgBSLnMDlK/GwnUC+g== xterm-addon-search@0.11.0: version \"0.11.0\" resolved \"https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.11.0.tgz#2a00ff7f9848f6140e7c4d1782486b0b18b06e0d\" integrity sha512-6U4uHXcQ7G5igsdaGqrJ9ehm7vep24bXqWxuy3AnIosXF2Z5uy2MvmYRyTGNembIqPV/x1YhBQ7uShtuqBHhOQ== xterm-addon-serialize@0.9.0: version \"0.9.0\" resolved \"https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.9.0.tgz#3eee5f5c34b16e48891ec59b213716bab2354bf4\" integrity sha512-qJju2YJFh8c8pbtCYtHaG7gDDHBpDJ4a4JQZvOzuiMxOjgeM1oCnFNjbhzMuK/fOUa59FmvIUGQyqn3WL9q7qw== xterm-addon-unicode11@0.5.0-beta.5: version \"0.5.0-beta.5\" resolved \"https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.5.0-beta.5.tgz#6992a6f56349e67b903201d52b1ad41ba3469d93\" integrity sha512-MaqnU34WTHCUAo7moB4KhynGn03RckI0JJ8E/gXe96EzuCP6bVJIKSc5pc9iFeLF4BX1SuemOqIHYl2Q3u3NTA== xterm-addon-webgl@0.15.0-beta.1: version \"0.15.0-beta.1\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.15.0-beta.1.tgz#bc3f784c3c467a70542b8a9a8998dbe996287796\" integrity sha512-8f4cNXG0+dBMqp+Nvk/ZQ8Wo8s4/KbF24b2VTHTt8DuY5QXt4wSA6+NEdnABV98VYDoHl+KfXl9yyFqkcJYr8Q== xterm-headless@5.2.0-beta.2: version \"5.2.0-beta.2\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.2.0-beta.2.tgz#db8d4cc45a2bba062622d7784a2264030aa7d56d\" integrity sha512-aP3+K47bJu5AkdtekML5LZZUh/zAkDc5ONNFgQ+7eUBh7RkFy3JYRuaG5Nj3LbdkUMjWqQZXzc3BW5Vo9KQNgA== xterm@5.2.0-beta.2: version \"5.2.0-beta.2\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.2.tgz#67369235a54f41179922e662df40ff4c7c974787\" integrity sha512-MRAdWRfV80ae0Q3Caq/mfmCwnZZZ89Z8i/sAleio5g5dpsst9IXc0zeFpPnOvUWmtVy5P1LbfU9YCy47449DWw== xterm-addon-unicode11@0.5.0: version \"0.5.0\" resolved \"https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.5.0.tgz#41c0d96acc1e3bb6c6596eee64e163b6bca74be7\" integrity sha512-Jm4/g4QiTxiKiTbYICQgC791ubhIZyoIwxAIgOW8z8HWFNY+lwk+dwaKEaEeGBfM48Vk8fklsUW9u/PlenYEBg== xterm-addon-webgl@0.15.0-beta.4: version \"0.15.0-beta.4\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.15.0-beta.4.tgz#d03a98e446372a5dbb7d92075d1f125eec23b030\" integrity sha512-W9N0+5i3trQhgBOHDsnNiBbBiJpleFenY668wWaZ9GlvWseCTnjnWis1kfnM9WASDh/0+7aOjWrD089o+QeHGQ== xterm-headless@5.2.0-beta.10: version \"5.2.0-beta.10\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.2.0-beta.10.tgz#fc7b11b0395f6bb934b0c9373b412bc4d3247148\" integrity sha512-jjylqERzLWWrPLpehL1v0Y3JaZqQksoqE04g5H+tNceQemoBlIpbA5OgPrbcjz5xxFIR9mVWppFR7klWox5/Sg== xterm@5.2.0-beta.10: version \"5.2.0-beta.10\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.10.tgz#33e67a8397937dd8b731a2f315c67f4bd63f3c28\" integrity sha512-3zVxU/0XrUWpvOIU/KkXREweq7hCxNGFt4asT4D/SsRlRKYOnO+vooz1CjLO6USY++iHXicgf8PdgRDeYj5fFQ== y18n@^3.2.1: version \"3.2.2\""} {"_id":"doc-en-vscode-6ea32e2d7652a782b826e11e25f18986c5cf17aec43ff614dad93f9e6b95259e","title":"","text":"invokeProtocolHandler(); // We cannot know whether the protocol handler succeeded. // Display guidance in case it did not, e.g. the app is not installed locally. if (matchesScheme(href, this.productService.urlProtocol)) { const showProtocolUrlOpenedDialog = async () => { const showResult = await this.dialogService.show( Severity.Info, localize('openExternalDialogTitle', \"All done. You can close this tab now.\"),"} {"_id":"doc-en-vscode-9ed865a4a18c4912b8a2e5cb88653d43a2d714637debe13136fa892cf227a06e","title":"","text":"if (showResult.choice === 0) { invokeProtocolHandler(); } else if (showResult.choice === 1) { await this.openerService.open(URI.parse(`http://aka.ms/vscode-install`)); // Route the user to the appropriate install link await this.openerService.open(URI.parse( this.productService.quality === 'stable' ? `http://aka.ms/vscode-install` : `http://aka.ms/vscode-install-insiders` )); // Re-show the dialog so that the user can come back after installing and try again showProtocolUrlOpenedDialog(); } }; // We cannot know whether the protocol handler succeeded. // Display guidance in case it did not, e.g. the app is not installed locally. if (matchesScheme(href, this.productService.urlProtocol)) { await showProtocolUrlOpenedDialog(); } }"} {"_id":"doc-en-vscode-06489750a7aea2bb58399118610b6f2821f30bb050f69ccdb32e7bd61aae731c","title":"","text":"} if (runSource === TaskRunSource.User) { const workspaceTasks = await this.getWorkspaceTasks(); RunAutomaticTasks.promptForPermission(this, this._storageService, this._notificationService, this._workspaceTrustManagementService, this._openerService, this._configurationService, workspaceTasks); RunAutomaticTasks.runWithPermission(this, this._storageService, this._notificationService, this._workspaceTrustManagementService, this._openerService, this._configurationService, workspaceTasks); } return executeTaskResult; } catch (error) {"} {"_id":"doc-en-vscode-0c91216966cc3e0ffa8a305645bfc0caa28083b173a4b2b382d64f8f5c14de03","title":"","text":"@ITaskService private readonly _taskService: ITaskService, @IConfigurationService private readonly _configurationService: IConfigurationService, @IWorkspaceTrustManagementService private readonly _workspaceTrustManagementService: IWorkspaceTrustManagementService, @ILogService private readonly _logService: ILogService) { @ILogService private readonly _logService: ILogService, @IStorageService private readonly _storageService: IStorageService, @IOpenerService private readonly _openerService: IOpenerService, @INotificationService private readonly _notificationService: INotificationService) { super(); this._tryRunTasks(); }"} {"_id":"doc-en-vscode-ab8acf7bead72ffd385cc8b6fdf56c807f62aa570a9a540eaabf7c7b3b781fba","title":"","text":"await Event.toPromise(Event.once(this._taskService.onDidChangeTaskSystemInfo)); } this._logService.trace('RunAutomaticTasks: Checking if automatic tasks should run.'); const isFolderAutomaticAllowed = this._configurationService.getValue(ALLOW_AUTOMATIC_TASKS) !== 'off'; await this._workspaceTrustManagementService.workspaceTrustInitialized; const isWorkspaceTrusted = this._workspaceTrustManagementService.isWorkspaceTrusted(); // Only run if allowed. Prompting for permission occurs when a user first tries to run a task. if (isFolderAutomaticAllowed && isWorkspaceTrusted) { this._taskService.getWorkspaceTasks(TaskRunSource.FolderOpen).then(workspaceTaskResult => { const { tasks } = RunAutomaticTasks._findAutoTasks(this._taskService, workspaceTaskResult); this._logService.trace(`RunAutomaticTasks: Found ${tasks.length} automatic tasks tasks`); if (tasks.length > 0) { RunAutomaticTasks._runTasks(this._taskService, tasks); } }); } const workspaceTasks = await this._taskService.getWorkspaceTasks(TaskRunSource.FolderOpen); this._logService.trace(`RunAutomaticTasks: Found ${workspaceTasks.size} automatic tasks`); await RunAutomaticTasks.runWithPermission(this._taskService, this._storageService, this._notificationService, this._workspaceTrustManagementService, this._openerService, this._configurationService, workspaceTasks); } private static _runTasks(taskService: ITaskService, tasks: Array>) {"} {"_id":"doc-en-vscode-c61657a7fb8879fcdb2fefab76efd26480c62607433bb7f74198206d30c3b0fd","title":"","text":"return { tasks, taskNames, locations }; } public static async promptForPermission(taskService: ITaskService, storageService: IStorageService, notificationService: INotificationService, workspaceTrustManagementService: IWorkspaceTrustManagementService, public static async runWithPermission(taskService: ITaskService, storageService: IStorageService, notificationService: INotificationService, workspaceTrustManagementService: IWorkspaceTrustManagementService, openerService: IOpenerService, configurationService: IConfigurationService, workspaceTaskResult: Map) { const isWorkspaceTrusted = workspaceTrustManagementService.isWorkspaceTrusted; if (!isWorkspaceTrusted) { if (!isWorkspaceTrusted || configurationService.getValue(ALLOW_AUTOMATIC_TASKS) === 'off') { return; } if (configurationService.getValue(ALLOW_AUTOMATIC_TASKS) === 'off') { const hasShownPromptForAutomaticTasks = storageService.getBoolean(HAS_PROMPTED_FOR_AUTOMATIC_TASKS, StorageScope.WORKSPACE, false); const { tasks, taskNames, locations } = RunAutomaticTasks._findAutoTasks(taskService, workspaceTaskResult); if (taskNames.length === 0) { return; } const hasShownPromptForAutomaticTasks = storageService.getBoolean(HAS_PROMPTED_FOR_AUTOMATIC_TASKS, StorageScope.WORKSPACE, undefined); const { tasks, taskNames, locations } = RunAutomaticTasks._findAutoTasks(taskService, workspaceTaskResult); if (taskNames.length > 0) { if (configurationService.getValue(ALLOW_AUTOMATIC_TASKS) === 'on') { RunAutomaticTasks._runTasks(taskService, tasks); } else if (!hasShownPromptForAutomaticTasks) { // We have automatic tasks, prompt to allow. this._showPrompt(notificationService, storageService, openerService, configurationService, taskNames, locations).then(allow => { if (allow) { RunAutomaticTasks._runTasks(taskService, tasks); } }); } if (configurationService.getValue(ALLOW_AUTOMATIC_TASKS) === 'on') { RunAutomaticTasks._runTasks(taskService, tasks); } else if (configurationService.getValue(ALLOW_AUTOMATIC_TASKS) === 'auto' && !hasShownPromptForAutomaticTasks) { // by default, only prompt once per folder // otherwise, this can be configured via the setting this._showPrompt(notificationService, storageService, openerService, configurationService, taskNames, locations).then(allow => { if (allow) { storageService.store(HAS_PROMPTED_FOR_AUTOMATIC_TASKS, true, StorageScope.WORKSPACE, StorageTarget.USER); RunAutomaticTasks._runTasks(taskService, tasks); } }); } }"} {"_id":"doc-en-vscode-3b60675a43693fe096852e0fed70750457bf26a75eff200f5681ab88486f53ac","title":"","text":"type: 'string', enum: ['on', 'auto', 'off'], enumDescriptions: [ nls.localize('ttask.allowAutomaticTasks.on', \"Always\"), nls.localize('task.allowAutomaticTasks.on', \"Always\"), nls.localize('task.allowAutomaticTasks.auto', \"Prompt for permission for each folder\"), nls.localize('task.allowAutomaticTasks.off', \"Never\"), ], description: nls.localize('task.allowAutomaticTasks', \"Enable automatic tasks in the folder.\"), description: nls.localize('task.allowAutomaticTasks', \"Enable automatic tasks in the folder - note that tasks won't run in an untrusted workspace.\"), default: 'auto', restricted: true },"} {"_id":"doc-en-vscode-c96da73db5ae69b6a5e87cc75bde61c9dbfb6f5b1a6c3687d1079940be9c57bb","title":"","text":"\"brackets\": [ [\"{\", \"}\"], [\"[\", \"]\"], [\"(\", \")\"] [\"(\", \")\"], [\"#if\",\"#endif\"], ], \"autoClosingPairs\": [ { \"open\": \"[\", \"close\": \"]\" },"} {"_id":"doc-en-vscode-e8ddca70157cc17d5c62e08224ed6d0e9dfe5c567308856d4ab7b3ecabd36e2b","title":"","text":".customview-tree .monaco-list .monaco-list-row .custom-view-tree-node-item { display: flex; align-items: center; height: 22px; line-height: 22px; flex: 1;"} {"_id":"doc-en-vscode-29a52e1162dfb9b4e5f495a280ac25ba5b158693cde37a01575dc44a18c78526","title":"","text":"display: block; } .timeline-tree-view .monaco-list .monaco-list-row .custom-view-tree-node-item > .custom-view-tree-node-item-icon, .customview-tree .monaco-list .monaco-list-row .custom-view-tree-node-item > .custom-view-tree-node-item-resourceLabel > .custom-view-tree-node-item-icon { background-size: 16px; background-position: left center;"} {"_id":"doc-en-vscode-91b236a75ab5db4b329e1cb3a78ff4d92f216d9314dcc0392eabfd9714b9cb57","title":"","text":".customview-tree .monaco-list .monaco-list-row .custom-view-tree-node-item .custom-view-tree-node-item-resourceLabel::after { padding-right: 0px; margin-right: 4px; } .customview-tree .monaco-list .monaco-list-row .custom-view-tree-node-item .actions {"} {"_id":"doc-en-vscode-d34129f2af17023ebe1f121d18847c853bf9cb5c8803c480b46a3e8984de1c28","title":"","text":"// Generated using https://github.com/hediet/vscode-unicode-data // Stored as key1, value1, key2, value2, ... return JSON.parse( '{\"_common\":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125],\"_default\":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"cs\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"de\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"es\":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"fr\":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"it\":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"ja\":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],\"ko\":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"pl\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"pt-BR\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"qps-ploc\":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"ru\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"tr\":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"zh-hans\":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],\"zh-hant\":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}' '{\"_common\":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],\"_default\":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"cs\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"de\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"es\":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"fr\":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"it\":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"ja\":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],\"ko\":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"pl\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"pt-BR\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"qps-ploc\":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"ru\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"tr\":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"zh-hans\":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],\"zh-hant\":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}' ); });"} {"_id":"doc-en-vscode-8b192abf075b4778ec63caff4c1b50794c583cb90aa359214dd18dca773fb2cf","title":"","text":"constructor(controllerId: string, controllerLabel: string, editors: ExtHostDocumentsAndEditors) { super({ controllerId, getDocumentVersion: (uri: URI) => editors.getDocument(uri)?.version, getDocumentVersion: uri => uri && editors.getDocument(uri)?.version, getApiFor: getPrivateApiFor as (impl: TestItemImpl) => ITestItemApi, getChildren: (item) => item.children as ITestChildrenLike, root: new TestItemRootImpl(controllerId, controllerLabel),"} {"_id":"doc-en-vscode-5fbcd444fb47f2033f4cd155f8247d44c1c812a3901742d7f6c87114151d2110","title":"","text":"super({ id: 'editor.createFoldingRangeFromSelection', label: nls.localize('createManualFoldRange.label', \"Create Manual Folding Range from Selection\"), alias: 'Create Folding Range from Selection', alias: 'Create Manual Folding Range from Selection', precondition: CONTEXT_FOLDING_ENABLED, kbOpts: { kbExpr: EditorContextKeys.editorTextFocus,"} {"_id":"doc-en-vscode-ed09d4f69412c45e4becc97e8e21e6abee0dab79c35c82507260635e31a41433","title":"","text":"private _headerVisible = true; private _minimumBodySize: number; private _maximumBodySize: number; private ariaHeaderLabel: string; private _ariaHeaderLabel: string; private styles: IPaneStyles = {}; private animationTimer: number | undefined = undefined;"} {"_id":"doc-en-vscode-f536377ea27301238139aaacec521184919c5886ccfccb239b136e3796558c58","title":"","text":"private readonly _onDidChangeExpansionState = this._register(new Emitter()); readonly onDidChangeExpansionState: Event = this._onDidChangeExpansionState.event; get ariaHeaderLabel(): string { return this._ariaHeaderLabel; } set ariaHeaderLabel(newLabel: string) { this._ariaHeaderLabel = newLabel; this.header.setAttribute('aria-label', this.ariaHeaderLabel); } get draggableElement(): HTMLElement { return this.header; }"} {"_id":"doc-en-vscode-365798fbed0d3a80c859d4ff285f813a7642e00f3df12895976834277ef093a4","title":"","text":"super(); this._expanded = typeof options.expanded === 'undefined' ? true : !!options.expanded; this._orientation = typeof options.orientation === 'undefined' ? Orientation.VERTICAL : options.orientation; this.ariaHeaderLabel = localize('viewSection', \"{0} Section\", options.title); this._ariaHeaderLabel = localize('viewSection', \"{0} Section\", options.title); this._minimumBodySize = typeof options.minimumBodySize === 'number' ? options.minimumBodySize : this._orientation === Orientation.HORIZONTAL ? 200 : 120; this._maximumBodySize = typeof options.maximumBodySize === 'number' ? options.maximumBodySize : Number.POSITIVE_INFINITY;"} {"_id":"doc-en-vscode-9013013230358befc7265ccbeb92aa8c71884c92778a42ab8d187bb639bff3b7","title":"","text":"const title = workspace.folders.map(folder => folder.name).join(); titleElement.textContent = this.name; titleElement.title = title; titleElement.setAttribute('aria-label', nls.localize('explorerSection', \"Explorer Section: {0}\", this.name)); this.ariaHeaderLabel = nls.localize('explorerSection', \"Explorer Section: {0}\", this.name); titleElement.setAttribute('aria-label', this.ariaHeaderLabel); }; this._register(this.contextService.onDidChangeWorkspaceName(setHeader));"} {"_id":"doc-en-vscode-92f781ebac1b9c0325cd984e73fac1a92a85af329c13bae408ce8e2849e58790","title":"","text":"NoPathFound = 'NoPathFound', UnknownPath = 'UnknownPath', EmptyCommitMessage = 'EmptyCommitMessage', BranchFastForwardRejected = 'BranchFastForwardRejected' BranchFastForwardRejected = 'BranchFastForwardRejected', TagConflict = 'TagConflict' }"} {"_id":"doc-en-vscode-fc95b1f3866fe940834f623b91d02d73aba15146b831546b0fba406c3b3aba5f","title":"","text":"} } async fetchTags(options: { remote: string; tags: string[]; force?: boolean }): Promise { const args = ['fetch']; const spawnOptions: SpawnOptions = { env: { 'GIT_HTTP_USER_AGENT': this.git.userAgent } }; args.push(options.remote); for (const tag of options.tags) { args.push(`refs/tags/${tag}:refs/tags/${tag}`); } if (options.force) { args.push('--force'); } await this.exec(args, spawnOptions); } async pull(rebase?: boolean, remote?: string, branch?: string, options: PullOptions = {}): Promise { const args = ['pull'];"} {"_id":"doc-en-vscode-8d77b941a2d30cd658a303e4bbcaa815f65d3eacc588e7095ad6df4a9910dc0a","title":"","text":"err.gitErrorCode = GitErrorCodes.CantLockRef; } else if (/cannot rebase onto multiple branches/i.test(err.stderr || '')) { err.gitErrorCode = GitErrorCodes.CantRebaseMultipleBranches; } else if (/! [rejected].*(would clobber existing tag)/m.test(err.stderr || '')) { err.gitErrorCode = GitErrorCodes.TagConflict; } throw err;"} {"_id":"doc-en-vscode-69d5f20550022be6974d4d91bec10bff4dcff9006cd2d1c8bd0f5c916cac41d7","title":"","text":"import { Branch, Change, ForcePushMode, GitErrorCodes, LogOptions, Ref, RefType, Remote, Status, CommitOptions, BranchQuery, FetchOptions } from './api/git'; import { AutoFetcher } from './autofetch'; import { debounce, memoize, throttle } from './decorators'; import { Commit, GitError, Repository as BaseRepository, Stash, Submodule, LogFileOptions } from './git'; import { Commit, GitError, Repository as BaseRepository, Stash, Submodule, LogFileOptions, PullOptions } from './git'; import { StatusBarCommands } from './statusbar'; import { toGitUri } from './uri'; import { anyEvent, combinedDisposable, debounceEvent, dispose, EmptyDisposable, eventToPromise, filterEvent, find, IDisposable, isDescendant, onceEvent, pathEquals, relativePath } from './util';"} {"_id":"doc-en-vscode-f451f649558cfaba8ba8b12a8a17147f2292c9c04f5a146cec88db0788f4a06a","title":"","text":"} if (await this.checkIfMaybeRebased(this.HEAD?.name)) { await this.repository.pull(rebase, remote, branch, { unshallow, tags }); this._pullAndHandleTagConflict(rebase, remote, branch, { unshallow, tags }); } }); }); } private async _pullAndHandleTagConflict(rebase?: boolean, remote?: string, branch?: string, options: PullOptions = {}): Promise { try { await this.repository.pull(rebase, remote, branch, options); } catch (err) { if (err.gitErrorCode !== GitErrorCodes.TagConflict) { throw err; } // Handle tag(s) conflict if (await this.handleTagConflict(remote, err.stderr)) { await this.repository.pull(rebase, remote, branch, options); } } } @throttle async push(head: Branch, forcePushMode?: ForcePushMode): Promise { let remote: string | undefined;"} {"_id":"doc-en-vscode-c6629f648fd1cd85147a70efb065c796fe84b335d286117208ac1b3e425af46c","title":"","text":"} if (await this.checkIfMaybeRebased(this.HEAD?.name)) { await this.repository.pull(rebase, remoteName, pullBranch, { tags, cancellationToken }); this._pullAndHandleTagConflict(rebase, remoteName, pullBranch, { tags, cancellationToken }); } };"} {"_id":"doc-en-vscode-78e13388112afbbacf304b85876cdb8b515f9bb76c82f1cc565ae7c9fdab69eb","title":"","text":"return config.get('optimisticUpdate') === true; } private async handleTagConflict(remote: string | undefined, raw: string): Promise { // Ensure there is a remote remote = remote ?? this.HEAD?.upstream?.remote; if (!remote) { throw new Error('Unable to resolve tag conflict due to missing remote.'); } // Extract tag names from message const tags: string[] = []; for (const match of raw.matchAll(/^ ! [rejected]s+([^s]+)s+->s+([^s]+)s+(would clobber existing tag)$/gm)) { if (match.length === 3) { tags.push(match[1]); } } if (tags.length === 0) { throw new Error(`Unable to extract tag names from error message: ${raw}`); } // Notification const replaceLocalTags = l10n.t('Replace Local Tag(s)'); const message = l10n.t('Unable to pull from remote repository due to conflicting tag(s): {0}. Would you like to resolve the conflict by replacing the local tag(s)?', tags.join(', ')); const choice = await window.showErrorMessage(message, { modal: true }, replaceLocalTags); if (choice !== replaceLocalTags) { return false; } // Force fetch tags await this.repository.fetchTags({ remote, tags, force: true }); return true; } public isBranchProtected(name: string = this.HEAD?.name ?? ''): boolean { return this.isBranchProtectedMatcher ? this.isBranchProtectedMatcher(name) : false; }"} {"_id":"doc-en-vscode-84bbae1b0dc42a66c6e52b4dda51d3e789188600e47718384a4a581851412dab","title":"","text":"description: nls.localize('vscode.extension.contributes.terminal', 'Contributes terminal functionality.'), type: 'object', properties: { types: { type: 'array', description: nls.localize('vscode.extension.contributes.terminal.types', \"Defines additional terminal types that the user can create.\"), items: { type: 'object', required: ['command', 'title'], properties: { command: { description: nls.localize('vscode.extension.contributes.terminal.types.command', \"Command to execute when the user creates this type of terminal.\"), type: 'string', }, title: { description: nls.localize('vscode.extension.contributes.terminal.types.title', \"Title for this type of terminal.\"), type: 'string', }, icon: { description: nls.localize('vscode.extension.contributes.terminal.types.icon', \"A codicon, URI, or light and dark URIs to associate with this terminal type.\"), anyOf: [{ type: 'string', }, { type: 'object', properties: { light: { description: nls.localize('vscode.extension.contributes.terminal.types.icon.light', 'Icon path when a light theme is used'), type: 'string' }, dark: { description: nls.localize('vscode.extension.contributes.terminal.types.icon.dark', 'Icon path when a dark theme is used'), type: 'string' } } }] }, }, }, }, profiles: { type: 'array', description: nls.localize('vscode.extension.contributes.terminal.profiles', \"Defines additional terminal profiles that the user can create.\"),"} {"_id":"doc-en-vscode-42b78a3a3d2e78b3fad159e417149ffbc63fccda773976badc3b9e24d7b1b895","title":"","text":"await timeout(0); const instance = this.activeInstance; if (instance) { // HACK: Ensure the panel is still visible at this point as there may have been // a request since it was opened to show a different panel if (pane && !pane.isVisible()) { await this._viewsService.openView(TERMINAL_VIEW_ID, focus); } await instance.focusWhenReady(true); // HACK: as a workaround for https://github.com/microsoft/vscode/issues/134692, // this will trigger a forced refresh of the viewport to sync the viewport and scroll bar."} {"_id":"doc-en-vscode-8d61414e37efa8d9c40a1f5f1b7e9bd6fefa169acbe53b624ba293bedcd933a0","title":"","text":"if (pane && !pane.isVisible()) { await this._viewsService.openView(TERMINAL_VIEW_ID, focus); } await instance.focusWhenReady(true); // Do not await the focus as setVisible must be called immediately to ensure // something else didn't steal focus instance.focusWhenReady(true); // HACK: as a workaround for https://github.com/microsoft/vscode/issues/134692, // this will trigger a forced refresh of the viewport to sync the viewport and scroll bar. // This can likely be removed after https://github.com/xtermjs/xterm.js/issues/291 is"} {"_id":"doc-en-vscode-9250a7d525109f5477d5f914af650308fd358059a2e9ca4aab24e3bcd0409087","title":"","text":"import { Disposable, DisposableStore, IDisposable, toDisposable } from 'vs/base/common/lifecycle'; import { ResourceMap } from 'vs/base/common/map'; import { Schemas } from 'vs/base/common/network'; import { isEqual } from 'vs/base/common/resources'; import { basename, isEqual } from 'vs/base/common/resources'; import { isDefined } from 'vs/base/common/types'; import { URI } from 'vs/base/common/uri'; import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility';"} {"_id":"doc-en-vscode-a3c9654e926c9a146b2121700c9d3b39b96347b5e295cb0bea474d084c117840","title":"","text":"import { NotebookOutputRendererInfo, NotebookStaticPreloadInfo as NotebookStaticPreloadInfo } from 'vs/workbench/contrib/notebook/common/notebookOutputRenderer'; import { NotebookEditorDescriptor, NotebookProviderInfo } from 'vs/workbench/contrib/notebook/common/notebookProvider'; import { INotebookSerializer, INotebookService, SimpleNotebookProviderInfo } from 'vs/workbench/contrib/notebook/common/notebookService'; import { DiffEditorInputFactoryFunction, EditorInputFactoryFunction, EditorInputFactoryObject, IEditorResolverService, IEditorType, RegisteredEditorInfo, RegisteredEditorPriority, UntitledEditorInputFactoryFunction } from 'vs/workbench/services/editor/common/editorResolverService'; import { DiffEditorInputFactoryFunction, EditorInputFactoryFunction, EditorInputFactoryObject, IEditorResolverService, IEditorType, RegisteredEditorInfo, RegisteredEditorPriority, UntitledEditorInputFactoryFunction, type MergeEditorInputFactoryFunction } from 'vs/workbench/services/editor/common/editorResolverService'; import { IExtensionService, isProposedApiEnabled } from 'vs/workbench/services/extensions/common/extensions'; import { IExtensionPointUser } from 'vs/workbench/services/extensions/common/extensionsRegistry'; import { InstallRecommendedExtensionAction } from 'vs/workbench/contrib/extensions/browser/extensionsActions'; import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity'; import { INotebookDocument, INotebookDocumentService } from 'vs/workbench/services/notebook/common/notebookDocumentService'; import { MergeEditorInput } from 'vs/workbench/contrib/mergeEditor/browser/mergeEditorInput'; import type { EditorInputWithOptions, IResourceMergeEditorInput } from 'vs/workbench/common/editor'; export class NotebookProviderInfoStore extends Disposable {"} {"_id":"doc-en-vscode-2e816ab56cd44252521561f8fb99819254bc16702a758e92e9bc43976060e627","title":"","text":"const notebookDiffEditorInputFactory: DiffEditorInputFactoryFunction = ({ modified, original, label, description }) => { return { editor: NotebookDiffEditorInput.create(this._instantiationService, modified.resource!, label, description, original.resource!, notebookProviderInfo.id) }; }; const mergeEditorInputFactory: MergeEditorInputFactoryFunction = (mergeEditor: IResourceMergeEditorInput): EditorInputWithOptions => { return { editor: this._instantiationService.createInstance( MergeEditorInput, mergeEditor.base.resource, { uri: mergeEditor.input1.resource, title: mergeEditor.input1.label ?? basename(mergeEditor.input1.resource), description: mergeEditor.input1.description ?? '', detail: mergeEditor.input1.detail }, { uri: mergeEditor.input2.resource, title: mergeEditor.input2.label ?? basename(mergeEditor.input2.resource), description: mergeEditor.input2.description ?? '', detail: mergeEditor.input2.detail }, mergeEditor.result.resource ) }; }; const notebookFactoryObject: EditorInputFactoryObject = { createEditorInput: notebookEditorInputFactory, createDiffEditorInput: notebookDiffEditorInputFactory, createUntitledEditorInput: notebookUntitledEditorFactory, createMergeEditorInput: mergeEditorInputFactory }; const notebookCellFactoryObject: EditorInputFactoryObject = { createEditorInput: notebookEditorInputFactory,"} {"_id":"doc-en-vscode-e74f519720a9238884d01ea8fc382b0625add9bc147820e8ec5c34f3b934c082","title":"","text":"import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { EditSessionsDataViews } from 'vs/workbench/contrib/editSessions/browser/editSessionsViews'; import { EditSessionsFileSystemProvider } from 'vs/workbench/contrib/editSessions/browser/editSessionsFileSystemProvider'; import { isNative } from 'vs/base/common/platform'; import { isNative, isWeb } from 'vs/base/common/platform'; import { VirtualWorkspaceContext, WorkspaceFolderCountContext } from 'vs/workbench/common/contextkeys'; import { CancellationToken, CancellationTokenSource } from 'vs/base/common/cancellation'; import { equals } from 'vs/base/common/objects';"} {"_id":"doc-en-vscode-e084679c83621e5bc68ab62b7632946b721326d9e1156dbcb6b64f8f5425781c","title":"","text":"} private async autoStoreEditSession() { if (this.configurationService.getValue('workbench.experimental.cloudChanges.autoStore') === 'onShutdown') { if (this.configurationService.getValue('workbench.experimental.cloudChanges.autoStore') === 'onShutdown' && !isWeb) { const cancellationTokenSource = new CancellationTokenSource(); await this.progressService.withProgress({ location: ProgressLocation.Window,"} {"_id":"doc-en-vscode-bcb4e9f9eef2b71021b10cd842ec1a9f5fb256d68690781ec9736718ee1d319d","title":"","text":"'type': 'string', 'tags': ['experimental', 'usesOnlineServices'], 'default': 'off', 'markdownDescription': localize('autoStoreWorkingChangesDescription', \"Controls whether to automatically store available working changes in the cloud for the current workspace.\"), 'markdownDescription': localize('autoStoreWorkingChangesDescription', \"Controls whether to automatically store available working changes in the cloud for the current workspace. This setting has no effect in the web.\"), }, 'workbench.cloudChanges.autoResume': { enum: ['onReload', 'off'],"} {"_id":"doc-en-vscode-e03e74a166279ebc734a3ce54d66538999c1ac7a40d5deb6042b63edbcfef7ca","title":"","text":"this.shouldShowViewsContext = EDIT_SESSIONS_SHOW_VIEW.bindTo(this.contextKeyService); this._register(this.fileService.registerProvider(EditSessionsFileSystemProvider.SCHEMA, new EditSessionsFileSystemProvider(this.editSessionsStorageService))); this.lifecycleService.onWillShutdown((e) => e.join(this.autoStoreEditSession(), { id: 'autoStoreWorkingChanges', label: localize('autoStoreWorkingChanges', 'Storing current working changes...') })); this.lifecycleService.onWillShutdown((e) => { if (this.configurationService.getValue('workbench.experimental.cloudChanges.autoStore') === 'onShutdown' && !isWeb) { e.join(this.autoStoreEditSession(), { id: 'autoStoreWorkingChanges', label: localize('autoStoreWorkingChanges', 'Storing current working changes...') }); } }); this._register(this.editSessionsStorageService.onDidSignIn(() => this.updateAccountsMenuBadge())); this._register(this.editSessionsStorageService.onDidSignOut(() => this.updateAccountsMenuBadge())); }"} {"_id":"doc-en-vscode-50330bfd25dffe4f5b0d8380ea566e320b1c95e73d9ecf8386037633ed5c948e","title":"","text":"} private async autoStoreEditSession() { if (this.configurationService.getValue('workbench.experimental.cloudChanges.autoStore') === 'onShutdown' && !isWeb) { const cancellationTokenSource = new CancellationTokenSource(); await this.progressService.withProgress({ location: ProgressLocation.Window, type: 'syncing', title: localize('store working changes', 'Storing working changes...') }, async () => this.storeEditSession(false, cancellationTokenSource.token), () => { cancellationTokenSource.cancel(); cancellationTokenSource.dispose(); }); } const cancellationTokenSource = new CancellationTokenSource(); await this.progressService.withProgress({ location: ProgressLocation.Window, type: 'syncing', title: localize('store working changes', 'Storing working changes...') }, async () => this.storeEditSession(false, cancellationTokenSource.token), () => { cancellationTokenSource.cancel(); cancellationTokenSource.dispose(); }); } private registerViews() {"} {"_id":"doc-en-vscode-df17465ece9210b7e2ea8081783014b9cd28d73fdfa61ca13139591f7357a829","title":"","text":"} let resource = EditorResourceAccessor.getCanonicalUri(untypedEditor, { supportSideBySide: SideBySideEditor.PRIMARY }); const options = untypedEditor.options; // If it was resolved before we await for the extensions to activate and then proceed with resolution or else the backing extensions won't be registered if (this.cache && resource && this.resourceMatchesCache(resource)) {"} {"_id":"doc-en-vscode-110437e79bfbe569c8bd328aa747e0f88304af986c4ec84cf13e9589a715c4bd","title":"","text":"return ResolvedStatus.NONE; } // If it's the currently active editor we shouldn't do anything const activeEditor = group.activeEditor; const isActive = activeEditor ? activeEditor.matches(untypedEditor) : false; if (activeEditor && isActive) { return { editor: activeEditor, options, group }; } const input = await this.doResolveEditor(untypedEditor, group, selectedEditor); if (conflictingDefault && input) { // Show the conflicting default dialog"} {"_id":"doc-en-vscode-95e3a662befca518abd85ef5a564b99eae5cb0a8f1aee9fca9ccd94bbefd2de8","title":"","text":"import { EditorActivation, IResourceEditorInput } from 'vs/platform/editor/common/editor'; import { URI } from 'vs/base/common/uri'; import { Event } from 'vs/base/common/event'; import { DEFAULT_EDITOR_ASSOCIATION, EditorCloseContext, EditorsOrder, IEditorCloseEvent, EditorInputWithOptions, IEditorPane, IResourceDiffEditorInput, isEditorInputWithOptions, IUntitledTextResourceEditorInput, IUntypedEditorInput, SideBySideEditor } from 'vs/workbench/common/editor'; import { DEFAULT_EDITOR_ASSOCIATION, EditorCloseContext, EditorsOrder, IEditorCloseEvent, EditorInputWithOptions, IEditorPane, IResourceDiffEditorInput, isEditorInputWithOptions, IUntitledTextResourceEditorInput, IUntypedEditorInput, SideBySideEditor, isEditorInput } from 'vs/workbench/common/editor'; import { workbenchInstantiationService, TestServiceAccessor, registerTestEditor, TestFileEditorInput, ITestInstantiationService, registerTestResourceEditor, registerTestSideBySideEditor, createEditorPart, registerTestFileEditor, TestTextFileEditor, TestSingletonFileEditorInput } from 'vs/workbench/test/browser/workbenchTestServices'; import { EditorService } from 'vs/workbench/services/editor/browser/editorService'; import { IEditorGroup, IEditorGroupsService, GroupDirection, GroupsArrangement } from 'vs/workbench/services/editor/common/editorGroupsService';"} {"_id":"doc-en-vscode-7dfe658ab2cf8c2bff66d89357255cf0848ae8c8735c0a269319f024261828fa","title":"","text":"async function openEditor(editor: EditorInputWithOptions | IUntypedEditorInput, group?: PreferredGroup): Promise { if (useOpenEditors) { // The type safety isn't super good here, so we assist with runtime checks // Open editors expects untyped or editor input with options, you cannot pass a typed editor input // without options if (!isEditorInputWithOptions(editor) && isEditorInput(editor)) { editor = { editor: editor, options: {} }; } const panes = await service.openEditors([editor], group); return panes[0]; }"} {"_id":"doc-en-vscode-0bf5fa347a81642d4dbdf0ba2d0dd2d23a0ebd1b6cc2580b8fb1b7a092d41cf4","title":"","text":"assert.ok(typedEditor instanceof TestFileEditorInput); assert.strictEqual(typedEditor?.resource?.toString(), untypedEditorReplacement.resource.toString()); assert.strictEqual(editorFactoryCalled, 2); assert.strictEqual(editorFactoryCalled, 3); assert.strictEqual(untitledEditorFactoryCalled, 0); assert.strictEqual(diffEditorFactoryCalled, 0);"} {"_id":"doc-en-vscode-39c11c54a29583adc72bdefb8a83a08a809dd3b1fa86790b03ed163f7768c15b","title":"","text":"assert.strictEqual(untitledEditorFactoryCalled, 0); assert.strictEqual(diffEditorFactoryCalled, 0); assert.ok(!lastEditorFactoryEditor); assert.ok(!lastUntitledEditorFactoryEditor); assert.ok(!lastDiffEditorFactoryEditor);"} {"_id":"doc-en-vscode-826dfff7574139e3b14d0154bc6f455b5218d77c96b2b5214fa6adda9a2259d1","title":"","text":"addNewLine?: boolean; } /** * A matcher that runs on a sub-section of a terminal command's output */ export interface ITerminalOutputMatcher { /** * A string or regex to match against the unwrapped line. */ lineMatcher: string | RegExp; anchor?: 'top' | 'bottom'; offset?: number; length?: number; /** * Which side of the output to anchor the {@link offset} and {@link length} against. */ anchor: 'top' | 'bottom'; /** * How far from either the top or the bottom of the butter to start matching against. */ offset: number; /** * The number of rows to match against, this should be as small as possible for performance * reasons. */ length: number; } export interface IXtermTerminal {"} {"_id":"doc-en-vscode-e8c846d34fc3cc1b784302b422776210984d2c7a988e1b358ad83a413e99668c","title":"","text":"export function gitSimilarCommand(): ITerminalContextualActionOptions { return { commandLineMatcher: GitCommandLineRegex, outputMatcher: { lineMatcher: GitSimilarOutputRegex, anchor: 'bottom' }, outputMatcher: { lineMatcher: GitSimilarOutputRegex, anchor: 'bottom', offset: 0, length: 3 }, actionName: (matchResult: ContextualMatchResult) => matchResult.outputMatch ? `Run git ${matchResult.outputMatch[1]}` : ``, exitStatus: false, getActions: (matchResult: ContextualMatchResult, command: ITerminalCommand) => {"} {"_id":"doc-en-vscode-dd2c9ef518e59a9b0758e9a6a99827531801c96ca39d36f4f169f5ae8d46b286","title":"","text":"return { actionName: (matchResult: ContextualMatchResult) => matchResult.outputMatch ? `Free port ${matchResult.outputMatch[1]}` : '', commandLineMatcher: AnyCommandLineRegex, outputMatcher: !isWindows ? { lineMatcher: FreePortOutputRegex, anchor: 'bottom' } : undefined, // TODO: Support free port on Windows https://github.com/microsoft/vscode/issues/161775 outputMatcher: isWindows ? undefined : { lineMatcher: FreePortOutputRegex, anchor: 'bottom', offset: 0, length: 20 }, exitStatus: false, getActions: (matchResult: ContextualMatchResult, command: ITerminalCommand) => { const port = matchResult?.outputMatch?.[1]; if (!port) {"} {"_id":"doc-en-vscode-8e3e19d12b7f8baf7f8f410b7ea44edd2be83f9664ab4047e3006dd54b08e4ea","title":"","text":"return { actionName: (matchResult: ContextualMatchResult) => matchResult.outputMatch ? `Git push ${matchResult.outputMatch[1]}` : '', commandLineMatcher: GitPushCommandLineRegex, outputMatcher: { lineMatcher: GitPushOutputRegex, anchor: 'bottom' }, outputMatcher: { lineMatcher: GitPushOutputRegex, anchor: 'bottom', offset: 0, length: 5 }, exitStatus: false, getActions: (matchResult: ContextualMatchResult, command: ITerminalCommand) => { const branch = matchResult?.outputMatch?.[1];"} {"_id":"doc-en-vscode-8120180bd8fefaf77e8a6aea12900fc0e1c689644fb964a8a8b0053dc2560548","title":"","text":"return { actionName: (matchResult: ContextualMatchResult) => matchResult.outputMatch ? `Create PR for ${matchResult.outputMatch[1]}` : '', commandLineMatcher: GitPushCommandLineRegex, outputMatcher: { lineMatcher: GitCreatePrOutputRegex, anchor: 'bottom' }, outputMatcher: { lineMatcher: GitCreatePrOutputRegex, anchor: 'bottom', offset: 0, length: 5 }, exitStatus: true, getActions: (matchResult: ContextualMatchResult, command?: ITerminalCommand) => { if (!command) {"} {"_id":"doc-en-vscode-d18c765c773c225faca79de0d6370725fd55619a1f3be7fc708842bd8a8a077d","title":"","text":"choices.push(addToWorkspace); } const result = await window.showInformationMessage(message, ...choices); const result = await window.showInformationMessage(message, { modal: true }, ...choices); action = result === open ? PostCloneAction.Open : result === openNewWindow ? PostCloneAction.OpenNewWindow"} {"_id":"doc-en-vscode-2bb0a333f1cc4a0ae4455432823c24a3bd17b231baddcbb9fa3d82608a47081f","title":"","text":"\"default\": false, \"description\": \"%config.rebaseWhenSync%\" }, \"git.fetchBeforeCheckout\": { \"git.pullBeforeCheckout\": { \"type\": \"boolean\", \"scope\": \"resource\", \"default\": false, \"description\": \"%config.fetchBeforeCheckout%\" \"description\": \"%config.pullBeforeCheckout%\" }, \"git.fetchOnPull\": { \"type\": \"boolean\","} {"_id":"doc-en-vscode-af6da6e122464c2f05810c1b64105a57f4afd0bb153801df738d6aa84c9d5b63","title":"","text":"\"config.rebaseWhenSync\": \"Force git to use rebase when running the sync command.\", \"config.confirmEmptyCommits\": \"Always confirm the creation of empty commits for the 'Git: Commit Empty' command.\", \"config.fetchOnPull\": \"When enabled, fetch all branches when pulling. Otherwise, fetch just the current one.\", \"config.fetchBeforeCheckout\": \"Controls whether a branch that does not have outgoing commits is fast-forwarded before it is checked out.\", \"config.pullBeforeCheckout\": \"Controls whether a branch that does not have outgoing commits is fast-forwarded before it is checked out.\", \"config.pullTags\": \"Fetch all tags when pulling.\", \"config.pruneOnFetch\": \"Prune when fetching.\", \"config.autoStash\": \"Stash any changes before pulling and restore them after successful pull.\","} {"_id":"doc-en-vscode-8d566adb0e4c22b101dc4e42d7a6d15455b2a922cde55206a22b95e9501ee8cb","title":"","text":"} const config = workspace.getConfiguration('git', Uri.file(this.repository.root)); const fetchBeforeCheckout = config.get('fetchBeforeCheckout', false) === true; const pullBeforeCheckout = config.get('pullBeforeCheckout', false) === true; if (fetchBeforeCheckout) { if (pullBeforeCheckout) { await this.repository.fastForwardBranch(this.ref.name!); }"} {"_id":"doc-en-vscode-642e3b3049333f2bf17d138841dfc1f1060b1d7e3228b450f84a82ff7f53037a","title":"","text":"import { sha1Hex } from 'vs/base/browser/hash'; import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; import { IActivityService, NumberBadge } from 'vs/workbench/services/activity/common/activity'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; registerSingleton(IEditSessionsLogService, EditSessionsLogService, InstantiationType.Delayed); registerSingleton(IEditSessionsStorageService, EditSessionsWorkbenchService, InstantiationType.Delayed);"} {"_id":"doc-en-vscode-e52064c1948d30ff080e387989e69a61a192aba4a60605bdc70b6eb37acbb6f4","title":"","text":"@ILifecycleService private readonly lifecycleService: ILifecycleService, @IStorageService private readonly storageService: IStorageService, @IActivityService private readonly activityService: IActivityService, @IEditorService private readonly editorService: IEditorService, ) { super();"} {"_id":"doc-en-vscode-5f5437f9d91815532512bd3d470141ff08b7ca9eb8d433156dbf212f5638c9dd","title":"","text":"// Run the store action to get back a ref let ref: string | undefined; if (shouldStoreEditSession) { ref = await that.progressService.withProgress({ location: ProgressLocation.Notification, type: 'syncing', title: localize('store your edit session', 'Storing your edit session...') }, async () => that.storeEditSession(false)); ref = await that.storeEditSession(false); } let uri = workspaceUri ?? await that.pickContinueEditSessionDestination();"} {"_id":"doc-en-vscode-28d6deb38d369d68d3e4da8b88b33f4031ecff37aedad2ba1a467ae03797335f","title":"","text":"} else if (ref !== undefined) { this.notificationService.warn(localize('no edit session content for ref', 'Could not resume edit session contents for ID {0}.', ref)); } this.logService.info(ref !== undefined ? `Aborting resuming edit session as no edit session content is available to be applied from ref ${ref}.` : `Aborting resuming edit session as no edit session content is available to be applied`); this.logService.info(`Aborting resuming edit session as no edit session content is available to be applied from ref ${ref}.`); return; } const editSession = data.editSession;"} {"_id":"doc-en-vscode-cf1759c8a21e3aa1a96f37f9d63182598d462a38b114f53b451c51c2056fb16d","title":"","text":"const folders: Folder[] = []; let hasEdits = false; // Save all saveable editors before building edit session contents await this.editorService.saveAll(); for (const repository of this.scmService.repositories) { // Look through all resource groups and compute which files were added/modified/deleted const trackedUris = this.getChangedResources(repository); // A URI might appear in more than one resource group"} {"_id":"doc-en-vscode-dea4790aa806eb8bf498203dfae7a7755b602c98fa6afaab36c58e4839ee2a00","title":"","text":"import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { ILifecycleService } from 'vs/workbench/services/lifecycle/common/lifecycle'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; import { IEditorService, ISaveAllEditorsOptions } from 'vs/workbench/services/editor/common/editorService'; const folderName = 'test-folder'; const folderUri = URI.file(`/${folderName}`);"} {"_id":"doc-en-vscode-8f4d83ca2d6d186f02b93592bae946a84124406c6c6b06759d915c289dcd70e7","title":"","text":"instantiationService.stub(ITextModelService, new class extends mock() { override registerTextModelContentProvider = () => ({ dispose: () => { } }); }); instantiationService.stub(IEditorService, new class extends mock() { override saveAll = async (_options: ISaveAllEditorsOptions) => true; }); editSessionsContribution = instantiationService.createInstance(EditSessionsContribution); });"} {"_id":"doc-en-vscode-5b95b6ae16b36eb592deb29fcf965caaf211a8d3b80e01c4f728fe5bb9ab385f","title":"","text":"if (!state.conflicting && !state.isInputIncluded(inputNumber)) { result.push( !state.isInputIncluded(inputNumber) ? command(localize('accept', \"$(pass) Accept {0}\", inputData.title), async () => { ? command(localize('accept', \"Accept {0}\", inputData.title), async () => { transaction((tx) => { model.setState( modifiedBaseRange,"} {"_id":"doc-en-vscode-2668ca55b045fbf14c5bc300ba3277ed2bca37a52ecfd4bc7c031e1923015a1e","title":"","text":"); }); }) : command(localize('remove', \"$(error) Remove {0}\", inputData.title), async () => { : command(localize('remove', \"Remove {0}\", inputData.title), async () => { transaction((tx) => { model.setState( modifiedBaseRange,"} {"_id":"doc-en-vscode-0537bbbee7c695b110a861ddfd89aa976f1282e467ae67bd0c32bc286ab60350","title":"","text":"if (modifiedBaseRange.canBeCombined && state.isEmpty) { result.push( state.input1 && state.input2 ? command(localize('removeBoth', \"$(error) Remove Both\"), async () => { ? command(localize('removeBoth', \"Remove Both\"), async () => { transaction((tx) => { model.setState( modifiedBaseRange,"} {"_id":"doc-en-vscode-c42cd26fe925cce6c01c53258137c995418d2b0adb5fa25b3c0c626751af573a","title":"","text":"); }); }) : command(localize('acceptBoth', \"$(pass) Accept Both\"), async () => { : command(localize('acceptBoth', \"Accept Both\"), async () => { transaction((tx) => { model.setState( modifiedBaseRange,"} {"_id":"doc-en-vscode-627dd81c3a96105a37d2dd3dadcc493975ba7138861d5f8d58b76ca8c8af1d42","title":"","text":"const stateToggles: IContentWidgetAction[] = []; if (state.input1) { result.push(command(localize('remove', \"$(error) Remove {0}\", model.input1.title), async () => { result.push(command(localize('remove', \"Remove {0}\", model.input1.title), async () => { transaction((tx) => { model.setState( modifiedBaseRange,"} {"_id":"doc-en-vscode-3bb2287dcd58e5341e6c17c53fc0dddbd80e3a3906a027b712c9cacd06360d7c","title":"","text":"); } if (state.input2) { result.push(command(localize('remove', \"$(error) Remove {0}\", model.input2.title), async () => { result.push(command(localize('remove', \"Remove {0}\", model.input2.title), async () => { transaction((tx) => { model.setState( modifiedBaseRange,"} {"_id":"doc-en-vscode-62f43cf6fea052424114e8e903b78787c69a8134517de520281df10543128e76","title":"","text":"if (state.conflicting) { result.push( command(localize('resetToBase', \"$(error) Reset to base\"), async () => { command(localize('resetToBase', \"Reset to base\"), async () => { transaction((tx) => { model.setState( modifiedBaseRange,"} {"_id":"doc-en-vscode-a7e4790d0aa245ca2c2f8e1f4b78cbb4c0041c4609d0b925568be82b3caa161e","title":"","text":"justify-content: center; align-items: center; font-size: 14px; line-height: 16px; border-radius: 8px; }"} {"_id":"doc-en-vscode-67861c4935479ef5bfdd07070b89c32f9878803f22fa45a7718d7dfff4c751de","title":"","text":"*--------------------------------------------------------------------------------------------*/ import { Codicon } from 'vs/base/common/codicons'; import { basename } from 'vs/base/common/resources'; import { URI, UriComponents } from 'vs/base/common/uri'; import { localize } from 'vs/nls'; import { ILocalizedString } from 'vs/platform/action/common/action';"} {"_id":"doc-en-vscode-53f38d30850aa70100d26151f056486f2b1afb3ee8f371bcce688132b2995eb4","title":"","text":"if (viewModel.model.unhandledConflictsCount.get() > 0) { const confirmResult = await dialogService.confirm({ type: 'info', message: localize('mergeEditor.acceptMerge.unhandledConflicts', \"There are still unhandled conflicts. Are you sure you want to accept the merge?\"), primaryButton: localize('mergeEditor.acceptMerge.unhandledConflicts.accept', \"Complete merge with unhandled conflicts\"), message: localize('mergeEditor.acceptMerge.unhandledConflicts.message', \"Do you want to complete the merge of {0}?\", basename(inputModel.resultUri)), detail: localize('mergeEditor.acceptMerge.unhandledConflicts.detail', \"The file contains unhandled conflicts.\"), primaryButton: localize('mergeEditor.acceptMerge.unhandledConflicts.accept', \"Complete with Conflicts\"), secondaryButton: localize('mergeEditor.acceptMerge.unhandledConflicts.cancel', \"Cancel\"), });"} {"_id":"doc-en-vscode-80e61e980aa25e5c3306e3826133bda93a4fa844e99462e13f3013976a5e68b9","title":"","text":"* Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { Promises } from 'vs/base/node/pfs'; import * as cp from 'child_process'; import * as stream from 'stream'; import * as nls from 'vs/nls'; import * as net from 'net'; import * as path from 'vs/base/common/path'; import * as strings from 'vs/base/common/strings'; import * as stream from 'stream'; import * as objects from 'vs/base/common/objects'; import * as path from 'vs/base/common/path'; import * as platform from 'vs/base/common/platform'; import { ExtensionsChannelId } from 'vs/platform/extensionManagement/common/extensionManagement'; import { IOutputService } from 'vs/workbench/services/output/common/output'; import { IDebugAdapterExecutable, IDebuggerContribution, IPlatformSpecificAdapterContribution, IDebugAdapterServer, IDebugAdapterNamedPipeServer } from 'vs/workbench/contrib/debug/common/debug'; import * as strings from 'vs/base/common/strings'; import { Promises } from 'vs/base/node/pfs'; import * as nls from 'vs/nls'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { IDebugAdapterExecutable, IDebugAdapterNamedPipeServer, IDebugAdapterServer, IDebuggerContribution, IPlatformSpecificAdapterContribution } from 'vs/workbench/contrib/debug/common/debug'; import { AbstractDebugAdapter } from '../common/abstractDebugAdapter'; /**"} {"_id":"doc-en-vscode-9bb1ede10fef4142ff6f563d16a7227d45d3980848465288f48f897a09a41ad8","title":"","text":"private serverProcess: cp.ChildProcess | undefined; constructor(private adapterExecutable: IDebugAdapterExecutable, private debugType: string, private readonly outputService?: IOutputService) { constructor(private adapterExecutable: IDebugAdapterExecutable, private debugType: string) { super(); }"} {"_id":"doc-en-vscode-2ca3fe90026a381abb18424567a4e4fc4fef5915860cb47d9745aebdc24e7c2c","title":"","text":"this._onError.fire(error); }); const outputService = this.outputService; if (outputService) { const sanitize = (s: string) => s.toString().replace(/r?n$/mg, ''); // this.serverProcess.stdout.on('data', (data: string) => { // \tconsole.log('%c' + sanitize(data), 'background: #ddd; font-style: italic;'); // }); this.serverProcess.stderr!.on('data', (data: string) => { const channel = outputService.getChannel(ExtensionsChannelId); channel?.append(sanitize(data)); }); } else { this.serverProcess.stderr!.resume(); } this.serverProcess.stderr!.resume(); // finally connect to the DA this.connect(this.serverProcess.stdout!, this.serverProcess.stdin!);"} {"_id":"doc-en-vscode-5c88b07536c95edd47b17ce0302a5f158647ae51ebdfd78a31a474c9407fa967","title":"","text":"const fs = require('fs'); const cp = require('child_process'); const yarnVersion = cp.execSync('yarn -v', { encoding: 'utf8' }).trim(); const parsedYarnVersion = /^(d+).(d+)./.exec(yarnVersion); const parsedYarnVersion = /^(d+).(d+).(d+)/.exec(yarnVersion); const majorYarnVersion = parseInt(parsedYarnVersion[1]); const minorYarnVersion = parseInt(parsedYarnVersion[2]); if (majorYarnVersion < 1 || minorYarnVersion < 10) { console.error('033[1;31m*** Please use yarn >=1.10.1.033[0;0m'); const patchYarnVersion = parseInt(parsedYarnVersion[3]); if ( majorYarnVersion < 1 || majorYarnVersion === 1 && ( minorYarnVersion < 10 || (minorYarnVersion === 10 && patchYarnVersion < 1) ) || majorYarnVersion >= 2 ) { console.error('033[1;31m*** Please use yarn >=1.10.1 and <2.033[0;0m'); err = true; }"} {"_id":"doc-en-vscode-6d8c7b9ae9a3bd65d2bffe465f1a528373e709ce4e7015420553a60841b89292","title":"","text":"} } const LINK_REGEX = /[([^]]+)](((?:https?://|command:|file:)[^)s]+)(?: (\"|')([^3]+)(3))?)/gi; const LINK_REGEX = /[([^]]+)](((?:https?://|command:|file:)[^)s]+)(?: ([\"'])(.+?)(3))?)/gi; export function parseLinkedText(text: string): LinkedText { const result: LinkedTextNode[] = [];"} {"_id":"doc-en-vscode-6e55aa82940233f77b2843c8bd7b49fa54b01d8aa63cffc14aa777c91b26764e","title":"","text":"'...' ]); }); test('Should match non-greedily', () => { assert.deepStrictEqual(parseLinkedText('a [link text 1](http://link.href \"title1\") b [link text 2](http://link.href \"title2\") c').nodes, [ 'a ', { label: 'link text 1', href: 'http://link.href', title: 'title1' }, ' b ', { label: 'link text 2', href: 'http://link.href', title: 'title2' }, ' c', ]); }); });"} {"_id":"doc-en-vscode-e1391208a64e95d9799cd5edb8fe2e2f5c2ac2eabd630307d5e8da63444148c9","title":"","text":"this.instantiationService.createInstance(ReloadAction), this.instantiationService.createInstance(ExtensionStatusLabelAction), this.instantiationService.createInstance(ActionWithDropDownAction, 'extensions.updateActions', '', [[this.instantiationService.createInstance(UpdateAction)], [this.instantiationService.createInstance(SkipUpdateAction)]]), [[this.instantiationService.createInstance(UpdateAction, true)], [this.instantiationService.createInstance(SkipUpdateAction)]]), this.instantiationService.createInstance(SetColorThemeAction), this.instantiationService.createInstance(SetFileIconThemeAction), this.instantiationService.createInstance(SetProductIconThemeAction),"} {"_id":"doc-en-vscode-d9200899201d56c962b7ad63f6a7b7bd49174a2069345e7aa4cc16435037f3fc","title":"","text":"export class UpdateAction extends AbstractUpdateAction { constructor( private readonly verbose: boolean, @IExtensionsWorkbenchService override readonly extensionsWorkbenchService: IExtensionsWorkbenchService, @IInstantiationService protected readonly instantiationService: IInstantiationService, ) { super(`extensions.update`, localize('update', \"Update\"), extensionsWorkbenchService); } override update(): void { super.update(); if (this.extension) { this.label = this.verbose ? localize('update to', \"Update to v{0}\", this.extension.latestVersion) : localize('update', \"Update\"); } } override async run(): Promise { if (!this.extension) { return;"} {"_id":"doc-en-vscode-4f86411acbd24b84c6ff9e5d8ac4378b08634d1ec4cefee22aff98c423f6bf9f","title":"","text":"actionbar.onDidRun(({ error }) => error && this.notificationService.error(error)); const extensionStatusIconAction = this.instantiationService.createInstance(ExtensionStatusAction); const reloadAction = this.instantiationService.createInstance(ReloadAction); const actions = [ this.instantiationService.createInstance(ExtensionStatusLabelAction), this.instantiationService.createInstance(MigrateDeprecatedExtensionAction, true), reloadAction, this.instantiationService.createInstance(ReloadAction), this.instantiationService.createInstance(ActionWithDropDownAction, 'extensions.updateActions', '', [[this.instantiationService.createInstance(UpdateAction)], [this.instantiationService.createInstance(SkipUpdateAction)]]), [[this.instantiationService.createInstance(UpdateAction, false)], [this.instantiationService.createInstance(SkipUpdateAction)]]), this.instantiationService.createInstance(InstallDropdownAction), this.instantiationService.createInstance(InstallingLabelAction), this.instantiationService.createInstance(SetLanguageAction),"} {"_id":"doc-en-vscode-5fb382f923afc4f823d7d347ea8c70259903f9b253f2cb4cd941cfdd8105a661","title":"","text":"this.instantiationService.createInstance(SwitchToPreReleaseVersionAction, true), this.instantiationService.createInstance(ManageExtensionAction) ]; const extensionHoverWidget = this.instantiationService.createInstance(ExtensionHoverWidget, { target: root, position: this.options.hoverOptions.position }, extensionStatusIconAction, reloadAction); const extensionHoverWidget = this.instantiationService.createInstance(ExtensionHoverWidget, { target: root, position: this.options.hoverOptions.position }, extensionStatusIconAction); const widgets = [ recommendationWidget,"} {"_id":"doc-en-vscode-6dd840100fee403212f3b14dce3fc07c8dca41fa59ddf1c8f1d07ec313fa6954","title":"","text":"import { EnablementState, IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { IExtensionIgnoredRecommendationsService, IExtensionRecommendationsService } from 'vs/workbench/services/extensionRecommendations/common/extensionRecommendations'; import { ILabelService } from 'vs/platform/label/common/label'; import { extensionButtonProminentBackground, ExtensionStatusAction, ReloadAction } from 'vs/workbench/contrib/extensions/browser/extensionsActions'; import { extensionButtonProminentBackground, ExtensionStatusAction } from 'vs/workbench/contrib/extensions/browser/extensionsActions'; import { IThemeService, ThemeIcon, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { EXTENSION_BADGE_REMOTE_BACKGROUND, EXTENSION_BADGE_REMOTE_FOREGROUND } from 'vs/workbench/common/theme'; import { Emitter, Event } from 'vs/base/common/event';"} {"_id":"doc-en-vscode-cb12542dec6d76589ec2701f73790d4d7e9572033b32fa612534d4279d4268fe","title":"","text":"constructor( private readonly options: ExtensionHoverOptions, private readonly extensionStatusAction: ExtensionStatusAction, private readonly reloadAction: ReloadAction, @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, @IHoverService private readonly hoverService: IHoverService, @IConfigurationService private readonly configurationService: IConfigurationService,"} {"_id":"doc-en-vscode-ce49d40d3844b64e83e82ac5a2daff21bbf8ad827af043eb122163ea4fcd7b77","title":"","text":"markdown.appendText(`n`); } if (this.extension.outdated) { markdown.appendMarkdown(localize('updateRequired', \"Latest version:\")); markdown.appendMarkdown(` ** _v${this.extension.latestVersion}_** `); markdown.appendText(`n`); } const preReleaseMessage = ExtensionHoverWidget.getPreReleaseMessage(this.extension); const extensionRuntimeStatus = this.extensionsWorkbenchService.getExtensionStatus(this.extension); const extensionStatus = this.extensionStatusAction.status; const reloadRequiredMessage = this.reloadAction.enabled ? this.reloadAction.tooltip : ''; const reloadRequiredMessage = this.extension.reloadRequiredStatus; const recommendationMessage = this.getRecommendationMessage(this.extension); if (extensionRuntimeStatus || extensionStatus || reloadRequiredMessage || recommendationMessage || preReleaseMessage) {"} {"_id":"doc-en-vscode-c0e7e604e1e97520574d04521a80b13d05c85c060d6c589dc1ad7ffc5905fabd","title":"","text":"\"update-grammar\": \"node ../node_modules/vscode-grammar-updater/bin dotnet/csharp-tmLanguage grammars/csharp.tmLanguage ./syntaxes/csharp.tmLanguage.json\" }, \"contributes\": { \"configurationDefaults\": { \"[csharp]\": { \"editor.maxTokenizationLineLength\": 2500 } }, \"languages\": [ { \"id\": \"csharp\","} {"_id":"doc-en-vscode-f4742dedbfd231f9201a9b77ab18ab67dfdb745e066caac1df5556c3e8d9d5ec","title":"","text":"private expandedSize: number | undefined = undefined; private _headerVisible = true; private _bodyRendered = false; private _minimumBodySize: number; private _maximumBodySize: number; private _ariaHeaderLabel: string;"} {"_id":"doc-en-vscode-cafae142b1e2a0e2a93428f02f8ab8b996ac440186427337dcabba32ca14a379","title":"","text":"this.updateHeader(); if (expanded) { if (!this._bodyRendered) { this.renderBody(this.body); this._bodyRendered = true; } if (typeof this.animationTimer === 'number') { clearTimeout(this.animationTimer); }"} {"_id":"doc-en-vscode-14c71187cd51bb21185d9bba1f75bac4b82a9a57bbd56bb3770919a9c2db8432","title":"","text":"}); this.body = append(this.element, $('.pane-body')); this.renderBody(this.body); // Only render the body if it will be visible // Otherwise, render it when the pane is expanded if (!this._bodyRendered && this.isExpanded()) { this.renderBody(this.body); this._bodyRendered = true; } if (!this.isExpanded()) { this.body.remove();"} {"_id":"doc-en-vscode-b46d4e42431a153ccf72bbb74b98bf385f07608c388960179158c60b745a9426","title":"","text":"readonly model = this.viewModel.map(m => /** @description model */ m?.model); protected readonly htmlElements = h('div.code-view', [ h('div.title@header', [ h('div.header@header', [ h('span.title@title'), h('span.description@description'), h('span.detail@detail'),"} {"_id":"doc-en-vscode-fd6415943202d2c6c7e1a8f2bbcb9d30ad943db2bba894f048fc319b5d20e046","title":"","text":"* Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ .monaco-workbench .merge-editor .code-view>.title { .monaco-workbench .merge-editor .code-view > .header { padding: 0 10px; height: 30px; display: flex; align-content: center; overflow: hidden; } .monaco-workbench .merge-editor .code-view>.title>SPAN { .monaco-workbench .merge-editor .code-view > .header > span { align-self: center; text-overflow: ellipsis; overflow: hidden;"} {"_id":"doc-en-vscode-071f64cf0563f6bc84f318090a0156027289869d949154d557a1d681a4ad35c3","title":"","text":"white-space: nowrap; } .monaco-workbench .merge-editor .code-view>.title>SPAN.title { .monaco-workbench .merge-editor .code-view > .header > span.title { flex-shrink: 0; } .monaco-workbench .merge-editor .code-view>.title>SPAN.description { .monaco-workbench .merge-editor .code-view > .header > span.description { flex-shrink: 0; display: flex; font-size: 12px; align-items: center; color: var(--vscode-descriptionForeground); } .monaco-workbench .merge-editor .code-view>.title>SPAN.description .codicon { .monaco-workbench .merge-editor .code-view > .header > span.description .codicon { font-size: 14px; color: var(--vscode-descriptionForeground); } .monaco-workbench .merge-editor .code-view>.title>SPAN.detail { .monaco-workbench .merge-editor .code-view > .header > span.detail { margin-left: auto; flex-shrink: 0; font-size: 12px; color: var(--vscode-descriptionForeground); } .monaco-workbench .merge-editor .code-view > .header > span.detail .codicon { font-size: 13px; } /* for input1|2 -> align details to the left */ .monaco-workbench .merge-editor .code-view.input>.title>SPAN.detail::before { .monaco-workbench .merge-editor .code-view.input > .header > span.detail::before { content: '•'; opacity: .5; padding-right: 3px; } .monaco-workbench .merge-editor .code-view.input>.title>SPAN.detail { .monaco-workbench .merge-editor .code-view.input > .header > span.detail { margin-left: 0; } .monaco-workbench .merge-editor .code-view.input>.title>SPAN.toolbar { .monaco-workbench .merge-editor .code-view.input > .header > span.toolbar { flex-shrink: 0; margin-left: auto; } .monaco-workbench .merge-editor .code-view>.title>SPAN.detail .codicon { font-size: 13px; } .monaco-workbench .merge-editor .code-view>.container { .monaco-workbench .merge-editor .code-view > .container { display: flex; flex-direction: row; } .monaco-workbench .merge-editor .code-view>.container>.gutter { .monaco-workbench .merge-editor .code-view > .container > .gutter { width: 24px; position: relative; overflow: hidden;"} {"_id":"doc-en-vscode-864c72addb7ed8235db3b34ce89459ea9eda256a6f23adebeedea75fa0b296f5","title":"","text":"flex-grow: 0; } .merge-editor-diff { .monaco-workbench .merge-editor .merge-editor-diff { background-color: var(--vscode-mergeEditor-change-background); } .merge-editor-diff-word { .monaco-workbench .merge-editor .merge-editor-diff-word { background-color: var(--vscode-mergeEditor-change-word-background); } /* BEGIN: .merge-editor-block */ .merge-editor-block:not(.handled) { .monaco-workbench .merge-editor .merge-editor-block:not(.handled) { background-color: var(--vscode-mergeEditor-conflict-unhandledUnfocused-background); } .merge-editor-block:not(.handled):not(.focused) { .monaco-workbench .merge-editor .merge-editor-block:not(.handled):not(.focused) { border: 1px solid var(--vscode-mergeEditor-conflict-unhandledUnfocused-border); } .merge-editor-block:not(.handled).focused { .monaco-workbench .merge-editor .merge-editor-block:not(.handled).focused { border: 2px solid var(--vscode-mergeEditor-conflict-unhandledFocused-border); } .merge-editor-block.handled:not(.focused) { .monaco-workbench .merge-editor .merge-editor-block.handled:not(.focused) { border: 1px solid var(--vscode-mergeEditor-conflict-handledUnfocused-border); } .merge-editor-block.handled:not(.focused).conflicting { .monaco-workbench .merge-editor .merge-editor-block.handled:not(.focused).conflicting { background-color: var(--vscode-mergeEditor-conflict-handledUnfocused-background); } .merge-editor-block.handled.focused { .monaco-workbench .merge-editor .merge-editor-block.handled.focused { border: 1px solid var(--vscode-mergeEditor-conflict-handledFocused-border); } .merge-editor-block.handled.focused.conflicting { .monaco-workbench .merge-editor .merge-editor-block.handled.focused.conflicting { background-color: var(--vscode-mergeEditor-conflict-handledFocused-background); } .merge-editor-simplified.input.i1, .merge-editor-block.use-simplified-decorations.input.i1 { .monaco-workbench .merge-editor .merge-editor-simplified.input.i1, .merge-editor-block.use-simplified-decorations.input.i1 { background-color: var(--vscode-mergeEditor-conflict-input1-background); } .merge-editor-simplified.input.i2, .merge-editor-block.use-simplified-decorations.input.i2 { .monaco-workbench .merge-editor .merge-editor-simplified.input.i2, .merge-editor-block.use-simplified-decorations.input.i2 { background-color: var(--vscode-mergeEditor-conflict-input2-background); } /* END: .merge-editor-block */ .gutter.monaco-editor>div { .gutter.monaco-editor > div { position: absolute; }"} {"_id":"doc-en-vscode-33ecf54ea93a2de3d05cc6b48839302d82c7e0f102d908cbccd44bb493e9f3fe","title":"","text":"color: var(--vscode-editorCodeLens-foreground) } .merge-editor-conflict-actions>span, .merge-editor-conflict-actions>a { .merge-editor-conflict-actions > span, .merge-editor-conflict-actions > a { user-select: none; -webkit-user-select: none; white-space: nowrap; } .merge-editor-conflict-actions>a { .merge-editor-conflict-actions > a { text-decoration: none; } .merge-editor-conflict-actions>a:hover { .merge-editor-conflict-actions > a:hover { cursor: pointer; color: var(--vscode-editorLink-activeForeground) !important; } .merge-editor-conflict-actions>a:hover .codicon { .merge-editor-conflict-actions > a:hover .codicon { color: var(--vscode-editorLink-activeForeground) !important; }"} {"_id":"doc-en-vscode-e2b2d53b419b92de7a59c19a69f225b546018635f3b9ff2d763f01b141249e56","title":"","text":"color: var(--vscode-editorCodeLens-foreground); } .merge-editor-conflict-actions>a:hover .codicon::before { .merge-editor-conflict-actions > a:hover .codicon::before { cursor: pointer; }"} {"_id":"doc-en-vscode-b51da0d20b091c6e2b00b32f6cf1507dae2edd2c25b69ccb785593e263dc543c","title":"","text":"import { $, addDisposableListener, append, EventHelper, EventType } from 'vs/base/browser/dom'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { EventType as GestureEventType, Gesture } from 'vs/base/browser/touch'; import { AnchorAlignment, IAnchor, IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview'; import { AnchorAlignment } from 'vs/base/browser/ui/contextview/contextview'; import { IMenuOptions } from 'vs/base/browser/ui/menu/menu'; import { ActionRunner, IAction } from 'vs/base/common/actions'; import { Emitter } from 'vs/base/common/event';"} {"_id":"doc-en-vscode-62a9fa47ed62a501ff3bde5ef8b45f78de92bd8c6acae3e8e470b126d0388487","title":"","text":"(container: HTMLElement): IDisposable | null; } export interface IBaseDropdownOptions { interface IBaseDropdownOptions { label?: string; labelRenderer?: ILabelRenderer; } export class BaseDropdown extends ActionRunner { class BaseDropdown extends ActionRunner { private _element: HTMLElement; private boxContainer?: HTMLElement; private _label?: HTMLElement;"} {"_id":"doc-en-vscode-6816b767248a273cdb581a901c74003c17d3588b592961daaba3893b1e4ed2a8","title":"","text":"} } export interface IDropdownOptions extends IBaseDropdownOptions { contextViewProvider: IContextViewProvider; } export class Dropdown extends BaseDropdown { private contextViewProvider: IContextViewProvider; constructor(container: HTMLElement, options: IDropdownOptions) { super(container, options); this.contextViewProvider = options.contextViewProvider; } override show(): void { super.show(); this.element.classList.add('active'); this.contextViewProvider.showContextView({ getAnchor: () => this.getAnchor(), render: (container) => { return this.renderContents(container); }, onDOMEvent: (e, activeElement) => { this.onEvent(e, activeElement); }, onHide: () => this.onHide() }); } protected getAnchor(): HTMLElement | IAnchor { return this.element; } protected onHide(): void { this.element.classList.remove('active'); } override hide(): void { super.hide(); this.contextViewProvider?.hideContextView(); } protected renderContents(container: HTMLElement): IDisposable | null { return null; } } export interface IActionProvider { getActions(): readonly IAction[]; }"} {"_id":"doc-en-vscode-5030d921068063403f153d3a9b4ae88498730a1f301a18b5f3848ece8a02fec0","title":"","text":"} export function findValidPasteFileTarget(explorerService: IExplorerService, targetFolder: ExplorerItem, fileToPaste: { resource: URI; isDirectory?: boolean; allowOverwrite: boolean }, incrementalNaming: 'simple' | 'smart' | 'disabled'): URI { let name = resources.basenameOrAuthority(fileToPaste.resource); export async function findValidPasteFileTarget( explorerService: IExplorerService, fileService: IFileService, dialogService: IDialogService, targetFolder: ExplorerItem, fileToPaste: { resource: URI; isDirectory?: boolean; allowOverwrite: boolean }, incrementalNaming: 'simple' | 'smart' | 'disabled' ): Promise { let name = resources.basenameOrAuthority(fileToPaste.resource); let candidate = resources.joinPath(targetFolder.resource, name); // In the disabled case we must ask if it's ok to overwrite the file if it exists if (incrementalNaming === 'disabled') { const canOverwrite = await askForOverwrite(fileService, dialogService, candidate); if (!canOverwrite) { return; } } while (true && !fileToPaste.allowOverwrite) { if (!explorerService.findClosest(candidate)) { break;"} {"_id":"doc-en-vscode-f8d322776c162f209f72ea407996b100f5c6cec75fdaea729f721022b2eac157","title":"","text":"target = element.isDirectory ? element : element.parent!; } const targetFile = findValidPasteFileTarget(explorerService, target, { resource: fileToPaste, isDirectory: fileToPasteStat.isDirectory, allowOverwrite: pasteShouldMove || incrementalNaming === 'disabled' }, incrementalNaming); if (incrementalNaming === 'disabled') { const canOverwrite = await askForOverwrite(fileService, dialogService, targetFile); if (!canOverwrite) { return; } const targetFile = await findValidPasteFileTarget( explorerService, fileService, dialogService, target, { resource: fileToPaste, isDirectory: fileToPasteStat.isDirectory, allowOverwrite: pasteShouldMove || incrementalNaming === 'disabled' }, incrementalNaming ); if (!targetFile) { return undefined; } return { source: fileToPaste, target: targetFile };"} {"_id":"doc-en-vscode-f4cdebae8dd4ff74d129a545c1425203b44a132e566bddec78b72e541e489fe5","title":"","text":"if (sourceTargetPairs.length >= 1) { // Move/Copy File if (pasteShouldMove) { const resourceFileEdits = sourceTargetPairs.map(pair => new ResourceFileEdit(pair.source, pair.target)); const resourceFileEdits = sourceTargetPairs.map(pair => new ResourceFileEdit(pair.source, pair.target, { overwrite: incrementalNaming === 'disabled' })); const options = { confirmBeforeUndo: configurationService.getValue().explorer.confirmUndo === UndoConfirmLevel.Verbose, progressLabel: sourceTargetPairs.length > 1 ? nls.localize({ key: 'movingBulkEdit', comment: ['Placeholder will be replaced by the number of files being moved'] }, \"Moving {0} files\", sourceTargetPairs.length)"} {"_id":"doc-en-vscode-d9de2b0b52c1dbe5c6848dcee446dd383ed8da37924aa3475bd1ccccb18b56b9","title":"","text":"// Reuse duplicate action when user copies const explorerConfig = this.configurationService.getValue().explorer; const resourceFileEdits = sources.map(({ resource, isDirectory }) => (new ResourceFileEdit(resource, findValidPasteFileTarget(this.explorerService, target, { resource, isDirectory, allowOverwrite: false }, explorerConfig.incrementalNaming), { copy: true }))); const resourceFileEdits: ResourceFileEdit[] = []; for (const { resource, isDirectory } of sources) { const allowOverwrite = explorerConfig.incrementalNaming === 'disabled'; const newResource = await findValidPasteFileTarget(this.explorerService, this.fileService, this.dialogService, target, { resource, isDirectory, allowOverwrite }, explorerConfig.incrementalNaming ); if (!newResource) { continue; } const resourceEdit = new ResourceFileEdit(resource, newResource, { copy: true, overwrite: allowOverwrite }); resourceFileEdits.push(resourceEdit); } const labelSufix = getFileOrFolderLabelSufix(sources); await this.explorerService.applyBulkEdit(resourceFileEdits, { confirmBeforeUndo: explorerConfig.confirmUndo === UndoConfirmLevel.Default || explorerConfig.confirmUndo === UndoConfirmLevel.Verbose,"} {"_id":"doc-en-vscode-617f329fc517933f1052c2dd43555f013f54fe6de28dc39ef2b7cab2a3fc615d","title":"","text":".monaco-workbench .notebookOverlay .output { position: absolute; height: 0px; font-size: var(--notebook-cell-output-font-size); user-select: text; -webkit-user-select: text; cursor: auto;"} {"_id":"doc-en-vscode-b2df051d31a9540149ebf76237fdf7c81999bd26ba7b682fff408c1189ffdd4a","title":"","text":"insertToolbarPosition, insertToolbarAlignment, fontSize, outputFontSize, focusIndicatorLeftMargin, focusIndicatorGap } = this._notebookOptions.getLayoutConfiguration();"} {"_id":"doc-en-vscode-1196e8f08e82634b7a135926660914bb558fa78af4680e48c98b7f05f406a89d","title":"","text":"const fontFamily = this._generateFontFamily(); styleSheets.push(` :root { --notebook-cell-output-font-size: ${fontSize}px; --notebook-cell-output-font-family: ${fontFamily}; .notebook-editor { --notebook-cell-output-font-size: ${outputFontSize}px; --notebook-cell-input-preview-font-size: ${fontSize}px; --notebook-cell-input-preview-font-family: ${fontFamily}; }"} {"_id":"doc-en-vscode-7da2793942d610d4d7dcde55ab81a650c5a23fe6c929e86247195b648eaef1e9","title":"","text":"import { ILogService } from 'vs/platform/log/common/log'; import { IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile'; import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity'; import { isObject, isString } from 'vs/base/common/types'; import { Schemas } from 'vs/base/common/network'; interface IStoredProfileExtension { identifier: IExtensionIdentifier; location: UriComponents; location: UriComponents | string; version: string; metadata?: Metadata; }"} {"_id":"doc-en-vscode-13aa78b475db18a6b51a8d0066851f13216c17f5ad63da64270b91bd2ff6445a","title":"","text":"if (!Array.isArray(storedProfileExtensions)) { throw new Error(`Invalid extensions content in ${file.toString()}`); } // TODO @sandy081: Remove this migration after couple of releases let migrate = false; for (const e of storedProfileExtensions) { if (!isStoredProfileExtension(e)) { throw new Error(`Invalid extensions content in ${file.toString()}`); } let location: URI; if (isString(e.location)) { location = this.resolveExtensionLocation(file, e.location); } else { location = URI.revive(e.location); const relativePath = this.toRelativePath(file, location); if (relativePath) { migrate = true; e.location = relativePath; } } extensions.push({ identifier: e.identifier, location: URI.revive(e.location), location, version: e.version, metadata: e.metadata, }); } if (migrate) { await this.fileService.writeFile(file, VSBuffer.fromString(JSON.stringify(storedProfileExtensions))); } } // Update"} {"_id":"doc-en-vscode-7e503f39bb4e896108c2e676a4bea383776a0a83ea8aceed78f0bf8e7a9d347b","title":"","text":"const storedProfileExtensions: IStoredProfileExtension[] = extensions.map(e => ({ identifier: e.identifier, version: e.version, location: e.location.toJSON(), location: this.toRelativePath(file, e.location) ?? e.location.toJSON(), metadata: e.metadata })); await this.fileService.writeFile(file, VSBuffer.fromString(JSON.stringify(storedProfileExtensions)));"} {"_id":"doc-en-vscode-66597a9318d757000a15b745e35ca488e7d39ed3c7b916245a4da5d1cd243a0a","title":"","text":"}); } private toRelativePath(extensionsProfileLocation: URI, extensionLocation: URI): string | undefined { // Extension Profile location scheme is always vscode-userdata and Extension location scheme is always file // Hence we need to convert the Extension Profile location scheme to file to resolve the relative path const parent = this.uriIdentityService.extUri.dirname(extensionsProfileLocation).with({ scheme: Schemas.file }); if (this.uriIdentityService.extUri.isEqualOrParent(extensionLocation, parent)) { return this.uriIdentityService.extUri.relativePath(parent, extensionLocation); } return undefined; } private resolveExtensionLocation(extensionsProfileLocation: URI, path: string): URI { // Extension Profile location scheme is always vscode-userdata and Extension location scheme is always file // Hence we need to convert the Extension Profile location scheme to file to resolve extension location return this.uriIdentityService.extUri.joinPath(this.uriIdentityService.extUri.dirname(extensionsProfileLocation), path).with({ scheme: Schemas.file }); } private _migrationPromise: Promise | undefined; private async migrateFromOldDefaultProfileExtensionsLocation(): Promise { if (!this._migrationPromise) {"} {"_id":"doc-en-vscode-344a1540c5cb1ae4406388b470174da1e76c7da7f93ea91bdcb4d9233285a987","title":"","text":"} function isStoredProfileExtension(candidate: any): candidate is IStoredProfileExtension { return typeof candidate === 'object' return isObject(candidate) && isIExtensionIdentifier(candidate.identifier) && isUriComponents(candidate.location) && candidate.version && typeof candidate.version === 'string'; && (isUriComponents(candidate.location) || isString(candidate.location)) && candidate.version && isString(candidate.version); } function isUriComponents(thing: unknown): thing is UriComponents { if (!thing) { return false; } return typeof (thing).path === 'string' && typeof (thing).scheme === 'string'; return isString((thing).path) && isString((thing).scheme); }"} {"_id":"doc-en-vscode-924a193e1c7a1cf47a7f7d70bb7cb7e688ef759ee16845a18c0cfccbe643b35c","title":"","text":"private versionId = 0; private bufferSavedVersionId: number | undefined; private ignoreDirtyOnModelContentChange = false; private ignoreSaveFromSaveParticipants = false; private static readonly UNDO_REDO_SAVE_PARTICIPANTS_AUTO_SAVE_THROTTLE_THRESHOLD = 500; private lastModelContentChangeFromUndoRedo: number | undefined = undefined;"} {"_id":"doc-en-vscode-fa1afb1bbcb181c554c7b03061de8b1e45a6fe6a19bf5fa4b6d7ebbf8fd06d96","title":"","text":"let versionId = this.versionId; this.trace(`doSave(${versionId}) - enter with versionId ${versionId}`); // Return early if saved from within save participant to break recursion // // Scenario: a save participant triggers a save() on the model if (this.ignoreSaveFromSaveParticipants) { this.trace(`doSave(${versionId}) - exit - refusing to save() recursively from save participant`); return; } // Lookup any running pending save for this versionId and return it if found // // Scenario: user invoked the save action multiple times quickly for the same contents"} {"_id":"doc-en-vscode-62e0eff17a5650faa795cd0ccd16d3606c17af90e56a3070fe1ad823163e859f","title":"","text":"// Run save participants unless save was cancelled meanwhile if (!saveCancellation.token.isCancellationRequested) { await this.textFileService.files.runSaveParticipants(this, { reason: options.reason ?? SaveReason.EXPLICIT }, saveCancellation.token); this.ignoreSaveFromSaveParticipants = true; try { await this.textFileService.files.runSaveParticipants(this, { reason: options.reason ?? SaveReason.EXPLICIT }, saveCancellation.token); } finally { this.ignoreSaveFromSaveParticipants = false; } } } catch (error) { this.logService.error(`[text file model] runSaveParticipants(${versionId}) - resulted in an error: ${error.toString()}`, this.resource.toString());"} {"_id":"doc-en-vscode-b1c5278b53e79301d832f0912773b51057c44756e191110b74e8783dd244ab71","title":"","text":"participant.dispose(); }); test('Save Participant, calling save from within is unsupported but does not explode (sync save)', async function () { test('Save Participant, calling save from within is unsupported but does not explode (sync save, no model change)', async function () { const model: TextFileEditorModel = instantiationService.createInstance(TextFileEditorModel, toResource.call(this, '/path/index_async.txt'), 'utf8', undefined); await testSaveFromSaveParticipant(model, false); await testSaveFromSaveParticipant(model, false, false, false); model.dispose(); }); test('Save Participant, calling save from within is unsupported but does not explode (async save)', async function () { test('Save Participant, calling save from within is unsupported but does not explode (async save, no model change)', async function () { const model: TextFileEditorModel = instantiationService.createInstance(TextFileEditorModel, toResource.call(this, '/path/index_async.txt'), 'utf8', undefined); await testSaveFromSaveParticipant(model, true); await testSaveFromSaveParticipant(model, true, false, false); model.dispose(); }); async function testSaveFromSaveParticipant(model: TextFileEditorModel, async: boolean): Promise { test('Save Participant, calling save from within is unsupported but does not explode (sync save, model change)', async function () { const model: TextFileEditorModel = instantiationService.createInstance(TextFileEditorModel, toResource.call(this, '/path/index_async.txt'), 'utf8', undefined); let breakLoop = false; await testSaveFromSaveParticipant(model, false, true, false); const participant = accessor.textFileService.files.addSaveParticipant({ participate: async model => { if (breakLoop) { return; } model.dispose(); }); test('Save Participant, calling save from within is unsupported but does not explode (async save, model change)', async function () { const model: TextFileEditorModel = instantiationService.createInstance(TextFileEditorModel, toResource.call(this, '/path/index_async.txt'), 'utf8', undefined); await testSaveFromSaveParticipant(model, true, true, false); model.dispose(); }); test('Save Participant, calling save from within is unsupported but does not explode (force)', async function () { const model: TextFileEditorModel = instantiationService.createInstance(TextFileEditorModel, toResource.call(this, '/path/index_async.txt'), 'utf8', undefined); await testSaveFromSaveParticipant(model, false, false, true); breakLoop = true; model.dispose(); }); async function testSaveFromSaveParticipant(model: TextFileEditorModel, async: boolean, modelChange: boolean, force: boolean): Promise { const disposable = accessor.textFileService.files.addSaveParticipant({ participate: async () => { if (async) { await timeout(10); } const newSavePromise = model.save(); // assert that this is the same promise as the outer one assert.strictEqual(savePromise, newSavePromise); if (modelChange) { model.updateTextEditorModel(createTextBufferFactory('bar')); const newSavePromise = model.save(force ? { force } : undefined); // assert that this is not the same promise as the outer one assert.notStrictEqual(savePromise, newSavePromise); await newSavePromise; } else { const newSavePromise = model.save(force ? { force } : undefined); // assert that this is the same promise as the outer one assert.strictEqual(savePromise, newSavePromise); await savePromise; } } }); await model.resolve(); model.updateTextEditorModel(createTextBufferFactory('foo')); const savePromise = model.save(); const savePromise = model.save(force ? { force } : undefined); await savePromise; participant.dispose(); disposable.dispose(); } test('backup and restore (simple)', async function () {"} {"_id":"doc-en-vscode-24cd4e8da8403aff78b984710390d4a1c9cbf8ce8814148ea760950612187697","title":"","text":"private readonly saveSequentializer = new TaskSequentializer(); private ignoreSaveFromSaveParticipants = false; async save(options: IStoredFileWorkingCopySaveOptions = Object.create(null)): Promise { if (!this.isResolved()) { return false;"} {"_id":"doc-en-vscode-ab7a5eba4257fe6d251eb6fa0cbb0e9b87a5dddf975640d1b21d24e9a5063345","title":"","text":"let versionId = this.versionId; this.trace(`doSave(${versionId}) - enter with versionId ${versionId}`); // Return early if saved from within save participant to break recursion // // Scenario: a save participant triggers a save() on the working copy if (this.ignoreSaveFromSaveParticipants) { this.trace(`doSave(${versionId}) - exit - refusing to save() recursively from save participant`); return; } // Lookup any running pending save for this versionId and return it if found // // Scenario: user invoked the save action multiple times quickly for the same contents"} {"_id":"doc-en-vscode-6152280813182688c47806fbcfc5c9511e767df0adf40cadfd10909dfc4d2d7a","title":"","text":"// Run save participants unless save was cancelled meanwhile if (!saveCancellation.token.isCancellationRequested) { await this.workingCopyFileService.runSaveParticipants(this, { reason: options.reason ?? SaveReason.EXPLICIT }, saveCancellation.token); this.ignoreSaveFromSaveParticipants = true; try { await this.workingCopyFileService.runSaveParticipants(this, { reason: options.reason ?? SaveReason.EXPLICIT }, saveCancellation.token); } finally { this.ignoreSaveFromSaveParticipants = false; } } } catch (error) { this.logService.error(`[stored file working copy] runSaveParticipants(${versionId}) - resulted in an error: ${error.toString()}`, this.resource.toString(), this.typeId);"} {"_id":"doc-en-vscode-3c31c721a0814a37fba1b5d116694c54f0932f0ba02c8657c9ed3da12883fd4f","title":"","text":"import { basename } from 'vs/base/common/resources'; import { FileChangesEvent, FileChangeType, FileOperationError, FileOperationResult, NotModifiedSinceFileOperationError } from 'vs/platform/files/common/files'; import { SaveReason, SaveSourceRegistry } from 'vs/workbench/common/editor'; import { Promises } from 'vs/base/common/async'; import { Promises, timeout } from 'vs/base/common/async'; import { consumeReadable, consumeStream, isReadableStream } from 'vs/base/common/stream'; import { runWithFakedTimers } from 'vs/base/test/common/timeTravelScheduler';"} {"_id":"doc-en-vscode-9d39b44194930c372f17ea4568eeeb14d35b4dd7e58b4dd318a62225d969bcfe","title":"","text":"assert.strictEqual(participationCounter, 1); }); test('Save Participant, calling save from within is unsupported but does not explode (sync save)', async function () { await workingCopy.resolve(); await testSaveFromSaveParticipant(workingCopy, false); }); test('Save Participant, calling save from within is unsupported but does not explode (async save)', async function () { await workingCopy.resolve(); await testSaveFromSaveParticipant(workingCopy, true); }); async function testSaveFromSaveParticipant(workingCopy: StoredFileWorkingCopy, async: boolean): Promise { assert.strictEqual(accessor.workingCopyFileService.hasSaveParticipants, false); const disposable = accessor.workingCopyFileService.addSaveParticipant({ participate: async () => { if (async) { await timeout(10); } await workingCopy.save({ force: true }); } }); assert.strictEqual(accessor.workingCopyFileService.hasSaveParticipants, true); await workingCopy.save({ force: true }); disposable.dispose(); } test('revert', async () => { await workingCopy.resolve(); workingCopy.model?.updateContents('hello revert');"} {"_id":"doc-en-vscode-1c95707d9b8cb6b49dd5308f73f4b04bb04bb4cdb916a7c1201dc0b8857c63e5","title":"","text":"type KernelQuickPickItem = IQuickPickItem | InstallExtensionPick | KernelPick | SourcePick; const KERNEL_PICKER_UPDATE_DEBOUNCE = 200; registerAction2(class extends Action2 { constructor() { super({ id: SELECT_KERNEL_ID, category: NOTEBOOK_ACTIONS_CATEGORY, title: { value: localize('notebookActions.selectKernel', \"Select Notebook Kernel\"), original: 'Select Notebook Kernel' }, // precondition: NOTEBOOK_IS_ACTIVE_EDITOR, icon: selectKernelIcon, f1: true, menu: [{ id: MenuId.EditorTitle, when: ContextKeyExpr.and( NOTEBOOK_IS_ACTIVE_EDITOR, ContextKeyExpr.notEquals('config.notebook.globalToolbar', true) ), group: 'navigation', order: -10 }, { id: MenuId.NotebookToolbar, when: ContextKeyExpr.equals('config.notebook.globalToolbar', true), group: 'status', order: -10 }, { id: MenuId.InteractiveToolbar, when: NOTEBOOK_KERNEL_COUNT.notEqualsTo(0), group: 'status', order: -10 }], description: { description: localize('notebookActions.selectKernel.args', \"Notebook Kernel Args\"), args: [ { name: 'kernelInfo', description: 'The kernel info', schema: { 'type': 'object', 'required': ['id', 'extension'], 'properties': { 'id': { 'type': 'string' }, 'extension': { 'type': 'string' }, 'notebookEditorId': { 'type': 'string' } } } } ] }, }); } async run(accessor: ServicesAccessor, context?: { id: string; extension: string } | { notebookEditorId: string } | { id: string; extension: string; notebookEditorId: string } | { ui?: boolean; notebookEditor?: NotebookEditorWidget } | undefined ): Promise { const notebookKernelService = accessor.get(INotebookKernelService); const editorService = accessor.get(IEditorService); const productService = accessor.get(IProductService); const quickInputService = accessor.get(IQuickInputService); const labelService = accessor.get(ILabelService); const logService = accessor.get(ILogService); const paneCompositeService = accessor.get(IPaneCompositePartService); const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService); const extensionHostService = accessor.get(IExtensionService); type KernelQuickPickContext = { id: string; extension: string } | { notebookEditorId: string } | { id: string; extension: string; notebookEditorId: string } | { ui?: boolean; notebookEditor?: NotebookEditorWidget }; interface IKernelPickerStrategy { showQuickPick(context?: KernelQuickPickContext): Promise; } let editor: INotebookEditor | undefined; if (context !== undefined && 'notebookEditorId' in context) { const editorId = context.notebookEditorId; const matchingEditor = editorService.visibleEditorPanes.find((editorPane) => { const notebookEditor = getNotebookEditorFromEditorPane(editorPane); return notebookEditor?.getId() === editorId; }); editor = getNotebookEditorFromEditorPane(matchingEditor); } else if (context !== undefined && 'notebookEditor' in context) { editor = context?.notebookEditor; } else { editor = getNotebookEditorFromEditorPane(editorService.activeEditorPane); } class KernelPickerFlatStrategy implements IKernelPickerStrategy { constructor( private readonly _notebookKernelService: INotebookKernelService, private readonly _editorService: IEditorService, private readonly _productService: IProductService, private readonly _quickInputService: IQuickInputService, private readonly _labelService: ILabelService, private readonly _logService: ILogService, private readonly _paneCompositePartService: IPaneCompositePartService, private readonly _extensionWorkbenchService: IExtensionsWorkbenchService, private readonly _extensionService: IExtensionService, ) { } async showQuickPick(context?: KernelQuickPickContext): Promise { const editor = this._getEditorFromContext(context); if (!editor || !editor.hasModel()) { return false;"} {"_id":"doc-en-vscode-d8b2508fa3eb345c85f2cdb6f45b95eeefdad7166b348d4640dec42b4b74b0e8","title":"","text":"const notebook = editor.textModel; const scopedContextKeyService = editor.scopedContextKeyService; const matchResult = notebookKernelService.getMatchingKernel(notebook); const matchResult = this._notebookKernelService.getMatchingKernel(notebook); const { selected, all } = matchResult; if (selected && controllerId && selected.id === controllerId && ExtensionIdentifier.equals(selected.extension, extensionId)) {"} {"_id":"doc-en-vscode-a53daf6b304cd51422769cf6f8eab023dccf3a4788c6f1d97587dc8418154a41","title":"","text":"} } if (!newKernel) { logService.warn(`wanted kernel DOES NOT EXIST, wanted: ${wantedId}, all: ${all.map(k => k.id)}`); this._logService.warn(`wanted kernel DOES NOT EXIST, wanted: ${wantedId}, all: ${all.map(k => k.id)}`); return false; } } if (newKernel) { notebookKernelService.selectKernelForNotebook(newKernel, notebook); this._notebookKernelService.selectKernelForNotebook(newKernel, notebook); return true; } const quickPick = quickInputService.createQuickPick(); const quickPickItems = this._getKernelPickerQuickPickItems(notebook, matchResult, notebookKernelService, scopedContextKeyService); const quickPick = this._quickInputService.createQuickPick(); const quickPickItems = this._getKernelPickerQuickPickItems(notebook, matchResult, this._notebookKernelService, scopedContextKeyService); quickPick.items = quickPickItems; quickPick.canSelectMany = false; quickPick.placeholder = selected ? localize('prompt.placeholder.change', \"Change kernel for '{0}'\", labelService.getUriLabel(notebook.uri, { relative: true })) : localize('prompt.placeholder.select', \"Select kernel for '{0}'\", labelService.getUriLabel(notebook.uri, { relative: true })); ? localize('prompt.placeholder.change', \"Change kernel for '{0}'\", this._labelService.getUriLabel(notebook.uri, { relative: true })) : localize('prompt.placeholder.select', \"Select kernel for '{0}'\", this._labelService.getUriLabel(notebook.uri, { relative: true })); quickPick.busy = notebookKernelService.getKernelDetectionTasks(notebook).length > 0; quickPick.busy = this._notebookKernelService.getKernelDetectionTasks(notebook).length > 0; const kernelDetectionTaskListener = notebookKernelService.onDidChangeKernelDetectionTasks(() => { quickPick.busy = notebookKernelService.getKernelDetectionTasks(notebook).length > 0; const kernelDetectionTaskListener = this._notebookKernelService.onDidChangeKernelDetectionTasks(() => { quickPick.busy = this._notebookKernelService.getKernelDetectionTasks(notebook).length > 0; }); // run extension recommendataion task if quickPickItems is empty const extensionRecommendataionPromise = quickPickItems.length === 0 ? createCancelablePromise(token => this._showInstallKernelExtensionRecommendation(notebook, quickPick, extensionWorkbenchService, token)) ? createCancelablePromise(token => this._showInstallKernelExtensionRecommendation(notebook, quickPick, this._extensionWorkbenchService, token)) : undefined; const kernelChangeEventListener = Event.debounce( Event.any( notebookKernelService.onDidChangeSourceActions, notebookKernelService.onDidAddKernel, notebookKernelService.onDidRemoveKernel, notebookKernelService.onDidChangeNotebookAffinity this._notebookKernelService.onDidChangeSourceActions, this._notebookKernelService.onDidAddKernel, this._notebookKernelService.onDidRemoveKernel, this._notebookKernelService.onDidChangeNotebookAffinity ), (last, _current) => last, KERNEL_PICKER_UPDATE_DEBOUNCE"} {"_id":"doc-en-vscode-91b7d71237e4572eb6c69191220cb0768771cf274b9fd88931ffaf8335b4a148","title":"","text":"extensionRecommendataionPromise?.cancel(); const currentActiveItems = quickPick.activeItems; const matchResult = notebookKernelService.getMatchingKernel(notebook); const quickPickItems = this._getKernelPickerQuickPickItems(notebook, matchResult, notebookKernelService, scopedContextKeyService); const matchResult = this._notebookKernelService.getMatchingKernel(notebook); const quickPickItems = this._getKernelPickerQuickPickItems(notebook, matchResult, this._notebookKernelService, scopedContextKeyService); quickPick.keepScrollPosition = true; // recalcuate active items"} {"_id":"doc-en-vscode-a99aabf6c4a5406a2d4b1b8144c1bdc45356e822d853412dec3e3eed659a83ee","title":"","text":"if (pick) { if (isKernelPick(pick)) { newKernel = pick.kernel; notebookKernelService.selectKernelForNotebook(newKernel, notebook); this._notebookKernelService.selectKernelForNotebook(newKernel, notebook); return true; } // actions if (pick.id === 'install') { await this._showKernelExtension( paneCompositeService, extensionWorkbenchService, extensionHostService, this._paneCompositePartService, this._extensionWorkbenchService, this._extensionService, notebook.viewType ); // suggestedExtension must be defined for this option to be shown, but still check to make TS happy } else if (isInstallExtensionPick(pick)) { await this._showKernelExtension( paneCompositeService, extensionWorkbenchService, extensionHostService, this._paneCompositePartService, this._extensionWorkbenchService, this._extensionService, notebook.viewType, pick.extensionId, productService.quality !== 'stable' this._productService.quality !== 'stable' ); } else if (isSourcePick(pick)) { // selected explicilty, it should trigger the execution?"} {"_id":"doc-en-vscode-13238c1c20c071bc5eacf89f14964b5d0a89da09f72ec87cf245335ce1ca5866","title":"","text":"return false; } private _getEditorFromContext(context?: KernelQuickPickContext): INotebookEditor | undefined { let editor: INotebookEditor | undefined; if (context !== undefined && 'notebookEditorId' in context) { const editorId = context.notebookEditorId; const matchingEditor = this._editorService.visibleEditorPanes.find((editorPane) => { const notebookEditor = getNotebookEditorFromEditorPane(editorPane); return notebookEditor?.getId() === editorId; }); editor = getNotebookEditorFromEditorPane(matchingEditor); } else if (context !== undefined && 'notebookEditor' in context) { editor = context?.notebookEditor; } else { editor = getNotebookEditorFromEditorPane(this._editorService.activeEditorPane); } return editor; } private _getKernelPickerQuickPickItems( notebookTextModel: NotebookTextModel, matchResult: INotebookKernelMatchResult,"} {"_id":"doc-en-vscode-b67f13e26a1174c59c81ab0a6a3e2ee69ebd4f5449dbb06bec502d0c49883ca3","title":"","text":"): QuickPickInput[] { const { selected, all, suggestions, hidden } = matchResult; function toQuickPick(kernel: INotebookKernel) { const res = { kernel, picked: kernel.id === selected?.id, label: kernel.label, description: kernel.description, detail: kernel.detail }; if (kernel.id === selected?.id) { if (!res.description) { res.description = localize('current1', \"Currently Selected\"); } else { res.description = localize('current2', \"{0} - Currently Selected\", res.description); } } return res; } const quickPickItems: QuickPickInput[] = []; if (all.length) { // Always display suggested kernels on the top. if (suggestions.length) { quickPickItems.push({ type: 'separator', label: localize('suggestedKernels', \"Suggested\") }); quickPickItems.push(...suggestions.map(toQuickPick)); } this._fillInSuggestions(quickPickItems, suggestions, selected); // Next display all of the kernels not marked as hidden grouped by categories or extensions. // If we don't have a kind, always display those at the bottom. const picks = all.filter(item => (!suggestions.includes(item) && !hidden.includes(item))).map(toQuickPick); const picks = all.filter(item => (!suggestions.includes(item) && !hidden.includes(item))).map(kernel => this._toQuickPick(kernel, selected)); const kernelsPerCategory = groupBy(picks, (a, b) => compareIgnoreCase(a.kernel.kind || 'z', b.kernel.kind || 'z')); kernelsPerCategory.forEach(items => { quickPickItems.push({"} {"_id":"doc-en-vscode-da626a15c28a8bfafd916ad63793e7b8ffd06780d6e27620340c03e0a6bce350","title":"","text":"return quickPickItems; } private _toQuickPick(kernel: INotebookKernel, selected: INotebookKernel | undefined) { const res = { kernel, picked: kernel.id === selected?.id, label: kernel.label, description: kernel.description, detail: kernel.detail }; if (kernel.id === selected?.id) { if (!res.description) { res.description = localize('current1', \"Currently Selected\"); } else { res.description = localize('current2', \"{0} - Currently Selected\", res.description); } } return res; } private _fillInSuggestions(quickPickItems: QuickPickInput[], suggestions: INotebookKernel[], selected: INotebookKernel | undefined) { if (!suggestions.length) { return; } if (suggestions.length === 1 && suggestions[0].id === selected?.id) { quickPickItems.push({ type: 'separator', label: localize('selectedKernels', \"Selected\") }); // The title is already set to \"Selected\" so we don't need to set it again in description, thus passing in `undefined`. quickPickItems.push(this._toQuickPick(suggestions[0], undefined)); return; } quickPickItems.push({ type: 'separator', label: localize('suggestedKernels', \"Suggested\") }); quickPickItems.push(...suggestions.map(kernel => this._toQuickPick(kernel, selected))); } private async _showInstallKernelExtensionRecommendation( notebookTextModel: NotebookTextModel, quickPick: IQuickPick,"} {"_id":"doc-en-vscode-174c1b747e4a6321aafd6d86990eb408c872f21f75909fa9460e0f9577223b47","title":"","text":"} } private async _getKernelRecommendationsQuickPickItems( notebookTextModel: NotebookTextModel, extensionWorkbenchService: IExtensionsWorkbenchService,"} {"_id":"doc-en-vscode-ce4525e9015643822b170873658c2b23f7170d0919eda182cf59f3c7c596c3c3","title":"","text":"const pascalCased = viewType.split(/[^a-z0-9]/ig).map(uppercaseFirstLetter).join(''); view?.search(`@tag:notebookKernel${pascalCased}`); } } registerAction2(class extends Action2 { constructor() { super({ id: SELECT_KERNEL_ID, category: NOTEBOOK_ACTIONS_CATEGORY, title: { value: localize('notebookActions.selectKernel', \"Select Notebook Kernel\"), original: 'Select Notebook Kernel' }, icon: selectKernelIcon, f1: true, menu: [{ id: MenuId.EditorTitle, when: ContextKeyExpr.and( NOTEBOOK_IS_ACTIVE_EDITOR, ContextKeyExpr.notEquals('config.notebook.globalToolbar', true) ), group: 'navigation', order: -10 }, { id: MenuId.NotebookToolbar, when: ContextKeyExpr.equals('config.notebook.globalToolbar', true), group: 'status', order: -10 }, { id: MenuId.InteractiveToolbar, when: NOTEBOOK_KERNEL_COUNT.notEqualsTo(0), group: 'status', order: -10 }], description: { description: localize('notebookActions.selectKernel.args', \"Notebook Kernel Args\"), args: [ { name: 'kernelInfo', description: 'The kernel info', schema: { 'type': 'object', 'required': ['id', 'extension'], 'properties': { 'id': { 'type': 'string' }, 'extension': { 'type': 'string' }, 'notebookEditorId': { 'type': 'string' } } } } ] }, }); } async run(accessor: ServicesAccessor, context?: KernelQuickPickContext): Promise { const notebookKernelService = accessor.get(INotebookKernelService); const editorService = accessor.get(IEditorService); const productService = accessor.get(IProductService); const quickInputService = accessor.get(IQuickInputService); const labelService = accessor.get(ILabelService); const logService = accessor.get(ILogService); const paneCompositeService = accessor.get(IPaneCompositePartService); const extensionWorkbenchService = accessor.get(IExtensionsWorkbenchService); const extensionHostService = accessor.get(IExtensionService); const strategy = new KernelPickerFlatStrategy( notebookKernelService, editorService, productService, quickInputService, labelService, logService, paneCompositeService, extensionWorkbenchService, extensionHostService ); return await strategy.showQuickPick(context); } }); export class NotebooKernelActionViewItem extends ActionViewItem {"} {"_id":"doc-en-vscode-5c2d418651da703bf7608c75002d615ed37d2b20a9c520d2e8726ddc4ee9fbcf","title":"","text":"\"scopeName\": \"source.clojure\", \"path\": \"./syntaxes/clojure.tmLanguage.json\" } ] ], \"configurationDefaults\": { \"[clojure]\": { \"diffEditor.ignoreTrimWhitespace\": false } } }, \"repository\": { \"type\": \"git\","} {"_id":"doc-en-vscode-53c59ee81162977813c414ae2c280570a912d5e2cb478c9c73b17f2d03d70aeb","title":"","text":"\"language\": \"coffeescript\", \"path\": \"./snippets/coffeescript.code-snippets\" } ] ], \"configurationDefaults\": { \"[coffeescript]\": { \"diffEditor.ignoreTrimWhitespace\": false } } }, \"repository\": { \"type\": \"git\","} {"_id":"doc-en-vscode-7e9bc174b596c846f039d3eae81f8d55e1426aec06bbe6dab79f07839bfddf36","title":"","text":"\"language\": \"fsharp\", \"path\": \"./snippets/fsharp.code-snippets\" } ] ], \"configurationDefaults\": { \"[fsharp]\": { \"diffEditor.ignoreTrimWhitespace\": false } } }, \"repository\": { \"type\": \"git\","} {"_id":"doc-en-vscode-85fbfe8b6687f72d22f912a48df9617c4e815bf6d0933001b599db61ca047904","title":"","text":"\"configurationDefaults\": { \"[markdown]\": { \"editor.unicodeHighlight.ambiguousCharacters\": false, \"editor.unicodeHighlight.invisibleCharacters\": false \"editor.unicodeHighlight.invisibleCharacters\": false, \"diffEditor.ignoreTrimWhitespace\": false } } },"} {"_id":"doc-en-vscode-4ad0e1509659258d73a62287a1c7dd29b8bde40f3c547a2db807ccd106d6254f","title":"","text":"\"scopeName\": \"text.pug\", \"path\": \"./syntaxes/pug.tmLanguage.json\" } ] ], \"configurationDefaults\": { \"[jade]\": { \"diffEditor.ignoreTrimWhitespace\": false } } }, \"repository\": { \"type\": \"git\","} {"_id":"doc-en-vscode-d3193ddc91a2b145e307a4cd0df8e6aaac174b6a604e524525b4b767257190ea","title":"","text":"\"scopeName\": \"source.regexp.python\", \"path\": \"./syntaxes/MagicRegExp.tmLanguage.json\" } ] ], \"configurationDefaults\": { \"[python]\": { \"diffEditor.ignoreTrimWhitespace\": false } } }, \"scripts\": { \"update-grammar\": \"node ../node_modules/vscode-grammar-updater/bin MagicStack/MagicPython grammars/MagicPython.tmLanguage ./syntaxes/MagicPython.tmLanguage.json grammars/MagicRegExp.tmLanguage ./syntaxes/MagicRegExp.tmLanguage.json\""} {"_id":"doc-en-vscode-8ccc56493cb8e7e4ac308234227b10ede6ec081aad0c55b210b1c3b5ec76951d","title":"","text":"\"[yaml]\": { \"editor.insertSpaces\": true, \"editor.tabSize\": 2, \"editor.autoIndent\": \"advanced\" \"editor.autoIndent\": \"advanced\", \"diffEditor.ignoreTrimWhitespace\": false }, \"[dockercompose]\": { \"editor.insertSpaces\": true,"} {"_id":"doc-en-vscode-e34839a1bee8fc568767736d508d74c4f369625675789bef85d37090c980f72f","title":"","text":"} } })); disposables.add(quickPick.onDidHide(() => { quickPick.dispose(); resolve(false); })); this._calculdateKernelSources(editor).then(quickPickItems => { quickPick.items = quickPickItems; if (quickPick.items.length > 0) {"} {"_id":"doc-en-vscode-2ca28915deefc5e824576bb32b7b0d6392f66b1f34b37364da2a166eca1fc0f3","title":"","text":"import { memoize } from 'vs/base/common/decorators'; import { onUnexpectedError } from 'vs/base/common/errors'; import { MarkdownString } from 'vs/base/common/htmlContent'; import { Disposable, dispose, disposeIfDisposable, IDisposable } from 'vs/base/common/lifecycle'; import { dispose, disposeIfDisposable, IDisposable } from 'vs/base/common/lifecycle'; import * as env from 'vs/base/common/platform'; import severity from 'vs/base/common/severity'; import { noBreakWhitespace } from 'vs/base/common/strings';"} {"_id":"doc-en-vscode-7251472a096bff894390f1abd6e225d7f3b5bdcdc85c8681915b278ed3e944c8","title":"","text":"return result; } export class LazyBreakpointEditorContribution extends Disposable implements IBreakpointEditorContribution { private _contrib: IBreakpointEditorContribution | undefined; constructor(editor: ICodeEditor, @IInstantiationService instantiationService: IInstantiationService) { super(); const listener = editor.onDidChangeModel(() => { if (editor.hasModel()) { listener.dispose(); this._contrib = this._register(instantiationService.createInstance(BreakpointEditorContribution, editor)); } }); } showBreakpointWidget(lineNumber: number, column: number | undefined, context?: BreakpointWidgetContext | undefined): void { this._contrib?.showBreakpointWidget(lineNumber, column, context); } closeBreakpointWidget(): void { this._contrib?.closeBreakpointWidget(); } getContextMenuActionsAtPosition(lineNumber: number, model: ITextModel): IAction[] { return this._contrib?.getContextMenuActionsAtPosition(lineNumber, model) ?? []; } } class BreakpointEditorContribution implements IBreakpointEditorContribution { export class BreakpointEditorContribution implements IBreakpointEditorContribution { private breakpointHintDecoration: string | null = null; private breakpointWidget: BreakpointWidget | undefined;"} {"_id":"doc-en-vscode-793660ff2bcc58a9a4acde334617b1a83df82590054ab713e8874065300764a3","title":"","text":"import { IEditorContribution } from 'vs/editor/common/editorCommon'; import { IModelDecorationOptions, IModelDeltaDecoration, OverviewRulerLane, TrackedRangeStickiness } from 'vs/editor/common/model'; import { localize } from 'vs/nls'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ILogService } from 'vs/platform/log/common/log'; import { registerColor } from 'vs/platform/theme/common/colorRegistry'; import { registerThemingParticipant, themeColorFromId, ThemeIcon } from 'vs/platform/theme/common/themeService';"} {"_id":"doc-en-vscode-e4435c7dc82ae38f630138b273305c17aa4478c8e88e1dd550815927d2dde7d1","title":"","text":"return result; } export class LazyCallStackEditorContribution extends Disposable { constructor(editor: ICodeEditor, @IInstantiationService instantiationService: IInstantiationService) { super(); const listener = editor.onDidChangeModel(() => { if (editor.hasModel()) { listener.dispose(); this._register(instantiationService.createInstance(CallStackEditorContribution, editor)); } }); } } class CallStackEditorContribution extends Disposable implements IEditorContribution { export class CallStackEditorContribution extends Disposable implements IEditorContribution { private decorations = this.editor.createDecorationsCollection(); constructor("} {"_id":"doc-en-vscode-ae303fc894cdff0887cfe261fb1984b6be205acbd00fb56582d4d7a666ede83e","title":"","text":"import { Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions'; import { EditorExtensions } from 'vs/workbench/common/editor'; import { Extensions as ViewExtensions, IViewContainersRegistry, IViewsRegistry, ViewContainer, ViewContainerLocation } from 'vs/workbench/common/views'; import { LazyBreakpointEditorContribution } from 'vs/workbench/contrib/debug/browser/breakpointEditorContribution'; import { BreakpointEditorContribution } from 'vs/workbench/contrib/debug/browser/breakpointEditorContribution'; import { BreakpointsView } from 'vs/workbench/contrib/debug/browser/breakpointsView'; import { LazyCallStackEditorContribution } from 'vs/workbench/contrib/debug/browser/callStackEditorContribution'; import { CallStackEditorContribution } from 'vs/workbench/contrib/debug/browser/callStackEditorContribution'; import { CallStackView } from 'vs/workbench/contrib/debug/browser/callStackView'; import { registerColors } from 'vs/workbench/contrib/debug/browser/debugColors'; import { ADD_CONFIGURATION_ID, CALLSTACK_BOTTOM_ID, CALLSTACK_BOTTOM_LABEL, CALLSTACK_DOWN_ID, CALLSTACK_DOWN_LABEL, CALLSTACK_TOP_ID, CALLSTACK_TOP_LABEL, CALLSTACK_UP_ID, CALLSTACK_UP_LABEL, CONTINUE_ID, CONTINUE_LABEL, COPY_STACK_TRACE_ID, DEBUG_COMMAND_CATEGORY, DEBUG_CONSOLE_QUICK_ACCESS_PREFIX, DEBUG_QUICK_ACCESS_PREFIX, DEBUG_RUN_COMMAND_ID, DEBUG_RUN_LABEL, DEBUG_START_COMMAND_ID, DEBUG_START_LABEL, DISCONNECT_AND_SUSPEND_ID, DISCONNECT_AND_SUSPEND_LABEL, DISCONNECT_ID, DISCONNECT_LABEL, EDIT_EXPRESSION_COMMAND_ID, FOCUS_REPL_ID, JUMP_TO_CURSOR_ID, NEXT_DEBUG_CONSOLE_ID, NEXT_DEBUG_CONSOLE_LABEL, OPEN_LOADED_SCRIPTS_LABEL, PAUSE_ID, PAUSE_LABEL, PREV_DEBUG_CONSOLE_ID, PREV_DEBUG_CONSOLE_LABEL, REMOVE_EXPRESSION_COMMAND_ID, RESTART_FRAME_ID, RESTART_LABEL, RESTART_SESSION_ID, SELECT_AND_START_ID, SELECT_AND_START_LABEL, SELECT_DEBUG_CONSOLE_ID, SELECT_DEBUG_CONSOLE_LABEL, SELECT_DEBUG_SESSION_ID, SELECT_DEBUG_SESSION_LABEL, SET_EXPRESSION_COMMAND_ID, SHOW_LOADED_SCRIPTS_ID, STEP_INTO_ID, STEP_INTO_LABEL, STEP_INTO_TARGET_ID, STEP_INTO_TARGET_LABEL, STEP_OUT_ID, STEP_OUT_LABEL, STEP_OVER_ID, STEP_OVER_LABEL, STOP_ID, STOP_LABEL, TERMINATE_THREAD_ID, TOGGLE_INLINE_BREAKPOINT_ID } from 'vs/workbench/contrib/debug/browser/debugCommands'; import { DebugConsoleQuickAccess } from 'vs/workbench/contrib/debug/browser/debugConsoleQuickAccess'; import { RunToCursorAction, SelectionToReplAction, SelectionToWatchExpressionsAction } from 'vs/workbench/contrib/debug/browser/debugEditorActions'; import { LazyDebugEditorContribution } from 'vs/workbench/contrib/debug/browser/debugEditorContribution'; import { DebugEditorContribution } from 'vs/workbench/contrib/debug/browser/debugEditorContribution'; import * as icons from 'vs/workbench/contrib/debug/browser/debugIcons'; import { DebugProgressContribution } from 'vs/workbench/contrib/debug/browser/debugProgress'; import { StartDebugQuickAccessProvider } from 'vs/workbench/contrib/debug/browser/debugQuickAccess';"} {"_id":"doc-en-vscode-6ee6cd1506edcb605e9a6154267b58ed738cc09d4d4064f9f371170c24919532","title":"","text":"import { ADD_TO_WATCH_ID, BREAK_WHEN_VALUE_CHANGES_ID, BREAK_WHEN_VALUE_IS_ACCESSED_ID, BREAK_WHEN_VALUE_IS_READ_ID, COPY_EVALUATE_PATH_ID, COPY_VALUE_ID, SET_VARIABLE_ID, VariablesView, VIEW_MEMORY_ID } from 'vs/workbench/contrib/debug/browser/variablesView'; import { ADD_WATCH_ID, ADD_WATCH_LABEL, REMOVE_WATCH_EXPRESSIONS_COMMAND_ID, REMOVE_WATCH_EXPRESSIONS_LABEL, WatchExpressionsView } from 'vs/workbench/contrib/debug/browser/watchExpressionsView'; import { WelcomeView } from 'vs/workbench/contrib/debug/browser/welcomeView'; import { BREAKPOINTS_VIEW_ID, BREAKPOINT_EDITOR_CONTRIBUTION_ID, CALLSTACK_VIEW_ID, CONTEXT_BREAKPOINTS_EXIST, CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED, CONTEXT_CALLSTACK_ITEM_TYPE, CONTEXT_CAN_VIEW_MEMORY, CONTEXT_DEBUGGERS_AVAILABLE, CONTEXT_HAS_DEBUGGED, CONTEXT_DEBUG_STATE, CONTEXT_DEBUG_UX, CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_IN_DEBUG_MODE, CONTEXT_JUMP_TO_CURSOR_SUPPORTED, CONTEXT_LOADED_SCRIPTS_SUPPORTED, CONTEXT_RESTART_FRAME_SUPPORTED, CONTEXT_SET_EXPRESSION_SUPPORTED, CONTEXT_SET_VARIABLE_SUPPORTED, CONTEXT_STACK_FRAME_SUPPORTS_RESTART, CONTEXT_STEP_INTO_TARGETS_SUPPORTED, CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED, CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT, CONTEXT_VARIABLE_IS_READONLY, CONTEXT_WATCH_ITEM_TYPE, DEBUG_PANEL_ID, DISASSEMBLY_VIEW_ID, EDITOR_CONTRIBUTION_ID, getStateLabel, IDebugService, INTERNAL_CONSOLE_OPTIONS_SCHEMA, LOADED_SCRIPTS_VIEW_ID, REPL_VIEW_ID, State, VARIABLES_VIEW_ID, VIEWLET_ID, WATCH_VIEW_ID } from 'vs/workbench/contrib/debug/common/debug'; import { BREAKPOINTS_VIEW_ID, BREAKPOINT_EDITOR_CONTRIBUTION_ID, CALLSTACK_VIEW_ID, CONTEXT_BREAKPOINTS_EXIST, CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED, CONTEXT_CALLSTACK_ITEM_TYPE, CONTEXT_CAN_VIEW_MEMORY, CONTEXT_DEBUGGERS_AVAILABLE, CONTEXT_DEBUG_STATE, CONTEXT_DEBUG_UX, CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_HAS_DEBUGGED, CONTEXT_IN_DEBUG_MODE, CONTEXT_JUMP_TO_CURSOR_SUPPORTED, CONTEXT_LOADED_SCRIPTS_SUPPORTED, CONTEXT_RESTART_FRAME_SUPPORTED, CONTEXT_SET_EXPRESSION_SUPPORTED, CONTEXT_SET_VARIABLE_SUPPORTED, CONTEXT_STACK_FRAME_SUPPORTS_RESTART, CONTEXT_STEP_INTO_TARGETS_SUPPORTED, CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED, CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT, CONTEXT_VARIABLE_IS_READONLY, CONTEXT_WATCH_ITEM_TYPE, DEBUG_PANEL_ID, DISASSEMBLY_VIEW_ID, EDITOR_CONTRIBUTION_ID, getStateLabel, IDebugService, INTERNAL_CONSOLE_OPTIONS_SCHEMA, LOADED_SCRIPTS_VIEW_ID, REPL_VIEW_ID, State, VARIABLES_VIEW_ID, VIEWLET_ID, WATCH_VIEW_ID } from 'vs/workbench/contrib/debug/common/debug'; import { DebugContentProvider } from 'vs/workbench/contrib/debug/common/debugContentProvider'; import { DebugLifecycle } from 'vs/workbench/contrib/debug/common/debugLifecycle'; import { DisassemblyViewInput } from 'vs/workbench/contrib/debug/common/disassemblyViewInput';"} {"_id":"doc-en-vscode-bba0e790d0529a232409346d61d36c43c4fb166f59745caa64d1ac9e683b4eaf","title":"","text":"helpEntries: [{ description: nls.localize('tasksQuickAccessHelp', \"Show All Debug Consoles\"), commandId: SELECT_DEBUG_CONSOLE_ID }] }); registerEditorContribution('editor.contrib.callStack', LazyCallStackEditorContribution, EditorContributionInstantiation.Eager); registerEditorContribution(BREAKPOINT_EDITOR_CONTRIBUTION_ID, LazyBreakpointEditorContribution, EditorContributionInstantiation.Eager); registerEditorContribution(EDITOR_CONTRIBUTION_ID, LazyDebugEditorContribution, EditorContributionInstantiation.Eager); registerEditorContribution('editor.contrib.callStack', CallStackEditorContribution, EditorContributionInstantiation.AfterFirstRender); registerEditorContribution(BREAKPOINT_EDITOR_CONTRIBUTION_ID, BreakpointEditorContribution, EditorContributionInstantiation.AfterFirstRender); registerEditorContribution(EDITOR_CONTRIBUTION_ID, DebugEditorContribution, EditorContributionInstantiation.BeforeFirstInteraction); const registerDebugCommandPaletteItem = (id: string, title: ICommandActionTitle, when?: ContextKeyExpression, precondition?: ContextKeyExpression) => { MenuRegistry.appendMenuItem(MenuId.CommandPalette, {"} {"_id":"doc-en-vscode-f877a4a543003f1ccfa4a66bc9514d7d09dc80d5a110324d31ee291a8886c801","title":"","text":"* Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as nls from 'vs/nls'; import * as strings from 'vs/base/common/strings'; import { addDisposableListener } from 'vs/base/browser/dom'; import { DomEmitter } from 'vs/base/browser/event'; import { IKeyboardEvent, StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { distinct, flatten } from 'vs/base/common/arrays'; import { RunOnceScheduler } from 'vs/base/common/async'; import * as env from 'vs/base/common/platform'; import { CancellationTokenSource } from 'vs/base/common/cancellation'; import { memoize } from 'vs/base/common/decorators'; import { onUnexpectedExternalError } from 'vs/base/common/errors'; import { Event } from 'vs/base/common/event'; import { visit } from 'vs/base/common/json'; import { setProperty } from 'vs/base/common/jsonEdit'; import { Constants } from 'vs/base/common/uint'; import { KeyCode } from 'vs/base/common/keyCodes'; import { IKeyboardEvent, StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { InlineValueContext } from 'vs/editor/common/languages'; import { StandardTokenType } from 'vs/editor/common/encodedTokenAttributes'; import { CancellationTokenSource } from 'vs/base/common/cancellation'; import { distinct, flatten } from 'vs/base/common/arrays'; import { onUnexpectedExternalError } from 'vs/base/common/errors'; import { DEFAULT_WORD_REGEXP } from 'vs/editor/common/core/wordHelper'; import { ICodeEditor, IEditorMouseEvent, MouseTargetType, IPartialEditorMouseEvent } from 'vs/editor/browser/editorBrowser'; import { Range } from 'vs/editor/common/core/range'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IDebugEditorContribution, IDebugService, State, IStackFrame, IDebugConfiguration, IExpression, IExceptionInfo, IDebugSession, CONTEXT_EXCEPTION_WIDGET_VISIBLE } from 'vs/workbench/contrib/debug/common/debug'; import { ExceptionWidget } from 'vs/workbench/contrib/debug/browser/exceptionWidget'; import { FloatingClickWidget } from 'vs/workbench/browser/codeeditor'; import { Position } from 'vs/editor/common/core/position'; import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import { basename } from 'vs/base/common/path'; import * as env from 'vs/base/common/platform'; import * as strings from 'vs/base/common/strings'; import { Constants } from 'vs/base/common/uint'; import { CoreEditingCommands } from 'vs/editor/browser/coreCommands'; import { memoize } from 'vs/base/common/decorators'; import { IEditorHoverOptions, EditorOption } from 'vs/editor/common/config/editorOptions'; import { DebugHoverWidget } from 'vs/workbench/contrib/debug/browser/debugHover'; import { IModelDeltaDecoration, InjectedTextCursorStops, ITextModel } from 'vs/editor/common/model'; import { Disposable, dispose, IDisposable } from 'vs/base/common/lifecycle'; import { ICodeEditor, IEditorMouseEvent, IPartialEditorMouseEvent, MouseTargetType } from 'vs/editor/browser/editorBrowser'; import { EditorOption, IEditorHoverOptions } from 'vs/editor/common/config/editorOptions'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { basename } from 'vs/base/common/path'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { DEFAULT_WORD_REGEXP } from 'vs/editor/common/core/wordHelper'; import { StandardTokenType } from 'vs/editor/common/encodedTokenAttributes'; import { InlineValueContext } from 'vs/editor/common/languages'; import { IModelDeltaDecoration, InjectedTextCursorStops, ITextModel } from 'vs/editor/common/model'; import { IFeatureDebounceInformation, ILanguageFeatureDebounceService } from 'vs/editor/common/services/languageFeatureDebounce'; import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeatures'; import { ModesHoverController } from 'vs/editor/contrib/hover/browser/hover'; import { HoverStartMode, HoverStartSource } from 'vs/editor/contrib/hover/browser/hoverOperation'; import { IHostService } from 'vs/workbench/services/host/browser/host'; import { Event } from 'vs/base/common/event'; import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity'; import * as nls from 'vs/nls'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { Expression } from 'vs/workbench/contrib/debug/common/debugModel'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { registerColor } from 'vs/platform/theme/common/colorRegistry'; import { addDisposableListener } from 'vs/base/browser/dom'; import { DomEmitter } from 'vs/base/browser/event'; import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeatures'; import { IFeatureDebounceInformation, ILanguageFeatureDebounceService } from 'vs/editor/common/services/languageFeatureDebounce'; import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity'; import { FloatingClickWidget } from 'vs/workbench/browser/codeeditor'; import { DebugHoverWidget } from 'vs/workbench/contrib/debug/browser/debugHover'; import { ExceptionWidget } from 'vs/workbench/contrib/debug/browser/exceptionWidget'; import { CONTEXT_EXCEPTION_WIDGET_VISIBLE, IDebugConfiguration, IDebugEditorContribution, IDebugService, IDebugSession, IExceptionInfo, IExpression, IStackFrame, State } from 'vs/workbench/contrib/debug/common/debug'; import { Expression } from 'vs/workbench/contrib/debug/common/debugModel'; import { IHostService } from 'vs/workbench/services/host/browser/host'; const MAX_NUM_INLINE_VALUES = 100; // JS Global scope can have 700+ entries. We want to limit ourselves for perf reasons const MAX_INLINE_DECORATOR_LENGTH = 150; // Max string length of each inline decorator when debugging. If exceeded ... is added"} {"_id":"doc-en-vscode-26ffef3700679b9383f88f57e08e1dee7c16f7d1fa065e721e372253c734165d","title":"","text":"return result; } export class LazyDebugEditorContribution extends Disposable implements IDebugEditorContribution { private _contrib: IDebugEditorContribution | undefined; constructor(editor: ICodeEditor, @IInstantiationService instantiationService: IInstantiationService) { super(); const listener = editor.onDidChangeModel(() => { if (editor.hasModel()) { listener.dispose(); this._contrib = this._register(instantiationService.createInstance(DebugEditorContribution, editor)); } }); } showHover(position: Position, focus: boolean): Promise { return this._contrib ? this._contrib.showHover(position, focus) : Promise.resolve(); } addLaunchConfiguration(): Promise { return this._contrib ? this._contrib.addLaunchConfiguration() : Promise.resolve(); } closeExceptionWidget(): void { this._contrib?.closeExceptionWidget(); } } export class DebugEditorContribution implements IDebugEditorContribution { private toDispose: IDisposable[];"} {"_id":"doc-en-vscode-f6e3f95c1f356706bb7380e83ccae963f48c6175ce07f921352c1b42a73006b7","title":"","text":"import { EventEmitter } from 'events'; import * as iconv from '@vscode/iconv-lite-umd'; import * as filetype from 'file-type'; import { assign, groupBy, IDisposable, toDisposable, dispose, mkdirp, readBytes, detectUnicodeEncoding, Encoding, onceEvent, splitInChunks, Limiter, Versions, isWindows } from './util'; import { assign, groupBy, IDisposable, toDisposable, dispose, mkdirp, readBytes, detectUnicodeEncoding, Encoding, onceEvent, splitInChunks, Limiter, Versions, isWindows, pathEquals } from './util'; import { CancellationError, CancellationToken, ConfigurationChangeEvent, LogOutputChannel, Progress, Uri, workspace } from 'vscode'; import { detectEncoding } from './encoding'; import { Ref, RefType, Branch, Remote, ForcePushMode, GitErrorCodes, LogOptions, Change, Status, CommitOptions, RefQuery } from './api/git';"} {"_id":"doc-en-vscode-2db8fb1ef5f87085e22f16cdd940970cfefdb8bd6bdcd8e764fc6d257a6f69dc","title":"","text":"), ); if (networkPath !== undefined) { // If the repository is at the root of the mapped drive then we // have to append `` (ex: D:) otherwise the path is not valid. const isDriveRoot = pathEquals(repoUri.fsPath, networkPath); return path.normalize( repoUri.fsPath.replace( networkPath, `${letter.toLowerCase()}:${networkPath.endsWith('') ? '' : ''}` `${letter.toLowerCase()}:${isDriveRoot || networkPath.endsWith('') ? '' : ''}` ), ); }"} {"_id":"doc-en-vscode-f916e54019c8f3075bdc40b158f161a163ba75e2d0ee04dca75d81699943ea13","title":"","text":".quick-input-titlebar { display: flex; align-items: center; border-top-left-radius: 5px; /* match border radius of quick input widget */ border-top-right-radius: 5px; } .quick-input-left-action-bar {"} {"_id":"doc-en-vscode-d36e4b1a7ead772623e97e58675b464535cd471188a2ef23e0367ed6769dc9e3","title":"","text":".quick-input-header { display: flex; padding: 8px 6px 0px 6px; margin-bottom: -2px; padding: 8px 6px 6px 6px; } .quick-input-widget.hidden-input .quick-input-header {"} {"_id":"doc-en-vscode-f7534d15aad921a2b48cbde11f4e56d2cfcfd4d85ed24d382fa3f4657fedde9f","title":"","text":".quick-input-list { line-height: 22px; margin-top: 6px; padding: 1px; } .quick-input-widget.hidden-input .quick-input-list {"} {"_id":"doc-en-vscode-fd6a17e38c0229fc578f32676a79efd7fdfe41b23162a403fc5d284015338e4e","title":"","text":"const message = dom.append(extraContainer, $(`#${this.idPrefix}message.quick-input-message`)); const progressBar = new ProgressBar(container, this.styles.progressBar); progressBar.getContainer().classList.add('quick-input-progress'); const list = this._register(new QuickInputList(container, this.idPrefix + 'list', this.options)); this._register(list.onChangedAllVisibleChecked(checked => { checkAll.checked = checked;"} {"_id":"doc-en-vscode-4b0aa7b6335e1d349e4706a6b46d88937dc21cf94c4413b7eeabd4f11e034f85","title":"","text":"} })); const progressBar = new ProgressBar(container, this.styles.progressBar); progressBar.getContainer().classList.add('quick-input-progress'); const focusTracker = dom.trackFocus(container); this._register(focusTracker); this._register(dom.addDisposableListener(container, dom.EventType.FOCUS, e => {"} {"_id":"doc-en-vscode-f052e13ebf65e00b97240a6bd38fe94cc9305267a89b44447494d4d35ec828fd","title":"","text":"class GitHubGistProfileContentHandler implements vscode.ProfileContentHandler { readonly name = vscode.l10n.t('GitHub'); readonly description = vscode.l10n.t('gist'); private _octokit: Promise | undefined; private getOctokit(): Promise {"} {"_id":"doc-en-vscode-62b3d18304d85150c41055099c59a916994daa3aa301101cfe206feef3ee4750","title":"","text":"this.proxy = context.getProxy(ExtHostContext.ExtHostProfileContentHandlers); } async $registerProfileContentHandler(id: string, name: string, extensionId: string): Promise { async $registerProfileContentHandler(id: string, name: string, description: string | undefined, extensionId: string): Promise { this.registeredHandlers.set(id, this.userDataProfileImportExportService.registerProfileContentHandler(id, { name, description, extensionId, saveProfile: async (name: string, content: string, token: CancellationToken) => { const result = await this.proxy.$saveProfile(id, name, content, token);"} {"_id":"doc-en-vscode-7d5486742b84c6cf7d9dab530700e8c415ee94c0ac6605f0411a7ab909b5b046","title":"","text":"} export interface MainThreadProfileContentHandlersShape { $registerProfileContentHandler(id: string, name: string, extensionId: string): Promise; $registerProfileContentHandler(id: string, name: string, description: string | undefined, extensionId: string): Promise; $unregisterProfileContentHandler(id: string): Promise; }"} {"_id":"doc-en-vscode-22f844f38080cc34c8523d379623e08ac728c097874798e6c89f743dcabdafc7","title":"","text":"} this.handlers.set(id, handler); this.proxy.$registerProfileContentHandler(id, handler.name, extension.identifier.value); this.proxy.$registerProfileContentHandler(id, handler.name, handler.description, extension.identifier.value); return toDisposable(() => { this.handlers.delete(id);"} {"_id":"doc-en-vscode-5db0443021811f811583757a4b10d72af597148b6944f524251fca5194c3254d","title":"","text":"if (this.profileContentHandlers.size === 1) { return this.profileContentHandlers.values().next().value; } const linkHandlers: { id: string; label: string }[] = []; const fileHandlers: { id: string; label: string }[] = []; for (const [id, profileContentHandler] of this.profileContentHandlers) { if (profileContentHandler.extensionId) { linkHandlers.push({ id, label: profileContentHandler.name }); } else { fileHandlers.push({ id, label: profileContentHandler.name }); } } const options: QuickPickItem[] = []; if (linkHandlers.length) { options.push({ label: localize('link', \"link\"), type: 'separator' }); options.push(...linkHandlers); } if (fileHandlers.length) { options.push({ label: localize('file', \"file\"), type: 'separator' }); options.push(...fileHandlers); for (const [id, profileContentHandler] of this.profileContentHandlers) { options.push({ id, label: profileContentHandler.name, description: profileContentHandler.description }); } const result = await this.quickInputService.pick(options, const result = await this.quickInputService.pick(options.reverse(), { title: localize('select profile content handler', \"Export '{0}' profile as...\", name), hideInput: true"} {"_id":"doc-en-vscode-6ad0d7bead61ba79bcb0e04788a0d9ecc8f921c557b0d1701f2c4c4315b5c273","title":"","text":"class FileUserDataProfileContentHandler implements IUserDataProfileContentHandler { readonly name = localize('local', \"Local\"); readonly description = localize('file', \"file\"); constructor( @IFileDialogService private readonly fileDialogService: IFileDialogService,"} {"_id":"doc-en-vscode-613e749f9e3a8f97432ab8108b54700d023cad008bbd76fdf29bd2f4832f7427","title":"","text":"export interface IUserDataProfileContentHandler { readonly name: string; readonly description?: string; readonly extensionId?: string; saveProfile(name: string, content: string, token: CancellationToken): Promise; readProfile(idOrUri: string | URI, token: CancellationToken): Promise;"} {"_id":"doc-en-vscode-ee4dc25324e428bc4b429443755587b117bff2b8f1d577829536afc967d675fd","title":"","text":"export interface ProfileContentHandler { readonly name: string; readonly description?: string; saveProfile(name: string, content: string, token: CancellationToken): Thenable<{ readonly id: string; readonly link: Uri } | null>; readProfile(idOrUri: string | Uri, token: CancellationToken): Thenable; }"} {"_id":"doc-en-vscode-bac0c21232dbd4cac4ac33160f9313b7b3f87ca6273edb26b446dba651bcfd9f","title":"","text":"static updateKernelStatusAction(notebook: NotebookTextModel, action: IAction, notebookKernelService: INotebookKernelService, scopedContextKeyService?: IContextKeyService) { const detectionTasks = notebookKernelService.getKernelDetectionTasks(notebook); if (detectionTasks.length) { const info = notebookKernelService.getMatchingKernel(notebook); action.enabled = true; action.label = localize('kernels.detecting', \"Detecting Kernels\"); action.class = ThemeIcon.asClassName(ThemeIcon.modify(executingStateIcon, 'spin')); if (info.selected) { action.label = info.selected.label; const kernelInfo = info.selected.description ?? info.selected.detail; action.tooltip = kernelInfo ? localize('kernels.selectedKernelAndKernelDetectionRunning', \"Selected Kernel: {0} (Kernel Detection Tasks Running)\", kernelInfo) : localize('kernels.detecting', \"Detecting Kernels\"); } else { action.label = localize('kernels.detecting', \"Detecting Kernels\"); } return; }"} {"_id":"doc-en-vscode-092ff5ba0135951ac92df5a834878be4f6691a9d29d4c88e66dcab3167147240","title":"","text":"static updateKernelStatusAction(notebook: NotebookTextModel, action: IAction, notebookKernelService: INotebookKernelService) { const detectionTasks = notebookKernelService.getKernelDetectionTasks(notebook); if (detectionTasks.length) { const info = notebookKernelService.getMatchingKernel(notebook); action.enabled = true; action.label = localize('kernels.detecting', \"Detecting Kernels\"); action.class = ThemeIcon.asClassName(ThemeIcon.modify(executingStateIcon, 'spin')); if (info.selected) { action.label = info.selected.label; const kernelInfo = info.selected.description ?? info.selected.detail; action.tooltip = kernelInfo ? localize('kernels.selectedKernelAndKernelDetectionRunning', \"Selected Kernel: {0} (Kernel Detection Tasks Running)\", kernelInfo) : localize('kernels.detecting', \"Detecting Kernels\"); } else { action.label = localize('kernels.detecting', \"Detecting Kernels\"); } return; }"} {"_id":"doc-en-vscode-6c33e1fb746c5fb7f96bf00a77f1861a19bdfd47e6a6ace29b05003810dfeab9","title":"","text":"protected readonly _commandService: ICommandService ) { } async showQuickPick(editor: IActiveNotebookEditor, wantedId?: string): Promise { async showQuickPick(editor: IActiveNotebookEditor, wantedId?: string, skipAutoRun?: boolean): Promise { const notebook = editor.textModel; const scopedContextKeyService = editor.scopedContextKeyService; const matchResult = this._getMatchingResult(notebook);"} {"_id":"doc-en-vscode-857e0d45ad4e5cc81d2d1fb4bd7f04f80dd22814f9218291b62b3a4d1f771d39","title":"","text":"const quickPick = this._quickInputService.createQuickPick(); const quickPickItems = this._getKernelPickerQuickPickItems(notebook, matchResult, this._notebookKernelService, scopedContextKeyService); if (quickPickItems.length === 1 && supportAutoRun(quickPickItems[0])) { return await this._handleQuickPick(editor, quickPickItems[0]); if (quickPickItems.length === 1 && supportAutoRun(quickPickItems[0]) && !skipAutoRun) { return await this._handleQuickPick(editor, quickPickItems[0], quickPickItems as KernelQuickPickItem[]); } quickPick.items = quickPickItems;"} {"_id":"doc-en-vscode-11e0fd08eae939a3cca8af554866eff3124cf590e06c31869d1b82cc1e3480c6","title":"","text":"quickPick.activeItems = activeItems; }, this); const pick = await new Promise((resolve, reject) => { const pick = await new Promise<{ selected: KernelQuickPickItem | undefined; items: KernelQuickPickItem[] }>((resolve, reject) => { quickPick.onDidAccept(() => { const item = quickPick.selectedItems[0]; if (item) { resolve(item); resolve({ selected: item, items: quickPick.items as KernelQuickPickItem[] }); } else { resolve(undefined); resolve({ selected: undefined, items: quickPick.items as KernelQuickPickItem[] }); } quickPick.hide();"} {"_id":"doc-en-vscode-f64bfce03ac17f4aea2caa279dfba1b41474e9a502c4ddb6cc5a24f69823b716","title":"","text":"kernelDetectionTaskListener.dispose(); kernelChangeEventListener.dispose(); quickPick.dispose(); resolve(undefined); resolve({ selected: undefined, items: quickPick.items as KernelQuickPickItem[] }); }); quickPick.show(); }); if (pick) { return await this._handleQuickPick(editor, pick); if (pick.selected) { return await this._handleQuickPick(editor, pick.selected, pick.items); } return false;"} {"_id":"doc-en-vscode-89a76471e3e1e2dd8843f5e018ba1a519a01da86f872633f34a38902ee590e7c","title":"","text":"scopedContextKeyService: IContextKeyService ): QuickPickInput[]; protected async _handleQuickPick(editor: IActiveNotebookEditor, pick: KernelQuickPickItem) { protected async _handleQuickPick(editor: IActiveNotebookEditor, pick: KernelQuickPickItem, quickPickItems: KernelQuickPickItem[]): Promise { if (isKernelPick(pick)) { const newKernel = pick.kernel; this._selecteKernel(editor.textModel, newKernel);"} {"_id":"doc-en-vscode-daed1851a4459397dc2ab09d8d7dd1f0a55b658a3042e8de35f95e4bece45d89","title":"","text":"}; } protected override async _handleQuickPick(editor: IActiveNotebookEditor, pick: KernelQuickPickItem): Promise { protected override async _handleQuickPick(editor: IActiveNotebookEditor, pick: KernelQuickPickItem, items: KernelQuickPickItem[]): Promise { if (pick.id === 'selectAnother') { return this.displaySelectAnotherQuickPick(editor); return this.displaySelectAnotherQuickPick(editor, items.length === 1 && items[0] === pick); } return super._handleQuickPick(editor, pick); return super._handleQuickPick(editor, pick, items); } private async displaySelectAnotherQuickPick(editor: IActiveNotebookEditor) { private async displaySelectAnotherQuickPick(editor: IActiveNotebookEditor, kernelListEmpty: boolean) { const notebook: NotebookTextModel = editor.textModel; const disposables = new DisposableStore(); return new Promise(resolve => { // select from kernel sources const quickPick = this._quickInputService.createQuickPick(); quickPick.title = localize('selectAnotherKernel', \"Select Another Kernel\"); quickPick.title = kernelListEmpty ? localize('select', \"Select Kernel\") : localize('selectAnotherKernel', \"Select Another Kernel\"); quickPick.busy = true; quickPick.buttons = [this._quickInputService.backButton]; quickPick.show();"} {"_id":"doc-en-vscode-70b5b84770c61e14336f9e58266c1e2575e856a8893c1ca8020e88b1ad3a3dab","title":"","text":"disposables.add(quickPick.onDidTriggerButton(button => { if (button === this._quickInputService.backButton) { quickPick.hide(); resolve(this.showQuickPick(editor)); resolve(this.showQuickPick(editor, undefined, true)); } })); disposables.add(quickPick.onDidAccept(async () => {"} {"_id":"doc-en-vscode-6dbf305db594f7f294b2963b1ded459762b2873d5c2b4d003b838814853d9382","title":"","text":"} resolve(true); } else { return resolve(this.displaySelectAnotherQuickPick(editor)); return resolve(this.displaySelectAnotherQuickPick(editor, false)); } } else if (isKernelPick(quickPick.selectedItems[0])) { await this._selecteKernel(notebook, quickPick.selectedItems[0].kernel);"} {"_id":"doc-en-vscode-2409984ea30b81a42046e360c7af45ec220c19433a344e8d1a91ccdd8992dba6","title":"","text":"const allRepositoriesLabel = l10n.t('All Repositories'); const allRepositoriesQuickPickItem: QuickPickItem = { label: allRepositoriesLabel }; const repositoriesQuickPickItems: QuickPickItem[] = Array.from(this.model.unsafeRepositories.values()).sort().map(r => new UnsafeRepositoryItem(r)); const repositoriesQuickPickItems: QuickPickItem[] = Array.from(this.model.unsafeRepositories.keys()).sort().map(r => new UnsafeRepositoryItem(r)); quickpick.items = this.model.unsafeRepositories.size === 1 ? [...repositoriesQuickPickItems] : [...repositoriesQuickPickItems, { label: '', kind: QuickPickItemKind.Separator }, allRepositoriesQuickPickItem];"} {"_id":"doc-en-vscode-5bdfa6134661896d059f294e319772fee5773a5fa777a498826971097f6231cd","title":"","text":"if (repositoryItem.label === allRepositoriesLabel) { // All Repositories unsafeRepositories.push(...this.model.unsafeRepositories.values()); unsafeRepositories.push(...this.model.unsafeRepositories.keys()); } else { // One Repository unsafeRepositories.push((repositoryItem as UnsafeRepositoryItem).path);"} {"_id":"doc-en-vscode-834e25bc80afb6cb3810e197b84530b693a40fd90994c07338ba78e914a8baae","title":"","text":"for (const unsafeRepository of unsafeRepositories) { // Mark as Safe await this.git.addSafeDirectory(unsafeRepository); await this.git.addSafeDirectory(this.model.unsafeRepositories.get(unsafeRepository)!); // Open Repository await this.model.openRepository(unsafeRepository);"} {"_id":"doc-en-vscode-70c32ab2e1b14d7511e47b36a3ecb7c0e6243fbcf04d61b796fe293770051d4d","title":"","text":"} async addSafeDirectory(repositoryPath: string): Promise { // safe.directory only supports paths with `/` as separator repositoryPath = repositoryPath.replaceAll('', '/'); await this.exec(repositoryPath, ['config', '--global', '--add', 'safe.directory', repositoryPath]); return; }"} {"_id":"doc-en-vscode-5844416cdb3a37d630a86982ba81a19e7f8a74ae799f2c8a601816b97af89076","title":"","text":"constructor(public readonly repository: Repository, public readonly index: number) { } } class UnsafeRepositorySet extends Set { /** * Key - normalized path used in user interface * Value - path extracted from the output of the `git status` command * used when calling `git config --global --add safe.directory` */ class UnsafeRepositoryMap extends Map { constructor() { super(); this.updateContextKey(); } override add(value: string): this { const result = super.add(value); override set(key: string, value: string): this { const result = super.set(key, value); this.updateContextKey(); return result; } override delete(value: string): boolean { const result = super.delete(value); override delete(key: string): boolean { const result = super.delete(key); this.updateContextKey(); return result;"} {"_id":"doc-en-vscode-4ae6f242918a47f5454d517e3b26809d450b9dffde405c5b718cebaa891bff84","title":"","text":"private showRepoOnHomeDriveRootWarning = true; private pushErrorHandlers = new Set(); private _unsafeRepositories = new UnsafeRepositorySet(); get unsafeRepositories(): Set { private _unsafeRepositories = new UnsafeRepositoryMap(); get unsafeRepositories(): Map { return this._unsafeRepositories; }"} {"_id":"doc-en-vscode-c897d74a4d7d935eec01ae1d9e1165591170364c6c9e87ccdd1bb333bda3f095","title":"","text":"repository.status(); // do not await this, we want SCM to know about the repo asap } catch (ex) { // Handle unsafe repository const match = /^fatal: detected dubious ownership in repository at '([^']+)'$/m.exec(ex.stderr); if (match && match.length === 2) { const match = /^fatal: detected dubious ownership in repository at '([^']+)'[sS]*git config --global --add safe.directory '?([^'n]+)'?$/m.exec(ex.stderr); if (match && match.length === 3) { const unsafeRepositoryPath = path.normalize(match[1]); this.logger.trace(`Unsafe repository: ${unsafeRepositoryPath}`);"} {"_id":"doc-en-vscode-b5f606dc3c79be416c63d0cf706482728a9d7cf7b731fb4715f7c228104529d2","title":"","text":"this.showUnsafeRepositoryNotification(); } this._unsafeRepositories.add(unsafeRepositoryPath); this._unsafeRepositories.set(unsafeRepositoryPath, match[2]); return; }"} {"_id":"doc-en-vscode-20bd41d1fabcffef8025a941b97be3d9ceccfdbd93645eee634a7766039180cc","title":"","text":"registerSimpleEditorSettingMigration('autoIndent', [[false, 'advanced'], [true, 'full']]); registerSimpleEditorSettingMigration('matchBrackets', [[true, 'always'], [false, 'never']]); registerSimpleEditorSettingMigration('renderFinalNewline', [[true, 'on'], [false, 'off']]); registerSimpleEditorSettingMigration('cursorSmoothCaretAnimation', [[true, 'on'], [false, 'off']]); registerEditorSettingMigration('autoClosingBrackets', (value, read, write) => { if (value === false) {"} {"_id":"doc-en-vscode-c2bcbeebfbf9eba9f4a2add54c9e06d723f1e4ae57e86bbff59a4824f1ad7094","title":"","text":"private _readOnly: boolean; private _cursorBlinking: TextEditorCursorBlinkingStyle; private _cursorStyle: TextEditorCursorStyle; private _cursorSmoothCaretAnimation: boolean; private _cursorSmoothCaretAnimation: 'off' | 'explicit' | 'on'; private _selectionIsEmpty: boolean; private _isComposingInput: boolean;"} {"_id":"doc-en-vscode-9189211df9da4d00a89ebb13af92a7b7680b37c4d1fe83debfa9c57335382037","title":"","text":"private _onCursorPositionChanged(position: Position, secondaryPositions: Position[], reason: CursorChangeReason): void { const pauseAnimation = ( this._secondaryCursors.length !== secondaryPositions.length || reason !== CursorChangeReason.Explicit || (this._cursorSmoothCaretAnimation === 'explicit' && reason !== CursorChangeReason.Explicit) ); this._primaryCursor.onCursorPositionChanged(position, pauseAnimation); this._updateBlinking();"} {"_id":"doc-en-vscode-cb1b935465490cc4b04b9e3f0a63880fca3beef67c4a3bc91735ac70a73af19e","title":"","text":"_cursorBlinkingStyleFromString, { description: nls.localize('cursorBlinking', \"Control the cursor animation style.\") } )), cursorSmoothCaretAnimation: register(new EditorBooleanOption( EditorOption.cursorSmoothCaretAnimation, 'cursorSmoothCaretAnimation', false, { description: nls.localize('cursorSmoothCaretAnimation', \"Controls whether the smooth caret animation should be enabled.\") } cursorSmoothCaretAnimation: register(new EditorStringEnumOption( EditorOption.cursorSmoothCaretAnimation, 'cursorSmoothCaretAnimation', 'off' as 'off' | 'explicit' | 'on', ['off', 'explicit', 'on'] as const, { enumDescriptions: [ nls.localize('cursorSmoothCaretAnimation.off', \"Smooth caret animation is disabled.\"), nls.localize('cursorSmoothCaretAnimation.explicit', \"Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture.\"), nls.localize('cursorSmoothCaretAnimation.on', \"Smooth caret animation is always enabled.\") ], description: nls.localize('cursorSmoothCaretAnimation', \"Controls whether the smooth caret animation should be enabled.\") } )), cursorStyle: register(new EditorEnumOption( EditorOption.cursorStyle, 'cursorStyle',"} {"_id":"doc-en-vscode-f47f0ce2e098cde92a5790df62d1e7875c78e383ae1ad72bab31da896a213610","title":"","text":"mouseStyle?: 'text' | 'default' | 'copy'; /** * Enable smooth caret animation. * Defaults to false. * Defaults to 'off'. */ cursorSmoothCaretAnimation?: boolean; cursorSmoothCaretAnimation?: 'off' | 'explicit' | 'on'; /** * Control the cursor style, either 'block' or 'line'. * Defaults to 'line'."} {"_id":"doc-en-vscode-7eb8f2be72e4c58657a86a53395eba3a2b28e3b5715ba90ab3bef696e39ce67f","title":"","text":"contextmenu: IEditorOption; copyWithSyntaxHighlighting: IEditorOption; cursorBlinking: IEditorOption; cursorSmoothCaretAnimation: IEditorOption; cursorSmoothCaretAnimation: IEditorOption; cursorStyle: IEditorOption; cursorSurroundingLines: IEditorOption; cursorSurroundingLinesStyle: IEditorOption;"} {"_id":"doc-en-vscode-9c965be5584133f0fe3f42751de13d6bca2559fb5fac5ab835de78ace1af587b","title":"","text":"} private get profilesVisibilityPreference(): boolean { return this.userDataProfilesService.isEnabled() && this.storageService.getBoolean(ProfilesActivityActionViewItem.PROFILES_VISIBILITY_PREFERENCE_KEY, StorageScope.PROFILE, this.userDataProfilesService.profiles.length > 1); return this.userDataProfilesService.isEnabled() && this.storageService.getBoolean(ProfilesActivityActionViewItem.PROFILES_VISIBILITY_PREFERENCE_KEY, StorageScope.PROFILE, true); } private set profilesVisibilityPreference(value: boolean) {"} {"_id":"doc-en-vscode-704b0b9d5bda958d023d458b0c89b626cb96e14cbd6013dc4949e37112c6b517","title":"","text":"import { ContextKeyExpr, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IProductService } from 'vs/platform/product/common/productService'; import { Registry } from 'vs/platform/registry/common/platform'; import { IUserDataProfilesService, PROFILES_ENABLEMENT_CONFIG } from 'vs/platform/userDataProfile/common/userDataProfile'; import { IUserDataProfile, IUserDataProfilesService, PROFILES_ENABLEMENT_CONFIG } from 'vs/platform/userDataProfile/common/userDataProfile'; import { workbenchConfigurationNodeBase } from 'vs/workbench/common/configuration'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { RenameProfileAction } from 'vs/workbench/contrib/userDataProfile/browser/userDataProfileActions';"} {"_id":"doc-en-vscode-961587ed59450908f96159f1c0a297092391206aee8fd66f82120dd509efae82","title":"","text":"import { CancellationToken } from 'vs/base/common/cancellation'; import { URI } from 'vs/base/common/uri'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IWorkspaceTagsService } from 'vs/workbench/contrib/tags/common/workspaceTags'; import { getErrorMessage } from 'vs/base/common/errors'; const SelectProfileSubMenu = new MenuId('SelectProfile'); export class UserDataProfilesWorkbenchContribution extends Disposable implements IWorkbenchContribution { private readonly currentProfileContext: IContextKey;"} {"_id":"doc-en-vscode-64bfaea5d881964daaf6d78f0ba99866f4c4ebf7180bc3c9308fc694d3ceab39","title":"","text":"private registerActions(): void { this.registerManageProfilesSubMenu(); this.registerSelectProfileSubMenu(); this.registerProfilesActions(); this._register(this.userDataProfilesService.onDidChangeProfiles(() => this.registerProfilesActions())); this.registerCurrentProfilesActions(); this._register(Event.any(this.userDataProfileService.onDidChangeCurrentProfile, this.userDataProfileService.onDidUpdateCurrentProfile)(() => this.registerCurrentProfilesActions())); } private registerManageProfilesSubMenu(): void { MenuRegistry.appendMenuItem(MenuId.GlobalActivity, { title: PROFILES_TTILE, submenu: ManageProfilesSubMenu, group: '5_settings', when: PROFILES_ENABLEMENT_CONTEXT, order: 1 }); MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, { title: PROFILES_TTILE, submenu: ManageProfilesSubMenu,"} {"_id":"doc-en-vscode-b52a6007b337fad4c64ca64f66a3d1296984db5dc5d04182c49d6de24cc55fd1","title":"","text":"when: PROFILES_ENABLEMENT_CONTEXT, order: 1 }); MenuRegistry.appendMenuItem(MenuId.AccountsContext, { title: PROFILES_TTILE, submenu: ManageProfilesSubMenu, group: '1_settings', } private registerSelectProfileSubMenu(): IDisposable { const that = this; return MenuRegistry.appendMenuItem(ManageProfilesSubMenu, { get title() { return localize('profile', \"Profile ({0})\", that.userDataProfileService.currentProfile.name); }, submenu: SelectProfileSubMenu, group: '0_profiles', when: PROFILES_ENABLEMENT_CONTEXT, }); } private readonly currentprofileActionsDisposable = this._register(new MutableDisposable()); private registerCurrentProfilesActions(): void { this.currentprofileActionsDisposable.value = new DisposableStore(); this.currentprofileActionsDisposable.value.add(this.registerSwitchProfileForCurrentWindowAction()); this.currentprofileActionsDisposable.value.add(this.registerUpdateCurrentProfileShortNameAction()); this.currentprofileActionsDisposable.value.add(this.registerRenameCurrentProfileAction()); this.currentprofileActionsDisposable.value.add(this.registerExportCurrentProfileAction()); this.currentprofileActionsDisposable.value.add(this.registerImportProfileAction()); private readonly profilesDisposable = this._register(new MutableDisposable()); private registerProfilesActions(): void { this.profilesDisposable.value = new DisposableStore(); for (const profile of this.userDataProfilesService.profiles) { this.profilesDisposable.value.add(this.registerProfileEntryAction(profile)); } } private registerSwitchProfileForCurrentWindowAction(): IDisposable { private registerProfileEntryAction(profile: IUserDataProfile): IDisposable { const that = this; return registerAction2(class SwitchProfileForCurrentWindowAction extends Action2 { return registerAction2(class ProfileEntryAction extends Action2 { constructor() { super({ id: 'workbench.profiles.actions.switchProfile', title: { value: localize('switch profile for current', \"Switch Profile ({0})...\", that.userDataProfileService.currentProfile.name), original: `Switch Profile (${that.workspaceContextService.getWorkbenchState() === WorkbenchState.EMPTY ? localize('window', \"Window\") : localize('current workspace', \"Workspace\")})...` }, category: PROFILES_CATEGORY, f1: true, precondition: ContextKeyExpr.and(PROFILES_ENABLEMENT_CONTEXT, HAS_PROFILES_CONTEXT), id: `workbench.profiles.actions.profileEntry.${profile.id}`, title: profile.name, toggled: ContextKeyExpr.equals(CURRENT_PROFILE_CONTEXT.key, profile.id), menu: [ { id: ManageProfilesSubMenu, id: SelectProfileSubMenu, group: '0_profiles', when: PROFILES_ENABLEMENT_CONTEXT, }"} {"_id":"doc-en-vscode-2e1044128f9cac77aad1dad7011daf92762b5e71f827bba17a691964bc1d0ee9","title":"","text":"}); } async run(accessor: ServicesAccessor) { const quickInputService = accessor.get(IQuickInputService); const currentProfile = that.userDataProfileService.currentProfile; const result = await quickInputService.pick(that.userDataProfilesService.profiles.map(profile => ({ id: profile.id, label: currentProfile.id === profile.id ? `$(check) ${profile.name}` : profile.name, profile })), { placeHolder: localize('switch profile', \"Switch Profile\") }); if (result?.profile) { that.userDataProfileManagementService.switchProfile(result?.profile); if (that.userDataProfileService.currentProfile.id !== profile.id) { return that.userDataProfileManagementService.switchProfile(profile); } } }); } private readonly currentprofileActionsDisposable = this._register(new MutableDisposable()); private registerCurrentProfilesActions(): void { this.currentprofileActionsDisposable.value = new DisposableStore(); this.currentprofileActionsDisposable.value.add(this.registerUpdateCurrentProfileShortNameAction()); this.currentprofileActionsDisposable.value.add(this.registerRenameCurrentProfileAction()); this.currentprofileActionsDisposable.value.add(this.registerExportCurrentProfileAction()); this.currentprofileActionsDisposable.value.add(this.registerImportProfileAction()); } private registerUpdateCurrentProfileShortNameAction(): IDisposable { const that = this; return registerAction2(class UpdateCurrentProfileShortName extends Action2 {"} {"_id":"doc-en-vscode-54eb14f9ef774eb0c67e2599ac12d8ff4e8d04edbaa1e8017e8fe59440144d1a","title":"","text":"\"tab.unfocusedHoverBackground\": \"#6e76811a\", \"terminal.foreground\": \"#ffffffc5\", \"terminal.inactiveSelectionBackground\": \"#E5EBF1\", \"textBlockQuote.background\": \"#010409\", \"textBlockQuote.background\": \"#f8f8f8\", \"textBlockQuote.border\": \"#0000001a\", \"textCodeBlock.background\": \"#6e768166\", \"textLink.activeForeground\": \"#005FB8\","} {"_id":"doc-en-vscode-8faf338f4a81a960b407ee88cbb4e218239bd85b220a7aa0e7487fc1714fcfd9","title":"","text":"\"editor.background\": \"#1f1f1f\", \"editor.findMatchBackground\": \"#9e6a03\", \"editor.foreground\": \"#ffffffd3\", \"editorCursor.foreground\": \"#0078d4\", \"editorGroup.border\": \"#ffffff17\", \"editorGroupHeader.tabsBackground\": \"#181818\", \"editorGroupHeader.tabsBorder\": \"#ffffff15\","} {"_id":"doc-en-vscode-d2c151e267c4388031532b2dc0a395dac62ecca29573a0989cb667124c798c7f","title":"","text":"\"editor.foreground\": \"#000000e4\", \"editor.inactiveSelectionBackground\": \"#E5EBF1\", \"editor.selectionHighlightBackground\": \"#ADD6FF80\", \"editorCursor.foreground\": \"#005FB8\", \"editorGroup.border\": \"#0000001a\", \"editorGroupHeader.tabsBackground\": \"#f8f8f8\", \"editorGroupHeader.tabsBorder\": \"#0000001a\","} {"_id":"doc-en-vscode-326387404dfad283b7d9333637919ea6ab24d02e4ab7465fa5b221eab7a8803d","title":"","text":"super(); } private _activeProvideLinkRequests: Map> = new Map(); async provideLinks(bufferLineNumber: number, callback: (links: ILink[] | undefined) => void) { this._activeLinks?.forEach(l => l.dispose()); this._activeLinks = await this._provideLinks(bufferLineNumber); let activeRequest = this._activeProvideLinkRequests.get(bufferLineNumber); if (activeRequest) { await activeRequest; callback(this._activeLinks); return; } if (this._activeLinks) { for (const link of this._activeLinks) { link.dispose(); } } activeRequest = this._provideLinks(bufferLineNumber); this._activeProvideLinkRequests.set(bufferLineNumber, activeRequest); this._activeLinks = await activeRequest; this._activeProvideLinkRequests.delete(bufferLineNumber); callback(this._activeLinks); }"} {"_id":"doc-en-vscode-9404922018a2ca17be2bfb8c47c23586d803000fd1ef9711311a7846a636e980","title":"","text":"\"vscode-proxy-agent\": \"^0.12.0\", \"vscode-regexpp\": \"^3.1.0\", \"vscode-textmate\": \"8.0.0\", \"xterm\": \"5.1.0-beta.87\", \"xterm-addon-canvas\": \"0.3.0-beta.35\", \"xterm\": \"5.2.0-beta.2\", \"xterm-addon-canvas\": \"0.4.0-beta.1\", \"xterm-addon-search\": \"0.11.0-beta.7\", \"xterm-addon-serialize\": \"0.9.0-beta.3\", \"xterm-addon-serialize\": \"0.9.0\", \"xterm-addon-unicode11\": \"0.5.0-beta.5\", \"xterm-addon-webgl\": \"0.14.0-beta.50\", \"xterm-headless\": \"5.1.0-beta.87\", \"xterm-addon-webgl\": \"0.15.0-beta.1\", \"xterm-headless\": \"5.2.0-beta.2\", \"yauzl\": \"^2.9.2\", \"yazl\": \"^2.4.3\" },"} {"_id":"doc-en-vscode-68196f2587fde12b3e15fc1eef47525a37bdb246113cee2ebfbd1ec1a244b2f8","title":"","text":"\"tas-client-umd\": \"0.1.6\", \"vscode-oniguruma\": \"1.7.0\", \"vscode-textmate\": \"8.0.0\", \"xterm\": \"5.1.0-beta.87\", \"xterm-addon-canvas\": \"0.3.0-beta.35\", \"xterm\": \"5.2.0-beta.2\", \"xterm-addon-canvas\": \"0.4.0-beta.1\", \"xterm-addon-search\": \"0.11.0-beta.7\", \"xterm-addon-unicode11\": \"0.5.0-beta.5\", \"xterm-addon-webgl\": \"0.14.0-beta.50\" \"xterm-addon-webgl\": \"0.15.0-beta.1\" } }"} {"_id":"doc-en-vscode-51db84d46f933ad804632e7a53e63b58a871e63701d248db37241c823f1282f8","title":"","text":"resolved \"https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d\" integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== xterm-addon-canvas@0.3.0-beta.35: version \"0.3.0-beta.35\" resolved \"https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.3.0-beta.35.tgz#2f85f9df9b109d51a8ce08a6023db747f4d060d5\" integrity sha512-chk/+FaUPEAC33Mt6PDLbUWlzDCCoXBWJvKykMfhZF0vCm8GqpJc3z6R9jdcZcNCPUhmmv5psRTYun6oy5TvBQ== xterm-addon-canvas@0.4.0-beta.1: version \"0.4.0-beta.1\" resolved \"https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.4.0-beta.1.tgz#f2742b88cd3eb1840b9e7f986c4bfe31e0f4684f\" integrity sha512-EfjaN0ujHJ4D8CsVpBig3xPvfRhbzAyOh8piAbNpePZmTpBzc2OQQQvEeklPriKVNDv28WbmY0Zzl5tgYM7vwg== xterm-addon-search@0.11.0-beta.7: version \"0.11.0-beta.7\""} {"_id":"doc-en-vscode-f3e1127eddf6a671165c7cbc57e67ae039b56ed251894204241e803e76b784a2","title":"","text":"resolved \"https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.5.0-beta.5.tgz#6992a6f56349e67b903201d52b1ad41ba3469d93\" integrity sha512-MaqnU34WTHCUAo7moB4KhynGn03RckI0JJ8E/gXe96EzuCP6bVJIKSc5pc9iFeLF4BX1SuemOqIHYl2Q3u3NTA== xterm-addon-webgl@0.14.0-beta.50: version \"0.14.0-beta.50\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.14.0-beta.50.tgz#e52a7fd1776c214163e15fcabedf1f0b51f75445\" integrity sha512-UF8+hBYplKxuOK5ZzLBhbC7cFOqTx0vkcK1dw8mmqL0x8v1lwfz2eRxiqokkC4bDVq3CAKlul1IuEF9cQs5sZQ== xterm-addon-webgl@0.15.0-beta.1: version \"0.15.0-beta.1\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.15.0-beta.1.tgz#bc3f784c3c467a70542b8a9a8998dbe996287796\" integrity sha512-8f4cNXG0+dBMqp+Nvk/ZQ8Wo8s4/KbF24b2VTHTt8DuY5QXt4wSA6+NEdnABV98VYDoHl+KfXl9yyFqkcJYr8Q== xterm@5.1.0-beta.87: version \"5.1.0-beta.87\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.1.0-beta.87.tgz#a4bb442b73e82941f87819f6db7810949536c891\" integrity sha512-0cR7TUfAUH6Z1CVzVCm2CnFs7slqro2nf11yjrWvZyxEoGb34rNWvcnvIq2L5Xzv+gvHbl8jDO8yj5nyxQvUCA== xterm@5.2.0-beta.2: version \"5.2.0-beta.2\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.2.tgz#67369235a54f41179922e662df40ff4c7c974787\" integrity sha512-MRAdWRfV80ae0Q3Caq/mfmCwnZZZ89Z8i/sAleio5g5dpsst9IXc0zeFpPnOvUWmtVy5P1LbfU9YCy47449DWw== "} {"_id":"doc-en-vscode-e56dbc224825efece0aa31f365be6f8c78d8699a16468f2ce783c08f0d6a7c06","title":"","text":"resolved \"https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f\" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= xterm-addon-canvas@0.3.0-beta.35: version \"0.3.0-beta.35\" resolved \"https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.3.0-beta.35.tgz#2f85f9df9b109d51a8ce08a6023db747f4d060d5\" integrity sha512-chk/+FaUPEAC33Mt6PDLbUWlzDCCoXBWJvKykMfhZF0vCm8GqpJc3z6R9jdcZcNCPUhmmv5psRTYun6oy5TvBQ== xterm-addon-canvas@0.4.0-beta.1: version \"0.4.0-beta.1\" resolved \"https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.4.0-beta.1.tgz#f2742b88cd3eb1840b9e7f986c4bfe31e0f4684f\" integrity sha512-EfjaN0ujHJ4D8CsVpBig3xPvfRhbzAyOh8piAbNpePZmTpBzc2OQQQvEeklPriKVNDv28WbmY0Zzl5tgYM7vwg== xterm-addon-search@0.11.0-beta.7: version \"0.11.0-beta.7\" resolved \"https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.11.0-beta.7.tgz#d90bcbe9e8f9238c18ba6145bd7ec2f8e3240052\" integrity sha512-i/c774V0/Eon3BIFRsRR3OjKTnMGkccBo12yDkOa40tnAD4aa8FjspE3bxW/Hh1mUEhCSgBSLnMDlK/GwnUC+g== xterm-addon-serialize@0.9.0-beta.3: version \"0.9.0-beta.3\" resolved \"https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.9.0-beta.3.tgz#bb4ed416db5748bcbe55a4b6d4c2151368fdae74\" integrity sha512-LaFuowtdxNdeuLm+KmtsoR4mgPOLu/I9k0hlWXbzAd1okJhthwMH4Y6cuL0/pFk1AclP5s+L42glv8PV0GnVsg== xterm-addon-serialize@0.9.0: version \"0.9.0\" resolved \"https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.9.0.tgz#3eee5f5c34b16e48891ec59b213716bab2354bf4\" integrity sha512-qJju2YJFh8c8pbtCYtHaG7gDDHBpDJ4a4JQZvOzuiMxOjgeM1oCnFNjbhzMuK/fOUa59FmvIUGQyqn3WL9q7qw== xterm-addon-unicode11@0.5.0-beta.5: version \"0.5.0-beta.5\" resolved \"https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.5.0-beta.5.tgz#6992a6f56349e67b903201d52b1ad41ba3469d93\" integrity sha512-MaqnU34WTHCUAo7moB4KhynGn03RckI0JJ8E/gXe96EzuCP6bVJIKSc5pc9iFeLF4BX1SuemOqIHYl2Q3u3NTA== xterm-addon-webgl@0.14.0-beta.50: version \"0.14.0-beta.50\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.14.0-beta.50.tgz#e52a7fd1776c214163e15fcabedf1f0b51f75445\" integrity sha512-UF8+hBYplKxuOK5ZzLBhbC7cFOqTx0vkcK1dw8mmqL0x8v1lwfz2eRxiqokkC4bDVq3CAKlul1IuEF9cQs5sZQ== xterm-addon-webgl@0.15.0-beta.1: version \"0.15.0-beta.1\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.15.0-beta.1.tgz#bc3f784c3c467a70542b8a9a8998dbe996287796\" integrity sha512-8f4cNXG0+dBMqp+Nvk/ZQ8Wo8s4/KbF24b2VTHTt8DuY5QXt4wSA6+NEdnABV98VYDoHl+KfXl9yyFqkcJYr8Q== xterm-headless@5.1.0-beta.87: version \"5.1.0-beta.87\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.1.0-beta.87.tgz#6eb3114bbe006088ce1aab063f14ce87b93c1001\" integrity sha512-/LEyLBkyAMy5r2iGur1CW0UsCGu1oEuskAccokbwOGS5Ad/uPZUDQUAuCmfSSX3gauz5TBqBPLYIRdY0u0DEJg== xterm-headless@5.2.0-beta.2: version \"5.2.0-beta.2\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.2.0-beta.2.tgz#db8d4cc45a2bba062622d7784a2264030aa7d56d\" integrity sha512-aP3+K47bJu5AkdtekML5LZZUh/zAkDc5ONNFgQ+7eUBh7RkFy3JYRuaG5Nj3LbdkUMjWqQZXzc3BW5Vo9KQNgA== xterm@5.1.0-beta.87: version \"5.1.0-beta.87\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.1.0-beta.87.tgz#a4bb442b73e82941f87819f6db7810949536c891\" integrity sha512-0cR7TUfAUH6Z1CVzVCm2CnFs7slqro2nf11yjrWvZyxEoGb34rNWvcnvIq2L5Xzv+gvHbl8jDO8yj5nyxQvUCA== xterm@5.2.0-beta.2: version \"5.2.0-beta.2\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.2.tgz#67369235a54f41179922e662df40ff4c7c974787\" integrity sha512-MRAdWRfV80ae0Q3Caq/mfmCwnZZZ89Z8i/sAleio5g5dpsst9IXc0zeFpPnOvUWmtVy5P1LbfU9YCy47449DWw== yallist@^4.0.0: version \"4.0.0\""} {"_id":"doc-en-vscode-54109ea5c6781a9702e96bd8caa482cca733400c1b81cf6c5bd7fecf45591f9b","title":"","text":"dependencies: object-keys \"~0.4.0\" xterm-addon-canvas@0.3.0-beta.35: version \"0.3.0-beta.35\" resolved \"https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.3.0-beta.35.tgz#2f85f9df9b109d51a8ce08a6023db747f4d060d5\" integrity sha512-chk/+FaUPEAC33Mt6PDLbUWlzDCCoXBWJvKykMfhZF0vCm8GqpJc3z6R9jdcZcNCPUhmmv5psRTYun6oy5TvBQ== xterm-addon-canvas@0.4.0-beta.1: version \"0.4.0-beta.1\" resolved \"https://registry.yarnpkg.com/xterm-addon-canvas/-/xterm-addon-canvas-0.4.0-beta.1.tgz#f2742b88cd3eb1840b9e7f986c4bfe31e0f4684f\" integrity sha512-EfjaN0ujHJ4D8CsVpBig3xPvfRhbzAyOh8piAbNpePZmTpBzc2OQQQvEeklPriKVNDv28WbmY0Zzl5tgYM7vwg== xterm-addon-search@0.11.0-beta.7: version \"0.11.0-beta.7\" resolved \"https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.11.0-beta.7.tgz#d90bcbe9e8f9238c18ba6145bd7ec2f8e3240052\" integrity sha512-i/c774V0/Eon3BIFRsRR3OjKTnMGkccBo12yDkOa40tnAD4aa8FjspE3bxW/Hh1mUEhCSgBSLnMDlK/GwnUC+g== xterm-addon-serialize@0.9.0-beta.3: version \"0.9.0-beta.3\" resolved \"https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.9.0-beta.3.tgz#bb4ed416db5748bcbe55a4b6d4c2151368fdae74\" integrity sha512-LaFuowtdxNdeuLm+KmtsoR4mgPOLu/I9k0hlWXbzAd1okJhthwMH4Y6cuL0/pFk1AclP5s+L42glv8PV0GnVsg== xterm-addon-serialize@0.9.0: version \"0.9.0\" resolved \"https://registry.yarnpkg.com/xterm-addon-serialize/-/xterm-addon-serialize-0.9.0.tgz#3eee5f5c34b16e48891ec59b213716bab2354bf4\" integrity sha512-qJju2YJFh8c8pbtCYtHaG7gDDHBpDJ4a4JQZvOzuiMxOjgeM1oCnFNjbhzMuK/fOUa59FmvIUGQyqn3WL9q7qw== xterm-addon-unicode11@0.5.0-beta.5: version \"0.5.0-beta.5\" resolved \"https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.5.0-beta.5.tgz#6992a6f56349e67b903201d52b1ad41ba3469d93\" integrity sha512-MaqnU34WTHCUAo7moB4KhynGn03RckI0JJ8E/gXe96EzuCP6bVJIKSc5pc9iFeLF4BX1SuemOqIHYl2Q3u3NTA== xterm-addon-webgl@0.14.0-beta.50: version \"0.14.0-beta.50\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.14.0-beta.50.tgz#e52a7fd1776c214163e15fcabedf1f0b51f75445\" integrity sha512-UF8+hBYplKxuOK5ZzLBhbC7cFOqTx0vkcK1dw8mmqL0x8v1lwfz2eRxiqokkC4bDVq3CAKlul1IuEF9cQs5sZQ== xterm-addon-webgl@0.15.0-beta.1: version \"0.15.0-beta.1\" resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.15.0-beta.1.tgz#bc3f784c3c467a70542b8a9a8998dbe996287796\" integrity sha512-8f4cNXG0+dBMqp+Nvk/ZQ8Wo8s4/KbF24b2VTHTt8DuY5QXt4wSA6+NEdnABV98VYDoHl+KfXl9yyFqkcJYr8Q== xterm-headless@5.1.0-beta.87: version \"5.1.0-beta.87\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.1.0-beta.87.tgz#6eb3114bbe006088ce1aab063f14ce87b93c1001\" integrity sha512-/LEyLBkyAMy5r2iGur1CW0UsCGu1oEuskAccokbwOGS5Ad/uPZUDQUAuCmfSSX3gauz5TBqBPLYIRdY0u0DEJg== xterm-headless@5.2.0-beta.2: version \"5.2.0-beta.2\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.2.0-beta.2.tgz#db8d4cc45a2bba062622d7784a2264030aa7d56d\" integrity sha512-aP3+K47bJu5AkdtekML5LZZUh/zAkDc5ONNFgQ+7eUBh7RkFy3JYRuaG5Nj3LbdkUMjWqQZXzc3BW5Vo9KQNgA== xterm@5.1.0-beta.87: version \"5.1.0-beta.87\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.1.0-beta.87.tgz#a4bb442b73e82941f87819f6db7810949536c891\" integrity sha512-0cR7TUfAUH6Z1CVzVCm2CnFs7slqro2nf11yjrWvZyxEoGb34rNWvcnvIq2L5Xzv+gvHbl8jDO8yj5nyxQvUCA== xterm@5.2.0-beta.2: version \"5.2.0-beta.2\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.2.tgz#67369235a54f41179922e662df40ff4c7c974787\" integrity sha512-MRAdWRfV80ae0Q3Caq/mfmCwnZZZ89Z8i/sAleio5g5dpsst9IXc0zeFpPnOvUWmtVy5P1LbfU9YCy47449DWw== y18n@^3.2.1: version \"3.2.2\""} {"_id":"doc-en-vscode-57a1be4e899eb2e70091ae711b27281a381569df79f19c1a0b75a00aa763fed5","title":"","text":"\"keybindingLabel.foreground\": \"#000000e4\", \"list.activeSelectionBackground\": \"#e8e8e8\", \"list.activeSelectionForeground\": \"#000000\", \"list.activeSelectionIconForeground\": \"#000000\", \"list.hoverBackground\": \"#f2f2f2\", \"menu.border\": \"#D4D4D4\", \"notebook.cellBorderColor\": \"#E8E8E8\","} {"_id":"doc-en-vscode-9f7f16dde84644d74d45382bccfb295a4592c4d1712dcb556657f793e5289c8b","title":"","text":"function Global:__VSCode-Escape-Value([string]$value) { # NOTE: In PowerShell v6.1+, this can be written `$value -replace '…', { … }` instead of `[regex]::Replace`. # Replace any non-alphanumeric characters. [regex]::Replace($value, '[^a-zA-Z0-9]', { param($match) # Backslashes must be doubled. if ($match.Value -eq '') { '' } else { # Any other characters are encoded as their UTF-8 hex values. -Join ( [System.Text.Encoding]::UTF8.GetBytes($match.Value) | ForEach-Object { 'x{0:x2}' -f $_ } ) } [regex]::Replace($value, '[n;]', { param($match) # Encode the (ascii) matches as `x` -Join ( [System.Text.Encoding]::UTF8.GetBytes($match.Value) | ForEach-Object { 'x{0:x2}' -f $_ } ) }) }"} {"_id":"doc-en-vscode-e9774c055fc589b7700f1b4c5b22f0c0bbf884e0e3c282d2a914aec8027c022c","title":"","text":"return; } if (e.browserEvent.defaultPrevented) { return; } const focus = e.index; if (typeof focus === 'undefined') {"} {"_id":"doc-en-vscode-48b08373f90d25a2fcbc7790891be79ca6615eb2890538a823d13845bef63710","title":"","text":"this.list.setSelection([focus], e.browserEvent); } e.browserEvent.preventDefault(); this._onPointer.fire(e); }"} {"_id":"doc-en-vscode-c2c5be8398a7de4b3304c94b7ebe87f2f939b3caa470ed5374ae6a024edd4888","title":"","text":"return; } if (e.browserEvent.defaultPrevented) { return; } const focus = this.list.getFocus(); this.list.setSelection(focus, e.browserEvent); e.browserEvent.preventDefault(); } private changeSelection(e: IListMouseEvent | IListTouchEvent): void {"} {"_id":"doc-en-vscode-8d4fa3fad9f12bdaf1cab0dd87bed95937f6afe64dfbe7816b92ffc1793843a6","title":"","text":"return; } if (e.browserEvent.defaultPrevented) { return; } const node = e.element; if (!node) {"} {"_id":"doc-en-vscode-75015a649366ca53d0fe1e5ea37a47786e2079e20839eb0075aece6a7d0e573a","title":"","text":"return; } if (e.browserEvent.defaultPrevented) { return; } super.onDoubleClick(e); } }"} {"_id":"doc-en-vscode-b2a094c90a06fd026a77e13bd66f78ca8dc1b57dfb58daffa1f9af0ed437969d","title":"","text":"} async getRefs(query: RefQuery = {}, cancellationToken?: CancellationToken): Promise { return await this.run(Operation.GetRefs, () => { return this.repository.getRefs(query, cancellationToken); }); const config = workspace.getConfiguration('git'); let defaultSort = config.get<'alphabetically' | 'committerdate'>('branchSortOrder'); if (defaultSort !== 'alphabetically' && defaultSort !== 'committerdate') { defaultSort = 'alphabetically'; } query = { ...query, sort: query?.sort ?? defaultSort }; return await this.run(Operation.GetRefs, () => this.repository.getRefs(query, cancellationToken)); } async getRemoteRefs(remote: string, opts?: { heads?: boolean; tags?: boolean }): Promise {"} {"_id":"doc-en-vscode-465ab9e69a861bfe44abb565873331e7430d263034be636de606fcff528fe375","title":"","text":"this._sourceControl.commitTemplate = commitTemplate; // Execute cancellable long-running operations const config = workspace.getConfiguration('git'); let sort = config.get<'alphabetically' | 'committerdate'>('branchSortOrder') || 'alphabetically'; if (sort !== 'alphabetically' && sort !== 'committerdate') { sort = 'alphabetically'; } const [resourceGroups, refs] = await Promise.all([ this.getStatus(cancellationToken), this.repository.getRefs({ sort }, cancellationToken)]); this.getRefs({}, cancellationToken)]); this._refs = refs!; this._updateResourceGroupsState(resourceGroups);"} {"_id":"doc-en-vscode-e3c0f29ac559cee548d8414e32e6ca6cc11138ed3edc08070e5ae33b7ad60b7d","title":"","text":"return (documentVersion: number) => { if (!cachedElements || documentVersion !== cachedVersion) { cachedVersion = documentVersion; cachedElements = [{ element: document.body, line: 0 }]; cachedElements = [{ element: document.body, line: -1 }]; for (const element of document.getElementsByClassName(codeLineClass)) { const line = +element.getAttribute('data-line')!; if (isNaN(line)) {"} {"_id":"doc-en-vscode-babc2483bd4be47e197ad8bb59a880c53f23df9c9a458044a89ca6ee89b7fe22","title":"","text":"} switch (e.data.type) { case 'setScale': case 'setScale': { updateScale(e.data.scale); break; case 'setActive': } case 'setActive': { setActive(e.data.value); break; case 'zoomIn': } case 'zoomIn': { zoomIn(); break; case 'zoomOut': } case 'zoomOut': { zoomOut(); break; } case 'copyImage': { copyImage(); break; } } }); document.addEventListener('copy', () => { copyImage(); }); async function copyImage() { try { await navigator.clipboard.write([new ClipboardItem({ 'image/png': fetch(image.src).then(request => request.blob()) })]); } catch (e) { console.error(e); } } }());"} {"_id":"doc-en-vscode-e9247180ecc7db49287794578e52b411072a5c8df1b640ba783400577616b853","title":"","text":"\"command\": \"imagePreview.zoomOut\", \"title\": \"%command.zoomOut%\", \"category\": \"Image Preview\" }, { \"command\": \"imagePreview.copyImage\", \"title\": \"%command.copyImage%\", \"category\": \"Image Preview\" } ], \"menus\": {"} {"_id":"doc-en-vscode-63652886e976b7fed13090ebbb27c50c703750611abccd9278a86c9848fae676","title":"","text":"\"command\": \"imagePreview.zoomOut\", \"when\": \"activeCustomEditorId == 'imagePreview.previewEditor'\", \"group\": \"1_imagePreview\" }, { \"command\": \"imagePreview.copyImage\", \"when\": \"false\" } ], \"webview/context\": [ { \"command\": \"imagePreview.copyImage\", \"when\": \"webviewId == 'imagePreview.previewEditor'\" } ] }"} {"_id":"doc-en-vscode-f71d07e96eac20a3ad6ffe07103e52cb4649701add3242082e039a417383c5ff","title":"","text":"\"customEditor.imagePreview.displayName\": \"Image Preview\", \"customEditor.videoPreview.displayName\": \"Video Preview\", \"command.zoomIn\": \"Zoom in\", \"command.zoomOut\": \"Zoom out\" \"command.zoomOut\": \"Zoom out\", \"command.copyImage\": \"Copy\" }"} {"_id":"doc-en-vscode-6d0cd14315747d8b3a21e87ebe84b5143ca33f56c99a814f04cb6d46ca7860f5","title":"","text":"

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

"} {"_id":"doc-en-vscode-9ea4e6620b736fa018543f1f633390a2dfd7fdba7a985a43219d012c2fecc6dd","title":"","text":"} } public copyImage() { if (this.previewState === PreviewState.Active) { this.webviewEditor.reveal(); this.webviewEditor.webview.postMessage({ type: 'copyImage' }); } } protected override updateState() { super.updateState();"} {"_id":"doc-en-vscode-eb59abf54782fc43bb27492ce78a06c6473bae3a0a9cbcacdeed16676f558410","title":"","text":"

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

"} {"_id":"doc-en-vscode-d4c1658344c2381df277e21beeeeb83d429eff02c3ceaa5be77ed08978cd160d","title":"","text":"previewManager.activePreview?.zoomOut(); })); disposables.push(vscode.commands.registerCommand('imagePreview.copyImage', () => { previewManager.activePreview?.copyImage(); })); return vscode.Disposable.from(...disposables); }"} {"_id":"doc-en-vscode-daf44df7e28dd5ce5795a5e868745a704eeb4d20e64b5ce9b235d0ccc2ad321f","title":"","text":"

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

"} {"_id":"doc-en-vscode-7aa3d9adf11077640a807974d7d43fb0c73bc0b5ff0801ab37bd7ab0565e63eb","title":"","text":"italic: register('italic', 0xeb0d), jersey: register('jersey', 0xeb0e), json: register('json', 0xeb0f), bracket: register('bracket', 0xeb0f), kebabVertical: register('kebab-vertical', 0xeb10), key: register('key', 0xeb11), law: register('law', 0xeb12),"} {"_id":"doc-en-vscode-85d6ab755ac40dc0adf9a9b07d4dba3c7165c03bd13ef2c3e28b7a238a348b85","title":"","text":"graphLine: register('graph-line', 0xebe2), graphScatter: register('graph-scatter', 0xebe3), pieChart: register('pie-chart', 0xebe4), bracket: register('bracket', 0xebe4), bracketDot: register('bracket-dot', 0xebe5), bracketError: register('bracket-error', 0xebe6), lockSmall: register('lock-small', 0xebe7),"} {"_id":"doc-en-vscode-fa2248dcaf3ad21bba4c0f8b6ca6c184fd827809358f6944f65d162a906e3d0e","title":"","text":"} /** * A regex that extracts the link suffix which contains line and column information. The link suffix * must terminate at the end of line. */ const linkSuffixRegexEol = new Lazy(() => generateLinkSuffixRegex(true)); /** * A regex that extracts the link suffix which contains line and column information. */ const linkSuffixRegexEol = new Lazy(() => { const linkSuffixRegex = new Lazy(() => generateLinkSuffixRegex(false)); function generateLinkSuffixRegex(eolOnly: boolean) { let ri = 0; let ci = 0; function l(): string {"} {"_id":"doc-en-vscode-838f10777ecac702c26e2f84e0ba35b2b03806e1ad3abc14d120112869812213","title":"","text":"return `(?d+)`; } const eolSuffix = eolOnly ? '$' : ''; // The comments in the regex below use real strings/numbers for better readability, here's // the legend: // - Path = foo"} {"_id":"doc-en-vscode-d74cef3b68de1bf26612e2a3669fc3e8ad799f755b6950de5b30a2229a229754","title":"","text":"// foo:339 // foo:339:12 // foo 339 // foo 339:12 [#140780] // foo 339:12 [#140780] // \"foo\",339 // \"foo\",339:12 `(?::| |['\"],)${l()}(:${c()})?$`, // The quotes below are optional [#171652] // \"foo\", line 339 [#40468] `(?::| |['\"],)${l()}(:${c()})?` + eolSuffix, // The quotes below are optional [#171652] // \"foo\", line 339 [#40468] // \"foo\", line 339, col 12 // \"foo\", line 339, column 12 // \"foo\":line 339"} {"_id":"doc-en-vscode-2fbc1c3fe680cdbae94cde47f0777dcc577bf3e3097bdabaa7bb3a2d385be39e","title":"","text":"// \"foo\" on line 339, col 12 // \"foo\" on line 339, column 12 // \"foo\" line 339 column 12 `['\"]?(?:,? |: ?| on )line ${l()}(,? col(?:umn)? ${c()})?$`, // foo(339) // foo(339,12) // foo(339, 12) // foo (339) // ... // foo: (339) // ... `:? ?[[(]${l()}(?:, ?${c()})?[])]$`, ]; const suffixClause = lineAndColumnRegexClauses // Join all clauses together .join('|') // Convert spaces to allow the non-breaking space char (ascii 160) .replace(/ /g, `[${'u00A0'} ]`); return new RegExp(`(${suffixClause})`); }); const linkSuffixRegex = new Lazy(() => { let ri = 0; let ci = 0; function l(): string { return `(?d+)`; } function c(): string { return `(?d+)`; } const lineAndColumnRegexClauses = [ // foo:339 // foo:339:12 // foo 339 // foo 339:12 [#140780] // \"foo\",339 // \"foo\",339:12 `(?::| |['\"],)${l()}(:${c()})?`, // The quotes below are optional [#171652] // foo, line 339 [#40468] // foo, line 339, col 12 // foo, line 339, column 12 // \"foo\":line 339 // \"foo\":line 339, col 12 // \"foo\":line 339, column 12 // \"foo\": line 339 // \"foo\": line 339, col 12 // \"foo\": line 339, column 12 // \"foo\" on line 339 // \"foo\" on line 339, col 12 // \"foo\" on line 339, column 12 // \"foo\" line 339 column 12 `['\"]?(?:,? |: ?| on )line ${l()}(,? col(?:umn)? ${c()})?`, // \"foo\", line 339, character 12 [#171880] // \"foo\", line 339, characters 12-13 [#171880] // \"foo\", lines 339-340 [#171880] `['\"]?(?:,? |: ?| on )lines? ${l()}(?:-d+)?(?:,? (?:col(?:umn)?|characters?) ${c()}(?:-d+)?)?` + eolSuffix, // foo(339) // foo(339,12) // foo(339, 12)"} {"_id":"doc-en-vscode-64229af32684a43bf7257f9fd9aeb99dfe045d0b522487ad4105436e702f6489","title":"","text":"// ... // foo: (339) // ... `:? ?[[(]${l()}(?:, ?${c()})?[])]`, `:? ?[[(]${l()}(?:, ?${c()})?[])]` + eolSuffix, ]; const suffixClause = lineAndColumnRegexClauses"} {"_id":"doc-en-vscode-4a9baf236ed989d74b200f0f613719638502d9dcea5f620a41c996863d91b0d8","title":"","text":"// Convert spaces to allow the non-breaking space char (ascii 160) .replace(/ /g, `[${'u00A0'} ]`); return new RegExp(`(${suffixClause})`, 'g'); }); return new RegExp(`(${suffixClause})`, eolOnly ? undefined : 'g'); } /** * Removes the optional link suffix which contains line and column information."} {"_id":"doc-en-vscode-c7e166c618007c6ebba1713e3a8d5b12618a6417d54759298119e9afaf15e375","title":"","text":"{ link: 'foo: [339,12]', prefix: undefined, suffix: ': [339,12]', hasRow: true, hasCol: true }, { link: 'foo: [339, 12]', prefix: undefined, suffix: ': [339, 12]', hasRow: true, hasCol: true }, // OCaml-style { link: '\"foo\", line 339, character 12', prefix: '\"', suffix: '\", line 339, character 12', hasRow: true, hasCol: true }, { link: '\"foo\", line 339, characters 12-13', prefix: '\"', suffix: '\", line 339, characters 12-13', hasRow: true, hasCol: true }, { link: '\"foo\", lines 339-340', prefix: '\"', suffix: '\", lines 339-340', hasRow: true, hasCol: false }, // Non-breaking space { link: 'foou00A0339:12', prefix: undefined, suffix: 'u00A0339:12', hasRow: true, hasCol: true }, { link: '\"foo\" on line 339,u00A0column 12', prefix: '\"', suffix: '\" on line 339,u00A0column 12', hasRow: true, hasCol: true },"} {"_id":"doc-en-vscode-93850b640d2a84826d36110864bd7b6956f1fac823e6ff4c36c8a037a15d9cf3","title":"","text":"/* Icons */ .monaco-workbench > .notifications-toasts .codicon.codicon-error { color: var(--vscode-notificationsErrorIcon-foreground); color: var(--vscode-notificationsErrorIcon-foreground) !important; } .monaco-workbench > .notifications-toasts .codicon.codicon-warning { color: var(--vscode-notificationsWarningIcon-foreground); color: var(--vscode-notificationsWarningIcon-foreground) !important; } .monaco-workbench > .notifications-toasts .codicon.codicon-info { color: var(--vscode-notificationsInfoIcon-foreground); color: var(--vscode-notificationsInfoIcon-foreground) !important; }"} {"_id":"doc-en-vscode-04aad68971841084628b195deb949cee28b1c348a6a70220edf5a94960994b71","title":"","text":"\"vscode-proxy-agent\": \"^0.12.0\", \"vscode-regexpp\": \"^3.1.0\", \"vscode-textmate\": \"8.0.0\", \"xterm\": \"5.2.0-beta.19\", \"xterm\": \"5.2.0-beta.20\", \"xterm-addon-canvas\": \"0.4.0-beta.7\", \"xterm-addon-search\": \"0.11.0\", \"xterm-addon-serialize\": \"0.9.0\", \"xterm-addon-unicode11\": \"0.5.0\", \"xterm-addon-webgl\": \"0.15.0-beta.4\", \"xterm-headless\": \"5.2.0-beta.19\", \"xterm-headless\": \"5.2.0-beta.20\", \"yauzl\": \"^2.9.2\", \"yazl\": \"^2.4.3\" },"} {"_id":"doc-en-vscode-4e680871b2996bf3c380daca101f89c205bc6e3f133204bba9c57307aac51957","title":"","text":"\"tas-client-umd\": \"0.1.6\", \"vscode-oniguruma\": \"1.7.0\", \"vscode-textmate\": \"8.0.0\", \"xterm\": \"5.2.0-beta.19\", \"xterm\": \"5.2.0-beta.20\", \"xterm-addon-canvas\": \"0.4.0-beta.7\", \"xterm-addon-search\": \"0.11.0\", \"xterm-addon-unicode11\": \"0.5.0\","} {"_id":"doc-en-vscode-987941462df9acfaeafd7100ada53f3ad6085f435c2351b31d113c415a6cbcd6","title":"","text":"resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.15.0-beta.4.tgz#d03a98e446372a5dbb7d92075d1f125eec23b030\" integrity sha512-W9N0+5i3trQhgBOHDsnNiBbBiJpleFenY668wWaZ9GlvWseCTnjnWis1kfnM9WASDh/0+7aOjWrD089o+QeHGQ== xterm@5.2.0-beta.19: version \"5.2.0-beta.19\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.19.tgz#b3fd2eda3d9aa2672abaf03e864fafe64269c8a0\" integrity sha512-3U+NYHjnIdUQf+MXiitmoFAcBOaLFHid3R/LzzvELjMwQx227EFk+3OmQjkBt7eH/IR+A4VlP5aPGmgriyLtGQ== xterm@5.2.0-beta.20: version \"5.2.0-beta.20\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.20.tgz#52ed300d7077ce394f7656655ad07d90f96c6c64\" integrity sha512-UIbFYmUPNTOSYIhAt/2pJ9AF7nc8RxT2k2bBUZOER4VdaeA89FH3xcNC5/3OysPkn6QS9INcYS2dX5gM2RnChg== "} {"_id":"doc-en-vscode-cbdaf7ff264e679897a1bc6c6cb107751e973b787d0e75212d0898b36166452c","title":"","text":"resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.15.0-beta.4.tgz#d03a98e446372a5dbb7d92075d1f125eec23b030\" integrity sha512-W9N0+5i3trQhgBOHDsnNiBbBiJpleFenY668wWaZ9GlvWseCTnjnWis1kfnM9WASDh/0+7aOjWrD089o+QeHGQ== xterm-headless@5.2.0-beta.19: version \"5.2.0-beta.19\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.2.0-beta.19.tgz#7603ffe76d42882bf72820791f8d2ba2074d7ace\" integrity sha512-MKaObf5tdeEPXfRyhWkvNbiJ4oE57rL4eDV68iXm/0yYHgW3oQf3QO1d4SMGIxWYVx70AulY6EP2VswuInXImg== xterm@5.2.0-beta.19: version \"5.2.0-beta.19\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.19.tgz#b3fd2eda3d9aa2672abaf03e864fafe64269c8a0\" integrity sha512-3U+NYHjnIdUQf+MXiitmoFAcBOaLFHid3R/LzzvELjMwQx227EFk+3OmQjkBt7eH/IR+A4VlP5aPGmgriyLtGQ== xterm-headless@5.2.0-beta.20: version \"5.2.0-beta.20\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.2.0-beta.20.tgz#5827ac8977b5ae3246cc217dccdd6eaeac01b66e\" integrity sha512-D1y4CIRvA8Izo7tAWShbyKTnxVteAy+N1j9Q+xvzcVxsGA4DLa8U7Gr2KXs3e/cjgkDcVHbbYCn7iWEyNTFvWw== xterm@5.2.0-beta.20: version \"5.2.0-beta.20\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.20.tgz#52ed300d7077ce394f7656655ad07d90f96c6c64\" integrity sha512-UIbFYmUPNTOSYIhAt/2pJ9AF7nc8RxT2k2bBUZOER4VdaeA89FH3xcNC5/3OysPkn6QS9INcYS2dX5gM2RnChg== yallist@^4.0.0: version \"4.0.0\""} {"_id":"doc-en-vscode-36102639b96dfb80a28c69f9efc5d04915655fabc0a8c3766685a66bbcb44b71","title":"","text":"resolved \"https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.15.0-beta.4.tgz#d03a98e446372a5dbb7d92075d1f125eec23b030\" integrity sha512-W9N0+5i3trQhgBOHDsnNiBbBiJpleFenY668wWaZ9GlvWseCTnjnWis1kfnM9WASDh/0+7aOjWrD089o+QeHGQ== xterm-headless@5.2.0-beta.19: version \"5.2.0-beta.19\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.2.0-beta.19.tgz#7603ffe76d42882bf72820791f8d2ba2074d7ace\" integrity sha512-MKaObf5tdeEPXfRyhWkvNbiJ4oE57rL4eDV68iXm/0yYHgW3oQf3QO1d4SMGIxWYVx70AulY6EP2VswuInXImg== xterm@5.2.0-beta.19: version \"5.2.0-beta.19\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.19.tgz#b3fd2eda3d9aa2672abaf03e864fafe64269c8a0\" integrity sha512-3U+NYHjnIdUQf+MXiitmoFAcBOaLFHid3R/LzzvELjMwQx227EFk+3OmQjkBt7eH/IR+A4VlP5aPGmgriyLtGQ== xterm-headless@5.2.0-beta.20: version \"5.2.0-beta.20\" resolved \"https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.2.0-beta.20.tgz#5827ac8977b5ae3246cc217dccdd6eaeac01b66e\" integrity sha512-D1y4CIRvA8Izo7tAWShbyKTnxVteAy+N1j9Q+xvzcVxsGA4DLa8U7Gr2KXs3e/cjgkDcVHbbYCn7iWEyNTFvWw== xterm@5.2.0-beta.20: version \"5.2.0-beta.20\" resolved \"https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.20.tgz#52ed300d7077ce394f7656655ad07d90f96c6c64\" integrity sha512-UIbFYmUPNTOSYIhAt/2pJ9AF7nc8RxT2k2bBUZOER4VdaeA89FH3xcNC5/3OysPkn6QS9INcYS2dX5gM2RnChg== y18n@^3.2.1: version \"3.2.2\""} {"_id":"doc-en-vscode-e89c6a49cb25467f2046dd86778c63f48d0a53cb5e015d0a3e5b1078f4a25ad4","title":"","text":"primary: KeyMod.Alt | KeyCode.F1, weight: KeybindingWeight.WorkbenchContrib, linux: { primary: KeyMod.Shift | KeyCode.F1, secondary: [KeyMod.Shift | KeyCode.F1] }, win: { primary: KeyMod.Shift | KeyCode.F1, secondary: [KeyMod.Shift | KeyCode.F1] primary: KeyMod.Alt | KeyMod.Shift | KeyCode.F1, secondary: [KeyMod.Alt | KeyCode.F1] }, when: TerminalContextKeys.focus }"} {"_id":"doc-en-vscode-b054f69127e29d662a95e5b20f15bf967ae1a9d65886b55ee7e4100e57020090","title":"","text":"TerminalCommandId.SelectNextPageSuggestion, TerminalCommandId.AcceptSelectedSuggestion, TerminalCommandId.HideSuggestWidget, TerminalCommandId.ShowTerminalAccessibilityHelp, 'editor.action.toggleTabFocusMode', 'notifications.hideList', 'notifications.hideToasts',"} {"_id":"doc-en-vscode-0af901288d386c4d4f53a7d703cd05f30589a87a31eac818a4468b53534c475b","title":"","text":"type: 'string', enum: ['always', 'never', 'whenTriggerCharacter', 'whenQuickSuggestion'], enumDescriptions: [ nls.localize('suggest.insertMode.always', \"Always activate the suggest widget when triggering IntelliSense automatically.\"), nls.localize('suggest.insertMode.never', \"Never activate the suggest widget when triggering IntelliSense automatically.\"), nls.localize('suggest.insertMode.whenTriggerCharacter', \"Activate the suggest widget only when triggering IntelliSense from a trigger character.\"), nls.localize('suggest.insertMode.whenQuickSuggestion', \"Activate the suggest widget only when triggering IntelliSense as you type.\"), nls.localize('suggest.insertMode.always', \"Always select a suggestion when automatically triggering IntelliSense.\"), nls.localize('suggest.insertMode.never', \"Never select a suggestion when automatically triggering IntelliSense.\"), nls.localize('suggest.insertMode.whenTriggerCharacter', \"Select a suggestion only when triggering IntelliSense from a trigger character.\"), nls.localize('suggest.insertMode.whenQuickSuggestion', \"Select a suggestion only when triggering IntelliSense as you type.\"), ], default: defaults.selectionMode, markdownDescription: nls.localize('suggest.selectionMode', \"Controls whether the suggest widget becomes active when triggered via quick suggest or trigger characters. Note that the widget is always active when explicitly invoked, e.g via `Ctrl+Space`.\") markdownDescription: nls.localize('suggest.selectionMode', \"Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions (`#editor.quickSuggestions#` and `#editor.suggestOnTriggerCharacters#`) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.\") }, 'editor.suggest.snippetsPreventQuickSuggestions': { type: 'boolean',"} {"_id":"doc-en-vscode-1927d3ccad168524a50c8f55f4518150caecabcf83ed6f963a4acaf9aa73a269","title":"","text":"this.filterText = this.getFilterText(completionContext.line, tsEntry.insertText); if (completionContext.isMemberCompletion && completionContext.dotAccessorContext && !(this.insertText instanceof vscode.SnippetString)) { this.filterText = completionContext.dotAccessorContext.text + (this.insertText || typeof this.label === 'string' ? this.label : this.label.label); this.filterText = completionContext.dotAccessorContext.text + (this.insertText || this.textLabel); if (!this.range) { const replacementRange = this.getFuzzyWordRange(); if (replacementRange) {"} {"_id":"doc-en-vscode-86fa8324eb239803f48f11d077cf302c818a4e3cdefad277faf563cb2eb9541e","title":"","text":"}); } return new vscode.CompletionList(newItems); return new vscode.CompletionList(newItems, true); }); } }"} {"_id":"doc-en-vscode-743ed1495a7c002ef21ec70ff99b30df704faaff91db4338c5bf08e4c8ccf93a","title":"","text":"import { NotebookTextModel } from 'vs/workbench/contrib/notebook/common/model/notebookTextModel'; import { ICellDto2, INotebookEditorModel, INotebookLoadOptions, IResolvedNotebookEditorModel, NotebookCellsChangeType, NotebookData } from 'vs/workbench/contrib/notebook/common/notebookCommon'; import { INotebookSerializer, INotebookService, SimpleNotebookProviderInfo } from 'vs/workbench/contrib/notebook/common/notebookService'; import { ILifecycleService } from 'vs/workbench/services/lifecycle/common/lifecycle'; import { IFileWorkingCopyManager } from 'vs/workbench/services/workingCopy/common/fileWorkingCopyManager'; import { IStoredFileWorkingCopy, IStoredFileWorkingCopyModel, IStoredFileWorkingCopyModelContentChangedEvent, IStoredFileWorkingCopyModelFactory, IStoredFileWorkingCopySaveEvent, StoredFileWorkingCopyState } from 'vs/workbench/services/workingCopy/common/storedFileWorkingCopy'; import { IUntitledFileWorkingCopy, IUntitledFileWorkingCopyModel, IUntitledFileWorkingCopyModelContentChangedEvent, IUntitledFileWorkingCopyModelFactory } from 'vs/workbench/services/workingCopy/common/untitledFileWorkingCopy';"} {"_id":"doc-en-vscode-d03e742739736bb614ad89fcff20882d6018fb5c6eab060728af3f65acd71f55","title":"","text":"private readonly _hasAssociatedFilePath: boolean, readonly viewType: string, private readonly _workingCopyManager: IFileWorkingCopyManager, @IFileService private readonly _fileService: IFileService @IFileService private readonly _fileService: IFileService, @ILifecycleService lifecycleService: ILifecycleService ) { super(); if (this.viewType === 'interactive') { lifecycleService.onBeforeShutdown(async e => e.veto(this.onBeforeShutdown(), 'veto.InteractiveWindow')); } } private async onBeforeShutdown() { if (this._workingCopy?.isDirty()) { await this._workingCopy.save(); } return false; } override dispose(): void {"} {"_id":"doc-en-vscode-a6987ea1d64a1f5a2532dff79cad53f417bb3ede57d0ce2da98b6d3174b82543","title":"","text":"if (uri !== undefined) { // Launch desktop client if currently in web let target = `${env.uriScheme}://vscode.git/clone?url=${encodeURIComponent(uri)}`; if (env.uiKind === UIKind.Web) { let target = `${env.uriScheme}://vscode.git/clone?url=${encodeURIComponent(uri)}`; if (ref !== undefined) { target += `&ref=${encodeURIComponent(ref)}`; } return Uri.parse(target); } // If already in desktop client, directly clone // If already in desktop client but in a remote window, we need to force a new window // so that the git extension can access the local filesystem for cloning if (env.remoteName !== undefined) { target += `&windowId=_blank`; return Uri.parse(target); } // Otherwise, directly clone void this.clone(uri, undefined, { ref: ref }); } }"} {"_id":"doc-en-vscode-0da10ffef4e5f9f5c21f086278b7c6b5e7af00db7f48113dbd4d0e81235d84d1","title":"","text":"if (configuration.enableTsServerTracing) { if (tsServerTraceDirectory) { this._logger.info(`<${kind}> Trace directory: ${tsServerTraceDirectory}`); this._logger.info(`<${kind}> Trace directory: ${tsServerTraceDirectory.fsPath}`); } else { this._logger.error(`<${kind}> Could not create trace directory`); }"} {"_id":"doc-en-vscode-4e2c9756286e3e2cc9762112d21c7d8eb1c64215bbea50e077a568c7cb554434","title":"","text":"if (configuration.enableTsServerTracing && !isWeb()) { tsServerTraceDirectory = this._logDirectoryProvider.getNewLogDirectory(); if (tsServerTraceDirectory) { args.push('--traceDirectory', tsServerTraceDirectory.path); args.push('--traceDirectory', tsServerTraceDirectory.fsPath); } }"} {"_id":"doc-en-vscode-b5a2b68ebcd7053458140bd6519bc72c1ae98356409e653c2623405cbf9c0648","title":"","text":"const languageContributions = findNodeAtLocation(tree, ['contributes', 'languages']); languageContributions?.children?.forEach(child => { const id = findNodeAtLocation(child, ['id']); if (id && id.type === 'string') { const configuration = findNodeAtLocation(child, ['configuration']); if (id && id.type === 'string' && configuration && configuration.type === 'string') { activationEvents.add(`onLanguage:${id.value}`); } });"} {"_id":"doc-en-vscode-0367c9fd0d0f8af09c85a6810028ad4bc7c71e16166505ac44eabd27bc035f6b","title":"","text":"}, activationEventsGenerator: (languageContributions, result) => { for (const languageContribution of languageContributions) { if (languageContribution.id) { if (languageContribution.id && languageContribution.configuration) { result.push(`onLanguage:${languageContribution.id}`); } }"} {"_id":"doc-en-vscode-bf93d70278b9273898f6dcef59d859ff3ce7677ee334d5afd09de4004be5d60e","title":"","text":"const parent = this._options.parentSession; if (parent) { toDispose.add(parent.onDidEndAdapter(() => { // copy the parent repl and get a new detached repl for this child if (!this.hasSeparateRepl()) { // copy the parent repl and get a new detached repl for this child, and // remove its parent, if it's still running if (!this.hasSeparateRepl() && this.raw?.isInShutdown === false) { this.repl = this.repl.clone(); replListener.value = this.repl.onDidChangeElements(() => this._onDidChangeREPLElements.fire()); this.parentSession = undefined; } this.parentSession = undefined; })); } }"} {"_id":"doc-en-vscode-bcf6cbdd05e6bf341f322c68219e7b545c083018dde80e10bb3417017fc37240","title":"","text":"this.debugAdapter.onRequest(request => this.dispatchRequest(request)); } get isInShutdown() { return this.inShutdown; } get onDidExitAdapter(): Event { return this._onDidExitAdapter.event; }"} {"_id":"doc-en-vscode-93582fb2857f6a71b5b15d024e0432f95c6063ab9deadbb6595879461a73ae5c","title":"","text":"if (typeof raw.sourceReference === 'number' && raw.sourceReference > 0) { return URI.from({ scheme: DEBUG_SCHEME, path, path: path?.replace(/^/+/g, '/'), // #174054 query: `session=${sessionId}&ref=${raw.sourceReference}` }); }"} {"_id":"doc-en-vscode-d81a6dd02eac22c5714199434077955f017ac850b1fb28468897e7c442ae5029","title":"","text":"const newWithProfile = nls.localize('newWithProfile', 'The Create New Terminal (With Profile) ({0}) command allows for easy terminal creation using a specific profile.'); const newWithProfileNoKb = nls.localize('newWithProfileNoKb', 'The Create New Terminal (With Profile) command allows for easy terminal creation using a specific profile and is currently not triggerable by a keybinding.'); const accessibilitySettings = nls.localize('accessibilitySettings', 'Access accessibility settings such as `terminal.integrated.tabFocusMode` via the Preferences: Open Accessibility Settings command.'); const commandPrompt = nls.localize('commandPromptMigration', \"Consider using powershell instead of command prompt for an improved experience\"); class AccessibilityHelpWidget extends Widget implements ITerminalWidget { readonly id = 'help'; private _container: HTMLElement | undefined;"} {"_id":"doc-en-vscode-3a92ab84c71eae5e5ceffb2f4b7f0eab5b92631b9ddc0ace96e848e1c14bd070","title":"","text":"private readonly _markdownRenderer: MarkdownRenderer; constructor( instance: ITerminalInstance, private readonly _instance: ITerminalInstance, @IKeybindingService private readonly _keybindingService: IKeybindingService, @IInstantiationService instantiationService: IInstantiationService, @IOpenerService private readonly _openerService: IOpenerService ) { super(); this._hasShellIntegration = instance.xterm?.shellIntegration.status === ShellIntegrationStatus.VSCode; this._hasShellIntegration = _instance.xterm?.shellIntegration.status === ShellIntegrationStatus.VSCode; this._domNode = createFastDomNode(document.createElement('div')); this._contentDomNode = createFastDomNode(document.createElement('div')); this._contentDomNode.setClassName('terminal-accessibility-help');"} {"_id":"doc-en-vscode-9d2002f45b229436351578b1d1098c7368abd211a1da7586cb10c15fc0a0a931","title":"","text":"this._register(dom.addStandardDisposableListener(this._contentDomNode.domNode, 'keydown', (e) => { if (e.keyCode === KeyCode.Escape) { this.hide(); instance.focus(); _instance.focus(); } })); this._register(instance.onDidFocus(() => this.hide())); this._register(_instance.onDidFocus(() => this.hide())); this._markdownRenderer = this._register(instantiationService.createInstance(MarkdownRenderer, {})); }"} {"_id":"doc-en-vscode-f2ff2dddbec1d31712c06fe608587bb3685299b56ba9ab68b1cf7a67fa8441c0","title":"","text":"private _buildContent(): void { const content = []; content.push(this._descriptionForCommand(TerminalCommandId.FocusAccessibleBuffer, focusAccessibleBufferNls, focusAccessibleBufferNoKb)); if (this._instance.shellType === WindowsShellType.CommandPrompt) { content.push(commandPrompt); } if (this._hasShellIntegration) { content.push(shellIntegration); content.push('- ' + this._descriptionForCommand(TerminalCommandId.RunRecentCommand, runRecentCommand, runRecentCommandNoKb) + 'n- ' + this._descriptionForCommand(TerminalCommandId.GoToRecentDirectory, goToRecent, goToRecentNoKb));"} {"_id":"doc-en-vscode-58945a2112ba6d15f5840bae6f644458abcea58995604020426e312cfddc594c","title":"","text":"const dismiss = nls.localize('dismiss', \"You can dismiss this dialog by pressing Escape or focusing elsewhere.\"); const openDetectedLink = nls.localize('openDetectedLink', 'The Open Detected Link ({0}) command enables screen readers to easily open links found in the terminal.'); const openDetectedLinkNoKb = nls.localize('openDetectedLinkNoKb', 'The Open Detected Link command enables screen readers to easily open links found in the terminal and is currently not triggerable by a keybinding.'); const newWithProfile = nls.localize('newWithProfile', 'The Create New Terminal (With Profile) ({0}) command allows for easy terminal creation using a specific profile.'); const newWithProfileNoKb = nls.localize('newWithProfileNoKb', 'The Create New Terminal (With Profile) command command allows for easy terminal creation using a specific profile and is currently not triggerable by a keybinding.'); const accessibilitySettings = nls.localize('accessibilitySettings', 'Access accessibility settings such as `terminal.integrated.tabFocusMode` via the Preferences: Open Accessibility Settings command.'); class AccessibilityHelpWidget extends Widget implements ITerminalWidget { readonly id = 'help';"} {"_id":"doc-en-vscode-324d2e451a670d271998f12213eae62a72c87c87560283751bffea7ac0c75335","title":"","text":"content.push('- ' + this._descriptionForCommand(TerminalCommandId.RunRecentCommand, runRecentCommand, runRecentCommandNoKb) + 'n- ' + this._descriptionForCommand(TerminalCommandId.GoToRecentDirectory, goToRecent, goToRecentNoKb)); } content.push(this._descriptionForCommand(TerminalCommandId.OpenDetectedLink, openDetectedLink, openDetectedLinkNoKb)); content.push(this._descriptionForCommand(TerminalCommandId.NewWithProfile, newWithProfile, newWithProfileNoKb)); content.push(accessibilitySettings); content.push(readMoreLink, dismiss); const element = renderElementAsMarkdown(this._markdownRenderer, this._openerService, content.join('nn'), this._register(new DisposableStore())); const anchorElements = element.querySelectorAll('a');"} {"_id":"doc-en-vscode-3fc132c40639be9de7acfd4ec71548cca0d5bcc3c9f66ff9049baf44552fa2c9","title":"","text":".traceback.wordWrap span { white-space: pre-wrap; } .output > .scrollable { .output .scrollable { overflow-y: scroll; max-height: var(--notebook-cell-output-max-height); border: var(--vscode-editorWidget-border);"} {"_id":"doc-en-vscode-a6d2cfcbe59353de1425c1aae7c74cba3d9daf2f4562761470a7a8b9a4783eb5","title":"","text":"} function scrollableArrayOfString(id: string, buffer: string[], container: HTMLElement, trustHtml: boolean) { container.classList.add('scrollable'); const scrollableDiv = document.createElement('div'); scrollableDiv.classList.add('scrollable'); if (buffer.length > 5000) { container.appendChild(generateViewMoreElement(id, false)); } const div = document.createElement('div'); container.appendChild(div); div.appendChild(handleANSIOutput(buffer.slice(0, 5000).join('n'), trustHtml)); container.appendChild(scrollableDiv); scrollableDiv.appendChild(handleANSIOutput(buffer.slice(0, 5000).join('n'), trustHtml)); } export function insertOutput(id: string, outputs: string[], linesLimit: number, scrollable: boolean, container: HTMLElement, trustHtml: boolean) {"} {"_id":"doc-en-vscode-a496df927a59b4e7b68d87132ab14a1775356385fe9aa554f2b2498d4d8f63b8","title":"","text":"storageId: 'workbench.explorer.views.state', icon: explorerViewIcon, alwaysUseContainerInfo: true, hideIfEmpty: true, order: 0, openCommandActionDescriptor: { id: VIEWLET_ID,"} {"_id":"doc-en-vscode-635495ca396b526a54311a9c758d41b78bc3a8f5823d4d43549de35e55636295","title":"","text":"} }; function scrollWillGoToParent(event: WheelEvent) { let scrollTimeout: any /* NodeJS.Timeout */ | undefined; let scrolledElement: Element | undefined; function flagRecentlyScrolled(node: Element) { scrolledElement = node; node.setAttribute('recentlyScrolled', 'true'); clearTimeout(scrollTimeout); scrollTimeout = setTimeout(() => { scrolledElement?.removeAttribute('recentlyScrolled'); }, 300); } function eventTargetShouldHandleScroll(event: WheelEvent) { for (let node = event.target as Node | null; node; node = node.parentNode) { if (!(node instanceof Element) || node.id === 'container' || node.classList.contains('cell_container') || node.classList.contains('markup') || node.classList.contains('output_container')) { return false; } if (node.hasAttribute('recentlyScrolled') && scrolledElement === node) { flagRecentlyScrolled(node); return true; } // scroll up if (event.deltaY < 0 && node.scrollTop > 0) { // there is still some content to scroll flagRecentlyScrolled(node); return true; }"} {"_id":"doc-en-vscode-71c52a126e22a782475b4c24bffe3b941fb05840dcde759aff97bcfcf57bfe12","title":"","text":"continue; } flagRecentlyScrolled(node); return true; } }"} {"_id":"doc-en-vscode-3b59681b9922192daa4eebee3d7562575052f2d7073e4f3c205dd1f3f29e1046","title":"","text":"} const handleWheel = (event: WheelEvent & { wheelDeltaX?: number; wheelDeltaY?: number; wheelDelta?: number }) => { if (event.defaultPrevented || scrollWillGoToParent(event)) { if (event.defaultPrevented || eventTargetShouldHandleScroll(event)) { return; } postNotebookMessage('did-scroll-wheel', {"} {"_id":"doc-en-vscode-64c844d5624118189173de521f5ccaa26eb18c80e4e40f40cca346d12f8ed0c8","title":"","text":"} if (node.hasAttribute('recentlyScrolled')) { if (lastTimeScrolled && Date.now() - lastTimeScrolled > 300) { if (lastTimeScrolled && Date.now() - lastTimeScrolled > 400) { // it has been a while since we actually scrolled // if scroll velocity increases, it's likely a new scroll event if (!!previousDelta && deltaY < 0 && deltaY < previousDelta - 2) { // if scroll velocity increases significantly, it's likely a new scroll event if (!!previousDelta && deltaY < 0 && deltaY < previousDelta - 8) { clearTimeout(scrollTimeout); scrolledElement?.removeAttribute('recentlyScrolled'); return false; } else if (!!previousDelta && deltaY > 0 && deltaY > previousDelta + 2) { } else if (!!previousDelta && deltaY > 0 && deltaY > previousDelta + 8) { clearTimeout(scrollTimeout); scrolledElement?.removeAttribute('recentlyScrolled'); return false;"} {"_id":"doc-en-vscode-fde9adc357e2c717f7e689d3e971de6f5d349833f5b1603817f17c8f571bfe2e","title":"","text":"private _tabFocusTerminal: boolean = false; private _tabFocusEditor: boolean = false; private readonly _onDidChangeTabFocus = new Emitter(); public readonly onDidChangeTabFocus: Event = this._onDidChangeTabFocus.event; private readonly _onDidChangeTabFocus = new Emitter(); public readonly onDidChangeTabFocus: Event = this._onDidChangeTabFocus.event; public getTabFocusMode(context: TabFocusContext): boolean { return context === TabFocusContext.Terminal ? this._tabFocusTerminal : this._tabFocusEditor; } public setTabFocusMode(tabFocusMode: boolean, context: TabFocusContext): void { if ((context === TabFocusContext.Terminal && this._tabFocusTerminal === tabFocusMode) || (context === TabFocusContext.Editor && this._tabFocusEditor === tabFocusMode)) { return; } if (context === TabFocusContext.Terminal) { this._tabFocusTerminal = tabFocusMode; } else { this._tabFocusEditor = tabFocusMode; } this._onDidChangeTabFocus.fire(this._tabFocusTerminal); this._onDidChangeTabFocus.fire(); } }"} {"_id":"doc-en-vscode-d06c905bbafc0618cc255e4fc9c7b45c2f29f4a791815a08a9f37511a51ae2e0","title":"","text":"private readonly languageElement = this._register(new MutableDisposable()); private readonly metadataElement = this._register(new MutableDisposable()); private readonly currentProblemStatus: ShowCurrentMarkerInStatusbarContribution = this._register(this.instantiationService.createInstance(ShowCurrentMarkerInStatusbarContribution)); private _previousViewContext: 'terminal' | 'editor' | undefined; private readonly state = new State(); private readonly activeEditorListeners = this._register(new DisposableStore()); private readonly delayedRender = this._register(new MutableDisposable());"} {"_id":"doc-en-vscode-f707fd00cc8d4842d3257ad34327da4e27413cbb6c6d1f1300a4cf6594293a70","title":"","text":"this._register(this.textFileService.untitled.onDidChangeEncoding(model => this.onResourceEncodingChange(model.resource))); this._register(this.textFileService.files.onDidChangeEncoding(model => this.onResourceEncodingChange((model.resource)))); this._register(Event.runAndSubscribe(TabFocus.onDidChangeTabFocus, () => this.onTabFocusModeChange())); const viewKey = new Set(); viewKey.add('focusedView'); this._register(this.contextKeyService.onDidChangeContext((c) => { if (c.affectsSome(viewKey)) { const terminalFocus = this.contextKeyService.getContextKeyValue('focusedView') === 'terminal'; const context = terminalFocus ? 'terminal' : 'editor'; if (this._previousViewContext === context) { return; } this._previousViewContext = context; this.onTabFocusModeChange(); } })); } private registerCommands(): void {"} {"_id":"doc-en-vscode-3055ad44f7eb9a19cc25aea2431c7d8c2b0a9917c90cf10ef83147e3d1ba03d8","title":"","text":"import { Schemas } from 'vs/base/common/network'; import { TabFocus, TabFocusContext } from 'vs/editor/browser/config/tabFocus'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { ILabelService } from 'vs/platform/label/common/label'; import { TerminalSettingId } from 'vs/platform/terminal/common/terminal'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions';"} {"_id":"doc-en-vscode-36cd6812d2d9edbc285f794dd554cc10654205aaddee0e29b0b1dfd9b81e9547","title":"","text":"@ITerminalService terminalService: ITerminalService, @ITerminalEditorService terminalEditorService: ITerminalEditorService, @ITerminalGroupService terminalGroupService: ITerminalGroupService, @IConfigurationService configurationService: IConfigurationService, @IContextKeyService contextKeyService: IContextKeyService @IConfigurationService configurationService: IConfigurationService ) { super();"} {"_id":"doc-en-vscode-c2ce0397ec5c6d6287affc13340af71fe6f0ba7f56787850785381dc590bca68","title":"","text":"} }); const viewKey = new Set(); viewKey.add('focusedView'); TabFocus.setTabFocusMode(configurationService.getValue('editor.tabFocusMode'), TabFocusContext.Editor); TabFocus.setTabFocusMode(configurationService.getValue(TerminalSettingId.TabFocusMode), TabFocusContext.Terminal); this._register(contextKeyService.onDidChangeContext((c) => { if (c.affectsSome(viewKey)) { if (contextKeyService.getContextKeyValue('focusedView') === 'terminal') { TabFocus.setTabFocusMode(configurationService.getValue(TerminalSettingId.TabFocusMode), TabFocusContext.Terminal); } else { TabFocus.setTabFocusMode(configurationService.getValue('editor.tabFocusMode'), TabFocusContext.Editor); } } })); } }"} {"_id":"doc-en-vscode-e7ea7586170cb9a256be8365f20a5d7a8595f165c961e329ceb4f31c3168280d","title":"","text":"switch (changeType) { case ChangeType.Add: audioCueService.playAudioCue(AudioCue.diffLineInserted, true); break; case ChangeType.Delete: audioCueService.playAudioCue(AudioCue.diffLineDeleted, true); break; case ChangeType.Modify: audioCueService.playAudioCue(AudioCue.diffLineModified, true); break; } }"} {"_id":"doc-en-vscode-eacc8a76793d7ea1aecece3932050b8b30a9fc51db2488015e8402bb94bafc6f","title":"","text":"const sound = this.sounds.get(url); if (sound) { sound.volume = this.getVolumeInPercent() / 100; sound.currentTime = 0; await sound.play(); } else { const playedSound = await playAudio(url, this.getVolumeInPercent() / 100);"} {"_id":"doc-en-vscode-888f39ea49bab4394093ee4ef388e321a86c09caa46d7f62ad74873555f44cdd","title":"","text":"function areLanguageDiagnosticSettingsEqual(currentSettings: LanguageDiagnosticSettings, newSettings: LanguageDiagnosticSettings): boolean { return currentSettings.validate === newSettings.validate && currentSettings.enableSuggestions && currentSettings.enableSuggestions; && currentSettings.enableSuggestions === newSettings.enableSuggestions; } class DiagnosticSettings {"} {"_id":"doc-en-vscode-ca8620e5a4384c905ea8c918ea5743db82e22d19ee7afdadfd9d55da90e52ec4","title":"","text":"import { CancellationToken } from 'vs/base/common/cancellation'; import { FuzzyScore } from 'vs/base/common/filters'; import { Iterable } from 'vs/base/common/iterator'; import { RefCountedDisposable } from 'vs/base/common/lifecycle'; import { Disposable, RefCountedDisposable } from 'vs/base/common/lifecycle'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService'; import { EditorOption } from 'vs/editor/common/config/editorOptions';"} {"_id":"doc-en-vscode-831395b627add55b302823ead26aa6f87b6d07bdb53b3480f93b9c8a3c3786d2","title":"","text":"} export class SuggestInlineCompletions implements InlineCompletionsProvider { export class SuggestInlineCompletions extends Disposable implements InlineCompletionsProvider { private _lastResult?: InlineCompletionResults;"} {"_id":"doc-en-vscode-654916cf12b0cd91faa4b5a4c45f3f1c4e0cc74bedee563a192573b9c4b6f213","title":"","text":"@IClipboardService private readonly _clipboardService: IClipboardService, @ISuggestMemoryService private readonly _suggestMemoryService: ISuggestMemoryService, @ICodeEditorService private readonly _editorService: ICodeEditorService, ) { } ) { super(); this._store.add(_languageFeatureService.inlineCompletionsProvider.register('*', this)); } async provideInlineCompletions(model: ITextModel, position: Position, context: InlineCompletionContext, token: CancellationToken): Promise {"} {"_id":"doc-en-vscode-b2d9d5898ee6c603766061339c4aafa5b76e58028c6244e2e3c40ab21ca73273","title":"","text":"test('Aggressive inline completions when typing within line #146948', async function () { const completions: SuggestInlineCompletions = insta.createInstance(SuggestInlineCompletions); const completions: SuggestInlineCompletions = disposables.add(insta.createInstance(SuggestInlineCompletions)); { // (1,3), end of word -> suggestions"} {"_id":"doc-en-vscode-60c9a0dc75a8f384010bc6807766438e3f2b3a784f3e199701817e6943c85f18","title":"","text":"}); test('Snippets show in inline suggestions even though they are turned off #175190', async function () { const completions: SuggestInlineCompletions = insta.createInstance(SuggestInlineCompletions); const completions: SuggestInlineCompletions = disposables.add(insta.createInstance(SuggestInlineCompletions)); { // unfiltered"} {"_id":"doc-en-vscode-cf46f9dd71b31c500f50016df7aed0801de541253ef988195babe31e6a1134e6","title":"","text":"/** * Value-object describing what options formatting should use. */ export interface SortingOptions { /** * Size of a tab in spaces. */ tabSize: number; /** * Prefer spaces over tabs. */ insertSpaces: boolean; /** * Signature for further properties. */ [key: string]: boolean | number | string; } /** * Value-object describing what options formatting should use. */ export interface FormattingOptions { /**"} {"_id":"doc-en-vscode-341936ae3190a582d42a57f038f05b28bf7fcd32dca35cc98f89654c10bc3242","title":"","text":"export const editorErrorBorder = registerColor('editorError.border', { dark: null, light: null, hcDark: Color.fromHex('#E47777').transparent(0.8), hcLight: '#B5200D' }, nls.localize('errorBorder', 'Border color of error boxes in the editor.')); export const editorWarningBackground = registerColor('editorWarning.background', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('editorWarning.background', 'Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations.'), true); export const editorWarningForeground = registerColor('editorWarning.foreground', { dark: '#CCA700', light: '#BF8803', hcDark: '#FFD37', hcLight: '#895503' }, nls.localize('editorWarning.foreground', 'Foreground color of warning squigglies in the editor.')); export const editorWarningForeground = registerColor('editorWarning.foreground', { dark: '#CCA700', light: '#BF8803', hcDark: '#FFD370', hcLight: '#895503' }, nls.localize('editorWarning.foreground', 'Foreground color of warning squigglies in the editor.')); export const editorWarningBorder = registerColor('editorWarning.border', { dark: null, light: null, hcDark: Color.fromHex('#FFCC00').transparent(0.8), hcLight: '#' }, nls.localize('warningBorder', 'Border color of warning boxes in the editor.')); export const editorInfoBackground = registerColor('editorInfo.background', { dark: null, light: null, hcDark: null, hcLight: null }, nls.localize('editorInfo.background', 'Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations.'), true);"} {"_id":"doc-en-vscode-61a2ab4c378c431acd21743a932eb2639459a800fa53c26121fda96d6f565aab","title":"","text":"try { const userDataProfilesExportState = disposables.add(this.instantiationService.createInstance(UserDataProfileExportState, this.userDataProfileService.currentProfile)); const barrier = new Barrier(); const exportAction = new BarrierAction(barrier, new Action('export', localize('export', \"Export\"), undefined, true, () => { const exportAction = new BarrierAction(barrier, new Action('export', localize('export', \"Export\"), undefined, true, async () => { exportAction.enabled = false; return this.doExportProfile(userDataProfilesExportState); })); const closeAction = new BarrierAction(barrier, new Action('close', localize('close', \"Close\"))); try { await this.doExportProfile(userDataProfilesExportState); } catch (error) { this.notificationService.error(error); throw error; } }), this.notificationService); const closeAction = new BarrierAction(barrier, new Action('close', localize('close', \"Close\")), this.notificationService); await this.showProfilePreviewView(EXPORT_PROFILE_PREVIEW_VIEW, userDataProfilesExportState.profile.name, exportAction, closeAction, true, userDataProfilesExportState); disposables.add(this.userDataProfileService.onDidChangeCurrentProfile(e => barrier.open())); await barrier.wait();"} {"_id":"doc-en-vscode-9de7296003f74e7516fd106f975735fabd6d56025e65229aff3c3f052f02f84d","title":"","text":"if (!profileContentHandler) { return; } const saveResult = await profileContentHandler.saveProfile(profile.name, JSON.stringify(profile), CancellationToken.None); const saveResult = await profileContentHandler.saveProfile(profile.name.replace('/', '-'), JSON.stringify(profile), CancellationToken.None); if (!saveResult) { return; }"} {"_id":"doc-en-vscode-3435bd375814dd9179f914914eee4cd841a1db786fe31eae3bc4ad5eec5d4344","title":"","text":": importAction; const secondaryAction = isWeb ? importAction : new BarrierAction(barrier, new Action('close', localize('close', \"Close\"))); : new BarrierAction(barrier, new Action('close', localize('close', \"Close\")), this.notificationService); const view = await this.showProfilePreviewView(IMPORT_PROFILE_PREVIEW_VIEW, importedProfile.name, primaryAction, secondaryAction, false, userDataProfileImportState); const message = new MarkdownString();"} {"_id":"doc-en-vscode-4aee1b1e45a8aa54775f482473a97ed655124eeb7b96febb550e70f671e0e26d","title":"","text":"if (userDataProfileImportState.isEmpty()) { await importAction.run(); } else { await this.showProfilePreviewView(IMPORT_PROFILE_PREVIEW_VIEW, profileTemplate.name, importAction, new BarrierAction(barrier, new Action('cancel', localize('cancel', \"Cancel\"))), false, userDataProfileImportState); await this.showProfilePreviewView(IMPORT_PROFILE_PREVIEW_VIEW, profileTemplate.name, importAction, new BarrierAction(barrier, new Action('cancel', localize('cancel', \"Cancel\")), this.notificationService), false, userDataProfileImportState); } await barrier.wait(); await this.hideProfilePreviewView(IMPORT_PROFILE_PREVIEW_VIEW);"} {"_id":"doc-en-vscode-cd72ca88796a1617ac75a61548eadefd9259e787a94744bc8534a63a985e2491","title":"","text":"location: IMPORT_PROFILE_PREVIEW_VIEW, }, () => importProfileFn()); } })); }), this.notificationService); return importAction; }"} {"_id":"doc-en-vscode-810b66960388b40e0521ae85fe0f55d0bb60b3fcc9519a82c32ef60ceac6c962","title":"","text":"} class BarrierAction extends Action { constructor(barrier: Barrier, action: Action) { constructor(barrier: Barrier, action: Action, notificationService: INotificationService) { super(action.id, action.label, action.class, action.enabled, async () => { await action.run(); try { await action.run(); } catch (error) { notificationService.error(error); throw error; } barrier.open(); }); }"} {"_id":"doc-en-vscode-f12d57e2a9806e30d6a09eecdb3c5e33132bf42b01404a866729bd21f9476f89","title":"","text":"*--------------------------------------------------------------------------------------------*/ import { networkInterfaces } from 'os'; import * as errors from 'vs/base/common/errors'; import { TernarySearchTree } from 'vs/base/common/ternarySearchTree'; import * as uuid from 'vs/base/common/uuid'; import { getMac } from 'vs/base/node/macAddress';"} {"_id":"doc-en-vscode-7ac14a174eda1c27468639679fa585051f76549934b6f0b81541fa6db1302977","title":"","text":"}; let machineId: Promise; export async function getMachineId(): Promise { export async function getMachineId(errorLogger: (error: any) => void): Promise { if (!machineId) { machineId = (async () => { const id = await getMacMachineId(); const id = await getMacMachineId(errorLogger); return id || uuid.generateUuid(); // fallback, generate a UUID })();"} {"_id":"doc-en-vscode-4dc4f7ad2baab40e678c2369d6eb42788cb3e4a1bd743e58e51cda8d215b66e7","title":"","text":"return machineId; } async function getMacMachineId(): Promise { async function getMacMachineId(errorLogger: (error: any) => void): Promise { try { const crypto = await import('crypto'); const macAddress = getMac(); return crypto.createHash('sha256').update(macAddress, 'utf8').digest('hex'); } catch (err) { errors.onUnexpectedError(err); errorLogger(err); return undefined; } }"} {"_id":"doc-en-vscode-3e4a88dacf8f2b6e6e19aa9d772f62e3dafd76c8360d062577f2624f166cfe01","title":"","text":"flakySuite('ID', () => { test('getMachineId', async function () { const id = await getMachineId(); const errors = []; const id = await getMachineId(err => errors.push(err)); assert.ok(id); assert.strictEqual(errors.length, 0); }); test('getMac', async () => {"} {"_id":"doc-en-vscode-fe809c58a21f5b5375a68e005b2857443d0ef12f546b23503a40d68a4643c7e1","title":"","text":"// Resolve unique machine ID this.logService.trace('Resolving machine identifier...'); const machineId = await resolveMachineId(this.stateService); const machineId = await resolveMachineId(this.stateService, this.logService); this.logService.trace(`Resolved machine identifier: ${machineId}`); // Shared process"} {"_id":"doc-en-vscode-da2fcd7a4da9c6421ae6132be991899d4c9596114b29b2aed3624ca16a932c4d","title":"","text":"commonProperties: (async () => { let machineId: string | undefined = undefined; try { machineId = await resolveMachineId(stateService); machineId = await resolveMachineId(stateService, logService); } catch (error) { if (error.code !== 'ENOENT') { logService.error(error);"} {"_id":"doc-en-vscode-4a845f5d79a9dc3d60026a3b9f68128db10b6430c06e9198cc326f9b943dbe85","title":"","text":"* Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { ILogService } from 'vs/platform/log/common/log'; import { IStateService } from 'vs/platform/state/node/state'; import { machineIdKey } from 'vs/platform/telemetry/common/telemetry'; import { resolveMachineId as resolveNodeMachineId } from 'vs/platform/telemetry/node/telemetryUtils'; export async function resolveMachineId(stateService: IStateService) { export async function resolveMachineId(stateService: IStateService, logService: ILogService) { // Call the node layers implementation to avoid code duplication const machineId = await resolveNodeMachineId(stateService); const machineId = await resolveNodeMachineId(stateService, logService); stateService.setItem(machineIdKey, machineId); return machineId; }"} {"_id":"doc-en-vscode-5999991c9e3c48b6c4cc46f1736badf05248341eea1f3399b8538f4c148b043b","title":"","text":"import { isMacintosh } from 'vs/base/common/platform'; import { getMachineId } from 'vs/base/node/id'; import { ILogService } from 'vs/platform/log/common/log'; import { IStateReadService } from 'vs/platform/state/node/state'; import { machineIdKey } from 'vs/platform/telemetry/common/telemetry'; export async function resolveMachineId(stateService: IStateReadService) { export async function resolveMachineId(stateService: IStateReadService, logService: ILogService) { // We cache the machineId for faster lookups // and resolve it only once initially if not cached or we need to replace the macOS iBridge device let machineId = stateService.getItem(machineIdKey); if (typeof machineId !== 'string' || (isMacintosh && machineId === '6c9d2bc8f91b89624add29c0abeae7fb42bf539fa1cdb2e3e57cd668fa9bcead')) { machineId = await getMachineId(); machineId = await getMachineId(logService.error.bind(logService)); } return machineId;"} {"_id":"doc-en-vscode-137565c159f314e7a078e00efb6193b758ffc0c58f2f0fb1e2916c54271b07c7","title":"","text":"} const { installSourcePath } = this.environmentMainService; const machineId = await resolveMachineId(this.stateService); const machineId = await resolveMachineId(this.stateService, this.logService); const config: ITelemetryServiceConfig = { appenders,"} {"_id":"doc-en-vscode-080686b33db4a62f27f25b9f4043135062ab82679abd1d7485d66f6202d94e63","title":"","text":"const [, , machineId] = await Promise.all([ configurationService.initialize(), userDataProfilesService.init(), getMachineId() getMachineId(logService.error.bind(logService)) ]); const extensionHostStatusService = new ExtensionHostStatusService();"} {"_id":"doc-en-vscode-1bf219f5afd57329853a7abfb11910742bc28ae203a01b2316c9b7a94559d8e1","title":"","text":"\"default\": false, \"description\": \"%config.followTagsWhenSync%\" }, \"git.replaceTagsWhenPull\": { \"type\": \"boolean\", \"scope\": \"resource\", \"default\": false, \"description\": \"%config.replaceTagsWhenPull%\" }, \"git.promptToSaveFilesBeforeStash\": { \"type\": \"string\", \"enum\": ["} {"_id":"doc-en-vscode-5de6e624af6ae7ecea38eb8e1f0e8a33512e936f3e33693ed4846c46e922ee98","title":"","text":"\"config.decorations.enabled\": \"Controls whether Git contributes colors and badges to the Explorer and the Open Editors view.\", \"config.enableStatusBarSync\": \"Controls whether the Git Sync command appears in the status bar.\", \"config.followTagsWhenSync\": \"Push all annotated tags when running the sync command.\", \"config.replaceTagsWhenPull\": \"Automatically replace the local tags with the remote tags in case of a conflict when running the pull command.\", \"config.promptToSaveFilesBeforeStash\": \"Controls whether Git should check for unsaved files before stashing changes.\", \"config.promptToSaveFilesBeforeStash.always\": \"Check for any unsaved files.\", \"config.promptToSaveFilesBeforeStash.staged\": \"Check only for unsaved staged files.\","} {"_id":"doc-en-vscode-6a68a3ccca25290a6ac7207bc7763d43c27095e8505834f816a4f6721ac9b71c","title":"","text":"throw new Error(`Unable to extract tag names from error message: ${raw}`); } // Notification const replaceLocalTags = l10n.t('Replace Local Tag(s)'); const message = l10n.t('Unable to pull from remote repository due to conflicting tag(s): {0}. Would you like to resolve the conflict by replacing the local tag(s)?', tags.join(', ')); const choice = await window.showErrorMessage(message, { modal: true }, replaceLocalTags); const config = workspace.getConfiguration('git', Uri.file(this.repository.root)); const replaceTagsWhenPull = config.get('replaceTagsWhenPull', false) === true; if (!replaceTagsWhenPull) { // Notification const replaceLocalTags = l10n.t('Replace Local Tag(s)'); const replaceLocalTagsAlways = l10n.t('Always Replace Local Tag(s)'); const message = l10n.t('Unable to pull from remote repository due to conflicting tag(s): {0}. Would you like to resolve the conflict by replacing the local tag(s)?', tags.join(', ')); const choice = await window.showErrorMessage(message, { modal: true }, replaceLocalTags, replaceLocalTagsAlways); if (choice !== replaceLocalTags && choice !== replaceLocalTagsAlways) { return false; } if (choice !== replaceLocalTags) { return false; if (choice === replaceLocalTagsAlways) { await config.update('replaceTagsWhenPull', true, true); } } // Force fetch tags"} {"_id":"doc-en-vscode-8508de0d71eac319669e4bbd9f776495632bb94c0b6c3713a8decbfa8220655d","title":"","text":"import { IExtension, ExtensionState, IExtensionsWorkbenchService, VIEWLET_ID, IExtensionsViewPaneContainer, IExtensionContainer, TOGGLE_IGNORE_EXTENSION_ACTION_ID, SELECT_INSTALL_VSIX_EXTENSION_COMMAND_ID, THEME_ACTIONS_GROUP, INSTALL_ACTIONS_GROUP } from 'vs/workbench/contrib/extensions/common/extensions'; import { ExtensionsConfigurationInitialContent } from 'vs/workbench/contrib/extensions/common/extensionsFileTemplate'; import { IGalleryExtension, IExtensionGalleryService, ILocalExtension, InstallOptions, InstallOperation, TargetPlatformToString, ExtensionManagementErrorCode } from 'vs/platform/extensionManagement/common/extensionManagement'; import { IWorkbenchExtensionEnablementService, EnablementState, IExtensionManagementServerService, IExtensionManagementServer, IWorkbenchExtensionManagementService } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { IWorkbenchExtensionEnablementService, EnablementState, IExtensionManagementServerService, IExtensionManagementServer } from 'vs/workbench/services/extensionManagement/common/extensionManagement'; import { ExtensionRecommendationReason, IExtensionIgnoredRecommendationsService, IExtensionRecommendationsService } from 'vs/workbench/services/extensionRecommendations/common/extensionRecommendations'; import { areSameExtensions, getExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { ExtensionType, ExtensionIdentifier, IExtensionDescription, IExtensionManifest, isLanguagePackExtension, getWorkspaceSupportTypeMessage, TargetPlatform } from 'vs/platform/extensions/common/extensions';"} {"_id":"doc-en-vscode-cf3402c9678051dcbe5b10bd6b38b83e0a487425f0b342360dd97206547778f7","title":"","text":"import { IActionViewItemOptions, ActionViewItem } from 'vs/base/browser/ui/actionbar/actionViewItems'; import { EXTENSIONS_CONFIG, IExtensionsConfigContent } from 'vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig'; import { getErrorMessage, isCancellationError } from 'vs/base/common/errors'; import { IUserDataSyncEnablementService, SyncResource } from 'vs/platform/userDataSync/common/userDataSync'; import { IUserDataSyncEnablementService } from 'vs/platform/userDataSync/common/userDataSync'; import { ActionWithDropdownActionViewItem, IActionWithDropdownActionViewItemOptions } from 'vs/base/browser/ui/dropdown/dropdownActionViewItem'; import { IContextMenuProvider } from 'vs/base/browser/contextmenu'; import { ILogService } from 'vs/platform/log/common/log';"} {"_id":"doc-en-vscode-4b75f3ed7e934238aa399b132a2e21e559795c9ab1d0bfe4950f7adbb47a2e8a","title":"","text":"buttons: [{ label: localize('install anyway', \"Install Anyway\"), run: () => { const installAction = this.installOptions?.isMachineScoped ? this.instantiationService.createInstance(InstallAction, { donotVerifySignature: true }) : this.instantiationService.createInstance(InstallAndSyncAction, { donotVerifySignature: true }); const installAction = this.instantiationService.createInstance(InstallAction, { donotVerifySignature: true }); installAction.extension = this.extension; return installAction.run(); }"} {"_id":"doc-en-vscode-bedcef089ae0d9189475dc161bf660da677141f175e4f88603def4590826cc3f","title":"","text":"promptChoices.push({ label: localize('install release version', \"Install Release Version\"), run: () => { const installAction = this.installOptions?.isMachineScoped ? this.instantiationService.createInstance(InstallAction, { installPreReleaseVersion: !!this.installOptions.installPreReleaseVersion }) : this.instantiationService.createInstance(InstallAndSyncAction, { installPreReleaseVersion: !!this.installOptions?.installPreReleaseVersion }); const installAction = this.instantiationService.createInstance(InstallAction, { installPreReleaseVersion: !!this.installOptions?.installPreReleaseVersion }); installAction.extension = this.extension; return installAction.run(); }"} {"_id":"doc-en-vscode-a3ae48019b0dc26f9e394165c36a24cbbf760847d11ba31ed8a3418f2416f7d8","title":"","text":"} } export abstract class AbstractInstallAction extends ExtensionAction { export class InstallAction extends ExtensionAction { static readonly Class = `${ExtensionAction.LABEL_ACTION_CLASS} prominent install`;"} {"_id":"doc-en-vscode-f93827e1f239caae147e03f20198b9eaafd76f605832b72d84bb52b0f27f86e7","title":"","text":"} private readonly updateThrottler = new Throttler(); public readonly options: InstallOptions; constructor( id: string, readonly options: InstallOptions, cssClass: string, options: InstallOptions, @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, @IInstantiationService private readonly instantiationService: IInstantiationService, @IExtensionService private readonly runtimeExtensionService: IExtensionService,"} {"_id":"doc-en-vscode-e2dff1acafc1620f4c43035f2f7e88501941db638d2d0274793fdb617c96a8dc","title":"","text":"@IPreferencesService private readonly preferencesService: IPreferencesService, @ITelemetryService private readonly telemetryService: ITelemetryService, ) { super(id, localize('install', \"Install\"), cssClass, false); super('extensions.install', localize('install', \"Install\"), InstallAction.Class, false); this.options = { ...options, isMachineScoped: false }; this.update(); this._register(this.labelService.onDidChangeFormatters(() => this.updateLabel(), this)); }"} {"_id":"doc-en-vscode-94dd53f10d09558a2c7b66f88f66787f0e5a20dacccc7a3302a392818e16710d","title":"","text":"} private async install(extension: IExtension): Promise { const installOptions = this.getInstallOptions(); try { return await this.extensionsWorkbenchService.install(extension, installOptions); return await this.extensionsWorkbenchService.install(extension, this.options); } catch (error) { await this.instantiationService.createInstance(PromptExtensionInstallFailureAction, extension, extension.latestVersion, InstallOperation.Install, installOptions, error).run(); await this.instantiationService.createInstance(PromptExtensionInstallFailureAction, extension, extension.latestVersion, InstallOperation.Install, this.options, error).run(); return undefined; } }"} {"_id":"doc-en-vscode-8d14d59e199de7522db822b2f8a720c37d0f0ccff50798549ad83d452b19e713","title":"","text":"return localize('install', \"Install\"); } protected getInstallOptions(): InstallOptions { return this.options; } } export class InstallAction extends AbstractInstallAction { constructor( options: InstallOptions, @IExtensionsWorkbenchService extensionsWorkbenchService: IExtensionsWorkbenchService, @IInstantiationService instantiationService: IInstantiationService, @IExtensionService runtimeExtensionService: IExtensionService, @IWorkbenchThemeService workbenchThemeService: IWorkbenchThemeService, @ILabelService labelService: ILabelService, @IDialogService dialogService: IDialogService, @IPreferencesService preferencesService: IPreferencesService, @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, @IWorkbenchExtensionManagementService private readonly workbenchExtensionManagementService: IWorkbenchExtensionManagementService, @IUserDataSyncEnablementService protected readonly userDataSyncEnablementService: IUserDataSyncEnablementService, @ITelemetryService telemetryService: ITelemetryService, ) { super(`extensions.install`, options, InstallAction.Class, extensionsWorkbenchService, instantiationService, runtimeExtensionService, workbenchThemeService, labelService, dialogService, preferencesService, telemetryService); this.updateLabel(); this._register(labelService.onDidChangeFormatters(() => this.updateLabel(), this)); this._register(Event.any(userDataSyncEnablementService.onDidChangeEnablement, Event.filter(userDataSyncEnablementService.onDidChangeResourceEnablement, e => e[0] === SyncResource.Extensions))(() => this.update())); } override getLabel(primary?: boolean): string { const baseLabel = super.getLabel(primary); const donotSyncLabel = localize('do no sync', \"Do not sync\"); const isMachineScoped = this.getInstallOptions().isMachineScoped; // When remote connection exists if (this._manifest && this.extensionManagementServerService.remoteExtensionManagementServer) { const server = this.workbenchExtensionManagementService.getExtensionManagementServerToInstall(this._manifest); if (server === this.extensionManagementServerService.remoteExtensionManagementServer) { const host = this.extensionManagementServerService.remoteExtensionManagementServer.label; return isMachineScoped ? localize({ key: 'install extension in remote and do not sync', comment: [ 'First placeholder is install action label.', 'Second placeholder is the name of the action to install an extension in remote server and do not sync it. Placeholder is for the name of remote server.', 'Third placeholder is do not sync label.', ] }, \"{0} in {1} ({2})\", baseLabel, host, donotSyncLabel) : localize({ key: 'install extension in remote', comment: [ 'First placeholder is install action label.', 'Second placeholder is the name of the action to install an extension in remote server and do not sync it. Placeholder is for the name of remote server.', ] }, \"{0} in {1}\", baseLabel, host); } return isMachineScoped ? localize('install extension locally and do not sync', \"{0} Locally ({1})\", baseLabel, donotSyncLabel) : localize('install extension locally', \"{0} Locally\", baseLabel); } return isMachineScoped ? `${baseLabel} (${donotSyncLabel})` : baseLabel; } protected override getInstallOptions(): InstallOptions { return { ...super.getInstallOptions(), isMachineScoped: this.userDataSyncEnablementService.isEnabled() && this.userDataSyncEnablementService.isResourceEnabled(SyncResource.Extensions) }; } } export class InstallAndSyncAction extends AbstractInstallAction { constructor( options: InstallOptions, @IExtensionsWorkbenchService extensionsWorkbenchService: IExtensionsWorkbenchService, @IInstantiationService instantiationService: IInstantiationService, @IExtensionService runtimeExtensionService: IExtensionService, @IWorkbenchThemeService workbenchThemeService: IWorkbenchThemeService, @ILabelService labelService: ILabelService, @IDialogService dialogService: IDialogService, @IPreferencesService preferencesService: IPreferencesService, @IProductService productService: IProductService, @IUserDataSyncEnablementService private readonly userDataSyncEnablementService: IUserDataSyncEnablementService, @ITelemetryService telemetryService: ITelemetryService, ) { super('extensions.installAndSync', options, AbstractInstallAction.Class, extensionsWorkbenchService, instantiationService, runtimeExtensionService, workbenchThemeService, labelService, dialogService, preferencesService, telemetryService); this.tooltip = localize({ key: 'install everywhere tooltip', comment: ['Placeholder is the name of the product. Eg: Visual Studio Code or Visual Studio Code - Insiders'] }, \"Install this extension in all your synced {0} instances\", productService.nameLong); this._register(Event.any(userDataSyncEnablementService.onDidChangeEnablement, Event.filter(userDataSyncEnablementService.onDidChangeResourceEnablement, e => e[0] === SyncResource.Extensions))(() => this.update())); } protected override async computeAndUpdateEnablement(): Promise { await super.computeAndUpdateEnablement(); if (this.enabled) { this.enabled = this.userDataSyncEnablementService.isEnabled() && this.userDataSyncEnablementService.isResourceEnabled(SyncResource.Extensions); } } protected override getInstallOptions(): InstallOptions { return { ...super.getInstallOptions(), isMachineScoped: false }; } } export class InstallDropdownAction extends ActionWithDropDownAction { set manifest(manifest: IExtensionManifest | null) { this.extensionActions.forEach(a => (a).manifest = manifest); this.extensionActions.forEach(a => (a).manifest = manifest); this.update(); }"} {"_id":"doc-en-vscode-8e305f9f29bc24a3803468d3367bd1cd806c4ca392098bc07bbe693f1704ddcb","title":"","text":") { super(`extensions.installActions`, '', [ [ instantiationService.createInstance(InstallAndSyncAction, { installPreReleaseVersion: extensionsWorkbenchService.preferPreReleases }), instantiationService.createInstance(InstallAndSyncAction, { installPreReleaseVersion: !extensionsWorkbenchService.preferPreReleases }), ], [ instantiationService.createInstance(InstallAction, { installPreReleaseVersion: extensionsWorkbenchService.preferPreReleases }), instantiationService.createInstance(InstallAction, { installPreReleaseVersion: !extensionsWorkbenchService.preferPreReleases }), ] ]); } protected override getLabel(action: AbstractInstallAction): string { protected override getLabel(action: InstallAction): string { return action.getLabel(true); }"} {"_id":"doc-en-vscode-9e67a65fdb5092542bc65cc279546adaaf541a5af6b89534487ca3550effd104","title":"","text":"const range = match.range(); const matchText = match.text().substr(0, range.endColumn + 150); if (replace) { return nls.localize('replacePreviewResultAria', \"'{0}' at column {1} replace {2} with {3}\", matchText, range.startColumn + 1, matchString, match.replaceString); return nls.localize('replacePreviewResultAria', \"'{0}' at column {1} replace {2} with {3}\", matchText, range.startColumn, matchString, match.replaceString); } return nls.localize('searchResultAria', \"'{0}' at column {1} found {2}\", matchText, range.startColumn + 1, matchString); return nls.localize('searchResultAria', \"'{0}' at column {1} found {2}\", matchText, range.startColumn, matchString); } return null; }"} {"_id":"doc-en-vscode-f9dd0419addeb286b3d3ab75d8013d5458ef452ea0a05301b01299fd159b5bcc","title":"","text":"if (editorWidget) { // Ensure that the editor widget is binded. If if is, then this should return immediately. // Otherwise, it will bind the widget. await elemParent.bindNotebookEditorWidget(editorWidget); elemParent.bindNotebookEditorWidget(editorWidget); await elemParent.updateMatchesForEditorWidget(); const matchIndex = oldParentMatches.findIndex(e => e.id() === element.id());"} {"_id":"doc-en-vscode-64d7003dc9da03ae2625f38ec24cac679b9501dc3dd29ad688468d7a920512ab","title":"","text":"if (!this.tree.getFocus().includes(match) || !this.tree.getSelection().includes(match)) { this.tree.setSelection([match], getSelectionKeyboardEvent()); this.tree.setFocus([match]); } }"} {"_id":"doc-en-vscode-b259379d88947d548f1371c53856300a1b43485f283b81dd2306eac4e4a64258","title":"","text":"return; } this._webview.focusOutput(cell.id, this._webviewFocused); if (!options?.skipReveal) { this._webview.focusOutput(cell.id, this._webviewFocused); } cell.updateEditState(CellEditState.Preview, 'focusNotebookCell'); cell.focusMode = CellFocusMode.Output;"} {"_id":"doc-en-vscode-657532f66cb4a39ed9f19597666123d71fe4791bb23095ea26ddb8f72808a1ba","title":"","text":"if (e.ctrlKey || e.shiftKey) { return; } if (e.code === 'ArrowDown' || e.code === 'End' || e.code === 'ArrowUp' || e.code === 'Home') { if (e.code === 'ArrowDown' || e.code === 'ArrowUp' || e.code === 'End' || e.code === 'Home' || e.code === 'PageUp' || e.code === 'PageDown') { // These should change the scroll position, not adjust the selected cell in the notebook e.stopPropagation(); }"} {"_id":"doc-en-vscode-60f6d1f38d49ec8de034c04718a2451acf5bdeb21e63aed00aa11e1100d3e753","title":"","text":"*--------------------------------------------------------------------------------------------*/ import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { IEditorMouseEvent, IMouseTarget, IPartialEditorMouseEvent } from 'vs/editor/browser/editorBrowser'; import { IEditorMouseEvent, IMouseTarget, IMouseTargetViewZoneData, IPartialEditorMouseEvent, MouseTargetType } from 'vs/editor/browser/editorBrowser'; import { ICoordinatesConverter } from 'vs/editor/common/viewModel'; import { IMouseWheelEvent } from 'vs/base/browser/mouseEvent'; import { Position } from 'vs/editor/common/core/position'; export interface EventCallback { (event: T): void;"} {"_id":"doc-en-vscode-e99842a76293ef3a5f2509dca8733542f60e3592cc3a8c22e49dfdbeb0eed11a","title":"","text":"if (result.range) { result.range = coordinatesConverter.convertViewRangeToModelRange(result.range); } if (result.type === MouseTargetType.GUTTER_VIEW_ZONE || result.type === MouseTargetType.CONTENT_VIEW_ZONE) { result.detail = this.convertViewToModelViewZoneData(result.detail, coordinatesConverter); } return result; } private static convertViewToModelViewZoneData(data: IMouseTargetViewZoneData, coordinatesConverter: ICoordinatesConverter): IMouseTargetViewZoneData { return { viewZoneId: data.viewZoneId, positionBefore: data.positionBefore ? coordinatesConverter.convertViewPositionToModelPosition(data.positionBefore) : data.positionBefore, positionAfter: data.positionAfter ? coordinatesConverter.convertViewPositionToModelPosition(data.positionAfter) : data.positionAfter, position: coordinatesConverter.convertViewPositionToModelPosition(data.position), afterLineNumber: coordinatesConverter.convertViewPositionToModelPosition(new Position(data.afterLineNumber, 1)).lineNumber, }; } }"} {"_id":"doc-en-vscode-452180f34d137b7091cbee97716b653f45e26ea5755fc01a0a07197b7d24ae14","title":"","text":"})); // Revert change when an arrow is clicked. this._register(editor.onMouseUp(event => { this._register(editor.onMouseDown(event => { if (!event.event.rightButton && event.target.position && event.target.element?.className.includes('arrow-revert-change')) { const lineNumber = event.target.position.lineNumber; const viewZone = event.target as editorBrowser.IMouseTargetViewZone | undefined;"} {"_id":"doc-en-vscode-4860dd2155ca44c9e98341088196d8a2c3998b3f62297379593219789fbb678d","title":"","text":"} })); this._register(editor.onMouseUp((e: IEditorMouseEvent) => { this._register(editor.onMouseDown((e: IEditorMouseEvent) => { if (!e.event.rightButton) { return; }"} {"_id":"doc-en-vscode-143c5bc34cf57388bda692209d427267c77f662bc0853026c9421b02463037d6","title":"","text":"// group controllers by extension for (const group of groupBy(others, (a, b) => a.extension.value === b.extension.value ? 0 : 1)) { const extension = this._extensionService.extensions.find(extension => extension.identifier.value === group[0].extension.value); const source = extension?.description ?? group[0].extension.value; const source = extension?.displayName ?? extension?.description ?? group[0].extension.value; if (group.length > 1) { quickPickItems.push({ label: source,"} {"_id":"doc-en-vscode-733eff6abd8902430e904f4c3818053d04b1bf9392bae817980794ad4ffcea31","title":"","text":"\"inputOption.activeBackground\": \"#2489db82\", \"inputOption.activeBorder\": \"#2488db\", \"keybindingLabel.foreground\": \"#cccccc\", \"list.activeSelectionBackground\": \"#ffffff0f\", \"list.activeSelectionBackground\": \"#323232\", \"list.activeSelectionIconForeground\": \"#ffffff\", \"list.activeSelectionForeground\": \"#ffffff\", \"menu.background\": \"#1f1f1f\","} {"_id":"doc-en-vscode-3e0c1dd43b0f79ae9abd687c093ee396200308fe35111b3e612c86c372b5312f","title":"","text":"return cloneAndChange(data, value => { // If it's a trusted value it means it's okay to skip cleaning so we don't clean it if (value instanceof TelemetryTrustedValue || value.hasOwnProperty('isTrustedTelemetryValue')) { if (value instanceof TelemetryTrustedValue || Object.hasOwnProperty.call(value, 'isTrustedTelemetryValue')) { return value.value; }"} {"_id":"doc-en-vscode-7509d2e9c74abfffe9254e1d88b5e80edac1f30453ed14f82ebf89976bc03bf6","title":"","text":"} let index: number; if (this.editor.hasModel() && (typeof lineNumber === 'number')) { if (this.editor.hasModel() && (typeof lineNumber === 'number' || !this.widget.provider)) { index = this.model.findNextClosestChange(typeof lineNumber === 'number' ? lineNumber : this.editor.getPosition().lineNumber, true, this.widget.provider); } else { const providerChanges: number[] = this.model.mapChanges.get(this.widget.provider) ?? this.model.mapChanges.values().next().value;"} {"_id":"doc-en-vscode-1fd5dba1029fcc0c4b08f279842bc96f15dbe708761d3cefd3424f11ee261ef7","title":"","text":"const possibleChangesLength = possibleChanges.length; if (inclusive) { if ((getModifiedEndLineNumber(change.change) >= lineNumber) && (change.change.modifiedStartLineNumber <= lineNumber)) { if (getModifiedEndLineNumber(change.change) >= lineNumber) { if (preferredProvider && change.label !== preferredProvider) { possibleChanges.push(i); } else {"} {"_id":"doc-en-vscode-f712be3bbd8a507b478070ea097df0db60269746074588b4e974eb015c70e35d","title":"","text":"const lineResult = parseSearchResults(document, token)[position.line]; if (!lineResult) { return []; } if (lineResult.type === 'file') { return lineResult.allLocations; return lineResult.allLocations.map(l => ({ ...l, originSelectionRange: lineResult.location.originSelectionRange })); } const location = lineResult.locations.find(l => l.originSelectionRange.contains(position));"} {"_id":"doc-en-vscode-cb1409c85f8dbacabddc716fc3d5bd87909ec85cb3f4cf7e28aaebc25fec8b76","title":"","text":"{ label: 'fileBasename', detail: vscode.l10n.t(\"The current opened file's basename\") }, { label: 'fileBasenameNoExtension', detail: vscode.l10n.t(\"The current opened file's basename with no file extension\") }, { label: 'defaultBuildTask', detail: vscode.l10n.t(\"The name of the default build task. If there is not a single default build task then a quick pick is shown to choose the build task.\") }, { label: 'pathSeparator', detail: vscode.l10n.t(\"The character used by the operating system to separate components in file paths\") }, { label: 'pathSeparator', detail: vscode.l10n.t(\"The character used by the operating system to separate components in file paths. Is also aliased to '/'.\") }, { label: 'extensionInstallFolder', detail: vscode.l10n.t(\"The path where an an extension is installed.\"), param: 'publisher.extension' }, ].map(variable => ({ label: `${${variable.label}}`,"} {"_id":"doc-en-vscode-49d531929e72db87273e75423f546c3954b724b0deabb32bfa6ad051cf1239bf","title":"","text":"FileDirnameBasename = 'fileDirnameBasename', ExecPath = 'execPath', ExecInstallFolder = 'execInstallFolder', PathSeparator = 'pathSeparator' PathSeparator = 'pathSeparator', PathSeparatorAlias = '/' } export class VariableError extends Error {"} {"_id":"doc-en-vscode-06d47b894628238b53ae8e367146406abf2d70eb3863bef969d87df647725c42","title":"","text":"return match; } case 'pathSeparator': case '/': return paths.sep; default:"} {"_id":"doc-en-vscode-2ece2bc39e4341941355dcb20d49180c53fe68bae97cc5679e626d700c5cc091","title":"","text":"import { Disposable, IDisposable } from 'vs/base/common/lifecycle'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { Extensions, IViewContainersRegistry, IViewsRegistry, ViewContainer, ViewContainerLocation } from 'vs/workbench/common/views'; import { Attributes, AutoTunnelSource, IRemoteExplorerService, makeAddress, mapHasAddressLocalhostOrAllInterfaces, OnPortForward, PORT_AUTO_FORWARD_SETTING, PORT_AUTO_SOURCE_SETTING, PORT_AUTO_SOURCE_SETTING_HYBRID, PORT_AUTO_SOURCE_SETTING_OUTPUT, PORT_AUTO_SOURCE_SETTING_PROCESS, TUNNEL_VIEW_CONTAINER_ID, TUNNEL_VIEW_ID, TunnelSource } from 'vs/workbench/services/remote/common/remoteExplorerService'; import { Attributes, AutoTunnelSource, IRemoteExplorerService, makeAddress, mapHasAddressLocalhostOrAllInterfaces, OnPortForward, PORT_AUTO_FORWARD_SETTING, PORT_AUTO_SOURCE_SETTING, PORT_AUTO_SOURCE_SETTING_HYBRID, PORT_AUTO_SOURCE_SETTING_OUTPUT, PORT_AUTO_SOURCE_SETTING_PROCESS, Tunnel, TUNNEL_VIEW_CONTAINER_ID, TUNNEL_VIEW_ID, TunnelSource } from 'vs/workbench/services/remote/common/remoteExplorerService'; import { forwardedPortsViewEnabled, ForwardPortAction, OpenPortInBrowserAction, TunnelPanel, TunnelPanelDescriptor, TunnelViewModel, OpenPortInPreviewAction, openPreviewEnabledContext } from 'vs/workbench/contrib/remote/browser/tunnelView'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';"} {"_id":"doc-en-vscode-236cee824857dc43545fef1a0dd47e0eee3702fd8f169fdf2dd3d54833308c34","title":"","text":"private async handleCandidateUpdate(removed: Map) { const removedPorts: number[] = []; let autoForwarded: Set; let autoForwarded: Map; if (this.unforwardOnly) { autoForwarded = new Set(); autoForwarded = new Map(); for (const entry of this.remoteExplorerService.tunnelModel.forwarded.entries()) { if (entry[1].source.source === TunnelSource.Auto) { autoForwarded.add(entry[0]); autoForwarded.set(entry[0], entry[1]); } } } else { autoForwarded = this.autoForwarded; autoForwarded = new Map(this.autoForwarded.entries()); } for (const removedPort of removed) { const key = removedPort[0]; const value = removedPort[1]; if (autoForwarded.has(key)) { let value = removedPort[1]; const forwardedValue = mapHasAddressLocalhostOrAllInterfaces(autoForwarded, value.host, value.port); if (forwardedValue) { if (typeof forwardedValue === 'string') { this.autoForwarded.delete(key); } else { value = { host: forwardedValue.remoteHost, port: forwardedValue.remotePort }; } await this.remoteExplorerService.close(value); autoForwarded.delete(key); removedPorts.push(value.port); } else if (this.notifiedOnly.has(key)) { this.notifiedOnly.delete(key);"} {"_id":"doc-en-vscode-7ba1efe201105b120ebf6ec4deced8f57b26aab02c3fb37258c908ab4ff754ef","title":"","text":"import { IWorkbenchConstructionOptions, IWorkbench, ITunnel } from 'vs/workbench/browser/web.api'; import { BrowserStorageService } from 'vs/workbench/services/storage/browser/storageService'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { BufferLogger } from 'vs/platform/log/common/bufferLog'; import { FileLoggerService } from 'vs/platform/log/common/fileLog'; import { toLocalISOString } from 'vs/base/common/date'; import { isWorkspaceToOpen, isFolderToOpen } from 'vs/platform/window/common/window'; import { getSingleFolderWorkspaceIdentifier, getWorkspaceIdentifier } from 'vs/workbench/services/workspaces/browser/workspaces';"} {"_id":"doc-en-vscode-e42fe947547b6a2d5437329bce1c24b1b77a77952fbc2b4439f7d97ccf5bfc8b","title":"","text":"import { IStoredWorkspace } from 'vs/platform/workspaces/common/workspaces'; import { UserDataProfileInitializer } from 'vs/workbench/services/userDataProfile/browser/userDataProfileInit'; import { UserDataSyncInitializer } from 'vs/workbench/services/userDataSync/browser/userDataSyncInit'; import { BufferLogger } from 'vs/platform/log/common/bufferLog'; import { FileLoggerService } from 'vs/platform/log/common/fileLog'; export class BrowserMain extends Disposable {"} {"_id":"doc-en-vscode-477f57759f7109be89f7fa1b9df71382c5dfa3d22fd3236242fb6338b6ad9341","title":"","text":"const environmentService = new BrowserWorkbenchEnvironmentService(workspace.id, logsPath, this.configuration, productService); serviceCollection.set(IBrowserWorkbenchEnvironmentService, environmentService); // Log const logLevel = getLogLevel(environmentService); const bufferLogger = new BufferLogger(logLevel); const otherLoggers: ILogger[] = [new ConsoleLogger(logLevel)]; // Files const fileLogger = new BufferLogger(); const fileService = this._register(new FileService(fileLogger)); serviceCollection.set(IWorkbenchFileService, fileService); // Logger const loggerService = new FileLoggerService(getLogLevel(environmentService), logsPath, fileService); serviceCollection.set(ILoggerService, loggerService); // Log Service const otherLoggers: ILogger[] = [new ConsoleLogger(loggerService.getLogLevel())]; if (environmentService.isExtensionDevelopment && !!environmentService.extensionTestsLocationURI) { otherLoggers.push(new ConsoleLogInAutomationLogger(logLevel)); otherLoggers.push(new ConsoleLogInAutomationLogger(loggerService.getLogLevel())); } const logService = new LogService(bufferLogger, otherLoggers); const logger = loggerService.createLogger(environmentService.logFile, { id: windowLogId, name: localize('rendererLog', \"Window\") }); const logService = new LogService(logger, otherLoggers); serviceCollection.set(ILogService, logService); // Set the logger of the fileLogger after the log service is ready. // This is to avoid cyclic dependency fileLogger.logger = logService; // Register File System Providers depending on IndexedDB support // Register them early because they are needed for the profiles initialization await this.registerIndexedDBFileSystemProviders(environmentService, fileService, logService, loggerService, logsPath); // Remote const connectionToken = environmentService.options.connectionToken || getCookieValue(connectionTokenCookieName); const remoteAuthorityResolverService = new RemoteAuthorityResolverService(!environmentService.expectsResolverExtension, connectionToken, this.configuration.resourceUriProvider, productService, logService);"} {"_id":"doc-en-vscode-38900e1d4b8b1c5bb7ffe3a16ab0ca4d6425b79936fcdec15eeb7aa27f2f7b62","title":"","text":"// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // Files const fileService = this._register(new FileService(logService)); serviceCollection.set(IWorkbenchFileService, fileService); // Logger const loggerService = new FileLoggerService(logLevel, logsPath, fileService); serviceCollection.set(ILoggerService, loggerService); // Register File System Providers depending on IndexedDB support // Register them early because they are needed for the profiles initialization await this.registerIndexedDBFileSystemProviders(environmentService, fileService, bufferLogger, logService, loggerService, logsPath); // URI Identity const uriIdentityService = new UriIdentityService(fileService); serviceCollection.set(IUriIdentityService, uriIdentityService);"} {"_id":"doc-en-vscode-73fad4b7ab0c0bfd059d14d34ebd4e011972a200f78b3ab187b5c5772e70f6f8","title":"","text":"} } private async registerIndexedDBFileSystemProviders(environmentService: IWorkbenchEnvironmentService, fileService: IWorkbenchFileService, bufferLogger: BufferLogger, logService: ILogService, loggerService: ILoggerService, logsPath: URI): Promise { private async registerIndexedDBFileSystemProviders(environmentService: IWorkbenchEnvironmentService, fileService: IWorkbenchFileService, logService: ILogService, loggerService: ILoggerService, logsPath: URI): Promise { // IndexedDB is used for logging and user data let indexedDB: IndexedDB | undefined; const userDataStore = 'vscode-userdata-store';"} {"_id":"doc-en-vscode-28fb7f7b377082c781d5eb1f0eb507baefb8041daf35e50ad87f45dc7441cc01","title":"","text":"fileService.registerProvider(logsPath.scheme, new InMemoryFileSystemProvider()); } bufferLogger.logger = loggerService.createLogger(environmentService.logFile, { id: windowLogId, name: localize('rendererLog', \"Window\") }); // User data let userDataProvider; if (indexedDB) {"} {"_id":"doc-en-vscode-bf9390b5643f23e0e908cebc9bac1cc47d33a3dae6cbb114fda2ebc227365959","title":"","text":"const inputWidget = this.instantiationService.createInstance(SCMInputWidget, inputElement, this.overflowWidgetsDomNode); templateDisposable.add(inputWidget); return { inputWidget, elementDisposables: templateDisposable.add(new DisposableStore()), templateDisposable }; return { inputWidget, elementDisposables: new DisposableStore(), templateDisposable }; } renderElement(node: ITreeNode, index: number, templateData: InputTemplate): void {"} {"_id":"doc-en-vscode-9f2abb109954f88e60c6af70f87cb39d88a260ad76a4bf1a9f72333ed477f916","title":"","text":"// Remember widget this.inputWidgets.set(input, templateData.inputWidget); templateData.elementDisposables.add({ dispose: () => this.inputWidgets.delete(input) }); templateData.elementDisposables.add({ dispose: () => { this.inputWidgets.delete(input); this.contentHeights.delete(input); } }); // Widget cursor selections const selections = this.editorSelections.get(input);"} {"_id":"doc-en-vscode-3c558a74c4255f2382439b55f8be6a63cd3b31710548a9d5809a8c8d7c61d25b","title":"","text":"/** * Adds a status to the list. * @param status The status object. Ideally a single status object that does not change will be * shared as this call will no-op if the status is already set (checked by by object reference). * @param duration An optional duration in milliseconds of the status, when specified the status * will remove itself when the duration elapses unless the status gets re-added. */"} {"_id":"doc-en-vscode-c7499190d868aff2172f63ad0f0481bcb33259da4ed4d57240a5f6c4a04c3eee","title":"","text":"const timeout = window.setTimeout(() => this.remove(status), duration); this._statusTimeouts.set(status.id, timeout); } const existingStatus = this._statuses.get(status.id); if (existingStatus && existingStatus !== status) { this._onDidRemoveStatus.fire(existingStatus); this._statuses.delete(existingStatus.id); } if (!this._statuses.has(status.id)) { const oldPrimary = this.primary; this._statuses.set(status.id, status);"} {"_id":"doc-en-vscode-17435e88ee9141f1aacf0089e72c674c233cc48254d4b6de936baa26222339f6","title":"","text":"if (oldPrimary !== newPrimary) { this._onDidChangePrimaryStatus.fire(newPrimary); } } else { this._statuses.set(status.id, status); // It maybe the case that status hasn't changed, there isn't a good way to check this based on // `ITerminalStatus`, so just fire the event anyway. this._onDidAddStatus.fire(status); } }"} {"_id":"doc-en-vscode-7250e169021d1820be1226cbe175396aa5ee90e71778c8a875d26dd5abc8eee4","title":"","text":"strictEqual(list.statuses[1].icon!.id, Codicon.zap.id, 'zap~spin should have animation removed only'); }); test('add should fire onDidRemoveStatus if same status id with a different object reference was added', () => { const eventCalls: string[] = []; list.onDidAddStatus(() => eventCalls.push('add')); list.onDidRemoveStatus(() => eventCalls.push('remove')); list.add({ id: 'test', severity: Severity.Info }); list.add({ id: 'test', severity: Severity.Info }); deepStrictEqual(eventCalls, [ 'add', 'remove', 'add' ]); }); test('remove', () => { list.add({ id: 'info', severity: Severity.Info }); list.add({ id: 'warning', severity: Severity.Warning });"} {"_id":"doc-en-vscode-8ba9e76512695e2b359f57c3cdd2c2b4399b25e809726f8713db9827f1345e5d","title":"","text":"if (response === 2) { shell.openExternal('https://aka.ms/vscode-windows-unc'); return this.onUNCHostNotAllowed(path, options); // keep showing the dialog until decision (https://github.com/microsoft/vscode/issues/181956) } return undefined;"} {"_id":"doc-en-vscode-d28fcf89f98ca5c078be46680f6306a2b5f01cad240f7fad2dd9281592aeba61","title":"","text":"import { Categories } from 'vs/platform/action/common/actionCommonCategories'; import { IWorkingCopyBackupService } from 'vs/workbench/services/workingCopy/common/workingCopyBackup'; import { ResolutionResult, ResultKind } from 'vs/platform/keybinding/common/keybindingResolver'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; import { IOutputService } from 'vs/workbench/services/output/common/output'; import { windowLogId } from 'vs/workbench/services/log/common/logConstants'; class InspectContextKeysAction extends Action2 {"} {"_id":"doc-en-vscode-b64d867e054a980b3d234ac75fb0de2b0376e05836ac03b83433d98a7ea4bdf6","title":"","text":"} run(accessor: ServicesAccessor): void { accessor.get(IStorageService).log(); const storageService = accessor.get(IStorageService); const dialogService = accessor.get(IDialogService); storageService.log(); dialogService.info(localize('storageLogDialogMessage', \"The storage database contents have been logged to the developer tools.\"), localize('storageLogDialogDetails', \"Open developer tools from the menu and select the Console tab.\")); } }"} {"_id":"doc-en-vscode-59569725db512f96f2d790481e914e5fbff62d2cae62f646687fdfd3bd546639","title":"","text":"const workingCopyService = accessor.get(IWorkingCopyService); const workingCopyBackupService = accessor.get(IWorkingCopyBackupService); const logService = accessor.get(ILogService); const outputService = accessor.get(IOutputService); const backups = await workingCopyBackupService.getBackups();"} {"_id":"doc-en-vscode-71e30c3dbd054bcaa5b51d64d5d71d4903ff794c6f9ce8472151c4ed76116eaf","title":"","text":"]; logService.info(msg.join('n')); outputService.showChannel(windowLogId, true); } }"} {"_id":"doc-en-vscode-f27fb48b975ceb9dd0759ddcbcd0ee03fdc89518901ea5338584d9859a24df6a","title":"","text":"EditorOption.ariaLabel, 'ariaLabel', nls.localize('editorViewAccessibleLabel', \"Editor content\") )), screenReaderAnnounceInlineSuggestion: register(new EditorBooleanOption( EditorOption.screenReaderAnnounceInlineSuggestion, 'screenReaderAnnounceInlineSuggestion', false, EditorOption.screenReaderAnnounceInlineSuggestion, 'screenReaderAnnounceInlineSuggestion', true, { description: nls.localize('screenReaderAnnounceInlineSuggestion', \"Control whether inline suggestions are announced by a screen reader.\"), tags: ['accessibility']"} {"_id":"doc-en-vscode-218929e60f9861f65451950ce872126db14715dbd94d6a1e1bdc664b030ab4a7","title":"","text":"'xterm-addon-canvas': `${baseNodeModulesPath}/xterm-addon-canvas/lib/xterm-addon-canvas.js`, 'xterm-addon-image': `${baseNodeModulesPath}/xterm-addon-image/lib/xterm-addon-image.js`, 'xterm-addon-search': `${baseNodeModulesPath}/xterm-addon-search/lib/xterm-addon-search.js`, 'xterm-addon-serialize': `${baseNodeModulesPath}/xterm-addon-serialize/lib/xterm-addon-serialize.js`, 'xterm-addon-unicode11': `${baseNodeModulesPath}/xterm-addon-unicode11/lib/xterm-addon-unicode11.js`, 'xterm-addon-webgl': `${baseNodeModulesPath}/xterm-addon-webgl/lib/xterm-addon-webgl.js`, '@vscode/iconv-lite-umd': `${baseNodeModulesPath}/@vscode/iconv-lite-umd/lib/iconv-lite-umd.js`,"} {"_id":"doc-en-vscode-5c9aebbe602fa2496232a2c0ff29e53b5e056e4ad7dcfb1085571baab4d1d1dd","title":"","text":"entryId, name: item.entry.name, text: item.entry.text, command: typeof item.entry.command === 'string' ? item.entry.command : undefined, command: typeof item.entry.command === 'string' ? item.entry.command : typeof item.entry.command === 'object' ? item.entry.command.id : undefined, priority: item.priority, alignLeft: item.alignment === StatusbarAlignment.LEFT };"} {"_id":"doc-en-vscode-ae2484f3fefb68c8f492b0b8a5a8eb8aa1fd8c2ee6c044f1feaca33514ccf46f","title":"","text":"ExtensionIdentifier.toKey(entry.description.identifier), candidate.name ?? entry.description.displayName ?? entry.description.name, candidate.text, undefined, undefined, undefined, undefined, undefined, candidate.command ? { id: candidate.command, title: candidate.name } : undefined, undefined, undefined, candidate.alignment === 'left', candidate.priority, undefined"} {"_id":"doc-en-vscode-f57e004fd27a62eca19123e315abf8a0d196f1f9ffcb404e685be8ccb6548203","title":"","text":"throw e; } let label; if (claims.name && claims.email) { label = `${claims.name} - ${claims.email}`; } else { label = claims.email ?? claims.unique_name ?? claims.preferred_username ?? 'user@example.com'; } const id = `${claims.tid}/${(claims.oid ?? (claims.altsecid ?? '' + claims.ipd ?? ''))}`; const sessionId = existingId || `${id}/${randomUUID()}`; this._logger.trace(`[${scopeData.scopeStr}] '${sessionId}' Token response parsed successfully.`);"} {"_id":"doc-en-vscode-e1114950e43ff12ef85837341c6b61b4855a0d3ab9145b921fa563a72b5dac7f","title":"","text":"scope: scopeData.scopeStr, sessionId, account: { label, label: claims.email ?? claims.preferred_username ?? claims.unique_name ?? 'user@example.com', id, type: claims.tid === MSA_TID || claims.tid === MSA_PASSTHRU_TID ? MicrosoftAccountType.MSA : MicrosoftAccountType.AAD }"} {"_id":"doc-en-vscode-da33159f2d7fdb0ab8e01dfebddd69ab63ec3d32911a782294f3e07ee2b12414","title":"","text":"if (account.canSignOut) { const signOutAction = disposables.add(new Action('signOut', localize('signOut', \"Sign Out\"), undefined, true, async () => { const allSessions = await this.authenticationService.getSessions(providerId); const sessionsForAccount = allSessions.filter(s => s.account.id === account.id); const sessionsForAccount = allSessions.filter(s => s.account.label === account.label); return await this.authenticationService.removeAccountSessions(providerId, account.label, sessionsForAccount); })); providerSubMenuActions.push(signOutAction);"} {"_id":"doc-en-vscode-a77f1c8bd857b97085af1b0b96ff872fddb15f55a69660d25570ef23b4c79ac8","title":"","text":"private async addOrUpdateAccount(providerId: string, account: AuthenticationSessionAccount): Promise { let accounts = this.groupedAccounts.get(providerId); if (accounts) { const existingAccount = accounts.find(a => a.id === account.id); if (existingAccount) { // Update the label if it has changed if (existingAccount.label !== account.label) { existingAccount.label = account.label; } return; } } else { if (!accounts) { accounts = []; this.groupedAccounts.set(providerId, accounts); } const sessionFromEmbedder = await this.sessionFromEmbedder.value; // If the session stored from the embedder allows sign out, then we can treat it and all others as sign out-able let canSignOut = !!sessionFromEmbedder?.canSignOut; if (!canSignOut) { if (sessionFromEmbedder?.id) { const sessions = (await this.authenticationService.getSessions(providerId)).filter(s => s.account.id === account.id); canSignOut = !sessions.some(s => s.id === sessionFromEmbedder.id); } else { // The default if we don't have a session from the embedder is to allow sign out canSignOut = true; } let canSignOut = true; if ( sessionFromEmbedder\t\t\t\t\t\t\t\t\t\t\t\t// if we have a session from the embedder && !sessionFromEmbedder.canSignOut\t\t\t\t\t\t\t\t// and that session says we can't sign out && (await this.authenticationService.getSessions(providerId))\t// and that session is associated with the account we are adding/updating .some(s => s.id === sessionFromEmbedder.id && s.account.id === account.id ) ) { canSignOut = false; } accounts.push({ ...account, canSignOut }); const existingAccount = accounts.find(a => a.label === account.label); if (existingAccount) { // if we have an existing account and we discover that we // can't sign out of it, update the account to mark it as \"can't sign out\" if (!canSignOut) { existingAccount.canSignOut = canSignOut; } } else { accounts.push({ ...account, canSignOut }); } } private removeAccount(providerId: string, account: AuthenticationSessionAccount): void {"} {"_id":"doc-en-vscode-9120e7133451b2006ff58dacf2cd08d7f9a3fd3126d01add961f82e9a505f8e6","title":"","text":"\"ts-loader\": \"^9.4.2\", \"ts-node\": \"^10.9.1\", \"tsec\": \"0.1.4\", \"typescript\": \"^5.2.0-dev.20230524\", \"typescript\": \"^5.2.0-dev.20230602\", \"typescript-formatter\": \"7.1.0\", \"underscore\": \"^1.12.1\", \"util\": \"^0.12.4\","} {"_id":"doc-en-vscode-cc1f0c6af42de75b918cf39e267f173717bde57d893c34db333493667cce29d3","title":"","text":"resolved \"https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6\" integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ== typescript@^5.2.0-dev.20230524: version \"5.2.0-dev.20230524\" resolved \"https://registry.yarnpkg.com/typescript/-/typescript-5.2.0-dev.20230524.tgz#c2714b82f5ef8c63328a253692ae0b8c244c86d6\" integrity sha512-1XzSUJCt31jm7jIZ3vBKzK46ZxnmqX2VdVg/dur9AIaz9WmidrABs7F8H8d4onpIV8RYD/L6xW6MXR5EHjl+LA== typescript@^5.2.0-dev.20230602: version \"5.2.0-dev.20230602\" resolved \"https://registry.yarnpkg.com/typescript/-/typescript-5.2.0-dev.20230602.tgz#01e2055aa8d8bde4431947c0c048c07c23cc6027\" integrity sha512-LenKdxmkwzZRmEKzShAq83TvEuvCGR8pCYBe0VpUTuJ7NMSK4r2yV2GTmJrSqtk8IoJAmc+PfymMQIfwX1JGQQ== typical@^4.0.0: version \"4.0.0\""} {"_id":"doc-en-vscode-5590250057f5b7adc63fef81e7ef26de565ad6729694f81777993c1587dd0384","title":"","text":"})); } stopWebviewFind() { this._notebookEditor.findStop(); } override dispose() { this.clearDecorations(); super.dispose();"} {"_id":"doc-en-vscode-94685dd68e49b769dac6f32bd7983e24521f468e876112443f7ea5f0c141101f","title":"","text":"this._notebookUpdateScheduler.schedule(); }) ?? null; this._findMatchDecorationModel?.stopWebviewFind(); this._findMatchDecorationModel?.dispose(); this._findMatchDecorationModel = new FindMatchDecorationModel(this._notebookEditorWidget); }"} {"_id":"doc-en-vscode-f4adf5e431fd8d8e89f5696b68c7a19a4bbca6838dc3b27501bb848cf9c1aa8a","title":"","text":"} if (this._findMatchDecorationModel) { this._findMatchDecorationModel?.stopWebviewFind(); this._findMatchDecorationModel?.dispose(); this._findMatchDecorationModel = undefined; }"} {"_id":"doc-en-vscode-dcb125d3a0714bfc15dafd14114a7291015a0cf62943c4249d2865a3bfd8a1dd","title":"","text":"get title(): string { const firstRequestMessage = this._requests[0]?.message; if (typeof firstRequestMessage === 'string') { return firstRequestMessage; } else if (firstRequestMessage) { return firstRequestMessage.message; } else { return ''; } const message = typeof firstRequestMessage === 'string' ? firstRequestMessage : firstRequestMessage?.message ?? ''; return message.split('n')[0].substring(0, 50); } constructor("} {"_id":"doc-en-vscode-7464e1578b0b6a0d328fb749304d3ca5f0dc9c6d1c61db7bd27322d718e283f0","title":"","text":"const model = this.model.read(reader); const suggestion = model?.selectedInlineCompletion.read(reader); const ghostText = model?.ghostText.read(reader); const selectedSuggestItem = model?.selectedSuggestItem.read(reader); this.inlineCompletionVisible.set(selectedSuggestItem === undefined && ghostText !== undefined && !ghostText.isEmpty()); this.inlineCompletionVisible.set(ghostText !== undefined && !ghostText.isEmpty()); if (ghostText && suggestion) { this.suppressSuggestions.set(suggestion.inlineCompletion.source.inlineCompletions.suppressSuggestions);"} {"_id":"doc-en-vscode-294e5aa0e8e7ddaecb30bce7b4662b41da173a940be3ca2b060d2cf90c5ce42c","title":"","text":"*--------------------------------------------------------------------------------------------*/ import { Event } from 'vs/base/common/event'; import { Lazy } from 'vs/base/common/lazy'; import { IDisposable } from 'vs/base/common/lifecycle'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { IBulkEditService } from 'vs/editor/browser/services/bulkEditService';"} {"_id":"doc-en-vscode-f2c0b2c5bc13426904a3664c7d248e855da7e115e13854deb84e385586cc0475","title":"","text":"export class LivePreviewStrategy extends LiveStrategy { private readonly _diffZone: InlineChatLivePreviewWidget; private readonly _previewZone: InlineChatFileCreatePreviewWidget; private readonly _diffZone: Lazy; private readonly _previewZone: Lazy; constructor( session: Session,"} {"_id":"doc-en-vscode-0f25af9419e2e74ae95b890dbe8d72a4e60e4c8ca877314fa4fb29e252f66e4c","title":"","text":") { super(session, editor, widget, contextKeyService, storageService, bulkEditService, editorWorkerService, instaService); this._diffZone = instaService.createInstance(InlineChatLivePreviewWidget, editor, session); this._previewZone = instaService.createInstance(InlineChatFileCreatePreviewWidget, editor); this._diffZone = new Lazy(() => instaService.createInstance(InlineChatLivePreviewWidget, editor, session)); this._previewZone = new Lazy(() => instaService.createInstance(InlineChatFileCreatePreviewWidget, editor)); } override dispose(): void { this._diffZone.hide(); this._diffZone.dispose(); this._previewZone.hide(); this._previewZone.dispose(); this._diffZone.rawValue?.hide(); this._diffZone.rawValue?.dispose(); this._previewZone.rawValue?.hide(); this._previewZone.rawValue?.dispose(); super.dispose(); }"} {"_id":"doc-en-vscode-78e9539dfa204f51106172131aad874f52674232a0e605b14990898df774f07a","title":"","text":"this._updateSummaryMessage(); if (this._diffEnabled) { this._diffZone.show(); this._diffZone.value.show(); } if (response.singleCreateFileEdit) { this._previewZone.showCreation(this._session.wholeRange.value, response.singleCreateFileEdit.uri, await Promise.all(response.singleCreateFileEdit.edits)); this._previewZone.value.showCreation(this._session.wholeRange.value, response.singleCreateFileEdit.uri, await Promise.all(response.singleCreateFileEdit.edits)); } else { this._previewZone.hide(); this._previewZone.value.hide(); } } override async undoChanges(response: EditResponse): Promise { this._diffZone.lockToDiff(); this._diffZone.value.lockToDiff(); super.undoChanges(response); } protected override _doToggleDiff(): void { const scrollState = StableEditorScrollState.capture(this._editor); if (this._diffEnabled) { this._diffZone.show(); this._diffZone.value.show(); } else { this._diffZone.hide(); this._diffZone.value.hide(); } scrollState.restore(this._editor); } override hasFocus(): boolean { return super.hasFocus() || this._diffZone.hasFocus() || this._previewZone.hasFocus(); return super.hasFocus() || this._diffZone.value.hasFocus() || this._previewZone.value.hasFocus(); } }"} {"_id":"doc-en-vscode-f5a6558e251edbaea4efde306a8dc03cb890a7424926ef025a1db92973a9bffa","title":"","text":"async getLocalExtensions(profile: IUserDataProfile): Promise { return this.withProfileScopedServices(profile, async (extensionEnablementService) => { const result: Array = []; const result = new Map(); const installedExtensions = await this.extensionManagementService.getInstalled(undefined, profile.extensionsResource); const disabledExtensions = extensionEnablementService.getDisabledExtensions(); for (const extension of installedExtensions) {"} {"_id":"doc-en-vscode-6bdf54251a78089e0349f21545f976048f921cd3b71e23d7c552ad151acaf8b1","title":"","text":"continue; } } const existing = result.get(identifier.id.toLowerCase()); if (existing?.disabled) { // Remove the duplicate disabled extension result.delete(identifier.id.toLowerCase()); } const profileExtension: IProfileExtension = { identifier, displayName: extension.manifest.displayName }; if (disabled) { profileExtension.disabled = true;"} {"_id":"doc-en-vscode-35f648d14d4ef0dc06bb38e5012ef9ac5390796c0b2d6d7e8ec7a958bbcea327","title":"","text":"if (!profileExtension.version && preRelease) { profileExtension.preRelease = true; } result.push(profileExtension); result.set(profileExtension.identifier.id.toLowerCase(), profileExtension); } return result; return [...result.values()]; }); }"} {"_id":"doc-en-vscode-686b4bdf470c4e6f1bbc984b651a0c12e126f8cd269ee012162fde49f018d45d","title":"","text":"export class ContentHoverWidget extends ResizableContentWidget { public static ID = 'editor.contrib.resizableContentHoverWidget'; private static _lastDimensions: dom.Dimension = new dom.Dimension(0, 0); private _visibleData: ContentHoverVisibleData | undefined; private _positionPreference: ContentWidgetPositionPreference | undefined;"} {"_id":"doc-en-vscode-9e40620c70868c76488a8583ddcaf9f243f5ff28ac41d863fb4c7a9fcc8b9545","title":"","text":"} protected override _resize(size: dom.Dimension): void { ContentHoverWidget._lastDimensions = new dom.Dimension(size.width, size.height); this._setAdjustedHoverWidgetDimensions(size); this._resizableNode.layout(size.height, size.width); this._setResizableNodeMaxDimensions();"} {"_id":"doc-en-vscode-9581f591e68f2d1564acc04e55da66542aee3ba81f3070d119fdca98310fd8a9","title":"","text":"} private _layout(): void { const height = Math.max(this._editor.getLayoutInfo().height / 4, 250); const height = Math.max(this._editor.getLayoutInfo().height / 4, 250, ContentHoverWidget._lastDimensions.height); const width = Math.max(this._editor.getLayoutInfo().width * 0.66, 500, ContentHoverWidget._lastDimensions.width); const { fontSize, lineHeight } = this._editor.getOption(EditorOption.fontInfo); const contentsDomNode = this._hover.contentsDomNode; contentsDomNode.style.fontSize = `${fontSize}px`; contentsDomNode.style.lineHeight = `${lineHeight / fontSize}`; this._setContentsDomNodeMaxDimensions(Math.max(this._editor.getLayoutInfo().width * 0.66, 500), height); this._setContentsDomNodeMaxDimensions(width, height); } private _updateFont(): void {"} {"_id":"doc-en-vscode-bfa77206b03bc9e0a2cf68d02f24076e83aad853581ce32cce2d2203368630c3","title":"","text":"} private _updateContentsDomNodeMaxDimensions() { const width = Math.max(this._editor.getLayoutInfo().width * 0.66, 500); const height = Math.max(this._editor.getLayoutInfo().height / 4, 250); const height = Math.max(this._editor.getLayoutInfo().height / 4, 250, ContentHoverWidget._lastDimensions.height); const width = Math.max(this._editor.getLayoutInfo().width * 0.66, 500, ContentHoverWidget._lastDimensions.width); this._setContentsDomNodeMaxDimensions(width, height); }"} {"_id":"doc-en-vscode-247ec37c61bfac48b31f262694677dee85cd811061dec3e92653e6b470264dc5","title":"","text":"} const originalProfile = this.userDataProfileService.currentProfile; await this.userDataProfileImportExportService.createTemporaryProfile(this.userDataProfileService.currentProfile, localize('troubleshoot issue', \"Troubleshoot Issue\"), true); await this.userDataProfileImportExportService.createTroubleshootProfile(); this.state = new TroubleShootState(TroubleshootStage.EXTENSIONS, originalProfile.id); await this.resume(); }"} {"_id":"doc-en-vscode-a19f26e71765d7620033a370980a16fca7a4d1b8dd90533bf29867fcca74aead","title":"","text":"} } async createTemporaryProfile(profile: IUserDataProfile, name: string, extensionsDisabled: boolean): Promise { const userDataProfilesExportState = this.instantiationService.createInstance(UserDataProfileExportState, profile, extensionsDisabled); async createTroubleshootProfile(): Promise { const userDataProfilesExportState = this.instantiationService.createInstance(UserDataProfileExportState, this.userDataProfileService.currentProfile, true); try { const profileTemplate = await userDataProfilesExportState.getProfileTemplate(name, undefined); await this.importAndSwitch(profileTemplate, true, true, extensionsDisabled, localize('import', \"Create Profile\")); const profileTemplate = await userDataProfilesExportState.getProfileTemplate(localize('troubleshoot issue', \"Troubleshoot Issue\"), undefined); await this.progressService.withProgress({ location: ProgressLocation.Notification, delay: 1000, sticky: true, }, progress => this.importAndSwitchWithProgress(profileTemplate, true, true, true, message => progress.report({ message: localize('troubleshoot profile progress', \"Setting up Troubleshoot Profile: {0}\", message) }))); } finally { userDataProfilesExportState.dispose(); }"} {"_id":"doc-en-vscode-a78fe55fddde68f194ac630096be0941c50e8bd7eb3773d4306d4fbce08675bd","title":"","text":"command: showWindowLogActionId, }, async (progress) => { progress.report({ message: localize('Importing profile', \"{0} ({1})...\", title, profileTemplate.name) }); const profile = await this.getProfileToImport(profileTemplate, temporaryProfile); if (!profile) { return undefined; } return this.importAndSwitchWithProgress(profileTemplate, temporaryProfile, extensions, extensionsDisabled, message => progress.report({ message: `${title} (${profileTemplate.name}): ${message}` })); }); } if (profileTemplate.settings) { progress.report({ message: localize('progress settings', \"{0} ({1}): Applying Settings...\", title, profileTemplate.name) }); await this.instantiationService.createInstance(SettingsResource).apply(profileTemplate.settings, profile); } if (profileTemplate.keybindings) { progress.report({ message: localize('progress keybindings', \"{0} ({1}): Applying Keyboard Shortcuts...\", title, profileTemplate.name) }); await this.instantiationService.createInstance(KeybindingsResource).apply(profileTemplate.keybindings, profile); } if (profileTemplate.tasks) { progress.report({ message: localize('progress tasks', \"{0} ({1}): Applying Tasks...\", title, profileTemplate.name) }); await this.instantiationService.createInstance(TasksResource).apply(profileTemplate.tasks, profile); } if (profileTemplate.snippets) { progress.report({ message: localize('progress snippets', \"{0} ({1}): Applying Snippets...\", title, profileTemplate.name) }); await this.instantiationService.createInstance(SnippetsResource).apply(profileTemplate.snippets, profile); } if (profileTemplate.globalState) { progress.report({ message: localize('progress global state', \"{0} ({1}): Applying State...\", title, profileTemplate.name) }); await this.instantiationService.createInstance(GlobalStateResource).apply(profileTemplate.globalState, profile); } if (profileTemplate.extensions && extensions) { progress.report({ message: localize('progress extensions', \"{0} ({1}): Applying Extensions...\", title, profileTemplate.name) }); await this.instantiationService.createInstance(ExtensionsResource, extensionsDisabled).apply(profileTemplate.extensions, profile); } private async importAndSwitchWithProgress(profileTemplate: IUserDataProfileTemplate, temporaryProfile: boolean, extensions: boolean, extensionsDisabled: boolean, progress: (message: string) => void): Promise { const profile = await this.getProfileToImport(profileTemplate, temporaryProfile); if (!profile) { return undefined; } progress.report({ message: localize('switching profile', \"{0} ({1}): Applying...\", title, profileTemplate.name) }); await this.userDataProfileManagementService.switchProfile(profile); return profile; }); if (profileTemplate.settings) { progress(localize('progress settings', \"Applying Settings...\")); await this.instantiationService.createInstance(SettingsResource).apply(profileTemplate.settings, profile); } if (profileTemplate.keybindings) { progress(localize('progress keybindings', \"{0}ying Keyboard Shortcuts...\")); await this.instantiationService.createInstance(KeybindingsResource).apply(profileTemplate.keybindings, profile); } if (profileTemplate.tasks) { progress(localize('progress tasks', \"Applying Tasks...\")); await this.instantiationService.createInstance(TasksResource).apply(profileTemplate.tasks, profile); } if (profileTemplate.snippets) { progress(localize('progress snippets', \"Applying Snippets...\")); await this.instantiationService.createInstance(SnippetsResource).apply(profileTemplate.snippets, profile); } if (profileTemplate.globalState) { progress(localize('progress global state', \"Applying State...\")); await this.instantiationService.createInstance(GlobalStateResource).apply(profileTemplate.globalState, profile); } if (profileTemplate.extensions && extensions) { progress(localize('progress extensions', \"Applying Extensions...\")); await this.instantiationService.createInstance(ExtensionsResource, extensionsDisabled).apply(profileTemplate.extensions, profile); } progress(localize('switching profile', \" Applying...\")); await this.userDataProfileManagementService.switchProfile(profile); return profile; } private async resolveProfileContent(resource: URI): Promise {"} {"_id":"doc-en-vscode-d00e285236d5284d269633f3f1cab5978a6fa90e6a0f665bc43273f2d80935ec","title":"","text":"importProfile(uri: URI, options?: IProfileImportOptions): Promise; showProfileContents(): Promise; createFromCurrentProfile(name: string): Promise; createTemporaryProfile(from: IUserDataProfile, name: string, extensionsDisabled: boolean): Promise; createTroubleshootProfile(): Promise; setProfile(profile: IUserDataProfileTemplate): Promise; }"} {"_id":"doc-en-vscode-b6ec4ee0598b280e7d57b8c820f08781861d3a8b1c6d3ece51751dc3020e587a","title":"","text":"return markdownTooltip; } private async installAndRunStartCommand(metadata: RemoteExtensionMetadata) { const extensionId = metadata.id; private async installExtension(extensionId: string) { const galleryExtension = (await this.extensionGalleryService.getExtensions([{ id: extensionId }], CancellationToken.None))[0]; await this.extensionManagementService.installFromGallery(galleryExtension, {"} {"_id":"doc-en-vscode-c112455f6872d40e93474829eabee48e37862dd04548663313f18ea2f6b92863","title":"","text":"donotIncludePackAndDependencies: false, context: { [EXTENSION_INSTALL_SKIP_WALKTHROUGH_CONTEXT]: true } }); } private async runRemoteStartCommand(extensionId: string, startCommand: string) { // check to ensure the extension is installed await retry(async () => { const ext = await this.extensionService.getExtension(metadata.id); const ext = await this.extensionService.getExtension(extensionId); if (!ext) { throw Error('Failed to find installed remote extension'); } return ext; }, 300, 10); this.commandService.executeCommand(metadata.startCommand); this.commandService.executeCommand(startCommand); this.telemetryService.publicLog2('workbenchActionExecuted', { id: 'remoteInstallAndRun', detail: extensionId,"} {"_id":"doc-en-vscode-4f25e262a5a801395ea3107bd337e13324f3871878e5e2ea6c3dd64a1d1df6ce","title":"","text":"quickPick.items = []; quickPick.busy = true; quickPick.placeholder = nls.localize('remote.startActions.installingExtension', 'Installing extension... '); await this.installAndRunStartCommand(remoteExtension); await this.installExtension(remoteExtension.id); quickPick.hide(); await this.runRemoteStartCommand(remoteExtension.id, remoteExtension.startCommand); } else { this.telemetryService.publicLog2('workbenchActionExecuted', {"} {"_id":"doc-en-vscode-309b573190c2c6cd78bc06cf3bf5382307c186742a7811857701a7e5406000d3","title":"","text":"from: 'remote indicator' }); this.commandService.executeCommand(commandId); quickPick.hide(); } quickPick.hide(); } }));"} {"_id":"doc-en-vscode-8437340617c8dbe2f9caff6d47ab2244373bb04ac62d024803d78eafe2d22912","title":"","text":"import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar'; import { AriaRole } from 'vs/base/browser/ui/aria/aria'; import { HoverPosition } from 'vs/base/browser/ui/hover/hoverWidget'; import { IHoverWidget } from 'vs/base/browser/ui/iconLabel/iconHoverDelegate'; import { IHoverDelegate, IHoverWidget } from 'vs/base/browser/ui/iconLabel/iconHoverDelegate'; import { IconLabel, IIconLabelValueOptions } from 'vs/base/browser/ui/iconLabel/iconLabel'; import { KeybindingLabel } from 'vs/base/browser/ui/keybindingLabel/keybindingLabel'; import { IListRenderer, IListVirtualDelegate } from 'vs/base/browser/ui/list/list';"} {"_id":"doc-en-vscode-15045212ae1adb985dd5e2a8fc3e8807a07166ca51eaca1baa1a5c83120b06f9","title":"","text":"static readonly ID = 'listelement'; constructor(private readonly themeService: IThemeService) { } constructor( private readonly themeService: IThemeService, private readonly hoverDelegate: IHoverDelegate | undefined, ) { } get templateId() { return ListElementRenderer.ID;"} {"_id":"doc-en-vscode-e9ac5b93684f1c1ae195ca7eb0ca00ce25979955d0f1427c463b4824206d14c3","title":"","text":"const row2 = dom.append(rows, $('.quick-input-list-row')); // Label data.label = new IconLabel(row1, { supportHighlights: true, supportDescriptionHighlights: true, supportIcons: true }); data.label = new IconLabel(row1, { supportHighlights: true, supportDescriptionHighlights: true, supportIcons: true, hoverDelegate: this.hoverDelegate }); data.toDisposeTemplate.push(data.label); data.icon = dom.prepend(data.label.element, $('.quick-input-list-icon'));"} {"_id":"doc-en-vscode-8f2f934be0df7d90f74966b02fd4edb9dbd65625681133d13373c4749296bcae","title":"","text":"// Detail const detailContainer = dom.append(row2, $('.quick-input-list-label-meta')); data.detail = new IconLabel(detailContainer, { supportHighlights: true, supportIcons: true }); data.detail = new IconLabel(detailContainer, { supportHighlights: true, supportIcons: true, hoverDelegate: this.hoverDelegate }); data.toDisposeTemplate.push(data.detail); // Separator data.separator = dom.append(data.entry, $('.quick-input-list-separator')); // Actions data.actionBar = new ActionBar(data.entry); data.actionBar = new ActionBar(data.entry, this.hoverDelegate ? { hoverDelegate: this.hoverDelegate } : undefined); data.actionBar.domNode.classList.add('quick-input-list-entry-action-bar'); data.toDisposeTemplate.push(data.actionBar);"} {"_id":"doc-en-vscode-483a5f910553d5264aab9519100de4ab9b8d72862cc73ad3408bbf7ab8fb1374","title":"","text":"// Label const options: IIconLabelValueOptions = { matches: labelHighlights || [], descriptionTitle: element.saneDescription, // If we have a tooltip, we want that to be shown and not any other hover descriptionTitle: element.saneTooltip ? undefined : element.saneDescription, descriptionMatches: descriptionHighlights || [], labelEscapeNewLines: true };"} {"_id":"doc-en-vscode-497acc3c8bbfb98acaf89985513bb5b0f66d2043cfc516932a40678199d742c5","title":"","text":"data.detail.element.style.display = ''; data.detail.setLabel(element.saneDetail, undefined, { matches: detailHighlights, title: element.saneDetail, // If we have a tooltip, we want that to be shown and not any other hover title: element.saneTooltip ? undefined : element.saneDetail, labelEscapeNewLines: true }); } else {"} {"_id":"doc-en-vscode-d3e1e2dd10d270d10f51cdee3cf9de5396ec33a242d77e4b00c60b97ac7a76d8","title":"","text":"this.container = dom.append(this.parent, $('.quick-input-list')); const delegate = new ListElementDelegate(); const accessibilityProvider = new QuickInputAccessibilityProvider(); this.list = options.createList('QuickInput', this.container, delegate, [new ListElementRenderer(themeService)], { this.list = options.createList('QuickInput', this.container, delegate, [new ListElementRenderer(themeService, options.hoverDelegate)], { identityProvider: { getId: element => { // always prefer item over separator because if item is defined, it must be the main item type"} {"_id":"doc-en-vscode-4725c033a49f6c0b5bb1e8d966419dee081b8d495716d29f43a56e48122b164c","title":"","text":"async function copyVscodeDevLink(gitAPI: GitAPI, useSelection: boolean, context: LinkContext, includeRange = true) { try { const permalink = await getLink(gitAPI, useSelection, getVscodeDevHost(), 'headlink', context, includeRange); const permalink = await getLink(gitAPI, useSelection, true, getVscodeDevHost(), 'headlink', context, includeRange); if (permalink) { return vscode.env.clipboard.writeText(permalink); }"} {"_id":"doc-en-vscode-a115e68b66c5e297a32dee2f3baffbece641c17322e8c5328169b18f8c938249","title":"","text":"async function openVscodeDevLink(gitAPI: GitAPI): Promise { try { const headlink = await getLink(gitAPI, true, getVscodeDevHost(), 'headlink'); const headlink = await getLink(gitAPI, true, false, getVscodeDevHost(), 'headlink'); return headlink ? vscode.Uri.parse(headlink) : undefined; } catch (err) { if (!(err instanceof vscode.CancellationError)) {"} {"_id":"doc-en-vscode-21117b14ee470a137f0d1f496f4c12e0e2b1827b7328bc121103d2fc541bb231","title":"","text":"return path.split('/').map((segment) => encodeURIComponent(segment)).join('/'); } export async function getLink(gitAPI: GitAPI, useSelection: boolean, hostPrefix?: string, linkType: 'permalink' | 'headlink' = 'permalink', context?: LinkContext, useRange?: boolean): Promise { export async function getLink(gitAPI: GitAPI, useSelection: boolean, shouldEnsurePublished: boolean, hostPrefix?: string, linkType: 'permalink' | 'headlink' = 'permalink', context?: LinkContext, useRange?: boolean): Promise { hostPrefix = hostPrefix ?? 'https://github.com'; const fileAndPosition = getFileAndPosition(context); if (!fileAndPosition) {"} {"_id":"doc-en-vscode-1d94d97f1672be82b05db7e5ef3390a9625846302fe9c03a291c8e96d9aec45e","title":"","text":"return; } await ensurePublished(gitRepo, uri); if (shouldEnsurePublished) { await ensurePublished(gitRepo, uri); } let repo: { owner: string; repo: string } | undefined; gitRepo.state.remotes.find(remote => {"} {"_id":"doc-en-vscode-8115eddd5d25a018e72b577e7adf7965127b60d8ca0227cba716bda6983036b5","title":"","text":"} } for (let i = (renderActions.length - 1); i !== 0; i--) { for (let i = (renderActions.length - 1); i > 0; i--) { const temp = renderActions[i]; if (temp.size === 0) { continue;"} {"_id":"doc-en-vscode-f803cf6606640b7ad709b93d8c66d76683347f88a3890c802f56a873f7984091","title":"","text":"const data = this.editorTransfer.getData(DraggedEditorIdentifier.prototype); if (Array.isArray(data)) { const draggedEditor = data[0].identifier; const targetGroup = ensureTargetGroup(); const sourceGroup = this.accessor.getGroup(draggedEditor.groupId); if (sourceGroup) { if (sourceGroup === targetGroup) { return; const copyEditor = this.isCopyOperation(event, draggedEditor); let targetGroup: IEditorGroupView | undefined = undefined; // Optimization: if we move the last editor of an editor group // and we are configured to close empty editor groups, we can // rather move the entire editor group according to the direction if (this.editorGroupService.partOptions.closeEmptyGroups && sourceGroup.count === 1 && typeof splitDirection === 'number' && !copyEditor) { targetGroup = this.accessor.moveGroup(sourceGroup, this.groupView, splitDirection); } // Open in target group const options = fillActiveEditorViewState(sourceGroup, draggedEditor.editor, { pinned: true,\t\t\t\t\t\t\t\t\t\t// always pin dropped editor sticky: sourceGroup.isSticky(draggedEditor.editor),\t// preserve sticky state }); // In any other case do a normal move/copy operation else { targetGroup = ensureTargetGroup(); if (sourceGroup === targetGroup) { return; } const copyEditor = this.isCopyOperation(event, draggedEditor); if (!copyEditor) { sourceGroup.moveEditor(draggedEditor.editor, targetGroup, options); } else { sourceGroup.copyEditor(draggedEditor.editor, targetGroup, options); // Open in target group const options = fillActiveEditorViewState(sourceGroup, draggedEditor.editor, { pinned: true,\t\t\t\t\t\t\t\t\t\t// always pin dropped editor sticky: sourceGroup.isSticky(draggedEditor.editor),\t// preserve sticky state }); if (!copyEditor) { sourceGroup.moveEditor(draggedEditor.editor, targetGroup, options); } else { sourceGroup.copyEditor(draggedEditor.editor, targetGroup, options); } } // Ensure target has focus"} {"_id":"doc-en-vscode-ba6ab063da7bda3b7128428786a23326781a4c1c3b2ce0249e7cff58bb80d556","title":"","text":"\"jschardet\": \"3.0.0\", \"keytar\": \"7.9.0\", \"minimist\": \"^1.2.6\", \"native-is-elevated\": \"0.6.0\", \"native-is-elevated\": \"0.7.0\", \"native-keymap\": \"^3.3.2\", \"native-watchdog\": \"^1.4.1\", \"node-pty\": \"1.1.0-beta1\","} {"_id":"doc-en-vscode-2ba8d883dff4c47bd3cefd095c25a6970c226e981a98d0b5e9cc49056b589c72","title":"","text":"resolved \"https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806\" integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== native-is-elevated@0.6.0: version \"0.6.0\" resolved \"https://registry.yarnpkg.com/native-is-elevated/-/native-is-elevated-0.6.0.tgz#9fd9c9c53bfd87d6e6af15a5d6bcb8e592b7ec79\" integrity sha512-HW1wDo4WYZC7W68kaS0cs7FtDTrcFoAY1APc4SlU4Un/FuL7pjilXFEteBCA58EWClKk0912JLIoekOJ/NohnQ== native-is-elevated@0.7.0: version \"0.7.0\" resolved \"https://registry.yarnpkg.com/native-is-elevated/-/native-is-elevated-0.7.0.tgz#77499639e232edad1886403969e2bf236294e7af\" integrity sha512-tp8hUqK7vexBiyIWKMvmRxdG6kqUtO+3eay9iB0i16NYgvCqE5wMe1Y0guHilpkmRgvVXEWNW4et1+qqcwpLBA== native-keymap@^3.3.2: version \"3.3.3\""} {"_id":"doc-en-vscode-769bf99d125a4a70ee879259e44b45f6995d45e795e13b9ecf1ab88d653d8b1c","title":"","text":"import * as dom from 'vs/base/browser/dom'; import { StandardMouseEvent } from 'vs/base/browser/mouseEvent'; import { createTrustedTypesPolicy } from 'vs/base/browser/trustedTypes'; import { equals } from 'vs/base/common/arrays'; import { Disposable, DisposableStore } from 'vs/base/common/lifecycle'; import 'vs/css!./stickyScroll'; import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition } from 'vs/editor/browser/editorBrowser';"} {"_id":"doc-en-vscode-173418e851d6c69e53c9c3b2fa17fc0592198b2f08dbffaa5b943635d3e5cd95","title":"","text":"readonly lineNumbers: number[], readonly lastLineRelativePosition: number ) { } public equals(other: StickyScrollWidgetState | undefined): boolean { return !!other && this.lastLineRelativePosition === other.lastLineRelativePosition && equals(this.lineNumbers, other.lineNumbers); } } const _ttPolicy = createTrustedTypesPolicy('stickyScrollViewLayer', { createHTML: value => value });"} {"_id":"doc-en-vscode-1a6794144c2358cd6adcb9dbf20d134d681f14f74c592cd2f22bb672028ef540","title":"","text":"private _lastLineRelativePosition: number = 0; private _hoverOnLine: number = -1; private _hoverOnColumn: number = -1; private _state: StickyScrollWidgetState | undefined; constructor( private readonly _editor: ICodeEditor"} {"_id":"doc-en-vscode-839c328769b10b34bdf3011a36ef5ed66cc77ce3c5ae9c3f7a9ff29e88a0cfe1","title":"","text":"} setState(state: StickyScrollWidgetState): void { if (state.equals(this._state)) { return; } this._state = state; dom.clearNode(this._rootDomNode); this._disposableStore.clear(); this._lineNumbers.length = 0;"} {"_id":"doc-en-vscode-f7fc4e1be384b888b0bb220a91036edbc25df001f2d9be3c5473ca26f03ac1b7","title":"","text":"private _onDidChangeTaskSystemInfo: Emitter = new Emitter(); private _willRestart: boolean = false; public onDidChangeTaskSystemInfo: Event = this._onDidChangeTaskSystemInfo.event; private _onDidReconnectToTasks: Emitter = new Emitter(); public onDidReconnectToTasks: Event = this._onDidReconnectToTasks.event; constructor( @IConfigurationService private readonly _configurationService: IConfigurationService,"} {"_id":"doc-en-vscode-d0be11384bcf6dc9d5b0f4712a0994bf98b114b98cdc900e9f218766069b7c91","title":"","text":"} this.getWorkspaceTasks(TaskRunSource.Reconnect).then(async () => { this._tasksReconnected = await this._reconnectTasks(); this._onDidReconnectToTasks.fire(); }); }"} {"_id":"doc-en-vscode-3d1ad84ed92f1e682a04d35639f3a39a7ff0901e316f21c79872ac59b0dd6547","title":"","text":"} if (executeResult.kind === TaskExecuteKind.Active) { const active = executeResult.active; if (active && active.same && runSource === TaskRunSource.FolderOpen) { // ignore, the task is already active, likely from being reconnected. this._logService.debug('Ignoring task that is already active', executeResult.task); return executeResult.promise; } if (active && active.same) { if (this._taskSystem?.isTaskVisible(executeResult.task)) { const message = nls.localize('TaskSystem.activeSame.noBackground', 'The task '{0}' is already active.', executeResult.task.getQualifiedLabel());"} {"_id":"doc-en-vscode-12e4fd38ace4f9562d1e68a8c601d27c545f03c5fcb84ad4a7ffcb4f4ab6c3a4","title":"","text":"@IWorkspaceTrustManagementService private readonly _workspaceTrustManagementService: IWorkspaceTrustManagementService, @ILogService private readonly _logService: ILogService) { super(); if (this._workspaceTrustManagementService.isWorkspaceTrusted()) { this._tryRunTasks(); } this._taskService.onDidReconnectToTasks((() => { if (this._workspaceTrustManagementService.isWorkspaceTrusted()) { this._tryRunTasks(); } })); this._register(this._workspaceTrustManagementService.onDidChangeTrust(async trusted => { if (trusted) { await this._tryRunTasks();"} {"_id":"doc-en-vscode-3f08ec0882a7b50480186a32eb6f13df100a6965bdfb21fae5f263bd0b81a062","title":"","text":"export interface ITaskService { readonly _serviceBrand: undefined; onDidStateChange: Event; onDidReconnectToTasks: Event; supportsMultipleTaskExecutions: boolean; configureAction(): Action;"} {"_id":"doc-en-vscode-372fda74f98576d348cdc9370aa0027376dc6073c0aff7c0c287223f443888b3","title":"","text":"} }; observable.addObserver(observer); observable.reportChanges(); return { dispose() { observable.removeObserver(observer);"} {"_id":"doc-en-vscode-50fd00ea3a88b3d5961ac9722030ca53ec418084227005496c3efaefdc8b32ab","title":"","text":"*--------------------------------------------------------------------------------------------*/ import * as assert from 'assert'; import { Emitter } from 'vs/base/common/event'; import { Emitter, Event } from 'vs/base/common/event'; import { ISettableObservable, autorun, derived, ITransaction, observableFromEvent, observableValue, transaction, keepAlive } from 'vs/base/common/observable'; import { BaseObservable, IObservable, IObserver } from 'vs/base/common/observableImpl/base';"} {"_id":"doc-en-vscode-f117cefe0ec727f9da83837d91167b365398d911fdf571d7ea13c77843ed206a","title":"","text":"myObservable2.set(1, tx); }); }); test('bug: fromObservableLight doesnt subscribe', () => { const log = new Log(); const myObservable = new LoggingObservableValue('myObservable', 0, log); const myDerived = derived('myDerived', reader => { const val = myObservable.read(reader); log.log(`myDerived.computed(myObservable2: ${val})`); return val % 10; }); const e = Event.fromObservableLight(myDerived); log.log('event created'); e(() => { log.log('event fired'); }); myObservable.set(1, undefined); assert.deepStrictEqual(log.getAndClearEntries(), [ 'event created', 'myObservable.firstObserverAdded', 'myObservable.get', 'myDerived.computed(myObservable2: 0)', 'myObservable.set (value 1)', 'myObservable.get', 'myDerived.computed(myObservable2: 1)', 'event fired', ]); }); }); export class LoggingObserver implements IObserver {"} {"_id":"doc-en-vscode-75f31200e8e7b00fe7238548a71443249b99abdfea8a2aab811d8dc87030c07c","title":"","text":"private _isInLayout: boolean = false; private readonly _viewContext: ViewContext; private _webviewElement: FastDomNode | null = null; get webviewElement() {"} {"_id":"doc-en-vscode-f200cc85e92b8aeb6be73d5b45300bcd3d94df50a970dde4aaceb45b73433407","title":"","text":") { super(listUser, container, delegate, renderers, options, contextKeyService, listService, configurationService, instantiationService); NOTEBOOK_CELL_LIST_FOCUSED.bindTo(this.contextKeyService).set(true); this._viewContext = viewContext; this._previousFocusedElements = this.getFocusedElements(); this._localDisposableStore.add(this.onDidChangeFocus((e) => { this._previousFocusedElements.forEach(element => {"} {"_id":"doc-en-vscode-8f1fb7e624851529f034463f4120e96ae1a01bd0849d0d2b2b1f0977410fb0a5","title":"","text":"const scrollHeight = this.view.scrollHeight; const scrollTop = this.getViewScrollTop(); const wrapperBottom = this.getViewScrollBottom(); const topInsertToolbarHeight = this._viewContext.notebookOptions.computeTopInsertToolbarHeight(this.viewModel?.viewType); this.view.setScrollTop(scrollHeight - (wrapperBottom - scrollTop) - topInsertToolbarHeight); this.view.setScrollTop(scrollHeight - (wrapperBottom - scrollTop)); } //#region Reveal Cell synchronously"} {"_id":"doc-en-vscode-74c6231d9272d27abe361ae88dc7c495b29a73a8be77a1bf8bc09c1ebf8f48f0","title":"","text":"} getViewScrollBottom() { const topInsertToolbarHeight = this._viewContext.notebookOptions.computeTopInsertToolbarHeight(this.viewModel?.viewType); return this.getViewScrollTop() + this.view.renderHeight - topInsertToolbarHeight; return this.getViewScrollTop() + this.view.renderHeight; } setCellEditorSelection(cell: ICellViewModel, range: Range) {"} {"_id":"doc-en-vscode-ce7f7e11c24f50e1f720a0a3bc1971b5c3f79d6fff6ee59b02bdd1085ac6d7fb","title":"","text":"import * as assert from 'assert'; import { DisposableStore } from 'vs/base/common/lifecycle'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; import { CellKind } from 'vs/workbench/contrib/notebook/common/notebookCommon'; import { INotebookExecutionStateService } from 'vs/workbench/contrib/notebook/common/notebookExecutionStateService'; import { NotebookOptions } from 'vs/workbench/contrib/notebook/browser/notebookOptions'; import { createNotebookCellList, setupInstantiationService, withTestNotebook } from 'vs/workbench/contrib/notebook/test/browser/testNotebookEditor'; suite('NotebookCellList', () => { let disposables: DisposableStore; let instantiationService: TestInstantiationService; let notebookDefaultOptions: NotebookOptions; let topInsertToolbarHeight: number; suiteSetup(() => { disposables = new DisposableStore(); instantiationService = setupInstantiationService(disposables); notebookDefaultOptions = new NotebookOptions(instantiationService.get(IConfigurationService), instantiationService.get(INotebookExecutionStateService), false); topInsertToolbarHeight = notebookDefaultOptions.computeTopInsertToolbarHeight(); }); suiteTeardown(() => disposables.dispose());"} {"_id":"doc-en-vscode-b31fcff52d614dbbb3f2bd0d9dd900c460382dafcfee4af9fb9abda79fd6019e","title":"","text":"cellList.attachViewModel(viewModel); // render height 210, it can render 3 full cells and 1 partial cell cellList.layout(210 + topInsertToolbarHeight, 100); cellList.layout(210, 100); // scroll a bit, scrollTop to bottom: 5, 215 cellList.scrollTop = 5;"} {"_id":"doc-en-vscode-d9089b7d206a7bc86151e64569717f2e5bbdd6b3367fda7237bdd08272c50740","title":"","text":"cellList.attachViewModel(viewModel); // render height 210, it can render 3 full cells and 1 partial cell cellList.layout(210 + topInsertToolbarHeight, 100); cellList.layout(210, 100); // init scrollTop and scrollBottom assert.deepStrictEqual(cellList.scrollTop, 0);"} {"_id":"doc-en-vscode-f165b81e7f28164bc7b1a8c7055bd40024185f88e1f0413b38cfc045797e87f7","title":"","text":"if (this._isVisible) { const notificationsList = assertIsDefined(this.notificationsList); // Make visible and focus first notificationsList.show(true /* focus */); // Make visible notificationsList.show(); // Focus first notificationsList.focusFirst(); return; // already visible"} {"_id":"doc-en-vscode-b195a9b98e80890c980cc6d12007d5d17708c1edd5753f30f02e7902e63f7f03","title":"","text":"import { NotificationsListDelegate, NotificationRenderer } from 'vs/workbench/browser/parts/notifications/notificationsViewer'; import { CopyNotificationMessageAction } from 'vs/workbench/browser/parts/notifications/notificationsActions'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { assertIsDefined, assertAllDefined } from 'vs/base/common/types'; import { assertAllDefined } from 'vs/base/common/types'; import { NotificationFocusedContext } from 'vs/workbench/common/contextkeys'; import { Disposable } from 'vs/base/common/lifecycle'; import { AriaRole } from 'vs/base/browser/ui/aria/aria';"} {"_id":"doc-en-vscode-eb0031e9fadb3bbe4e030d7c271ebe670135e3687174d5cc00e7d8c974a155ab","title":"","text":"super(); } show(focus?: boolean): void { show(): void { if (this.isVisible) { if (focus) { const list = assertIsDefined(this.list); list.domFocus(); } return; // already visible }"} {"_id":"doc-en-vscode-b7f3e6d47d285dad43f0a9b7ec50016e580f727aba8364af68d83ca332f43c85","title":"","text":"// Make visible this.isVisible = true; // Focus if (focus) { const list = assertIsDefined(this.list); list.domFocus(); } } private createNotificationsList(): void {"} {"_id":"doc-en-vscode-fedd75f9172a6d6fc8da4bce5fa7894b4edeb0ba5bc04b39f7c01dede229a120","title":"","text":"} focusFirst(): void { if (!this.isVisible || !this.list) { return; // hidden if (!this.list) { return; // not created yet } this.list.focusFirst();"} {"_id":"doc-en-vscode-5362e0c4cae0d0c211f89e6a34f2d6ba57dee7c97251f163315f876c713e4e57","title":"","text":"} hasFocus(): boolean { if (!this.isVisible || !this.listContainer) { return false; // hidden if (!this.listContainer) { return false; // not created yet } return isAncestor(document.activeElement, this.listContainer);"} {"_id":"doc-en-vscode-53cf6ac67afacd1dfbbafaea9b846740031c1f9de77cb803bb85eb3b35c0ba9e","title":"","text":"} } const textTokenTypes = new Set(['paragraph_open', 'inline', 'heading_open', 'ordered_list_open', 'bullet_list_open', 'list_item_open', 'blockquote_open']); async function shouldSmartPasteForSelection( parser: IMdParser, document: ITextDocument,"} {"_id":"doc-en-vscode-3deff7abfcf244c2010e10908147fc40496a1a56d1cd0ad4855ba8c371b93f27","title":"","text":"if (token.isCancellationRequested) { return false; } for (const token of tokens) { if (token.map && token.map[0] <= selectedRange.start.line && token.map[1] > selectedRange.start.line) { if (!['paragraph_open', 'inline', 'heading_open', 'ordered_list_open', 'bullet_list_open', 'list_item_open', 'blockquote_open'].includes(token.type)) { for (let i = 0; i < tokens.length; i++) { const token = tokens[i]; if (!token.map) { continue; } if (token.map[0] <= selectedRange.start.line && token.map[1] > selectedRange.start.line) { if (!textTokenTypes.has(token.type)) { return false; } } // Special case for html such as: // // // | // // // In this case pasting will cause the html block to be created even though the cursor is not currently inside a block if (token.type === 'html_block' && token.map[1] === selectedRange.start.line) { const nextToken = tokens.at(i + 1); // The next token does not need to be a html_block, but it must be on the next line if (nextToken?.map?.[0] === selectedRange.end.line + 1) { return false; } }"} {"_id":"doc-en-vscode-aabd82a1d0c0bb136fae1a23e247f0d14eed4896e954d67087fb234afbd586e7","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 'mocha'; import * as vscode from 'vscode'; import { InMemoryDocument } from '../client/inMemoryDocument'; import { PasteUrlAsMarkdownLink, findValidUriInText, shouldInsertMarkdownLinkByDefault } from '../languageFeatures/copyFiles/pasteUrlProvider'; import { createInsertUriListEdit } from '../languageFeatures/copyFiles/shared'; import { createNewMarkdownEngine } from './engine'; import { noopToken } from '../util/cancellation'; function makeTestDoc(contents: string) { return new InMemoryDocument(vscode.Uri.file('test.md'), contents); } suite('createEditAddingLinksForUriList', () => { test('Markdown Link Pasting should occur for a valid link (end to end)', async () => { // createEditAddingLinksForUriList -> checkSmartPaste -> tryGetUriListSnippet -> createUriListSnippet -> createLinkSnippet const result = createInsertUriListEdit( new InMemoryDocument(vscode.Uri.file('test.md'), 'hello world!'), [new vscode.Range(0, 0, 0, 12)], 'https://www.microsoft.com/'); // need to check the actual result -> snippet value assert.strictEqual(result?.label, 'Insert Markdown Link'); }); suite('validateLink', () => { test('Markdown pasting should occur for a valid link', () => { assert.strictEqual( findValidUriInText('https://www.microsoft.com/'), 'https://www.microsoft.com/'); }); test('Markdown pasting should occur for a valid link preceded by a new line', () => { assert.strictEqual( findValidUriInText('rnhttps://www.microsoft.com/'), 'https://www.microsoft.com/'); }); test('Markdown pasting should occur for a valid link followed by a new line', () => { assert.strictEqual( findValidUriInText('https://www.microsoft.com/rn'), 'https://www.microsoft.com/'); }); test('Markdown pasting should not occur for a valid hostname and invalid protool', () => { assert.strictEqual( findValidUriInText('invalid:www.microsoft.com'), undefined); }); test('Markdown pasting should not occur for plain text', () => { assert.strictEqual( findValidUriInText('hello world!'), undefined); }); test('Markdown pasting should not occur for plain text including a colon', () => { assert.strictEqual( findValidUriInText('hello: world!'), undefined); }); test('Markdown pasting should not occur for plain text including a slashes', () => { assert.strictEqual( findValidUriInText('helloworld!'), undefined); }); test('Markdown pasting should not occur for a link followed by text', () => { assert.strictEqual( findValidUriInText('https://www.microsoft.com/ hello world!'), undefined); }); test('Markdown pasting should occur for a link preceded or followed by spaces', () => { assert.strictEqual( findValidUriInText(' https://www.microsoft.com/ '), 'https://www.microsoft.com/'); }); test('Markdown pasting should not occur for a link with an invalid scheme', () => { assert.strictEqual( findValidUriInText('hello:www.microsoft.com'), undefined); }); test('Markdown pasting should not occur for multiple links being pasted', () => { assert.strictEqual( findValidUriInText('https://www.microsoft.com/rnhttps://www.microsoft.com/rnhttps://www.microsoft.com/rnhttps://www.microsoft.com/'), undefined); }); test('Markdown pasting should not occur for multiple links with spaces being pasted', () => { assert.strictEqual( findValidUriInText('https://www.microsoft.com/ rnhttps://www.microsoft.com/rnhttps://www.microsoft.com/rn hello rnhttps://www.microsoft.com/'), undefined); }); test('Markdown pasting should not occur for just a valid uri scheme', () => { assert.strictEqual( findValidUriInText('https://'), undefined); }); }); suite('createInsertUriListEdit', () => { test('Should create snippet with < > when pasted link has an mismatched parentheses', () => { const edit = createInsertUriListEdit(makeTestDoc(''), [new vscode.Range(0, 0, 0, 0)], 'https://www.mic(rosoft.com'); assert.strictEqual(edit?.edits?.[0].snippet.value, '[${1:text}]()'); }); test('Should create Markdown link snippet when pasteAsMarkdownLink is true', () => { const edit = createInsertUriListEdit(makeTestDoc(''), [new vscode.Range(0, 0, 0, 0)], 'https://www.microsoft.com'); assert.strictEqual(edit?.edits?.[0].snippet.value, '[${1:text}](https://www.microsoft.com)'); }); test('Should use an unencoded URI string in Markdown link when passing in an external browser link', () => { const edit = createInsertUriListEdit(makeTestDoc(''), [new vscode.Range(0, 0, 0, 0)], 'https://www.microsoft.com'); assert.strictEqual(edit?.edits?.[0].snippet.value, '[${1:text}](https://www.microsoft.com)'); }); test('Should not decode an encoded URI string when passing in an external browser link', () => { const edit = createInsertUriListEdit(makeTestDoc(''), [new vscode.Range(0, 0, 0, 0)], 'https://www.microsoft.com/%20'); assert.strictEqual(edit?.edits?.[0].snippet.value, '[${1:text}](https://www.microsoft.com/%20)'); }); test('Should not encode an unencoded URI string when passing in an external browser link', () => { const edit = createInsertUriListEdit(makeTestDoc(''), [new vscode.Range(0, 0, 0, 0)], 'https://www.example.com/path?query=value&another=value#fragment'); assert.strictEqual(edit?.edits?.[0].snippet.value, '[${1:text}](https://www.example.com/path?query=value&another=value#fragment)'); }); }); suite('shouldInsertMarkdownLinkByDefault', () => { test('Smart should be enabled for selected plain text', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('hello world'), PasteUrlAsMarkdownLink.SmartWithSelection, [new vscode.Range(0, 0, 0, 12)], noopToken), true); }); test('Smart should be enabled in headers', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('# title'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 2, 0, 2)], noopToken), true); }); test('Smart should be enabled in lists', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('1. text'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 3, 0, 3)], noopToken), true); }); test('Smart should be enabled in blockquotes', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('> text'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 3, 0, 3)], noopToken), true); }); test('Smart should be disabled in indented code blocks', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc(' code'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 4, 0, 4)], noopToken), false); }); test('Smart should be disabled in fenced code blocks', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('```rnrn```'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 5, 0, 5)], noopToken), false); assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('~~~rnrn~~~'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 5, 0, 5)], noopToken), false); }); test('Smart should be disabled in math blocks', async () => { const katex = (await import('@vscode/markdown-it-katex')).default; const engine = createNewMarkdownEngine(); (await engine.getEngine(undefined)).use(katex); assert.strictEqual( await shouldInsertMarkdownLinkByDefault(engine, makeTestDoc('$$rnrn$$'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 5, 0, 5)], noopToken), false); }); test('Smart should be disabled in link definitions', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('[ref]: http://example.com'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 4, 0, 6)], noopToken), false); assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('[ref]: '), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 7, 0, 7)], noopToken), false); }); test('Smart should be disabled in html blocks', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('

nan

'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(1, 0, 1, 0)], noopToken), false); }); test('Smart should be disabled in Markdown links', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('[a](bcdef)'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 4, 0, 6)], noopToken), false); }); test('Smart should be disabled in Markdown images', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('![a](bcdef)'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 5, 0, 10)], noopToken), false); }); test('Smart should be disabled in inline code', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('``'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 1, 0, 1)], noopToken), false); assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('``'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 0, 0, 0)], noopToken), false); }); test('Smart should be disabled in inline math', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('$$'), PasteUrlAsMarkdownLink.SmartWithSelection, [new vscode.Range(0, 1, 0, 1)], noopToken), false); }); test('Smart should be enabled for empty selection', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('xyz'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 0, 0, 0)], noopToken), true); }); test('SmartWithSelection should disable for empty selection', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('xyz'), PasteUrlAsMarkdownLink.SmartWithSelection, [new vscode.Range(0, 0, 0, 0)], noopToken), false); }); test('Smart should disable for selected link', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('https://www.microsoft.com'), PasteUrlAsMarkdownLink.SmartWithSelection, [new vscode.Range(0, 0, 0, 25)], noopToken), false); }); test('Smart should disable for selected link with trailing whitespace', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc(' https://www.microsoft.com '), PasteUrlAsMarkdownLink.SmartWithSelection, [new vscode.Range(0, 0, 0, 30)], noopToken), false); }); test('Should evaluate pasteAsMarkdownLink as true for a link pasted in square brackets', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('[abc]'), PasteUrlAsMarkdownLink.SmartWithSelection, [new vscode.Range(0, 1, 0, 4)], noopToken), true); }); test('Should evaluate pasteAsMarkdownLink as false for selected whitespace and new lines', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc(' rnrn'), PasteUrlAsMarkdownLink.SmartWithSelection, [new vscode.Range(0, 0, 0, 7)], noopToken), false); }); }); });
"} {"_id":"doc-en-vscode-fafde711d76c883aed05342af9865141d0ac7a22c70ef526bb77ab9ce1dce484","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 'mocha'; import * as vscode from 'vscode'; import { InMemoryDocument } from '../client/inMemoryDocument'; import { PasteUrlAsMarkdownLink, findValidUriInText, shouldInsertMarkdownLinkByDefault } from '../languageFeatures/copyFiles/pasteUrlProvider'; import { createInsertUriListEdit } from '../languageFeatures/copyFiles/shared'; import { createNewMarkdownEngine } from './engine'; import { noopToken } from '../util/cancellation'; function makeTestDoc(contents: string) { return new InMemoryDocument(vscode.Uri.file('test.md'), contents); } suite('createEditAddingLinksForUriList', () => { test('Markdown Link Pasting should occur for a valid link (end to end)', async () => { // createEditAddingLinksForUriList -> checkSmartPaste -> tryGetUriListSnippet -> createUriListSnippet -> createLinkSnippet const result = createInsertUriListEdit( new InMemoryDocument(vscode.Uri.file('test.md'), 'hello world!'), [new vscode.Range(0, 0, 0, 12)], 'https://www.microsoft.com/'); // need to check the actual result -> snippet value assert.strictEqual(result?.label, 'Insert Markdown Link'); }); suite('validateLink', () => { test('Markdown pasting should occur for a valid link', () => { assert.strictEqual( findValidUriInText('https://www.microsoft.com/'), 'https://www.microsoft.com/'); }); test('Markdown pasting should occur for a valid link preceded by a new line', () => { assert.strictEqual( findValidUriInText('rnhttps://www.microsoft.com/'), 'https://www.microsoft.com/'); }); test('Markdown pasting should occur for a valid link followed by a new line', () => { assert.strictEqual( findValidUriInText('https://www.microsoft.com/rn'), 'https://www.microsoft.com/'); }); test('Markdown pasting should not occur for a valid hostname and invalid protool', () => { assert.strictEqual( findValidUriInText('invalid:www.microsoft.com'), undefined); }); test('Markdown pasting should not occur for plain text', () => { assert.strictEqual( findValidUriInText('hello world!'), undefined); }); test('Markdown pasting should not occur for plain text including a colon', () => { assert.strictEqual( findValidUriInText('hello: world!'), undefined); }); test('Markdown pasting should not occur for plain text including a slashes', () => { assert.strictEqual( findValidUriInText('helloworld!'), undefined); }); test('Markdown pasting should not occur for a link followed by text', () => { assert.strictEqual( findValidUriInText('https://www.microsoft.com/ hello world!'), undefined); }); test('Markdown pasting should occur for a link preceded or followed by spaces', () => { assert.strictEqual( findValidUriInText(' https://www.microsoft.com/ '), 'https://www.microsoft.com/'); }); test('Markdown pasting should not occur for a link with an invalid scheme', () => { assert.strictEqual( findValidUriInText('hello:www.microsoft.com'), undefined); }); test('Markdown pasting should not occur for multiple links being pasted', () => { assert.strictEqual( findValidUriInText('https://www.microsoft.com/rnhttps://www.microsoft.com/rnhttps://www.microsoft.com/rnhttps://www.microsoft.com/'), undefined); }); test('Markdown pasting should not occur for multiple links with spaces being pasted', () => { assert.strictEqual( findValidUriInText('https://www.microsoft.com/ rnhttps://www.microsoft.com/rnhttps://www.microsoft.com/rn hello rnhttps://www.microsoft.com/'), undefined); }); test('Markdown pasting should not occur for just a valid uri scheme', () => { assert.strictEqual( findValidUriInText('https://'), undefined); }); }); suite('createInsertUriListEdit', () => { test('Should create snippet with < > when pasted link has an mismatched parentheses', () => { const edit = createInsertUriListEdit(makeTestDoc(''), [new vscode.Range(0, 0, 0, 0)], 'https://www.mic(rosoft.com'); assert.strictEqual(edit?.edits?.[0].snippet.value, '[${1:text}]()'); }); test('Should create Markdown link snippet when pasteAsMarkdownLink is true', () => { const edit = createInsertUriListEdit(makeTestDoc(''), [new vscode.Range(0, 0, 0, 0)], 'https://www.microsoft.com'); assert.strictEqual(edit?.edits?.[0].snippet.value, '[${1:text}](https://www.microsoft.com)'); }); test('Should use an unencoded URI string in Markdown link when passing in an external browser link', () => { const edit = createInsertUriListEdit(makeTestDoc(''), [new vscode.Range(0, 0, 0, 0)], 'https://www.microsoft.com'); assert.strictEqual(edit?.edits?.[0].snippet.value, '[${1:text}](https://www.microsoft.com)'); }); test('Should not decode an encoded URI string when passing in an external browser link', () => { const edit = createInsertUriListEdit(makeTestDoc(''), [new vscode.Range(0, 0, 0, 0)], 'https://www.microsoft.com/%20'); assert.strictEqual(edit?.edits?.[0].snippet.value, '[${1:text}](https://www.microsoft.com/%20)'); }); test('Should not encode an unencoded URI string when passing in an external browser link', () => { const edit = createInsertUriListEdit(makeTestDoc(''), [new vscode.Range(0, 0, 0, 0)], 'https://www.example.com/path?query=value&another=value#fragment'); assert.strictEqual(edit?.edits?.[0].snippet.value, '[${1:text}](https://www.example.com/path?query=value&another=value#fragment)'); }); }); suite('shouldInsertMarkdownLinkByDefault', () => { test('Smart should be enabled for selected plain text', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('hello world'), PasteUrlAsMarkdownLink.SmartWithSelection, [new vscode.Range(0, 0, 0, 12)], noopToken), true); }); test('Smart should be enabled in headers', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('# title'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 2, 0, 2)], noopToken), true); }); test('Smart should be enabled in lists', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('1. text'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 3, 0, 3)], noopToken), true); }); test('Smart should be enabled in blockquotes', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('> text'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 3, 0, 3)], noopToken), true); }); test('Smart should be disabled in indented code blocks', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc(' code'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 4, 0, 4)], noopToken), false); }); test('Smart should be disabled in fenced code blocks', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('```rnrn```'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 5, 0, 5)], noopToken), false); assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('~~~rnrn~~~'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 5, 0, 5)], noopToken), false); }); test('Smart should be disabled in math blocks', async () => { const katex = (await import('@vscode/markdown-it-katex')).default; const engine = createNewMarkdownEngine(); (await engine.getEngine(undefined)).use(katex); assert.strictEqual( await shouldInsertMarkdownLinkByDefault(engine, makeTestDoc('$$rnrn$$'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 5, 0, 5)], noopToken), false); }); test('Smart should be disabled in link definitions', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('[ref]: http://example.com'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 4, 0, 6)], noopToken), false); assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('[ref]: '), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 7, 0, 7)], noopToken), false); }); test('Smart should be disabled in html blocks', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('

nan

'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(1, 0, 1, 0)], noopToken), false); }); test('Smart should be disabled in html blocks where paste creates the block', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('

nn

'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(1, 0, 1, 0)], noopToken), false, 'Between two html tags should be treated as html block'); assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('

nntext'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(1, 0, 1, 0)], noopToken), false, 'Between opening html tag and text should be treated as html block'); assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('

nnn

'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(1, 0, 1, 0)], noopToken), true, 'Extra new line after paste should not be treated as html block'); }); test('Smart should be disabled in Markdown links', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('[a](bcdef)'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 4, 0, 6)], noopToken), false); }); test('Smart should be disabled in Markdown images', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('![a](bcdef)'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 5, 0, 10)], noopToken), false); }); test('Smart should be disabled in inline code', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('``'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 1, 0, 1)], noopToken), false); assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('``'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 0, 0, 0)], noopToken), false); }); test('Smart should be disabled in inline math', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('$$'), PasteUrlAsMarkdownLink.SmartWithSelection, [new vscode.Range(0, 1, 0, 1)], noopToken), false); }); test('Smart should be enabled for empty selection', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('xyz'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 0, 0, 0)], noopToken), true); }); test('SmartWithSelection should disable for empty selection', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('xyz'), PasteUrlAsMarkdownLink.SmartWithSelection, [new vscode.Range(0, 0, 0, 0)], noopToken), false); }); test('Smart should disable for selected link', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('https://www.microsoft.com'), PasteUrlAsMarkdownLink.SmartWithSelection, [new vscode.Range(0, 0, 0, 25)], noopToken), false); }); test('Smart should disable for selected link with trailing whitespace', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc(' https://www.microsoft.com '), PasteUrlAsMarkdownLink.SmartWithSelection, [new vscode.Range(0, 0, 0, 30)], noopToken), false); }); test('Should evaluate pasteAsMarkdownLink as true for a link pasted in square brackets', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('[abc]'), PasteUrlAsMarkdownLink.SmartWithSelection, [new vscode.Range(0, 1, 0, 4)], noopToken), true); }); test('Should evaluate pasteAsMarkdownLink as false for selected whitespace and new lines', async () => { assert.strictEqual( await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc(' rnrn'), PasteUrlAsMarkdownLink.SmartWithSelection, [new vscode.Range(0, 0, 0, 7)], noopToken), false); }); }); });
"} {"_id":"doc-en-vscode-801259d4b82e94090b65139bf070cdb5ad937d7d115f211a2870f54e7a2982b2","title":"","text":"import { resolveMarketplaceHeaders } from 'vs/platform/externalServices/common/marketplace'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { StopWatch } from 'vs/base/common/stopwatch'; const CURRENT_TARGET_PLATFORM = isWeb ? TargetPlatform.WEB : getTargetPlatform(platform, arch); const ACTIVITY_HEADER_NAME = 'X-Market-Search-Activity-Id';"} {"_id":"doc-en-vscode-64ec1e47dd83b024e1bac908347ccb539cc177e662a8d338ec8b1c4caa228277","title":"","text":"} if (needAllVersions.size) { const startTime = new Date().getTime(); const stopWatch = new StopWatch(); const query = new Query() .withFlags(flags & ~Flags.IncludeLatestVersionOnly, Flags.IncludeVersions) .withPage(1, needAllVersions.size) .withFilter(FilterType.ExtensionId, ...needAllVersions.keys()); const { extensions } = await this.queryGalleryExtensions(query, criteria, token); this.telemetryService.publicLog2('galleryService:additionalQuery', { duration: new Date().getTime() - startTime, duration: stopWatch.elapsed(), count: needAllVersions.size }); for (const extension of extensions) {"} {"_id":"doc-en-vscode-8c7758ba2feaa0e305d23dc691632cfd1897f9d270e780ede9489d248c410d75","title":"","text":"'Content-Length': String(data.length), }; const startTime = new Date().getTime(); const stopWatch = new StopWatch(); let context: IRequestContext | undefined, error: any, total: number = 0; try {"} {"_id":"doc-en-vscode-70c688729d9296d4934801e2a6b820a2ae0cc83d97d6e1b9ce442c0499339f0c","title":"","text":"this.telemetryService.publicLog2('galleryService:query', { ...query.telemetryData, requestBodySize: String(data.length), duration: new Date().getTime() - startTime, duration: stopWatch.elapsed(), success: !!context && isSuccess(context), responseBodySize: context?.res.headers['Content-Length'], statusCode: context ? String(context.res.statusCode) : undefined,"} {"_id":"doc-en-vscode-788c19b9ffbfc4af233557a352f4b580f52dd0d78ebc9a2e459ba02c6e871938","title":"","text":"} } this._currentContent = message + provider.provideContent() + readMoreLink + disableHelpHint + localize('exit-tip', 'nnExit this dialog via the Escape key.'); this._currentContent = message + provider.provideContent() + readMoreLink + disableHelpHint + localize('exit-tip', 'nExit this dialog via the Escape key.'); this._updateContextKeys(provider, true); this._getTextModel(URI.from({ path: `accessible-view-${provider.verbositySettingKey}`, scheme: 'accessible-view', fragment: this._currentContent })).then((model) => {"} {"_id":"doc-en-vscode-1968aedbcd49959320380073405135f55c7b86ae2c91e8f88aa0db7630c517bb","title":"","text":"_xterm: Pick & { raw: Terminal }, @IInstantiationService _instantiationService: IInstantiationService, @IKeybindingService private readonly _keybindingService: IKeybindingService, @IAccessibilityService private readonly _accessibilityService: IAccessibilityService, @IContextKeyService private readonly _contextKeyService: IContextKeyService, @ICommandService private readonly _commandService: ICommandService @ICommandService private readonly _commandService: ICommandService, @IAccessibilityService private readonly _accessibilityService: IAccessibilityService ) { super(); this._hasShellIntegration = _xterm.shellIntegration.status === ShellIntegrationStatus.VSCode; } private _descriptionForCommand(commandId: string, msg: string, noKbMsg: string): string { const kb = this._keybindingService.lookupKeybindings(commandId); switch (kb.length) { case 0: return format(noKbMsg, commandId); case 1: return format(msg, kb[0].getAriaLabel()); if (commandId === TerminalCommandId.RunRecentCommand) { const kb = this._keybindingService.lookupKeybindings(commandId); // Run recent command has multiple keybindings. lookupKeybinding just returns the first one regardless of the when context. // Thus, we have to check if accessibility mode is enabled to determine which keybinding to use. return this._accessibilityService.isScreenReaderOptimized() ? format(msg, kb[1].getAriaLabel()) : format(msg, kb[0].getAriaLabel()); } // Run recent command has multiple keybindings. lookupKeybinding just returns the first one regardless of the when context. // Thus, we have to check if accessibility mode is enabled to determine which keybinding to use. return this._accessibilityService.isScreenReaderOptimized() ? format(msg, kb[1].getAriaLabel()) : format(msg, kb[0].getAriaLabel()); const kb = this._keybindingService.lookupKeybinding(commandId, this._contextKeyService)?.getAriaLabel(); return !kb ? format(noKbMsg, commandId) : format(msg, kb); } provideContent(): string {"} {"_id":"doc-en-vscode-50b174417338e58a0a1eb139873483eee709854dd1503d809c2cb358a4df30d0","title":"","text":"import { getNotificationFromContext } from 'vs/workbench/browser/parts/notifications/notificationsCommands'; import { IListService, WorkbenchList } from 'vs/platform/list/browser/listService'; import { NotificationFocusedContext } from 'vs/workbench/common/contextkeys'; import { IAccessibleViewService, AccessibleViewService, IAccessibleContentProvider, IAccessibleViewOptions, AccessibleViewType, accessibleViewIsShown } from 'vs/workbench/contrib/accessibility/browser/accessibleView'; import { IAccessibleViewService, AccessibleViewService, IAccessibleContentProvider, IAccessibleViewOptions, AccessibleViewType } from 'vs/workbench/contrib/accessibility/browser/accessibleView'; import { IHoverService } from 'vs/workbench/services/hover/browser/hover'; import { alert } from 'vs/base/browser/ui/aria/aria';"} {"_id":"doc-en-vscode-76eb602c58f6ca0dfef670c9225cf5be0ff449d399fda3e516f7df3b63c9a9e4","title":"","text":"const accessibleViewService = accessor.get(IAccessibleViewService); accessibleViewService.next(); return true; }, accessibleViewIsShown)); })); this._register(AccessibleViewPreviousAction.addImplementation(95, 'previous', accessor => { const accessibleViewService = accessor.get(IAccessibleViewService); accessibleViewService.previous(); return true; }, accessibleViewIsShown)); })); } }"} {"_id":"doc-en-vscode-e6691f3871bbb67b293176017ddcb9aea375483edc8b1893344448bb8a9a5641","title":"","text":"import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { MenuId } from 'vs/platform/actions/common/actions'; import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; export const accessibilityHelpIsShown = new RawContextKey('accessibilityHelpIsShown', false, true); export const accessibleViewIsShown = new RawContextKey('accessibleViewIsShown', false, true); export const enum AccessibilityVerbositySettingId { Terminal = 'accessibility.verbosity.terminal',"} {"_id":"doc-en-vscode-d99da5da9199c039b5f79d927e309bdf60cb5401fbb83af4cc5e6d6b9853150e","title":"","text":"export const AccessibleViewNextAction = registerCommand(new MultiCommand({ id: 'editor.action.accessibleViewNext', precondition: undefined, precondition: accessibleViewIsShown, kbOpts: { primary: KeyMod.Alt | KeyCode.BracketRight, weight: KeybindingWeight.WorkbenchContrib"} {"_id":"doc-en-vscode-d9a7705f53973a285e08ed076dd38d846cb5ba8273d375fac4a1950eecca470c","title":"","text":"export const AccessibleViewPreviousAction = registerCommand(new MultiCommand({ id: 'editor.action.accessibleViewPrevious', precondition: undefined, precondition: accessibleViewIsShown, kbOpts: { primary: KeyMod.Alt | KeyCode.BracketLeft, weight: KeybindingWeight.WorkbenchContrib"} {"_id":"doc-en-vscode-05897fdf589a825c184ae47cd4dbbb4e3b7b9349b750e1148d251911bd471e36","title":"","text":"import { localize } from 'vs/nls'; import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IContextKey, IContextKeyService, RawContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IContextViewDelegate, IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { IInstantiationService, createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IOpenerService } from 'vs/platform/opener/common/opener';"} {"_id":"doc-en-vscode-3328c23433d641a663e945557a86cae0b391357958617e9ffd3ab53838ba92c5","title":"","text":"import { getSimpleEditorOptions } from 'vs/workbench/contrib/codeEditor/browser/simpleEditorOptions'; import { CodeActionController } from 'vs/editor/contrib/codeAction/browser/codeActionController'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { AccessibilityVerbositySettingId, AccessibleViewAction, AccessibleViewNextAction, AccessibleViewPreviousAction } from 'vs/workbench/contrib/accessibility/browser/accessibilityContribution'; import { AccessibilityVerbositySettingId, AccessibleViewAction, AccessibleViewNextAction, AccessibleViewPreviousAction, accessibilityHelpIsShown, accessibleViewIsShown } from 'vs/workbench/contrib/accessibility/browser/accessibilityContribution'; import { ILayoutService } from 'vs/platform/layout/browser/layoutService'; const enum DIMENSIONS {"} {"_id":"doc-en-vscode-e4f8ee7f90ace168db36a0baa2cf29826e4c607dd0b01cd83bc89cc28dd30200","title":"","text":"type: AccessibleViewType; } export const accessibilityHelpIsShown = new RawContextKey('accessibilityHelpIsShown', false, true); export const accessibleViewIsShown = new RawContextKey('accessibleViewIsShown', false, true); class AccessibleView extends Disposable { private _editorWidget: CodeEditorWidget; private _accessiblityHelpIsShown: IContextKey;"} {"_id":"doc-en-vscode-1141e8b1e9decaca75f3c0fa48a86f89aa44e5cfe2cf5249309fd4a0002e1ee7","title":"","text":"import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility'; import { Action2, registerAction2 } from 'vs/platform/actions/common/actions'; import { accessibilityHelpIsShown } from 'vs/workbench/contrib/accessibility/browser/accessibleView'; import { accessibilityHelpIsShown } from 'vs/workbench/contrib/accessibility/browser/accessibilityContribution'; import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import { alert } from 'vs/base/browser/ui/aria/aria';"} {"_id":"doc-en-vscode-5577d48a7907a7559d15b6a92cb2515854cf7cf3c010104b78e93786b517ad45","title":"","text":"this.setHover(node.checkbox); this.setAccessibilityInformation(node.checkbox); this.toggle.domNode.classList.add(TreeItemCheckbox.checkboxClass); this.toggle.domNode.tabIndex = 1; DOM.append(this.checkboxContainer, this.toggle.domNode); this.registerListener(node); }"} {"_id":"doc-en-vscode-037f1bb2922e2fe77c165b25b32acefd33f398fd2cf187afa17648ece4609210","title":"","text":"} async toggleAppliationScope(extension: ILocalExtension, fromProfileLocation: URI): Promise { if (isApplicationScopedExtension(extension.manifest)) { if (isApplicationScopedExtension(extension.manifest) || extension.isBuiltin) { return extension; }"} {"_id":"doc-en-vscode-56a9a7628fe737d415271dff8bf45499b86083c92b7d86a27fcda43b89faa7ef","title":"","text":"menu: { id: MenuId.ExtensionContext, group: '2_configure', when: ContextKeyExpr.and(ContextKeyExpr.equals('extensionStatus', 'installed'), ContextKeyExpr.has('isDefaultApplicationScopedExtension').negate()), when: ContextKeyExpr.and(ContextKeyExpr.equals('extensionStatus', 'installed'), ContextKeyExpr.has('isDefaultApplicationScopedExtension').negate(), ContextKeyExpr.has('isBuiltinExtension').negate()), order: 3 }, run: async (accessor: ServicesAccessor, id: string) => {"} {"_id":"doc-en-vscode-277b4808e4bc24f10ecef6c20642056045c0a42aa24a8f9f06efe899204affbf","title":"","text":"} async toggleApplyExtensionToAllProfiles(extension: IExtension): Promise { if (!extension.local || isApplicationScopedExtension(extension.local.manifest)) { if (!extension.local || isApplicationScopedExtension(extension.local.manifest) || extension.isBuiltin) { return; } await this.extensionManagementService.toggleAppliationScope(extension.local, this.userDataProfileService.currentProfile.extensionsResource);"} {"_id":"doc-en-vscode-4a1c516fcfcc2c745215d91437573b43ee2e3e35e7a65c12cd7819aac98b926f","title":"","text":"* Given the `repository.root` compute the relative path while trying to preserve * the casing of the resource URI. The `repository.root` segment of the path can * have a casing mismatch if the folder/workspace is being opened with incorrect * casing. * casing which is why we attempt to use substring() before relative(). */ export function relativePath(from: string, to: string): string { // On Windows, there are cases in which `from` is a path that contains a trailing `` character // (ex: C:, serverfolder) due to the implementation of `path.normalize()`. This behavior is // by design as documented in https://github.com/nodejs/node/issues/1765. if (isWindows) { from = from.replace(/$/, ''); // There are cases in which the `from` path may contain a trailing separator at // the end (ex: \"C:\", \"serverfolder\" (Windows) or \"/\" (Linux/macOS)) which // is by design as documented in https://github.com/nodejs/node/issues/1765. If // the trailing separator is missing, we add it. if (from.charAt(from.length - 1) !== sep) { from += sep; } if (isDescendant(from, to) && from.length < to.length) { return to.substring(from.length + 1); return to.substring(from.length); } // Fallback to `path.relative`"} {"_id":"doc-en-vscode-c054f6d43ab079e1cca77adcd9f2536f89d6674b7ebb2a70472f20930a18f972","title":"","text":"padding-right: 5px; /* with tab sizing shrink/fixed and badges, we want a right-padding because the close button is hidden */ } .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink:not(.tab-actions-left):not(.tab-actions-off) .tab-label { padding-right: 5px; /* ensure that the gradient does not show when tab actions show https://github.com/microsoft/vscode/issues/189625*/ } .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sticky-compact:not(.has-icon) .monaco-icon-label { text-align: center; /* ensure that sticky-compact tabs without icon have label centered */ }"} {"_id":"doc-en-vscode-80310d798c953093ba07c7484f17c57b8b5aea07d917f585268af5be884ac17a","title":"","text":"/* Window Title Menu */ .monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center { z-index: 2500; } /* MacOS Desktop supports click event despite `drag` and therefore we don't need to clear it */ .monaco-workbench:not(.mac) .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center, .monaco-workbench.mac.web .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center { -webkit-app-region: no-drag; }"} {"_id":"doc-en-vscode-dcec5a6927fe9b34130d941baec2a6557c2a2b016abfc1c956a5e2814eb0cb31","title":"","text":"} if (styles.listFocusForeground) { content.push(`.monaco-list${suffix}:focus .monaco-list-row.focused:not(.monaco-list-row.action.option-disabled) { color: ${styles.listFocusForeground}; }`); content.push(`.monaco-list${suffix}:focus .monaco-list-row.focused { color: ${styles.listFocusForeground}; }`); } if (styles.listActiveSelectionBackground) {"} {"_id":"doc-en-vscode-0b1481ab4b862ca96cafd8a3db3841fabb5e583fbee378e7c92c5ecddcb1ff20","title":"","text":"} .action-widget .monaco-list-row.action.option-disabled, .action-widget .monaco-list:focus .monaco-list-row.focused.action.option-disabled, .action-widget .monaco-list-row.action.option-disabled .codicon { color: var(--vscode-disabledForeground); } .action-widget .monaco-list-row.action:not(.option-disabled) .codicon { color: inherit; }"} {"_id":"doc-en-vscode-d0db92d32b9b8e8627831b82697a866eb2328d1206f7dca35a6dbe23a32c4c92","title":"","text":"builtin printf '%s' \"${terms[2]:-}\" } __vsc_escape_value_fast() { builtin local LC_ALL=C out out=${1///} out=${out//;/x3b} builtin printf '%sn' \"${out}\" } # The property (P) and command (E) codes embed values which require escaping. # Backslashes are doubled. Non-alphanumeric characters are converted to escaped hex. __vsc_escape_value() { # If the input being too large, switch to the faster function if [ \"${#1}\" -ge 2000 ]; then __vsc_escape_value_fast \"$1\" builtin return fi # Process text byte by byte, not by codepoint. builtin local LC_ALL=C str=\"${1}\" i byte token out=''"} {"_id":"doc-en-vscode-c55f7796d1528d0c96fd9f29120b53daad784c34f94f7812a76b7d8f59ffbe42","title":"","text":"disturl \"https://electronjs.org/headers\" target \"25.9.2\" ms_build_id \"24603566\" target \"25.9.4\" ms_build_id \"25127168\" runtime \"electron\" build_from_source \"true\""} {"_id":"doc-en-vscode-35241f6053a51f18d249c33095d0e43353ff28524e2c3310c2eafda799a697b9","title":"","text":" 2606d6745056d248fe7ba21e6a30467d3ea80d2689c5fa6d2a35acf1b4a72ddd *chromedriver-v25.9.2-darwin-arm64.zip 22a86732b9e6c2afc07021ea0adeb92cdbaaa8751843c0d5170b5e96550685e7 *chromedriver-v25.9.2-darwin-x64.zip f5f42513bb55c7c1098e669d12488844ca2e63cd0d3a375db2eab517975c130c *chromedriver-v25.9.2-linux-arm64.zip 28a5613f7e4b117a65ec2882b124bf1d388f1c4fb86b228acadc297601faa6fd *chromedriver-v25.9.2-linux-armv7l.zip 7d01d537383df4b1653647e14fb768d27879943596a87b57ae3f171aa2aaf5d1 *chromedriver-v25.9.2-linux-x64.zip 3fac66fe45b4a5dcd9a4784d66bd8087d0dee5fccf06cb3f34e78f8bef3f0f8f *chromedriver-v25.9.2-mas-arm64.zip a15fc80fac243330f15a7ff7cc834c50c79833e81b871cc45f7239bf1743b4ac *chromedriver-v25.9.2-mas-x64.zip f0a354e01e277b14422e34f8af9c8c43ae975c6fb69a2e61ef275b6ec919f2ab *chromedriver-v25.9.2-win32-arm64.zip 570a6b5bc485bfea9681c97b79832d5d5bcafdd993c13dc4ab11558e3a27c554 *chromedriver-v25.9.2-win32-ia32.zip 4134f539ac304c65dfca9812b0d3943ea64d886989eba8f62828718b106c4eee *chromedriver-v25.9.2-win32-x64.zip 835418b9274c76503542c986d63bb9d98f071c702170536bdd62c1760589e01e *electron-api.json fd9f5b1439445acc69441ef66cc47f56c5c0848dec5f6daf91a476073e72a756 *electron-v25.9.2-darwin-arm64-dsym-snapshot.zip de29ef2a4c7b76281b1cf3ac9e6047a9275cc60167c6cd60509f2eb2a3258842 *electron-v25.9.2-darwin-arm64-dsym.zip 732f51802f2902ca08c3a06a45fe23820b1effbeb3ebd39fcae9fce5a1e0b25d *electron-v25.9.2-darwin-arm64-symbols.zip ab82efb59077a85fd20264f8ad0dedc4c8b0b2fc9d2948ed9461425faf5e35f6 *electron-v25.9.2-darwin-arm64.zip fb924b4dd0d781a14114e54fa556ca326c60665b674712c59163e7b44db675d8 *electron-v25.9.2-darwin-x64-dsym-snapshot.zip 197fc3e120e54578658e2f10b5fcec1d2004f1637d4bee116ff1e12b0c5a1429 *electron-v25.9.2-darwin-x64-dsym.zip 57d0a0f55726524ff843a040e516e425c3537a4602ab8c23120433fbc51470fb *electron-v25.9.2-darwin-x64-symbols.zip 0fe310e2ed13a97cd9c28fb0cf806338cd2e720083e6d1b13d60ba4cedb8f295 *electron-v25.9.2-darwin-x64.zip eb1a31ccd6a89a21538a8b1f0b5d3b77e1fe946b898319e1832cb9dc3abcd753 *electron-v25.9.2-linux-arm64-debug.zip b5b128bed0a09955ad5bb91fa9f5ab9155a547f787ad580bcd5bf409bb697ff6 *electron-v25.9.2-linux-arm64-symbols.zip 0b2d48a29d79fcd21d72d05fdb7638dd2fd257cf0d4cf9bd32f182b2634de466 *electron-v25.9.2-linux-arm64.zip eb1a31ccd6a89a21538a8b1f0b5d3b77e1fe946b898319e1832cb9dc3abcd753 *electron-v25.9.2-linux-armv7l-debug.zip 43f1f4c1475335719ba8f1f7f036a084fb22b5faa908bf4f7d30a96d5d9c159d *electron-v25.9.2-linux-armv7l-symbols.zip 4ea3ee3ad41c69454d9a12518eeff1ec5dbd841c8200dc8652e6c0b101d1259c *electron-v25.9.2-linux-armv7l.zip 1a8daf1f9e155d7143d16367e54e4e3b8e9d71ad580b44c8dfba0cb4e7a1c640 *electron-v25.9.2-linux-x64-debug.zip 803f32ca345d8974cc074dc177e06c62f8bcc98d4a39eccb676b7d302b8fc466 *electron-v25.9.2-linux-x64-symbols.zip aab65a562723e04eadbdee1251a749756b366dc1c5014bcc987c21c0a523fe2f *electron-v25.9.2-linux-x64.zip fd9f5b1439445acc69441ef66cc47f56c5c0848dec5f6daf91a476073e72a756 *electron-v25.9.2-mas-arm64-dsym-snapshot.zip 0ec88ec7bd2b7cb2e5e6b94f13df7d8c22433637004a473370e0959cb01f78cc *electron-v25.9.2-mas-arm64-dsym.zip 398a0575c1974565af99b6759a74967c0709bc101059542a00bfe64a1210a86f *electron-v25.9.2-mas-arm64-symbols.zip 17f86ad33f9fc2ca5eaac5ef87604e65b1eefba5a51d4ad58e70018fdfb84ac6 *electron-v25.9.2-mas-arm64.zip db61b29802ee1f598a3e61211a281656f16e70ae84041e6b2b5dd8ecae43cd67 *electron-v25.9.2-mas-x64-dsym-snapshot.zip 2f76620eb7d632335f7620f5d3713af5e59c98bdb0b323269c2319b7164fcaac *electron-v25.9.2-mas-x64-dsym.zip ea226c8d049e527d84ec5058474fd4e64476e6924fef42b1dbea774925f59064 *electron-v25.9.2-mas-x64-symbols.zip 51b9d192ccb7612211ca9cc8ddb373a86f791d38b369337ad099a133e9d9807a *electron-v25.9.2-mas-x64.zip 53b39857303191ea2f26dda06461e6e612ca0ed799bdf0c26a1a63ff89f7ea1b *electron-v25.9.2-win32-arm64-pdb.zip 49199591c69fbeb68dd57252a3d8525babe79ab98447ad639f2d0c3e63aba4b6 *electron-v25.9.2-win32-arm64-symbols.zip e7b968fc53cc7a10a4ccb5133af045968479685ebb9617f06817f03667fdd425 *electron-v25.9.2-win32-arm64-toolchain-profile.zip 6abd0a6697d7fe8b6add4d1017a01a0ac756d16da5bfa077bd373a685b529bd8 *electron-v25.9.2-win32-arm64.zip cc5c67b027c679eb86882c2ec267d38fafcc5127b49e8a060002541253e2b26b *electron-v25.9.2-win32-ia32-pdb.zip 2cd8aab8aa4eadfce90c8ba6565a77689db1efe55b7eaafedede3b08e8c41f53 *electron-v25.9.2-win32-ia32-symbols.zip e7b968fc53cc7a10a4ccb5133af045968479685ebb9617f06817f03667fdd425 *electron-v25.9.2-win32-ia32-toolchain-profile.zip ac2aebe7d7b21351256fb3b60219269e75ff33f8c3cfbbca682c3622d1943b94 *electron-v25.9.2-win32-ia32.zip 000b506bab92c92e0ff8428033fc7e1c15049437606794c4bec84a66eb29b6cd *electron-v25.9.2-win32-x64-pdb.zip fd40d04de0ef4a04dd720505f03a6d209a38387fe05493869f441037aa950e4d *electron-v25.9.2-win32-x64-symbols.zip e7b968fc53cc7a10a4ccb5133af045968479685ebb9617f06817f03667fdd425 *electron-v25.9.2-win32-x64-toolchain-profile.zip de3fc45f4fa5572d6dbb4f21580e75d3b6429a6b3b833a962c810e7e199b8573 *electron-v25.9.2-win32-x64.zip c3f22fbf99713bb44546278ef1456e4fc9a83d33bf038f6752fea12c7a721337 *electron.d.ts 2a088f4c227405783466e456e69154193a730130f5cc39520091abc8993977bc *ffmpeg-v25.9.2-darwin-arm64.zip 4da4197282a9a31379d2194d1072888b9ed3200663e322df2759b971725a2915 *ffmpeg-v25.9.2-darwin-x64.zip bd52d57ff97fb56ac01a3482af905d04f0d4e9c13c53858c6d9f99957eca82da *ffmpeg-v25.9.2-linux-arm64.zip 9b3d09177fa1e63e2a6beecfa70aeec30aeb5c1873ff21128a68051c4e23f95d *ffmpeg-v25.9.2-linux-armv7l.zip 39c3e411873262873edff4b9f4b5d9973fb3cab8f700d6ff665872dab3b39eb3 *ffmpeg-v25.9.2-linux-x64.zip 861287a6cb0f546c0e39f49a2b28f5575d66fbddb26486584cc7802e84402339 *ffmpeg-v25.9.2-mas-arm64.zip bcc8315a9e07394510c96ffca20720e3cdb2a4aecc75798bfca8fd60417782aa *ffmpeg-v25.9.2-mas-x64.zip 0ebfe5a72aaf0a9af81ffbcba03763f4baa142c93c31b50ad0145365366f0076 *ffmpeg-v25.9.2-win32-arm64.zip d8e7ea1268145d3481a74152ced8ae677ca5b174f06eb874a6ce0005ff0d471c *ffmpeg-v25.9.2-win32-ia32.zip d1f499b957377c3822c43eadf3bc32e7cb04b52fb2fd51ba22f14cd61ef01727 *ffmpeg-v25.9.2-win32-x64.zip 86a0df1394e741feb21a891747775911d5c2f9cd940662826b33c309275abb7c *hunspell_dictionaries.zip 4c4bab279b39c4e463dcb3a897e256e5e4f088e6e6495f6aea10e26703ecafc3 *libcxx-objects-v25.9.2-linux-arm64.zip d2b6349a89c9fce3ccc0a9a430b059eb18cd3967dbbe34bfcae54b3f58cd462a *libcxx-objects-v25.9.2-linux-armv7l.zip e8d4b1a3228c0709dc54d780bd4d33727fff30c38f8e00409a6eaf54a69e5869 *libcxx-objects-v25.9.2-linux-x64.zip 7679259e7cb02140806cc616d012102462d671ae07c4673ad0c2c9a6716444a6 *libcxx_headers.zip b1683af6708bceaa966e5168fda51223fa51e09549abc90f5744d500f9260c92 *libcxxabi_headers.zip 4fed33611a889d0100a6fbf4253cf9dcb9fbe3c42f7c86d8886d460a9a9cf8e6 *mksnapshot-v25.9.2-darwin-arm64.zip 5e1daea6393bd977a70020c36f1e4ee4e416c8c4eafe2b27b38292e4acb1764b *mksnapshot-v25.9.2-darwin-x64.zip 92ff719eb83df7f107d4dd3970122333f4bde194292c568b5c0a5ea4684bc9f1 *mksnapshot-v25.9.2-linux-arm64-x64.zip e621d50652f2afa49f47ab7cccd07f7d29ef60f694a0e70d4e6434ddd07cf282 *mksnapshot-v25.9.2-linux-armv7l-x64.zip 012c24dd59f7b5b4322e53c12bb6450a7b15bc6800042fcf3804ba14685f8188 *mksnapshot-v25.9.2-linux-x64.zip 62e880bf8594b1d83926984c252d86990f1386655bd1375afc0fd3054018adef *mksnapshot-v25.9.2-mas-arm64.zip 0742e1bfcbe171199f0a333fddbf401a61777928d462b852d21fec2822b2c46e *mksnapshot-v25.9.2-mas-x64.zip b019e6e117e13238465d1758274ebbaf7ccb999921dcb11ef1e3a9a5a6df952b *mksnapshot-v25.9.2-win32-arm64-x64.zip bc7196f1fd2ba3aedc6c16e96e455d280155dfc493a0d0f6ce7bffe645e39e1e *mksnapshot-v25.9.2-win32-ia32.zip 2d152f09969d69439e831b4212e77ea157a9e4b3a9b3ad55d4f2efcc547c25eb *mksnapshot-v25.9.2-win32-x64.zip No newline at end of file 004cb2a93a7094449675ac49998f1c1572dd74b7839039332525f44a2a4d6905 *chromedriver-v25.9.4-darwin-arm64.zip e578c2b7c88ae066664c0562ca77f776d419a6ae5045383df9718e743147f880 *chromedriver-v25.9.4-darwin-x64.zip 7c0f030cf143d682ae838e078d560b76b5f0af8c65d67f6026167c0a04c8f60b *chromedriver-v25.9.4-linux-arm64.zip 320026f620bdd708aff88c97ee9bf40d2fbad4fce4be0be3c8252876c9a629ec *chromedriver-v25.9.4-linux-armv7l.zip 65d4473294f024e4ba56a72ba9f87bec51207a7c924fda998acf499e5db4da9c *chromedriver-v25.9.4-linux-x64.zip 191ba934dace5851f60ec5cdb040202dacebf837ae6b8483649cc85da698ffeb *chromedriver-v25.9.4-mas-arm64.zip 1da9b56db091b1825cb3913de5eb12e30bb55f55023e044bed9e6d1518ab86f7 *chromedriver-v25.9.4-mas-x64.zip 3efd22a6d4500603f629f5c58af44570909df6871eccc9d17c01d04ab17ca47e *chromedriver-v25.9.4-win32-arm64.zip cd8b4be4d491f39aebc97102e2a48e43260eff693163c1526f1fb0b401ec0a81 *chromedriver-v25.9.4-win32-ia32.zip 03df2f38e3a07f70b766a5f0a9548acf8b35148dcb97d12e0479fd527da423e3 *chromedriver-v25.9.4-win32-x64.zip f1c4c82db5b9649d7e9cdb4c482a76ded439f6b11267f4b5eb869616a7f8244a *electron-api.json ac61c1f78f4bebf74073b4dbca356bc3aef6b44b4b069f8f2bfdb03d562e50f9 *electron-v25.9.4-darwin-arm64-dsym-snapshot.zip 54424b0db7f38794dbc5aff1bf3a20fc93f0f35a03fce8eaaf523bbc075fef83 *electron-v25.9.4-darwin-arm64-dsym.zip 1d816ad4c6a6e198d8ae6bb49698982f0f0298a605db09d46d3d4509c16a84a1 *electron-v25.9.4-darwin-arm64-symbols.zip 8022153ed1437a5785a0f819d14f41ae1026c1c5c1406d535a32c2a0ec1e4ba3 *electron-v25.9.4-darwin-arm64.zip 1a76a3c9ef80989488ed5a5cb9d4f54d284f79931f98907e6dbe3437271b33c0 *electron-v25.9.4-darwin-x64-dsym-snapshot.zip 92b14aa0a6dbbf9dd4829464ecea4ee77536f6c45cd393aa00b502eb5d72e480 *electron-v25.9.4-darwin-x64-dsym.zip 0bd268108df307e6d7770fea8882b5072ced5da23a0914e3e660e26c80314174 *electron-v25.9.4-darwin-x64-symbols.zip 4a3b55cfdb3fedbe188f51c552ffa1f9d17d145926990ca914faccbb72634ee6 *electron-v25.9.4-darwin-x64.zip 59bde360b480228cb166836d678682146d6f4cf9c8e6a534087c974e827b11bb *electron-v25.9.4-linux-arm64-debug.zip c8a2174ddfa18eeb326c830cbaf944931038de422d7e8492a9a5680dd54c77eb *electron-v25.9.4-linux-arm64-symbols.zip 119481d318dec273434f9f4f43fb808ff66858cc0da1f17deccc6b08a99fbb83 *electron-v25.9.4-linux-arm64.zip 59bde360b480228cb166836d678682146d6f4cf9c8e6a534087c974e827b11bb *electron-v25.9.4-linux-armv7l-debug.zip f791ce6c4bfe8ae7a00df9ac9dad766ce5ac4e502092b02c0361327a84ac07a8 *electron-v25.9.4-linux-armv7l-symbols.zip 2ef1673f4c6b943b35dc1dd3379aae7534f2456c91eabc704e2db35012aac706 *electron-v25.9.4-linux-armv7l.zip ff0e6cd86b963d87edd02202284e1fd29842f5fa85b4ca7a21ab753507ab3a9d *electron-v25.9.4-linux-x64-debug.zip add83741ede569ec1ed243aea8a77d782674a59c62221a4b9bd07507af62441e *electron-v25.9.4-linux-x64-symbols.zip 84f92675e3a9616cc163de673ebfafaad3c2976dc500612875a23849bc3661ce *electron-v25.9.4-linux-x64.zip ac61c1f78f4bebf74073b4dbca356bc3aef6b44b4b069f8f2bfdb03d562e50f9 *electron-v25.9.4-mas-arm64-dsym-snapshot.zip a76831375f19b4d48766211026446f2b073247c1e1a29edb52683caa0d0fc349 *electron-v25.9.4-mas-arm64-dsym.zip 5a8a82ac24fdd31389391a157509b0a45e23d7e70236968b7b4a2130d930d04f *electron-v25.9.4-mas-arm64-symbols.zip c7e47d78ee8fc6d9112a38977cf1ebbec31cdf06b8a0540f120e7a69500c56f7 *electron-v25.9.4-mas-arm64.zip 94253d587d9ed00b1741a64ca36e32fe8bc60cc32df48675bef89af081c4f0ec *electron-v25.9.4-mas-x64-dsym-snapshot.zip bf6e83d683c7fb88e21b93d4926b1e3dc9151f94e1bb4635ae2b77992b2c6598 *electron-v25.9.4-mas-x64-dsym.zip 4b9758d4a74e21f66eedb95392d098e057e509a1f0eecc09729fa36747918838 *electron-v25.9.4-mas-x64-symbols.zip 6e26f31b8088563b2cc4d1552d9ff00e61bc7ef1b95b7cfe404564f84b5b210d *electron-v25.9.4-mas-x64.zip c6fe73f028eff3dfdd6408b8762b5e0d2a67b3bd110b5910d1bec1fa85da8a5a *electron-v25.9.4-win32-arm64-pdb.zip ccccad00e4e16048743d5252023665b74ab804a7482606dc0dc9ad01f94c988b *electron-v25.9.4-win32-arm64-symbols.zip e7b968fc53cc7a10a4ccb5133af045968479685ebb9617f06817f03667fdd425 *electron-v25.9.4-win32-arm64-toolchain-profile.zip 667c212b51400bfd1ab78a83d2adcdd6c9624a71b1a6892432e38ce9658d8093 *electron-v25.9.4-win32-arm64.zip 320dab9a57c4f0efa1ecadb4a07ec15adecaa913ef62524cacaa9f011292571f *electron-v25.9.4-win32-ia32-pdb.zip 2875e171ebba7fc12be3133cabbd38cdca30d3cedbb89a1e1e11270380b4afc5 *electron-v25.9.4-win32-ia32-symbols.zip e7b968fc53cc7a10a4ccb5133af045968479685ebb9617f06817f03667fdd425 *electron-v25.9.4-win32-ia32-toolchain-profile.zip 18b11abf7b1f2f4568c3cf5dc9a2a0fc5349b6e3f40ecb91e086b030f254510d *electron-v25.9.4-win32-ia32.zip a4b49fee1139071eb33c014ed8ac49cf83065a6d95255c44acc78c3922c56185 *electron-v25.9.4-win32-x64-pdb.zip 1712567ed6b050501a974e33a9a46cd806965d73b36ec8e18346d49022f74a8a *electron-v25.9.4-win32-x64-symbols.zip e7b968fc53cc7a10a4ccb5133af045968479685ebb9617f06817f03667fdd425 *electron-v25.9.4-win32-x64-toolchain-profile.zip 03abc9d5b2b28b440e9e5b0fc61806e3f3c2888dac5d5939957726bd68955113 *electron-v25.9.4-win32-x64.zip 706c40b11144551b2da43cdfd191c2e3e2bf0d7600b8d2751f3a806f72d0ede2 *electron.d.ts 859e7f8f6b6faf1fd004ef335ccff6f25f18c17f1aa63031e0af238899513958 *ffmpeg-v25.9.4-darwin-arm64.zip 3b63d30acb2bc5cdcc94ac2dc9e69e0919bf5038d3fd61f822c183280684cc4e *ffmpeg-v25.9.4-darwin-x64.zip bd52d57ff97fb56ac01a3482af905d04f0d4e9c13c53858c6d9f99957eca82da *ffmpeg-v25.9.4-linux-arm64.zip 9b3d09177fa1e63e2a6beecfa70aeec30aeb5c1873ff21128a68051c4e23f95d *ffmpeg-v25.9.4-linux-armv7l.zip edc7b1c9f1a0733f109a2c0375a4e40c5bfe0bf28b7f06dcc76e1ada0aa2f125 *ffmpeg-v25.9.4-linux-x64.zip dae4d7857e7cf2d1333ce522ed3c8e3639a95432015a649a6cc3d064ddc076eb *ffmpeg-v25.9.4-mas-arm64.zip b2d9a72f57a18c68c30cbbde305ba91e740656746e37d5ce22e8895e7ec36a74 *ffmpeg-v25.9.4-mas-x64.zip 7ebbd70835b6bbd1d12e432a2b0df4fb5fccd4039c6b5125401069b1c0ff6f0e *ffmpeg-v25.9.4-win32-arm64.zip 128499e322306bf4900106d1120e28d93cafd7af5c5052109f2739360c7e212a *ffmpeg-v25.9.4-win32-ia32.zip 00a2e9d9b783899662b430feb5fb030e89ae7682ef4e3bf8eb4c8ecbfd435b84 *ffmpeg-v25.9.4-win32-x64.zip 1b9943e151314644652f738afa309d1d4f3cb18fc505e568c1f80e66e0ccf1b3 *hunspell_dictionaries.zip 631aac564c555332dbf9d7acdcce6852c594cd84d3afd3056e738c64f4b1cb1b *libcxx-objects-v25.9.4-linux-arm64.zip 4ad907d1b04bb93aba78b086ffdf16e2c0aa23f5a3901ad23ab4fd1aa46e80a3 *libcxx-objects-v25.9.4-linux-armv7l.zip c8950fb9555c33015cb0d2299dfb2b35daa1c0c7d392bf53a96f570b8c064c93 *libcxx-objects-v25.9.4-linux-x64.zip aaafbf6dfc756d3244d6085c419eec5dc3aa7b12face8a0bab1733aed3e7f3e7 *libcxx_headers.zip c571e713663bdc68f5956e45b975b89bd23cc2e401a1161321167d224b1dea3d *libcxxabi_headers.zip cf42b5f0e4e6500b89ab8313267a459584be8a175cc6c7e20c1fee50277c65f4 *mksnapshot-v25.9.4-darwin-arm64.zip 6f1b74306d691214218e2894f813af1d0fde5e6ded31ad94c1ad4f44b4582b29 *mksnapshot-v25.9.4-darwin-x64.zip 9a0e09332db556357288b46738a409269cc4c83816396c70fd5b518548eb884d *mksnapshot-v25.9.4-linux-arm64-x64.zip 80692a923553ae0172f5a981ff44d7194a307d826be5c39473f2555c1af4a025 *mksnapshot-v25.9.4-linux-armv7l-x64.zip 6dfb2d094b96f8507b4984ad8dcb14c56a8df5cd5bf89533ff6c7714009da4a0 *mksnapshot-v25.9.4-linux-x64.zip 50c800e3aa75997ec377e3d91682f9f4b49dd4e95555dd9acbbdd083d73718ac *mksnapshot-v25.9.4-mas-arm64.zip 81ea7704f3453c6d8e55525dd7e2999664e45002dab70dd250b2194b6ddccc7c *mksnapshot-v25.9.4-mas-x64.zip e817d7637498531c4de3bcbdfbd45a6255f04e349b2aa8ffdf454817f2c78b54 *mksnapshot-v25.9.4-win32-arm64-x64.zip f61be226a7c303d1b2502561de5093b0a9d364ae6d0a3b51d9c1d8b793ac97ef *mksnapshot-v25.9.4-win32-ia32.zip 73c65b7356aa3d703ca8ca43ec2436ee9c9475ce8b27b71b4313c0b3d4d76e10 *mksnapshot-v25.9.4-win32-x64.zip No newline at end of file"} {"_id":"doc-en-vscode-4fe437fec34d60493a45c0b3a3acc0698f633fe64c4f8ce4684570f7205eb648","title":"","text":"\"git\": { \"name\": \"electron\", \"repositoryUrl\": \"https://github.com/electron/electron\", \"commitHash\": \"468c4af6611c88762b7ba6c4400c5022895457c2\" \"commitHash\": \"bb6a7d443b4f00680d05cc703b4d7ae180fdde03\" } }, \"isOnlyProductionDependency\": true, \"license\": \"MIT\", \"version\": \"25.9.2\" \"version\": \"25.9.4\" }, { \"component\": {"} {"_id":"doc-en-vscode-5f4bb8ce0efdd6bc95242875e06e8452e22417309b867ec953f4d06073d83653","title":"","text":"{ \"name\": \"code-oss-dev\", \"version\": \"1.85.0\", \"distro\": \"cbc81496e34eafbc771b8f008e6a742d755968c9\", \"distro\": \"210db50a0928d4857ed3d511ddb5612b947e0fef\", \"author\": { \"name\": \"Microsoft Corporation\" },"} {"_id":"doc-en-vscode-52ec9474fa05ebf970f81fe03254f9362c91820cc81034828d5b2028d7bf0b18","title":"","text":"\"cssnano\": \"^4.1.11\", \"debounce\": \"^1.0.0\", \"deemon\": \"^1.8.0\", \"electron\": \"25.9.2\", \"electron\": \"25.9.4\", \"eslint\": \"8.36.0\", \"eslint-plugin-header\": \"3.1.1\", \"eslint-plugin-jsdoc\": \"^46.5.0\","} {"_id":"doc-en-vscode-f8e1d6f3de0551af8fede95a211e65d6808caab34fa3a174645e57606dfafa4a","title":"","text":"disturl \"https://nodejs.org/dist\" target \"18.15.0\" ms_build_id \"234519\" ms_build_id \"243295\" runtime \"node\" build_from_source \"true\""} {"_id":"doc-en-vscode-d4391a1b30225f9aa28a27b55a88b559a479ee740cfc386e709df301f380af76","title":"","text":"resolved \"https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.207.tgz#9c3310ebace2952903d05dcaba8abe3a4ed44c01\" integrity sha512-piH7MJDJp4rJCduWbVvmUd59AUne1AFBJ8JaRQvk0KzNTSUnZrVXHCZc+eg+CGE4OujkcLJznhGKD6tuAshj5Q== electron@25.9.2: version \"25.9.2\" resolved \"https://registry.yarnpkg.com/electron/-/electron-25.9.2.tgz#12be98fbcff485c94ff99df21e0727797a45364a\" integrity sha512-hVBN5rsrL99BKNHvzMeYy2PkAmewuIobu4U3o3EzVz4MDoLmMfW4yTH5GZ4RbJrpokoEky5IzGtRR/ggPzL6Fw== electron@25.9.4: version \"25.9.4\" resolved \"https://registry.yarnpkg.com/electron/-/electron-25.9.4.tgz#1935b6fbfd8ad920719a4136d867021496703884\" integrity sha512-5pDU8a7o7ZIPTZHAqjflGMq764Favdsc271KXrAT3oWvFTHs5Ve9+IOt5EUVPrwvC2qRWKpCIEM47WzwkTlENQ== dependencies: \"@electron/get\" \"^2.0.0\" \"@types/node\" \"^18.11.18\""} {"_id":"doc-en-vscode-b19a1dcf73436ba0790b4e6f2c412063ebe53b0b75f1602b2cbdb476d2ef6a8f","title":"","text":"import { IRemoteSocketFactoryService } from 'vs/platform/remote/common/remoteSocketFactoryService'; import { ISignService } from 'vs/platform/sign/common/sign'; import { AbstractTunnelService, ISharedTunnelsService, ITunnelProvider, ITunnelService, RemoteTunnel, TunnelPrivacyId, isAllInterfaces, isLocalhost, isPortPrivileged, isTunnelProvider } from 'vs/platform/tunnel/common/tunnel'; import { VSBuffer } from 'vs/base/common/buffer'; async function createRemoteTunnel(options: IConnectionOptions, defaultTunnelHost: string, tunnelRemoteHost: string, tunnelRemotePort: number, tunnelLocalPort?: number): Promise { let readyTunnel: NodeRemoteTunnel | undefined;"} {"_id":"doc-en-vscode-b13fb89600829fb55415a125276e3cffba058fc05edb0548ddc616bc7481f8bc","title":"","text":"remoteSocket.onClose(() => localSocket.destroy()); remoteSocket.onEnd(() => localSocket.end()); remoteSocket.onData(d => localSocket.write(d.buffer)); localSocket.on('data', d => remoteSocket.write(VSBuffer.wrap(d))); localSocket.resume(); }"} {"_id":"doc-en-vscode-aef9e78ae46db1c21fdda94dc0fdede34f52eb10fcf8f612a210a6458fa1d3da","title":"","text":"import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { InstantiationType, registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { ISemanticSimilarityService } from 'vs/workbench/services/semanticSimilarity/common/semanticSimilarityService'; import { IAiRelatedInformationService, RelatedInformationType, SettingInformationResult } from 'vs/workbench/services/aiRelatedInformation/common/aiRelatedInformation'; export interface IEndpointDetails { urlBase?: string;"} {"_id":"doc-en-vscode-b69a2bd006da62aff3a8e3b513b1d813f97cb4d2ac99fd40367fa603d9c1d265","title":"","text":"private settingsRecord: Record = {}; private currentPreferencesModel: ISettingsEditorModel | undefined; constructor(private readonly semanticSimilarityService: ISemanticSimilarityService) { } constructor( private readonly aiRelatedInformationService: IAiRelatedInformationService, private readonly semanticSimilarityService: ISemanticSimilarityService ) { } updateModel(preferencesModel: ISettingsEditorModel) { if (preferencesModel === this.currentPreferencesModel) {"} {"_id":"doc-en-vscode-92ec65de9f9a29cbc12cf565ca23eaaecf7dfa9a6994aa9c48ec88019dc4436c","title":"","text":"this.settingKeys = []; this.settingsRecord = {}; if (!this.semanticSimilarityService.isEnabled() || !this.currentPreferencesModel) { if ( !this.currentPreferencesModel || (!this.semanticSimilarityService.isEnabled() && !this.aiRelatedInformationService.isEnabled()) ) { return; }"} {"_id":"doc-en-vscode-bc85faa8f9bd378b1fb49834adeb6a4001bd9e969ad4172e59be13759ffe18d3","title":"","text":"constructor( @ISemanticSimilarityService private readonly semanticSimilarityService: ISemanticSimilarityService, @IAiRelatedInformationService private readonly aiRelatedInformationService: IAiRelatedInformationService ) { this._keysProvider = new RemoteSearchKeysProvider(semanticSimilarityService); this._keysProvider = new RemoteSearchKeysProvider(aiRelatedInformationService, semanticSimilarityService); } setFilter(filter: string) {"} {"_id":"doc-en-vscode-c6bdea6656e934c13660d009fcc5417515f4c736a4502374720c44377be9a180","title":"","text":"} async searchModel(preferencesModel: ISettingsEditorModel, token?: CancellationToken | undefined): Promise { if (!this.semanticSimilarityService.isEnabled() || !this._filter) { if ( !this._filter || (!this.semanticSimilarityService.isEnabled() && !this.aiRelatedInformationService.isEnabled())) { return null; } this._keysProvider.updateModel(preferencesModel); const filterMatches = this.aiRelatedInformationService.isEnabled() ? await this.getAiRelatedInformationItems(token) : this.semanticSimilarityService.isEnabled() ? await this.getSemanticSimilarityItems(token) : []; return { filterMatches }; } // TODO: Remove this when all semantic similarity providers are migrated to aiRelatedInformationService private async getSemanticSimilarityItems(token?: CancellationToken | undefined) { const settingKeys = this._keysProvider.getSettingKeys(); const settingsRecord = this._keysProvider.getSettingsRecord();"} {"_id":"doc-en-vscode-5604f2f27fe202ca615c22a5153e4468b995065c68f3cd62f58daf30e4594955","title":"","text":"}); numOfSmartPicks++; } return { filterMatches }; return filterMatches; } private async getAiRelatedInformationItems(token?: CancellationToken | undefined) { const settingsRecord = this._keysProvider.getSettingsRecord(); const filterMatches: ISettingMatch[] = []; const relatedInformation = await this.aiRelatedInformationService.getRelatedInformation(this._filter, [RelatedInformationType.SettingInformation], token ?? CancellationToken.None) as SettingInformationResult[]; relatedInformation.sort((a, b) => b.weight - a.weight); for (const info of relatedInformation) { if (info.weight < RemoteSearchProvider.SEMANTIC_SIMILARITY_THRESHOLD || filterMatches.length === RemoteSearchProvider.SEMANTIC_SIMILARITY_MAX_PICKS) { break; } const pick = info.setting; filterMatches.push({ setting: settingsRecord[pick], matches: [settingsRecord[pick].range], matchType: SettingMatchType.RemoteMatch, score: info.weight }); } return filterMatches; } }"} {"_id":"doc-en-vscode-37da515d4aec5a35134ff55d0d230521e6caefa8fe183707f83fcf145e417f06","title":"","text":"command: string; } export interface SettingInformationResult extends RelatedInformationResult { type: RelatedInformationType.SettingInformation; setting: string; } export interface IAiRelatedInformationService { readonly _serviceBrand: undefined;"} {"_id":"doc-en-vscode-9637b602b3bbfcb4b244b407e896b1dbde50ad10d34cab53c328e02b48417494","title":"","text":"import { StopWatch } from 'vs/base/common/stopwatch'; import { ILogService } from 'vs/platform/log/common/log'; /** * @deprecated Use `IAiRelatedInformationService` instead. */ export const ISemanticSimilarityService = createDecorator('ISemanticSimilarityService'); /** * @deprecated Use `IAiRelatedInformationService` instead. */ export interface ISemanticSimilarityService { readonly _serviceBrand: undefined;"} {"_id":"doc-en-vscode-03bf0006338602df8577ab6cfe80dedadcaea0449accb29ab5c07e18cf2c4f94","title":"","text":"private _readConfiguration() { const options = this._editor.getOption(EditorOption.stickyScroll); if (options.enabled === false) { this._editor.removeOverlayWidget(this._stickyScrollWidget); this._sessionStore.clear();"} {"_id":"doc-en-vscode-baf4306134df6e8a7e300c1ccc5411a18f5e4bf95534a95d7ad2c3254ec033c3","title":"","text":"} private _renderStickyScroll() { if (!(this._editor.hasModel())) { const model = this._editor.getModel(); if (!model || model.isTooLargeForTokenization()) { this._stickyScrollWidget.setState(undefined); return; } const model = this._editor.getModel(); const stickyLineVersion = this._stickyLineCandidateProvider.getVersionId(); if (stickyLineVersion === undefined || stickyLineVersion === model.getVersionId()) { this._widgetState = this.findScrollWidgetState();"} {"_id":"doc-en-vscode-bf9d07f22cdf1d2627ba7ef3a5950bdcacf99663d754b81f452867f95a3ed773","title":"","text":"return this._lineNumbers; } setState(state: StickyScrollWidgetState): void { dom.clearNode(this._lineNumbersDomNode); dom.clearNode(this._linesDomNode); setState(state: StickyScrollWidgetState | undefined): void { this._clearStickyWidget(); if (!state) { return; } this._stickyLines = []; const editorLineHeight = this._editor.getOption(EditorOption.lineHeight); const futureWidgetHeight = state.startLineNumbers.length * editorLineHeight + state.lastLineRelativePosition;"} {"_id":"doc-en-vscode-4d8e855b60663640e81d33ee2ceff6fb277f60067426429292671207e180567e","title":"","text":"this._rootDomNode.style.width = `${layoutInfo.width - layoutInfo.minimap.minimapCanvasOuterWidth - layoutInfo.verticalScrollbarWidth}px`; } private _clearStickyWidget() { dom.clearNode(this._lineNumbersDomNode); dom.clearNode(this._linesDomNode); this._rootDomNode.style.display = 'none'; } private _renderRootNode(): void { if (!this._editor._getViewModel()) {"} {"_id":"doc-en-vscode-1f1d70fae993b5735ed9dc37d6727f34be8cea056ce516e76a72dace79b89d8a","title":"","text":"const editorLineHeight = this._editor.getOption(EditorOption.lineHeight); const widgetHeight: number = this._lineNumbers.length * editorLineHeight + this._lastLineRelativePosition; this._rootDomNode.style.display = widgetHeight > 0 ? 'block' : 'none'; if (widgetHeight === 0) { this._clearStickyWidget(); return; } this._rootDomNode.style.display = 'block'; this._lineNumbersDomNode.style.height = `${widgetHeight}px`; this._linesDomNodeScrollable.style.height = `${widgetHeight}px`; this._rootDomNode.style.height = `${widgetHeight}px`;"} {"_id":"doc-en-vscode-fdb4ea15a082fa1a36c5dcdaf5c2e6f248be467f114e172aba4e5189f045eaf6","title":"","text":"'Variable 0 will be a file name.' ] }, \"{0}: tokenization, wrapping and folding have been turned off for this large file in order to reduce memory usage and avoid freezing or crashing.\", \"{0}: tokenization, wrapping, folding and sticky scroll have been turned off for this large file in order to reduce memory usage and avoid freezing or crashing.\", path.basename(model.uri.path) );"} {"_id":"doc-en-vscode-eb14f2578ca4ada6a2f29614777df455d572e64f496ea675bc5f1d5756fa6f75","title":"","text":"import { memoize } from 'vs/base/common/decorators'; import { join } from 'vs/base/common/path'; import { isLinux } from 'vs/base/common/platform'; import { URI } from 'vs/base/common/uri'; import { createStaticIPCHandle } from 'vs/base/parts/ipc/node/ipc.net'; import { IEnvironmentService, INativeEnvironmentService } from 'vs/platform/environment/common/environment'; import { NativeEnvironmentService } from 'vs/platform/environment/node/environmentService';"} {"_id":"doc-en-vscode-acbb8bd801fa0aefbd2b5df1da2d66f6a294ddcbdc9b3b9bbabc2f4879b8601e","title":"","text":"@memoize get useCodeCache(): boolean { return !!this.codeCachePath; } @memoize override get userRoamingDataHome(): URI { return this.appSettingsHome; } unsetSnapExportedVariables() { if (!isLinux) { return;"} {"_id":"doc-en-vscode-801d980c19cc1ea63b432cd85831472eb6f32e38359326795ea5dc2320d058cb","title":"","text":"\"title\": \"%cleanInvalidImageAttachment.title%\" }, { \"command\": \"notebook.cellOutput.copyToClipboard\", \"title\": \"%copyOutputToClipboard.title%\" \"command\": \"notebook.cellOutput.copy\", \"title\": \"%copyCellOutput.title%\" } ], \"notebooks\": ["} {"_id":"doc-en-vscode-1a2d03669e47d228c0a11ccd184e96b98919c4c7960ed47b82b977e5e754b7dd","title":"","text":"], \"webview/context\": [ { \"command\": \"notebook.cellOutput.copyToClipboard\", \"command\": \"notebook.cellOutput.copy\", \"when\": \"webviewId == 'notebook.output' && webviewSection == 'image'\" } ]"} {"_id":"doc-en-vscode-66a3e28e23b92bd6d9c0026b36348b6554b8ceafb5e0283953bcce55f09c8d5c","title":"","text":"\"newUntitledIpynb.shortTitle\": \"Jupyter Notebook\", \"openIpynbInNotebookEditor.title\": \"Open IPYNB File In Notebook Editor\", \"cleanInvalidImageAttachment.title\": \"Clean Invalid Image Attachment Reference\", \"copyOutputToClipboard.title\": \"Copy Output to Clipboard\", \"copyCellOutput.title\": \"Copy Output\", \"markdownAttachmentRenderer.displayName\": { \"message\": \"Markdown-It ipynb Cell Attachment renderer\", \"comment\": ["} {"_id":"doc-en-vscode-61fb63b08d8c87ac320723a3011fed0a6836fb33aca35d7ec57db2fccef936c6","title":"","text":"import { CellKind } from 'vs/workbench/contrib/notebook/common/notebookCommon'; import { CodeCellViewModel } from 'vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel'; export const COPY_OUTPUT_COMMAND_ID = 'notebook.cellOutput.copyToClipboard'; export const COPY_OUTPUT_COMMAND_ID = 'notebook.cellOutput.copy'; registerAction2(class CopyCellOutputAction extends Action2 { constructor() { super({ id: COPY_OUTPUT_COMMAND_ID, title: localize('notebookActions.copyOutput', \"Copy Output to Clipboard\"), title: localize('notebookActions.copyOutput', \"Copy Output\"), menu: { id: MenuId.NotebookOutputToolbar, when: NOTEBOOK_CELL_HAS_OUTPUTS"} {"_id":"doc-en-vscode-29dee07a6f203193a8c35400dd9de48d84c4d14468e1945f63f2f874ace86a17","title":"","text":"'application/x.notebook.stream', 'application/vnd.code.notebook.stderr', 'application/x.notebook.stderr', 'text/plain' 'text/plain', 'text/markdown', 'application/json' ];"} {"_id":"doc-en-vscode-bd36ebd200b6ad15f5d7abbc01bdd3e92977464a64f80dc4520a57268f781a1a","title":"","text":"this._loadState(); this._register(this._storageService.onWillSaveState(() => this._saveState())); this._register(this._storageService.onDidChangeValue(StorageScope.WORKSPACE, NotebookKernelHistoryService.STORAGE_KEY, this._register(new DisposableStore()))(() => { this._restoreState(); this._loadState(); })); }"} {"_id":"doc-en-vscode-286e3c8244b3b962690609cc286e66c6a86ad9063d015bc5c9cca1a9e165aa62","title":"","text":"} } private _restoreState(): void { const serialized = this._storageService.get(NotebookKernelHistoryService.STORAGE_KEY, StorageScope.WORKSPACE); if (serialized) { try { for (const [viewType, kernels] of JSON.parse(serialized)) { const linkedMap = this._mostRecentKernelsMap[viewType] ?? new LinkedMap(); for (const entry of kernels.entries) { linkedMap.set(entry, entry, Touch.AsOld); } this._mostRecentKernelsMap[viewType] = linkedMap; } } catch (e) { console.error('Deserialize notebook kernel history failed', e); } } } private _loadState(): void { const serialized = this._storageService.get(NotebookKernelHistoryService.STORAGE_KEY, StorageScope.WORKSPACE); if (serialized) {"} {"_id":"doc-en-vscode-633d4c3f67a744d4fa8a73ff997d1eb56bcccf1e712a930c24387422488b361b","title":"","text":"import { workspace, window, languages, commands, ExtensionContext, extensions, Uri, ColorInformation, Diagnostic, StatusBarAlignment, TextEditor, TextDocument, FormattingOptions, CancellationToken, FoldingRange, ProviderResult, TextEdit, Range, Position, Disposable, CompletionItem, CompletionList, CompletionContext, Hover, MarkdownString, FoldingContext, DocumentSymbol, SymbolInformation, l10n, TextEditorOptions ProviderResult, TextEdit, Range, Position, Disposable, CompletionItem, CompletionList, CompletionContext, Hover, MarkdownString, FoldingContext, DocumentSymbol, SymbolInformation, l10n } from 'vscode'; import { LanguageClientOptions, RequestType, NotificationType, FormattingOptions as LSPFormattingOptions,"} {"_id":"doc-en-vscode-4fabef0af7507fa467e3ed075ed4bc6e5abc885577ece8c54ea0f8b4f3e36e72","title":"","text":"export namespace SettingIds { export const enableFormatter = 'json.format.enable'; export const enableKeepLines = 'json.format.keepLines'; export const enableSortOnSave = 'json.sortOnSave.enable'; export const enableValidation = 'json.validate.enable'; export const enableSchemaDownload = 'json.schemaDownload.enable'; export const maxItemsComputed = 'json.maxItemsComputed';"} {"_id":"doc-en-vscode-e250b5d04f2cd12b888f9a128c7d4ddeda71cb5143bda700121df2fbdb1ad777","title":"","text":"window.showInformationMessage(l10n.t('JSON schema cache cleared.')); })); toDispose.push(workspace.onWillSaveTextDocument(event => { const sortOnSave = workspace.getConfiguration().get(SettingIds.enableSortOnSave); const document = event.document; if (sortOnSave && (document.languageId === 'json' || document.languageId === 'jsonc')) { const documentOptions = getOptionsForDocument(document); const textEditsPromise = getSortTextEdits(document, documentOptions?.tabSize, documentOptions?.insertSpaces); event.waitUntil(textEditsPromise); } })); toDispose.push(commands.registerCommand('json.sort', async () => {"} {"_id":"doc-en-vscode-1ad463eb6de4f25d173c36033b1774619dcd1c21276899adc4aafeeaf1cf4d09","title":"","text":"function isSchemaResolveError(d: Diagnostic) { return d.code === /* SchemaResolveError */ 0x300; } function getOptionsForDocument(document: TextDocument): TextEditorOptions | undefined { for (const editor of window.visibleTextEditors) { if (editor.document.uri.toString() === document.uri.toString()) { return editor.options; } } return; } "} {"_id":"doc-en-vscode-59f374578101a91a42748b09e403825911116af59c24d108bf7952854434d499","title":"","text":"\"default\": false, \"description\": \"%json.format.keepLines.desc%\" }, \"json.sortOnSave.enable\": { \"type\": \"boolean\", \"scope\": \"window\", \"default\": false, \"description\": \"%json.sortOnSave.enable.desc%\" }, \"json.trace.server\": { \"type\": \"string\", \"scope\": \"window\","} {"_id":"doc-en-vscode-91cec486ab75689743047353b7b99d6d86ac1d4f3be3a1de2257d86febc50116","title":"","text":"\"json.schemas.schema.desc\": \"The schema definition for the given URL. The schema only needs to be provided to avoid accesses to the schema URL.\", \"json.format.enable.desc\": \"Enable/disable default JSON formatter\", \"json.format.keepLines.desc\" : \"Keep all existing new lines when formatting.\", \"json.sortOnSave.enable.desc\": \"Enable/disable default sorting on save\", \"json.validate.enable.desc\": \"Enable/disable JSON validation.\", \"json.tracing.desc\": \"Traces the communication between VS Code and the JSON language server.\", \"json.colorDecorators.enable.desc\": \"Enables or disables color decorators\","} {"_id":"doc-en-vscode-232c98c14ceb74f894862c2bcab41fcf9d91003d8d49a065888249e72a9d05b5","title":"","text":"import { Connection, TextDocuments, InitializeParams, InitializeResult, NotificationType, RequestType, DocumentRangeFormattingRequest, Disposable, ServerCapabilities, TextDocumentSyncKind, TextEdit, DocumentFormattingRequest, TextDocumentIdentifier, FormattingOptions, Diagnostic DocumentRangeFormattingRequest, Disposable, ServerCapabilities, TextDocumentSyncKind, TextEdit, DocumentFormattingRequest, TextDocumentIdentifier, FormattingOptions, Diagnostic, CodeAction, CodeActionKind } from 'vscode-languageserver'; import { runSafe, runSafeAsync } from './utils/runner';"} {"_id":"doc-en-vscode-4db652586d1154e5f0e5ecf414c673702e6b3b0e7cd834661f8241aaa3ffcc87","title":"","text":"import { TextDocument, JSONDocument, JSONSchema, getLanguageService, DocumentLanguageSettings, SchemaConfiguration, ClientCapabilities, Range, Position, SortOptions } from 'vscode-json-languageservice'; import { getLanguageModelCache } from './languageModelCache'; import { Utils, URI } from 'vscode-uri'; import * as l10n from '@vscode/l10n'; type ISchemaAssociations = Record;"} {"_id":"doc-en-vscode-4dc458e1836f48c7d06b61f69fc0291276d89dc74985f59354eb24793837c28a","title":"","text":"documentSelector: null, interFileDependencies: false, workspaceDiagnostics: false } }, codeActionProvider: true }; return { capabilities };"} {"_id":"doc-en-vscode-8a9a4e56ad8ce33455f951cce1c450af1ed5df6f1bcb22cc05a857468c74388d","title":"","text":"}, [], `Error while computing document symbols for ${documentSymbolParams.textDocument.uri}`, token); }); connection.onCodeAction((codeActionParams, token) => { return runSafeAsync(runtime, async () => { const document = documents.get(codeActionParams.textDocument.uri); if (document) { const sortCodeAction = CodeAction.create('Sort JSON', CodeActionKind.Source.concat('.sort', '.json')); sortCodeAction.command = { command: 'json.sort', title: l10n.t('Sort JSON') }; return [sortCodeAction]; } return []; }, [], `Error while computing code actions for ${codeActionParams.textDocument.uri}`, token); }); function onFormat(textDocument: TextDocumentIdentifier, range: Range | undefined, options: FormattingOptions): TextEdit[] { options.keepLines = keepLinesEnabled;"} {"_id":"doc-en-vscode-e0b31b961c9e8c53fa12aba4a234702bc9145f16f66efd884e604b907c0f9ff5","title":"","text":"const startN = binarySearch2(da.length, i => Number(da.row(i).address - firstAddr)); const start = startN < 0 ? ~startN : startN; const endN = binarySearch2(da.length, i => Number(da.row(i).address - lastAddr)); const end = endN < 0 ? ~endN : endN; const end = endN < 0 ? ~endN : endN + 1; const toDelete = end - start; // Go through everything we're about to add, and only show the source"} {"_id":"doc-en-vscode-a70bd2bf106628148c7f4e84188dc6fa302aecb20e53adcc805644f83fee6191","title":"","text":"let textModel: ITextModel | undefined = undefined; const sourceSB = new StringBuilder(10000); const ref = await this.textModelService.createModelReference(sourceURI); if (templateData.currentElement.element !== element) { return; // avoid a race, #192831 } textModel = ref.object.textEditorModel; templateData.cellDisposable.push(ref);"} {"_id":"doc-en-vscode-cbfaacd6e89d6a47ddca00864788724ea3a06df52cfa83d094ba953a5ca04692","title":"","text":"rename(title?: string): Promise; /** * Triggers a quick pick to change the icon of this terminal. * Sets or triggers a quick pick to change the icon of this terminal. */ changeIcon(): Promise; changeIcon(icon?: TerminalIcon): Promise; /** * Triggers a quick pick to change the color of the associated terminal tab icon. * Sets or triggers a quick pick to change the color of the associated terminal tab icon. */ changeColor(): Promise; changeColor(color?: string): Promise; /** * Triggers a quick pick that displays recent commands or cwds. Selecting one will"} {"_id":"doc-en-vscode-fa5a0fef2cca73974b6fc896f0d1038b081ab50a61066054ee3510290293ab1e","title":"","text":"import { INotificationService, Severity } from 'vs/platform/notification/common/notification'; import { IOpenerService } from 'vs/platform/opener/common/opener'; import { IPickOptions, IQuickInputService, IQuickPickItem } from 'vs/platform/quickinput/common/quickInput'; import { ITerminalProfile, TerminalExitReason, TerminalLocation, TerminalSettingId } from 'vs/platform/terminal/common/terminal'; import { ITerminalProfile, TerminalExitReason, TerminalIcon, TerminalLocation, TerminalSettingId } from 'vs/platform/terminal/common/terminal'; import { IWorkspaceContextService, IWorkspaceFolder } from 'vs/platform/workspace/common/workspace'; import { PICK_WORKSPACE_FOLDER_COMMAND_ID } from 'vs/workbench/browser/actions/workspaceCommands'; import { CLOSE_EDITOR_COMMAND_ID } from 'vs/workbench/browser/parts/editor/editorCommands';"} {"_id":"doc-en-vscode-305b5cafd341837cffb873ec3f106b04b7b5d390b41ca10c0561e99669d3b2b1","title":"","text":"title: terminalStrings.changeIcon, f1: false, precondition: ContextKeyExpr.and(ContextKeyExpr.or(TerminalContextKeys.processSupported, TerminalContextKeys.terminalHasBeenCreated), TerminalContextKeys.tabsSingularSelection), run: (c, accessor) => getSelectedInstances(accessor)?.[0].changeIcon() run: async (c, accessor) => { let icon: TerminalIcon | undefined; for (const terminal of getSelectedInstances(accessor) ?? []) { icon = await terminal.changeIcon(icon); } } }); registerTerminalAction({"} {"_id":"doc-en-vscode-642331a1b38d1370eb8096c5a03579f6c39e5891037cdde92eb2ab4a67baf0bf","title":"","text":"title: terminalStrings.changeColor, f1: false, precondition: ContextKeyExpr.and(ContextKeyExpr.or(TerminalContextKeys.processSupported, TerminalContextKeys.terminalHasBeenCreated), TerminalContextKeys.tabsSingularSelection), run: (c, accessor) => getSelectedInstances(accessor)?.[0].changeColor() run: async (c, accessor) => { let color: string | undefined; for (const terminal of getSelectedInstances(accessor) ?? []) { color = await terminal.changeColor(color); } } }); registerTerminalAction({"} {"_id":"doc-en-vscode-ef2cd241fa1538a139fb259893ed104573b193fc43f20496c0d904002b88d9b9","title":"","text":"run: (c, accessor) => accessor.get(ICommandService).executeCommand(CLOSE_EDITOR_COMMAND_ID) }); registerContextualInstanceAction({ registerTerminalAction({ id: TerminalCommandId.KillActiveTab, title: terminalStrings.kill, f1: false,"} {"_id":"doc-en-vscode-82bcfa594f5cbc21ccc3ffff524d2eefc399659287d195a5b3be9505df9318ec","title":"","text":"weight: KeybindingWeight.WorkbenchContrib, when: TerminalContextKeys.tabsFocus }, run: (instance, c) => c.service.safeDisposeTerminal(instance), runAfter: (instances, c) => c.groupService.focusTabs() run: async (c, accessor) => { for (const terminal of getSelectedInstances(accessor) ?? []) { c.service.safeDisposeTerminal(terminal); } c.groupService.focusTabs(); } }); registerTerminalAction({"} {"_id":"doc-en-vscode-4e0840efa5f545e9d390c9025159151341096c43ed4a959103c22abee9bf64e3","title":"","text":"} } async changeIcon() { async changeIcon(icon?: TerminalIcon): Promise { if (icon) { this._icon = icon; this._onIconChanged.fire({ instance: this, userInitiated: true }); return icon; } type Item = IQuickPickItem & { icon: TerminalIcon }; const items: Item[] = []; for (const icon of getAllCodicons()) {"} {"_id":"doc-en-vscode-a518b4b7bcfee6cd55642bf8e3fbd3cb1a5927663bbd07ebea58ae432c107113","title":"","text":"if (result) { this._icon = result.icon; this._onIconChanged.fire({ instance: this, userInitiated: true }); return this._icon; } return; } async changeColor() { async changeColor(color?: string): Promise { if (color) { this.shellLaunchConfig.color = color; this._onIconChanged.fire({ instance: this, userInitiated: true }); return color; } const icon = this._getIcon(); if (!icon) { return;"} {"_id":"doc-en-vscode-916478a5c51c094ce8978f289191f4bc3118fd2e099d1565c06fe1d023691859","title":"","text":"quickPick.hide(); colorStyleDisposable.dispose(); return result?.id; } selectPreviousSuggestion(): void {"} {"_id":"doc-en-vscode-93102b865e1ce704ae87d1c4d07dcfa91599185ccc8e9f2c39235edc5145def4","title":"","text":"const keys = ['audioCues.diffLineDeleted', 'audioCues.diffLineInserted', 'audioCues.diffLineModified']; const content = [ localize('msg1', \"You are in a diff editor.\"), localize('msg2', \"View the next {0} or previous {1} diff in diff review mode that is optimized for screen readers.\", next, previous), localize('msg2', \"View the next ({0}) or previous ({1}) diff in diff review mode that is optimized for screen readers.\", next, previous), localize('msg3', \"To control which audio cues should be played, the following settings can be configured: {0}.\", keys.join(', ')), ]; const commentCommandInfo = getCommentCommandInfo(keybindingService, contextKeyService, codeEditor);"} {"_id":"doc-en-vscode-fafe265892e3d9cb83c57b3312b194aa2a7acd6782c98bd6b30d3dfc6d43402d","title":"","text":"import { killTerminalIcon, newTerminalIcon } from 'vs/workbench/contrib/terminal/browser/terminalIcons'; import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; import { Iterable } from 'vs/base/common/iterator'; import { AccessibleViewProviderId, accessibleViewCurrentProviderId, accessibleViewOnLastLine } from 'vs/workbench/contrib/accessibility/browser/accessibilityConfiguration'; import { AccessibleViewProviderId, accessibleViewCurrentProviderId, accessibleViewIsShown, accessibleViewOnLastLine } from 'vs/workbench/contrib/accessibility/browser/accessibilityConfiguration'; export const switchTerminalActionViewItemSeparator = 'u2500u2500u2500u2500u2500u2500u2500u2500u2500'; export const switchTerminalShowTabsTitle = localize('showTerminalTabs', \"Show Tabs\");"} {"_id":"doc-en-vscode-fdff3fb11dfbc4b215bd7703dc85f1406ecc09a4bb4b8b85814efbf094cf596a","title":"","text":"keybinding: [ { primary: KeyMod.CtrlCmd | KeyCode.KeyR, when: ContextKeyExpr.and(TerminalContextKeys.focus, CONTEXT_ACCESSIBILITY_MODE_ENABLED), when: ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED, ContextKeyExpr.or(TerminalContextKeys.focus, ContextKeyExpr.and(accessibleViewIsShown, accessibleViewCurrentProviderId.isEqualTo(AccessibleViewProviderId.Terminal)))), weight: KeybindingWeight.WorkbenchContrib }, {"} {"_id":"doc-en-vscode-ba6486d4bbedda74204080562147ab6c484ee312f35610adb76e98714e768933","title":"","text":"if (this._hasShellIntegration) { const shellIntegrationCommandList = []; shellIntegrationCommandList.push(localize('shellIntegration', \"The terminal has a feature called shell integration that offers an enhanced experience and provides useful commands for screen readers such as:\")); shellIntegrationCommandList.push('- ' + this._descriptionForCommand(TerminalCommandId.AccessibleBufferGoToNextCommand, localize('goToNextCommand', 'Go to Next Command ({0})'), localize('goToNextCommandNoKb', 'Go to Next Command is currently not triggerable by a keybinding.'))); shellIntegrationCommandList.push('- ' + this._descriptionForCommand(TerminalCommandId.AccessibleBufferGoToPreviousCommand, localize('goToPreviousCommand', 'Go to Previous Command ({0})'), localize('goToPreviousCommandNoKb', 'Go to Previous Command is currently not triggerable by a keybinding.'))); shellIntegrationCommandList.push('- ' + this._descriptionForCommand(TerminalCommandId.AccessibleBufferGoToNextCommand, localize('goToNextCommand', 'Go to Next Command ({0}) in the accessible view'), localize('goToNextCommandNoKb', 'Go to Next Command in the accessible view is currently not triggerable by a keybinding.'))); shellIntegrationCommandList.push('- ' + this._descriptionForCommand(TerminalCommandId.AccessibleBufferGoToPreviousCommand, localize('goToPreviousCommand', 'Go to Previous Command ({0}) in the accessible view'), localize('goToPreviousCommandNoKb', 'Go to Previous Command in the accessible view is currently not triggerable by a keybinding.'))); shellIntegrationCommandList.push('- ' + this._descriptionForCommand(AccessibilityCommandId.GoToSymbol, localize('goToSymbol', 'Go to Symbol ({0})'), localize('goToSymbolNoKb', 'Go to symbol is currently not triggerable by a keybinding.'))); shellIntegrationCommandList.push('- ' + this._descriptionForCommand(TerminalCommandId.RunRecentCommand, localize('runRecentCommand', 'Run Recent Command ({0})'), localize('runRecentCommandNoKb', 'Run Recent Command is currently not triggerable by a keybinding.'))); shellIntegrationCommandList.push('- ' + this._descriptionForCommand(TerminalCommandId.GoToRecentDirectory, localize('goToRecentDirectory', 'Go to Recent Directory ({0})'), localize('goToRecentDirectoryNoKb', 'Go to Recent Directory is currently not triggerable by a keybinding.')));"} {"_id":"doc-en-vscode-f999f0974bc97d5098006c476560626a1272b50a8bc7ed3a4ff30108f6a3435c","title":"","text":"async getBranchBase(ref: string): Promise { const branch = await this.getBranch(ref); const branchMergeBaseConfigKey = `branch.${branch.name}.vscode-merge-base`; const branchUpstream = await this.getUpstreamBranch(branch); // Upstream if (branch.upstream) { return await this.getBranch(`refs/remotes/${branch.upstream.remote}/${branch.upstream.name}`); if (branchUpstream) { return branchUpstream; } // Git config const mergeBaseConfigKey = `branch.${branch.name}.vscode-merge-base`; try { const mergeBase = await this.getConfig(branchMergeBaseConfigKey); if (mergeBase !== '') { const mergeBaseBranch = await this.getBranch(mergeBase); return mergeBaseBranch; const mergeBase = await this.getConfig(mergeBaseConfigKey); const branchFromConfig = mergeBase !== '' ? await this.getBranch(mergeBase) : undefined; if (branchFromConfig) { return branchFromConfig; } } catch (err) { } // Reflog const branchFromReflog = await this.getBranchBaseFromReflog(ref); if (branchFromReflog) { await this.setConfig(branchMergeBaseConfigKey, branchFromReflog.name!); return branchFromReflog; const branchFromReflogUpstream = branchFromReflog ? await this.getUpstreamBranch(branchFromReflog) : undefined; if (branchFromReflogUpstream) { await this.setConfig(mergeBaseConfigKey, `${branchFromReflogUpstream.remote}/${branchFromReflogUpstream.name}`); return branchFromReflogUpstream; } // Default branch const defaultBranch = await this.getDefaultBranch(); if (defaultBranch) { await this.setConfig(branchMergeBaseConfigKey, defaultBranch.name!); await this.setConfig(mergeBaseConfigKey, `${defaultBranch.remote}/${defaultBranch.name}`); return defaultBranch; }"} {"_id":"doc-en-vscode-903ab2188e813d8d0d55daecc7e050882276f12eb709f9b8648c29a02f0bbc2f","title":"","text":"return undefined; } private async getUpstreamBranch(branch: Branch): Promise { if (!branch.upstream) { return undefined; } try { const upstreamBranch = await this.getBranch(`refs/remotes/${branch.upstream.remote}/${branch.upstream.name}`); return upstreamBranch; } catch (err) { this.logger.warn(`Failed to get branch details for 'refs/remotes/${branch.upstream.remote}/${branch.upstream.name}': ${err.message}.`); return undefined; } } async getRefs(query: RefQuery = {}, cancellationToken?: CancellationToken): Promise { const config = workspace.getConfiguration('git'); let defaultSort = config.get<'alphabetically' | 'committerdate'>('branchSortOrder');"} {"_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-e043e7de33435c3cf4b039647ac47744affa6961c453b3e0ac8251d3d99eab66","title":"","text":"} public async $OnDidEndTask(execution: tasks.ITaskExecutionDTO): Promise { if (!this._taskExecutionPromises.has(execution.id)) { // Event already fired by the main thread // See https://github.com/microsoft/vscode/commit/aaf73920aeae171096d205efb2c58804a32b6846 return; } const _execution = await this.getTaskExecution(execution); this._taskExecutionPromises.delete(execution.id); this._taskExecutions.delete(execution.id);"} {"_id":"doc-en-vscode-0c1fc519c425c4dae49d2ba42472a68ad4d2e42377cd3629241f5b21171e4305","title":"","text":"if (result) { return result; } const createdResult: Promise = new Promise((resolve, reject) => { function resolvePromiseWithCreatedTask(that: ExtHostTaskBase, execution: tasks.ITaskExecutionDTO, taskToCreate: vscode.Task | types.Task | undefined) { if (!taskToCreate) { reject('Unexpected: Task does not exist.'); } else { resolve(new TaskExecutionImpl(that, execution.id, taskToCreate)); } } if (task) { resolvePromiseWithCreatedTask(this, execution, task); } else { TaskDTO.to(execution.task, this._workspaceProvider, this._providedCustomExecutions2) .then(task => resolvePromiseWithCreatedTask(this, execution, task)); } }); this._taskExecutionPromises.set(execution.id, createdResult); return createdResult.then(executionCreatedResult => { this._taskExecutions.set(execution.id, executionCreatedResult); return executionCreatedResult; }, rejected => { return Promise.reject(rejected); let executionPromise: Promise; if (!task) { executionPromise = TaskDTO.to(execution.task, this._workspaceProvider, this._providedCustomExecutions2).then(t => { if (!t) { throw new ErrorNoTelemetry('Unexpected: Task does not exist.'); } return new TaskExecutionImpl(this, execution.id, t); }); } else { executionPromise = Promise.resolve(new TaskExecutionImpl(this, execution.id, task)); } this._taskExecutionPromises.set(execution.id, executionPromise); return executionPromise.then(taskExecution => { this._taskExecutions.set(execution.id, taskExecution); return taskExecution; }); }"} {"_id":"doc-en-vscode-b2e6bfc899ea1aeb08b79af31e71217a80b6b80e902df6e372c59843a2614ea6","title":"","text":"key: 'workbench.editor.untitled.hint', migrateFn: (value, _accessor) => ([ [emptyTextEditorHintSetting, { value }], ['workbench.editor.untitled.hint', { value: undefined }] ]) }, { key: 'accessibility.verbosity.untitledHint', migrateFn: (value, _accessor) => ([ [AccessibilityVerbositySettingId.EmptyEditorHint, { value }], ['accessibility.verbosity.untitledHint', { value: undefined }] ]) }]);"} {"_id":"doc-en-vscode-2083b2a96734c20df50c9d5cdd36c532a95e7d77a7a14a285b8f8ba19ff8b27f","title":"","text":"import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { Registry } from 'vs/platform/registry/common/platform'; import { InlineChatController } from 'vs/workbench/contrib/inlineChat/browser/inlineChatController'; import { CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_INNER_CURSOR_LAST } from 'vs/workbench/contrib/inlineChat/common/inlineChat'; import { INotebookActionContext, INotebookCellActionContext, NotebookAction, NotebookCellAction, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, findTargetCellEditor } from 'vs/workbench/contrib/notebook/browser/controller/coreActions'; import { CellEditState } from 'vs/workbench/contrib/notebook/browser/notebookBrowser'; import { CellKind, NOTEBOOK_EDITOR_CURSOR_BOUNDARY } from 'vs/workbench/contrib/notebook/common/notebookCommon';"} {"_id":"doc-en-vscode-b7933b0c8a831c11471ed60661c86e9a43003c5e2476739e2b9b4e8a073eb097","title":"","text":"weight: KeybindingWeight.WorkbenchContrib }, { when: ContextKeyExpr.and( NOTEBOOK_EDITOR_FOCUSED, CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate(), ContextKeyExpr.equals('config.notebook.navigation.allowNavigateToSurroundingCells', true), ContextKeyExpr.and( ContextKeyExpr.has(InputFocusedContextKey), NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('top'), NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('none'), ), CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_INNER_CURSOR_LAST, EditorContextKeys.isEmbeddedDiffEditor.negate() ), primary: KeyCode.DownArrow, weight: KeybindingWeight.EditorCore }, { when: ContextKeyExpr.and( NOTEBOOK_EDITOR_FOCUSED, CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate(), ContextKeyExpr.equals('config.notebook.navigation.allowNavigateToSurroundingCells', true), ContextKeyExpr.and( NOTEBOOK_CELL_TYPE.isEqualTo('markup'), NOTEBOOK_CELL_MARKDOWN_EDIT_MODE.isEqualTo(false), NOTEBOOK_CURSOR_NAVIGATION_MODE), CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_INNER_CURSOR_LAST, EditorContextKeys.isEmbeddedDiffEditor.negate() ), primary: KeyCode.DownArrow, weight: KeybindingWeight.EditorCore }, { when: NOTEBOOK_EDITOR_FOCUSED, primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.PageDown, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.PageDown, },"} {"_id":"doc-en-vscode-92e85cc174502767cc46433e47b44f8186428d56e92fa30bff0d3a41dd589655","title":"","text":"super({ id: NOTEBOOK_FOCUS_PREVIOUS_EDITOR, title: localize('cursorMoveUp', 'Focus Previous Cell Editor'), precondition: CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate(), keybinding: [ { when: ContextKeyExpr.and("} {"_id":"doc-en-vscode-43f856c376c0ba52f50b05e6158e6778eb2a3673b514dbeee3b595947b4b78f6","title":"","text":"id: AccessibilityCommandId.AccessibleViewAcceptInlineCompletion, precondition: ContextKeyExpr.and(accessibleViewIsShown, ContextKeyExpr.equals(accessibleViewCurrentProviderId.key, AccessibleViewProviderId.InlineCompletions)), keybinding: { primary: KeyMod.CtrlCmd | KeyCode.Enter, mac: { primary: KeyMod.WinCtrl | KeyCode.Enter }, primary: KeyMod.CtrlCmd | KeyCode.Slash, mac: { primary: KeyMod.WinCtrl | KeyCode.Slash }, weight: KeybindingWeight.WorkbenchContrib }, icon: Codicon.check,"} {"_id":"doc-en-vscode-a342902debad9d4a38d5bc5c7c7833b924e2f73675f2c95ac6d4028b4d664746","title":"","text":"return undefined; } export async function getDocumentFormattingEditsWithSelectedProvider( workerService: IEditorWorkerService, languageFeaturesService: ILanguageFeaturesService, editorOrModel: ITextModel | IActiveCodeEditor, mode: FormattingMode, token: CancellationToken, ): Promise { const model = isCodeEditor(editorOrModel) ? editorOrModel.getModel() : editorOrModel; const provider = getRealAndSyntheticDocumentFormattersOrdered(languageFeaturesService.documentFormattingEditProvider, languageFeaturesService.documentRangeFormattingEditProvider, model); const selected = await FormattingConflicts.select(provider, model, mode, FormattingKind.File); if (selected) { const rawEdits = await Promise.resolve(selected.provideDocumentFormattingEdits(model, model.getOptions(), token)).catch(onUnexpectedExternalError); return await workerService.computeMoreMinimalEdits(model.uri, rawEdits); } return undefined; } export function getOnTypeFormattingEdits( workerService: IEditorWorkerService, languageFeaturesService: ILanguageFeaturesService,"} {"_id":"doc-en-vscode-058058659a52e15f49d14807c1257e1d1833c142cbc52f6033721e2e1cbde175","title":"","text":"import { IEditorWorkerService } from 'vs/editor/common/services/editorWorker'; import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeatures'; import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { FormattingMode, formatDocumentWithSelectedProvider, getDocumentFormattingEditsUntilResult } from 'vs/editor/contrib/format/browser/format'; import { FormattingMode, formatDocumentWithSelectedProvider, getDocumentFormattingEditsWithSelectedProvider } from 'vs/editor/contrib/format/browser/format'; import { Action2, MenuId, registerAction2 } from 'vs/platform/actions/common/actions'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';"} {"_id":"doc-en-vscode-ff5d484fddee5feb41cab304e8b1f6f15cfa417838ea68f97db5815635c77a67","title":"","text":"const model = ref.object.textEditorModel; const formatEdits = await getDocumentFormattingEditsUntilResult( const formatEdits = await getDocumentFormattingEditsWithSelectedProvider( editorWorkerService, languageFeaturesService, model, model.getOptions(), FormattingMode.Explicit, CancellationToken.None );"} {"_id":"doc-en-vscode-c4be8aa3f71fee6896f1cafa8fdc8fb7056333044f76531fdb42cc2a9ebfab34","title":"","text":"const model = ref.object.textEditorModel; // todo: eventually support cancellation. potential leak if cell deleted mid execution const formatEdits = await getDocumentFormattingEditsUntilResult( const formatEdits = await getDocumentFormattingEditsWithSelectedProvider( this.editorWorkerService, this.languageFeaturesService, model, model.getOptions(), FormattingMode.Silent, CancellationToken.None );"} {"_id":"doc-en-vscode-97be8befb9ea59af08a893c33c2215fd407381e0afb3cf0b0a2de2d0891ab368","title":"","text":"import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { ApplyCodeActionReason, applyCodeAction, getCodeActions } from 'vs/editor/contrib/codeAction/browser/codeAction'; import { CodeActionKind, CodeActionTriggerSource } from 'vs/editor/contrib/codeAction/common/types'; import { getDocumentFormattingEditsUntilResult } from 'vs/editor/contrib/format/browser/format'; import { FormattingMode, getDocumentFormattingEditsWithSelectedProvider } from 'vs/editor/contrib/format/browser/format'; import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { localize } from 'vs/nls'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration';"} {"_id":"doc-en-vscode-380bc29b9ac58355725ae93a4851c60607cabfa2eb6782b082078c7fbc0b6199","title":"","text":"const model = ref.object.textEditorModel; const formatEdits = await getDocumentFormattingEditsUntilResult( const formatEdits = await getDocumentFormattingEditsWithSelectedProvider( this.editorWorkerService, this.languageFeaturesService, model, model.getOptions(), FormattingMode.Silent, token );"} {"_id":"doc-en-vscode-34f3ff9e6a4a3fade78b7d6c4e623eafd8a4666797a20f8d774c212ccb4bc544","title":"","text":"const activeTextEditor = window.activeTextEditor; // Must extract these now because opening a new document will change the activeTextEditor reference const previousVisibleRange = activeTextEditor?.visibleRanges[0]; const previousVisibleRanges = activeTextEditor?.visibleRanges; const previousURI = activeTextEditor?.document.uri; const previousSelection = activeTextEditor?.selection;"} {"_id":"doc-en-vscode-bd186ad61f02c884bb2be526095574b3de2f02eae2c20b1a390e9574d11c4541","title":"","text":"opts.selection = previousSelection; const editor = await window.showTextDocument(document, opts); // This should always be defined but just in case if (previousVisibleRange) { editor.revealRange(previousVisibleRange); if (previousVisibleRanges && previousVisibleRanges.length > 0) { let rangeToReveal = previousVisibleRanges[0]; if (previousSelection && previousVisibleRanges.length > 1) { // In case of multiple visible ranges, find the one that intersects with the selection rangeToReveal = previousVisibleRanges.find(r => r.intersection(previousSelection)) ?? rangeToReveal; } editor.revealRange(rangeToReveal); } } }"} {"_id":"doc-en-vscode-afae73ddf9aa419f2c4f2b09c82b3fcb8fc085ac9747a73df75f021b1edd9d80","title":"","text":" content=\"default-src 'none'; script-src 'sha256-QA1gXilHYAUFCvp7MpjgcmyBCFzSKV0SpiecMU8aUVc=' 'self'; frame-src 'self'; style-src 'unsafe-inline';\"> content=\"default-src 'none'; script-src 'sha256-Ne5nVg2ZDLxLh1eqzYd1sGbOz022xlokwv+X6+HR1hw=' 'self'; frame-src 'self'; style-src 'unsafe-inline';\"> font-family: var(--monaco-monospace-font); color: var(--vscode-textPreformat-foreground); font-size: 12px; background-color: var(--vscode-textPreformat-background); padding: 1px 3px; border-radius: 4px; } blockquote {"} {"_id":"doc-en-vscode-aa306162814c4c4237a7dcc5f950e0b29230af88d0b0260f52b5f8cc92bdbd16","title":"","text":") { } showHover(options: IHoverDelegateOptions, focus?: boolean): IHoverWidget | undefined { // Only show the hover hint if the content is of a decent size const showHoverHint = ( options.content instanceof HTMLElement ? options.content.textContent ?? '' : typeof options.content === 'string' ? options.content : options.content.value ).length > 20; return this.hoverService.showHover({ ...options, persistence: { hideOnKeyDown: false, }, appearance: { showHoverHint: true, showHoverHint, skipFadeInAnimation: true, }, }, focus);"} {"_id":"doc-en-vscode-9ac1aa7b0f68c1c1c785e3532b066b502e846badd3974e7f5b705694fa26946f","title":"","text":"*/ mode?: 'prefix' | 'subword' | 'subwordSmart'; showToolbar?: 'always' | 'onHover'; showToolbar?: 'always' | 'onHover' | 'never'; suppressSuggestions?: boolean;"} {"_id":"doc-en-vscode-3202015e2aaecaf1a6b98b3173d236ea57ad53c15ef463a6852416553f951ebd","title":"","text":"'editor.inlineSuggest.showToolbar': { type: 'string', default: defaults.showToolbar, enum: ['always', 'onHover'], enum: ['always', 'onHover', 'never'], enumDescriptions: [ nls.localize('inlineSuggest.showToolbar.always', \"Show the inline suggestion toolbar whenever an inline suggestion is shown.\"), nls.localize('inlineSuggest.showToolbar.onHover', \"Show the inline suggestion toolbar when hovering over an inline suggestion.\"), nls.localize('inlineSuggest.showToolbar.never', \"Never show the inline suggestion toolbar.\"), ], description: nls.localize('inlineSuggest.showToolbar', \"Controls when to show the inline suggestion toolbar.\"), },"} {"_id":"doc-en-vscode-42547131d0b64fe403448c62af05fe9429c9e7f3be0af7b11447fd3ca0f8bc0f","title":"","text":"return { enabled: boolean(input.enabled, this.defaultValue.enabled), mode: stringSet(input.mode, this.defaultValue.mode, ['prefix', 'subword', 'subwordSmart']), showToolbar: stringSet(input.showToolbar, this.defaultValue.showToolbar, ['always', 'onHover']), showToolbar: stringSet(input.showToolbar, this.defaultValue.showToolbar, ['always', 'onHover', 'never']), suppressSuggestions: boolean(input.suppressSuggestions, this.defaultValue.suppressSuggestions), keepOnBlur: boolean(input.keepOnBlur, this.defaultValue.keepOnBlur), };"} {"_id":"doc-en-vscode-44d78c2edcc0ec7967c87a0b6a1d9a2c30dbcd47457855fe57aa555740f22357","title":"","text":"} computeSync(anchor: HoverAnchor, lineDecorations: IModelDecoration[]): InlineCompletionsHover[] { if (this._editor.getOption(EditorOption.inlineSuggest).showToolbar === 'always') { if (this._editor.getOption(EditorOption.inlineSuggest).showToolbar !== 'onHover') { return []; }"} {"_id":"doc-en-vscode-14c1f6d1a8871125a16dcb2baca238f214e2694d67e4840d05da5f64f2d3854b","title":"","text":"* Defaults to `prefix`. */ mode?: 'prefix' | 'subword' | 'subwordSmart'; showToolbar?: 'always' | 'onHover'; showToolbar?: 'always' | 'onHover' | 'never'; suppressSuggestions?: boolean; /** * Does not clear active inline suggestions when the editor loses focus."} {"_id":"doc-en-vscode-d680ceeb344098c0b88f76ade55ca6c5f3d5c3dd1ab7207ca1adbc25a04e9885","title":"","text":"\".eyaml\", \".eyml\", \".yaml\", \".cff\" \".cff\", \".yaml-tmlanguage\", \".yaml-tmpreferences\", \".yaml-tmtheme\" ], \"firstLine\": \"^#cloud-config\", \"configuration\": \"./language-configuration.json\""} {"_id":"doc-en-vscode-a816d3e365b345db24b7d8169a1f59442f14715b52750862b7760c58543a6804","title":"","text":".suggest-input-container .monaco-editor, .suggest-input-container .monaco-editor .lines-content { background: none; background: none !important; }"} {"_id":"doc-en-vscode-29f9f7599619b0878d9e7e3e7702ef73404b3fd7f0bad6545714bdf0586c03d0","title":"","text":"const lastUnchangedRegions = this._unchangedRegions.get(); const lastUnchangedRegionsOrigRanges = lastUnchangedRegions.originalDecorationIds .map(id => model.original.getDecorationRange(id)) .filter(r => !!r) .map(r => LineRange.fromRange(r!)); .map(r => r ? LineRange.fromRange(r) : undefined); const lastUnchangedRegionsModRanges = lastUnchangedRegions.modifiedDecorationIds .map(id => model.modified.getDecorationRange(id)) .filter(r => !!r) .map(r => LineRange.fromRange(r!)); .map(r => r ? LineRange.fromRange(r) : undefined); const originalDecorationIds = model.original.deltaDecorations( lastUnchangedRegions.originalDecorationIds,"} {"_id":"doc-en-vscode-80b76359016454812e5b46161c7442a05b4ee389dd91cc61724d3833549fb94f","title":"","text":"for (const r of newUnchangedRegions) { for (let i = 0; i < lastUnchangedRegions.regions.length; i++) { if (r.originalUnchangedRange.intersectsStrict(lastUnchangedRegionsOrigRanges[i]) && r.modifiedUnchangedRange.intersectsStrict(lastUnchangedRegionsModRanges[i])) { if (lastUnchangedRegionsOrigRanges[i] && r.originalUnchangedRange.intersectsStrict(lastUnchangedRegionsOrigRanges[i]!) && lastUnchangedRegionsModRanges[i] && r.modifiedUnchangedRange.intersectsStrict(lastUnchangedRegionsModRanges[i]!)) { r.setHiddenModifiedRange(lastUnchangedRegions.regions[i].getHiddenModifiedRange(undefined), tx); break; }"} {"_id":"doc-en-vscode-c9a2a49da2e4fb8effe799c088a0dcbf0ffbbd2b383bb0132f240b23e0fc5768","title":"","text":"import { MarkdownString } from 'vs/base/common/htmlContent'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { LOCALIZED_START_INLINE_CHAT_STRING } from 'vs/workbench/contrib/inlineChat/browser/inlineChatActions'; import { IBreakpoint, IDebugService } from 'vs/workbench/contrib/debug/common/debug'; import { IBreakpoint, IDebugService, IDebugSession } from 'vs/workbench/contrib/debug/common/debug'; import { IPreferencesService } from 'vs/workbench/services/preferences/common/preferences'; import { URI } from 'vs/base/common/uri';"} {"_id":"doc-en-vscode-742037b57d61fdb4e2a993332d5dc1a0438a15b7cd0f4da1d0bb2e4e7c8b3bcb","title":"","text":"private _gutterDecorationID: string | undefined; private _inlineChatKeybinding: string | undefined; private _hasInlineChatSession: boolean = false; private _hasActiveDebugSession: boolean = false; private _debugSessions: Set = new Set(); private readonly _localToDispose = new DisposableStore(); private readonly _gutterDecorationOpaque: IModelDecorationOptions; private readonly _gutterDecorationTransparent: IModelDecorationOptions;"} {"_id":"doc-en-vscode-f132cb5504d2aa7a0c5c1f2091e46f8ca25657b8e3f837003f11f5e0995ba970","title":"","text":"this._onEnablementOrModelChanged(); } })); this._register(this._debugService.onWillNewSession((session) => { this._debugSessions.add(session); if (!this._hasActiveDebugSession) { this._hasActiveDebugSession = true; this._onEnablementOrModelChanged(); } })); this._register(this._debugService.onDidEndSession((session) => { this._debugSessions.delete(session); if (this._debugSessions.size === 0) { this._hasActiveDebugSession = false; this._onEnablementOrModelChanged(); } })); this._register(this._inlineChatService.onDidChangeProviders(() => this._onEnablementOrModelChanged())); this._register(this._editor.onDidChangeModel(() => this._onEnablementOrModelChanged())); this._register(this._keybindingService.onDidUpdateKeybindings(() => {"} {"_id":"doc-en-vscode-0aa87ab32187c350880bccabd9bcb4c3915baa0a80f9a61d021c99c961e133d7","title":"","text":"private _onEnablementOrModelChanged(): void { // cancels the scheduler, removes editor listeners / removes decoration this._localToDispose.clear(); if (!this._editor.hasModel() || this._hasInlineChatSession || this._showGutterIconMode() === ShowGutterIcon.Never || !this._hasProvider()) { if (!this._editor.hasModel() || this._hasActiveDebugSession || this._hasInlineChatSession || this._showGutterIconMode() === ShowGutterIcon.Never || !this._hasProvider()) { return; } const editor = this._editor;"} {"_id":"doc-en-vscode-52202734345b48c1b3b4f6db99c6092fa2efeccdadbd07779e023c5323d699ed","title":"","text":"*--------------------------------------------------------------------------------------------*/ import { LazyStatefulPromise, raceTimeout } from 'vs/base/common/async'; import { onUnexpectedError } from 'vs/base/common/errors'; import { IDisposable, DisposableStore, toDisposable } from 'vs/base/common/lifecycle'; import { deepClone } from 'vs/base/common/objects'; import { isObject } from 'vs/base/common/types'; import { isDefined, isObject } from 'vs/base/common/types'; import { URI } from 'vs/base/common/uri'; import { ConstLazyPromise, IDocumentDiffItem, IMultiDiffEditorModel } from 'vs/editor/browser/widget/multiDiffEditorWidget/model'; import { MultiDiffEditorViewModel } from 'vs/editor/browser/widget/multiDiffEditorWidget/multiDiffEditorViewModel';"} {"_id":"doc-en-vscode-5f25271696f3359afb75bc52ea5fc9568928e91ad6a9ea94e97a4df1d4b8d254","title":"","text":"import { EditorInput } from 'vs/workbench/common/editor/editorInput'; import { ILanguageSupport } from 'vs/workbench/services/textfile/common/textfiles'; /* hot-reload:patch-prototype-methods */ export class MultiDiffEditorInput extends EditorInput implements ILanguageSupport { static readonly ID: string = 'workbench.input.multiDiffEditor';"} {"_id":"doc-en-vscode-28d9f5e2db60f089961a12bbb06bd392b46589b635c590f49b2564b01c7f987d","title":"","text":"private async _createModel(): Promise { const store = new DisposableStore(); const rs = await Promise.all(this.resources.map(async r => ({ originalRef: r.original ? store.add(await this._textModelService.createModelReference(r.original)) : undefined, originalModel: !r.original ? store.add(this._modelService.createModel('', null)) : undefined, modifiedRef: r.modified ? store.add(await this._textModelService.createModelReference(r.modified)) : undefined, modifiedModel: !r.modified ? store.add(this._modelService.createModel('', null)) : undefined, title: r.resource.fsPath, }))); const rs = (await Promise.all(this.resources.map(async r => { try { return { originalRef: r.original ? store.add(await this._textModelService.createModelReference(r.original)) : undefined, originalModel: !r.original ? store.add(this._modelService.createModel('', null)) : undefined, modifiedRef: r.modified ? store.add(await this._textModelService.createModelReference(r.modified)) : undefined, modifiedModel: !r.modified ? store.add(this._modelService.createModel('', null)) : undefined, title: r.resource.fsPath, }; } catch (e) { // e.g. \"File seems to be binary and cannot be opened as text\" console.error(e); onUnexpectedError(e); return undefined; } }))).filter(isDefined); const textResourceConfigurationService = this._textResourceConfigurationService;"} {"_id":"doc-en-vscode-521b32210990218ed1225d3d5de862a1a99704c9c0c5d0ca1d78863d109bbdff","title":"","text":"this.logService.trace(`Extension signature verification details for ${extension.identifier.id} ${extension.version}:n${sigError.output}`); } if (verificationStatus === ExtensionSignaturetErrorCode.PackageIsInvalidZip || verificationStatus === ExtensionSignaturetErrorCode.SignatureArchiveIsInvalidZip) { try { // Delete the downloaded vsix before throwing the error await this.delete(location); } catch (error) { this.logService.error(error); } throw new ExtensionManagementError(CorruptZipMessage, ExtensionManagementErrorCode.CorruptZip); } } finally {"} {"_id":"doc-en-vscode-d912d787afffbf493156d34e23c22318dd0f0674ae1c0865b56ed409f3eb54ed","title":"","text":"public static INSTANCE = new EditorRenderingCoordinator(); private _coordinatedRenderings: ICoordinatedRendering[] = []; private _animationFrameRunner: IDisposable | null = null; private _animationFrameRunners = new Map(); private constructor() { }"} {"_id":"doc-en-vscode-75af694cf92928097a6e2babfbc74be073e3bdda2f7735acaaa8d27248adc9ae","title":"","text":"this._coordinatedRenderings.splice(renderingIndex, 1); if (this._coordinatedRenderings.length === 0) { // There are no more renderings to coordinate => cancel animation frame if (this._animationFrameRunner !== null) { this._animationFrameRunner.dispose(); this._animationFrameRunner = null; // There are no more renderings to coordinate => cancel animation frames for (const [_, disposable] of this._animationFrameRunners) { disposable.dispose(); } this._animationFrameRunners.clear(); } } }; } private _scheduleRender(window: CodeWindow): void { if (this._animationFrameRunner === null) { if (!this._animationFrameRunners.has(window)) { const runner = () => { this._animationFrameRunner = null; this._animationFrameRunners.delete(window); this._onRenderScheduled(); }; this._animationFrameRunner = dom.runAtThisOrScheduleAtNextAnimationFrame(window, runner, 100); this._animationFrameRunners.set(window, dom.runAtThisOrScheduleAtNextAnimationFrame(window, runner, 100)); } }"} {"_id":"doc-en-vscode-5d08c397a0efef3e2dba162480dd029d315f0af858b46c145bd87f4d6e1bb998","title":"","text":"const ignoreImportantExtensionRecommendationStorageKey = 'extensionsAssistant/importantRecommendationsIgnore'; const donotShowWorkspaceRecommendationsStorageKey = 'extensionsAssistant/workspaceRecommendationsIgnore'; const choiceNever = localize('neverShowAgain', \"Don't Show Again\"); type RecommendationsNotificationActions = { onDidInstallRecommendedExtensions(extensions: IExtension[]): void;"} {"_id":"doc-en-vscode-7f219a446bd0697330742a2679eaef97d8f6cb6352315ddcb1f6ecd2c06a031d","title":"","text":"searchValue = source === RecommendationSource.WORKSPACE ? '@recommended' : extensions.map(extensionId => `@id:${extensionId.identifier.id}`).join(' '); } const donotShowAgainLabel = source === RecommendationSource.WORKSPACE ? localize('donotShowAgain', \"Don't Show Again for this Repository\") : extensions.length > 1 ? localize('donotShowAgainExtension', \"Don't Show Again for these Extensions\") : localize('donotShowAgainExtensionSingle', \"Don't Show Again for this Extension\"); return raceCancellablePromises([ this._registerP(this.showRecommendationsNotification(extensions, message, searchValue, source, recommendationsNotificationActions)), this._registerP(this.showRecommendationsNotification(extensions, message, searchValue, donotShowAgainLabel, source, recommendationsNotificationActions)), this._registerP(this.waitUntilRecommendationsAreInstalled(extensions)) ]); } private showRecommendationsNotification(extensions: IExtension[], message: string, searchValue: string, source: RecommendationSource, private showRecommendationsNotification(extensions: IExtension[], message: string, searchValue: string, donotShowAgainLabel: string, source: RecommendationSource, { onDidInstallRecommendedExtensions, onDidShowRecommendedExtensions, onDidCancelRecommendedExtensions, onDidNeverShowRecommendedExtensionsAgain }: RecommendationsNotificationActions): CancelablePromise { return createCancelablePromise(async token => { let accepted = false;"} {"_id":"doc-en-vscode-3e8199fb6929836b54d75800bbf3f8f4dfaeac600e83e1f0cfe65be8c93dcb8b","title":"","text":"this.runAction(this.instantiationService.createInstance(SearchExtensionsAction, searchValue)); } }, { label: choiceNever, label: donotShowAgainLabel, isSecondary: true, run: () => { onDidNeverShowRecommendedExtensionsAgain(extensions);"} {"_id":"doc-en-vscode-612df9a4ab3e9548fd25f39b263b2e75b32afe9b0adc745ae3c33bdcfd094403","title":"","text":"applyStatusBarStyle(); applyIconStyle(); } if (this._completionModel && (e.hasChanged(EditorOption.fontInfo) || e.hasChanged(EditorOption.suggestFontSize) || e.hasChanged(EditorOption.suggestLineHeight))) { this._list.splice(0, this._list.length, this._completionModel.items); } })); this._ctxSuggestWidgetVisible = SuggestContext.Visible.bindTo(_contextKeyService);"} {"_id":"doc-en-vscode-af29876667373a81280f3ba263af05babeb1f9de6d48b91a86d7eeee8c268047","title":"","text":"readonly detailsLabel: HTMLElement; readonly readMore: HTMLElement; readonly disposables: DisposableStore; readonly configureFont: () => void; } export class ItemRenderer implements IListRenderer {"} {"_id":"doc-en-vscode-e6058421ddd6a0ca3b79ce109db4916e4a965271cea1d769e91a40d0b04f3ee5","title":"","text":"readMore.style.width = lineHeightPx; }; configureFont(); disposables.add(this._editor.onDidChangeConfiguration(e => { if (e.hasChanged(EditorOption.fontInfo) || e.hasChanged(EditorOption.suggestFontSize) || e.hasChanged(EditorOption.suggestLineHeight)) { configureFont(); } })); return { root, left, right, icon, colorspan, iconLabel, iconContainer, parametersLabel, qualifierLabel, detailsLabel, readMore, disposables }; return { root, left, right, icon, colorspan, iconLabel, iconContainer, parametersLabel, qualifierLabel, detailsLabel, readMore, disposables, configureFont }; } renderElement(element: CompletionItem, index: number, data: ISuggestionTemplateData): void { data.configureFont(); const { completion } = element; data.root.id = getAriaId(index); data.colorspan.style.backgroundColor = '';"} {"_id":"doc-en-vscode-073e8c7afdb57f1591c1a9a96daff19f2636c8d93cb5486e43483dec8a054cb1","title":"","text":"}; // Update group contexts based on group changes this._register(this.onDidModelChange(e => { const updateGroupContextKeys = (e: IGroupModelChangeEvent) => { switch (e.kind) { case GroupModelChangeKind.GROUP_LOCKED: groupLockedContext.set(this.isLocked);"} {"_id":"doc-en-vscode-291e667dea4e7c881c2f55c75b301ada257a99ffb09b8bbc6d4024943c289d91","title":"","text":"// Group editors count context groupEditorsCountContext.set(this.count); })); }; this._register(this.onDidModelChange(e => updateGroupContextKeys(e))); // Track the active editor and update context key that reflects // the dirty state of this editor this._register(this.onDidActiveEditorChange(() => { observeActiveEditor(); })); this._register(this.onDidActiveEditorChange(() => observeActiveEditor())); // Update context keys on startup observeActiveEditor(); updateGroupContextKeys({ kind: GroupModelChangeKind.EDITOR_ACTIVE }); updateGroupContextKeys({ kind: GroupModelChangeKind.GROUP_LOCKED }); } private registerContainerListeners(): void {"} {"_id":"doc-en-vscode-442c1369af3c824a52cd259ff783b2b8d466a6b67eac22d3ee47769ee079473a","title":"","text":"localize('voice.keywordActivation.inlineChat', \"Keyword activation is enabled and listening for 'Hey Code' to start a voice chat session in the active editor.\"), localize('voice.keywordActivation.chatInContext', \"Keyword activation is enabled and listening for 'Hey Code' to start a voice chat session in the active editor or view depending on keyboard focus.\") ], 'description': localize('voice.keywordActivation', \"Controls whether the phrase 'Hey Code' should be speech recognized to start a voice chat session.\"), 'description': localize('voice.keywordActivation', \"Controls whether the keyword phrase 'Hey Code' is recognized to start a voice chat session. Enabling this will start recording from the microphone but the audio is processed locally and never sent to a server.\"), 'default': 'off', 'tags': ['accessibility', 'FeatureInsight'] }"} {"_id":"doc-en-vscode-7088851ee058556f88f463031b2ac532a391f591bbabe4572f2e6d478b31837c","title":"","text":"\"input.background\": \"#313131\", \"input.border\": \"#3C3C3C\", \"input.foreground\": \"#CCCCCC\", \"input.placeholderForeground\": \"#818181\", \"input.placeholderForeground\": \"#989898\", \"inputOption.activeBackground\": \"#2489DB82\", \"inputOption.activeBorder\": \"#2488DB\", \"keybindingLabel.foreground\": \"#CCCCCC\","} {"_id":"doc-en-vscode-11e53b1a2005272e51bf5574aefba21101c4a682b3885257ec8bdabaa68e5a43","title":"","text":"\"input.background\": \"#FFFFFF\", \"input.border\": \"#CECECE\", \"input.foreground\": \"#3B3B3B\", \"input.placeholderForeground\": \"#868686\", \"input.placeholderForeground\": \"#767676\", \"inputOption.activeBackground\": \"#BED6ED\", \"inputOption.activeBorder\": \"#005FB8\", \"inputOption.activeForeground\": \"#000000\","} {"_id":"doc-en-vscode-2e46aba0ff5233a919dec8f0c0e1d13b39297f8be81fe326c03a823cce1565f4","title":"","text":"return -1; } if (result !== 0) { return result; } if (a.multiFileDiffEditorModifiedUri && b.multiFileDiffEditorModifiedUri) { result = comparePaths(a.multiFileDiffEditorModifiedUri.fsPath, b.multiFileDiffEditorModifiedUri.fsPath, true); } else if (a.multiFileDiffEditorModifiedUri) {"} {"_id":"doc-en-vscode-7d29362cd34d530bb6c9f3e07b7f62fb5c289f70bccd1d65a795178db7f1beeb","title":"","text":"} else if (b.multiFileDiffEditorModifiedUri) { return -1; } if (result !== 0) { return result; } if (a.multiDiffEditorOriginalUri && b.multiDiffEditorOriginalUri) { result = comparePaths(a.multiDiffEditorOriginalUri.fsPath, b.multiDiffEditorOriginalUri.fsPath, true); } else if (a.multiDiffEditorOriginalUri) {"} {"_id":"doc-en-vscode-29aff51c8c32727b0ccb3bc73e923c27df1629b9d58a21df2e4bcfb92c501d7a","title":"","text":"protected override renderBody(container: HTMLElement): void { super.renderBody(container); this.element.classList.add('debug-pane'); this.tree = >this.instantiationService.createInstance( WorkbenchAsyncDataTree,"} {"_id":"doc-en-vscode-db8c0215826c40b6db5c4bcf0bda843569fd34897afcfdb604083e4769c587ae","title":"","text":"private renderMarkerStatusbar(context: IEditorHoverRenderContext, markerHover: MarkerHover, disposables: DisposableStore): void { if (markerHover.marker.severity === MarkerSeverity.Error || markerHover.marker.severity === MarkerSeverity.Warning || markerHover.marker.severity === MarkerSeverity.Info) { context.statusBar.addAction({ label: nls.localize('view problem', \"View Problem\"), commandId: NextMarkerAction.ID, run: () => { context.hide(); MarkerController.get(this._editor)?.showAtMarker(markerHover.marker); this._editor.focus(); } }); const markerController = MarkerController.get(this._editor); if (markerController) { context.statusBar.addAction({ label: nls.localize('view problem', \"View Problem\"), commandId: NextMarkerAction.ID, run: () => { context.hide(); markerController.showAtMarker(markerHover.marker); this._editor.focus(); } }); } } if (!this._editor.getOption(EditorOption.readOnly)) {"} {"_id":"doc-en-vscode-0c8944efc7c9bf8bfba90a866c12a6b9fcb226786952d0104e16ee7311c8af36","title":"","text":"import { getWindow, runWhenWindowIdle } from 'vs/base/browser/dom'; import { onUnexpectedError } from 'vs/base/common/errors'; import { Disposable, DisposableMap } from 'vs/base/common/lifecycle'; import { Disposable, DisposableMap, IDisposable } from 'vs/base/common/lifecycle'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { EditorContributionInstantiation, IEditorContributionDescription } from 'vs/editor/browser/editorExtensions'; import { IEditorContribution } from 'vs/editor/common/editorCommon';"} {"_id":"doc-en-vscode-e0fc57c95867bd8a03d77b4ed4f133cfab135b36f6d64347976c4e634ca323dd","title":"","text":"this._instantiateSome(EditorContributionInstantiation.BeforeFirstInteraction); } public onAfterModelAttached(): void { this._register(runWhenWindowIdle(getWindow(this._editor?.getDomNode()), () => { public onAfterModelAttached(): IDisposable { return runWhenWindowIdle(getWindow(this._editor?.getDomNode()), () => { this._instantiateSome(EditorContributionInstantiation.AfterFirstRender); }, 50)); }, 50); } private _instantiateSome(instantiation: EditorContributionInstantiation): void {"} {"_id":"doc-en-vscode-06603e3a1e03e707befd8d5a5fa1f33352ea1260e2288f34a902f2e2bfe8c332","title":"","text":"private readonly _overflowWidgetsDomNode: HTMLElement | undefined; private readonly _id: number; private readonly _configuration: IEditorConfiguration; private _contributionsDisposable: IDisposable | undefined; protected readonly _actions = new Map();"} {"_id":"doc-en-vscode-bee1383b9bcb670a9e1da340caacc5b49ba4dd1252bf938bf10504bc0fab6bab","title":"","text":"this._onDidChangeModel.fire(e); this._postDetachModelCleanup(detachedModel); this._contributions.onAfterModelAttached(); this._contributionsDisposable = this._contributions.onAfterModelAttached(); } private _removeDecorationTypes(): void {"} {"_id":"doc-en-vscode-9b0a657bc5d3f06ead719e72cbdde49ccb6df746f08a0377f0e89ebef2b38393","title":"","text":"} private _detachModel(): ITextModel | null { this._contributionsDisposable?.dispose(); this._contributionsDisposable = undefined; if (!this._modelData) { return null; }"} {"_id":"doc-en-vscode-77983ad180f0923ed7c2c94d8f28306f803cf184cdd27e5d967336eadaab1838","title":"","text":"if (this._bannerDomNode && this._domElement.contains(this._bannerDomNode)) { this._domElement.removeChild(this._bannerDomNode); } return model; }"} {"_id":"doc-en-vscode-f94cc7287ef00a847743ccb7f1129853ab57365fe162864bf487ff297cf3e53e","title":"","text":"position: relative; padding: 0 6px; margin-bottom: 4px; align-items: center; align-items: flex-end; justify-content: space-between; }"} {"_id":"doc-en-vscode-0005f7662b50a0376687cf82b2c38eef3d15c114c08d782dd04ae8edf5c16235","title":"","text":".interactive-session .interactive-input-part .interactive-execute-toolbar { height: 22px; /* It's bottom-aligned, make it appear centered within the container */ margin-bottom: 7px; } .interactive-session .interactive-input-part .interactive-execute-toolbar .codicon-debug-stop {"} {"_id":"doc-en-vscode-f24d5fefd3aeae384eb037219faf2ec3cdce8c77e4d9ced5690767e8e67f3d48","title":"","text":"} .quick-input-widget .interactive-session .interactive-input-part .interactive-execute-toolbar { bottom: 1px; margin-bottom: 1px; } .quick-input-widget .interactive-session .interactive-input-and-execute-toolbar {"} {"_id":"doc-en-vscode-80126c824c66a0123d0fd258e700645bee6744234032ceadc9bd0acc59b92128","title":"","text":"private _sessionCtor: CancelablePromise | undefined; private _activeSession?: Session; private _warmupRequestCts?: CancellationTokenSource; private _activeRequestCts?: CancellationTokenSource; private readonly _ctxHasActiveRequest: IContextKey; private readonly _ctxCellWidgetFocused: IContextKey; private readonly _ctxUserDidEdit: IContextKey;"} {"_id":"doc-en-vscode-1bd1ffe0ef61396eff5dde6e87b95ae91bbd5ae1e9c36f88069bd47a521ddb58","title":"","text":"} async acceptInput() { assertType(this._activeSession); assertType(this._widget); await this._sessionCtor; assertType(this._activeSession); this._warmupRequestCts?.dispose(true); this._warmupRequestCts = undefined; this._activeSession.addInput(new SessionPrompt(this._widget.inlineChatWidget.value));"} {"_id":"doc-en-vscode-2aaf5d0a2622034386021cbed918b886050efd435ba57be5660309db839479dd","title":"","text":"//TODO: update progress in a newly inserted cell below the widget instead of the fake editor const requestCts = new CancellationTokenSource(); this._activeRequestCts?.cancel(); this._activeRequestCts = new CancellationTokenSource(); const progressEdits: TextEdit[][] = []; const progressiveEditsQueue = new Queue(); const progressiveEditsClock = StopWatch.create(); const progressiveEditsAvgDuration = new MovingAverage(); const progressiveEditsCts = new CancellationTokenSource(requestCts.token); const progressiveEditsCts = new CancellationTokenSource(this._activeRequestCts.token); let progressiveChatResponse: IInlineChatMessageAppender | undefined; const progress = new AsyncProgress(async data => { // console.log('received chunk', data, request); if (requestCts.token.isCancellationRequested) { if (this._activeRequestCts?.token.isCancellationRequested) { return; }"} {"_id":"doc-en-vscode-cd7750e4669d5454f1265f5acf86217b9238891afc24c2228e5c841fe2f3a34c","title":"","text":"} }); const task = this._activeSession.provider.provideResponse(this._activeSession.session, request, progress, requestCts.token); const task = this._activeSession.provider.provideResponse(this._activeSession.session, request, progress, this._activeRequestCts.token); let response: ReplyResponse | ErrorResponse | EmptyResponse; try {"} {"_id":"doc-en-vscode-3a7a49b887b9364ccb952aed0571e524bae8edfb8d8a2f994ad9f8e41b3c81ef","title":"","text":"this._widget?.inlineChatWidget.updateInfo(!this._activeSession.lastExchange ? localize('thinking', \"Thinkingu2026\") : ''); this._ctxHasActiveRequest.set(true); const reply = await raceCancellationError(Promise.resolve(task), requestCts.token); const reply = await raceCancellationError(Promise.resolve(task), this._activeRequestCts.token); if (progressiveEditsQueue.size > 0) { // we must wait for all edits that came in via progress to complete await Event.toPromise(progressiveEditsQueue.onDrained);"} {"_id":"doc-en-vscode-c17fb9372a4a731489485dc13288f8882bbf8b172d6580f2c5932458e48c00c5","title":"","text":"this._widget?.inlineChatWidget.updateInfo(''); this._widget?.inlineChatWidget.updateToolbar(true); this._activeSession.addExchange(new SessionExchange(this._activeSession.lastInput, response)); this._activeSession?.addExchange(new SessionExchange(this._activeSession.lastInput, response)); this._ctxLastResponseType.set(response instanceof ReplyResponse ? response.raw.type : undefined); }"} {"_id":"doc-en-vscode-3cbf9721fbc2a6b43c480762b66b60d3ce544b119765d708361ed50fa8f7bb0b","title":"","text":"this._strategy?.cancel(); } if (this._activeSession) { this._inlineChatSessionService.releaseSession(this._activeSession); } this._activeSession = undefined; this._activeRequestCts?.cancel(); } discard() { this._strategy?.cancel(); this._activeRequestCts?.cancel(); this._widget?.discardChange(); this.dismiss(); }"} {"_id":"doc-en-vscode-0639877be9be2ef51604d318569e773a1d80c2e474af0a4f69e949af684304d3","title":"","text":"const titleElement = container.querySelector('.title') as HTMLElement; const setHeader = () => { const workspace = this.contextService.getWorkspace(); const title = workspace.folders.map(folder => folder.name).join(); titleElement.textContent = this.name; this.updateTitle(title); this.updateTitle(this.name); this.ariaHeaderLabel = nls.localize('explorerSection', \"Explorer Section: {0}\", this.name); titleElement.setAttribute('aria-label', this.ariaHeaderLabel); };"} {"_id":"doc-en-vscode-510df6601433346cfbfdfbd9891411e8ef86b0cecf3dd312e5a1ab92d341fa3b","title":"","text":".monaco-workbench .interactive-input-part .monaco-action-bar .action-label.codicon-loading.codicon-modifier-spin:not(.disabled)::before, .monaco-workbench .inline-chat .monaco-action-bar .action-label.codicon-loading.codicon-modifier-spin:not(.disabled)::before { content: \"ec1c\"; font-family: 'codicon'; } /*"} {"_id":"doc-en-vscode-7cae5c309f6b5288aeb8985da440057c54e61fcb3fa38d8634f3db4075c92965","title":"","text":".monaco-workbench.reduce-motion .interactive-input-part .monaco-action-bar .action-label.codicon-loading.codicon-modifier-spin:not(.disabled)::before, .monaco-workbench.reduce-motion .inline-chat .monaco-action-bar .action-label.codicon-loading.codicon-modifier-spin:not(.disabled)::before { content: \"ead7\"; font-family: 'codicon'; }"} {"_id":"doc-en-vscode-4ecdcc97cc04840d906c98049022c54669803aee31fbb3e822e5b6e78dfa1360","title":"","text":".quick-input-list .quick-input-list-entry.has-actions:hover .quick-input-list-entry-action-bar .action-label.dirty-anything::before { content: \"ea76\"; /* Close icon flips between black dot and \"X\" for dirty open editors */ font-family: 'codicon'; }"} {"_id":"doc-en-vscode-4ba30a6d4209a4462fd74f57a3cbb2d0ae65c21f989e4acf335d29baa1601887","title":"","text":"}; private readonly closeDirtyWindowAction: IQuickInputButton = { iconClass: 'dirty-window ' + Codicon.closeDirty, iconClass: 'dirty-window ' + ThemeIcon.asClassName(Codicon.closeDirty), tooltip: localize('close', \"Close Window\"), alwaysVisible: true };"} {"_id":"doc-en-vscode-d2389d42f6ebedd88c25f3c061ce29fa814e6388f14a3d0d1bf6c0185037ccb2","title":"","text":"* Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { DisposableStore } from 'vs/base/common/lifecycle'; import { ExtHostContext, IExtHostEditorTabsShape, MainContext, IEditorTabDto, IEditorTabGroupDto, MainThreadEditorTabsShape, AnyInputDto, TabInputKind, TabModelOperationKind, TextDiffInputDto } from 'vs/workbench/api/common/extHost.protocol'; import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers'; import { Event } from 'vs/base/common/event'; import { DisposableMap, DisposableStore } from 'vs/base/common/lifecycle'; import { isEqual } from 'vs/base/common/resources'; import { URI } from 'vs/base/common/uri'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ILogService } from 'vs/platform/log/common/log'; import { AnyInputDto, ExtHostContext, IEditorTabDto, IEditorTabGroupDto, IExtHostEditorTabsShape, MainContext, MainThreadEditorTabsShape, TabInputKind, TabModelOperationKind, TextDiffInputDto } from 'vs/workbench/api/common/extHost.protocol'; import { EditorResourceAccessor, GroupModelChangeKind, SideBySideEditor } from 'vs/workbench/common/editor'; import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; import { isGroupEditorMoveEvent } from 'vs/workbench/common/editor/editorGroupModel'; import { EditorInput } from 'vs/workbench/common/editor/editorInput'; import { columnToEditorGroup, EditorGroupColumn, editorGroupToColumn } from 'vs/workbench/services/editor/common/editorGroupColumn'; import { GroupDirection, IEditorGroup, IEditorGroupsService, preferredSideBySideGroupDirection } from 'vs/workbench/services/editor/common/editorGroupsService'; import { IEditorsChangeEvent, IEditorService, SIDE_GROUP } from 'vs/workbench/services/editor/common/editorService'; import { SideBySideEditorInput } from 'vs/workbench/common/editor/sideBySideEditorInput'; import { AbstractTextResourceEditorInput } from 'vs/workbench/common/editor/textResourceEditorInput'; import { NotebookEditorInput } from 'vs/workbench/contrib/notebook/common/notebookEditorInput'; import { ChatEditorInput } from 'vs/workbench/contrib/chat/browser/chatEditorInput'; import { CustomEditorInput } from 'vs/workbench/contrib/customEditor/browser/customEditorInput'; import { URI } from 'vs/base/common/uri'; import { WebviewInput } from 'vs/workbench/contrib/webviewPanel/browser/webviewEditorInput'; import { TerminalEditorInput } from 'vs/workbench/contrib/terminal/browser/terminalEditorInput'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { SideBySideEditorInput } from 'vs/workbench/common/editor/sideBySideEditorInput'; import { isEqual } from 'vs/base/common/resources'; import { isGroupEditorMoveEvent } from 'vs/workbench/common/editor/editorGroupModel'; import { InteractiveEditorInput } from 'vs/workbench/contrib/interactive/browser/interactiveEditorInput'; import { MergeEditorInput } from 'vs/workbench/contrib/mergeEditor/browser/mergeEditorInput'; import { ILogService } from 'vs/platform/log/common/log'; import { ChatEditorInput } from 'vs/workbench/contrib/chat/browser/chatEditorInput'; import { MultiDiffEditorInput } from 'vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput'; import { NotebookEditorInput } from 'vs/workbench/contrib/notebook/common/notebookEditorInput'; import { TerminalEditorInput } from 'vs/workbench/contrib/terminal/browser/terminalEditorInput'; import { WebviewInput } from 'vs/workbench/contrib/webviewPanel/browser/webviewEditorInput'; import { columnToEditorGroup, EditorGroupColumn, editorGroupToColumn } from 'vs/workbench/services/editor/common/editorGroupColumn'; import { GroupDirection, IEditorGroup, IEditorGroupsService, preferredSideBySideGroupDirection } from 'vs/workbench/services/editor/common/editorGroupsService'; import { IEditorsChangeEvent, IEditorService, SIDE_GROUP } from 'vs/workbench/services/editor/common/editorService'; import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers'; interface TabInfo { tab: IEditorTabDto;"} {"_id":"doc-en-vscode-2d1a67907e976bfa84cadb9ce5baaf25430ce7709364b03cdfe11780101e95f9","title":"","text":"private readonly _groupLookup: Map = new Map(); // Lookup table for finding tab by id private readonly _tabInfoLookup: Map = new Map(); // Tracks the currently open MultiDiffEditorInputs to listen to resource changes private readonly _multiDiffEditorInputListeners: DisposableMap = new DisposableMap(); constructor( extHostContext: IExtHostContext,"} {"_id":"doc-en-vscode-af033cf2bfec9addc29296cecfdbb0ce53f2be258bfd927b42a64d8a8a24d925","title":"","text":"} })); this._dispoables.add(this._multiDiffEditorInputListeners); // Structural group changes (add, remove, move, etc) are difficult to patch. // Since they happen infrequently we just rebuild the entire model this._dispoables.add(this._editorGroupsService.onDidAddGroup(() => this._createTabsModel()));"} {"_id":"doc-en-vscode-ceef130bbad110df0b98b06c4e3f90d152fb4eb66f5f9332f1652157ff339193","title":"","text":"if (editor instanceof MultiDiffEditorInput) { const diffEditors: TextDiffInputDto[] = []; for (const resource of (editor?.initialResources ?? [])) { for (const resource of (editor?.resources.get() ?? [])) { if (resource.original && resource.modified) { diffEditors.push({ kind: TabInputKind.TextDiffInput,"} {"_id":"doc-en-vscode-814d984e5bbbb02d307042b830a4faf6830bc682eb8b9fd9ee17ff149fd51db1","title":"","text":"const tabObject = this._buildTabObject(group, editorInput, editorIndex); tabs.splice(editorIndex, 0, tabObject); // Update lookup this._tabInfoLookup.set(this._generateTabId(editorInput, groupId), { group, editorInput, tab: tabObject }); const tabId = this._generateTabId(editorInput, groupId); this._tabInfoLookup.set(tabId, { group, editorInput, tab: tabObject }); if (editorInput instanceof MultiDiffEditorInput) { this._multiDiffEditorInputListeners.set(editorInput, Event.fromObservableLight(editorInput.resources)(() => { const tabInfo = this._tabInfoLookup.get(tabId); if (!tabInfo) { return; } tabInfo.tab = this._buildTabObject(group, editorInput, editorIndex); this._proxy.$acceptTabOperation({ groupId, index: editorIndex, tabDto: tabInfo.tab, kind: TabModelOperationKind.TAB_UPDATE }); })); } this._proxy.$acceptTabOperation({ groupId,"} {"_id":"doc-en-vscode-93fe33ef4f1fb457d5e8a882f075c0834215e8f828eb8b4d65658184118e9357","title":"","text":"// Update lookup this._tabInfoLookup.delete(removedTab[0]?.id ?? ''); if (removedTab[0]?.input instanceof MultiDiffEditorInput) { this._multiDiffEditorInputListeners.deleteAndDispose(removedTab[0]?.input); } this._proxy.$acceptTabOperation({ groupId, index: editorIndex,"} {"_id":"doc-en-vscode-2c07a293d2da65ee202d3c7855ca53412caa20c5001b3d230072c16e0ecd43b7","title":"","text":"this._register(autorun((reader) => { /** @description Updates name */ const resources = this._resources.read(reader); const resources = this.resources.read(reader); const label = this.label ?? localize('name', \"Multi Diff Editor\"); if (resources) { this._name = label + localize({"} {"_id":"doc-en-vscode-8c493a9394a27e84d1c3da01cd7cd15ec2da87ee6ae848b0419de233a98c129c","title":"","text":"return false; } private readonly _resources = derived(this, reader => this._resolvedSource.cachedPromiseResult.read(reader)?.data?.resources.read(reader)); private readonly _isDirtyObservables = mapObservableArrayCached(this, this._resources.map(r => r ?? []), res => { public readonly resources = derived(this, reader => this._resolvedSource.cachedPromiseResult.read(reader)?.data?.resources.read(reader)); private readonly _isDirtyObservables = mapObservableArrayCached(this, this.resources.map(r => r ?? []), res => { const isModifiedDirty = res.modified ? isUriDirty(this._textFileService, res.modified) : constObservable(false); const isOriginalDirty = res.original ? isUriDirty(this._textFileService, res.original) : constObservable(false); return derived(reader => /** @description modifiedDirty||originalDirty */ isModifiedDirty.read(reader) || isOriginalDirty.read(reader));"} {"_id":"doc-en-vscode-d443a949ab8674c609fb128c3329f8fe72614b027147b98c8187cf4bdb33bde0","title":"","text":"}, 500, false, true)(async (markerEvent) => { markerChanged?.dispose(); markerChanged = undefined; if (!markerEvent.includes(modelEvent.uri) || (this.markerService.read({ resource: modelEvent.uri }).length !== 0)) { if (!markerEvent || !markerEvent.includes(modelEvent.uri) || (this.markerService.read({ resource: modelEvent.uri }).length !== 0)) { return; } const oldLines = Array.from(this.lines);"} {"_id":"doc-en-vscode-eaae8340ee03ed3e6ba74bc509d6be376702b6d256e50fd5aea3c4329ba1ac2d","title":"","text":"if (this.extensionManagementServerService.localExtensionManagementServer === this.extension.server) { if (this.extensionManifestPropertiesService.prefersExecuteOnWorkspace(this.extension.local.manifest)) { if (this.extensionManagementServerService.remoteExtensionManagementServer) { message = new MarkdownString(`${localize('Install in remote server to enable', \"This extension is disabled in this workspace because it is defined to run in the Remote Extension Host. Please install the extension in '{0}' to enable.\", this.extensionManagementServerService.remoteExtensionManagementServer.label)} [${localize('learn more', \"Learn More\")}](https://aka.ms/vscode-remote/developing-extensions/architecture)`); message = new MarkdownString(`${localize('Install in remote server to enable', \"This extension is disabled in this workspace because it is defined to run in the Remote Extension Host. Please install the extension in '{0}' to enable.\", this.extensionManagementServerService.remoteExtensionManagementServer.label)} [${localize('learn more', \"Learn More\")}](https://code.visualstudio.com/api/advanced-topics/remote-extensions#architecture-and-extension-kinds)`); } } }"} {"_id":"doc-en-vscode-dc8597f2c272d46b078e2a00f6a67ffb9af1ae65b2121ac73e259be368bbc7c6","title":"","text":"else if (this.extensionManagementServerService.remoteExtensionManagementServer === this.extension.server) { if (this.extensionManifestPropertiesService.prefersExecuteOnUI(this.extension.local.manifest)) { if (this.extensionManagementServerService.localExtensionManagementServer) { message = new MarkdownString(`${localize('Install in local server to enable', \"This extension is disabled in this workspace because it is defined to run in the Local Extension Host. Please install the extension locally to enable.\", this.extensionManagementServerService.remoteExtensionManagementServer.label)} [${localize('learn more', \"Learn More\")}](https://aka.ms/vscode-remote/developing-extensions/architecture)`); message = new MarkdownString(`${localize('Install in local server to enable', \"This extension is disabled in this workspace because it is defined to run in the Local Extension Host. Please install the extension locally to enable.\", this.extensionManagementServerService.remoteExtensionManagementServer.label)} [${localize('learn more', \"Learn More\")}](https://code.visualstudio.com/api/advanced-topics/remote-extensions#architecture-and-extension-kinds)`); } else if (isWeb) { message = new MarkdownString(`${localize('Defined to run in desktop', \"This extension is disabled because it is defined to run only in {0} for the Desktop.\", this.productService.nameLong)} [${localize('learn more', \"Learn More\")}](https://aka.ms/vscode-remote/developing-extensions/architecture)`); message = new MarkdownString(`${localize('Defined to run in desktop', \"This extension is disabled because it is defined to run only in {0} for the Desktop.\", this.productService.nameLong)} [${localize('learn more', \"Learn More\")}](https://code.visualstudio.com/api/advanced-topics/remote-extensions#architecture-and-extension-kinds)`); } } } // Extension on Web Server else if (this.extensionManagementServerService.webExtensionManagementServer === this.extension.server) { message = new MarkdownString(`${localize('Cannot be enabled', \"This extension is disabled because it is not supported in {0} for the Web.\", this.productService.nameLong)} [${localize('learn more', \"Learn More\")}](https://aka.ms/vscode-remote/developing-extensions/architecture)`); message = new MarkdownString(`${localize('Cannot be enabled', \"This extension is disabled because it is not supported in {0} for the Web.\", this.productService.nameLong)} [${localize('learn more', \"Learn More\")}](https://code.visualstudio.com/api/advanced-topics/remote-extensions#architecture-and-extension-kinds)`); } if (message) { this.updateStatus({ icon: warningIcon, message }, true);"} {"_id":"doc-en-vscode-ec4ae4a0edf1445caa3698317b69bbc52ca4a092ea2dbaa1e47a00875c416a58","title":"","text":"const runningExtensionServer = runningExtension ? this.extensionManagementServerService.getExtensionManagementServer(toExtension(runningExtension)) : null; if (this.extension.server === this.extensionManagementServerService.localExtensionManagementServer && runningExtensionServer === this.extensionManagementServerService.remoteExtensionManagementServer) { if (this.extensionManifestPropertiesService.prefersExecuteOnWorkspace(this.extension.local.manifest)) { this.updateStatus({ icon: infoIcon, message: new MarkdownString(`${localize('enabled remotely', \"This extension is enabled in the Remote Extension Host because it prefers to run there.\")} [${localize('learn more', \"Learn More\")}](https://aka.ms/vscode-remote/developing-extensions/architecture)`) }, true); this.updateStatus({ icon: infoIcon, message: new MarkdownString(`${localize('enabled remotely', \"This extension is enabled in the Remote Extension Host because it prefers to run there.\")} [${localize('learn more', \"Learn More\")}](https://code.visualstudio.com/api/advanced-topics/remote-extensions#architecture-and-extension-kinds)`) }, true); } return; } if (this.extension.server === this.extensionManagementServerService.remoteExtensionManagementServer && runningExtensionServer === this.extensionManagementServerService.localExtensionManagementServer) { if (this.extensionManifestPropertiesService.prefersExecuteOnUI(this.extension.local.manifest)) { this.updateStatus({ icon: infoIcon, message: new MarkdownString(`${localize('enabled locally', \"This extension is enabled in the Local Extension Host because it prefers to run there.\")} [${localize('learn more', \"Learn More\")}](https://aka.ms/vscode-remote/developing-extensions/architecture)`) }, true); this.updateStatus({ icon: infoIcon, message: new MarkdownString(`${localize('enabled locally', \"This extension is enabled in the Local Extension Host because it prefers to run there.\")} [${localize('learn more', \"Learn More\")}](https://code.visualstudio.com/api/advanced-topics/remote-extensions#architecture-and-extension-kinds)`) }, true); } return; } if (this.extension.server === this.extensionManagementServerService.remoteExtensionManagementServer && runningExtensionServer === this.extensionManagementServerService.webExtensionManagementServer) { if (this.extensionManifestPropertiesService.canExecuteOnWeb(this.extension.local.manifest)) { this.updateStatus({ icon: infoIcon, message: new MarkdownString(`${localize('enabled in web worker', \"This extension is enabled in the Web Worker Extension Host because it prefers to run there.\")} [${localize('learn more', \"Learn More\")}](https://aka.ms/vscode-remote/developing-extensions/architecture)`) }, true); this.updateStatus({ icon: infoIcon, message: new MarkdownString(`${localize('enabled in web worker', \"This extension is enabled in the Web Worker Extension Host because it prefers to run there.\")} [${localize('learn more', \"Learn More\")}](https://code.visualstudio.com/api/advanced-topics/remote-extensions#architecture-and-extension-kinds)`) }, true); } return; }"} {"_id":"doc-en-vscode-a0baef3ca65fb115124aad870e42d25ffbf437fda7e823ef3500132fca6509f7","title":"","text":"when: ContextKeyExpr.or(ContextKeyExpr.and(CONTEXT_IN_CHAT_SESSION, CONTEXT_IN_CHAT_INPUT.negate()), accessibleViewInCodeBlock), primary: KeyMod.CtrlCmd | KeyCode.Enter, mac: { primary: KeyMod.WinCtrl | KeyCode.Enter }, weight: KeybindingWeight.WorkbenchContrib weight: KeybindingWeight.ExternalExtension + 1 }, }); }"} {"_id":"doc-en-vscode-a9d59131cf46400b80583e2986bde3d6e86dd5624b9cbaec6e5b264423c9ef86","title":"","text":"// Only allow history navigation when the input is empty. // (If this model change happened as a result of a history navigation, this is canceled out by a call in this.navigateHistory) const model = this._inputEditor.getModel(); const inputHasText = !!model && model.getValueLength() > 0; const inputHasText = !!model && model.getValue().trim().length > 0; this.inputEditorHasText.set(inputHasText); // If the user is typing on a history entry, then reset the onHistoryEntry flag so that history navigation can be disabled"} {"_id":"doc-en-vscode-213edcbfd60e604800c5478c94b798f0566ca70d7bf6fd04e76f572836be4a13","title":"","text":"import { editorBackground, editorForeground, inputBackground } from 'vs/platform/theme/common/colorRegistry'; import { ChatModel } from 'vs/workbench/contrib/chat/common/chatModel'; import { Range } from 'vs/editor/common/core/range'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; export class InlineChatContentWidget implements IContentWidget {"} {"_id":"doc-en-vscode-6c9e2c448f21a061e3f65c4d8dcdeaeb418727ede9bbaa3f31fc6d01986b42b1","title":"","text":"constructor( private readonly _editor: ICodeEditor, @IInstantiationService instaService: IInstantiationService, @IContextKeyService contextKeyService: IContextKeyService, ) { this._defaultChatModel = this._store.add(instaService.createInstance(ChatModel, `inlineChatDefaultModel/editorContentWidgetPlaceholder`, undefined)); this._widget = instaService.createInstance( const scopedInstaService = instaService.createChild( new ServiceCollection([ IContextKeyService, this._store.add(contextKeyService.createScoped(this._domNode)) ]) ); this._widget = scopedInstaService.createInstance( ChatWidget, ChatAgentLocation.Editor, { resource: true },"} {"_id":"doc-en-vscode-553cdb2693b3104f418e8a9dfe566da9be48025ec517c31f7996c782a5598558","title":"","text":"} return false; }); if (refer && slashCommandLike) { if (refer && slashCommandLike && !this._session.lastExchange) { this._log('[IE] seeing refer command, continuing outside editor', this._session.provider.extensionId); // cancel this request"} {"_id":"doc-en-vscode-d219e66ad4415dfae6ef19bb42d5fcc3cdd16c00b7252535f1669b0aeb4ab1a7","title":"","text":"// if agent has a refer command, massage the input to include the agent name await this._instaService.invokeFunction(sendRequest, massagedInput); if (!this._session.lastExchange) { // DONE when there wasn't any exchange yet. We used the inline chat only as trampoline return State.ACCEPT; } return State.WAIT_FOR_INPUT; return State.ACCEPT; } this._session.addInput(new SessionPrompt(input, this._nextAttempt, this._nextWithIntentDetection));"} {"_id":"doc-en-vscode-701f70f962a8d01810aea68ab3d841ed74973638abfe8269f43c2ccc67c9522a","title":"","text":"import { IChatService } from 'vs/workbench/contrib/chat/common/chatService'; import { setupCustomHover } from 'vs/base/browser/ui/hover/updatableHoverWidget'; import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; export interface InlineChatWidgetViewState {"} {"_id":"doc-en-vscode-f9d0b3f95a946121eb7566d0df2fd4fa9c407367d3a8a9c42fed9b627a389c1c","title":"","text":"this._store.add(this._progressBar); let allowRequests = false; this._chatWidget = _instantiationService.createInstance( const scopedInstaService = _instantiationService.createChild( new ServiceCollection([ IContextKeyService, this._store.add(_contextKeyService.createScoped(this._elements.chatWidget)) ]) ); this._chatWidget = scopedInstaService.createInstance( ChatWidget, location, { resource: true },"} {"_id":"doc-en-vscode-2a7d82f0398dcb7f813230cd40ea603af7c8931f18997537eec8310d3c9cd366","title":"","text":"get contentHeight(): number { const data = { followUpsHeight: getTotalHeight(this._elements.followUps), chatWidgetHeight: this._chatWidget.contentHeight, chatWidgetContentHeight: this._chatWidget.contentHeight, progressHeight: getTotalHeight(this._elements.progress), statusHeight: getTotalHeight(this._elements.status), extraHeight: this._getExtraHeight() }; const result = data.progressHeight + data.chatWidgetHeight + data.followUpsHeight + data.statusHeight + data.extraHeight; // console.log(`InlineChat#contentHeight ${result}`, data); const result = data.progressHeight + data.chatWidgetContentHeight + data.followUpsHeight + data.statusHeight + data.extraHeight; return result; } get minHeight(): number { // The chat widget is variable height and supports scrolling. It // should be at least 100px high and at most the content height. let value = this.contentHeight; value -= this._chatWidget.contentHeight; value += Math.min(100, this._chatWidget.contentHeight); return value; } protected _getExtraHeight(): number { return 12 /* padding */ + 2 /*border*/ + 12 /*shadow*/; }"} {"_id":"doc-en-vscode-5ab02c50f216a1448bfc72642e331b5a7b7f3af8a352bb4534467ffe32d78354","title":"","text":"const chatContentHeight = this.widget.contentHeight; const editorHeight = this.editor.getLayoutInfo().height; const contentHeight = Math.min(chatContentHeight, editorHeight * 0.42); const contentHeight = Math.min(chatContentHeight, Math.max(this.widget.minHeight, editorHeight * 0.42)); const heightInLines = contentHeight / this.editor.getOption(EditorOption.lineHeight); // console.log('ZONE#_computeHeightInLines', { chatContentHeight, editorHeight, contentHeight, heightInLines }); return heightInLines; }"} {"_id":"doc-en-vscode-e0d6ec75a27def70ffd77f4bee33576177b4f81b95dd55704d1c558936d157d1","title":"","text":"z-index: 3; } .monaco-workbench .zone-widget.inline-chat-widget .interactive-session { max-width: unset; } .monaco-workbench .zone-widget-container.inside-selection { background-color: var(--vscode-inlineChat-regionHighlight); }"} {"_id":"doc-en-vscode-fc3ebe59b618fd0e6674a8b817b99b12ed16bf541983273a4b803645532b3c27","title":"","text":"background-color: var(--vscode-chat-list-background); } .interactive-item-container.interactive-request .header .monaco-toolbar { /* Take the partially-transparent background color override for request rows */ background-color: inherit; } .interactive-item-container .header .monaco-toolbar .checked.action-label, .interactive-item-container .header .monaco-toolbar .checked.action-label:hover { color: var(--vscode-inputOption-activeForeground) !important;"} {"_id":"doc-en-vscode-8bde806856c2e8e14f905a5950b37218b3d623c4f5fc29eb91f5b5216807c4d4","title":"","text":"background-color: var(--vscode-inlineChat-regionHighlight); } .monaco-workbench .inline-chat-slash-command { .monaco-workbench .interactive-session .interactive-input-and-execute-toolbar .monaco-editor .inline-chat-slash-command { background-color: var(--vscode-chat-slashCommandBackground); color: var(--vscode-chat-slashCommandForeground); color: var(--vscode-chat-slashCommandForeground); /* Overrides the foreground color rule in chat.css */ border-radius: 4px; padding: 1px; }"} {"_id":"doc-en-vscode-133e39753973de07a9696f5e4012a6ffc6488cb68bf454cd6d8967b54f7f647e","title":"","text":"private _getAccessibleViewHelpDialogContent(providerHasSymbols?: boolean): string { const navigationHint = this._getNavigationHint(); const goToSymbolHint = this._getGoToSymbolHint(providerHasSymbols); const toolbarHint = localize('toolbar', \"Navigate to the toolbar (Shift+Tab)).\"); const toolbarHint = localize('toolbar', \"Navigate to the toolbar (Shift+Tab).\"); const chatHints = this._getChatHints(); let hint = localize('intro', \"In the accessible view, you can:n\");"} {"_id":"doc-en-vscode-4644216db7e285ef1b862ad2a7bb71cd8055aec0d4c0764530e3329c1aaa0a19","title":"","text":"if (insertIntoNewFileKb) { hint += localize('insertIntoNewFile', \" - Insert the code block into a new file ({0}).n\", insertIntoNewFileKb); } else { hint += localize('insertIntoNewFileNoKb', \" - Insert the code block into a new file by configuring a keybinding for the Chat: Insert at Cursor command.n\"); hint += localize('insertIntoNewFileNoKb', \" - Insert the code block into a new file by configuring a keybinding for the Chat: Insert into New File command.n\"); } if (runInTerminalKb) { hint += localize('runInTerminal', \" - Run the code block in the terminal ({0}).n\", runInTerminalKb);"} {"_id":"doc-en-vscode-bde7c44d649f74df2ff08a02da0750a0cded7b55f0e472fe6028f8de02816951","title":"","text":"let goToSymbolHint = ''; if (providerHasSymbols) { if (goToSymbolKb) { goToSymbolHint = localize('goToSymbolHint', 'Go to a symbol ({0})', goToSymbolKb); goToSymbolHint = localize('goToSymbolHint', 'Go to a symbol ({0}).', goToSymbolKb); } else { goToSymbolHint = localize('goToSymbolHintNoKb', 'To go to a symbol, configure a keybinding for the command Go To Symbol in Accessible View'); }"} {"_id":"doc-en-vscode-aa68ca59708b094c378528c0f2835438a9bea1d193bb034b024775962e6dc9ba","title":"","text":"// Add default items const productLabel = this.productService.nameLong; const marketPlaceLabel = localize(\"reportExtensionMarketplace\", \"Extension Marketplace\"); issuePicksConst.push( { label: productLabel, ariaLabel: productLabel, accept: () => this.commandService.executeCommand('workbench.action.openIssueReporter', { issueSource: IssueSource.VSCode }) }, { label: marketPlaceLabel, ariaLabel: marketPlaceLabel, accept: () => this.commandService.executeCommand('workbench.action.openIssueReporter', { issueSource: IssueSource.Marketplace }) }, { type: 'separator', label: localize('extensions', \"Extensions\") } ); const productFilter = matchesFuzzy(filter, productLabel, true); const marketPlaceFilter = matchesFuzzy(filter, marketPlaceLabel, true); // Add product pick if product filter matches if (productFilter) { issuePicksConst.push({ label: productLabel, ariaLabel: productLabel, highlights: { label: productFilter }, accept: () => this.commandService.executeCommand('workbench.action.openIssueReporter', { issueSource: IssueSource.VSCode }) }); } // Add marketplace pick if marketplace filter matches if (marketPlaceFilter) { issuePicksConst.push({ label: marketPlaceLabel, ariaLabel: marketPlaceLabel, highlights: { label: marketPlaceFilter }, accept: () => this.commandService.executeCommand('workbench.action.openIssueReporter', { issueSource: IssueSource.Marketplace }) }); } issuePicksConst.push({ type: 'separator', label: localize('extensions', \"Extensions\") }); // creates menu from contributed const menu = this.menuService.createMenu(MenuId.IssueReporter, this.contextKeyService);"} {"_id":"doc-en-vscode-e0d52b4df496469cca120a633e7349a3ffb182754f973349d4a6361fe9ced381","title":"","text":"return; } const contr = TerminalChatController.activeChatWidget || TerminalChatController.get(activeInstance); contr?.chatWidget?.focusResponse(); contr?.chatWidget?.inlineChatWidget.chatWidget.focusLastMessage(); } });"} {"_id":"doc-en-vscode-c5833c6d7d88b5cf3665a9f45e10da6d4027cc37a9f460bf392de197bf3c41d1","title":"","text":"focus(): void { this._inlineChatWidget.focus(); } focusResponse(): void { const responseElement = this._inlineChatWidget.domNode.querySelector(ChatElementSelectors.ResponseEditor) || this._inlineChatWidget.domNode.querySelector(ChatElementSelectors.ResponseMessage); if (responseElement instanceof HTMLElement) { responseElement.focus(); } } hasFocus(): boolean { return this._inlineChatWidget.hasFocus(); }"} {"_id":"doc-en-vscode-cd5ef6f992eaa6f242a567d86b91b7aa7e1d07665ea4919211cb81f6ccd62e42","title":"","text":"} } const enum ChatElementSelectors { ResponseEditor = '.chatMessageContent textarea', ResponseMessage = '.chatMessageContent', } "} {"_id":"doc-en-vscode-152dc9768ab59bc818d898d59aa8475657ab16943eacc30d2bccdd3b2e287a97","title":"","text":"// Import the effects we need import { Color } from 'vs/base/common/color'; import { registerColor, darken, lighten, ifDefinedThenElse, transparent } from 'vs/platform/theme/common/colorUtils'; import { registerColor, darken, lighten, transparent } from 'vs/platform/theme/common/colorUtils'; // Import the colors we need import { foreground, contrastBorder, activeContrastBorder, focusBorder, iconForeground } from 'vs/platform/theme/common/colors/baseColors';"} {"_id":"doc-en-vscode-09c85d9a9413e438c936812e6195745fdae187982ad65a69b920df6fa4474c98","title":"","text":"nls.localize('highlight', 'List/Tree foreground color of the match highlights when searching inside the list/tree.')); export const listFocusHighlightForeground = registerColor('list.focusHighlightForeground', { dark: listHighlightForeground, light: ifDefinedThenElse(listActiveSelectionBackground, listHighlightForeground, '#BBE7FF'), hcDark: listHighlightForeground, hcLight: listHighlightForeground }, { dark: listHighlightForeground, light: listHighlightForeground, hcDark: listHighlightForeground, hcLight: listHighlightForeground }, nls.localize('listFocusHighlightForeground', 'List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.')); export const listInvalidItemForeground = registerColor('list.invalidItemForeground',"} {"_id":"doc-en-vscode-9e8c122f65de67ae5af0850ca12b5b49e20b7b037ed7032d71097d505bcac0fb","title":"","text":"import { Emitter, Event } from 'vs/base/common/event'; import { DisposableStore } from 'vs/base/common/lifecycle'; import { IPosition, Position } from 'vs/editor/common/core/position'; import { clamp } from 'vs/base/common/numbers'; import { renderLabelWithIcons } from 'vs/base/browser/ui/iconLabel/iconLabels'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { inlineChatBackground } from 'vs/workbench/contrib/inlineChat/common/inlineChat';"} {"_id":"doc-en-vscode-527495b3e599b83e172b863e4b1a676b25bfddf0fe4238020cc73a20cca985d2","title":"","text":"import { Range } from 'vs/editor/common/core/range'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { EditorOption } from 'vs/editor/common/config/editorOptions'; export class InlineChatContentWidget implements IContentWidget {"} {"_id":"doc-en-vscode-4d36a54833e8e305166bd8b583374f485b48773ad4b8a3e56201fc3e41bbdcdf","title":"","text":"beforeRender(): IDimension | null { const contentWidth = this._editor.getLayoutInfo().contentWidth; const minWidth = Math.round(contentWidth * 0.38); const maxWidth = Math.round(contentWidth * 0.82); const width = clamp(220, minWidth, maxWidth); const maxHeight = this._widget.input.inputEditor.getOption(EditorOption.lineHeight) * 5; const inputEditorHeight = this._widget.inputEditor.getContentHeight(); this._widget.inputEditor.layout(new dom.Dimension(width, inputEditorHeight)); this._widget.inputEditor.layout(new dom.Dimension(360, Math.min(maxHeight, inputEditorHeight))); // const actualHeight = this._widget.inputPartHeight; // return new dom.Dimension(width, actualHeight);"} {"_id":"doc-en-vscode-cfe6fb0d125ff628441cc490e9ee8a64199d2ab1a9fe6ea662937ef9e6b7d23f","title":"","text":"display: none; } .monaco-workbench .inline-chat-content-widget.interactive-session .interactive-session { max-width: unset; } .monaco-workbench .inline-chat-content-widget.interactive-session .interactive-input-part .interactive-execute-toolbar { margin-bottom: 1px; }"} {"_id":"doc-en-vscode-31c09db20231d7c77f81acb98437e1ac75aa3f7fa365fd15fbb241731b520cb3","title":"","text":"import { Codicon } from 'vs/base/common/codicons'; import { ThemeIcon } from 'vs/base/common/themables'; import { onUnexpectedExternalError } from 'vs/base/common/errors'; import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ClickAction, KeyDownAction } from 'vs/base/browser/ui/hover/hoverWidget'; import { ClickAction, HoverPosition, KeyDownAction } from 'vs/base/browser/ui/hover/hoverWidget'; import { KeyCode } from 'vs/base/common/keyCodes'; import { IHoverService } from 'vs/platform/hover/browser/hover'; import { IHoverService, WorkbenchHoverDelegate } from 'vs/platform/hover/browser/hover'; import { AsyncIterableObject } from 'vs/base/common/async'; import { LanguageFeatureRegistry } from 'vs/editor/common/languageFeatureRegistry'; import { getHoverProviderResultsAsAsyncIterable } from 'vs/editor/contrib/hover/browser/getHover';"} {"_id":"doc-en-vscode-202c05379be24bf77ad357f8c0581156bcd76644567a176ce717c08dfbf61d18","title":"","text":"this._openerService, this._keybindingService, this._hoverService, this._configurationService, context.onContentsChanged ); return this._renderedHoverParts;"} {"_id":"doc-en-vscode-5d1625cd8c8ece55b692ec35f88f0ba7d064ae361dfd18f9b7068bcb5560d8ef","title":"","text":"private readonly _openerService: IOpenerService, private readonly _keybindingService: IKeybindingService, private readonly _hoverService: IHoverService, private readonly _configurationService: IConfigurationService, private readonly _onFinishedRendering: () => void, ) { super();"} {"_id":"doc-en-vscode-b36959b3687b7c02b130976e8f75200c967c0ebab3c9ce0d63d89a39e3253cf5","title":"","text":"const isActionIncrease = action === HoverVerbosityAction.Increase; const actionElement = dom.append(container, $(ThemeIcon.asCSSSelector(isActionIncrease ? increaseHoverVerbosityIcon : decreaseHoverVerbosityIcon))); actionElement.tabIndex = 0; const hoverDelegate = new WorkbenchHoverDelegate('mouse', false, { target: container, position: { hoverPosition: HoverPosition.LEFT } }, this._configurationService, this._hoverService); if (isActionIncrease) { const kb = this._keybindingService.lookupKeybinding(INCREASE_HOVER_VERBOSITY_ACTION_ID); store.add(this._hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), actionElement, kb ? store.add(this._hoverService.setupUpdatableHover(hoverDelegate, actionElement, kb ? nls.localize('increaseVerbosityWithKb', \"Increase Verbosity ({0})\", kb.getLabel()) : nls.localize('increaseVerbosity', \"Increase Verbosity\"))); } else { const kb = this._keybindingService.lookupKeybinding(DECREASE_HOVER_VERBOSITY_ACTION_ID); store.add(this._hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), actionElement, kb ? store.add(this._hoverService.setupUpdatableHover(hoverDelegate, actionElement, kb ? nls.localize('decreaseVerbosityWithKb', \"Decrease Verbosity ({0})\", kb.getLabel()) : nls.localize('decreaseVerbosity', \"Decrease Verbosity\"))); }"} {"_id":"doc-en-vscode-c11233c3b7dd8c4aab312314f9c3131cf1c9c5cafd70c40eca753d06034550c0","title":"","text":"comment: ['Label for action that will increase the hover verbosity level.'] }, \"Increase Hover Verbosity Level\"), alias: 'Increase Hover Verbosity Level', precondition: EditorContextKeys.hoverFocused, kbOpts: { kbExpr: EditorContextKeys.hoverFocused, primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyP), weight: KeybindingWeight.EditorContrib } precondition: EditorContextKeys.hoverFocused }); }"} {"_id":"doc-en-vscode-745f6400915ef6633982c9d54ad1233e6991ec67bad23305cb0c86e59d71b5a4","title":"","text":"comment: ['Label for action that will decrease the hover verbosity level.'] }, \"Decrease Hover Verbosity Level\"), alias: 'Decrease Hover Verbosity Level', precondition: EditorContextKeys.hoverFocused, kbOpts: { kbExpr: EditorContextKeys.hoverFocused, primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyM), weight: KeybindingWeight.EditorContrib } precondition: EditorContextKeys.hoverFocused }); }"} {"_id":"doc-en-vscode-cb56d0920fe5dfedb599bd5d513c36c38a8c274fdf41e24d0c7e526ceb147102","title":"","text":"const fullscreen = isFullscreen(this.window); return { ...state, bounds: this.maximized ? undefined : state.bounds, // ignore if maximized (fullscreen is not yet supported!) bounds: state.bounds, mode: this.maximized ? AuxiliaryWindowMode.Maximized : fullscreen ? AuxiliaryWindowMode.Fullscreen : AuxiliaryWindowMode.Normal }; }"} {"_id":"doc-en-vscode-81eefda8aaace5df75035196d329701ec65d45a4cb3493a158e0841522f46b70","title":"","text":"$completionPrefix = $commandLine # Get completions $result = \"`e]633;Completions\" $result = \"$([char]0x1b)]633;Completions\" if ($completionPrefix.Length -gt 0) { # Get and send completions $completions = TabExpansion2 -inputScript $completionPrefix -cursorColumn $cursorIndex"} {"_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-8682e210d66303fee61ac713115c9ee26354564e2688635739f869de6cbcdcc5","title":"","text":"let customEditorLabelDescription = localize('workbench.editor.label.patterns', \"Controls the rendering of the editor label. Each __Item__ is a pattern that matches a file path. Both relative and absolute file paths are supported. In case multiple patterns match, the longest matching path will be picked. Each __Value__ is the template for the rendered editor when the __Item__ matches. Variables are substituted based on the context:\"); customEditorLabelDescription += 'n- ' + [ localize('workbench.editor.label.dirname', \"`${dirname}`: name of the folder in which the file is located (e.g. `root/folder/file.txt -> folder`).\"), localize('workbench.editor.label.nthdirname', \"`${dirname(N)}`: name of the nth parent folder in which the file is located (e.g. `N=1: root/folder/file.txt -> root`).\"), localize('workbench.editor.label.nthdirname', \"`${dirname(N)}`: name of the nth parent folder in which the file is located (e.g. `N=1: root/folder/file.txt -> root`). Folders can be picked from the start of the path by using negative numbers (e.g. `N=-1: root/folder/file.txt -> root`). If the __Item__ is an absolute pattern path, the first folder (`N=-1`) refers to the first folder in the absoulte path, otherwise it corresponds to the workspace folder.\"), localize('workbench.editor.label.filename', \"`${filename}`: name of the file without the file extension (e.g. `root/folder/file.txt -> file`).\"), localize('workbench.editor.label.extname', \"`${extname}`: the file extension (e.g. `root/folder/file.txt -> txt`).\"), ].join('n- '); // intentionally concatenated to not produce a string that is too long for translations"} {"_id":"doc-en-vscode-0154b6ae531ca6fdcccd9949562c2cabb716c7363aa2225fa338be8dc6947877","title":"","text":"import { MainThreadTunnelServiceShape, MainContext, ExtHostContext, ExtHostTunnelServiceShape, CandidatePortSource, PortAttributesSelector, TunnelDto } from 'vs/workbench/api/common/extHost.protocol'; import { TunnelDtoConverter } from 'vs/workbench/api/common/extHostTunnelService'; import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers'; import { IRemoteExplorerService, PORT_AUTO_FORWARD_SETTING, PORT_AUTO_SOURCE_SETTING, PORT_AUTO_SOURCE_SETTING_OUTPUT } from 'vs/workbench/services/remote/common/remoteExplorerService'; import { IRemoteExplorerService, PORT_AUTO_FORWARD_SETTING, PORT_AUTO_SOURCE_SETTING, PORT_AUTO_SOURCE_SETTING_HYBRID, PORT_AUTO_SOURCE_SETTING_OUTPUT } from 'vs/workbench/services/remote/common/remoteExplorerService'; import { ITunnelProvider, ITunnelService, TunnelCreationOptions, TunnelProviderFeatures, TunnelOptions, RemoteTunnel, ProvidedPortAttributes, PortAttributesProvider, TunnelProtocol } from 'vs/platform/tunnel/common/tunnel'; import { Disposable } from 'vs/base/common/lifecycle'; import type { TunnelDescription } from 'vs/platform/remote/common/remoteAuthorityResolver';"} {"_id":"doc-en-vscode-d4940ff8a9f293e6d556c08e88c609ecdd0ad9304da5fe5e910cb5b5b4ca7123","title":"","text":".registerDefaultConfigurations([{ overrides: { 'remote.autoForwardPortsSource': PORT_AUTO_SOURCE_SETTING_OUTPUT } }]); break; } case CandidatePortSource.Hybrid: { Registry.as(ConfigurationExtensions.Configuration) .registerDefaultConfigurations([{ overrides: { 'remote.autoForwardPortsSource': PORT_AUTO_SOURCE_SETTING_HYBRID } }]); break; } default: // Do nothing, the defaults for these settings should be used. } }).catch(() => {"} {"_id":"doc-en-vscode-6520aee1c642ba7860041e15fe507de0686024c94866b8d20903335d739dce3f","title":"","text":"export enum CandidatePortSource { None = 0, Process = 1, Output = 2 Output = 2, Hybrid = 3 } export interface PortAttributesSelector {"} {"_id":"doc-en-vscode-528a21ad11cf2a937b2f27f46d150d87a760c79d64bc5b036854eb78429ed037","title":"","text":"export enum CandidatePortSource { None = 0, Process = 1, Output = 2 Output = 2, Hybrid = 3 } export type ResolverResult = (ResolvedAuthority | ManagedResolvedAuthority) & ResolvedOptions & TunnelInformation;"} {"_id":"doc-en-vscode-66fb7e59b8e59c5407fc9f8867ca0808bbce385aaca277ea9240561a63fd1714","title":"","text":"} private toSymbolInformation(item: Proto.NavtoItem): vscode.SymbolInformation | undefined { if (!item.containerName || item.kind === 'alias') { if (item.kind === 'alias' && !item.containerName) { return; }"} {"_id":"doc-en-vscode-8b4292944fab3b7d5666ed78c66b76ffd60321b405fe732ca207dccb334ba23d","title":"","text":"\"--vscode-editorStickyScroll-scrollableWidth\", \"--vscode-editorStickyScroll-foldingOpacityTransition\", \"--window-border-color\", \"--vscode-parameterHintsWidget-editorFontFamily\", \"--vscode-parameterHintsWidget-editorFontFamilyDefault\", \"--workspace-trust-check-color\", \"--workspace-trust-selected-color\", \"--workspace-trust-unselected-color\","} {"_id":"doc-en-vscode-f7eef1aaa71038b26e6df21d4084a51f62571cb3940617d338b03e1438588a92","title":"","text":"border-bottom: 1px solid var(--vscode-editorHoverWidget-border); } .monaco-editor .parameter-hints-widget .code { font-family: var(--vscode-parameterHintsWidget-editorFontFamily), var(--vscode-parameterHintsWidget-editorFontFamilyDefault); } .monaco-editor .parameter-hints-widget .docs { padding: 0 10px 0 5px; white-space: pre-wrap;"} {"_id":"doc-en-vscode-36274fdfa3a2c10ba7918a20c584c09c496607c7e8f66dbf9dba58a480057d81","title":"","text":"import { assertIsDefined } from 'vs/base/common/types'; import 'vs/css!./parameterHints'; import { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentWidgetPosition } from 'vs/editor/browser/editorBrowser'; import { EditorOption } from 'vs/editor/common/config/editorOptions'; import { EDITOR_FONT_DEFAULTS, EditorOption } from 'vs/editor/common/config/editorOptions'; import * as languages from 'vs/editor/common/languages'; import { ILanguageService } from 'vs/editor/common/languages/language'; import { IMarkdownRenderResult, MarkdownRenderer } from 'vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer';"} {"_id":"doc-en-vscode-5e1e865d622bd3fd8019a1ea03b926e3e8bb40af66d69db70cc3716f490fcbcd","title":"","text":"if (!this.domNodes) { return; } const fontInfo = this.editor.getOption(EditorOption.fontInfo); this.domNodes.element.style.fontSize = `${fontInfo.fontSize}px`; this.domNodes.element.style.lineHeight = `${fontInfo.lineHeight / fontInfo.fontSize}`; const element = this.domNodes.element; element.style.fontSize = `${fontInfo.fontSize}px`; element.style.lineHeight = `${fontInfo.lineHeight / fontInfo.fontSize}`; element.style.setProperty('--vscode-parameterHintsWidget-editorFontFamily', fontInfo.fontFamily); element.style.setProperty('--vscode-parameterHintsWidget-editorFontFamilyDefault', EDITOR_FONT_DEFAULTS.fontFamily); }; updateFont();"} {"_id":"doc-en-vscode-2237ed03c16995bd666d2f3670f112cea7ce58e59eec0d1a6dfd63b14ce8aed0","title":"","text":"} const code = dom.append(this.domNodes.signature, $('.code')); const fontInfo = this.editor.getOption(EditorOption.fontInfo); code.style.fontSize = `${fontInfo.fontSize}px`; code.style.fontFamily = fontInfo.fontFamily; const hasParameters = signature.parameters.length > 0; const activeParameterIndex = signature.activeParameter ?? hints.activeParameter;"} {"_id":"doc-en-vscode-aa2ec2755c1ecbda6d06e0c528ba2575d3315ebdc5fe4edba302d85f2427ac2c","title":"","text":"function Global:__VSCode-Escape-Value([string]$value) { # NOTE: In PowerShell v6.1+, this can be written `$value -replace '…', { … }` instead of `[regex]::Replace`. # Replace any non-alphanumeric characters. [regex]::Replace($value, \"[$([char]0x1b)n;]\", { param($match) [regex]::Replace($value, \"[$([char]0x00)-$([char]0x1f)n;]\", { param($match) # Encode the (ascii) matches as `x` -Join ( [System.Text.Encoding]::UTF8.GetBytes($match.Value) | ForEach-Object { 'x{0:x2}' -f $_ }"} {"_id":"doc-en-vscode-28feaa5f2856eb735efa88c094d8a6cc318fc72a1ff277d3e9dac637090f33b7","title":"","text":"this._scanDevelopedExtensions(language, extensionDevelopmentPath) ]); return dedupExtensions(builtinExtensions, [...installedExtensions, ...workspaceInstalledExtensions], developedExtensions, this._logService); return dedupExtensions(builtinExtensions, installedExtensions, workspaceInstalledExtensions, developedExtensions, this._logService); } private async _scanDevelopedExtensions(language: string, extensionDevelopmentPaths?: string[]): Promise {"} {"_id":"doc-en-vscode-bdf662e9828d41f212b53d8f2d8466fe81749e21dda6fadbb2e6775565e7ee4e","title":"","text":"all.push(...await this.workbenchExtensionManagementService.getInstalledWorkspaceExtensions(true)); } // dedup user and system extensions by giving priority to user extensions. // dedup workspace, user and system extensions by giving priority to workspace first and then to user extension. const installed = groupByExtension(all, r => r.identifier).reduce((result, extensions) => { const extension = extensions.length === 1 ? extensions[0] : extensions.find(e => e.type === ExtensionType.User) || extensions.find(e => e.type === ExtensionType.System); result.push(extension!); if (extensions.length === 1) { result.push(extensions[0]); } else { let workspaceExtension: ILocalExtension | undefined, userExtension: ILocalExtension | undefined, systemExtension: ILocalExtension | undefined; for (const extension of extensions) { if (extension.isWorkspaceScoped) { workspaceExtension = extension; } else if (extension.type === ExtensionType.User) { userExtension = extension; } else { systemExtension = extension; } } const extension = workspaceExtension ?? userExtension ?? systemExtension; if (extension) { result.push(extension); } } return result; }, []);"} {"_id":"doc-en-vscode-5f97b3168f93ddb309042b9e27e25b2d729193c445576b9f657c1e852ee5ec81","title":"","text":"if (isUninstalled) { const canRemoveRunningExtension = runningExtension && this.extensionService.canRemoveExtension(runningExtension); const isSameExtensionRunning = runningExtension && (!extension.server || extension.server === this.extensionManagementServerService.getExtensionManagementServer(toExtension(runningExtension))); const isSameExtensionRunning = runningExtension && (!extension.server || extension.server === this.extensionManagementServerService.getExtensionManagementServer(toExtension(runningExtension))) && (!extension.resourceExtension || this.uriIdentityService.extUri.isEqual(extension.resourceExtension.location, runningExtension.extensionLocation)); if (!canRemoveRunningExtension && isSameExtensionRunning && !runningExtension.isUnderDevelopment) { return { action: reloadAction, reason: nls.localize('postUninstallTooltip', \"Please {0} to complete the uninstallation of this extension.\", reloadActionLabel) }; }"} {"_id":"doc-en-vscode-70e0baa0cc2b081e10c3d12dca206f57f8727df73c940ba7984bf74aecbf86d4","title":"","text":"} catch (error) { this._logService.error(error); } return dedupExtensions(system, user, development, this._logService); return dedupExtensions(system, user, [], development, this._logService); } protected async _resolveExtensionsDefault() {"} {"_id":"doc-en-vscode-48161b0a87db917879e03853a23466f6f0b6fabca4c44d6cf76b4ecaa6fd7a1d","title":"","text":"import * as semver from 'vs/base/common/semver/semver'; // TODO: @sandy081 merge this with deduping in extensionsScannerService.ts export function dedupExtensions(system: IExtensionDescription[], user: IExtensionDescription[], development: IExtensionDescription[], logService: ILogService): IExtensionDescription[] { export function dedupExtensions(system: IExtensionDescription[], user: IExtensionDescription[], workspace: IExtensionDescription[], development: IExtensionDescription[], logService: ILogService): IExtensionDescription[] { const result = new ExtensionIdentifierMap(); system.forEach((systemExtension) => { const extension = result.get(systemExtension.identifier);"} {"_id":"doc-en-vscode-a98268eddac17eaa891719ab04a17e23b89dd7fde69aa04218278f30213f06b0","title":"","text":"} result.set(userExtension.identifier, userExtension); }); workspace.forEach(workspaceExtension => { const extension = result.get(workspaceExtension.identifier); if (extension) { logService.warn(localize('overwritingWithWorkspaceExtension', \"Overwriting {0} with Workspace Extension {1}.\", extension.extensionLocation.fsPath, workspaceExtension.extensionLocation.fsPath)); } result.set(workspaceExtension.identifier, workspaceExtension); }); development.forEach(developedExtension => { logService.info(localize('extensionUnderDevelopment', \"Loading development extension at {0}\", developedExtension.extensionLocation.fsPath)); const extension = result.get(developedExtension.identifier);"} {"_id":"doc-en-vscode-acf691024cf6f98c45d8bf765b19333389ce511cca6772b89425e1c683eba412","title":"","text":"} const system = scannedSystemExtensions.map(e => toExtensionDescriptionFromScannedExtension(e, false)); const userGlobal = scannedUserExtensions.map(e => toExtensionDescriptionFromScannedExtension(e, false)); const userWorkspace = workspaceExtensions.map(e => toExtensionDescription(e, false)); const user = scannedUserExtensions.map(e => toExtensionDescriptionFromScannedExtension(e, false)); const workspace = workspaceExtensions.map(e => toExtensionDescription(e, false)); const development = scannedDevelopedExtensions.map(e => toExtensionDescriptionFromScannedExtension(e, true)); const r = dedupExtensions(system, [...userGlobal, ...userWorkspace], development, this._logService); const r = dedupExtensions(system, user, workspace, development, this._logService); if (!hasErrors) { const disposable = this._extensionsScannerService.onDidChangeCache(() => {"} {"_id":"doc-en-vscode-a31f2fa3cf2b3db7db98846e62bb2b5df16730c2d3e798d23e9634248f247a00","title":"","text":"class MenuInfoSnapshot { protected _menuGroups: MenuItemGroup[] = []; private _allMenuIds: Set = new Set(); private _structureContextKeys: Set = new Set(); private _preconditionContextKeys: Set = new Set(); private _toggledContextKeys: Set = new Set();"} {"_id":"doc-en-vscode-67d295337ae555ba352881fcd00949dfd3ff3d7ddbca56a3f34c656f86db6af5","title":"","text":"protected readonly _collectContextKeysForSubmenus: boolean, ) { this.refresh(); this._allMenuIds.add(_id); } get allMenuIds(): ReadonlySet { return this._allMenuIds; } get structureContextKeys(): ReadonlySet {"} {"_id":"doc-en-vscode-6e4d86950ba79cafd097e23284108cac1cb22869843ad3dfb5bab75d3e663aaa","title":"","text":"// reset this._menuGroups.length = 0; this._allMenuIds.clear(); this._structureContextKeys.clear(); this._preconditionContextKeys.clear(); this._toggledContextKeys.clear();"} {"_id":"doc-en-vscode-f8010690adbc8b754ccf78afa75295f30e26757836d383ef57d1e36bd7a15f1e","title":"","text":"} group[1].push(item); // keep keys for eventing this._collectContextKeys(item); // keep keys and submenu ids for eventing this._collectContextKeysAndSubmenuIds(item); } }"} {"_id":"doc-en-vscode-8b56a7c98a3fab0ed4750a1830ffd087957e2c4db6717965037ffdef6f03f0dc","title":"","text":"return menuItems; } private _collectContextKeys(item: IMenuItem | ISubmenuItem): void { private _collectContextKeysAndSubmenuIds(item: IMenuItem | ISubmenuItem): void { MenuInfoSnapshot._fillInKbExprKeys(item.when, this._structureContextKeys);"} {"_id":"doc-en-vscode-e92b8b8fd92187d8f37a1a70681667523f6dfcb874f3de6f1791f489e699fbc3","title":"","text":"} else if (this._collectContextKeysForSubmenus) { // recursively collect context keys from submenus so that this // menu fires events when context key changes affect submenus MenuRegistry.getMenuItems(item.submenu).forEach(this._collectContextKeys, this); MenuRegistry.getMenuItems(item.submenu).forEach(this._collectContextKeysAndSubmenuIds, this); this._allMenuIds.add(item.submenu); } }"} {"_id":"doc-en-vscode-474a87df4f57e30c6b0e0cc842e99ac6fa27da4e3a61922999d7e4a539e7a95d","title":"","text":"}, options.eventDebounceDelay); this._disposables.add(rebuildMenuSoon); this._disposables.add(MenuRegistry.onDidChangeMenu(e => { if (e.has(id)) { rebuildMenuSoon.schedule(); for (const id of this._menuInfo.allMenuIds) { if (e.has(id)) { rebuildMenuSoon.schedule(); break; } } }));"} {"_id":"doc-en-vscode-0e1fbccbbed5c2bc8308c3401492e24a28962613128d16a61f360e90c88d6ca0","title":"","text":"\"sourceMap\": false, \"allowJs\": true, \"resolveJsonModule\": true, \"isolatedModules\": true, \"outDir\": \"../out/vs\", \"types\": [ \"mocha\","} {"_id":"doc-en-vscode-1a1597c0e488bc64b22baec800e8820dc035819ec0b1f12619651dc1e5216708","title":"","text":"* Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ declare const enum LoaderEventType { declare enum LoaderEventType { LoaderAvailable = 1, BeginLoadingScript = 10,"} {"_id":"doc-en-vscode-ea8462f4958143dcf5e0b29a435e32d0fb6b31d834337c0f7e9440e2d6d5f77f","title":"","text":"import { CommandOptions, ForkOptions, Source, SuccessData, TerminateResponse, TerminateResponseCode } from 'vs/base/common/processes'; import * as Types from 'vs/base/common/types'; import * as pfs from 'vs/base/node/pfs'; export { CommandOptions, ForkOptions, SuccessData, Source, TerminateResponse, TerminateResponseCode }; export { type CommandOptions, type ForkOptions, type SuccessData, Source, type TerminateResponse, TerminateResponseCode }; export type ValueCallback = (value: T | Promise) => void; export type ErrorCallback = (error?: any) => void;"} {"_id":"doc-en-vscode-8b39f324b6bdada3b1d4e7b1e932f7b4bada18cb856215108786c718b0e6e89c","title":"","text":"import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; import { workbenchConfigurationNodeBase, Extensions as WorkbenchExtensions, IConfigurationMigrationRegistry, ConfigurationKeyValuePairs, ConfigurationMigration } from 'vs/workbench/common/configuration'; import { AccessibilitySignal } from 'vs/platform/accessibilitySignal/browser/accessibilitySignalService'; import { ISpeechService, SPEECH_LANGUAGES, SPEECH_LANGUAGE_CONFIG } from 'vs/workbench/contrib/speech/common/speechService'; import { AccessibilityVoiceSettingId, ISpeechService, SPEECH_LANGUAGES } 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-928ce03302356416ab96e43dc94a0103e228974de628bc45846a8b1c6d0b609e","title":"","text":"}); } export const enum AccessibilityVoiceSettingId { SpeechTimeout = 'accessibility.voice.speechTimeout', AutoSynthesize = 'accessibility.voice.autoSynthesize', SpeechLanguage = SPEECH_LANGUAGE_CONFIG } export { AccessibilityVoiceSettingId } export const SpeechTimeoutDefault = 1200; export class DynamicSpeechAccessibilityConfiguration extends Disposable implements IWorkbenchContribution {"} {"_id":"doc-en-vscode-35f2e170c22fa40ffe1282f62e8b8746da2e74299e15b87b807ece674be840e3","title":"","text":"export const INLINE_CHAT_ID = 'interactiveEditor'; export const INTERACTIVE_EDITOR_ACCESSIBILITY_HELP_ID = 'interactiveEditorAccessiblityHelp'; export const enum EditMode { Live = 'live', Preview = 'preview' } export const CTX_INLINE_CHAT_HAS_PROVIDER = new RawContextKey('inlineChatHasProvider', false, localize('inlineChatHasProvider', \"Whether a provider for interactive editors exists\")); export const CTX_INLINE_CHAT_VISIBLE = new RawContextKey('inlineChatVisible', false, localize('inlineChatVisible', \"Whether the interactive editor input is visible\")); export const CTX_INLINE_CHAT_FOCUSED = new RawContextKey('inlineChatFocused', false, localize('inlineChatFocused', \"Whether the interactive editor input is focused\"));"} {"_id":"doc-en-vscode-333a5b7c87789154a9e139312c6770ed03f5058b1cbb29708047127ceb123a48","title":"","text":"// settings export const enum EditMode { Live = 'live', Preview = 'preview' } Registry.as(ExtensionsMigration.ConfigurationMigration).registerConfigurationMigrations( [{"} {"_id":"doc-en-vscode-76e34a586d1d061f3333629985570a5cb1d7393f96be88f12406c5c4e9c3fe81","title":"","text":"recognizeKeyword(token: CancellationToken): Promise; } export const SPEECH_LANGUAGE_CONFIG = 'accessibility.voice.speechLanguage'; export const enum AccessibilityVoiceSettingId { SpeechTimeout = 'accessibility.voice.speechTimeout', AutoSynthesize = 'accessibility.voice.autoSynthesize', SpeechLanguage = 'accessibility.voice.speechLanguage', } export const SPEECH_LANGUAGE_CONFIG = AccessibilityVoiceSettingId.SpeechLanguage; export const SPEECH_LANGUAGES = { ['da-DK']: {"} {"_id":"doc-en-vscode-29afb8326ecf402e257d02a8263465be8d33b4a1e1372365af46521098dedd8f","title":"","text":"import { IStringDictionary } from 'vs/base/common/collections'; import { RawContextKey, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; export { ITaskSummary, Task, ITaskTerminateResponse as TaskTerminateResponse }; export type { ITaskSummary, Task, ITaskTerminateResponse as TaskTerminateResponse }; export const CustomExecutionSupportedContext = new RawContextKey('customExecutionSupported', false, nls.localize('tasks.customExecutionSupported', \"Whether CustomExecution tasks are supported. Consider using in the when clause of a 'taskDefinition' contribution.\")); export const ShellExecutionSupportedContext = new RawContextKey('shellExecutionSupported', false, nls.localize('tasks.shellExecutionSupported', \"Whether ShellExecution tasks are supported. Consider using in the when clause of a 'taskDefinition' contribution.\"));"} {"_id":"doc-en-vscode-66f749b1f88b34bed7415dc42f4d4301ed8882e528169ff6bc5e8e39d4bd0810","title":"","text":"} .interactive-session .chat-attached-context { padding: 8px 8px 13px; margin-right: -3px; margin-top: 4px; margin-bottom: -4px; border: 1px solid var(--vscode-input-border, var(--vscode-input-background, transparent)); border-radius: 6px 6px 0px 0px; padding: 8px 0; border-radius: 6px; display: flex; gap: 4px; flex-wrap: wrap; } .interactive-session .chat-attached-context .chat-attached-context-attachment { padding: 3px; border: 1px solid var(--vscode-input-border, var(--vscode-input-background, transparent)); padding: 2px; border: 1px solid var(--vscode-chat-requestBorder, var(--vscode-input-background, transparent)); border-radius: 5px; height: 20px; height: 18px; } .interactive-session-followups {"} {"_id":"doc-en-vscode-b87fb3a86ffb2d3af3a94eb01aab0ec0d68cd7e59dedab9370f3018079879dd3","title":"","text":"switch (state) { case VoiceChatSessionState.GettingReady: contextVoiceChatGettingReady.set(true); contextVoiceChatInProgress.set(undefined); contextVoiceChatInProgress.reset(); break; case VoiceChatSessionState.Started: contextVoiceChatGettingReady.set(false); contextVoiceChatGettingReady.reset(); contextVoiceChatInProgress.set(context); break; case VoiceChatSessionState.Stopped: contextVoiceChatGettingReady.set(false); contextVoiceChatInProgress.set(undefined); contextVoiceChatGettingReady.reset(); contextVoiceChatInProgress.reset(); break; } };"} {"_id":"doc-en-vscode-79a786d2d20c6785a96d6ae069f228a3da9687a2600187df6f4bb6a9aab60cbf","title":"","text":"f1: true, keybinding: { weight: KeybindingWeight.WorkbenchContrib + 100, primary: KeyCode.Escape primary: KeyCode.Escape, when: AnyScopedVoiceChatInProgress }, icon: spinningLoading, precondition: GlobalVoiceChatInProgress, // need global context here because of `f1: true`"} {"_id":"doc-en-vscode-8f56d0edb476c91473cbe2c8a6e4785ece6a535f8bed70c4e9676a18d9b2a89c","title":"","text":"disposables.add(controller.onDidHideChat(() => this.stop())); const scopedChatToSpeechInProgress = ScopedChatSynthesisInProgress.bindTo(controller.contextKeyService); disposables.add(toDisposable(() => scopedChatToSpeechInProgress.set(false))); disposables.add(toDisposable(() => scopedChatToSpeechInProgress.reset())); disposables.add(session.onDidChange(e => { switch (e.status) {"} {"_id":"doc-en-vscode-ff110e805419c2bac0d55375bb15969f55d7ec84892de12798be71bab8fa7622","title":"","text":"scopedChatToSpeechInProgress.set(true); break; case TextToSpeechStatus.Stopped: scopedChatToSpeechInProgress.set(false); scopedChatToSpeechInProgress.reset(); break; } }));"} {"_id":"doc-en-vscode-e498145a17b09023bfd29450e5766175b5294d0f637504cac414e20555c277e3","title":"","text":"keybinding: { weight: KeybindingWeight.WorkbenchContrib + 100, primary: KeyCode.Escape, when: ScopedChatSynthesisInProgress }, menu: [ {"} {"_id":"doc-en-vscode-ec9913e937cd11d1a6ffafc08f082208e80c286be798fa4b1b484a4dbf35d1af","title":"","text":"enable: true }, ProgressLocation.Notification); } finally { InstallingSpeechProvider.bindTo(contextKeyService).set(false); InstallingSpeechProvider.bindTo(contextKeyService).reset(); } }"} {"_id":"doc-en-vscode-b809ac73a59be249a65afe19e6b08e1c0919f328b3a2f0e95e761954174a7ff2","title":"","text":"import { AccessibleViewType, AdvancedContentProvider, ExtensionContentProvider } from 'vs/platform/accessibility/browser/accessibleView'; import { ContextKeyExpression } from 'vs/platform/contextkey/common/contextkey'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { alert } from 'vs/base/browser/ui/aria/aria'; export interface IAccessibleViewImplentation { type: AccessibleViewType;"} {"_id":"doc-en-vscode-157749104a20fcdfdd6d884c642c63b1fb0d932c08bf0576ecb6b12ebf3f9f20","title":"","text":"inBlock = true; startLine = i + 1; languageId = line.substring(3).trim(); } else if (inBlock && line.startsWith('```')) { } else if (inBlock && line.endsWith('```')) { inBlock = false; const endLine = i; const code = lines.slice(startLine, endLine).join('n');"} {"_id":"doc-en-vscode-76a3f93864d264f62ba649e59518fa72087ca6ccab24561ff817c01cf4e29288","title":"","text":"menu: { ...accessibleViewMenu, when: ContextKeyExpr.and(accessibleViewIsShown, accessibleViewSupportsNavigation), when: ContextKeyExpr.and(accessibleViewIsShown, accessibleViewContainsCodeBlocks), }, title: localize('editor.action.accessibleViewNextCodeBlock', \"Accessible View: Next Code Block\") });"} {"_id":"doc-en-vscode-009d58127a12e830fb1a7a1f7198c0c1a79807faebc6713e93265ea09f2c7763","title":"","text":"icon: Codicon.arrowLeft, menu: { ...accessibleViewMenu, when: ContextKeyExpr.and(accessibleViewIsShown, accessibleViewSupportsNavigation), when: ContextKeyExpr.and(accessibleViewIsShown, accessibleViewContainsCodeBlocks), }, title: localize('editor.action.accessibleViewPreviousCodeBlock', \"Accessible View: Previous Code Block\") });"} {"_id":"doc-en-vscode-1d83358d0b080a38ba63ee9d84879c3e9b1a19888bb025a74e4feacfd215606c","title":"","text":"*--------------------------------------------------------------------------------------------*/ import * as DOM from '../../../../../../base/browser/dom.js'; import { ICellViewModel } from '../../notebookBrowser.js'; import { ICellViewModel, INotebookEditorDelegate } from '../../notebookBrowser.js'; import { CellContentPart } from '../cellPart.js'; export class CellDecorations extends CellContentPart { constructor( readonly notebookEditor: INotebookEditorDelegate, readonly rootContainer: HTMLElement, readonly decorationContainer: HTMLElement, ) {"} {"_id":"doc-en-vscode-c86e577376cff81681a88835ab2a5813c0090604df83c6d3efa4a420c2c9ecf5","title":"","text":"})); generateCellTopDecorations(); this.registerDecorations(); } private registerDecorations() { if (!this.currentCell) { return; } this.cellDisposables.add(this.currentCell.onCellDecorationsChanged((e) => { e.added.forEach(options => { if (options.className && this.currentCell) { this.rootContainer.classList.add(options.className); this.notebookEditor.deltaCellContainerClassNames(this.currentCell.id, [options.className], []); } if (options.outputClassName && this.currentCell) { this.notebookEditor.deltaCellContainerClassNames(this.currentCell.id, [options.outputClassName], []); } }); e.removed.forEach(options => { if (options.className && this.currentCell) { this.rootContainer.classList.remove(options.className); this.notebookEditor.deltaCellContainerClassNames(this.currentCell.id, [], [options.className]); } if (options.outputClassName && this.currentCell) { this.notebookEditor.deltaCellContainerClassNames(this.currentCell.id, [], [options.outputClassName]); } }); })); this.currentCell.getCellDecorations().forEach(options => { if (options.className && this.currentCell) { this.rootContainer.classList.add(options.className); this.notebookEditor.deltaCellContainerClassNames(this.currentCell.id, [options.className], []); } if (options.outputClassName && this.currentCell) { this.notebookEditor.deltaCellContainerClassNames(this.currentCell.id, [options.outputClassName], []); } }); } }"} {"_id":"doc-en-vscode-2b3a6412859ba0cab4a4c0f4d43c60d1591577d6e5166724755e1705d95396a6","title":"","text":"this.registerNotebookEditorListeners(); this.registerViewCellLayoutChange(); this.registerCellEditorEventListeners(); this.registerDecorations(); this.registerMouseListener(); this._register(Event.any(this.viewCell.onDidStartExecution, this.viewCell.onDidStopExecution)((e) => {"} {"_id":"doc-en-vscode-c13498a07887955c6ab8f123d7f104a890f9e96924480240bf6f74df46760bc6","title":"","text":"})); } private registerDecorations() { // Apply decorations this._register(this.viewCell.onCellDecorationsChanged((e) => { e.added.forEach(options => { if (options.className) { this.templateData.rootContainer.classList.add(options.className); } if (options.outputClassName) { this.notebookEditor.deltaCellContainerClassNames(this.viewCell.id, [options.outputClassName], []); } }); e.removed.forEach(options => { if (options.className) { this.templateData.rootContainer.classList.remove(options.className); } if (options.outputClassName) { this.notebookEditor.deltaCellContainerClassNames(this.viewCell.id, [], [options.outputClassName]); } }); })); this.viewCell.getCellDecorations().forEach(options => { if (options.className) { this.templateData.rootContainer.classList.add(options.className); } if (options.outputClassName) { this.notebookEditor.deltaCellContainerClassNames(this.viewCell.id, [options.outputClassName], []); } }); } private registerMouseListener() { this._register(this.templateData.editor.onMouseDown(e => { // prevent default on right mouse click, otherwise it will trigger unexpected focus changes"} {"_id":"doc-en-vscode-2563176b73a975a00629fa9e545b8c280480a1bb655d15412f4366110ba7ee21","title":"","text":"this.relayoutCell(); } this.applyDecorations(); this.viewUpdate(); this.layoutCellParts();"} {"_id":"doc-en-vscode-72e9d26e6ea0a0567e728b8f5893f54025f2168320a0751065b08c66a44e07bc","title":"","text":"this.templateData.container.classList.toggle('cell-editor-focus', this.viewCell.focusMode === CellFocusMode.Editor); } private applyDecorations() { // apply decorations this._register(this.viewCell.onCellDecorationsChanged((e) => { e.added.forEach(options => { if (options.className) { this.notebookEditor.deltaCellContainerClassNames(this.viewCell.id, [options.className], []); this.templateData.rootContainer.classList.add(options.className); } }); e.removed.forEach(options => { if (options.className) { this.notebookEditor.deltaCellContainerClassNames(this.viewCell.id, [], [options.className]); this.templateData.rootContainer.classList.remove(options.className); } }); })); this.viewCell.getCellDecorations().forEach(options => { if (options.className) { this.notebookEditor.deltaCellContainerClassNames(this.viewCell.id, [options.className], []); this.templateData.rootContainer.classList.add(options.className); } }); } override dispose() { this._isDisposed = true;"} {"_id":"doc-en-vscode-a1864a60b2b4fe7958fce7054d6b74ab393a14a30b5cc5e34f488d3c07870d78","title":"","text":"templateDisposables.add(scopedInstaService.createInstance(CellEditorStatusBar, this.notebookEditor, container, editorPart, undefined)), templateDisposables.add(new CellFocusIndicator(this.notebookEditor, titleToolbar, focusIndicatorTop, focusIndicatorLeft, focusIndicatorRight, focusIndicatorBottom)), templateDisposables.add(new FoldedCellHint(this.notebookEditor, DOM.append(container, $('.notebook-folded-hint')), this._notebookExecutionStateService)), templateDisposables.add(new CellDecorations(rootContainer, decorationContainer)), templateDisposables.add(new CellDecorations(this.notebookEditor, rootContainer, decorationContainer)), templateDisposables.add(scopedInstaService.createInstance(CellComments, this.notebookEditor, cellCommentPartContainer)), templateDisposables.add(new CollapsedCellInput(this.notebookEditor, cellInputCollapsedContainer)), templateDisposables.add(new CellFocusPart(container, undefined, this.notebookEditor)),"} {"_id":"doc-en-vscode-578919f250d27bca6612c92d3ef004935f3097fb411c32f5f3e4074165d6bc91","title":"","text":"templateDisposables.add(scopedInstaService.createInstance(CellChatPart, this.notebookEditor, cellChatPart)), templateDisposables.add(scopedInstaService.createInstance(CellEditorStatusBar, this.notebookEditor, container, editorPart, editor)), templateDisposables.add(scopedInstaService.createInstance(CellProgressBar, editorPart, cellInputCollapsedContainer)), templateDisposables.add(new CellDecorations(rootContainer, decorationContainer)), templateDisposables.add(new CellDecorations(this.notebookEditor, rootContainer, decorationContainer)), templateDisposables.add(scopedInstaService.createInstance(CellComments, this.notebookEditor, cellCommentPartContainer)), templateDisposables.add(scopedInstaService.createInstance(CellExecutionPart, this.notebookEditor, executionOrderLabel)), templateDisposables.add(scopedInstaService.createInstance(CollapsedCellOutput, this.notebookEditor, cellOutputCollapsedContainer)),"} {"_id":"doc-en-vscode-e0f740a8821da58a80fe6a38b334bb6d490f0f62e7f16b2c5a63271dfac3dfc0","title":"","text":"public visible: boolean = false; constructor( readonly id: string, readonly name: string, readonly id: string, readonly name: string, readonly resource: URI, protected readonly logger: ILogger, protected readonly proxy: MainThreadOutputServiceShape, readonly extension: IExtensionDescription,"} {"_id":"doc-en-vscode-97357e6470df583fdf40c8b2d849cfdc87e3ee70847e6ae6890b8a128a4f5a1e","title":"","text":"const file = this.extHostFileSystemInfo.extUri.joinPath(outputDir, `${this.namePool++}-${name.replace(/[/:*?\"<>|]/g, '')}.log`); const logger = this.loggerService.createLogger(file, { logLevel: 'always', donotRotate: true, donotUseFormatters: true, hidden: true }); const id = await this.proxy.$register(name, file, languageId, extension.identifier.value); return new ExtHostOutputChannel(id, name, logger, this.proxy, extension); return new ExtHostOutputChannel(id, name, file, logger, this.proxy, extension); } private async doCreateLogOutputChannel(name: string, logLevel: LogLevel | undefined, extension: IExtensionDescription): Promise {"} {"_id":"doc-en-vscode-a51e142b15659505bddfee89397d0d1abd0b1c57c597ddcb78e72e3f1a3b7bb6","title":"","text":"const file = this.extHostFileSystemInfo.extUri.joinPath(extensionLogDir, `${fileName}.log`); const id = `${extension.identifier.value}.${fileName}`; const logger = this.loggerService.createLogger(file, { id, name, logLevel, extensionId: extension.identifier.value }); return new ExtHostLogOutputChannel(id, name, logger, this.proxy, extension); return new ExtHostLogOutputChannel(id, name, file, logger, this.proxy, extension); } private createExtensionLogDirectory(extension: IExtensionDescription): Thenable {"} {"_id":"doc-en-vscode-b550008d1ef75f694ad3e5f65175fa942233a7ed0de3af16b4ccfd98bd186314","title":"","text":"throw new Error('Channel has been closed'); } }; const that = this; return { get name(): string { return name; }, append(value: string): void {"} {"_id":"doc-en-vscode-33938a84456817fe32ef4db47cff92c7b9d8f0961bc07898629a1e572af0075a","title":"","text":"}, dispose(): void { disposed = true; channelPromise.then(channel => channel.dispose()); channelPromise.then(channel => { that.channels.delete(channel.id); that.loggerService.deregisterLogger(channel.resource); channel.dispose(); }); } }; }"} {"_id":"doc-en-vscode-3a93c58d878aa97c414ffc509cf77d0b7bea550a74655cebdcf0291c3db46504","title":"","text":"onDidChangeLogLevel.fire(newLogLevel); } channelPromise.then(channel => { disposables.add(channel); if (channel.logLevel !== logLevel) { setLogLevel(channel.logLevel); } disposables.add(channel.onDidChangeLogLevel(e => setLogLevel(e))); }); const outputChannel = this.createExtHostOutputChannel(name, channelPromise); return { ...this.createExtHostOutputChannel(name, channelPromise), ...outputChannel, get logLevel() { return logLevel; }, onDidChangeLogLevel: onDidChangeLogLevel.event, trace(value: string, ...args: any[]): void {"} {"_id":"doc-en-vscode-870f284209f04d9f102d291df0b0dd2d00e25f32a3624a205ab16a7dd2d44c7c","title":"","text":"}, dispose(): void { disposables.dispose(); outputChannel.dispose(); } }; }"} {"_id":"doc-en-vscode-bfc92911a5ff41051ee59a8d32703c6d229eb5b758fb0ffc52852b441c10f97e","title":"","text":"public getEditOperations(model: ITextModel, builder: IEditOperationBuilder): void { const getLanguageId = () => { return model.getLanguageId(); }; const getLanguageIdAtPosition = (lineNumber: number, column: number) => { return model.getLanguageIdAtPosition(lineNumber, column); }; const modelLineCount = model.getLineCount(); if (this._isMovingDown && this._selection.endLineNumber === modelLineCount) {"} {"_id":"doc-en-vscode-9a74962cf0c0f876b5dca169787e7dab8bba8c5bc8649aada33159daa1bc13d0","title":"","text":"const { tabSize, indentSize, insertSpaces } = model.getOptions(); const indentConverter = this.buildIndentConverter(tabSize, indentSize, insertSpaces); const virtualModel: IVirtualModel = { tokenization: { getLineTokens: (lineNumber: number) => { return model.tokenization.getLineTokens(lineNumber); }, getLanguageId: () => { return model.getLanguageId(); }, getLanguageIdAtPosition: (lineNumber: number, column: number) => { return model.getLanguageIdAtPosition(lineNumber, column); }, }, getLineContent: null as unknown as (lineNumber: number) => string, }; if (s.startLineNumber === s.endLineNumber && model.getLineMaxColumn(s.startLineNumber) === 1) { // Current line is empty"} {"_id":"doc-en-vscode-2fb39690cf65d2ecadc3966dc105f68f69090f1b854fa6dd39f62a4576a9e49a","title":"","text":"insertingText = newIndentation + this.trimStart(movingLineText); } else { // no enter rule matches, let's check indentatin rules then. virtualModel.getLineContent = (lineNumber: number) => { if (lineNumber === s.startLineNumber) { return model.getLineContent(movingLineNumber); } else { return model.getLineContent(lineNumber); } const virtualModel: IVirtualModel = { tokenization: { getLineTokens: (lineNumber: number) => { if (lineNumber === s.startLineNumber) { return model.tokenization.getLineTokens(movingLineNumber); } else { return model.tokenization.getLineTokens(lineNumber); } }, getLanguageId, getLanguageIdAtPosition, }, getLineContent: (lineNumber: number) => { if (lineNumber === s.startLineNumber) { return model.getLineContent(movingLineNumber); } else { return model.getLineContent(lineNumber); } }, }; const indentOfMovingLine = getGoodIndentForLine( this._autoIndent,"} {"_id":"doc-en-vscode-5b6dba97109038589b558b1e29a15746ab1a15b1fac8968dcc55b0fb33e57b79","title":"","text":"} } else { // it doesn't match onEnter rules, let's check indentation rules then. virtualModel.getLineContent = (lineNumber: number) => { if (lineNumber === s.startLineNumber) { return insertingText; } else if (lineNumber >= s.startLineNumber + 1 && lineNumber <= s.endLineNumber + 1) { return model.getLineContent(lineNumber - 1); } else { return model.getLineContent(lineNumber); } const virtualModel: IVirtualModel = { tokenization: { getLineTokens: (lineNumber: number) => { if (lineNumber === s.startLineNumber) { return model.tokenization.getLineTokens(movingLineNumber); } else if (lineNumber >= s.startLineNumber + 1 && lineNumber <= s.endLineNumber + 1) { return model.tokenization.getLineTokens(lineNumber - 1); } else { return model.tokenization.getLineTokens(lineNumber); } }, getLanguageId, getLanguageIdAtPosition, }, getLineContent: (lineNumber: number) => { if (lineNumber === s.startLineNumber) { return insertingText; } else if (lineNumber >= s.startLineNumber + 1 && lineNumber <= s.endLineNumber + 1) { return model.getLineContent(lineNumber - 1); } else { return model.getLineContent(lineNumber); } }, }; const newIndentatOfMovingBlock = getGoodIndentForLine("} {"_id":"doc-en-vscode-a97e0d866d0bc54564c864aa796bb67010451dddea5ae7ba4618b735097e5134","title":"","text":"builder.addEditOperation(new Range(s.endLineNumber, model.getLineMaxColumn(s.endLineNumber), s.endLineNumber, model.getLineMaxColumn(s.endLineNumber)), 'n' + movingLineText); if (this.shouldAutoIndent(model, s)) { virtualModel.getLineContent = (lineNumber: number) => { if (lineNumber === movingLineNumber) { return model.getLineContent(s.startLineNumber); } else { return model.getLineContent(lineNumber); } const virtualModel: IVirtualModel = { tokenization: { getLineTokens: (lineNumber: number) => { if (lineNumber === movingLineNumber) { return model.tokenization.getLineTokens(s.startLineNumber); } else { return model.tokenization.getLineTokens(lineNumber); } }, getLanguageId, getLanguageIdAtPosition, }, getLineContent: (lineNumber: number) => { if (lineNumber === movingLineNumber) { return model.getLineContent(s.startLineNumber); } else { return model.getLineContent(lineNumber); } }, }; const ret = this.matchEnterRule(model, indentConverter, tabSize, s.startLineNumber, s.startLineNumber - 2);"} {"_id":"doc-en-vscode-81e6cd8a097f8e51d18aa98c2735b5a0942f2f2a35872dd9ce85c5f54a627bed","title":"","text":"'enumItemLabels': languagesSorted.map(key => languages[key].name) }, [AccessibilityVoiceSettingId.AutoSynthesize]: { 'type': 'boolean', 'type': 'string', 'enum': ['on', 'off', 'auto'], 'enumDescriptions': [ localize('accessibility.voice.autoSynthesize.on', \"Enable the feature. When a screen reader is enabled, note that this will disable aria updates.\"), localize('accessibility.voice.autoSynthesize.off', \"Disable the feature.\"), localize('accessibility.voice.autoSynthesize.auto', \"When a screen reader is detected, disable the feature. Otherwise, enable the feature.\") ], 'markdownDescription': localize('autoSynthesize', \"Whether a textual response should automatically be read out aloud when speech was used as input. For example in a chat session, a response is automatically synthesized when voice was used as chat request.\"), 'default': this.productService.quality !== 'stable', // TODO@bpasero decide on a default 'default': this.productService.quality !== 'stable' ? 'auto' : 'off', // TODO@bpasero decide on a default 'tags': ['accessibility'] } }"} {"_id":"doc-en-vscode-2edf4b29ea81fc4a810c2341584a616e926d703e4b09134f8180cad02158c837","title":"","text":"Registry.as(WorkbenchExtensions.ConfigurationMigration) .registerConfigurationMigrations([{ key: AccessibilityVoiceSettingId.AutoSynthesize, migrateFn: (value: boolean) => { let newValue: string | undefined; if (value === true) { newValue = 'on'; } else if (value === false) { newValue = 'off'; } return [ [AccessibilityVoiceSettingId.AutoSynthesize, { value: newValue }], ]; } }]); Registry.as(WorkbenchExtensions.ConfigurationMigration) .registerConfigurationMigrations([{ key: 'accessibility.signals.chatResponsePending', migrateFn: (value, accessor) => { return ["} {"_id":"doc-en-vscode-5b9f88bd22879d96de3dea71d56ad6439169314015d6dafbcf99b1e0e7c2b191","title":"","text":"import { IChatResponseViewModel } from 'vs/workbench/contrib/chat/common/chatViewModel'; import { renderStringAsPlaintext } from 'vs/base/browser/markdownRenderer'; import { MarkdownString } from 'vs/base/common/htmlContent'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { AccessibilityVoiceSettingId } from 'vs/workbench/contrib/accessibility/browser/accessibilityConfiguration'; const CHAT_RESPONSE_PENDING_ALLOWANCE_MS = 4000; export class ChatAccessibilityService extends Disposable implements IChatAccessibilityService {"} {"_id":"doc-en-vscode-88e5885f7a2b6511022c6fed66e58b581028a39dc97b10c22726847153c0f368","title":"","text":"private _requestId: number = 0; constructor(@IAccessibilitySignalService private readonly _accessibilitySignalService: IAccessibilitySignalService, @IInstantiationService private readonly _instantiationService: IInstantiationService) { constructor( @IAccessibilitySignalService private readonly _accessibilitySignalService: IAccessibilitySignalService, @IInstantiationService private readonly _instantiationService: IInstantiationService, @IConfigurationService private readonly _configurationService: IConfigurationService ) { super(); } acceptRequest(): number {"} {"_id":"doc-en-vscode-bde1951d6d35d65e575e2004a89fc814892b05161c85b07580a21c6ea435cf55","title":"","text":"} const errorDetails = isPanelChat && response.errorDetails ? ` ${response.errorDetails.message}` : ''; const plainTextResponse = renderStringAsPlaintext(new MarkdownString(responseContent)); status(plainTextResponse + errorDetails); if (this._configurationService.getValue(AccessibilityVoiceSettingId.AutoSynthesize) !== 'on') { status(plainTextResponse + errorDetails); } } }"} {"_id":"doc-en-vscode-bc429f7faf4dbc58adac8feb3d2d54925f825cc52417c687cccf846bff881a4e","title":"","text":"if (!response) { return; } if ( !this.accessibilityService.isScreenReaderOptimized() && // do not auto synthesize when screen reader is active this.configurationService.getValue(AccessibilityVoiceSettingId.AutoSynthesize) === true ) { const autoSynthesize = this.configurationService.getValue<'on' | 'off' | 'auto'>(AccessibilityVoiceSettingId.AutoSynthesize); if (autoSynthesize === 'on' || autoSynthesize === 'auto' && !this.accessibilityService.isScreenReaderOptimized()) { let context: IVoiceChatSessionController | 'focused'; if (controller.context === 'inline') { // TODO@bpasero this is ugly, but the lightweight inline chat turns into"} {"_id":"doc-en-vscode-1a17b20d1893f83e03c8bd39c43f8483beeef13404fb5b535672b63df9c69394","title":"","text":"throw new Error(nls.localize('restartCode', \"Please restart VS Code before reinstalling {0}.\", this.manifest.displayName || this.manifest.name)); } } } else { // Remove the extension with same version if it is already uninstalled. // Installing a VSIX extension shall replace the existing extension always. const existingWithSameVersion = await this.unsetIfUninstalled(this.extensionKey); if (existingWithSameVersion) { try { await this.extensionsScanner.removeExtension(existingWithSameVersion, 'existing'); } catch (e) { throw new Error(nls.localize('restartCode', \"Please restart VS Code before reinstalling {0}.\", this.manifest.displayName || this.manifest.name)); } } // Remove the extension with same version if it is already uninstalled. // Installing a VSIX extension shall replace the existing extension always. const existingWithSameVersion = await this.unsetIfUninstalled(this.extensionKey); if (existingWithSameVersion) { try { await this.extensionsScanner.removeExtension(existingWithSameVersion, 'existing'); } catch (e) { throw new Error(nls.localize('restartCode', \"Please restart VS Code before reinstalling {0}.\", this.manifest.displayName || this.manifest.name)); } }"} {"_id":"doc-en-vscode-e2d9e432d2ab4340239637b83f2b9e3341929cbf0aa5b5bc046ff5531f602be4","title":"","text":" FROM mcr.microsoft.com/devcontainers/typescript-node:18-bookworm FROM mcr.microsoft.com/devcontainers/typescript-node:20-bookworm ADD install-vscode.sh /root/ RUN /root/install-vscode.sh"} {"_id":"doc-en-vscode-8308148dd8425b64ba1d1bb130a3704426a7cf6a5733ef622433e5a5c5a8bd80","title":"","text":"if (items && items.length > 0) { this.followupsDisposables.add(this.instantiationService.createInstance, ChatFollowups>(ChatFollowups, this.followupsContainer, items, this.location, undefined, followup => this._onDidAcceptFollowup.fire({ followup, response }))); } this._onDidChangeHeight.fire(); } get contentHeight(): number {"} {"_id":"doc-en-vscode-4649301b97e22cb04dab12bff36d55f765e25ab9a4a045cc165e92507a802c9e","title":"","text":"this._store.add(this._widget); this._widget.render(this._inputContainer); this._widget.setModel(this._defaultChatModel, {}); this._store.add(this._widget.inputEditor.onDidContentSizeChange(() => _editor.layoutContentWidget(this))); this._store.add(this._widget.onDidChangeContentHeight(() => _editor.layoutContentWidget(this))); this._domNode.tabIndex = -1; this._domNode.className = 'inline-chat-content-widget interactive-session';"} {"_id":"doc-en-vscode-1386dca9c6f63db62a17f17617fc52ae3dcb2786110813c4f51abbb183001e5f","title":"","text":"disturl \"https://electronjs.org/headers\" target \"29.4.0\" ms_build_id \"9593362\" ms_build_id \"9728852\" runtime \"electron\" build_from_source \"true\""} {"_id":"doc-en-vscode-6c08daa9d042539e50840af151cdd8846ce9369a2a3cbbe925a9684887bb3cd7","title":"","text":"{ \"name\": \"code-oss-dev\", \"version\": \"1.91.0\", \"distro\": \"170beceb9849568b8f7159757bc3fc3964af1986\", \"distro\": \"361fc45f5932b161db29080d5b19bc5afb9baae6\", \"author\": { \"name\": \"Microsoft Corporation\" },"} {"_id":"doc-en-vscode-5305d7a1167035fba4c05f3910bd8e6a9c79e7670ac1c9d97906747b2a420093","title":"","text":"wait_for_async_execs exec \"$@\" \"--no-sandbox\" exec \"$@\" "} {"_id":"doc-en-vscode-c0b9951132699e3aa0094718474436ea7b4ad5560f67e0ee66cad43b3528acf0","title":"","text":"apps: @@NAME@@: command: electron-launch $SNAP/usr/share/@@NAME@@/bin/@@NAME@@ command: electron-launch $SNAP/usr/share/@@NAME@@/bin/@@NAME@@ --no-sandbox common-id: @@NAME@@.desktop url-handler: command: electron-launch $SNAP/usr/share/@@NAME@@/bin/@@NAME@@ --open-url command: electron-launch $SNAP/usr/share/@@NAME@@/bin/@@NAME@@ --open-url --no-sandbox "} {"_id":"doc-en-vscode-77e13d2e4fa5fade2d733ca9ddb002da6f4b8a4e8713114526b4687515174fa5","title":"","text":"} set statusBarCommands(statusBarCommands: vscode.Command[] | undefined) { this.logService.info('ExtHostSourceControl#statusBarCommands', (statusBarCommands ?? []).map(c => c.command).join(', ')); this.logService.trace('ExtHostSourceControl#statusBarCommands', (statusBarCommands ?? []).map(c => c.command).join(', ')); if (this._statusBarCommands && statusBarCommands && commandListEquals(this._statusBarCommands, statusBarCommands)) { this.logService.info('ExtHostSourceControl#statusBarCommands are equal'); this.logService.trace('ExtHostSourceControl#statusBarCommands are equal'); return; }"} {"_id":"doc-en-vscode-96df99395cf2ee639ce243862ad62c6369731bf6f182be79d6bc2d6ef5b5bbe7","title":"","text":"const visibleRanges = editor.getVisibleRanges(); if (visibleRanges.length > 0) { visiblePosition = visibleRanges[0].getStartPosition(); const cursorPos = editor.getPosition(); if (cursorPos) { const isVisible = visibleRanges.some(range => range.containsPosition(cursorPos)); if (isVisible) { // Keep cursor pos fixed if it is visible visiblePosition = cursorPos; } } const visiblePositionScrollTop = editor.getTopForPosition(visiblePosition.lineNumber, visiblePosition.column); visiblePositionScrollDelta = editor.getScrollTop() - visiblePositionScrollTop; }"} {"_id":"doc-en-vscode-5e4dd4e6f1b02b37bac327ca8603792f8ce9892a85ca8fa04541c6279359912d","title":"","text":"keybinding: { weight: KeybindingWeight.WorkbenchContrib, primary: KeyMod.CtrlCmd | KeyCode.Escape, win: { primary: KeyMod.Alt | KeyCode.Backspace }, } }); }"} {"_id":"doc-en-vscode-bbffda69a2b1c62421df43fd7237f8d3f0374d386e1482d417476287a2cf5dda","title":"","text":"padding-right: 4px; } .monaco-hover .hover-row.status-bar .actions .action-container a { color: var(--vscode-textLink-foreground); text-decoration: var(--text-link-decoration); } .monaco-hover .markdown-hover .hover-contents .codicon { color: inherit; font-size: inherit;"} {"_id":"doc-en-vscode-c492f00e5ad1985c0decc12e97ac5d9cd61444b55382411808b9cec0c6b08cb6","title":"","text":".monaco-workbench .hover-language-status > .element .right .monaco-link { margin: auto 0; white-space: nowrap; text-decoration: var(--text-link-decoration); } .monaco-workbench .hover-language-status > .element .right .monaco-action-bar:not(:first-child) {"} {"_id":"doc-en-vscode-57ce381c1b4f1db515c0ac564b67079894ac728bb3ceff328474b37ad90a14c5","title":"","text":"this._viewsService.openView(Markers.MARKERS_VIEW_ID); } else if (task.command.presentation && (task.command.presentation.focus || task.command.presentation.reveal === RevealKind.Always)) { this._terminalService.setActiveInstance(terminal); await this._terminalService.revealActiveTerminal(); await this._terminalService.revealTerminal(terminal); if (task.command.presentation.focus) { this._terminalService.focusActiveInstance(); this._terminalService.focusInstance(terminal); } } this._activeTasks[task.getMapKey()].terminal = terminal;"} {"_id":"doc-en-vscode-7ee19c42f0dbb9269f1198d9db02bdf9be7d7e9aead1091b7b2c22ef11a1caaa","title":"","text":"getReconnectedTerminals(reconnectionOwner: string): ITerminalInstance[] | undefined; getActiveOrCreateInstance(options?: { acceptsInput?: boolean }): Promise; revealTerminal(source: ITerminalInstance, preserveFocus?: boolean): Promise; revealActiveTerminal(preserveFocus?: boolean): Promise; moveToEditor(source: ITerminalInstance, group?: GroupIdentifier | SIDE_GROUP_TYPE | ACTIVE_GROUP_TYPE | AUX_WINDOW_GROUP_TYPE): void; moveIntoNewEditor(source: ITerminalInstance): void;"} {"_id":"doc-en-vscode-c521da915954447a84ad1dbbbb8767d52f86c5a29061a06fe1e7c578be1d1a43","title":"","text":"setActiveInstance(instance: ITerminalInstance): void; /** * Reveal and focus the instance, regardless of its location. */ focusInstance(instance: ITerminalInstance): void; /** * Reveal and focus the active instance, regardless of its location. */ focusActiveInstance(): Promise;"} {"_id":"doc-en-vscode-2a1b1822168796cce9747140084f8b5445be16f26fd966b385a8dce38b90bd24","title":"","text":"this._onDidChangeActiveInstance.fire(this.activeInstance); } async focusInstance(instance: ITerminalInstance): Promise { return instance.focusWhenReady(true); } async focusActiveInstance(): Promise { return this.activeInstance?.focusWhenReady(true); }"} {"_id":"doc-en-vscode-9da05d7ad88187ac74609dde96cbfe61f21210458f4364ec3ec4001a948008b0","title":"","text":"pane?.terminalTabbedView?.focusHover(); } async focusInstance(_: ITerminalInstance): Promise { return this.showPanel(true); } async focusActiveInstance(): Promise { return this.showPanel(true); }"} {"_id":"doc-en-vscode-5625206abb319ba7f4769a7324b5a6ef5dabc85011db6d4b74e60246c0eae61c","title":"","text":"} } async focusInstance(instance: ITerminalInstance): Promise { if (instance.target === TerminalLocation.Editor) { return this._terminalEditorService.focusInstance(instance); } return this._terminalGroupService.focusInstance(instance); } async focusActiveInstance(): Promise { if (!this._activeInstance) { return; } if (this._activeInstance.target === TerminalLocation.Editor) { return this._terminalEditorService.focusActiveInstance(); } return this._terminalGroupService.focusActiveInstance(); return this.focusInstance(this._activeInstance); } async createContributedTerminalProfile(extensionIdentifier: string, id: string, options: ICreateContributedTerminalProfileOptions): Promise {"} {"_id":"doc-en-vscode-953443979ad98703d1f6043b5f3cae25e0c7c4cb784add5a2d2a7a38052934a0","title":"","text":"return instance; } async revealTerminal(source: ITerminalInstance, preserveFocus?: boolean): Promise { if (source.target === TerminalLocation.Editor) { await this._terminalEditorService.revealActiveEditor(preserveFocus); } else { await this._terminalGroupService.showPanel(); } } async revealActiveTerminal(preserveFocus?: boolean): Promise { const instance = this.activeInstance; if (!instance) { return; } if (instance.target === TerminalLocation.Editor) { await this._terminalEditorService.revealActiveEditor(preserveFocus); } else { await this._terminalGroupService.showPanel(); } await this.revealTerminal(instance, preserveFocus); } setEditable(instance: ITerminalInstance, data?: IEditableData | null): void {"} {"_id":"doc-en-vscode-1c6ea06faab134380cdf48949fbe97fed03bcde22a60d15a8122b669f2ff239e","title":"","text":"getInputFromResource(resource: URI): TerminalEditorInput { throw new Error('Method not implemented.'); } setActiveInstance(instance: ITerminalInstance): void { throw new Error('Method not implemented.'); } focusActiveInstance(): Promise { throw new Error('Method not implemented.'); } focusInstance(instance: ITerminalInstance): void { throw new Error('Method not implemented.'); } getInstanceFromResource(resource: URI | undefined): ITerminalInstance | undefined { throw new Error('Method not implemented.'); } focusFindWidget(): void { throw new Error('Method not implemented.'); } hideFindWidget(): void { throw new Error('Method not implemented.'); }"} {"_id":"doc-en-vscode-c6f3b623eb9ef8891fcb1905f169b538501dd289979a4969957a28d95b8d29bf","title":"","text":"focusHover(): void { throw new Error('Method not implemented.'); } setActiveInstance(instance: ITerminalInstance): void { throw new Error('Method not implemented.'); } focusActiveInstance(): Promise { throw new Error('Method not implemented.'); } focusInstance(instance: ITerminalInstance): void { throw new Error('Method not implemented.'); } getInstanceFromResource(resource: URI | undefined): ITerminalInstance | undefined { throw new Error('Method not implemented.'); } focusFindWidget(): void { throw new Error('Method not implemented.'); } hideFindWidget(): void { throw new Error('Method not implemented.'); }"} {"_id":"doc-en-vscode-6281fdea632a51d8166ea2ab047afe38e4859c173ec52445c4d90fc83bc458a1","title":"","text":"// no parsed args, try handle active editor const editor = getEditorFromArgsOrActivePane(accessor); if (editor) { const selectedCellRange: ICellRange[] = editor.getSelections().length === 0 ? [editor.getFocus()] : editor.getSelections(); telemetryService.publicLog2('workbenchActionExecuted', { id: this.desc.id, from: from }); return this.runWithContext(accessor, { ui: false, notebookEditor: editor, selectedCells: cellRangeToViewCells(editor, editor.getSelections()) selectedCells: cellRangeToViewCells(editor, selectedCellRange) }); } }"} {"_id":"doc-en-vscode-52e8355c5e208c20009eee8ba2fe08c1f6f223b9ad814e95e87b5f22b3fd2db1","title":"","text":"keybinding: { when: ContextKeyExpr.and( NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_CELL_LIST_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey), NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE ContextKeyExpr.not(InputFocusedContextKey), ), primary: KeyMod.CtrlCmd | KeyCode.Slash, weight: KeybindingWeight.WorkbenchContrib"} {"_id":"doc-en-vscode-91e4bc860b02df3b2c693a0742723a2150a9a4531ceeb14ef3d998d1fd7c78e2","title":"","text":"} }); selectedCellEditors.forEach(editor => { if (!editor.hasModel()) { return;"} {"_id":"doc-en-vscode-c1d681417a6b7d18f90dcdb343a18e9c95f21c1a6d556c70d66e7e5fd7e1a402","title":"","text":"const modelOptions = model.getOptions(); const commentsOptions = editor.getOption(EditorOption.comments); const selection = editor.getSelection(); commands.push(new LineCommentCommand( languageConfigurationService, new Selection(1, 1, model.getLineCount(), model.getLineMaxColumn(model.getLineCount())),"} {"_id":"doc-en-vscode-ed281793472dca3e5061bae884b87dc1edb6ebf5f95e5dea317eb02de779d4be","title":"","text":"editor.pushUndoStop(); editor.executeCommands(COMMENT_SELECTED_CELLS_ID, commands); editor.pushUndoStop(); editor.setSelection(selection); }); }"} {"_id":"doc-en-vscode-eb4b4cd3981d441848bcb6b48bcd555cf81a858b221c5170ad7116e03a82ff35","title":"","text":"} registerThemingParticipant((theme, collector) => { const scope = '.monaco-editor .glyph-margin-widgets, .monaco-workbench .debug-breakpoints, .monaco-workbench .disassembly-view'; const debugIconBreakpointColor = theme.getColor(debugIconBreakpointForeground); if (debugIconBreakpointColor) { collector.addRule(` ${icons.allBreakpoints.map(b => `.monaco-workbench ${ThemeIcon.asCSSSelector(b.regular)}`).join(',n\t\t')}, .monaco-workbench ${ThemeIcon.asCSSSelector(icons.debugBreakpointUnsupported)}, .monaco-workbench ${ThemeIcon.asCSSSelector(icons.debugBreakpointHint)}:not([class*='codicon-debug-breakpoint']):not([class*='codicon-debug-stackframe']), .monaco-workbench ${ThemeIcon.asCSSSelector(icons.breakpoint.regular)}${ThemeIcon.asCSSSelector(icons.debugStackframeFocused)}::after, .monaco-workbench ${ThemeIcon.asCSSSelector(icons.breakpoint.regular)}${ThemeIcon.asCSSSelector(icons.debugStackframe)}::after { color: ${debugIconBreakpointColor} !important; } `); collector.addRule(`${scope} { ${icons.allBreakpoints.map(b => `${ThemeIcon.asCSSSelector(b.regular)}`).join(',n\t\t')}, ${ThemeIcon.asCSSSelector(icons.debugBreakpointUnsupported)}, ${ThemeIcon.asCSSSelector(icons.debugBreakpointHint)}:not([class*='codicon-debug-breakpoint']):not([class*='codicon-debug-stackframe']), ${ThemeIcon.asCSSSelector(icons.breakpoint.regular)}${ThemeIcon.asCSSSelector(icons.debugStackframeFocused)}::after, ${ThemeIcon.asCSSSelector(icons.breakpoint.regular)}${ThemeIcon.asCSSSelector(icons.debugStackframe)}::after { color: ${debugIconBreakpointColor} !important; } }`); collector.addRule(` .monaco-workbench ${ThemeIcon.asCSSSelector(icons.breakpoint.pending)} { color: ${debugIconBreakpointColor} !important; font-size: 12px !important; } `); collector.addRule(`${scope} { ${ThemeIcon.asCSSSelector(icons.breakpoint.pending)} { color: ${debugIconBreakpointColor} !important; font-size: 12px !important; } }`); } const debugIconBreakpointDisabledColor = theme.getColor(debugIconBreakpointDisabledForeground); if (debugIconBreakpointDisabledColor) { collector.addRule(` ${icons.allBreakpoints.map(b => `.monaco-workbench ${ThemeIcon.asCSSSelector(b.disabled)}`).join(',n\t\t')} { color: ${debugIconBreakpointDisabledColor}; } `); collector.addRule(`${scope} { ${icons.allBreakpoints.map(b => ThemeIcon.asCSSSelector(b.disabled)).join(',n\t\t')} { color: ${debugIconBreakpointDisabledColor}; } }`); } const debugIconBreakpointUnverifiedColor = theme.getColor(debugIconBreakpointUnverifiedForeground); if (debugIconBreakpointUnverifiedColor) { collector.addRule(` ${icons.allBreakpoints.map(b => `.monaco-workbench ${ThemeIcon.asCSSSelector(b.unverified)}`).join(',n\t\t')} { color: ${debugIconBreakpointUnverifiedColor}; } `); collector.addRule(`${scope} { ${icons.allBreakpoints.map(b => ThemeIcon.asCSSSelector(b.unverified)).join(',n\t\t')} { color: ${debugIconBreakpointUnverifiedColor}; } }`); } const debugIconBreakpointCurrentStackframeForegroundColor = theme.getColor(debugIconBreakpointCurrentStackframeForeground); if (debugIconBreakpointCurrentStackframeForegroundColor) { collector.addRule(` .monaco-workbench ${ThemeIcon.asCSSSelector(icons.debugStackframe)}, .monaco-editor .debug-top-stack-frame-column { color: ${debugIconBreakpointCurrentStackframeForegroundColor} !important; } ${scope} { ${ThemeIcon.asCSSSelector(icons.debugStackframe)} { color: ${debugIconBreakpointCurrentStackframeForegroundColor} !important; } } `); } const debugIconBreakpointStackframeFocusedColor = theme.getColor(debugIconBreakpointStackframeForeground); if (debugIconBreakpointStackframeFocusedColor) { collector.addRule(` .monaco-workbench ${ThemeIcon.asCSSSelector(icons.debugStackframeFocused)} { color: ${debugIconBreakpointStackframeFocusedColor} !important; } `); collector.addRule(`${scope} { ${ThemeIcon.asCSSSelector(icons.debugStackframeFocused)} { color: ${debugIconBreakpointStackframeFocusedColor} !important; } }`); } });"} {"_id":"doc-en-vscode-85675d72db396c770295750e02e8492987166a61a19820a9224c6705fbd4690f","title":"","text":"} )) as WorkbenchTable; this._disassembledInstructions.domNode.classList.add('disassembly-view'); if (this.focusedInstructionReference) { this.reloadDisassembly(this.focusedInstructionReference, 0); }"} {"_id":"doc-en-vscode-d2c403efb2c41c3888f53e8d779cd46bb2bfe6a8ef20f0a41744cebabc80544b","title":"","text":"// align from the bottom so that it lines up with instruction when source code is present. container.style.alignSelf = 'flex-end'; const icon = append(container, $('.disassembly-view')); icon.classList.add('codicon'); const icon = append(container, $('.codicon')); icon.style.display = 'flex'; icon.style.alignItems = 'center'; icon.style.justifyContent = 'center';"} {"_id":"doc-en-vscode-96f3162e73e36169b992f7d56955a4b4e367cbf297456b31386056a334948c7b","title":"","text":"export const editorBracketHighlightingForeground5 = registerColor('editorBracketHighlight.foreground5', '#00000000', nls.localize('editorBracketHighlightForeground5', 'Foreground color of brackets (5). Requires enabling bracket pair colorization.')); export const editorBracketHighlightingForeground6 = registerColor('editorBracketHighlight.foreground6', '#00000000', nls.localize('editorBracketHighlightForeground6', 'Foreground color of brackets (6). Requires enabling bracket pair colorization.')); export const editorBracketHighlightingUnexpectedBracketForeground = registerColor('editorBracketHighlight.unexpectedBracket.foreground', { dark: new Color(new RGBA(255, 18, 18, 0.8)), light: new Color(new RGBA(255, 18, 18, 0.8)), hcDark: new Color(new RGBA(255, 50, 50, 1)), hcLight: '' }, nls.localize('editorBracketHighlightUnexpectedBracketForeground', 'Foreground color of unexpected brackets.')); export const editorBracketHighlightingUnexpectedBracketForeground = registerColor('editorBracketHighlight.unexpectedBracket.foreground', { dark: new Color(new RGBA(255, 18, 18, 0.8)), light: new Color(new RGBA(255, 18, 18, 0.8)), hcDark: 'new Color(new RGBA(255, 50, 50, 1))', hcLight: '#B5200D' }, nls.localize('editorBracketHighlightUnexpectedBracketForeground', 'Foreground color of unexpected brackets.')); export const editorBracketPairGuideBackground1 = registerColor('editorBracketPairGuide.background1', '#00000000', nls.localize('editorBracketPairGuide.background1', 'Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.')); export const editorBracketPairGuideBackground2 = registerColor('editorBracketPairGuide.background2', '#00000000', nls.localize('editorBracketPairGuide.background2', 'Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.'));"} {"_id":"doc-en-vscode-4d6a41b1e0902c0b99d9f047e8f9273d146af938e9742191bf9964516e97f96e","title":"","text":"} override dispose() { // The editor isn't disposed yet, it can be re-used. // However the model can be disposed before the editor & that causes issues. if (this._editor) { this._editor.setModel(null); } if (this._editor && this._editorViewStateChanged) { this.cell.saveSpirceEditorViewState(this._editor.saveViewState()); }"} {"_id":"doc-en-vscode-71a544e78afb24fa9333a608414a6c6e9cc5ed8fca255db7fb3df39a2d0906b5","title":"","text":"return $('tr', undefined, ...row.map(rowData => { if (typeof rowData === 'string') { return $('td', undefined, rowData); return $('td', undefined, $('p', undefined, rowData)); } const data = Array.isArray(rowData) ? rowData : [rowData]; return $('td', undefined, ...data.map(item => {"} {"_id":"doc-en-vscode-edb5fd81a86935ef95c49caaafa27a524280a996a57b16a6f7ff3880d759de77","title":"","text":"alias: { './node/authServer': path.resolve(__dirname, 'src/browser/authServer'), './node/buffer': path.resolve(__dirname, 'src/browser/buffer'), './node/fetch': path.resolve(__dirname, 'src/browser/fetch'), './node/authProvider': path.resolve(__dirname, 'src/browser/authProvider'), } }"} {"_id":"doc-en-vscode-27c68f0c37d512c3c753902f1ba8515d410ab71fff849b6b56a4e32ecfc9f9e0","title":"","text":"import { BetterTokenStorage, IDidChangeInOtherWindowEvent } from './betterSecretStorage'; import { LoopbackAuthServer } from './node/authServer'; import { base64Decode } from './node/buffer'; import fetch from './node/fetch'; import { UriEventHandler } from './UriEventHandler'; import TelemetryReporter from '@vscode/extension-telemetry'; import { Environment } from '@azure/ms-rest-azure-env';"} {"_id":"doc-en-vscode-cc2d5b53b7f698b1f57dd54116d44a60e7c4cc451141c5f3663205021fd9c6dd","title":"","text":"let result; let errorMessage: string | undefined; try { result = await fetch(endpoint, { result = await fetch(endpoint.toString(), { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Content-Length': postData.length.toString() 'Content-Type': 'application/x-www-form-urlencoded' }, body: postData });"} {"_id":"doc-en-vscode-aaefce4154fdd266ebb08cd95fe25bbe9ae0b47a1bd7790e953f8a0d9531a4f2","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 default fetch; "} {"_id":"doc-en-vscode-b2e8ae59e547ade7048dcd7efa993d34b734a3f50f5c7a6191bf27094680c5d0","title":"","text":" /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ let _fetch: typeof fetch; try { _fetch = require('electron').net.fetch; } catch { _fetch = fetch; } export default _fetch; "} {"_id":"doc-en-vscode-68035118474e6ce46b24cf3606012e6df004d0d99a2cb8428ae27247bc623393","title":"","text":"this._versionId = this._textModel.getVersionId(); this._alternativeId = this._textModel.getAlternativeVersionId(); } this._textBufferHash = null; this._onDidChangeContent.fire('content'); }));"} {"_id":"doc-en-vscode-83a3b7bc081b209c38b1c2aabae9f11079787fa9a7b0bd24330e75f3b9e25992","title":"","text":"import { $, append } from 'vs/base/browser/dom'; import { IHoverOptions, IManagedHover, IManagedHoverTooltipMarkdownString } from 'vs/base/browser/ui/hover/hover'; import { IHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegate'; import { createInstantHoverDelegate, getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory'; import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory'; import { IconLabel } from 'vs/base/browser/ui/iconLabel/iconLabel'; import { IIdentityProvider, IKeyboardNavigationLabelProvider, IListVirtualDelegate } from 'vs/base/browser/ui/list/list'; import { LabelFuzzyScore } from 'vs/base/browser/ui/tree/abstractTree';"} {"_id":"doc-en-vscode-989d2aee038e313a32aa4b398e81a4fbf2d874549afbc7eb8d98562e99774f98","title":"","text":"templateData.labelContainer.textContent = ''; if (historyItem.labels) { const instantHoverDelegate = createInstantHoverDelegate(); templateData.elementDisposables.add(instantHoverDelegate); // Get lits of labels to render (current, remote, base) const labels = this.getLabels(node.element.repository);"} {"_id":"doc-en-vscode-a8f0ccd73f291c8fadc0f7bb45ec01e50d515801848c09b1e1377ccb10c60f24","title":"","text":"if (label.icon && ThemeIcon.isThemeIcon(label.icon) && labels.includes(label.title)) { const icon = append(templateData.labelContainer, $('div.label')); icon.classList.add(...ThemeIcon.asClassNameArray(label.icon)); const hover = this.hoverService.setupManagedHover(instantHoverDelegate, icon, label.title); templateData.elementDisposables.add(hover); } } }"} {"_id":"doc-en-vscode-84a4369d519f3ce987f5d1ea2181946d96ad3cbf1ee88d99134962a0de4e888a","title":"","text":"const editorGroupService = accessor.get(IEditorGroupsService); const newOrientation = (editorGroupService.orientation === GroupOrientation.VERTICAL) ? GroupOrientation.HORIZONTAL : GroupOrientation.VERTICAL; editorGroupService.setGroupOrientation(newOrientation); editorGroupService.activeGroup.focus(); } });"} {"_id":"doc-en-vscode-4bc187cfdac26f453ab02295be392d1bfa4adc40afe1ae2b6bfc622ec76b1aee","title":"","text":"this._compositionRangeWithinEditor = newCompositionRangeWithinEditor; } this._emitTypeEvent(viewController, e); // TODO @aiday-mar calling write screen reader content so that the document selection is immediately set // remove the following when electron will be upgraded this._screenReaderSupport.writeScreenReaderContent(); })); this._register(editContextAddDisposableListener(this._editContext, 'compositionstart', (e) => { const position = this._context.viewModel.getPrimaryCursorState().modelState.position;"} {"_id":"doc-en-vscode-7ddd1ae3b709b7d958f4c6304e1cba4eb8d3db7c65656a5715074f060fdd5c73","title":"","text":"} private _getScreenReaderContentState(): ScreenReaderContentState | undefined { // Make the screen reader content always be visible because of the bug and also set the selection // TODO @aiday-mar Ultimately uncomment this code when Electron will be upgraded // if (this._accessibilitySupport === AccessibilitySupport.Disabled) { // \treturn; // } const accessibilityPageSize = this._accessibilitySupport === AccessibilitySupport.Disabled ? 1 : this._accessibilityPageSize; if (this._accessibilitySupport === AccessibilitySupport.Disabled) { return; } const simpleModel: ISimpleModel = { getLineCount: (): number => { return this._context.viewModel.getLineCount();"} {"_id":"doc-en-vscode-733db3a76381fabf1a0df7c698d7ac494b72916d4db79afc9b07960b68645efb","title":"","text":"return this._context.viewModel.modifyPosition(position, offset); } }; return PagedScreenReaderStrategy.fromEditorSelection(simpleModel, this._primarySelection, accessibilityPageSize, this._accessibilitySupport === AccessibilitySupport.Unknown); return PagedScreenReaderStrategy.fromEditorSelection(simpleModel, this._primarySelection, this._accessibilityPageSize, this._accessibilitySupport === AccessibilitySupport.Unknown); } private _setSelectionOfScreenReaderContent(selectionOffsetStart: number, selectionOffsetEnd: number): void {"} {"_id":"doc-en-vscode-54907b24397244ce093d2621e0fd084f9dbe02a2e7aabbe1e7189edd96b4a8a6","title":"","text":"* Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { getActiveWindow } from '../../../../../base/browser/dom.js'; import { getActiveWindow, isHTMLElement } from '../../../../../base/browser/dom.js'; import { FastDomNode } from '../../../../../base/browser/fastDomNode.js'; import { AccessibilitySupport } from '../../../../../platform/accessibility/common/accessibility.js'; import { IKeybindingService } from '../../../../../platform/keybinding/common/keybinding.js';"} {"_id":"doc-en-vscode-729f39c99f778dfe5fb0ac69f8ce79fd6133bbdc01e73f8c1c928295175e9e28","title":"","text":"if (!textContent) { return; } const focusedElement = getActiveWindow().document.activeElement; const range = new globalThis.Range(); range.setStart(textContent, selectionOffsetStart); range.setEnd(textContent, selectionOffsetEnd); activeDocumentSelection.removeAllRanges(); activeDocumentSelection.addRange(range); if (isHTMLElement(focusedElement)) { focusedElement.focus(); } } }"} {"_id":"doc-en-vscode-6498a3a760d7d7cb4edeb46d4ff0ce70c0039f2116b193d4460b894be062a172","title":"","text":"} }; for (const breakpoint of this.model.getBreakpoints({ triggeredOnly: true })) { breakpoint.setSessionDidTrigger(session.getId(), false); } // For debug sessions spawned by test runs, cancel the test run and stop // the session, then start the test run again; tests have no notion of restarts. if (session.correlatedTestRun) {"} {"_id":"doc-en-vscode-cd6b6f05fb68eb165df01506af13d96e8547c29f0a3e3e853634be4b8432ab81","title":"","text":"readonly pending: boolean; /** Marks that a session did trigger the breakpoint. */ setSessionDidTrigger(sessionId: string): void; setSessionDidTrigger(sessionId: string, didTrigger?: boolean): void; /** Gets whether the `triggeredBy` condition has been met in the given sesison ID. */ getSessionDidTrigger(sessionId: string): boolean;"} {"_id":"doc-en-vscode-4cac9ad05bd4ace573f4cd18dd8c3d101f6e72df1a411aa1d52daa501986da30","title":"","text":"return `${resources.basenameOrAuthority(this.uri)} ${this.lineNumber}`; } public setSessionDidTrigger(sessionId: string): void { this.sessionsDidTrigger ??= new Set(); this.sessionsDidTrigger.add(sessionId); public setSessionDidTrigger(sessionId: string, didTrigger = true): void { if (didTrigger) { this.sessionsDidTrigger ??= new Set(); this.sessionsDidTrigger.add(sessionId); } else { this.sessionsDidTrigger?.delete(sessionId); } } public getSessionDidTrigger(sessionId: string): boolean {"} {"_id":"doc-en-vscode-70778f4ebb42d109e69080436647867a5152fc66fc0867e57dd3924b13050cb0","title":"","text":"}, 0); }; const isEditableElement = (element: Element) => { return element.tagName.toLowerCase() === 'input' || element.tagName.toLowerCase() === 'textarea' || 'editContext' in element; }; // check if an input element is focused within the output element const checkOutputInputFocus = (e: FocusEvent) => { lastFocusedOutput = getOutputContainer(e);"} {"_id":"doc-en-vscode-287b00d686e1213a25d614138be9c02e5c551aa3f12f45a8040c02799a292853","title":"","text":"JSON.parse(decodeURIComponent(\"${encodeURIComponent(JSON.stringify(ctx))}\")) )n//# sourceURL=notebookWebviewPreloads.jsn`; } export function isEditableElement(element: Element): boolean { return element.tagName.toLowerCase() === 'input' || element.tagName.toLowerCase() === 'textarea' || 'editContext' in element; } "} {"_id":"doc-en-vscode-e4c7ca08586b35f56af7d1d78dd383354617d4c803589dcb9638e5ab56c50fd9","title":"","text":"viewController.emitKeyDown(standardKeyboardEvent); })); this._register(addDisposableListener(this.domNode.domNode, 'beforeinput', async (e) => { if (e.inputType === 'insertParagraph') { if (e.inputType === 'insertParagraph' || e.inputType === 'insertLineBreak') { this._onType(viewController, { text: 'n', replacePrevCharCnt: 0, replaceNextCharCnt: 0, positionDelta: 0 }); } }));"}