jiebi/CodeConvo huggingface dataset:
} } <ins> async focusInstance(instance: ITerminalInstance): Promise<void> { if (instance.target === TerminalLocation.Editor) { return this._terminalEditorService.focusInstance(instance); } return this._terminalGroupService.focusInstance(instance); } </ins> async focusActiveInstance(): Promise<void> { if (!this._activeInstance) { return; } <del> if (this._activeInstance.target === TerminalLocation.Editor) { return this._terminalEditorService.focusActiveInstance(); } return this._terminalGroupService.focusActiveInstance(); </del> <ins> return this.focusInstance(this._activeInstance); </ins> } async createContributedTerminalProfile(extensionIdentifier: string, id: string, options: ICreateContributedTerminalProfileOptions): Promise<void> {
return instance; } <ins> async revealTerminal(source: ITerminalInstance, preserveFocus?: boolean): Promise<void> { if (source.target === TerminalLocation.Editor) { await this._terminalEditorService.revealActiveEditor(preserveFocus); } else { await this._terminalGroupService.showPanel(); } } </ins> async revealActiveTerminal(preserveFocus?: boolean): Promise<void> { const instance = this.activeInstance; if (!instance) { return; } <del> if (instance.target === TerminalLocation.Editor) { await this._terminalEditorService.revealActiveEditor(preserveFocus); } else { await this._terminalGroupService.showPanel(); } </del> <ins> await this.revealTerminal(instance, preserveFocus); </ins> } setEditable(instance: ITerminalInstance, data?: IEditableData | null): void {
getInputFromResource(resource: URI): TerminalEditorInput { throw new Error('Method not implemented.'); } setActiveInstance(instance: ITerminalInstance): void { throw new Error('Method not implemented.'); } focusActiveInstance(): Promise<void> { throw new Error('Method not implemented.'); } <ins> focusInstance(instance: ITerminalInstance): void { throw new Error('Method not implemented.'); } </ins> getInstanceFromResource(resource: URI | undefined): ITerminalInstance | undefined { throw new Error('Method not implemented.'); } focusFindWidget(): void { throw new Error('Method not implemented.'); } hideFindWidget(): void { throw new Error('Method not implemented.'); }
focusHover(): void { throw new Error('Method not implemented.'); } setActiveInstance(instance: ITerminalInstance): void { throw new Error('Method not implemented.'); } focusActiveInstance(): Promise<void> { throw new Error('Method not implemented.'); } <ins> focusInstance(instance: ITerminalInstance): void { throw new Error('Method not implemented.'); } </ins> getInstanceFromResource(resource: URI | undefined): ITerminalInstance | undefined { throw new Error('Method not implemented.'); } focusFindWidget(): void { throw new Error('Method not implemented.'); } hideFindWidget(): void { throw new Error('Method not implemented.'); }
// no parsed args, try handle active editor const editor = getEditorFromArgsOrActivePane(accessor); if (editor) { <ins> const selectedCellRange: ICellRange[] = editor.getSelections().length === 0 ? [editor.getFocus()] : editor.getSelections(); </ins> telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', { id: this.desc.id, from: from }); return this.runWithContext(accessor, { ui: false, notebookEditor: editor, <del> selectedCells: cellRangeToViewCells(editor, editor.getSelections()) </del> <ins> selectedCells: cellRangeToViewCells(editor, selectedCellRange) </ins> }); } }
keybinding: { when: ContextKeyExpr.and( NOTEBOOK_EDITOR_FOCUSED, <del> NOTEBOOK_CELL_LIST_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey), </del> NOTEBOOK_EDITOR_EDITABLE, <del> NOTEBOOK_CELL_EDITABLE </del> <ins> ContextKeyExpr.not(InputFocusedContextKey), </ins> ), primary: KeyMod.CtrlCmd | KeyCode.Slash, weight: KeybindingWeight.WorkbenchContrib
// align from the bottom so that it lines up with instruction when source code is present. container.style.alignSelf = 'flex-end'; <del> const icon = append(container, $('.disassembly-view')); icon.classList.add('codicon'); </del> <ins> const icon = append(container, $('.codicon')); </ins> icon.style.display = 'flex'; icon.style.alignItems = 'center'; icon.style.justifyContent = 'center';
export const editorBracketHighlightingForeground5 = registerColor('editorBracketHighlight.foreground5', '#00000000', nls.localize('editorBracketHighlightForeground5', 'Foreground color of brackets (5). Requires enabling bracket pair colorization.')); export const editorBracketHighlightingForeground6 = registerColor('editorBracketHighlight.foreground6', '#00000000', nls.localize('editorBracketHighlightForeground6', 'Foreground color of brackets (6). Requires enabling bracket pair colorization.')); <del> export const editorBracketHighlightingUnexpectedBracketForeground = registerColor('editorBracketHighlight.unexpectedBracket.foreground', { dark: new Color(new RGBA(255, 18, 18, 0.8)), light: new Color(new RGBA(255, 18, 18, 0.8)), hcDark: new Color(new RGBA(255, 50, 50, 1)), hcLight: '' }, nls.localize('editorBracketHighlightUnexpectedBracketForeground', 'Foreground color of unexpected brackets.')); </del> <ins> export const editorBracketHighlightingUnexpectedBracketForeground = registerColor('editorBracketHighlight.unexpectedBracket.foreground', { dark: new Color(new RGBA(255, 18, 18, 0.8)), light: new Color(new RGBA(255, 18, 18, 0.8)), hcDark: 'new Color(new RGBA(255, 50, 50, 1))', hcLight: '#B5200D' }, nls.localize('editorBracketHighlightUnexpectedBracketForeground', 'Foreground color of unexpected brackets.')); </ins> export const editorBracketPairGuideBackground1 = registerColor('editorBracketPairGuide.background1', '#00000000', nls.localize('editorBracketPairGuide.background1', 'Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.')); export const editorBracketPairGuideBackground2 = registerColor('editorBracketPairGuide.background2', '#00000000', nls.localize('editorBracketPairGuide.background2', 'Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.'));
import { BetterTokenStorage, IDidChangeInOtherWindowEvent } from './betterSecretStorage'; import { LoopbackAuthServer } from './node/authServer'; import { base64Decode } from './node/buffer'; <ins> import fetch from './node/fetch'; </ins> import { UriEventHandler } from './UriEventHandler'; import TelemetryReporter from '@vscode/extension-telemetry'; import { Environment } from '@azure/ms-rest-azure-env';
let result; let errorMessage: string | undefined; try { <del> result = await fetch(endpoint, { </del> <ins> result = await fetch(endpoint.toString(), { </ins> method: 'POST', headers: { <del> 'Content-Type': 'application/x-www-form-urlencoded', 'Content-Length': postData.length.toString() </del> <ins> 'Content-Type': 'application/x-www-form-urlencoded' </ins> }, body: postData });
import { $, append } from 'vs/base/browser/dom'; import { IHoverOptions, IManagedHover, IManagedHoverTooltipMarkdownString } from 'vs/base/browser/ui/hover/hover'; import { IHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegate'; <del> import { createInstantHoverDelegate, getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory'; </del> <ins> import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory'; </ins> import { IconLabel } from 'vs/base/browser/ui/iconLabel/iconLabel'; import { IIdentityProvider, IKeyboardNavigationLabelProvider, IListVirtualDelegate } from 'vs/base/browser/ui/list/list'; import { LabelFuzzyScore } from 'vs/base/browser/ui/tree/abstractTree';
if (label.icon && ThemeIcon.isThemeIcon(label.icon) && labels.includes(label.title)) { const icon = append(templateData.labelContainer, $('div.label')); icon.classList.add(...ThemeIcon.asClassNameArray(label.icon)); <del> const hover = this.hoverService.setupManagedHover(instantHoverDelegate, icon, label.title); templateData.elementDisposables.add(hover); </del> } } }
this._compositionRangeWithinEditor = newCompositionRangeWithinEditor; } this._emitTypeEvent(viewController, e); <del> // TODO @aiday-mar calling write screen reader content so that the document selection is immediately set // remove the following when electron will be upgraded this._screenReaderSupport.writeScreenReaderContent(); </del> })); this._register(editContextAddDisposableListener(this._editContext, 'compositionstart', (e) => { const position = this._context.viewModel.getPrimaryCursorState().modelState.position;
} private _getScreenReaderContentState(): ScreenReaderContentState | undefined { <del> // Make the screen reader content always be visible because of the bug and also set the selection // TODO @aiday-mar Ultimately uncomment this code when Electron will be upgraded // if (this._accessibilitySupport === AccessibilitySupport.Disabled) { // 	return; // } const accessibilityPageSize = this._accessibilitySupport === AccessibilitySupport.Disabled ? 1 : this._accessibilityPageSize; </del> <ins> if (this._accessibilitySupport === AccessibilitySupport.Disabled) { return; } </ins> const simpleModel: ISimpleModel = { getLineCount: (): number => { return this._context.viewModel.getLineCount();
return this._context.viewModel.modifyPosition(position, offset); } }; <del> return PagedScreenReaderStrategy.fromEditorSelection(simpleModel, this._primarySelection, accessibilityPageSize, this._accessibilitySupport === AccessibilitySupport.Unknown); </del> <ins> return PagedScreenReaderStrategy.fromEditorSelection(simpleModel, this._primarySelection, this._accessibilityPageSize, this._accessibilitySupport === AccessibilitySupport.Unknown); </ins> } private _setSelectionOfScreenReaderContent(selectionOffsetStart: number, selectionOffsetEnd: number): void {
*  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ <del> import { getActiveWindow } from '../../../../../base/browser/dom.js'; </del> <ins> import { getActiveWindow, isHTMLElement } from '../../../../../base/browser/dom.js'; </ins> import { FastDomNode } from '../../../../../base/browser/fastDomNode.js'; import { AccessibilitySupport } from '../../../../../platform/accessibility/common/accessibility.js'; import { IKeybindingService } from '../../../../../platform/keybinding/common/keybinding.js';
if (!textContent) { return; } <ins> const focusedElement = getActiveWindow().document.activeElement; </ins> const range = new globalThis.Range(); range.setStart(textContent, selectionOffsetStart); range.setEnd(textContent, selectionOffsetEnd); activeDocumentSelection.removeAllRanges(); activeDocumentSelection.addRange(range); <ins> if (isHTMLElement(focusedElement)) { focusedElement.focus(); } </ins> } }
return `${resources.basenameOrAuthority(this.uri)} ${this.lineNumber}`; } <del> public setSessionDidTrigger(sessionId: string): void { this.sessionsDidTrigger ??= new Set(); this.sessionsDidTrigger.add(sessionId); </del> <ins> public setSessionDidTrigger(sessionId: string, didTrigger = true): void { if (didTrigger) { this.sessionsDidTrigger ??= new Set(); this.sessionsDidTrigger.add(sessionId); } else { this.sessionsDidTrigger?.delete(sessionId); } </ins> } public getSessionDidTrigger(sessionId: string): boolean {
}, 0); }; <ins> const isEditableElement = (element: Element) => { return element.tagName.toLowerCase() === 'input' || element.tagName.toLowerCase() === 'textarea' || 'editContext' in element; }; </ins> // check if an input element is focused within the output element const checkOutputInputFocus = (e: FocusEvent) => { lastFocusedOutput = getOutputContainer(e);
JSON.parse(decodeURIComponent("${encodeURIComponent(JSON.stringify(ctx))}")) )n//# sourceURL=notebookWebviewPreloads.jsn`; } <del> export function isEditableElement(element: Element): boolean { return element.tagName.toLowerCase() === 'input' || element.tagName.toLowerCase() === 'textarea' || 'editContext' in element; } </del>
viewController.emitKeyDown(standardKeyboardEvent); })); this._register(addDisposableListener(this.domNode.domNode, 'beforeinput', async (e) => { <del> if (e.inputType === 'insertParagraph') { </del> <ins> if (e.inputType === 'insertParagraph' || e.inputType === 'insertLineBreak') { </ins> this._onType(viewController, { text: 'n', replacePrevCharCnt: 0, replaceNextCharCnt: 0, positionDelta: 0 }); } }));