jiebi/CodeConvo huggingface dataset:
return (documentVersion: number) => { if (!cachedElements || documentVersion !== cachedVersion) { cachedVersion = documentVersion; <del> cachedElements = [{ element: document.body, line: 0 }]; </del> <ins> cachedElements = [{ element: document.body, line: -1 }]; </ins> for (const element of document.getElementsByClassName(codeLineClass)) { const line = +element.getAttribute('data-line')!; if (isNaN(line)) {
} switch (e.data.type) { <del> case 'setScale': </del> <ins> case 'setScale': { </ins> updateScale(e.data.scale); break; <del> case 'setActive': </del> <ins> } case 'setActive': { </ins> setActive(e.data.value); break; <del> case 'zoomIn': </del> <ins> } case 'zoomIn': { </ins> zoomIn(); break; <del> case 'zoomOut': </del> <ins> } case 'zoomOut': { </ins> zoomOut(); break; <ins> } case 'copyImage': { copyImage(); break; } </ins> } }); <ins> document.addEventListener('copy', () => { copyImage(); }); async function copyImage() { try { await navigator.clipboard.write([new ClipboardItem({ 'image/png': fetch(image.src).then(request => request.blob()) })]); } catch (e) { console.error(e); } } </ins> }());
"command": "imagePreview.zoomOut", "when": "activeCustomEditorId == 'imagePreview.previewEditor'", "group": "1_imagePreview" <ins> }, { "command": "imagePreview.copyImage", "when": "false" } ], "webview/context": [ { "command": "imagePreview.copyImage", "when": "webviewId == 'imagePreview.previewEditor'" </ins> } ] }
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data: ${cspSource}; media-src ${cspSource}; script-src 'nonce-${nonce}'; style-src ${cspSource} 'nonce-${nonce}';"> <meta id="settings" data-settings="${escapeAttribute(JSON.stringify(settings))}"> </head> <del> <body class="container loading"> </del> <ins> <body class="container loading" data-vscode-context='{ "preventDefaultContextMenuItems": true }'> </ins> <div class="loading-indicator"></div> <div class="loading-error"> <p>${vscode.l10n.t("An error occurred while loading the audio file.")}</p>
<link rel="stylesheet" href="${escapeAttribute(this.extensionResource('media', 'imagePreview.css'))}" type="text/css" media="screen" nonce="${nonce}"> <del> <meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data: ${cspSource}; script-src 'nonce-${nonce}'; style-src ${cspSource} 'nonce-${nonce}';"> </del> <ins> <meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data: ${cspSource}; connect-src ${cspSource}; script-src 'nonce-${nonce}'; style-src ${cspSource} 'nonce-${nonce}';"> </ins> <meta id="image-preview-settings" data-settings="${escapeAttribute(JSON.stringify(settings))}"> </head> <del> <body class="container image scale-to-fit loading"> </del> <ins> <body class="container image scale-to-fit loading" data-vscode-context='{ "preventDefaultContextMenuItems": true }'> </ins> <div class="loading-indicator"></div> <div class="image-load-error"> <p>${vscode.l10n.t("An error occurred while loading the image.")}</p>
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data: ${cspSource}; media-src ${cspSource}; script-src 'nonce-${nonce}'; style-src ${cspSource} 'nonce-${nonce}';"> <meta id="settings" data-settings="${escapeAttribute(JSON.stringify(settings))}"> </head> <del> <body class="loading"> </del> <ins> <body class="loading" data-vscode-context='{ "preventDefaultContextMenuItems": true }'> </ins> <div class="loading-indicator"></div> <div class="loading-error"> <p>${vscode.l10n.t("An error occurred while loading the video file.")}</p>
graphLine: register('graph-line', 0xebe2), graphScatter: register('graph-scatter', 0xebe3), pieChart: register('pie-chart', 0xebe4), <del> bracket: register('bracket', 0xebe4), </del> bracketDot: register('bracket-dot', 0xebe5), bracketError: register('bracket-error', 0xebe6), lockSmall: register('lock-small', 0xebe7),
} /** <ins> * A regex that extracts the link suffix which contains line and column information. The link suffix * must terminate at the end of line. */ const linkSuffixRegexEol = new Lazy<RegExp>(() => generateLinkSuffixRegex(true)); /** </ins> * A regex that extracts the link suffix which contains line and column information. */ <del> const linkSuffixRegexEol = new Lazy<RegExp>(() => { </del> <ins> const linkSuffixRegex = new Lazy<RegExp>(() => generateLinkSuffixRegex(false)); function generateLinkSuffixRegex(eolOnly: boolean) { </ins> let ri = 0; let ci = 0; function l(): string {
// foo:339 // foo:339:12 // foo 339 <del> // foo 339:12                    [#140780] </del> <ins> // foo 339:12                        [#140780] </ins> // "foo",339 // "foo",339:12 <del> `(?::| |['"],)${l()}(:${c()})?$`, // The quotes below are optional [#171652] // "foo", line 339                [#40468] </del> <ins> `(?::| |['"],)${l()}(:${c()})?` + eolSuffix, // The quotes below are optional     [#171652] // "foo", line 339                   [#40468] </ins> // "foo", line 339, col 12 // "foo", line 339, column 12 // "foo":line 339
// "foo" on line 339, col 12 // "foo" on line 339, column 12 // "foo" line 339 column 12 <del> `['"]?(?:,? |: ?| on )line ${l()}(,? col(?:umn)? ${c()})?$`, // foo(339) // foo(339,12) // foo(339, 12) // foo (339) //   ... // foo: (339) //   ... `:? ?[[(]${l()}(?:, ?${c()})?[])]$`, ]; const suffixClause = lineAndColumnRegexClauses // Join all clauses together .join('|') // Convert spaces to allow the non-breaking space char (ascii 160) .replace(/ /g, `[${'u00A0'} ]`); return new RegExp(`(${suffixClause})`); }); const linkSuffixRegex = new Lazy<RegExp>(() => { let ri = 0; let ci = 0; function l(): string { return `(?<row${ri++}>d+)`; } function c(): string { return `(?<col${ci++}>d+)`; } const lineAndColumnRegexClauses = [ // foo:339 // foo:339:12 // foo 339 // foo 339:12                    [#140780] // "foo",339 // "foo",339:12 `(?::| |['"],)${l()}(:${c()})?`, // The quotes below are optional [#171652] // foo, line 339                [#40468] // foo, line 339, col 12 // foo, line 339, column 12 // "foo":line 339 // "foo":line 339, col 12 // "foo":line 339, column 12 // "foo": line 339 // "foo": line 339, col 12 // "foo": line 339, column 12 // "foo" on line 339 // "foo" on line 339, col 12 // "foo" on line 339, column 12 // "foo" line 339 column 12 `['"]?(?:,? |: ?| on )line ${l()}(,? col(?:umn)? ${c()})?`, </del> <ins> // "foo", line 339, character 12     [#171880] // "foo", line 339, characters 12-13 [#171880] // "foo", lines 339-340              [#171880] `['"]?(?:,? |: ?| on )lines? ${l()}(?:-d+)?(?:,? (?:col(?:umn)?|characters?) ${c()}(?:-d+)?)?` + eolSuffix, </ins> // foo(339) // foo(339,12) // foo(339, 12)
// Convert spaces to allow the non-breaking space char (ascii 160) .replace(/ /g, `[${'u00A0'} ]`); <del> return new RegExp(`(${suffixClause})`, 'g'); }); </del> <ins> return new RegExp(`(${suffixClause})`, eolOnly ? undefined : 'g'); } </ins> /** * Removes the optional link suffix which contains line and column information.
{ link: 'foo: [339,12]', prefix: undefined, suffix: ': [339,12]', hasRow: true, hasCol: true }, { link: 'foo: [339, 12]', prefix: undefined, suffix: ': [339, 12]', hasRow: true, hasCol: true }, <ins> // OCaml-style { link: '"foo", line 339, character 12', prefix: '"', suffix: '", line 339, character 12', hasRow: true, hasCol: true }, { link: '"foo", line 339, characters 12-13', prefix: '"', suffix: '", line 339, characters 12-13', hasRow: true, hasCol: true }, { link: '"foo", lines 339-340', prefix: '"', suffix: '", lines 339-340', hasRow: true, hasCol: false }, </ins> // Non-breaking space { link: 'foou00A0339:12', prefix: undefined, suffix: 'u00A0339:12', hasRow: true, hasCol: true }, { link: '"foo" on line 339,u00A0column 12', prefix: '"', suffix: '" on line 339,u00A0column 12', hasRow: true, hasCol: true },
/* Icons */ .monaco-workbench > .notifications-toasts .codicon.codicon-error { <del> color: var(--vscode-notificationsErrorIcon-foreground); </del> <ins> color: var(--vscode-notificationsErrorIcon-foreground) !important; </ins> } .monaco-workbench > .notifications-toasts .codicon.codicon-warning { <del> color: var(--vscode-notificationsWarningIcon-foreground); </del> <ins> color: var(--vscode-notificationsWarningIcon-foreground) !important; </ins> } .monaco-workbench > .notifications-toasts .codicon.codicon-info { <del> color: var(--vscode-notificationsInfoIcon-foreground); </del> <ins> color: var(--vscode-notificationsInfoIcon-foreground) !important; </ins> }
"vscode-proxy-agent": "^0.12.0", "vscode-regexpp": "^3.1.0", "vscode-textmate": "8.0.0", <del> "xterm": "5.2.0-beta.19", </del> <ins> "xterm": "5.2.0-beta.20", </ins> "xterm-addon-canvas": "0.4.0-beta.7", "xterm-addon-search": "0.11.0", "xterm-addon-serialize": "0.9.0", "xterm-addon-unicode11": "0.5.0", "xterm-addon-webgl": "0.15.0-beta.4", <del> "xterm-headless": "5.2.0-beta.19", </del> <ins> "xterm-headless": "5.2.0-beta.20", </ins> "yauzl": "^2.9.2", "yazl": "^2.4.3" },
"tas-client-umd": "0.1.6", "vscode-oniguruma": "1.7.0", "vscode-textmate": "8.0.0", <del> "xterm": "5.2.0-beta.19", </del> <ins> "xterm": "5.2.0-beta.20", </ins> "xterm-addon-canvas": "0.4.0-beta.7", "xterm-addon-search": "0.11.0", "xterm-addon-unicode11": "0.5.0",
resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.15.0-beta.4.tgz#d03a98e446372a5dbb7d92075d1f125eec23b030" integrity sha512-W9N0+5i3trQhgBOHDsnNiBbBiJpleFenY668wWaZ9GlvWseCTnjnWis1kfnM9WASDh/0+7aOjWrD089o+QeHGQ== <del> xterm@5.2.0-beta.19: version "5.2.0-beta.19" resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.19.tgz#b3fd2eda3d9aa2672abaf03e864fafe64269c8a0" integrity sha512-3U+NYHjnIdUQf+MXiitmoFAcBOaLFHid3R/LzzvELjMwQx227EFk+3OmQjkBt7eH/IR+A4VlP5aPGmgriyLtGQ== </del> <ins> xterm@5.2.0-beta.20: version "5.2.0-beta.20" resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.20.tgz#52ed300d7077ce394f7656655ad07d90f96c6c64" integrity sha512-UIbFYmUPNTOSYIhAt/2pJ9AF7nc8RxT2k2bBUZOER4VdaeA89FH3xcNC5/3OysPkn6QS9INcYS2dX5gM2RnChg== </ins>
resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.15.0-beta.4.tgz#d03a98e446372a5dbb7d92075d1f125eec23b030" integrity sha512-W9N0+5i3trQhgBOHDsnNiBbBiJpleFenY668wWaZ9GlvWseCTnjnWis1kfnM9WASDh/0+7aOjWrD089o+QeHGQ== <del> xterm-headless@5.2.0-beta.19: version "5.2.0-beta.19" resolved "https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.2.0-beta.19.tgz#7603ffe76d42882bf72820791f8d2ba2074d7ace" integrity sha512-MKaObf5tdeEPXfRyhWkvNbiJ4oE57rL4eDV68iXm/0yYHgW3oQf3QO1d4SMGIxWYVx70AulY6EP2VswuInXImg== xterm@5.2.0-beta.19: version "5.2.0-beta.19" resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.19.tgz#b3fd2eda3d9aa2672abaf03e864fafe64269c8a0" integrity sha512-3U+NYHjnIdUQf+MXiitmoFAcBOaLFHid3R/LzzvELjMwQx227EFk+3OmQjkBt7eH/IR+A4VlP5aPGmgriyLtGQ== </del> <ins> xterm-headless@5.2.0-beta.20: version "5.2.0-beta.20" resolved "https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.2.0-beta.20.tgz#5827ac8977b5ae3246cc217dccdd6eaeac01b66e" integrity sha512-D1y4CIRvA8Izo7tAWShbyKTnxVteAy+N1j9Q+xvzcVxsGA4DLa8U7Gr2KXs3e/cjgkDcVHbbYCn7iWEyNTFvWw== xterm@5.2.0-beta.20: version "5.2.0-beta.20" resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.20.tgz#52ed300d7077ce394f7656655ad07d90f96c6c64" integrity sha512-UIbFYmUPNTOSYIhAt/2pJ9AF7nc8RxT2k2bBUZOER4VdaeA89FH3xcNC5/3OysPkn6QS9INcYS2dX5gM2RnChg== </ins> yallist@^4.0.0: version "4.0.0"
resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.15.0-beta.4.tgz#d03a98e446372a5dbb7d92075d1f125eec23b030" integrity sha512-W9N0+5i3trQhgBOHDsnNiBbBiJpleFenY668wWaZ9GlvWseCTnjnWis1kfnM9WASDh/0+7aOjWrD089o+QeHGQ== <del> xterm-headless@5.2.0-beta.19: version "5.2.0-beta.19" resolved "https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.2.0-beta.19.tgz#7603ffe76d42882bf72820791f8d2ba2074d7ace" integrity sha512-MKaObf5tdeEPXfRyhWkvNbiJ4oE57rL4eDV68iXm/0yYHgW3oQf3QO1d4SMGIxWYVx70AulY6EP2VswuInXImg== xterm@5.2.0-beta.19: version "5.2.0-beta.19" resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.19.tgz#b3fd2eda3d9aa2672abaf03e864fafe64269c8a0" integrity sha512-3U+NYHjnIdUQf+MXiitmoFAcBOaLFHid3R/LzzvELjMwQx227EFk+3OmQjkBt7eH/IR+A4VlP5aPGmgriyLtGQ== </del> <ins> xterm-headless@5.2.0-beta.20: version "5.2.0-beta.20" resolved "https://registry.yarnpkg.com/xterm-headless/-/xterm-headless-5.2.0-beta.20.tgz#5827ac8977b5ae3246cc217dccdd6eaeac01b66e" integrity sha512-D1y4CIRvA8Izo7tAWShbyKTnxVteAy+N1j9Q+xvzcVxsGA4DLa8U7Gr2KXs3e/cjgkDcVHbbYCn7iWEyNTFvWw== xterm@5.2.0-beta.20: version "5.2.0-beta.20" resolved "https://registry.yarnpkg.com/xterm/-/xterm-5.2.0-beta.20.tgz#52ed300d7077ce394f7656655ad07d90f96c6c64" integrity sha512-UIbFYmUPNTOSYIhAt/2pJ9AF7nc8RxT2k2bBUZOER4VdaeA89FH3xcNC5/3OysPkn6QS9INcYS2dX5gM2RnChg== </ins> y18n@^3.2.1: version "3.2.2"
primary: KeyMod.Alt | KeyCode.F1, weight: KeybindingWeight.WorkbenchContrib, linux: { <del> primary: KeyMod.Shift | KeyCode.F1, secondary: [KeyMod.Shift | KeyCode.F1] }, win: { primary: KeyMod.Shift | KeyCode.F1, secondary: [KeyMod.Shift | KeyCode.F1] </del> <ins> primary: KeyMod.Alt | KeyMod.Shift | KeyCode.F1, secondary: [KeyMod.Alt | KeyCode.F1] </ins> }, when: TerminalContextKeys.focus }
type: 'string', enum: ['always', 'never', 'whenTriggerCharacter', 'whenQuickSuggestion'], enumDescriptions: [ <del> nls.localize('suggest.insertMode.always', "Always activate the suggest widget when triggering IntelliSense automatically."), nls.localize('suggest.insertMode.never', "Never activate the suggest widget when triggering IntelliSense automatically."), nls.localize('suggest.insertMode.whenTriggerCharacter', "Activate the suggest widget only when triggering IntelliSense from a trigger character."), nls.localize('suggest.insertMode.whenQuickSuggestion', "Activate the suggest widget only when triggering IntelliSense as you type."), </del> <ins> nls.localize('suggest.insertMode.always', "Always select a suggestion when automatically triggering IntelliSense."), nls.localize('suggest.insertMode.never', "Never select a suggestion when automatically triggering IntelliSense."), nls.localize('suggest.insertMode.whenTriggerCharacter', "Select a suggestion only when triggering IntelliSense from a trigger character."), nls.localize('suggest.insertMode.whenQuickSuggestion', "Select a suggestion only when triggering IntelliSense as you type."), </ins> ], default: defaults.selectionMode, <del> markdownDescription: nls.localize('suggest.selectionMode', "Controls whether the suggest widget becomes active when triggered via quick suggest or trigger characters. Note that the widget is always active when explicitly invoked, e.g via `Ctrl+Space`.") </del> <ins> markdownDescription: nls.localize('suggest.selectionMode', "Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions (`#editor.quickSuggestions#` and `#editor.suggestOnTriggerCharacters#`) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.") </ins> }, 'editor.suggest.snippetsPreventQuickSuggestions': { type: 'boolean',
this.filterText = this.getFilterText(completionContext.line, tsEntry.insertText); if (completionContext.isMemberCompletion && completionContext.dotAccessorContext && !(this.insertText instanceof vscode.SnippetString)) { <del> this.filterText = completionContext.dotAccessorContext.text + (this.insertText || typeof this.label === 'string' ? this.label : this.label.label); </del> <ins> this.filterText = completionContext.dotAccessorContext.text + (this.insertText || this.textLabel); </ins> if (!this.range) { const replacementRange = this.getFuzzyWordRange(); if (replacementRange) {
import { NotebookTextModel } from 'vs/workbench/contrib/notebook/common/model/notebookTextModel'; import { ICellDto2, INotebookEditorModel, INotebookLoadOptions, IResolvedNotebookEditorModel, NotebookCellsChangeType, NotebookData } from 'vs/workbench/contrib/notebook/common/notebookCommon'; import { INotebookSerializer, INotebookService, SimpleNotebookProviderInfo } from 'vs/workbench/contrib/notebook/common/notebookService'; <ins> import { ILifecycleService } from 'vs/workbench/services/lifecycle/common/lifecycle'; </ins> import { IFileWorkingCopyManager } from 'vs/workbench/services/workingCopy/common/fileWorkingCopyManager'; import { IStoredFileWorkingCopy, IStoredFileWorkingCopyModel, IStoredFileWorkingCopyModelContentChangedEvent, IStoredFileWorkingCopyModelFactory, IStoredFileWorkingCopySaveEvent, StoredFileWorkingCopyState } from 'vs/workbench/services/workingCopy/common/storedFileWorkingCopy'; import { IUntitledFileWorkingCopy, IUntitledFileWorkingCopyModel, IUntitledFileWorkingCopyModelContentChangedEvent, IUntitledFileWorkingCopyModelFactory } from 'vs/workbench/services/workingCopy/common/untitledFileWorkingCopy';
private readonly _hasAssociatedFilePath: boolean, readonly viewType: string, private readonly _workingCopyManager: IFileWorkingCopyManager<NotebookFileWorkingCopyModel, NotebookFileWorkingCopyModel>, <del> @IFileService private readonly _fileService: IFileService </del> <ins> @IFileService private readonly _fileService: IFileService, @ILifecycleService lifecycleService: ILifecycleService </ins> ) { super(); <ins> if (this.viewType === 'interactive') { lifecycleService.onBeforeShutdown(async e => e.veto(this.onBeforeShutdown(), 'veto.InteractiveWindow')); } } private async onBeforeShutdown() { if (this._workingCopy?.isDirty()) { await this._workingCopy.save(); } return false; </ins> } override dispose(): void {
if (uri !== undefined) { // Launch desktop client if currently in web <ins> let target = `${env.uriScheme}://vscode.git/clone?url=${encodeURIComponent(uri)}`; </ins> if (env.uiKind === UIKind.Web) { <del> let target = `${env.uriScheme}://vscode.git/clone?url=${encodeURIComponent(uri)}`; </del> if (ref !== undefined) { target += `&ref=${encodeURIComponent(ref)}`; } return Uri.parse(target); } <del> // If already in desktop client, directly clone </del> <ins> // If already in desktop client but in a remote window, we need to force a new window // so that the git extension can access the local filesystem for cloning if (env.remoteName !== undefined) { target += `&windowId=_blank`; return Uri.parse(target); } // Otherwise, directly clone </ins> void this.clone(uri, undefined, { ref: ref }); } }
if (configuration.enableTsServerTracing) { if (tsServerTraceDirectory) { <del> this._logger.info(`<${kind}> Trace directory: ${tsServerTraceDirectory}`); </del> <ins> this._logger.info(`<${kind}> Trace directory: ${tsServerTraceDirectory.fsPath}`); </ins> } else { this._logger.error(`<${kind}> Could not create trace directory`); }
const languageContributions = findNodeAtLocation(tree, ['contributes', 'languages']); languageContributions?.children?.forEach(child => { const id = findNodeAtLocation(child, ['id']); <del> if (id && id.type === 'string') { </del> <ins> const configuration = findNodeAtLocation(child, ['configuration']); if (id && id.type === 'string' && configuration && configuration.type === 'string') { </ins> activationEvents.add(`onLanguage:${id.value}`); } });
const parent = this._options.parentSession; if (parent) { toDispose.add(parent.onDidEndAdapter(() => { <del> // copy the parent repl and get a new detached repl for this child if (!this.hasSeparateRepl()) { </del> <ins> // copy the parent repl and get a new detached repl for this child, and // remove its parent, if it's still running if (!this.hasSeparateRepl() && this.raw?.isInShutdown === false) { </ins> this.repl = this.repl.clone(); replListener.value = this.repl.onDidChangeElements(() => this._onDidChangeREPLElements.fire()); <ins> this.parentSession = undefined; </ins> } <del> this.parentSession = undefined; </del> })); } }
const newWithProfile = nls.localize('newWithProfile', 'The Create New Terminal (With Profile) ({0}) command allows for easy terminal creation using a specific profile.'); const newWithProfileNoKb = nls.localize('newWithProfileNoKb', 'The Create New Terminal (With Profile) command allows for easy terminal creation using a specific profile and is currently not triggerable by a keybinding.'); const accessibilitySettings = nls.localize('accessibilitySettings', 'Access accessibility settings such as `terminal.integrated.tabFocusMode` via the Preferences: Open Accessibility Settings command.'); <ins> const commandPrompt = nls.localize('commandPromptMigration', "Consider using powershell instead of command prompt for an improved experience"); </ins> class AccessibilityHelpWidget extends Widget implements ITerminalWidget { readonly id = 'help'; private _container: HTMLElement | undefined;
private readonly _markdownRenderer: MarkdownRenderer; constructor( <del> instance: ITerminalInstance, </del> <ins> private readonly _instance: ITerminalInstance, </ins> @IKeybindingService private readonly _keybindingService: IKeybindingService, @IInstantiationService instantiationService: IInstantiationService, @IOpenerService private readonly _openerService: IOpenerService ) { super(); <del> this._hasShellIntegration = instance.xterm?.shellIntegration.status === ShellIntegrationStatus.VSCode; </del> <ins> this._hasShellIntegration = _instance.xterm?.shellIntegration.status === ShellIntegrationStatus.VSCode; </ins> this._domNode = createFastDomNode(document.createElement('div')); this._contentDomNode = createFastDomNode(document.createElement('div')); this._contentDomNode.setClassName('terminal-accessibility-help');
this._register(dom.addStandardDisposableListener(this._contentDomNode.domNode, 'keydown', (e) => { if (e.keyCode === KeyCode.Escape) { this.hide(); <del> instance.focus(); </del> <ins> _instance.focus(); </ins> } })); <del> this._register(instance.onDidFocus(() => this.hide())); </del> <ins> this._register(_instance.onDidFocus(() => this.hide())); </ins> this._markdownRenderer = this._register(instantiationService.createInstance(MarkdownRenderer, {})); }
private _buildContent(): void { const content = []; content.push(this._descriptionForCommand(TerminalCommandId.FocusAccessibleBuffer, focusAccessibleBufferNls, focusAccessibleBufferNoKb)); <ins> if (this._instance.shellType === WindowsShellType.CommandPrompt) { content.push(commandPrompt); } </ins> if (this._hasShellIntegration) { content.push(shellIntegration); content.push('- ' + this._descriptionForCommand(TerminalCommandId.RunRecentCommand, runRecentCommand, runRecentCommandNoKb) + 'n- ' + this._descriptionForCommand(TerminalCommandId.GoToRecentDirectory, goToRecent, goToRecentNoKb));
const dismiss = nls.localize('dismiss', "You can dismiss this dialog by pressing Escape or focusing elsewhere."); const openDetectedLink = nls.localize('openDetectedLink', 'The Open Detected Link ({0}) command enables screen readers to easily open links found in the terminal.'); const openDetectedLinkNoKb = nls.localize('openDetectedLinkNoKb', 'The Open Detected Link command enables screen readers to easily open links found in the terminal and is currently not triggerable by a keybinding.'); <ins> const newWithProfile = nls.localize('newWithProfile', 'The Create New Terminal (With Profile) ({0}) command allows for easy terminal creation using a specific profile.'); const newWithProfileNoKb = nls.localize('newWithProfileNoKb', 'The Create New Terminal (With Profile) command command allows for easy terminal creation using a specific profile and is currently not triggerable by a keybinding.'); const accessibilitySettings = nls.localize('accessibilitySettings', 'Access accessibility settings such as `terminal.integrated.tabFocusMode` via the Preferences: Open Accessibility Settings command.'); </ins> class AccessibilityHelpWidget extends Widget implements ITerminalWidget { readonly id = 'help';