6ddcff2
Show annotations more like the inline assistant (#11530)
Click to expand commit body
* compute gutter width
* show the AI icon
* borders, background, and text color for annotations
<img width="1840" alt="image"
src="https://github.com/zed-industries/zed/assets/836375/93f2e9b8-d7f7-4c25-b3e2-cf77a0c4ca36">
Release Notes:
- N/A
Fixes #11422 by accepting just the start of the line.
Release Notes:
- N/A
---------
Co-authored-by: max <max@zed.dev>
Co-authored-by: jacob <jacob@supermaven.com>
Kyle Kelley
,
max
, and
jacob
created
33a7221
assistant2: Add new conversation button, that also saves the current conversation (#11522)
Click to expand commit body
This PR updates the new assistant with a button to start a new
conversation.
Clicking on it will reset the chat and put it into a fresh state.
The current conversation will be serialized and written to
`~/.config/zed/conversations`.
Release Notes:
- N/A
Marshall Bowers
created
c77dd8b
docs: Add linux build command explanation (#11513)
Click to expand commit body
Just adding a short note about `cargo build --release` and the location
of the compiled binary. It helps a lot to streamline usage of Zed day to
day on Linux.
Release Notes:
- N/A
Andrei Zvonimir Crnković
created
3d9f008
Do not show diffs for files with \r\n contents (#11519)
Kirill Bulatov
created
6a64b73
assistant2: Add general structure for conversation history (#11516)
Click to expand commit body
This PR adds the general structure for conversation history to the new
assistant.
Right now we have a placeholder button in the assistant panel that will
toggle a picker containing some placeholder saved conversations.
Release Notes:
- N/A
This allows us to create icons with dynamic decorations drawn on top
like these:

### Examples:
```rust
div()
.child(DecoratedIcon::new(
Icon::new(IconName::Bell).color(Color::Muted),
IconDecoration::IndicatorDot,
))
.child(
DecoratedIcon::new(Icon::new(IconName::Bell), IconDecoration::IndicatorDot)
.decoration_color(Color::Accent),
)
.child(DecoratedIcon::new(
Icon::new(IconName::Bell).color(Color::Muted),
IconDecoration::Strikethrough,
))
.child(
DecoratedIcon::new(Icon::new(IconName::Bell), IconDecoration::X)
.decoration_color(Color::Error),
)
```
Release Notes:
- N/A
Nate Butler
created
768b63a
Remove windows dependency from all non-windows platforms (#11510)
Click to expand commit body
Whoops
Release Notes:
- N/A
Mikayla Maki
created
0d2f65a
Language Model Tool for commenting in a multibuffer (#11509)
Click to expand commit body
Language Model can now open multibuffers and insert comments as block
decorations in the editor.

Release Notes:
- N/A
---------
Co-authored-by: max <max@zed.dev>
Co-authored-by: marshall <marshall@zed.dev>
Co-authored-by: nate <nate@zed.dev>
Kyle Kelley
,
max
,
marshall
, and
nate
created
953acb0
Document configuring pyright for pyproject.toml (#11508)
Click to expand commit body
Release Notes:
- N/A
Joseph T. Lyons
created
d64106e
Add development credentials provider (#11505)
Click to expand commit body
This PR adds a new development credentials provider for the purpose of
streamlining local development against production collab.
## Problem
Today if you want to run a development build of Zed against the
production collab server, you need to either:
1. Enter your keychain password every time in order to retrieve your
saved credentials
2. Re-authenticate with zed.dev every time
- This can get annoying as you need to pop out into a browser window
- I've also seen cases where if you re-auth too many times in a row
GitHub will make you confirm the authentication, as it looks suspicious
## Solution
This PR decouples the concept of the credentials provider from the
keychain, and adds a new development credentials provider to address
this specific case.
Now when running a development build of Zed and the
`ZED_DEVELOPMENT_AUTH` environment variable is set to a non-empty value,
the credentials will be saved to disk instead of the system keychain.
While this is not as secure as storing them in the system keychain,
since it is only used for development the tradeoff seems acceptable for
the resulting improvement in UX.
Release Notes:
- N/A
Marshall Bowers
created
c260f7d
Refactor Windows platform implementation (#11393)
Click to expand commit body
This aligns the Windows platform implementation with a code style
similar to macOS platform, eliminating most of the `Cell`s and
`Mutex`es. This adjustment facilitates potential future porting to a
multi-threaded implementation if required.
Overall, this PR made the following changes: it segregated all member
variables in `WindowsPlatform` and `WindowsWindow`, grouping together
variables that remain constant throughout the entire app lifecycle,
while placing variables that may change during app runtime into
`RefCell`.
Edit:
During the code refactoring process, a bug was also fixed.
**Before**:
Close window when file has changed, nothing happen:
https://github.com/zed-industries/zed/assets/14981363/0bcda7c1-808c-4b36-8953-a3a3365a314e
**After**:
Now `should_close` callback is properly handled
https://github.com/zed-industries/zed/assets/14981363/c8887b72-9a0b-42ad-b9ab-7d0775d843f5
Release Notes:
- N/A
4eedbde
linux: Use optional compile-time RELEASE_VERSION variable (#11490)
Click to expand commit body
This implements `app_version` on Linux by using an optional,
compile-time `RELEASE_VERSION` env var that can be set.
We settled on the `RELEASE_VERSION` as the name, since it's similar to
`RELEASE_CHANNEL` which we use in Zed.
cc @ConradIrwin @mikayla-maki
Release Notes:
- N/A
Co-authored-by: Bennet <bennetbo@gmx.de>
Groups collections of assistant messages with their tool calls as
children of the assistant message container.

Release Notes:
- N/A
Kyle Kelley
created
c77d2eb
Increase short SHA length to 7 characters (#11492)
Click to expand commit body
This PR increases the length of a shortened Git SHA from 6 to 7
characters.
This matches what GitHub uses.
I also took the opportunity to factor out a common method for computing
a short SHA so that we have a single source of truth for the length that
we're using.
Release Notes:
- Increased the short commit SHA length used by git blame from 6 to 7
characters.
bcf7bc9
Do not toggle hunk diffs when resizing the docks (#11489)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/11456
Release Notes:
- N/A
---------
Co-authored-by: Piotr <piotr@zed.dev>
Kirill Bulatov
and
Piotr
created
5a7b8f7
linux: Fix restarting by waiting for sockets to be closed (#11488)
Click to expand commit body
This fixes a race-condition that showed up when trying to restart
Nightly/Preview/...
When running with these release channels, Zed tries to ensure that
there's only one instance of Zed running.
It does that by listening on a TCP socket to which other instances can
connect on start. If the other instance receives a message, it knows
that another Zed instance is running and exits.
On Linux, though, we ran into a race condition:
1. `kill -0`, which checks whether a process is still running, returns
an error, signalling that the old Zed process has exited
2. BUT: the process was still listening on the TCP port.
It seems like that on Linux, process resources aren't guaranteed to be
cleaned up as soon as signal handling stops working for a process.
The fix is to wait until the process is no longer listening on any TCP
sockets.
There's a slight downside to this: GPUI processes that never listen on
any TCP sockets now have to pay the cost of an additional `lsof` call
when restarting. We do think that it's a reasonable tradeoff for now
though, since the other options (extending the platform interface to
provide callbacks, sharing the listening port in the framework, ...)
seem wider-reaching only to fix a very local bug.
Release Notes:
- N/A
Co-authored-by: Bennet <bennetbo@gmx.de>
Thorsten Ball
and
Bennet
created
0c11d84
editor: Move runnables querying to background thread (#11487)
Click to expand commit body
Originally reported by @mrnugget and @bennetbo
Also, instead of requerying them every frame, we do so whenever buffer
changes.
As a bonus, I modified tree-sitter query for Rust tests.
Release Notes:
- N/A
This PR adds basic runnable tests for Gleam.
Functions with names ending in `_test` will be available for running:
https://github.com/zed-industries/zed/assets/1486634/9f3f81e5-a7fa-425c-a5a2-d615062486bb
Release Notes:
- N/A
In Windows platform, using notify to watch file events.
1. in [notify windows
implement](https://github.com/notify-rs/notify/blob/3df0f65152c8585cfb29d231c880b86b9164dcfd/notify/src/windows.rs#L344),
we get the full file path, just with `path.join(file_path)`.
2. In [zed worktree
start_backgroud_scan_tasks](https://github.com/zed-industries/zed/blob/d2569afe662be93c926eed1aeb2b17d050ba90b0/crates/worktree/src/worktree.rs#L679),
`abs_path` is not unc path, so we get all file events with not unc path.
3. but in [zed worktree
process_event](https://github.com/zed-industries/zed/blob/d2569afe662be93c926eed1aeb2b17d050ba90b0/crates/worktree/src/worktree.rs#L3619),
we `strip_prefix` unc path all times, it will always print annoy error.
@mikayla-maki I can't reopen pre closed pr #10501 .
Release Notes:
- N/A
CharlesChen0823
created
88c4e0b
Add a registry for `GitHostingProvider`s (#11470)
Click to expand commit body
This PR adds a registry for `GitHostingProvider`s.
The intent here is to help decouple these provider-specific concerns
from the lower-level `git` crate.
Similar to languages, the Git hosting providers live in the new
`git_hosting_providers` crate.
This work also lays the foundation for if we wanted to allow defining a
`GitHostingProvider` from within an extension. This could be useful if
we wanted to extend the support to work with self-hosted Git providers
(like GitHub Enterprise).
I also took the opportunity to move some of the provider-specific code
out of the `util` crate, since it had leaked into there.
Release Notes:
- N/A
Marshall Bowers
created
a64e20e
Centralize project context provided to the assistant (#11471)
Click to expand commit body
This PR restructures the way that tools and attachments add information
about the current project to a conversation with the assistant. Rather
than each tool call or attachment generating a new tool or system
message containing information about the project, they can all
collectively mutate a new type called a `ProjectContext`, which stores
all of the project data that should be sent to the assistant. That data
is then formatted in a single place, and passed to the assistant in one
system message.
This prevents multiple tools/attachments from including redundant
context.
Release Notes:
- N/A
---------
Co-authored-by: Kyle <kylek@zed.dev>
This PR fixes a small issue I noticed with resize cursors. The
column/row resize cursors were missing and in a few places we were using
`ew-resize` and `ns-resize` even though the documentation mentions
`col-resize` and `row-resize`.
Finally updated the panes in the workspace to use the new column/row
resize cursors.
Before:


After:


Release Notes:
- Added column/row resize cursor styles to GPUI
- Fixed the existing references that were incorrectly using `ew-resize`
for column resize and `ns-resize` for row resize
- Updated panes to use column/row resize cursors instead on `ew-resize`
and `ns-resize`
---------
Co-authored-by: Mikayla <mikayla@zed.dev>
Soroush Mirzaei
and
Mikayla
created
f3fffc2
Don't log JSON parse errors with no settings (#11459)
Click to expand commit body
Release Notes:
- Silenced error messages on startup when no settings/keymap files
exist.
Conrad Irwin
created
2e6d044
Fix Collab context menu dismissal (#11414)
Click to expand commit body
Closes: #11413
Release Notes:
- Fixed Collab panel context menu dismissal with `Escape` key
([#11413](https://github.com/zed-industries/zed/issues/11413)).
moshyfawn
created
530bc5c
windows: Fix crash in vim normal mode when IME key is pressed (#11387)
Click to expand commit body
Fixed crash in vim normal mode when ime key press.
Release Notes:
- N/A
CharlesChen0823
created
9edd81c
Add Windows specific path parsing (#11119)
Click to expand commit body
Since Windows paths are known to be weird and currently not handled at
all (outside of relative paths that just happen to work), I figured I
would add a windows specific implementation for parsing absolute paths.
It should be functionally the same, of course there's always a chance I
missed an edge case though.
This should fix
- #10849
Note that there are still some cases that will probably break the
current implementation, namely local drives that do not have a drive
letter assigned (not sure how to handle those). There's also UNC paths
but I don't know how important those are at the moment (I'll allow
myself to assume not at all)
Release Notes:
- N/A
Fixed various small issues on Linux, mainly on Wayland.
Apart from the first commit (which should be self-describing), the other
commits have a description explaining the issue and what they do.
caadc58bead6cb654d7e1da25faaba72be79cd27 should fix
https://github.com/zed-industries/zed/issues/11037
Release Notes:
- N/A
apricotbucket28
created
fd38318
Add pkgconf to arch linux required dependencies (#11449)
This PR follows up #11314 (which removes some deprecated `callback`s)
removes the corresponding implements.
Release Notes:
- N/A
张小白
created
9a60c0a
Replace all X11 mouse events with XI2 equivalents (#11235)
Click to expand commit body
This PR replaces all pointer events on X11 with their XI2 equivalents,
which fixes problems with scroll events not being reported when a mouse
button is down. Additionally it closes #11206 by resetting the tracked
global scroll valulator position with `None` on a leave event to prevent
a large scroll delta if scrolling is done outside the window. Lastly, it
resolves the bad window issue kvark was having.
Release Notes:
- Fixed X11 Scroll snapping (#11206 ).
---------
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Adds a `SerialTracker` type which helps simplify serial handling.
Release Notes:
- N/A
apricotbucket28
created
3018a64
Wayland: Improve first click detection (#11371)
Click to expand commit body
Release Notes:
- N/A
This changes the first click detection in Wayland by requiring first
click after the keyboard loses focus, and after a `wl_pointer` enters a
window that has keyboard focus
This PR refactors the code pertaining to Git hosting providers to make
it more uniform and easy to add support for new providers.
There is now a `GitHostingProvider` trait that contains the
functionality specific to an individual Git hosting provider. Each
provider we support has an implementation of this trait.
Release Notes:
- N/A
Marshall Bowers
created
8871fec
Adjust names of negated style methods (#11453)
Click to expand commit body
This PR adjusts the names of the negated style methods by moving the
`neg_` to after the property name instead of before.
This will help keep related style methods grouped together in
completions.
It also makes it a bit clearer that the negation applies to the value.
### Before
```rs
div()
.neg_mx_1()
.neg_mt_2()
```
### After
```rs
div()
.mx_neg_1()
.mt_neg_2()
```
Release Notes:
- N/A
Trims down the project index output view in assistant2 to just list the
filenames and hideaway the query.
<img width="374" alt="image"
src="https://github.com/zed-industries/zed/assets/836375/8603e3cf-9fdc-4661-bc45-1d87621a006f">
Introduces a way for tools to render running.
Release Notes:
- N/A
---------
Co-authored-by: Max <max@zed.dev>
Kyle Kelley
and
Max
created
f658af5
Make `border` methods always require an explicit width (#11450)
Click to expand commit body
This PR makes the `border` methods require an explicit width instead of
defaulting to 1px.
This breaks convention with Tailwind, but it makes GPUI more consistent
with itself. We already have an edge case where the parameterized method
had to be named `border_width`, since `border` was taken up by an alias
for the 1px variant.
### Before
```rs
div()
.border()
.border_t()
.border_r()
.border_b()
.border_l()
.border_width(px(7.))
```
### After
```rs
div()
.border_1()
.border_t_1()
.border_r_1()
.border_b_1()
.border_l_1()
.border(px(7.))
```
Release Notes:
- N/A
Release Notes:
- N/A
Following up to #10880
TODO:
- [x] create window as transparent
- [x] X11
- [x] Wayland
- [ ] Windows
- [x] MacOS (when used with Blade)
- [x] enable GPU surface transparency
- [x] adjust the pipeline blend modes
- [x] adjust shader outputs

Blurred results from @jansol (on Wayland), who contributed to this work:

---------
Co-authored-by: Jan Solanti <jhs@psonet.com>