Skip to content

API: Improved Output Channel rendering capability for extension developers - Way to replace/update the content #132183

@smcenlly

Description

@smcenlly

Our extensions use the Output window extensively to show custom output. We use custom grammars and other mechanisms supported by the API (e.g. Code Lens) to create a nice interactive output (example below):

image

We (and our users) have been frustrated by by Output window delays (it can take a second or so to update) as well as flickering when we update our Output window content (see below).

quokka-output-flickering

We were planning on submitting a PR to fix the flickering/re-render problems but after investigating how the Output window is implemented, it seems the delays and flickering are a result of the output being buffered to a file and the output window loading from there (keeping track of start/end offsets when clear is called on the output window). This implementation makes sense for the generic use case of the Output window but in our case, we have a limited output and as a result we clear the entire content and re-render everything for each update that our extensions provide.

Given the implementation of the Output window, we thought that maybe it's more correct to extend the output channel rendering capabilities to align with out TextEditor rendering capabilities (since that's what is used for the output channel) and have created this feature request instead. We were thinking that adding support for the CustomReadonlyEditorProvider and CustomTextEditorProvider mechanisms for the Output channel would provide the flexibility we need to render the Output channel the way we need.

Is this a valid way of improving Output channel flexibility for extension developers? Or is there a better approach? Ideally we want instant update + no flickering but understand this probably does not fit with the existing implementation.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions