Skip to content

languages: Enable terminal activation for uv-managed environments#45949

Merged
Veykril merged 1 commit intozed-industries:mainfrom
lingyaochu:terminal_venv
Jan 5, 2026
Merged

languages: Enable terminal activation for uv-managed environments#45949
Veykril merged 1 commit intozed-industries:mainfrom
lingyaochu:terminal_venv

Conversation

@lingyaochu
Copy link
Contributor

Currently, the Python toolchain can identify uv and uv-workspace environments (showing the correct labels in the UI), but it fails to activate them when opening a new terminal. This is because the activation script resolution and command generation logic were missing for these environment kinds.

This PR adds uv and uv-workspace to the standard virtual environment activation flow. Since uv creates environments with a standard venv structure, we can reuse the existing resolve_venv_activation_scripts logic to find and execute the appropriate activate scripts for different shells.

Release Notes:

  • Fixed terminal activation for uv and uv-workspace Python environments.

@cla-bot
Copy link

cla-bot bot commented Jan 2, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @lingyaochu on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@lingyaochu
Copy link
Contributor Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 2, 2026
@cla-bot
Copy link

cla-bot bot commented Jan 2, 2026

The cla-bot has been summoned, and re-checked this pull request!

Copy link
Member

@Veykril Veykril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Veykril Veykril enabled auto-merge (squash) January 5, 2026 15:17
@Veykril Veykril disabled auto-merge January 5, 2026 15:17
@Veykril Veykril changed the title Enable terminal activation for uv-managed environments languages: Enable terminal activation for uv-managed environments Jan 5, 2026
@Veykril Veykril enabled auto-merge (squash) January 5, 2026 15:18
@Veykril Veykril merged commit 8813abe into zed-industries:main Jan 5, 2026
25 checks passed
@lingyaochu lingyaochu deleted the terminal_venv branch January 5, 2026 15:35
rtfeldman pushed a commit that referenced this pull request Jan 5, 2026
Currently, the Python toolchain can identify `uv` and `uv-workspace`
environments (showing the correct labels in the UI), but it fails to
activate them when opening a new terminal. This is because the
activation script resolution and command generation logic were missing
for these environment kinds.

This PR adds `uv` and `uv-workspace` to the standard virtual environment
activation flow. Since `uv` creates environments with a standard `venv`
structure, we can reuse the existing `resolve_venv_activation_scripts`
logic to find and execute the appropriate `activate` scripts for
different shells.

Release Notes:

- Fixed terminal activation for `uv` and `uv-workspace` Python
environments.
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…s#45949)

Currently, the Python toolchain can identify `uv` and `uv-workspace`
environments (showing the correct labels in the UI), but it fails to
activate them when opening a new terminal. This is because the
activation script resolution and command generation logic were missing
for these environment kinds.

This PR adds `uv` and `uv-workspace` to the standard virtual environment
activation flow. Since `uv` creates environments with a standard `venv`
structure, we can reuse the existing `resolve_venv_activation_scripts`
logic to find and execute the appropriate `activate` scripts for
different shells.

Release Notes:

- Fixed terminal activation for `uv` and `uv-workspace` Python
environments.
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…s#45949)

Currently, the Python toolchain can identify `uv` and `uv-workspace`
environments (showing the correct labels in the UI), but it fails to
activate them when opening a new terminal. This is because the
activation script resolution and command generation logic were missing
for these environment kinds.

This PR adds `uv` and `uv-workspace` to the standard virtual environment
activation flow. Since `uv` creates environments with a standard `venv`
structure, we can reuse the existing `resolve_venv_activation_scripts`
logic to find and execute the appropriate `activate` scripts for
different shells.

Release Notes:

- Fixed terminal activation for `uv` and `uv-workspace` Python
environments.
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Feb 15, 2026
…s#45949)

Currently, the Python toolchain can identify `uv` and `uv-workspace`
environments (showing the correct labels in the UI), but it fails to
activate them when opening a new terminal. This is because the
activation script resolution and command generation logic were missing
for these environment kinds.

This PR adds `uv` and `uv-workspace` to the standard virtual environment
activation flow. Since `uv` creates environments with a standard `venv`
structure, we can reuse the existing `resolve_venv_activation_scripts`
logic to find and execute the appropriate `activate` scripts for
different shells.

Release Notes:

- Fixed terminal activation for `uv` and `uv-workspace` Python
environments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants