Skip to content
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

Provide onDidChangeShell event which is fired when default terminal profile changes #171164

Closed
karrtikr opened this issue Jan 12, 2023 · 9 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@karrtikr
Copy link
Contributor

karrtikr commented Jan 12, 2023

Python extension is planning to use environment collection API to activate Python environments for a particular shell. Environment variables to use depends on the shell itself, so when the default shell setting changes, we would like to be notified so we could prepare the new set of environment variables to use the next time terminal opens.

As a workaround we could use onDidOpenTerminal to detect this change with a delay, however that requires the user to relaunch the terminal once environment collection is updated.

cc/ @Tyriar feel free to close this if this is a dup of #160694.

@gjsjohnmurray
Copy link
Contributor

It looks like PR #160900 already added that event as proposed API.

@meganrogge
Copy link
Contributor

/duplicate #160694

@VSCodeTriageBot VSCodeTriageBot added the *duplicate Issue identified as a duplicate of another issue(s) label Jan 17, 2023
@karrtikr
Copy link
Contributor Author

When I attempt to use the proposal it says:
image

Can you please clarify on what is needed to done from extension's end to use this?

@meganrogge
Copy link
Contributor

You have to add the proposed API to your package.json like this

Screenshot 2023-02-24 at 11 09 04 AM

@karrtikr
Copy link
Contributor Author

That is where the screenshot is from in the original pic.

@karrtikr
Copy link
Contributor Author

image

Should I create a new issue?

@gjsjohnmurray
Copy link
Contributor

What version of the vscode engine does your extension declare that it uses?

@karrtikr
Copy link
Contributor Author

It's 1.75.0-20230123:
image

@karrtikr
Copy link
Contributor Author

This proposal cannot be used because for this extension the product defines a fixed set of API proposals. You can test your extension but before publishing you MUST reach out to the VS Code team.

Does VSCode have a products file internally which declares which extension gets to use the proposal?

@github-actions github-actions bot locked and limited conversation to collaborators Mar 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

4 participants