jiebi/CodeConvo huggingface dataset:
resolved "https://registry.yarnpkg.com/fast-plist/-/fast-plist-0.1.2.tgz#a45aff345196006d406ca6cdcd05f69051ef35b8" integrity sha1-pFr/NFGWAG1AbKbNzQX2kFHvNbg= <del> typescript@4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.2.tgz#1450f020618f872db0ea17317d16d8da8ddb8c4c" integrity sha512-tbb+NVrLfnsJy3M59lsDgrzWIflR4d4TIUjz+heUnHZwdF7YsrMTKoRERiIvI2lvBG95dfpLxB21WZhys1bgaQ== </del> <ins> typescript@4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.3.tgz#39062d8019912d43726298f09493d598048c1ce3" integrity sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw== </ins> vscode-grammar-updater@^1.0.3: version "1.0.3"
import { NativeHostService } from 'vs/platform/native/electron-sandbox/nativeHostService'; import { getIconsStyleSheet } from 'vs/platform/theme/browser/iconsStyleSheet'; import { applyZoom, zoomIn, zoomOut } from 'vs/platform/window/electron-sandbox/window'; <ins> import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { KeyCode } from 'vs/base/common/keyCodes'; </ins> const DEBUG_FLAGS_PATTERN = /s--(inspect|debug)(-brk|port)?=(d+)?/; const DEBUG_PORT_PATTERN = /s--(inspect|debug)-port=(d+)/;
this.tree.setInput({ processes: { processRoots } }); this.tree.layout(window.innerHeight, window.innerWidth); <ins> this.tree.onKeyDown(e => { const event = new StandardKeyboardEvent(e); if (event.keyCode === KeyCode.KeyE && event.altKey) { const selectionPids = this.getSelectedPids(); void Promise.all(selectionPids.map((pid) => this.nativeHostService.killProcess(pid, 'SIGTERM'))).then(() => this.tree?.refresh()); } }); </ins> this.tree.onContextMenu(e => { if (isProcessItem(e.element)) { this.showContextMenu(e.element, true);
label: localize('copy', "Copy"), click: () => { // Collect the selected pids <del> const selectionPids = this.tree?.getSelection()?.map(e => { if (!e || !('pid' in e)) { return undefined; } return e.pid; }).filter(e => !!e) as number[]; </del> <ins> const selectionPids = this.getSelectedPids(); </ins> // If the selection does not contain the right clicked item, copy the right clicked // item only. if (!selectionPids?.includes(pid)) {
constructor(@IStateService private stateService: IStateService, @IConfigurationService private configurationService: IConfigurationService) { super(); <ins> // System Theme this._register(this.configurationService.onDidChangeConfiguration(e => { if (e.affectsConfiguration('window.systemColorTheme')) { this.updateSystemColorTheme(); } })); this.updateSystemColorTheme(); </ins> // Color Scheme changes <del> nativeTheme.on('updated', () => { this._onDidChangeColorScheme.fire(this.getColorScheme()); }); </del> <ins> this._register(Event.fromNodeEventEmitter(nativeTheme, 'updated')(() => this._onDidChangeColorScheme.fire(this.getColorScheme()))); } private updateSystemColorTheme(): void { switch (this.configurationService.getValue<'default' | 'auto' | 'light' | 'dark'>('window.systemColorTheme')) { case 'dark': nativeTheme.themeSource = 'dark'; break; case 'light': nativeTheme.themeSource = 'light'; break; case 'auto': switch (this.getBaseTheme()) { case 'vs': nativeTheme.themeSource = 'light'; break; case 'vs-dark': nativeTheme.themeSource = 'dark'; break; default: nativeTheme.themeSource = 'system'; } break; default: nativeTheme.themeSource = 'system'; break; } </ins> } getColorScheme(): IColorScheme {
let background = this.stateService.getItem<string | null>(THEME_BG_STORAGE_KEY, null); if (!background) { <del> const baseTheme = this.stateService.getItem<string>(THEME_STORAGE_KEY, 'vs-dark').split(' ')[0]; switch (baseTheme) { </del> <ins> switch (this.getBaseTheme()) { </ins> case 'vs': background = DEFAULT_BG_LIGHT; break; case 'hc-black': background = DEFAULT_BG_HC_BLACK; break; case 'hc-light': background = DEFAULT_BG_HC_LIGHT; break;
return background; } <ins> private getBaseTheme(): 'vs' | 'vs-dark' | 'hc-black' | 'hc-light' { const baseTheme = this.stateService.getItem<string>(THEME_STORAGE_KEY, 'vs-dark').split(' ')[0]; switch (baseTheme) { case 'vs': return 'vs'; case 'hc-black': return 'hc-black'; case 'hc-light': return 'hc-light'; default: return 'vs-dark'; } } </ins> saveWindowSplash(windowId: number | undefined, splash: IPartsSplash): void { // Update in storage
<ins> /*--------------------------------------------------------------------------------------------- *  Copyright (c) Microsoft Corporation. All rights reserved. *  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { localize } from 'vs/nls'; import { Registry } from 'vs/platform/registry/common/platform'; import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry'; import { isLinux } from 'vs/base/common/platform'; const configurationRegistry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration); configurationRegistry.registerConfiguration({ 'properties': { 'window.systemColorTheme': { 'type': 'string', 'enum': ['default', 'auto', 'light', 'dark'], 'enumDescriptions': [ localize('window.systemColorTheme.default', "System color theme matches the configured OS theme."), localize('window.systemColorTheme.auto', "Enforce a light system color theme when a light workbench color theme is configured and the same for configured dark workbench color themes."), localize('window.systemColorTheme.light', "Enforce a light system color theme."), localize('window.systemColorTheme.dark', "Enforce a dark system color theme."), ], 'markdownDescription': localize('window.systemColorTheme', "The system color theme applies to native UI elements such as native dialogs, menus and title bar. Even if your OS is configured in light appearance mode, you can select a dark system color theme for the window. You can also configure to automatically adjust based on the `#workbench.colorTheme#` setting."), 'default': 'default', 'included': !isLinux, // not supported on Linux (https://github.com/electron/electron/issues/28887) 'scope': ConfigurationScope.APPLICATION } } }); </ins>
// Terminal import 'vs/workbench/contrib/terminal/electron-sandbox/terminal.contribution'; <del> // Themes Support </del> <ins> // Themes </ins> import 'vs/workbench/contrib/themes/browser/themes.test.contribution'; <ins> import 'vs/workbench/services/themes/electron-sandbox/themes.contribution'; </ins> // User Data Sync import 'vs/workbench/contrib/userDataSync/electron-sandbox/userDataSync.contribution';
const shell = this._terminalService.getDefaultShell(true, configProvider); const shellArgs = this._terminalService.getDefaultShellArgs(true, configProvider); <ins> const terminalName = args.title || nls.localize('debug.terminal.title', "Debug Process"); </ins> const shellConfig = JSON.stringify({ shell, shellArgs }); <del> let terminal = await this._integratedTerminalInstances.checkout(shellConfig); </del> <ins> let terminal = await this._integratedTerminalInstances.checkout(shellConfig, terminalName); </ins> let cwdForPrepareCommand: string | undefined; let giveShellTimeToInitialize = false;
private _terminalInstances = new Map<vscode.Terminal, { lastUsedAt: number, config: string }>(); <del> public async checkout(config: string) { </del> <ins> public async checkout(config: string, name: string) { </ins> const entries = [...this._terminalInstances.entries()]; const promises = entries.map(([terminal, termInfo]) => createCancelablePromise(async ct => { <ins> // Only allow terminals that match the title.  See #123189 if (terminal.name !== name) { return null; } </ins> if (termInfo.lastUsedAt !== -1 && await hasChildProcesses(await terminal.processId)) { return null; }
} if (envVars) { <del> for (let key in envVars) { const value = envVars[key]; </del> <ins> // merge environment variables into a copy of the process.env const env = Object.assign({}, getSanitizedEnvironment(process), envVars); for (let key in env) { const value = env[key]; </ins> if (value === null) { osaArgs.push('-u'); osaArgs.push(key);
const bashCommand = `${quote(args)}; echo; read -p "${LinuxExternalTerminalService.WAIT_MESSAGE}" -n1;`; termArgs.push(`''${bashCommand}''`);	// wrapping argument in two sets of ' because node is so "friendly" that it removes one set... // merge environment variables into a copy of the process.env <del> const env = Object.assign({}, process.env, envVars); </del> <ins> const env = Object.assign({}, getSanitizedEnvironment(process), envVars); </ins> // delete environment variables that have a null value Object.keys(env).filter(v => env[v] === null).forEach(key => delete env[key]);
assert.deepStrictEqual(testObject.configurationModel.keys, []); }); <ins> test('Test empty property is not ignored', () => { const testObject = new ConfigurationModelParser('test'); testObject.parse(JSON.stringify({ '': 1 })); // deepStrictEqual seems to ignore empty properties, fall back // to comparing the output of JSON.stringify assert.strictEqual(JSON.stringify(testObject.configurationModel.contents), JSON.stringify({ '': 1 })); assert.deepStrictEqual(testObject.configurationModel.keys, ['']); }); </ins> test('Test registering the same property again', () => { Registry.as<IConfigurationRegistry>(Extensions.Configuration).registerConfiguration({ 'id': 'a',
} /** <ins> * Register an inlay hints provider. */ export function registerInlayHintsProvider(languageId: string, provider: modes.InlayHintsProvider): IDisposable { return modes.InlayHintsProviderRegistry.register(languageId, provider); } /** </ins> * Contains additional diagnostic information about the context in which * a [code action](#CodeActionProvider.provideCodeActions) is run. */
registerDocumentSemanticTokensProvider: <any>registerDocumentSemanticTokensProvider, registerDocumentRangeSemanticTokensProvider: <any>registerDocumentRangeSemanticTokensProvider, registerInlineCompletionsProvider: <any>registerInlineCompletionsProvider, <ins> registerInlayHintsProvider: <any>registerInlayHintsProvider, </ins> // enums DocumentHighlightKind: standaloneEnums.DocumentHighlightKind,
export function registerInlineCompletionsProvider(languageId: string, provider: InlineCompletionsProvider): IDisposable; /** <ins> * Register an inlay hints provider. */ export function registerInlayHintsProvider(languageId: string, provider: InlayHintsProvider): IDisposable; /** </ins> * Contains additional diagnostic information about the context in which * a [code action](#CodeActionProvider.provideCodeActions) is run. */
if (args.unit === EditorScroll_.Unit.Line) { // scrolling by model lines <del> const visibleViewRange = viewModel.getCompletelyVisibleViewRange(); </del> <ins> const futureViewport = viewModel.viewLayout.getFutureViewport(); const visibleViewRange = viewModel.getCompletelyVisibleViewRangeAtScrollTop(futureViewport.top); </ins> const visibleModelRange = viewModel.coordinatesConverter.convertViewRangeToModelRange(visibleViewRange); let desiredTopModelLineNumber: number;
getAriaLabel(element: IDisassembledInstructionEntry): string | null { let label = ''; <del> if (element.isBreakpointSet) { label += localize('breakpointIsSet', "Breakpoint is set"); } else if (element.allowBreakpoint) { label += localize('breakpointAllowed', "Can set breakpoint"); } </del> const instruction = element.instruction; <del> label += `, ${localize('instructionAddress', "Instruction address")}: ${instruction.address}`; </del> <ins> label += `${localize('instructionAddress', "Address")}: ${instruction.address}`; </ins> if (instruction.instructionBytes) { <del> label += `, ${localize('instructionBytes', "Instruction bytes")}: ${instruction.instructionBytes}`; </del> <ins> label += `, ${localize('instructionBytes', "Bytes")}: ${instruction.instructionBytes}`; </ins> } label += `, ${localize(`instructionText`, "Instruction")}: ${instruction.instruction}`;
import { IExtensionRecommendationNotificationService, RecommendationsNotificationResult, RecommendationSource } from 'vs/platform/extensionRecommendations/common/extensionRecommendations'; import { distinct } from 'vs/base/common/arrays'; import { DisposableStore } from 'vs/base/common/lifecycle'; <ins> import { CellUri } from 'vs/workbench/contrib/notebook/common/notebookCommon'; </ins> type FileExtensionSuggestionClassification = { userReaction: { classification: 'SystemMetaData', purpose: 'FeatureInsight' };
} private onModelAdded(model: ITextModel): void { <del> const uri = model.uri; const supportedSchemes = [Schemas.untitled, Schemas.file, Schemas.vscodeRemote, Schemas.vscodeNotebookCell]; </del> <ins> const uri = model.uri.scheme === Schemas.vscodeNotebookCell ? CellUri.parse(model.uri)?.notebook : model.uri; const supportedSchemes = [Schemas.untitled, Schemas.file, Schemas.vscodeRemote]; </ins> if (!uri || !supportedSchemes.includes(uri.scheme)) { return; }
} context.taskLoadIssues = Objects.deepClone(baseLoadIssues); } <del> if ((defaultBuildTask.rank > -1) && (defaultBuildTask.rank < 2) && defaultBuildTask.task) { </del> <ins> // There is some special logic for tasks with the labels "build" and "test". // Even if they are not marked as a task group Build or Test, we automagically group them as such. // However, if they are already grouped as Build or Test, we don't need to add this grouping. const defaultBuildGroupName = Types.isString(defaultBuildTask.task?.configurationProperties.group) ? defaultBuildTask.task?.configurationProperties.group : defaultBuildTask.task?.configurationProperties.group?._id; const defaultTestTaskGroupName = Types.isString(defaultTestTask.task?.configurationProperties.group) ? defaultTestTask.task?.configurationProperties.group : defaultTestTask.task?.configurationProperties.group?._id; if ((defaultBuildGroupName !== Tasks.TaskGroup.Build._id) && (defaultBuildTask.rank > -1) && (defaultBuildTask.rank < 2) && defaultBuildTask.task) { </ins> defaultBuildTask.task.configurationProperties.group = Tasks.TaskGroup.Build; <del> } else if ((defaultTestTask.rank > -1) && (defaultTestTask.rank < 2) && defaultTestTask.task) { </del> <ins> } else if ((defaultTestTaskGroupName !== Tasks.TaskGroup.Test._id) && (defaultTestTask.rank > -1) && (defaultTestTask.rank < 2) && defaultTestTask.task) { </ins> defaultTestTask.task.configurationProperties.group = Tasks.TaskGroup.Test; }
} } <ins> export class TestingSortByDurationAction extends ViewAction<TestingExplorerView> { public static readonly ID = 'testing.sortByDuration'; constructor() { super({ id: TestingSortByDurationAction.ID, viewId: Testing.ExplorerViewId, title: localize('testing.sortByDuration', "Sort by Duration"), toggled: TestingContextKeys.viewSorting.isEqualTo(TestExplorerViewSorting.ByDuration), menu: { id: MenuId.ViewTitle, order: ActionOrder.Sort, group: 'sortBy', when: ContextKeyExpr.equals('view', Testing.ExplorerViewId) } }); } /** * @override */ public runInView(_accessor: ServicesAccessor, view: TestingExplorerView) { view.viewModel.viewSorting = TestExplorerViewSorting.ByDuration; } } </ins> export class ShowMostRecentOutputAction extends Action2 { public static readonly ID = 'testing.showMostRecentOutput'; constructor() {
return (a instanceof TestTreeErrorMessage ? -1 : 0) + (b instanceof TestTreeErrorMessage ? 1 : 0); } <ins> const durationDelta = (b.duration || 0) - (a.duration || 0); if (this.viewModel.viewSorting === TestExplorerViewSorting.ByDuration && durationDelta !== 0) { return durationDelta; } </ins> const stateDelta = cmpPriority(a.state, b.state); if (this.viewModel.viewSorting === TestExplorerViewSorting.ByStatus && stateDelta !== 0) { return stateDelta;
import { Disposable } from 'vs/base/common/lifecycle'; import { ILogService } from 'vs/platform/log/common/log'; import { isWindows } from 'vs/base/common/platform'; <del> import { retry } from 'vs/base/common/async'; </del> <ins> import { retry, SequencerByKey } from 'vs/base/common/async'; </ins> interface ChunkedPassword { content: string;
return null; } <ins> return this._sequencer.queue(service + account, () => this.doGetPassword(keytar, service, account)); } private async doGetPassword(keytar: KeytarModule, service: string, account: string): Promise<string | null> { </ins> const password = await retry(() => keytar.getPassword(service, account), 50, 3); if (!password) { this.logService.trace('Did not get a password from keytar for account:', account);
throw e; } <del> if (isWindows && password.length > BaseCredentialsMainService.MAX_PASSWORD_LENGTH) { let index = 0; let chunk = 0; let hasNextChunk = true; while (hasNextChunk) { const passwordChunk = password.substring(index, index + BaseCredentialsMainService.PASSWORD_CHUNK_SIZE); index += BaseCredentialsMainService.PASSWORD_CHUNK_SIZE; hasNextChunk = password.length - index > 0; const content: ChunkedPassword = { content: passwordChunk, hasNextChunk: hasNextChunk }; await retry(() => keytar.setPassword(service, chunk ? `${account}-${chunk}` : account, JSON.stringify(content)), 50, 3); chunk++; } </del> <ins> await this._sequencer.queue(service + account, () => this.doSetPassword(keytar, service, account, password)); } </ins> <del> this.logService.trace(`Got${chunk ? ` ${chunk}-chunked` : ''} password from keytar for account:`, account); } else { </del> <ins> private async doSetPassword(keytar: KeytarModule, service: string, account: string, password: string): Promise<void> { if (!isWindows) { </ins> await retry(() => keytar.setPassword(service, account, password), 50, 3); <del> this.logService.trace('Got password from keytar for account:', account); </del> <ins> this.logService.trace('Set password from keytar for account:', account); this._onDidChangePassword.fire({ service, account }); return; </ins> } <ins> // On Windows, we have to chunk the password because the Windows Credential Manager only allows passwords of a max length. // So to make sure we can store passwords of any length, we chunk the password and store it as multiple passwords. // To ensure we store an password correctly, we first delete any existing password chunks and then store the new ones. await this.doDeletePassword(keytar, service, account); let index = 0; let chunk = 0; let hasNextChunk = true; const promises = []; while (hasNextChunk) { const passwordChunk = password.substring(index, index + BaseCredentialsMainService.PASSWORD_CHUNK_SIZE); index += BaseCredentialsMainService.PASSWORD_CHUNK_SIZE; hasNextChunk = password.length - index > 0; const content: ChunkedPassword = { content: passwordChunk, hasNextChunk: hasNextChunk }; promises.push(retry(() => keytar.setPassword(service, chunk ? `${account}-${chunk}` : account, JSON.stringify(content)), 50, 3)); chunk++; } await Promise.all(promises); this.logService.trace(`Set${chunk ? ` ${chunk}-chunked` : ''} password from keytar for account:`, account); </ins> this._onDidChangePassword.fire({ service, account }); }
throw e; } <ins> return await this._sequencer.queue(service + account, () => this.doDeletePassword(keytar, service, account)); } private async doDeletePassword(keytar: KeytarModule, service: string, account: string): Promise<boolean> { </ins> const password = await keytar.getPassword(service, account); if (!password) { this.logService.trace('Did not get a password to delete from keytar for account:', account);
document: vscode.TextDocument, link: string, ): { uri: vscode.Uri, tooltip?: string } | undefined { <del> const externalSchemeUri = getUriForLinkWithKnownExternalScheme(link); </del> <ins> const cleanLink = stripAngleBrackets(link); const externalSchemeUri = getUriForLinkWithKnownExternalScheme(cleanLink); </ins> if (externalSchemeUri) { // Normalize VS Code links to target currently running version if (isOfScheme(Schemes.vscode, link) || isOfScheme(Schemes['vscode-insiders'], link)) {
} } <ins> /* Used to strip brackets from the markdown link <http://example.com> will be transformed to http://example.com */ export function stripAngleBrackets(link: string) { const bracketMatcher = /^<(.*)>$/; return link.replace(bracketMatcher, '$1'); } </ins> export default class LinkProvider implements vscode.DocumentLinkProvider { private readonly linkPattern = /([((![[^]]*?](s*)([^s()]+?)s*)]|(?:]|[^]])*])(s*)(([^s()]|([^s()]*?))+)s*(".*?")?)/g; private readonly referenceLinkPattern = /([((?:]|[^]])+)][s*?)([^s]]*?)]/g;
this.defaultSettingsEditorModel = model; options = options || validateSettingsEditorOptions({}); <del> if (!this.viewState.settingsTarget) { if (!options.target) { </del> <ins> if (!this.viewState.settingsTarget || !this.settingsTargetsWidget.settingsTarget) { const optionsHasViewStateTarget = options.viewState && (options.viewState as ISettingsEditorViewState).settingsTarget; if (!options.target && !optionsHasViewStateTarget) { </ins> options.target = ConfigurationTarget.USER_LOCAL; } }
this.focusSearch(); } <del> if (options.query) { this.searchWidget.setValue(options.query); </del> <ins> const recoveredViewState = options.viewState ? options.viewState as ISettingsEditorViewState : undefined; const query: string | undefined = recoveredViewState?.query ?? options.query; if (query !== undefined) { this.searchWidget.setValue(query); this.viewState.query = query; </ins> } <del> const target: SettingsTarget = options.folderUri || <SettingsTarget>options.target; </del> <ins> const target: SettingsTarget | undefined = options.folderUri ?? recoveredViewState?.settingsTarget ?? <SettingsTarget | undefined>options.target; </ins> if (target) { this.settingsTargetsWidget.settingsTarget = target; this.viewState.settingsTarget = target;
this.settingsTreeModel.update(resolvedSettingsRoot); this.tocTreeModel.settingsTreeRoot = this.settingsTreeModel.root as SettingsTreeGroupElement; <del> const cachedState = this.restoreCachedState(); if (cachedState && cachedState.searchQuery || !!this.searchWidget.getValue()) { </del> <ins> // Don't restore the cached state if we already have a query value from calling _setOptions(). const cachedState = !this.viewState.query ? this.restoreCachedState() : undefined; if (cachedState?.searchQuery || this.searchWidget.getValue()) { </ins> await this.onSearchInputChanged(); } else { this.refreshTOCTree();
const enum ReuseOrder { PreviouslySelected = 1 << 8, SameExtensionAsNotebook = 2 << 8, <del> BuiltIn = 3 << 8, OtherRenderer = 4 << 8 </del> <ins> OtherRenderer = 3 << 8, BuiltIn = 4 << 8, </ins> } const preferred = notebookProviderInfo && this.preferredMimetype.getValue()[notebookProviderInfo.id]?.[mimeType];
? ReuseOrder.PreviouslySelected : renderer.extensionId.value === notebookProviderInfo?.extension?.value ? ReuseOrder.SameExtensionAsNotebook <del> : ReuseOrder.BuiltIn; </del> <ins> : renderer.isBuiltin ? ReuseOrder.BuiltIn : ReuseOrder.OtherRenderer; </ins> return { ordered: { mimeType, rendererId: renderer.id, isTrusted: true }, score: reuseScore | ownScore,
// } } <del> // Inside word upper case bonus (camel case) else if (isUpper(target.charCodeAt(targetIndex))) { </del> <ins> // Inside word upper case bonus (camel case). We only give this bonus if we're not in a contiguous sequence. // For example: // NPE => NullPointerException = boost // HTTP => HTTP = not boost else if (isUpper(target.charCodeAt(targetIndex)) && matchesSequenceLength === 0) { </ins> score += 2; // if (DEBUG) {
} }); <ins> test('scoreItem - ensure upper case bonus only applies on non-consecutive matches (bug #134723)', function () { const resourceWithUpper = URI.file('ASDFasdfasdf'); const resourceAllLower = URI.file('asdfasdfasdf'); assert.ok(scoreItem(resourceAllLower, 'asdf', true, ResourceAccessor).score > scoreItem(resourceWithUpper, 'asdf', true, ResourceAccessor).score); }); </ins> test('compareItemsByScore - identity', function () { const resourceA = URI.file('/some/path/fileA.txt'); const resourceB = URI.file('/some/path/other/fileB.txt');