jiebi/CodeConvo huggingface dataset:
Code change:
Pull out most xterm handling from into its own class that encapsulates addons, latest write/parse, _enableWebglRenderer/other renderer stuff, customkeyhandler?, etc. The goal is to make much smaller and enable easy unit testing of previously core behavior by not having so many service dependencies. Expose as public ITerminalInstance to avoid creating passthrough functions like scrollToTop Expose as public but only to TerminalInstance (ie. don't expose on XtermTerminal's interface) will be mostly a glue class (process manager <-xterm), not intended to be unit testable but by integration tests

Related discussion:
text: private _titleSource: TitleEventSource = TitleEventSource.Process; private _container: HTMLElement | undefined; private _wrapperElement: (HTMLElement & { xterm?: XTermTerminal }) | undefined; <del> private _xtermTypeAhead: TypeAheadAddon | undefined; private _xtermElement: HTMLDivElement | undefined; </del> private _horizontalScrollbar: DomScrollableElement | undefined; private _terminalHasTextContextKey: IContextKey<boolean>; private _terminalA11yTreeFocusContextKey: IContextKey<boolean>;
Code change:
Pull out most xterm handling from into its own class that encapsulates addons, latest write/parse, _enableWebglRenderer/other renderer stuff, customkeyhandler?, etc. The goal is to make much smaller and enable easy unit testing of previously core behavior by not having so many service dependencies. Expose as public ITerminalInstance to avoid creating passthrough functions like scrollToTop Expose as public but only to TerminalInstance (ie. don't expose on XtermTerminal's interface) will be mostly a glue class (process manager <-xterm), not intended to be unit testable but by integration tests

Related discussion:
text: private _cwd: string | undefined = undefined; private _initialCwd: string | undefined = undefined; private _dimensionsOverride: ITerminalDimensionsOverride | undefined; <del> private _xtermReadyPromise: Promise<XtermTerminal>; </del> private _titleReadyPromise: Promise<string>; private _titleReadyComplete: ((title: string) => any) | undefined; private _areLinksReady: boolean = false;
Code change:
Pull out most xterm handling from into its own class that encapsulates addons, latest write/parse, _enableWebglRenderer/other renderer stuff, customkeyhandler?, etc. The goal is to make much smaller and enable easy unit testing of previously core behavior by not having so many service dependencies. Expose as public ITerminalInstance to avoid creating passthrough functions like scrollToTop Expose as public but only to TerminalInstance (ie. don't expose on XtermTerminal's interface) will be mostly a glue class (process manager <-xterm), not intended to be unit testable but by integration tests

Related discussion:
text: private _hasHadInput: boolean; readonly statusList: ITerminalStatusList; disableLayout: boolean = false;
Code change:
Pull out most xterm handling from into its own class that encapsulates addons, latest write/parse, _enableWebglRenderer/other renderer stuff, customkeyhandler?, etc. The goal is to make much smaller and enable easy unit testing of previously core behavior by not having so many service dependencies. Expose as public ITerminalInstance to avoid creating passthrough functions like scrollToTop Expose as public but only to TerminalInstance (ie. don't expose on XtermTerminal's interface) will be mostly a glue class (process manager <-xterm), not intended to be unit testable but by integration tests

Related discussion:
text: private _userHome?: string; private _hasScrollBar?: boolean; <del> xterm?: XtermTerminal; </del> get target(): TerminalLocation | undefined { return this.xterm?.target; } set target(value: TerminalLocation | undefined) { if (this.xterm) {
Code change:
Pull out most xterm handling from into its own class that encapsulates addons, latest write/parse, _enableWebglRenderer/other renderer stuff, customkeyhandler?, etc. The goal is to make much smaller and enable easy unit testing of previously core behavior by not having so many service dependencies. Expose as public ITerminalInstance to avoid creating passthrough functions like scrollToTop Expose as public but only to TerminalInstance (ie. don't expose on XtermTerminal's interface) will be mostly a glue class (process manager <-xterm), not intended to be unit testable but by integration tests

Related discussion:
text: this._onLinksReady.fire(this); }); <del> this._xtermTypeAhead = this._register(this._instantiationService.createInstance(TypeAheadAddon, this._processManager, this._configHelper)); xterm.raw.loadAddon(this._xtermTypeAhead); </del> <ins> // TODO: This should be an optional addon this._xtermTypeAheadAddon = this._register(this._instantiationService.createInstance(TypeAheadAddon, this._processManager, this._configHelper)); xterm.raw.loadAddon(this._xtermTypeAheadAddon); </ins> this._pathService.userHome().then(userHome => { this._userHome = userHome.fsPath; });
Code change:
Pull out most xterm handling from into its own class that encapsulates addons, latest write/parse, _enableWebglRenderer/other renderer stuff, customkeyhandler?, etc. The goal is to make much smaller and enable easy unit testing of previously core behavior by not having so many service dependencies. Expose as public ITerminalInstance to avoid creating passthrough functions like scrollToTop Expose as public but only to TerminalInstance (ie. don't expose on XtermTerminal's interface) will be mostly a glue class (process manager <-xterm), not intended to be unit testable but by integration tests

Related discussion:
text: this._container = container; this._wrapperElement = document.createElement('div'); this._wrapperElement.classList.add('terminal-wrapper'); <del> this._xtermElement = document.createElement('div'); this._wrapperElement.appendChild(this._xtermElement); </del> <ins> const xtermElement = document.createElement('div'); this._wrapperElement.appendChild(xtermElement); </ins> this._container.appendChild(this._wrapperElement);
Code change:
Pull out most xterm handling from into its own class that encapsulates addons, latest write/parse, _enableWebglRenderer/other renderer stuff, customkeyhandler?, etc. The goal is to make much smaller and enable easy unit testing of previously core behavior by not having so many service dependencies. Expose as public ITerminalInstance to avoid creating passthrough functions like scrollToTop Expose as public but only to TerminalInstance (ie. don't expose on XtermTerminal's interface) will be mostly a glue class (process manager <-xterm), not intended to be unit testable but by integration tests

Related discussion:
text: // Attach the xterm object to the DOM, exposing it to the smoke tests this._wrapperElement.xterm = xterm.raw; <del> xterm.attachToElement(this._xtermElement); </del> <ins> xterm.attachToElement(xtermElement); </ins> if (!xterm.raw.element || !xterm.raw.textarea) { throw new Error('xterm elements not set after open');
Code change:
Pull out most xterm handling from into its own class that encapsulates addons, latest write/parse, _enableWebglRenderer/other renderer stuff, customkeyhandler?, etc. The goal is to make much smaller and enable easy unit testing of previously core behavior by not having so many service dependencies. Expose as public ITerminalInstance to avoid creating passthrough functions like scrollToTop Expose as public but only to TerminalInstance (ie. don't expose on XtermTerminal's interface) will be mostly a glue class (process manager <-xterm), not intended to be unit testable but by integration tests

Related discussion:
text: this._processManager.relaunch(this._shellLaunchConfig, this._cols || Constants.DefaultCols, this._rows || Constants.DefaultRows, this._accessibilityService.isScreenReaderOptimized(), reset); <del> this._xtermTypeAhead?.reset(); </del> <ins> this._xtermTypeAheadAddon?.reset(); </ins> } @debounce(1000)
Code change:
There are too many issues with local echo and can really degrade the experience right now for local workspaces. We should add an on/off/auto setting where auto is disabled in local workspaces, so opt-in ssh in local terminal support is there.
what steps would we take to verify? Looks like there's a new setting?
I tested the setting

Related discussion:
text: UnicodeVersion = 'terminal.integrated.unicodeVersion', ExperimentalLinkProvider = 'terminal.integrated.experimentalLinkProvider', LocalEchoLatencyThreshold = 'terminal.integrated.localEchoLatencyThreshold', <ins> LocalEchoEnabled = 'terminal.integrated.localEchoEnabled', </ins> LocalEchoExcludePrograms = 'terminal.integrated.localEchoExcludePrograms', LocalEchoStyle = 'terminal.integrated.localEchoStyle', EnablePersistentSessions = 'terminal.integrated.enablePersistentSessions',
Code change:
There are too many issues with local echo and can really degrade the experience right now for local workspaces. We should add an on/off/auto setting where auto is disabled in local workspaces, so opt-in ssh in local terminal support is there.
what steps would we take to verify? Looks like there's a new setting?
I tested the setting

Related discussion:
text: this._onLinksReady.fire(this); }); <del> // TODO: This should be an optional addon this._xtermTypeAheadAddon = this._register(this._instantiationService.createInstance(TypeAheadAddon, this._processManager, this._configHelper)); xterm.raw.loadAddon(this._xtermTypeAheadAddon); </del> <ins> this._loadTypeAheadAddon(xterm); this._configurationService.onDidChangeConfiguration(e => { if (e.affectsConfiguration(TerminalSettingId.LocalEchoEnabled)) { this._loadTypeAheadAddon(xterm); } }); </ins> this._pathService.userHome().then(userHome => { this._userHome = userHome.fsPath; }); return xterm; } <ins> private _loadTypeAheadAddon(xterm: XtermTerminal): void { const enabled = this._configHelper.config.localEchoEnabled; const isRemote = !!this.remoteAuthority; if (enabled === 'off' || enabled === 'auto' && !isRemote) { return this._xtermTypeAheadAddon?.dispose(); } if (this._xtermTypeAheadAddon) { return; } if (enabled === 'on' || (enabled === 'auto' && isRemote)) { this._xtermTypeAheadAddon = this._register(this._instantiationService.createInstance(TypeAheadAddon, this._processManager, this._configHelper)); xterm.raw.loadAddon(this._xtermTypeAheadAddon); } } </ins> detachFromElement(): void { this._wrapperElement?.remove(); this._container = undefined;
Code change:
There are too many issues with local echo and can really degrade the experience right now for local workspaces. We should add an on/off/auto setting where auto is disabled in local workspaces, so opt-in ssh in local terminal support is there.
what steps would we take to verify? Looks like there's a new setting?
I tested the setting

Related discussion:
text: } else { this.remoteAuthority = this._workbenchEnvironmentService.remoteAuthority; } const backend = this._terminalInstanceService.getBackend(this.remoteAuthority); if (!backend) { throw new Error(`No terminal backend registered for remote authority '${this.remoteAuthority}'`);
Code change:
There are too many issues with local echo and can really degrade the experience right now for local workspaces. We should add an on/off/auto setting where auto is disabled in local workspaces, so opt-in ssh in local terminal support is there.
what steps would we take to verify? Looks like there's a new setting?
I tested the setting

Related discussion:
text: experimentalLinkProvider: boolean; localEchoLatencyThreshold: number; localEchoExcludePrograms: ReadonlyArray<string>; <ins> localEchoEnabled: 'auto' | 'on' | 'off'; </ins> localEchoStyle: 'bold' | 'dim' | 'italic' | 'underlined' | 'inverted' | string; enablePersistentSessions: boolean; tabs: {
Code change:
There are too many issues with local echo and can really degrade the experience right now for local workspaces. We should add an on/off/auto setting where auto is disabled in local workspaces, so opt-in ssh in local terminal support is there.
what steps would we take to verify? Looks like there's a new setting?
I tested the setting

Related discussion:
text: minimum: -1, default: 30, }, <ins> [TerminalSettingId.LocalEchoEnabled]: { description: localize('terminal.integrated.localEchoEnabled', "When local echo should be enabled. This will override `terminal.integrated.localEchoLatencyThreshold`"), type: 'string', enum: ['on', 'off', 'auto'], enumDescriptions: [ localize('terminal.integrated.localEchoEnabled.on', "Always enabled"), localize('terminal.integrated.localEchoEnabled.off', "Always disabled"), localize('terminal.integrated.localEchoEnabled.auto', "Enabled only for remote workspaces") ], default: 'auto' }, </ins> [TerminalSettingId.LocalEchoExcludePrograms]: { description: localize('terminal.integrated.localEchoExcludePrograms', "Experimental: local echo will be disabled when any of these program names are found in the terminal title."), type: 'array',
Code change:
Does this issue occur when all extensions are disabled?: Yes As described in the title and the clip below will say the rest, the canvas seems overwhelmed with the output and doesn't wrap it. https://user- The log: Because the lower trimmed part are wrapped, it thinks it don't have to show the scrollbar so we can't view the rest if the line is long enough. This is critical. ! If we put some colors, we will see the lines overflow at the edge: ! Smaller outputs are fine: ! <details<summarySystem info</summaryVersion: 1.62.0-insider Commit: Date: 2021-10-29T07:49:33.336Z Electron: 13.5.1 Chrome: 91.0.4472.164 14.16.0 V8: 9.1.269.39-electron.0 OS: Linux x64 5.11.0-38-generic </detailsI haven't got a chance to test on other OSs. This is my test notebook:
this is just a bug, but could probably be considered as part of the discussion about
thanks for the feedback. What are your thoughts on the current behavior, where we supply a link at the top of the output that allows you to open the output in a separate editor tab? This behavior can indirectly essentially solve problems like this.
It's definitely a good design. The issue actually doesn't stop me from doing my job. My opinion is, as you said, it's just a bug - and I just want to let you know.
I'm taking this with the assumption you're not currently looking at it.

Related discussion:
text: container.appendChild(generateViewMoreElement(notebookUri, cellViewModel, outputId, disposables, openerService)); <del> const pre = DOM.$('pre'); container.appendChild(pre); pre.appendChild(handleANSIOutput(buffer.getValueInRange(new Range(1, 1, linesLimit - 5, buffer.getLineLastNonWhitespaceColumn(linesLimit - 5)), EndOfLinePreference.TextDefined), linkDetector, themeService, undefined)); </del> <ins> const div = DOM.$('div'); container.appendChild(div); div.appendChild(handleANSIOutput(buffer.getValueInRange(new Range(1, 1, linesLimit - 5, buffer.getLineLastNonWhitespaceColumn(linesLimit - 5)), EndOfLinePreference.TextDefined), linkDetector, themeService, undefined)); </ins> // view more ... DOM.append(container, DOM.$('span' + Codicon.toolBarMore.cssSelector)); const lineCount = buffer.getLineCount(); <del> const pre2 = DOM.$('div'); container.appendChild(pre2); pre2.appendChild(handleANSIOutput(buffer.getValueInRange(new Range(lineCount - 5, 1, lineCount, buffer.getLineLastNonWhitespaceColumn(lineCount)), EndOfLinePreference.TextDefined), linkDetector, themeService, undefined)); </del> <ins> const div2 = DOM.$('div'); container.appendChild(div2); div2.appendChild(handleANSIOutput(buffer.getValueInRange(new Range(lineCount - 5, 1, lineCount, buffer.getLineLastNonWhitespaceColumn(lineCount)), EndOfLinePreference.TextDefined), linkDetector, themeService, undefined)); </ins> }
Code change:
VS Code version: 1.63.0-insider Jupyter Extension version : v2021.10. Python Extension version : v2021.12.-dev OS : Windows 11 Python and/or Anaconda version: 3.9.7 Type of virtual environment used : N/A Jupyter server running: Local Render correctly the Markdown text using the default renderer: ! This is the correct rendering for this: ! a new Jupyter notebook a new cell code with the following Python: Ctrl-Enter to render cell Via "Choose Output Minetype", selecting the "non default" renderer (i.e. the one with "(vscode.markown-language-feature") for Markdown: ! Gives the expected result: ! Also, I could not find a setting allowing me to make the functioning "Output Mimetype" the default... Thanks!
The actual repro attached.
this might be another example of the wrong renderer being chosen.
I get the correct default renderer first time now. text/plain is the only other output option. !

Related discussion:
text: import * as DOM from 'vs/base/browser/dom'; import { Disposable, DisposableStore, toDisposable } from 'vs/base/common/lifecycle'; import { Mimes } from 'vs/base/common/mime'; <del> import { dirname } from 'vs/base/common/resources'; </del> import { URI } from 'vs/base/common/uri'; <del> import { MarkdownRenderer } from 'vs/editor/browser/core/markdownRenderer'; </del> import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ILogService } from 'vs/platform/log/common/log';
Code change:
VS Code version: 1.63.0-insider Jupyter Extension version : v2021.10. Python Extension version : v2021.12.-dev OS : Windows 11 Python and/or Anaconda version: 3.9.7 Type of virtual environment used : N/A Jupyter server running: Local Render correctly the Markdown text using the default renderer: ! This is the correct rendering for this: ! a new Jupyter notebook a new cell code with the following Python: Ctrl-Enter to render cell Via "Choose Output Minetype", selecting the "non default" renderer (i.e. the one with "(vscode.markown-language-feature") for Markdown: ! Gives the expected result: ! Also, I could not find a setting allowing me to make the functioning "Output Mimetype" the default... Thanks!
The actual repro attached.
this might be another example of the wrong renderer being chosen.
I get the correct default renderer first time now. text/plain is the only other output option. !

Related discussion:
text: import { handleANSIOutput } from 'vs/workbench/contrib/debug/browser/debugANSIHandling'; import { LinkDetector } from 'vs/workbench/contrib/debug/browser/linkDetector'; import { ICellOutputViewModel, IRenderOutput, RenderOutputType } from 'vs/workbench/contrib/notebook/browser/notebookBrowser'; <ins> import { INotebookDelegateForOutput, IOutputTransformContribution as IOutputRendererContribution } from 'vs/workbench/contrib/notebook/browser/view/notebookRenderingCommon'; </ins> import { OutputRendererRegistry } from 'vs/workbench/contrib/notebook/browser/view/output/rendererRegistry'; import { truncatedArrayOfString } from 'vs/workbench/contrib/notebook/browser/view/output/transforms/textHelper'; import { IOutputItemDto, TextOutputLineLimit } from 'vs/workbench/contrib/notebook/common/notebookCommon'; <del> import { INotebookDelegateForOutput, IOutputTransformContribution as IOutputRendererContribution } from 'vs/workbench/contrib/notebook/browser/view/notebookRenderingCommon'; </del> class JavaScriptRendererContrib extends Disposable implements IOutputRendererContribution {
Code change:
VS Code version: 1.63.0-insider Jupyter Extension version : v2021.10. Python Extension version : v2021.12.-dev OS : Windows 11 Python and/or Anaconda version: 3.9.7 Type of virtual environment used : N/A Jupyter server running: Local Render correctly the Markdown text using the default renderer: ! This is the correct rendering for this: ! a new Jupyter notebook a new cell code with the following Python: Ctrl-Enter to render cell Via "Choose Output Minetype", selecting the "non default" renderer (i.e. the one with "(vscode.markown-language-feature") for Markdown: ! Gives the expected result: ! Also, I could not find a setting allowing me to make the functioning "Output Mimetype" the default... Thanks!
The actual repro attached.
this might be another example of the wrong renderer being chosen.
I get the correct default renderer first time now. text/plain is the only other output option. !

Related discussion:
text: } } <del> class MdRendererContrib extends Disposable implements IOutputRendererContribution { getType() { return RenderOutputType.Mainframe; } getMimetypes() { return [Mimes.markdown, Mimes.latex]; } constructor( public notebookEditor: INotebookDelegateForOutput, @IInstantiationService private readonly instantiationService: IInstantiationService, ) { super(); } render(output: ICellOutputViewModel, item: IOutputItemDto, container: HTMLElement, notebookUri: URI): IRenderOutput { const disposable = new DisposableStore(); const str = getStringValue(item); const mdOutput = document.createElement('div'); const mdRenderer = this.instantiationService.createInstance(MarkdownRenderer, { baseUrl: dirname(notebookUri) }); mdOutput.appendChild(mdRenderer.render({ value: str, isTrusted: true, supportThemeIcons: true }, undefined, { gfm: true }).element); container.appendChild(mdOutput); disposable.add(mdRenderer); return { type: RenderOutputType.Mainframe, disposable }; } } </del> class ImgRendererContrib extends Disposable implements IOutputRendererContribution { getType() { return RenderOutputType.Mainframe;
Code change:
VS Code version: 1.63.0-insider Jupyter Extension version : v2021.10. Python Extension version : v2021.12.-dev OS : Windows 11 Python and/or Anaconda version: 3.9.7 Type of virtual environment used : N/A Jupyter server running: Local Render correctly the Markdown text using the default renderer: ! This is the correct rendering for this: ! a new Jupyter notebook a new cell code with the following Python: Ctrl-Enter to render cell Via "Choose Output Minetype", selecting the "non default" renderer (i.e. the one with "(vscode.markown-language-feature") for Markdown: ! Gives the expected result: ! Also, I could not find a setting allowing me to make the functioning "Output Mimetype" the default... Thanks!
The actual repro attached.
this might be another example of the wrong renderer being chosen.
I get the correct default renderer first time now. text/plain is the only other output option. !

Related discussion:
text: OutputRendererRegistry.registerOutputTransform(JavaScriptRendererContrib); OutputRendererRegistry.registerOutputTransform(HTMLRendererContrib); <del> OutputRendererRegistry.registerOutputTransform(MdRendererContrib); </del> OutputRendererRegistry.registerOutputTransform(ImgRendererContrib); OutputRendererRegistry.registerOutputTransform(PlainTextRendererContrib); OutputRendererRegistry.registerOutputTransform(JSErrorRendererContrib);
Code change:
VS Code version: 1.63.0-insider Jupyter Extension version : v2021.10. Python Extension version : v2021.12.-dev OS : Windows 11 Python and/or Anaconda version: 3.9.7 Type of virtual environment used : N/A Jupyter server running: Local Render correctly the Markdown text using the default renderer: ! This is the correct rendering for this: ! a new Jupyter notebook a new cell code with the following Python: Ctrl-Enter to render cell Via "Choose Output Minetype", selecting the "non default" renderer (i.e. the one with "(vscode.markown-language-feature") for Markdown: ! Gives the expected result: ! Also, I could not find a setting allowing me to make the functioning "Output Mimetype" the default... Thanks!
The actual repro attached.
this might be another example of the wrong renderer being chosen.
I get the correct default renderer first time now. text/plain is the only other output option. !

Related discussion:
text: ['image/svg+xml', { supportedByCore: true }], ['application/json', { alwaysSecure: true, supportedByCore: true }], [Mimes.latex, { alwaysSecure: true, supportedByCore: true }], <del> [Mimes.markdown, { alwaysSecure: true, supportedByCore: true }], </del> [Mimes.text, { alwaysSecure: true, supportedByCore: true }], ['text/html', { supportedByCore: true }], ['text/x-javascript', { alwaysSecure: true, supportedByCore: true }], // secure because rendered as text, not executed