91c1716
Fix horizontal scrolling direction on Windows (#11520)
Click to expand commit body
As per Microsoft documentation, positive values scroll right, not left.
GPUI was incorrectly assuming it perfectly mirrored vertical scrolling.
Fixes #11515
Release Notes:
- N/A
This PR is another step to tabless editing (#6424, #4963). It adds
support for tab bar settings that allow the user to change its placement
or to hide completely.
Configuraton:
```json
"tab_bar": {
"show": true
}
```
Placemnet options are "top", "bottom" and "no".
This PR intentionally doesn't affect tab bars of other panes (Terminal
for instance) to keep code changes small. I guess we'll do the rest in
separate PRs.
Release Notes:
- Added support for configuring the editor tab bar (part of #6424,
#4963).
---------
Co-authored-by: Mikayla <mikayla@zed.dev>
Andrew Lygin
and
Mikayla
created
689e4ae
Render messages as early as possible to show progress (#11569)
Click to expand commit body
This shows "Researching..." as placeholder text as early as possible so
that the user can see the model is working on reading/researching/etc.
This also adds on an `Option<Value>` to the `render_running` function so
that tools can hopefully render based on partially completed JSON (still
to come).
Release Notes:
- N/A
Kyle Kelley
created
dbebb40
linux: Store binary path before restart to handle deleted binary file (#11568)
Click to expand commit body
This fixes restart after updates not working on Linux.
On Linux we can't reliably get the binary path after an update, because
the original binary was deleted and the path will contain ` (deleted)`.
See: https://github.com/rust-lang/rust/issues/69343
We *could* strip ` (deleted)` off, but that feels nasty. So instead we
save the original binary path, before we do the installation, then
restart.
Later on, we can also change this to be a _new_ binary path returned by
the installers, which we then have to start.
Release Notes:
- N/A
Thorsten Ball
created
d2cec02
Run windows CI on our own GH-hosted windows runner (#11567)
ffa2d90
Return prettier entry back to LSP logs (#11563)
Click to expand commit body
Fixes prettier entries disappeared after
https://github.com/zed-industries/zed/pull/10788
Release Notes:
- N/A
Kirill Bulatov
created
5c2ec17
docs: Fix default value for `formatter` setting (#11560)
Click to expand commit body
This PR fixes the default value for the `formatter` setting listed in
the docs.
The default value is `"auto"`:
https://github.com/zed-industries/zed/blob/194c43b84b4c2b0f2e78d8ef533bb99b6916f38c/assets/settings/default.json#L367
Resolves #11468.
Release Notes:
- N/A
Marshall Bowers
created
2671b9c
Fix alignment of code actions menu with narrow panes
Piotr Osiewicz
created
68fe2bb
Do away with display points in toggle_code_actions
Piotr Osiewicz
created
65f7238
editor: Fix task indicator layout for wrapped lines
Piotr Osiewicz
created
ca680f0
branch picker: Always show HEAD first (#11552)
Click to expand commit body
I think this is a lot less confusing than another branch being selected
by default when there's no query.
Release Notes:
- Changed the branch picker to always show the current branch as the
default selected entry.
https://github.com/zed-industries/zed/assets/1185253/18b50656-f6ac-4138-b4e0-9024072e1555
1669ff8
editor: Fix menu::Confirm falling through to editor when confirming task entry in code actions (#11546)
Click to expand commit body
Release Notes:
- N/A
Piotr Osiewicz
created
45aca34
Take local project settings into account when launching terminals (#11526)
Click to expand commit body
Fixes #7599
Use project level settings if possible, when creating terminals.
Release Notes:
- Fixed terminals ignoring project-specific settings ([7599](https://github.com/zed-industries/zed/issues/7599))
LoganDark
created
07942bb
Editor: Do not display code actions in task gutter menu if they belong to different line (#11506)
Click to expand commit body
This doesn't address the focus issues we saw with @maxbrunsfeld yet.
Release Notes:
- N/A
Piotr Osiewicz
created
47c12c6
Make `prefer_line` the default soft-wrap behavior. (#11542)
Click to expand commit body
Stops lines from clipping at 1024 by default, returning it to the old
default behaviour where it wraps at 512. The `none` mode is only
supposed to be used for git hunks. See
https://github.com/zed-industries/zed/issues/11518#issuecomment-2099836283.
Release Notes:
- N/A
Now, regardless of how the Zed window is closed, Zed can remember the
window's restore size.
- [x] Windows implementation
- [x] macOS implementation
- [x] Linux implementation (partial)
- [x] update SQL data base (mark column `fullscreen` as deprecated)
The current implementation on Linux is basic, and I'm not sure if it's
correct.
The variable `fullscreen` in SQL can be removed, but I'm unsure how to
do it.
edit: mark `fullscreen` as deprecated
### Case 1
When the window is closed as maximized, reopening it will open in the
maximized state, and returning from maximized state will restore the
position and size it had when it was maximized.
https://github.com/zed-industries/zed/assets/14981363/7207752e-878a-4d43-93a7-41ad1fdb3a06
### Case 2
When the window is closed as fullscreen, reopening it will open in
fullscreen mode, and toggling fullscreen will restore the position and
size it had when it entered fullscreen (note that the fullscreen
application was not recorded in the video, showing a black screen, but
it had actually entered fullscreen mode).
https://github.com/zed-industries/zed/assets/14981363/ea5aa70d-b296-462a-afb3-4c3372883ea3
### What's more
- As English is not my native language, some variable and struct names
may need to be modified to match their actual meaning.
- I am not familiar with the APIs related to macOS and Linux, so
implementation for these two platforms has not been done for now.
- Any suggestions and ideas are welcome.
Release Notes:
- N/A
张小白
created
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.