jiebi/CodeConvo huggingface dataset:
@IPreferencesService private readonly preferencesService: IPreferencesService, @ITelemetryService private readonly telemetryService: ITelemetryService, ) { <del> super(id, localize('install', "Install"), cssClass, false); </del> <ins> super('extensions.install', localize('install', "Install"), InstallAction.Class, false); this.options = { ...options, isMachineScoped: false }; </ins> this.update(); this._register(this.labelService.onDidChangeFormatters(() => this.updateLabel(), this)); }
} private async install(extension: IExtension): Promise<IExtension | undefined> { <del> const installOptions = this.getInstallOptions(); </del> try { <del> return await this.extensionsWorkbenchService.install(extension, installOptions); </del> <ins> return await this.extensionsWorkbenchService.install(extension, this.options); </ins> } catch (error) { <del> await this.instantiationService.createInstance(PromptExtensionInstallFailureAction, extension, extension.latestVersion, InstallOperation.Install, installOptions, error).run(); </del> <ins> await this.instantiationService.createInstance(PromptExtensionInstallFailureAction, extension, extension.latestVersion, InstallOperation.Install, this.options, error).run(); </ins> return undefined; } }
) { super(`extensions.installActions`, '', [ [ <del> instantiationService.createInstance(InstallAndSyncAction, { installPreReleaseVersion: extensionsWorkbenchService.preferPreReleases }), instantiationService.createInstance(InstallAndSyncAction, { installPreReleaseVersion: !extensionsWorkbenchService.preferPreReleases }), ], [ </del> instantiationService.createInstance(InstallAction, { installPreReleaseVersion: extensionsWorkbenchService.preferPreReleases }), instantiationService.createInstance(InstallAction, { installPreReleaseVersion: !extensionsWorkbenchService.preferPreReleases }), ] ]); } <del> protected override getLabel(action: AbstractInstallAction): string { </del> <ins> protected override getLabel(action: InstallAction): string { </ins> return action.getLabel(true); }
const range = match.range(); const matchText = match.text().substr(0, range.endColumn + 150); if (replace) { <del> return nls.localize('replacePreviewResultAria', "'{0}' at column {1} replace {2} with {3}", matchText, range.startColumn + 1, matchString, match.replaceString); </del> <ins> return nls.localize('replacePreviewResultAria', "'{0}' at column {1} replace {2} with {3}", matchText, range.startColumn, matchString, match.replaceString); </ins> } <del> return nls.localize('searchResultAria', "'{0}' at column {1} found {2}", matchText, range.startColumn + 1, matchString); </del> <ins> return nls.localize('searchResultAria', "'{0}' at column {1} found {2}", matchText, range.startColumn, matchString); </ins> } return null; }
if (editorWidget) { // Ensure that the editor widget is binded. If if is, then this should return immediately. // Otherwise, it will bind the widget. <del> await elemParent.bindNotebookEditorWidget(editorWidget); </del> <ins> elemParent.bindNotebookEditorWidget(editorWidget); </ins> await elemParent.updateMatchesForEditorWidget(); const matchIndex = oldParentMatches.findIndex(e => e.id() === element.id());
return; } <del> this._webview.focusOutput(cell.id, this._webviewFocused); </del> <ins> if (!options?.skipReveal) { this._webview.focusOutput(cell.id, this._webviewFocused); } </ins> cell.updateEditState(CellEditState.Preview, 'focusNotebookCell'); cell.focusMode = CellFocusMode.Output;
if (e.ctrlKey || e.shiftKey) { return; } <del> if (e.code === 'ArrowDown' || e.code === 'End' || e.code === 'ArrowUp' || e.code === 'Home') { </del> <ins> if (e.code === 'ArrowDown' || e.code === 'ArrowUp' || e.code === 'End' || e.code === 'Home' || e.code === 'PageUp' || e.code === 'PageDown') { </ins> // These should change the scroll position, not adjust the selected cell in the notebook e.stopPropagation(); }
*--------------------------------------------------------------------------------------------*/ import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; <del> import { IEditorMouseEvent, IMouseTarget, IPartialEditorMouseEvent } from 'vs/editor/browser/editorBrowser'; </del> <ins> import { IEditorMouseEvent, IMouseTarget, IMouseTargetViewZoneData, IPartialEditorMouseEvent, MouseTargetType } from 'vs/editor/browser/editorBrowser'; </ins> import { ICoordinatesConverter } from 'vs/editor/common/viewModel'; import { IMouseWheelEvent } from 'vs/base/browser/mouseEvent'; <ins> import { Position } from 'vs/editor/common/core/position'; </ins> export interface EventCallback<T> { (event: T): void;
if (result.range) { result.range = coordinatesConverter.convertViewRangeToModelRange(result.range); } <ins> if (result.type === MouseTargetType.GUTTER_VIEW_ZONE || result.type === MouseTargetType.CONTENT_VIEW_ZONE) { result.detail = this.convertViewToModelViewZoneData(result.detail, coordinatesConverter); } </ins> return result; } <ins> 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, }; } </ins> }
})); // Revert change when an arrow is clicked. <del> this._register(editor.onMouseUp(event => { </del> <ins> this._register(editor.onMouseDown(event => { </ins> 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;
// 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); <del> const source = extension?.description ?? group[0].extension.value; </del> <ins> const source = extension?.displayName ?? extension?.description ?? group[0].extension.value; </ins> if (group.length > 1) { quickPickItems.push({ label: source,
"inputOption.activeBackground": "#2489db82", "inputOption.activeBorder": "#2488db", "keybindingLabel.foreground": "#cccccc", <del> "list.activeSelectionBackground": "#ffffff0f", </del> <ins> "list.activeSelectionBackground": "#323232", </ins> "list.activeSelectionIconForeground": "#ffffff", "list.activeSelectionForeground": "#ffffff", "menu.background": "#1f1f1f",
return cloneAndChange(data, value => { // If it's a trusted value it means it's okay to skip cleaning so we don't clean it <del> if (value instanceof TelemetryTrustedValue || value.hasOwnProperty('isTrustedTelemetryValue')) { </del> <ins> if (value instanceof TelemetryTrustedValue || Object.hasOwnProperty.call(value, 'isTrustedTelemetryValue')) { </ins> return value.value; }
} let index: number; <del> if (this.editor.hasModel() && (typeof lineNumber === 'number')) { </del> <ins> if (this.editor.hasModel() && (typeof lineNumber === 'number' || !this.widget.provider)) { </ins> 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;
const possibleChangesLength = possibleChanges.length; if (inclusive) { <del> if ((getModifiedEndLineNumber(change.change) >= lineNumber) && (change.change.modifiedStartLineNumber <= lineNumber)) { </del> <ins> if (getModifiedEndLineNumber(change.change) >= lineNumber) { </ins> if (preferredProvider && change.label !== preferredProvider) { possibleChanges.push(i); } else {
const lineResult = parseSearchResults(document, token)[position.line]; if (!lineResult) { return []; } if (lineResult.type === 'file') { <del> return lineResult.allLocations; </del> <ins> return lineResult.allLocations.map(l => ({ ...l, originSelectionRange: lineResult.location.originSelectionRange })); </ins> } const location = lineResult.locations.find(l => l.originSelectionRange.contains(position));
{ 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.") }, <del> { label: 'pathSeparator', detail: vscode.l10n.t("The character used by the operating system to separate components in file paths") }, </del> <ins> { label: 'pathSeparator', detail: vscode.l10n.t("The character used by the operating system to separate components in file paths. Is also aliased to '/'.") }, </ins> { label: 'extensionInstallFolder', detail: vscode.l10n.t("The path where an an extension is installed."), param: 'publisher.extension' }, ].map(variable => ({ label: `${${variable.label}}`,
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'; <del> 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'; </del> <ins> 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'; </ins> 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';
private async handleCandidateUpdate(removed: Map<string, { host: string; port: number }>) { const removedPorts: number[] = []; <del> let autoForwarded: Set<string>; </del> <ins> let autoForwarded: Map<string, string | Tunnel>; </ins> if (this.unforwardOnly) { <del> autoForwarded = new Set(); </del> <ins> autoForwarded = new Map(); </ins> for (const entry of this.remoteExplorerService.tunnelModel.forwarded.entries()) { if (entry[1].source.source === TunnelSource.Auto) { <del> autoForwarded.add(entry[0]); </del> <ins> autoForwarded.set(entry[0], entry[1]); </ins> } } } else { <del> autoForwarded = this.autoForwarded; </del> <ins> autoForwarded = new Map(this.autoForwarded.entries()); </ins> } for (const removedPort of removed) { const key = removedPort[0]; <del> const value = removedPort[1]; if (autoForwarded.has(key)) { </del> <ins> 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 }; } </ins> await this.remoteExplorerService.close(value); <del> autoForwarded.delete(key); </del> removedPorts.push(value.port); } else if (this.notifiedOnly.has(key)) { this.notifiedOnly.delete(key);
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'; <del> import { BufferLogger } from 'vs/platform/log/common/bufferLog'; import { FileLoggerService } from 'vs/platform/log/common/fileLog'; </del> 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';
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'; <ins> import { BufferLogger } from 'vs/platform/log/common/bufferLog'; import { FileLoggerService } from 'vs/platform/log/common/fileLog'; </ins> export class BrowserMain extends Disposable {
const environmentService = new BrowserWorkbenchEnvironmentService(workspace.id, logsPath, this.configuration, productService); serviceCollection.set(IBrowserWorkbenchEnvironmentService, environmentService); <del> // Log const logLevel = getLogLevel(environmentService); const bufferLogger = new BufferLogger(logLevel); const otherLoggers: ILogger[] = [new ConsoleLogger(logLevel)]; </del> <ins> // 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())]; </ins> if (environmentService.isExtensionDevelopment && !!environmentService.extensionTestsLocationURI) { <del> otherLoggers.push(new ConsoleLogInAutomationLogger(logLevel)); </del> <ins> otherLoggers.push(new ConsoleLogInAutomationLogger(loggerService.getLogLevel())); </ins> } <del> const logService = new LogService(bufferLogger, otherLoggers); </del> <ins> const logger = loggerService.createLogger(environmentService.logFile, { id: windowLogId, name: localize('rendererLog', "Window") }); const logService = new LogService(logger, otherLoggers); </ins> serviceCollection.set(ILogService, logService); <ins> // 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); </ins> // Remote const connectionToken = environmentService.options.connectionToken || getCookieValue(connectionTokenCookieName); const remoteAuthorityResolverService = new RemoteAuthorityResolverService(!environmentService.expectsResolverExtension, connectionToken, this.configuration.resourceUriProvider, productService, logService);
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! <del> // 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); </del> // URI Identity const uriIdentityService = new UriIdentityService(fileService); serviceCollection.set(IUriIdentityService, uriIdentityService);
} } <del> private async registerIndexedDBFileSystemProviders(environmentService: IWorkbenchEnvironmentService, fileService: IWorkbenchFileService, bufferLogger: BufferLogger, logService: ILogService, loggerService: ILoggerService, logsPath: URI): Promise<void> { </del> <ins> private async registerIndexedDBFileSystemProviders(environmentService: IWorkbenchEnvironmentService, fileService: IWorkbenchFileService, logService: ILogService, loggerService: ILoggerService, logsPath: URI): Promise<void> { </ins> // IndexedDB is used for logging and user data let indexedDB: IndexedDB | undefined; const userDataStore = 'vscode-userdata-store';
const inputWidget = this.instantiationService.createInstance(SCMInputWidget, inputElement, this.overflowWidgetsDomNode); templateDisposable.add(inputWidget); <del> return { inputWidget, elementDisposables: templateDisposable.add(new DisposableStore()), templateDisposable }; </del> <ins> return { inputWidget, elementDisposables: new DisposableStore(), templateDisposable }; </ins> } renderElement(node: ITreeNode<ISCMInput, FuzzyScore>, index: number, templateData: InputTemplate): void {
// Remember widget this.inputWidgets.set(input, templateData.inputWidget); <del> templateData.elementDisposables.add({ dispose: () => this.inputWidgets.delete(input) }); </del> <ins> templateData.elementDisposables.add({ dispose: () => { this.inputWidgets.delete(input); this.contentHeights.delete(input); } }); </ins> // Widget cursor selections const selections = this.editorSelections.get(input);
const timeout = window.setTimeout(() => this.remove(status), duration); this._statusTimeouts.set(status.id, timeout); } <ins> const existingStatus = this._statuses.get(status.id); if (existingStatus && existingStatus !== status) { this._onDidRemoveStatus.fire(existingStatus); this._statuses.delete(existingStatus.id); } </ins> if (!this._statuses.has(status.id)) { const oldPrimary = this.primary; this._statuses.set(status.id, status);
if (oldPrimary !== newPrimary) { this._onDidChangePrimaryStatus.fire(newPrimary); } <del> } 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); </del> } }
strictEqual(list.statuses[1].icon!.id, Codicon.zap.id, 'zap~spin should have animation removed only'); }); <ins> 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' ]); }); </ins> test('remove', () => { list.add({ id: 'info', severity: Severity.Info }); list.add({ id: 'warning', severity: Severity.Warning });
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'; <ins> 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'; </ins> class InspectContextKeysAction extends Action2 {
} run(accessor: ServicesAccessor): void { <del> accessor.get(IStorageService).log(); </del> <ins> 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.")); </ins> } }
EditorOption.ariaLabel, 'ariaLabel', nls.localize('editorViewAccessibleLabel', "Editor content") )), screenReaderAnnounceInlineSuggestion: register(new EditorBooleanOption( <del> EditorOption.screenReaderAnnounceInlineSuggestion, 'screenReaderAnnounceInlineSuggestion', false, </del> <ins> EditorOption.screenReaderAnnounceInlineSuggestion, 'screenReaderAnnounceInlineSuggestion', true, </ins> { description: nls.localize('screenReaderAnnounceInlineSuggestion', "Control whether inline suggestions are announced by a screen reader."), tags: ['accessibility']
'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`, <ins> 'xterm-addon-serialize': `${baseNodeModulesPath}/xterm-addon-serialize/lib/xterm-addon-serialize.js`, </ins> '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`,
entryId, name: item.entry.name, text: item.entry.text, <del> command: typeof item.entry.command === 'string' ? item.entry.command : undefined, </del> <ins> command: typeof item.entry.command === 'string' ? item.entry.command : typeof item.entry.command === 'object' ? item.entry.command.id : undefined, </ins> priority: item.priority, alignLeft: item.alignment === StatusbarAlignment.LEFT };
throw e; } <del> 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'; } </del> 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.`);
scope: scopeData.scopeStr, sessionId, account: { <del> label, </del> <ins> label: claims.email ?? claims.preferred_username ?? claims.unique_name ?? 'user@example.com', </ins> id, type: claims.tid === MSA_TID || claims.tid === MSA_PASSTHRU_TID ? MicrosoftAccountType.MSA : MicrosoftAccountType.AAD }
if (account.canSignOut) { const signOutAction = disposables.add(new Action('signOut', localize('signOut', "Sign Out"), undefined, true, async () => { const allSessions = await this.authenticationService.getSessions(providerId); <del> const sessionsForAccount = allSessions.filter(s => s.account.id === account.id); </del> <ins> const sessionsForAccount = allSessions.filter(s => s.account.label === account.label); </ins> return await this.authenticationService.removeAccountSessions(providerId, account.label, sessionsForAccount); })); providerSubMenuActions.push(signOutAction);