The command used to activate the venv can still be accessed/scrolled to
if needed.
Release Notes:
- The Python virtual environment activation command is no longer shown
in the terminal output by default.
Co-authored-by: Peter Tripp <peter@zed.dev>
Fixes https://github.com/zed-industries/zed/issues/21972
This fixes two bugs:
**Bug 1**: this bug caused us to only ever load a single environment in
a multi-worktree project, thanks to this line:
```rust
if let Some(task) = self.get_environment_task.as_ref()
```
We'd only ever run a single task per project, which is wrong.
What does code does is to cache the tasks per `worktree_id`, which means
we don't even need to cache the environments again, since we can just
cache the `Shared<Task<...>>`.
**Bug 2**: we assumed that every `worktree_abs_path` is a directory,
which lead to `Failed to run direnv` log messages when opening a project
that had a worktree with a single file open (easy to reproduce: open a
normal project, open your settings, close Zed, reopen it — the settings
faile caused environments to not load)
It's fixed by checking whether the `worktree_abs_path` is an absolute
directory. Since this is always running locally, it's fine to use
`smol::fs` here instead of using our `Fs`.
Release Notes:
- Fixed shell environments not being loaded properly to be used by
language servers and terminals in case a project had multiple worktrees.
- Fixed `Failed to run direnv` messages showing up in case Zed restored
a window that contained a worktree with a single file.
https://github.com/zed-industries/zed/issues/21972
Motivation for this is to allow the `main` branch to be protected. This will enable use of auto-merge and merge queue.
Co-authored-by: Peter Tripp <peter@zed.dev>
This PR fixes an issue where disabled extension cards would block scroll
events when the mouse was over them.
Instead of using `.occlude`—which captures _all_ mouse events—we use
`.block_mouse_down` to just block mouse down events (to prevent clicking
the buttons on the disabled card). We also set the cursor style to the
default, as it was still switching to the pointer when hovered over top
of one of the buttons.
Release Notes:
- Fixed disabled extensions blocking scroll events in the extensions
list.
Closes #ISSUE
Still TODO to make this feature good is better command history
Release Notes:
- vim: Add support for `:g/<pattern>/<cmd>` and `:v/<pattern>/<cmd>`
If an inline completion isn't shown in a menu, we highlight text in the
editor as deleted.
But if it's shown in the menu, we didn't even show deleted text, which
makes it hard to understand what's going on.
This fixes it.
![screenshot-2024-12-18-14 34
55@2x](https://github.com/user-attachments/assets/579639e4-5ed9-4fe6-8e21-65166d192432)
Release Notes:
- N/A
Also makes the inline assistant and inline terminal assistant share a
bunch more code.
Release Notes:
- N/A
---------
Co-authored-by: Agus <agus@zed.dev>
Co-authored-by: Agus Zubiaga <hi@aguz.me>
This changes #22093 by making the change only have an effect for the
supported provider: Zeta.
Made the change because the UX is still experimental and I don't want to
break existing workflows for Copilot/Supermaven users.
Even Zeta users can opt-out of it by setting
`"show_inline_completions_in_menu": false` in their settings, in case
they want the old show-inline-completion-or-show-lsp-completion behavior
back.
Release Notes:
- N/A
Possible panic here in case we can't find the excerpt in the
multibuffer.
I thought this could happen when the inline completion references an
excerpt that disappeared from the multibuffer, but looking at the code
I'm not sure anymore - we use the same multibuffer snapshot in this
whole function and the `anchor_in_excerpt` method clips the anchors.
Still, let's be safe here.
Release Notes:
- N/A
We were committing the cardinal sin of subtracting one from a column
without clipping
Closes #ISSUE
Release Notes:
- Fixed a panic in linked editing ranges
When running the collab server locally on a new machine, I found there
were some instructions missing for setting up the Postgres database.
Namely, the user mentioned on the `.env.toml` is not created by default.
Ref: https://github.com/zed-industries/zed/issues/8260
Release Notes:
- N/A
* Presence of the aside no longer affects position or size of the
context menu.
* Prefers to fit to the right, then on same side of line, then other
side of line, within the following preference order:
- Max possible size within text area.
- Max possible size within window.
- Actual size within window. This is the only case that could cause it
to jump around with less stability.
A further enhancement atop this might be to dynamically resize aside
height to fit.
Release notes are N/A as they are covered by the notes for #22102.
Closes#8523
Release Notes:
* N/A
This PR fixes some focus issues with opening the thread history, which
required that the Assistant2 panel be focused in order for the history
to open.
Release Notes:
- N/A
This PR fixes an issue with the Assistant2 file context picker where
files weren't being attached properly.
We needed to retrieve the files from the worktree without the worktree
root name in the file path.
Release Notes:
- N/A
---------
Co-authored-by: Max <max@zed.dev>
Previously, each window stored its own collection of focus handles. This
meant that to create a focus handle, you needed to have access to a
Window. I'm working on a simplification to gpui's context types that
removes `WindowContext` and `ViewContext` in favor of passing a window
reference explicitly when rendering or handling events. You'll still
need a window to manipulate focus, but it will be helpful to be able to
create focus handles without a window.
cc @mgsloan
Release Notes:
- N/A
This PR fixes some formatting issues in the workspace initialization
code that stemmed from certain constructs causing `rustfmt` to bail out
of the formatting.
The bulk of the content of `initialize_workspace` has been factored out
into functions, as having nested closures within closures seems to be
the primary cause of `rustfmt` being unhappy.
Release Notes:
- N/A
This PR makes it so both Assistant panels are visible when in the
`assistant2` feature flag.
This way folks can continue using Assistant1 if Assistant2 isn't meeting
their needs.
Right now they are shown as two different panels shown in the status bar
(although using the same icon), but this is just a temporary state until
we can surface the Assistant1 functionality in Assistant2 somehow.
Note that the inline assist will always use the Assistant2 panel.
Release Notes:
- N/A
This PR sketches in the structure for the directory context picker.
Waiting on implementing the actual behavior until we fix the issues with
the file context picker.
Release Notes:
- N/A
![editor_scrollbars](https://github.com/user-attachments/assets/76c26776-8fe4-47f8-9c79-9add7d7d2151)
Closes#4427
Release Notes:
- Added a horizontal scrollbar to the editor panel
- Added `axis` option to `scrollbar` in the Zed configuration, which can
forcefully disable either the horizontal or vertical scrollbar
- Added `horizontal_scroll_margin` equivalent to
`vertical_scroll_margin` in the Zed configuration
Rough Edges:
This feature seems mostly stable from my testing. I've been using a
development build for about a week with no issues. Any feedback would be
appreciated. There are a few things to note as well:
1. Scrolling to the lower right occasionally causes scrollbar clipping
on my end, but it isn't consistent and it isn't major. Some more testing
would definitely be a good idea. [FIXED]
2. Documentation may need to be modified
3. I added an `AxisPair` type to the `editor` crate to manage values
that have a horizontal and vertical variant. I'm not sure if that's the
optimal way to do it, but I didn't see a good alternative. The `Point`
type would technically work, but it may cause confusion.
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
This makes inline completions show up in the completion menu even if the
user has set `"show_completion_documentation": false` in their settings,
because there is no other way to show the Zeta completion.
Follow-up to #22093
Release Notes:
- N/A
Co-authored-by: Danilo <danilo@zed.dev>
* Now decides whether the menu is above or below the target position
before rendering it. This causes its position to no longer vary
depending on the length of completions
* When the text area is height constrained (< 12) lines, now chooses the
side which has the most space. Before it would always display above if
height constrained below.
* Misc code cleanups
Release Notes:
- Improved completions menu layout to be more stable and use available
space better.
This PR makes it so `assistant` and `assistant2` both use the same
action for inline assist (`zed_actions::InlineAssist`).
This makes it so the keybindings to deploy the inline assist seamlessly
swap based on the feature flag without needing to rebind them.
One minor caveat: if you're using `assistant2` the action name in the
command palette will be `assistant: inline assist`.
Release Notes:
- N/A
This PR adds an action and associated keybinding
(<kbd>Cmd+Shift+A</kbd>) to toggle the context picker.
This allows for adding context via the keyboard.
Release Notes:
- N/A