jiebi/CodeConvo huggingface dataset:
this.categoriesSlide = $('.gettingStartedSlideCategories.gettingStartedSlide'); <del> const prevButton = $('button.prev-button.button-link', { 'x-dispatch': 'scrollPrev' }, $('span.scroll-button.codicon.codicon-chevron-left'), $('span.moreText', {}, localize('getStarted', "Get Started"))); </del> <ins> const prevButton = $('button.prev-button.button-link', { 'x-dispatch': 'scrollPrev' }, $('span.scroll-button.codicon.codicon-chevron-left'), $('span.moreText', {}, localize('welcome', "Welcome"))); </ins> this.stepsSlide = $('.gettingStartedSlideDetails.gettingStartedSlide', {}, prevButton); this.stepsContent = $('.gettingStartedDetailsContent', {});
// Seprate from main module to break dependency cycles between welcomePage and gettingStarted. export const welcomePageBackground = registerColor('welcomePage.background', { light: null, dark: null, hcDark: null, hcLight: null }, localize('welcomePage.background', 'Background color for the Welcome page.')); <del> export const welcomePageTileBackground = registerColor('welcomePage.tileBackground', { dark: editorWidgetBackground, light: editorWidgetBackground, hcDark: '#000', hcLight: editorWidgetBackground }, localize('welcomePage.tileBackground', 'Background color for the tiles on the Get Started page.')); export const welcomePageTileHoverBackground = registerColor('welcomePage.tileHoverBackground', { dark: lighten(editorWidgetBackground, .2), light: darken(editorWidgetBackground, .1), hcDark: null, hcLight: null }, localize('welcomePage.tileHoverBackground', 'Hover background color for the tiles on the Get Started.')); export const welcomePageTileBorder = registerColor('welcomePage.tileBorder', { dark: '#ffffff1a', light: '#0000001a', hcDark: contrastBorder, hcLight: contrastBorder }, localize('welcomePage.tileBorder', 'Border color for the tiles on the Get Started page.')); </del> <ins> export const welcomePageTileBackground = registerColor('welcomePage.tileBackground', { dark: editorWidgetBackground, light: editorWidgetBackground, hcDark: '#000', hcLight: editorWidgetBackground }, localize('welcomePage.tileBackground', 'Background color for the tiles on the Welcome page.')); export const welcomePageTileHoverBackground = registerColor('welcomePage.tileHoverBackground', { dark: lighten(editorWidgetBackground, .2), light: darken(editorWidgetBackground, .1), hcDark: null, hcLight: null }, localize('welcomePage.tileHoverBackground', 'Hover background color for the tiles on the Welcome.')); export const welcomePageTileBorder = registerColor('welcomePage.tileBorder', { dark: '#ffffff1a', light: '#0000001a', hcDark: contrastBorder, hcLight: contrastBorder }, localize('welcomePage.tileBorder', 'Border color for the tiles on the Welcome page.')); </ins> export const welcomePageProgressBackground = registerColor('welcomePage.progress.background', { light: inputBackground, dark: inputBackground, hcDark: inputBackground, hcLight: inputBackground }, localize('welcomePage.progress.background', 'Foreground color for the Welcome page progress bars.'));
* Record the start of the input event. */ export function onInput() { <ins> if (state.input === EventPhase.Before) { // it looks like we didn't receive a `beforeinput` onBeforeInput(); } </ins> queueMicrotask(markInputEnd); } function markInputEnd() { <del> performance.mark('input/end'); state.input = EventPhase.Finished; </del> <ins> if (state.input === EventPhase.InProgress) { performance.mark('input/end'); state.input = EventPhase.Finished; } </ins> } /**
return this._scrollBeyondLastLine && !this.isEmbedded; } <del> layout(dimension: DOM.Dimension, shadowElement?: HTMLElement, position?: DOM.IDomPosition): void { </del> <ins> layout(dimension: DOM.Dimension, shadowElement?: HTMLElement, _position?: DOM.IDomPosition): void { </ins> if (!shadowElement && this._shadowElementViewInfo === null) { this._dimension = dimension; return;
this._overlayContainer.style.position = 'absolute'; this._overlayContainer.style.overflow = 'hidden'; <del> this.layoutContainerOverShadowElement(dimension, position); </del> <ins> this.layoutContainerOverShadowElement(dimension, /*position*/ undefined); </ins> if (this._webviewTransparentCover) { this._webviewTransparentCover.style.height = `${dimension.height}px`;
this._ctxCanNavigate.set(Boolean(this._delegate)); } <ins> private _ensureSelectedElementIsVisible(): void { if (this._view.selection.length === 0) { return; } const [item] = this._view.selection; const location = this._delegate?.location(item); if (!location) { return; } if (vscode.window.activeTextEditor?.document.uri.toString() !== location.uri.toString()) { this._open(location, true); } } </ins> private _anchor(): undefined | unknown { if (!this._delegate) { return undefined;
} location(item: FileItem | ReferenceItem) { <del> return item instanceof ReferenceItem ? item.location : undefined; </del> <ins> return item instanceof ReferenceItem ? item.location : new vscode.Location(item.uri, item.references[0]?.location.range ?? new vscode.Position(0, 0)); </ins> } nearest(uri: vscode.Uri, position: vscode.Position): FileItem | ReferenceItem | undefined {
return false; // resource must not be pending to save } <del> if (this.filesConfigurationService.getAutoSaveMode() === AutoSaveMode.AFTER_SHORT_DELAY && !fileModel?.hasState(TextFileEditorModelState.ERROR)) { </del> <ins> if (resource.scheme !== Schemas.untitled && this.filesConfigurationService.getAutoSaveMode() === AutoSaveMode.AFTER_SHORT_DELAY && !fileModel?.hasState(TextFileEditorModelState.ERROR)) { </ins> // leave models auto saved after short delay unless <del> // the save resulted in an error </del> <ins> // the save resulted in an error and not for untitled // that are not auto-saved anyway </ins> return false; }
} } <del> test('dirty untitled text file model opens as editor', async function () { const accessor = await createTracker(); </del> <ins> test('dirty untitled text file model opens as editor', function () { return testUntitledEditor(false); }); test('dirty untitled text file model opens as editor - autosave ON', function () { return testUntitledEditor(true); }); async function testUntitledEditor(autoSaveEnabled: boolean): Promise<void> { const accessor = await createTracker(autoSaveEnabled); </ins> const untitledTextEditor = await accessor.textEditorService.resolveTextEditor({ resource: undefined, forceUntitled: true }) as UntitledTextEditorInput; const model = disposables.add(await untitledTextEditor.resolve());
get providers(): Map<string, ITerminalQuickFixProvider> { return this._providers; } constructor(@ITerminalContributionService private readonly _terminalContributionService: ITerminalContributionService) { <del> for (const selector of this._terminalContributionService.quickFixes) { this.registerCommandSelector(selector); } </del> <ins> this._terminalContributionService.quickFixes.then(selectors => { for (const selector of selectors) { this.registerCommandSelector(selector); } }); </ins> } registerCommandSelector(selector: ITerminalCommandSelector): void {
})); } this._register(this._quickFixService.onDidRegisterProvider(result => this.registerCommandFinishedListener(convertToQuickFixOptions(result)))); <del> for (const selector of terminalContributionService.quickFixes) { this.registerCommandSelector(selector); } </del> <ins> terminalContributionService.quickFixes.then(quickFixSelectors => { for (const selector of quickFixSelectors) { this.registerCommandSelector(selector); } }); </ins> this._register(this._quickFixService.onDidRegisterCommandSelector(selector => this.registerCommandSelector(selector))); this._register(this._quickFixService.onDidUnregisterProvider(id => this._commandListeners.delete(id))); }
readonly _serviceBrand: undefined; readonly terminalProfiles: ReadonlyArray<IExtensionTerminalProfile>; <del> readonly quickFixes: Array<ITerminalCommandSelector>; </del> <ins> readonly quickFixes: Promise<Array<ITerminalCommandSelector>>; </ins> } export const ITerminalContributionService = createDecorator<ITerminalContributionService>('terminalContributionsService');
private _terminalProfiles: ReadonlyArray<IExtensionTerminalProfile> = []; get terminalProfiles() { return this._terminalProfiles; } <del> private _quickFixes: Array<ITerminalCommandSelector> = []; get quickFixes() { return this._quickFixes; } </del> <ins> quickFixes: Promise<Array<ITerminalCommandSelector>>; </ins> constructor() { <del> terminalsExtPoint.setHandler(contributions => { </del> <ins> this.quickFixes = new Promise((r) => terminalsExtPoint.setHandler(contributions => { </ins> this._terminalProfiles = contributions.map(c => { return c.value?.profiles?.filter(p => hasValidTerminalIcon(p)).map(e => { return { ...e, extensionIdentifier: c.description.identifier.value }; }) || []; }).flat(); <del> this._quickFixes = (contributions.filter(c => isProposedApiEnabled(c.description, 'terminalQuickFixProvider')).map(c => c.value.quickFixes ? c.value.quickFixes.map(fix => { return { ...fix, extensionIdentifier: c.description.identifier.value }; }) : [])).flat(); }); </del> <ins> const quickFixes = (contributions.filter(c => isProposedApiEnabled(c.description, 'terminalQuickFixProvider')).map(c => c.value.quickFixes ? c.value.quickFixes.map(fix => { return { ...fix, extensionIdentifier: c.description.identifier.value }; }) : [])).flat(); r(quickFixes); })); </ins> } }
rows: 30 }); instantiationService.stub(IStorageService, new TestStorageService()); <del> instantiationService.stub(ITerminalContributionService, { quickFixes: [] } as Partial<ITerminalContributionService>); </del> <ins> instantiationService.stub(ITerminalContributionService, { quickFixes: new Promise((r) => { r([]); }) } as Partial<ITerminalContributionService>); </ins> instantiationService.stub(ITerminalQuickFixService, { onDidRegisterProvider: new Emitter().event, onDidUnregisterProvider: new Emitter().event, onDidRegisterCommandSelector: new Emitter().event } as Partial<ITerminalQuickFixService>); instantiationService.stub(IConfigurationService, new TestConfigurationService()); instantiationService.stub(ILabelService, {} as Partial<ILabelService>);
class TestTerminalContributionService implements ITerminalContributionService { _serviceBrand: undefined; terminalProfiles: readonly IExtensionTerminalProfile[] = []; <del> quickFixes: ITerminalCommandSelector[] = []; </del> <ins> quickFixes: Promise<ITerminalCommandSelector[]> = new Promise((r) => { r([]); }); </ins> setProfiles(profiles: IExtensionTerminalProfile[]): void { this.terminalProfiles = profiles; }
import { ITerminalContributionService } from 'vs/workbench/contrib/terminal/common/terminalExtensionPoints'; export class TerminalQuickFixService implements ITerminalQuickFixService { <ins> declare _serviceBrand: undefined; private _selectors: Map<string, ITerminalCommandSelector> = new Map(); private _providers: Map<string, ITerminalQuickFixProvider> = new Map(); get providers(): Map<string, ITerminalQuickFixProvider> { return this._providers; } </ins> private readonly _onDidRegisterProvider = new Emitter<ITerminalQuickFixProviderSelector>(); readonly onDidRegisterProvider = this._onDidRegisterProvider.event; private readonly _onDidRegisterCommandSelector = new Emitter<ITerminalCommandSelector>(); readonly onDidRegisterCommandSelector = this._onDidRegisterCommandSelector.event; private readonly _onDidUnregisterProvider = new Emitter<string>(); readonly onDidUnregisterProvider = this._onDidUnregisterProvider.event; <del> _serviceBrand: undefined; _providers: Map<string, ITerminalQuickFixProvider> = new Map(); _selectors: Map<string, ITerminalCommandSelector> = new Map(); get providers(): Map<string, ITerminalQuickFixProvider> { return this._providers; } </del> constructor(@ITerminalContributionService private readonly _terminalContributionService: ITerminalContributionService) { this._terminalContributionService.quickFixes.then(selectors => {
} registerQuickFixProvider(id: string, provider: ITerminalQuickFixProvider): IDisposable { <del> this._providers.set(id, provider); const selector = this._selectors.get(id); if (!selector) { throw new Error(`No registered selector for ID: ${id}`); } this._onDidRegisterProvider.fire({ selector, provider }); </del> <ins> // This is more complicated than it looks like it should be because we need to return an // IDisposable synchronously but we must await ITerminalContributionService.quickFixes // asynchronously before actually registering the provider. let disposed = false; this._terminalContributionService.quickFixes.then(() => { if (disposed) { return; } this._providers.set(id, provider); const selector = this._selectors.get(id); if (!selector) { throw new Error(`No registered selector for ID: ${id}`); } this._onDidRegisterProvider.fire({ selector, provider }); }); </ins> return toDisposable(() => { <del> this._selectors.delete(id); </del> <ins> disposed = true; </ins> this._providers.delete(id); <del> this._onDidUnregisterProvider.fire(selector.id); </del> <ins> const selector = this._selectors.get(id); if (selector) { this._selectors.delete(id); this._onDidUnregisterProvider.fire(selector.id); } </ins> }); } }
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IShellLaunchConfig, TerminalExitReason, TerminalLocation, TerminalSettingId } from 'vs/platform/terminal/common/terminal'; import { IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsService'; <del> import { ILifecycleService } from 'vs/workbench/services/lifecycle/common/lifecycle'; </del> <ins> import { ILifecycleService, ShutdownReason, WillShutdownEvent } from 'vs/workbench/services/lifecycle/common/lifecycle'; </ins> import { ConfirmOnKill } from 'vs/workbench/contrib/terminal/common/terminal'; import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
// Don't dispose editor when instance is torn down on shutdown to avoid extra work and so // the editor/tabs don't disappear <del> this._lifecycleService.onWillShutdown(() => { </del> <ins> this._lifecycleService.onWillShutdown((e: WillShutdownEvent) => { </ins> this._isShuttingDown = true; dispose(disposeListeners); <ins> // Don't touch processes if the shutdown was a result of reload as they will be reattached const shouldPersistTerminals = this._configurationService.getValue<boolean>(TerminalSettingId.EnablePersistentSessions) && e.reason === ShutdownReason.RELOAD; if (shouldPersistTerminals) { instance.detachProcessAndDispose(TerminalExitReason.Shutdown); } else { instance.dispose(TerminalExitReason.Shutdown); } </ins> }); }
return TerminalInstance._lastKnownCanvasDimensions; } <del> set shutdownPersistentProcessId(shutdownPersistentProcessId: number | undefined) { this._shutdownPersistentProcessId = shutdownPersistentProcessId; } get persistentProcessId(): number | undefined { return this._processManager.persistentProcessId ?? this._shutdownPersistentProcessId; } get shouldPersist(): boolean { return (this._processManager.shouldPersist || this._shutdownPersistentProcessId !== undefined) && !this.shellLaunchConfig.isTransient && (!this.reconnectionProperties || this._configurationService.getValue(TaskSettingId.Reconnection) === true); } </del> <ins> get persistentProcessId(): number | undefined { return this._processManager.persistentProcessId; } get shouldPersist(): boolean { return this._processManager.shouldPersist && !this.shellLaunchConfig.isTransient && (!this.reconnectionProperties || this._configurationService.getValue(TaskSettingId.Reconnection) === true); } </ins> /** * Create xterm.js instance and attach data listeners.
// Don't touch processes if the shutdown was a result of reload as they will be reattached const shouldPersistTerminals = this._configHelper.config.enablePersistentSessions && e.reason === ShutdownReason.RELOAD; if (shouldPersistTerminals) { <del> for (const instance of this.instances) { </del> <ins> for (const instance of this._terminalGroupService.instances) { </ins> instance.detachProcessAndDispose(TerminalExitReason.Shutdown); } return; } <del> // Force dispose of all terminal instances const shouldPersistTerminalsForEvent = this._shouldReviveProcesses(e.reason); for (const instance of this.instances) { if (shouldPersistTerminalsForEvent) { instance.shutdownPersistentProcessId = instance.persistentProcessId; } </del> <ins> // Force dispose of all pane terminal instances for (const instance of this._terminalGroupService.instances) { </ins> instance.dispose(TerminalExitReason.Shutdown); }
this.cell.editorHeight = contentHeight; } <ins> private _editorLayoutInProgress = false; </ins> layout(state: IDiffElementLayoutState) { DOM.scheduleAtNextAnimationFrame(() => { <ins> this._editorLayoutInProgress = true; </ins> if (state.editorHeight) { this._editorContainer.style.height = `${this.cell.layoutInfo.editorHeight}px`; this._editor!.layout({
const workbenchRegistry = Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench); workbenchRegistry.registerWorkbenchContribution(ExtensionsContributions, LifecyclePhase.Restored); <del> workbenchRegistry.registerWorkbenchContribution(StatusUpdater, LifecyclePhase.Restored); </del> <ins> workbenchRegistry.registerWorkbenchContribution(StatusUpdater, LifecyclePhase.Eventually); </ins> workbenchRegistry.registerWorkbenchContribution(MaliciousExtensionChecker, LifecyclePhase.Eventually); workbenchRegistry.registerWorkbenchContribution(KeymapExtensions, LifecyclePhase.Restored); workbenchRegistry.registerWorkbenchContribution(ExtensionsViewletViewsContribution, LifecyclePhase.Restored);
return nls.localize('postUpdateTooltip', "Please reload Visual Studio Code to enable the updated extension."); } <del> const extensionInOtherServer = this.installed.filter(e => areSameExtensions(e.identifier, extension!.identifier) && e.server !== extension!.server)[0]; if (extensionInOtherServer) { // This extension prefers to run on UI/Local side but is running in remote if (runningExtensionServer === this.extensionManagementServerService.remoteExtensionManagementServer && this.extensionManifestPropertiesService.prefersExecuteOnUI(extension.local!.manifest) && extensionInOtherServer.server === this.extensionManagementServerService.localExtensionManagementServer) { return nls.localize('enable locally', "Please reload Visual Studio Code to enable this extension locally."); } </del> <ins> if (this.extensionsServers.length > 1) { const extensionInOtherServer = this.installed.filter(e => areSameExtensions(e.identifier, extension!.identifier) && e.server !== extension!.server)[0]; if (extensionInOtherServer) { // This extension prefers to run on UI/Local side but is running in remote if (runningExtensionServer === this.extensionManagementServerService.remoteExtensionManagementServer && this.extensionManifestPropertiesService.prefersExecuteOnUI(extension.local!.manifest) && extensionInOtherServer.server === this.extensionManagementServerService.localExtensionManagementServer) { return nls.localize('enable locally', "Please reload Visual Studio Code to enable this extension locally."); } </ins> <del> // This extension prefers to run on Workspace/Remote side but is running in local if (runningExtensionServer === this.extensionManagementServerService.localExtensionManagementServer && this.extensionManifestPropertiesService.prefersExecuteOnWorkspace(extension.local!.manifest) && extensionInOtherServer.server === this.extensionManagementServerService.remoteExtensionManagementServer) { return nls.localize('enable remote', "Please reload Visual Studio Code to enable this extension in {0}.", this.extensionManagementServerService.remoteExtensionManagementServer?.label); </del> <ins> // This extension prefers to run on Workspace/Remote side but is running in local if (runningExtensionServer === this.extensionManagementServerService.localExtensionManagementServer && this.extensionManifestPropertiesService.prefersExecuteOnWorkspace(extension.local!.manifest) && extensionInOtherServer.server === this.extensionManagementServerService.remoteExtensionManagementServer) { return nls.localize('enable remote', "Please reload Visual Studio Code to enable this extension in {0}.", this.extensionManagementServerService.remoteExtensionManagementServer?.label); } </ins> } }
const viewsService = serviceAccessor.get(IViewsService); const viewContainerLocation = viewDescriptorService.getViewContainerLocation(viewContainer); switch (viewContainerLocation) { <del> case ViewContainerLocation.Sidebar: if (!viewsService.isViewContainerVisible(viewContainer.id) || !layoutService.hasFocus(Parts.SIDEBAR_PART)) { </del> <ins> case ViewContainerLocation.AuxiliaryBar: case ViewContainerLocation.Sidebar: { const part = viewContainerLocation === ViewContainerLocation.Sidebar ? Parts.SIDEBAR_PART : Parts.AUXILIARYBAR_PART; if (!viewsService.isViewContainerVisible(viewContainer.id) || !layoutService.hasFocus(part)) { </ins> await viewsService.openViewContainer(viewContainer.id, true); } else { editorGroupService.activeGroup.focus(); } break; <ins> } </ins> case ViewContainerLocation.Panel: if (!viewsService.isViewContainerVisible(viewContainer.id) || !layoutService.hasFocus(Parts.PANEL_PART)) { await viewsService.openViewContainer(viewContainer.id, true);
return value.content; } } catch (parseError) { <ins> // We may not be able to parse it, but we keep the secret in the keychain anyway just in case // it decrypts correctly in the future. </ins> this.logService.error(parseError); <del> // If we can't parse the decrypted value, then it's not a valid secret so we should try to delete it try { await this.credentialsService.deletePassword(fullKey, key); } catch (e) { this.logService.error(e); } </del> throw new Error('Unable to parse decrypted password'); } }
const embeddedSvgsNotValid = l10n.t("Embedded SVGs are not a valid image source."); const dataUrlsNotValid = l10n.t("Data URLs are not a valid image source."); const relativeUrlRequiresHttpsRepository = l10n.t("Relative image URLs require a repository with HTTPS protocol to be specified in the package.json."); <del> const relativeIconUrlRequiresHttpsRepository = l10n.t("An icon requires a repository with HTTPS protocol to be specified in this package.json."); </del> const relativeBadgeUrlRequiresHttpsRepository = l10n.t("Relative badge URLs require a repository with HTTPS protocol to be specified in this package.json."); const apiProposalNotListed = l10n.t("This proposal cannot be used because for this extension the product defines a fixed set of API proposals. You can test your extension but before publishing you MUST reach out to the VS Code team."); const implicitActivationEvent = l10n.t("This activation event cannot be explicitly listed by your extension.");
diagnostics.push(new Diagnostic(range, dataUrlsNotValid, DiagnosticSeverity.Warning)); } <del> if (!hasScheme && !info.hasHttpsRepository) { </del> <ins> if (!hasScheme && !info.hasHttpsRepository && context !== Context.ICON) { </ins> const range = new Range(document.positionAt(begin), document.positionAt(end)); const message = (() => { switch (context) { <del> case Context.ICON: return relativeIconUrlRequiresHttpsRepository; </del> case Context.BADGE: return relativeBadgeUrlRequiresHttpsRepository; default: return relativeUrlRequiresHttpsRepository; }
import { ExtHostUriOpeners } from 'vs/workbench/api/common/extHostUriOpener'; import { IExtHostSecretState } from 'vs/workbench/api/common/extHostSecretState'; import { IExtHostEditorTabs } from 'vs/workbench/api/common/extHostEditorTabs'; <del> import { IExtHostTelemetry, isNewAppInstall } from 'vs/workbench/api/common/extHostTelemetry'; </del> <ins> import { ExtHostTelemetryLogger, IExtHostTelemetry, isNewAppInstall } from 'vs/workbench/api/common/extHostTelemetry'; </ins> import { ExtHostNotebookKernels } from 'vs/workbench/api/common/extHostNotebookKernels'; import { TextSearchCompleteMessageType } from 'vs/workbench/services/search/common/searchExtTypes'; import { ExtHostNotebookRenderers } from 'vs/workbench/api/common/extHostNotebookRenderers';