-
Notifications
You must be signed in to change notification settings - Fork 27.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add push option in createOutputChannel API #58116
Conversation
Alternative ideas for the parameter name are |
I liked
|
@jrieken Any updates on this. I would like to change the second parameter to options object so that it can be extensible in future
|
Not a fan of |
I think |
src/vs/vscode.d.ts
Outdated
*/ | ||
export function createOutputChannel(name: string): OutputChannel; | ||
export function createOutputChannel(name: string, options?: { force?: boolean }): OutputChannel; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why an object? are there plans for more options?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, there is a request to set a lang id for channels. If so it has to be set while creating
src/vs/vscode.d.ts
Outdated
@@ -6221,11 +6221,16 @@ declare module 'vscode' { | |||
export function createInputBox(): InputBox; | |||
|
|||
/** | |||
* Create a new [output channel](#OutputChannel) with the given name. | |||
* Creates a new [output channel](#OutputChannel) with the given name. | |||
* By default the UI will not show the appended data immediately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, we should sell this better... How about: "Output channels use a separate transport mechanism when appending data. This helps to reduce CPU load on the UI process but also means that the output channel UI updates with a small delay. Use the force
-flag to enforce immediate updates at the cost of higher CPU usage"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it. You have better marketing skills 👍 😄
Updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢 it
After implementing Output channels to log into files directly from extension host and let the renderer listen to file changes, a delay got introduced between adding the data and it is shown in the UI. It might not be expected for some output channels who intend to show real time data. This PR introduces an option
push
that extension authors can use while creating an output channel to decide whether to push the data and show in the UI immediately.#57618