This fixes#12125 and addresses what's described in here:
-
https://github.com/zed-industries/zed/issues/4977#issuecomment-2162094388
Before the changes in this PR, when running tasks, they inherited the
Zed process environment, but that might not be the process environment
that you'd get if you `cd` into a project directory.
We already ran into that problem with language servers and we fixed it
by loading the shell environment in the context of a projects root
directory and then passing that to the language servers when starting
them (or when looking for their binaries).
What the change here does is to add the behavior for tasks too: we use
the project-environment as the base environment with which to spawn
tasks. Everything else still works the same, except that the base env is
different.
Release Notes:
- Improved the environment-variable detection when running tasks so that
tasks can now access environment variables as if the task had been
spawned in a terminal that `cd`ed into a project directory. That means
environment variables set by `direnv`/`asdf`/`mise` and other tools are
now picked up.
([#12125](https://github.com/zed-industries/zed/issues/12125)).
Demo:
https://github.com/user-attachments/assets/8bfcc98f-0f9b-4439-b0d9-298aef1a3efe
When pressing <kbd>control</kbd> + <kbd>enter</kbd>, the AI-powered
inline transformation input displays an icon button and a token count,
which should show roughly the same numbers you'd see on your assistant
panel. At a first glance, though, the token count not being zero can be
confusing, where you'd wonder where that's coming from. That's because
the inline input uses whatever piece of context and/or information of
the currently selected assistant tab to suggest more accurate edits.
So, this PR introduces an informative piece of text to the
`ModelSelector` menu, on the inline transformation input, which delivers
exactly this bit of info, aimed at clarifying the connection between
these two methods of interacting with LLMs.
I've also took the opportunity to change the icon button's icon to one
that's a bit easier to see, still representing the affordance of "click
to configure something".
Release Notes:
- Add note about how inline edits consume context from the assistant
panel to clarify interaction with LLMs.
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [log](https://togithub.com/rust-lang/log) | workspace.dependencies |
patch | `0.4.21` -> `0.4.22` |
---
### Release Notes
<details>
<summary>rust-lang/log (log)</summary>
###
[`v0.4.22`](https://togithub.com/rust-lang/log/blob/HEAD/CHANGELOG.md#0422---2024-06-27)
[Compare
Source](https://togithub.com/rust-lang/log/compare/0.4.21...0.4.22)
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
Release Notes:
- N/A
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzguMCIsInVwZGF0ZWRJblZlciI6IjM3LjQzOC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [oo7](https://togithub.com/bilelmoussaoui/oo7) | dependencies | patch
| `0.3.0` -> `0.3.3` |
---
### Release Notes
<details>
<summary>bilelmoussaoui/oo7 (oo7)</summary>
###
[`v0.3.3`](https://togithub.com/bilelmoussaoui/oo7/releases/tag/0.3.3)
[Compare
Source](https://togithub.com/bilelmoussaoui/oo7/compare/0.3.2...0.3.3)
Bilal Elmoussaoui:
- client/item: Force tuple usage when serializing
- client: Use async UnixStream
###
[`v0.3.2`](https://togithub.com/bilelmoussaoui/oo7/releases/tag/0.3.2)
[Compare
Source](https://togithub.com/bilelmoussaoui/oo7/compare/0.3.1...0.3.2)
Kévin Commaille:
- [client: Fix compile issue with tracing
feature](8720514d56)
- [client: Do not create features for optional deps already behind a
feature](c4cad3dbd4)
- Various clippy fixes
###
[`v0.3.1`](https://togithub.com/bilelmoussaoui/oo7/releases/tag/0.3.1)
[Compare
Source](https://togithub.com/bilelmoussaoui/oo7/compare/0.3.0...0.3.1)
Daiki Ueno:
- [portal: Support migration from legacy keyring
format](0e4d787372)
Dhanuka Warusadura:
- [portal: Add rekeying support for
oo7::portal::Keyring](96dd3c4292)
Felix Häcker:
- [service: Use correct signal name for
CollectionDeleted](19499a6499)
- [service: Add signals for collection
create/delete/change](c4e68b8e76)
- [collection: Add path to public
api](7effc007d4)
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
Release Notes:
- N/A
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzguMCIsInVwZGF0ZWRJblZlciI6IjM3LjQzOC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Follow-up of https://github.com/zed-industries/zed/pull/15256
Returns zero size for no items to render.
Incorrect worktree state made the uniform list to have 0 items to
render, so
```Rust
let mut items = (self.render_items)(item_ix..item_ix + 1, cx);
let mut item_to_measure = items.pop().unwrap();
```
panicked as the first line returned an empty array despite a
single-element range provided.
Release Notes:
- N/A
This PR adds the `renovate[bot]` user to the `GET /contributor` endpoint
so that it passes the CLA check.
I patched this temporarily by adding a case into the `zed.dev` endpoint
the fronts this one, but I think long-term it will be better for collab
to be the source of truth.
Release Notes:
- N/A
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [ctor](https://togithub.com/mmastrac/rust-ctor) |
workspace.dependencies | patch | `0.2.6` -> `0.2.8` |
---
### Configuration
📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
Release Notes:
- N/A
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzguMCIsInVwZGF0ZWRJblZlciI6IjM3LjQzOC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR makes custom rows in `ContextMenu`s use a regular cursor instead
of a pointer.
Even though custom rows were marked as not selectable, we would still
pass a click handler to them, causing the `ListItem` to show a pointer
cursor.
Release Notes:
- N/A
This PR adds the missing workspace lint configuration for the following
crates that were missing it:
- `google_ai`
- `open_ai`
- `tab_switcher`
Release Notes:
- N/A
This PR adds a new `xtask` command for checking that packages conform to
certain standards.
Still a work-in-progress, but right now it checks:
- If `[lints] workspace = true` is set
- If packages are using non-workspace dependencies
Release Notes:
- N/A
Follow-up of https://github.com/zed-industries/zed/pull/15178
* shows proper cursor on hovering a block that's over a git hunk
* show gutter buttons better when git hunks are on the same line
* show deleted hunks' gutter buttons better when git blame info is shown
in the gutter
Release Notes:
- N/A
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [sha2](https://togithub.com/RustCrypto/hashes) |
workspace.dependencies | patch | `0.10.7` -> `0.10.8` |
---
### Release Notes
<details>
<summary>RustCrypto/hashes (sha2)</summary>
###
[`v0.10.8`](https://togithub.com/RustCrypto/hashes/compare/sha2-v0.10.7...sha2-v0.10.8)
[Compare
Source](https://togithub.com/RustCrypto/hashes/compare/sha2-v0.10.7...sha2-v0.10.8)
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
Release Notes:
- N/A
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzguMCIsInVwZGF0ZWRJblZlciI6IjM3LjQzOC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR upgrades `async-tungstenite` to v0.23.
This is so we can get the CVE fix in `tungstenite` v0.20.1.
Now that #15219 is done, upgrading to v0.23 no longer breaks
authentication with collab.
Release Notes:
- N/A
This PR upgrades `async-tungstenite` to v17.0.3.
We previously attempted upgrading `async-tungstenite` in #15039, but
broke authentication with collab in the process.
Upon further investigation, I determined that the root cause is due to
this change in `tungstenite` v0.17.0:
> Overhaul of the client's request generation process. Now the users are
able to pass the constructed `http::Request` "as is" to
`tungstenite-rs`, letting the library to check the correctness of the
request and specifying their own headers (including its own key if
necessary). No changes for those ones who used the client in a normal
way by connecting using a URL/URI (most common use-case).
We _were_ relying on passing an `http::Request` directly to
`tungstenite`, meaning we did not benefit from the changes to the common
path (of passing a URL/URI).
This meant that—due to changes in `tungstenite`—we were now missing the
`Sec-WebSocket-Key` header that `tungstenite` would otherwise set for
us.
Since we were only passing a custom `http::Request` to set headers, our
approach has been adjusted to construct the initial WebSocket request
using `tungstenite`'s `IntoClientRequest::into_client_request` and then
modifying the request to set our additional desired headers.
Release Notes:
- N/A
The names suggested by `buffer_font_family` are reported by
`all_font_names`. Therefore, `all_font_names` should report family names
rather than postscript names.
close#14854
Release Notes:
- N/A
This PR upgrades the version of `wasmtime` and `wasmtime-wasi` in use to
v21.0.1.
We have to skip v20 because Tree-sitter also skipped it.
Here are the changes that had to be made:
### v19 -> v20
After upgrading the `wasmtime` packages to v20, I also had to run `cargo
update -p mach2` to pull in
[v0.4.2](https://github.com/JohnTitor/mach2/releases/tag/0.4.2) to fix
some compile errors.
There were a few minor API changes in `wasmtime-wasi` from
https://github.com/bytecodealliance/wasmtime/pull/8228 that we needed to
account for.
### v20 -> v21
Since there isn't a Tree-sitter version that depends on `wasmtime@v20`,
we're jumping straight to v21.
The published version of Tree-sitter (v0.22.6) still depends on
`wasmtime@v19`, but there was a commit
(7f4a57817d)
later that month that upgrades the `wasmtime` dependency to v21.
We're patching Tree-sitter to that commit so we can get the new
`wasmtime` version.
The main change in v21 is that imports generated by `bindgen!` are no
longer automatically trapped
(https://github.com/bytecodealliance/wasmtime/pull/8310), so we need to
add `trappable_imports: true` to our `bindgen!` calls.
Release Notes:
- N/A
Since `WindowsDispatcher` requires a minimum Windows version of Windows
10 Fall Creators Update (10.0.16299), and the `alacritty_terminal`
dependency relies on conPTY, an API introduced in the same version,
additionally, `DirectWriteTextSystem` also relies on Windows 10 Fall
Creators Update (10.0.16299), so it seems reasonable to make
`CosmicTextSystem` Linux-only. And we can use `DirectWriteTextSystem` on
the Windows platform exclusively. I hope this approach makes sense.
Release Notes:
- N/A
Now it is possible to change keyboard layouts with `setxkbmap` without
having to restart zed.
Release Notes:
- x11: Support for keyboard layout hot plugging.
Previously, we've only marked restored buffers as dirty. This PR changes
that behavior in case the buffer has been associated with a file and
that file has changed on disk since the last time Zed stored its
contents.
Example timeline:
1. User edits file in Zed, buffer is dirty
2. User quites Zed with `cmd-q`
3. User changes file on disk: `echo foobar >> file.txt` or `git checkout
file.txt`
4. User starts Zed
5. File/buffer are now marked as having a conflict (yellow icon)
Release Notes:
- Unsaved files that are restored when Zed starts are now marked as
having a conflict if they have been changed on disk since the last time
they were stored.
Demo:
https://github.com/user-attachments/assets/6098b485-b325-49b7-b694-fd2fc60cce64