jiebi/CodeConvo huggingface dataset:
myObservable2.set(1, tx); }); }); <ins> 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', ]); }); </ins> }); export class LoggingObserver implements IObserver {
) { super(listUser, container, delegate, renderers, options, contextKeyService, listService, configurationService, instantiationService); NOTEBOOK_CELL_LIST_FOCUSED.bindTo(this.contextKeyService).set(true); <del> this._viewContext = viewContext; </del> this._previousFocusedElements = this.getFocusedElements(); this._localDisposableStore.add(this.onDidChangeFocus((e) => { this._previousFocusedElements.forEach(element => {
const scrollHeight = this.view.scrollHeight; const scrollTop = this.getViewScrollTop(); const wrapperBottom = this.getViewScrollBottom(); <del> const topInsertToolbarHeight = this._viewContext.notebookOptions.computeTopInsertToolbarHeight(this.viewModel?.viewType); this.view.setScrollTop(scrollHeight - (wrapperBottom - scrollTop) - topInsertToolbarHeight); </del> <ins> this.view.setScrollTop(scrollHeight - (wrapperBottom - scrollTop)); </ins> } //#region Reveal Cell synchronously
} getViewScrollBottom() { <del> const topInsertToolbarHeight = this._viewContext.notebookOptions.computeTopInsertToolbarHeight(this.viewModel?.viewType); return this.getViewScrollTop() + this.view.renderHeight - topInsertToolbarHeight; </del> <ins> return this.getViewScrollTop() + this.view.renderHeight; </ins> } setCellEditorSelection(cell: ICellViewModel, range: Range) {
import * as assert from 'assert'; import { DisposableStore } from 'vs/base/common/lifecycle'; <del> import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; </del> import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; import { CellKind } from 'vs/workbench/contrib/notebook/common/notebookCommon'; <del> import { INotebookExecutionStateService } from 'vs/workbench/contrib/notebook/common/notebookExecutionStateService'; import { NotebookOptions } from 'vs/workbench/contrib/notebook/browser/notebookOptions'; </del> import { createNotebookCellList, setupInstantiationService, withTestNotebook } from 'vs/workbench/contrib/notebook/test/browser/testNotebookEditor'; suite('NotebookCellList', () => { let disposables: DisposableStore; let instantiationService: TestInstantiationService; <del> let notebookDefaultOptions: NotebookOptions; let topInsertToolbarHeight: number; </del> suiteSetup(() => { disposables = new DisposableStore(); instantiationService = setupInstantiationService(disposables); <del> notebookDefaultOptions = new NotebookOptions(instantiationService.get(IConfigurationService), instantiationService.get(INotebookExecutionStateService), false); topInsertToolbarHeight = notebookDefaultOptions.computeTopInsertToolbarHeight(); </del> }); suiteTeardown(() => disposables.dispose());
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'; <del> import { assertIsDefined, assertAllDefined } from 'vs/base/common/types'; </del> <ins> import { assertAllDefined } from 'vs/base/common/types'; </ins> import { NotificationFocusedContext } from 'vs/workbench/common/contextkeys'; import { Disposable } from 'vs/base/common/lifecycle'; import { AriaRole } from 'vs/base/browser/ui/aria/aria';
if (token.isCancellationRequested) { return false; } <del> 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)) { </del> <ins> 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: // // <b> // | // </b> // // 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) { </ins> return false; } }
import { resolveMarketplaceHeaders } from 'vs/platform/externalServices/common/marketplace'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; <ins> import { StopWatch } from 'vs/base/common/stopwatch'; </ins> const CURRENT_TARGET_PLATFORM = isWeb ? TargetPlatform.WEB : getTargetPlatform(platform, arch); const ACTIVITY_HEADER_NAME = 'X-Market-Search-Activity-Id';
} if (needAllVersions.size) { <del> const startTime = new Date().getTime(); </del> <ins> const stopWatch = new StopWatch(); </ins> 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<GalleryServiceAdditionalQueryEvent, GalleryServiceAdditionalQueryClassification>('galleryService:additionalQuery', { <del> duration: new Date().getTime() - startTime, </del> <ins> duration: stopWatch.elapsed(), </ins> count: needAllVersions.size }); for (const extension of extensions) {
this.telemetryService.publicLog2<GalleryServiceQueryEvent, GalleryServiceQueryClassification>('galleryService:query', { ...query.telemetryData, requestBodySize: String(data.length), <del> duration: new Date().getTime() - startTime, </del> <ins> duration: stopWatch.elapsed(), </ins> success: !!context && isSuccess(context), responseBodySize: context?.res.headers['Content-Length'], statusCode: context ? String(context.res.statusCode) : undefined,
} } <del> this._currentContent = message + provider.provideContent() + readMoreLink + disableHelpHint + localize('exit-tip', 'nnExit this dialog via the Escape key.'); </del> <ins> this._currentContent = message + provider.provideContent() + readMoreLink + disableHelpHint + localize('exit-tip', 'nExit this dialog via the Escape key.'); </ins> this._updateContextKeys(provider, true); this._getTextModel(URI.from({ path: `accessible-view-${provider.verbositySettingKey}`, scheme: 'accessible-view', fragment: this._currentContent })).then((model) => {
_xterm: Pick<IXtermTerminal, 'getFont' | 'shellIntegration'> & { raw: Terminal }, @IInstantiationService _instantiationService: IInstantiationService, @IKeybindingService private readonly _keybindingService: IKeybindingService, <del> @IAccessibilityService private readonly _accessibilityService: IAccessibilityService, </del> @IContextKeyService private readonly _contextKeyService: IContextKeyService, <del> @ICommandService private readonly _commandService: ICommandService </del> <ins> @ICommandService private readonly _commandService: ICommandService, @IAccessibilityService private readonly _accessibilityService: IAccessibilityService </ins> ) { super(); this._hasShellIntegration = _xterm.shellIntegration.status === ShellIntegrationStatus.VSCode; } private _descriptionForCommand(commandId: string, msg: string, noKbMsg: string): string { <del> const kb = this._keybindingService.lookupKeybindings(commandId); switch (kb.length) { case 0: return format(noKbMsg, commandId); case 1: return format(msg, kb[0].getAriaLabel()); </del> <ins> 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()); </ins> } <del> // 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()); </del> <ins> const kb = this._keybindingService.lookupKeybinding(commandId, this._contextKeyService)?.getAriaLabel(); return !kb ? format(noKbMsg, commandId) : format(msg, kb); </ins> } provideContent(): string {
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'; <del> import { IAccessibleViewService, AccessibleViewService, IAccessibleContentProvider, IAccessibleViewOptions, AccessibleViewType, accessibleViewIsShown } from 'vs/workbench/contrib/accessibility/browser/accessibleView'; </del> <ins> import { IAccessibleViewService, AccessibleViewService, IAccessibleContentProvider, IAccessibleViewOptions, AccessibleViewType } from 'vs/workbench/contrib/accessibility/browser/accessibleView'; </ins> import { IHoverService } from 'vs/workbench/services/hover/browser/hover'; import { alert } from 'vs/base/browser/ui/aria/aria';
const accessibleViewService = accessor.get(IAccessibleViewService); accessibleViewService.next(); return true; <del> }, accessibleViewIsShown)); </del> <ins> })); </ins> this._register(AccessibleViewPreviousAction.addImplementation(95, 'previous', accessor => { const accessibleViewService = accessor.get(IAccessibleViewService); accessibleViewService.previous(); return true; <del> }, accessibleViewIsShown)); </del> <ins> })); </ins> } }
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { MenuId } from 'vs/platform/actions/common/actions'; <ins> import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; export const accessibilityHelpIsShown = new RawContextKey<boolean>('accessibilityHelpIsShown', false, true); export const accessibleViewIsShown = new RawContextKey<boolean>('accessibleViewIsShown', false, true); </ins> export const enum AccessibilityVerbositySettingId { Terminal = 'accessibility.verbosity.terminal',
import { localize } from 'vs/nls'; import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; <del> import { IContextKey, IContextKeyService, RawContextKey } from 'vs/platform/contextkey/common/contextkey'; </del> <ins> import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; </ins> 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';
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'; <del> import { AccessibilityVerbositySettingId, AccessibleViewAction, AccessibleViewNextAction, AccessibleViewPreviousAction } from 'vs/workbench/contrib/accessibility/browser/accessibilityContribution'; </del> <ins> import { AccessibilityVerbositySettingId, AccessibleViewAction, AccessibleViewNextAction, AccessibleViewPreviousAction, accessibilityHelpIsShown, accessibleViewIsShown } from 'vs/workbench/contrib/accessibility/browser/accessibilityContribution'; </ins> import { ILayoutService } from 'vs/platform/layout/browser/layoutService'; const enum DIMENSIONS {
type: AccessibleViewType; } <del> export const accessibilityHelpIsShown = new RawContextKey<boolean>('accessibilityHelpIsShown', false, true); export const accessibleViewIsShown = new RawContextKey<boolean>('accessibleViewIsShown', false, true); </del> class AccessibleView extends Disposable { private _editorWidget: CodeEditorWidget; private _accessiblityHelpIsShown: IContextKey<boolean>;
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'; <del> import { accessibilityHelpIsShown } from 'vs/workbench/contrib/accessibility/browser/accessibleView'; </del> <ins> import { accessibilityHelpIsShown } from 'vs/workbench/contrib/accessibility/browser/accessibilityContribution'; </ins> 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';
menu: { id: MenuId.ExtensionContext, group: '2_configure', <del> when: ContextKeyExpr.and(ContextKeyExpr.equals('extensionStatus', 'installed'), ContextKeyExpr.has('isDefaultApplicationScopedExtension').negate()), </del> <ins> when: ContextKeyExpr.and(ContextKeyExpr.equals('extensionStatus', 'installed'), ContextKeyExpr.has('isDefaultApplicationScopedExtension').negate(), ContextKeyExpr.has('isBuiltinExtension').negate()), </ins> order: 3 }, run: async (accessor: ServicesAccessor, id: string) => {
} async toggleApplyExtensionToAllProfiles(extension: IExtension): Promise<void> { <del> if (!extension.local || isApplicationScopedExtension(extension.local.manifest)) { </del> <ins> if (!extension.local || isApplicationScopedExtension(extension.local.manifest) || extension.isBuiltin) { </ins> return; } await this.extensionManagementService.toggleAppliationScope(extension.local, this.userDataProfileService.currentProfile.extensionsResource);
* 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 <del> * casing. </del> <ins> * casing which is why we attempt to use substring() before relative(). </ins> */ export function relativePath(from: string, to: string): string { <del> // 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(/$/, ''); </del> <ins> // 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; </ins> } if (isDescendant(from, to) && from.length < to.length) { <del> return to.substring(from.length + 1); </del> <ins> return to.substring(from.length); </ins> } // Fallback to `path.relative`
padding-right: 5px; /* with tab sizing shrink/fixed and badges, we want a right-padding because the close button is hidden */ } <ins> .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*/ } </ins> .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 */ }
/* Window Title Menu */ .monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center { z-index: 2500; <del> } /* 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 { </del> -webkit-app-region: no-drag; }
} if (styles.listFocusForeground) { <del> content.push(`.monaco-list${suffix}:focus .monaco-list-row.focused:not(.monaco-list-row.action.option-disabled) { color: ${styles.listFocusForeground}; }`); </del> <ins> content.push(`.monaco-list${suffix}:focus .monaco-list-row.focused { color: ${styles.listFocusForeground}; }`); </ins> } if (styles.listActiveSelectionBackground) {
} .action-widget .monaco-list-row.action.option-disabled, <ins> .action-widget .monaco-list:focus .monaco-list-row.focused.action.option-disabled, </ins> .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; }
builtin printf '%s' "${terms[2]:-}" } <ins> __vsc_escape_value_fast() { builtin local LC_ALL=C out out=${1///} out=${out//;/x3b} builtin printf '%sn' "${out}" } </ins> # 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() { <ins> # If the input being too large, switch to the faster function if [ "${#1}" -ge 2000 ]; then __vsc_escape_value_fast "$1" builtin return fi </ins> # Process text byte by byte, not by codepoint. builtin local LC_ALL=C str="${1}" i byte token out=''
"git": { "name": "electron", "repositoryUrl": "https://github.com/electron/electron", <del> "commitHash": "468c4af6611c88762b7ba6c4400c5022895457c2" </del> <ins> "commitHash": "bb6a7d443b4f00680d05cc703b4d7ae180fdde03" </ins> } }, "isOnlyProductionDependency": true, "license": "MIT", <del> "version": "25.9.2" </del> <ins> "version": "25.9.4" </ins> }, { "component": {
{ "name": "code-oss-dev", "version": "1.85.0", <del> "distro": "cbc81496e34eafbc771b8f008e6a742d755968c9", </del> <ins> "distro": "210db50a0928d4857ed3d511ddb5612b947e0fef", </ins> "author": { "name": "Microsoft Corporation" },
"cssnano": "^4.1.11", "debounce": "^1.0.0", "deemon": "^1.8.0", <del> "electron": "25.9.2", </del> <ins> "electron": "25.9.4", </ins> "eslint": "8.36.0", "eslint-plugin-header": "3.1.1", "eslint-plugin-jsdoc": "^46.5.0",
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.207.tgz#9c3310ebace2952903d05dcaba8abe3a4ed44c01" integrity sha512-piH7MJDJp4rJCduWbVvmUd59AUne1AFBJ8JaRQvk0KzNTSUnZrVXHCZc+eg+CGE4OujkcLJznhGKD6tuAshj5Q== <del> electron@25.9.2: version "25.9.2" resolved "https://registry.yarnpkg.com/electron/-/electron-25.9.2.tgz#12be98fbcff485c94ff99df21e0727797a45364a" integrity sha512-hVBN5rsrL99BKNHvzMeYy2PkAmewuIobu4U3o3EzVz4MDoLmMfW4yTH5GZ4RbJrpokoEky5IzGtRR/ggPzL6Fw== </del> <ins> electron@25.9.4: version "25.9.4" resolved "https://registry.yarnpkg.com/electron/-/electron-25.9.4.tgz#1935b6fbfd8ad920719a4136d867021496703884" integrity sha512-5pDU8a7o7ZIPTZHAqjflGMq764Favdsc271KXrAT3oWvFTHs5Ve9+IOt5EUVPrwvC2qRWKpCIEM47WzwkTlENQ== </ins> dependencies: "@electron/get" "^2.0.0" "@types/node" "^18.11.18"
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'; <ins> import { VSBuffer } from 'vs/base/common/buffer'; </ins> async function createRemoteTunnel(options: IConnectionOptions, defaultTunnelHost: string, tunnelRemoteHost: string, tunnelRemotePort: number, tunnelLocalPort?: number): Promise<RemoteTunnel> { let readyTunnel: NodeRemoteTunnel | undefined;
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'; <ins> import { IAiRelatedInformationService, RelatedInformationType, SettingInformationResult } from 'vs/workbench/services/aiRelatedInformation/common/aiRelatedInformation'; </ins> export interface IEndpointDetails { urlBase?: string;
private settingsRecord: Record<string, ISetting> = {}; private currentPreferencesModel: ISettingsEditorModel | undefined; <del> constructor(private readonly semanticSimilarityService: ISemanticSimilarityService) { } </del> <ins> constructor( private readonly aiRelatedInformationService: IAiRelatedInformationService, private readonly semanticSimilarityService: ISemanticSimilarityService ) { } </ins> updateModel(preferencesModel: ISettingsEditorModel) { if (preferencesModel === this.currentPreferencesModel) {
constructor( @ISemanticSimilarityService private readonly semanticSimilarityService: ISemanticSimilarityService, <ins> @IAiRelatedInformationService private readonly aiRelatedInformationService: IAiRelatedInformationService </ins> ) { <del> this._keysProvider = new RemoteSearchKeysProvider(semanticSimilarityService); </del> <ins> this._keysProvider = new RemoteSearchKeysProvider(aiRelatedInformationService, semanticSimilarityService); </ins> } setFilter(filter: string) {
} async searchModel(preferencesModel: ISettingsEditorModel, token?: CancellationToken | undefined): Promise<ISearchResult | null> { <del> if (!this.semanticSimilarityService.isEnabled() || !this._filter) { </del> <ins> if ( !this._filter || (!this.semanticSimilarityService.isEnabled() && !this.aiRelatedInformationService.isEnabled())) { </ins> return null; } this._keysProvider.updateModel(preferencesModel); <ins> 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) { </ins> const settingKeys = this._keysProvider.getSettingKeys(); const settingsRecord = this._keysProvider.getSettingsRecord();