Commit graph

29812 commits

Author SHA1 Message Date
张小白
3a1b1847c1
Fix debugger on Windows (#35180)
Closes #33429

Release Notes:

- N/A
2025-07-28 22:00:26 +08:00
Piotr Osiewicz
4aae7aed93
debugger: Fix not being able to stop a Go debug session when no breakpoints were ever hit (#35190)
Fixes #35030

Release Notes:

- debugger: Fixed a bug where a Go debug session could not be stopped if
no breakpoint was ever hit.
2025-07-28 13:14:36 +00:00
Danilo Leal
cef7d53607
collab: Refine call buttons design (#35007)
Making icons consistent, adjusting spacing, and moving the "Leave Call"
button to be the very last, which makes more sense to me than the
"Share" button being the last. Sharing your project is still part of the
call, so in the left edge of the button strip is where, conceptually,
the option to end the call should be, I think!

Release Notes:

- N/A
2025-07-28 10:01:31 -03:00
Maksim Bondarenkov
3ad0546b0d
Re-add TestScreenCaptureStream implementation for mock_client to fix FreeBSD and MinGW builds (#35191)
The implementation was removed in #31506. re-added it to match the
current implementation from `gpui::test`

Closes #35189

Release Notes:

- N/A
2025-07-28 14:02:48 +02:00
Piotr Osiewicz
e38f5759c4
ci: Use cargo update --locked instead of --frozen (#35192)
This fixes false positives when e.g. bumping git deps

Release Notes:

- N/A
2025-07-28 12:01:00 +00:00
Robert Fratto
2566acc2e7
go: Support benchmarks named "Benchmark" (#35167)
The regular expression for benchmarks was enforcing using a suffix
(e.g., `BenchmarkFoo`), but `Benchmark` is a valid benchmark name, just
as `Test` is a valid test name, and `Fuzz` is a valid fuzz test name.

Release Notes:

- Add support for running Go benchmarks named "Benchmark"
2025-07-28 10:40:46 +00:00
Smit Barmase
45b3af713e
doc: Add docs for Forcing X11 scale factor (#35181)
Associated PR: https://github.com/zed-industries/zed/pull/34265
Recent Discussion:
https://github.com/zed-industries/zed/issues/33987#issuecomment-3125936302

Release Notes:

- N/A
2025-07-28 14:31:27 +05:30
marius851000
ee9b60e60c
gpui: Fix inset being used in SSD on Wayland (#35151)
Closes #31330

Second parts of https://github.com/zed-industries/zed/pull/31335

While the initial fix set the inset during drawing, that was after the
window was resized, resulting in needing to manually resize the window
for the change to properly take effect.

I updated the code to not make the Wayland renderer rely on
`client_inset` being updated by the API user to match with the
decoration mode (given it is supposed to only be used when using CSD).

I might later try to generalize that, and eventually make the
client_inset only defined on window creation (instead of inside
`client_side_decorations`, that would need testing on X) (and maybe also
allow configuration for shadow, but it’s not something I need).

Release Notes:

- Fixed switching from client side decoration to server side decoration
on Wayland
2025-07-28 11:36:00 +03:00
lowlandghost
2a0aad0aaa
Docs: Fix invalid JSON syntax in Visual Customizations - Editor Scrollbar and Minimap (#35159)
I was on the [Visual Customiztions - Editor
Scrollbar](https://zed.dev/docs/visual-customization#editor-scrollbar)
section of the docs, and copy and pasted the code block into my personal
Zed settings and saw there was a syntax error.

This is a PR to add a missing comma and fix the syntax error in the
docs.

First time contributing, please let me know if I missed any
steps/important info.

Release Notes:

- N/A
2025-07-27 20:56:55 +03:00
Danilo Leal
e7b5d93b7c
docs: Add more improvements to the AI docs (#35160)
Follow-up to https://github.com/zed-industries/zed/pull/35133 with some
more findings upon re-reviewing it again.

Release Notes:

- N/A
2025-07-27 14:06:18 -03:00
Ben Brandt
c995d45bd9
agent_servers: Include result text in Claude error messages (#35156)
This will better surfaces issues that are classified as "success" but
actually have a more meaningful error message attached.

Release Notes:

- N/A
2025-07-27 13:58:02 +00:00
Ben Brandt
a5b7cfd128
agent_servers: Use built-in interrupt handling for Claude sessions (#35154)
We no longer have to stop and restart the entire process. 
I left in the Start/Resume mode handling since we will likely need to
handle restarting Claude in other situations.

Release Notes:

- N/A
2025-07-27 13:50:04 +00:00
Marshall Bowers
89e88c245e
extension_host: Add npm:install capability (#35144)
This PR adds a new `npm:install` capability for installing npm packges
in extensions.

Currently all npm packages are allowed.

Release Notes:

- N/A
2025-07-26 22:40:02 +00:00
Marshall Bowers
2a0170dc3c
extension: Reorganize capabilities (#35143)
This PR reorganizes the capabilities within the `extension` crate to
make it easier to add more.

Release Notes:

- N/A
2025-07-26 22:05:22 +00:00
Marshall Bowers
6a9a539b10
extension_host: Add capability for downloading files (#35141)
This PR adds a new capability for downloading files in extensions.

Currently all file downloads are allowed.

Release Notes:

- N/A
2025-07-26 21:33:16 +00:00
Marshall Bowers
d7b403e981
extension_host: Refactor capability checks (#35139)
This PR refactors the extension capability checks to be centralized in
the `CapabilityGranter`.

Release Notes:

- N/A
2025-07-26 20:53:19 +00:00
Danilo Leal
290f84a9e1
docs: Restructure and improve AI configuration docs (#35133)
Adding a number of settings that weren't documented, restructuring
things a bit to separate what is model-related settings from agent panel
usage-related settings, adding the recently introduced `disable_ai` key,
and more.

Release Notes:

- Improved docs around configuring and using AI in Zed
2025-07-26 16:06:12 +00:00
Finn Evers
08402e25e0
ui: Fix scrollbar mouse down handler (#35131)
Follow-up to https://github.com/zed-industries/zed/pull/35121 - in the
process of adding the check for the left mouse button to the guard
(which was practically already there before, just not in the mouse-down
listener), I accidentally removed the negation for the bounds check.
This PR fixes this.

Release Notes:

- N/A
2025-07-26 15:45:13 +00:00
Finn Evers
e911364664
ui: Clean up scrollbar component (#35121)
This PR does some minor cleanup to the scrollbar component. Namely, it
removes some clones, reduces the amount of unnecessary notifies and
ensures the scrollbar hover state is more accurately updated.

Release Notes:

- N/A
2025-07-26 00:08:20 +00:00
Danilo Leal
4854f83e8c
agent: Fix settings view switch field about permissions for running commands (#35120)
Follow-up to https://github.com/zed-industries/zed/pull/34866, where I
mistakenly didn't update the copy and id for this item.

Closes https://github.com/zed-industries/zed/issues/34850 — that's
because the edit tool runs by default, but the terminal tool does not. I
updated the original copy to reflect this, which should be enough to
close the issue, given that in terms of behavior, it is working
correctly.

Release Notes:

- agent: Fixed duplicated settings item in the agent panel as well as
improve copy for the setting to allow running commands without
permission.
2025-07-26 00:00:44 +00:00
Danilo Leal
6a79c4e50a
ui: Add ToggleButtonGroup component (#35118)
<img width="600" height="704" alt="CleanShot 2025-07-25 at 8  03 04@2x"
src="https://github.com/user-attachments/assets/3d2b29ba-e0fd-4231-bb80-746903d61481"
/>

Release Notes:

- N/A

---------

Co-authored-by: MrSubidubi <dev@bahn.sh>
2025-07-25 20:32:53 -03:00
Danilo Leal
aea309160b
Update the new Nightly app icon (#35119)
Follow-up to https://github.com/zed-industries/zed/pull/35104, with some
tiny design updates.

Release Notes:

- N/A
2025-07-25 23:29:51 +00:00
Smit Barmase
43d0aae617
languages: Fix Bash indentation issues with multi-cursors, newlines, and keyword outdenting (#35116)
Closes #34390

This PR fixes several Bash indentation issues:

- Adding indentation or comment using multi cursors no longer breaks
relative indentation
- Adding newline now places the cursor at the correct indent
- Typing a valid keyword triggers context-aware auto outdent

It also adds tests for all of them.

Release Notes:

- Fixed various issues with handling indentation in Bash.
2025-07-26 04:58:10 +05:30
Alvaro Parker
07252c3309
git: Enable git stash in git panel (#32821)
Related discussion #31484

Release Notes:

- Added a menu entry on the git panel to git stash and git pop stash. 

Preview: 


![Screenshot-2025-06-17_08:26:36](https://github.com/user-attachments/assets/d3699ba4-511f-4c7b-a7cc-00a295d01f64)

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2025-07-25 23:15:54 +00:00
Max Brunsfeld
4d00d07df1
Render paths to a single fixed-size MSAA texture (#34992)
This is another attempt to solve the same problem as
https://github.com/zed-industries/zed/pull/29718, while avoiding the
regression on Intel GPUs.

###  Background

Currently, on main, all paths are first rendered to an intermediate
"atlas" texture, similar to what we use for rendering glyphs, but with
multi-sample antialiasing enabled. They are then drawn into our actual
frame buffer in a separate pass, via the "path sprite" shaders.

Notably, the intermediate texture acts as an "atlas" - the paths are
laid out in a non-overlapping way, so that each path could be copied to
an arbitrary position in the final scene. This non-overlapping approach
makes a lot sense for Glyphs (which are frequently re-used in multiple
places within a frame, and even across frames), but paths do not have
these properties.
* we clear the atlas every frame
* we rasterize each path separately. there is no deduping.

The problem with our current approach is that the path atlas textures
can end up using lots of VRAM if the scene contains many paths. This is
more of a problem in other apps that use GPUI than it is in Zed, but I
do think it's an issue for Zed as well. On Windows, I have hit some
crashes related to GPU memory.

In https://github.com/zed-industries/zed/pull/29718, @sunli829
simplified path rendering to just draw directly to the frame buffer, and
enabled msaa for the whole frame buffer. But apparently this doesn't
work well on Intel GPUs because MSAA is slow on those GPUs. So we
reverted that PR.

### Solution

With this PR, we rasterize paths to an intermediate texture with MSAA.
But rather than treating this intermediate texture like an *atlas*
(growing it in order to allocate non-overlapping rectangles for every
path), we simply use a single fixed-size, color texture that is the same
size as thew viewport. In this texture, we rasterize the paths in their
final screen position, allowing them to overlap. Then we simply blit
them from the resolved texture to the frame buffer.

### To do

* [x] Implement for Metal
* [x] Implement for Blade
* [x] Fix content masking for paths
* [x] Fix rendering of partially transparent paths
* [x] Verify that this performs well on Intel GPUs (help @notpeter 🙏 )
* [ ] Profile and optimize

Release Notes:

- N/A

---------

Co-authored-by: Junkui Zhang <364772080@qq.com>
2025-07-25 14:39:24 -07:00
Cole Miller
bf8e4272bc
Add a CI check that Cargo.lock is up to date (#35111)
Should catch cases like #33667 where a dependency was bumped in
Cargo.toml without a corresponding lockfile update. (This can happen
when committing from outside of Zed or if rust-analyzer isn't running.)
Passing `--frozen --workspace` should ensure this doesn't fail just
because there's a newer patch version of some third-party dependency,
and prevent it from taking long.

We only need to run this on macOS because Cargo.lock is
platform-independent.

Release Notes:

- N/A
2025-07-25 15:37:58 -04:00
Marshall Bowers
f787f7d291
Update Cargo.lock (#35106)
This PR updates the `Cargo.lock` file, as it seems like it wasn't fully
updated in https://github.com/zed-industries/zed/pull/35103.

Release Notes:

- N/A
2025-07-25 18:20:18 +00:00
Danilo Leal
0e7eea0d10
Add new Nightly app icons (#35104)
Release Notes:

- N/A
2025-07-25 17:39:33 +00:00
Cole Miller
ff67f18e0d
Bump livekit dep to try to fix flaky builds (#35103)
Let's see if https://github.com/zed-industries/livekit-rust-sdks/pull/6
helps.

Release Notes:

- N/A

---------

Signed-off-by: Cole Miller <cole@zed.dev>
2025-07-25 17:36:58 +00:00
Anthony Eid
4abe14f94a
keymap ui: Resize columns on double click improvement (#35095)
This PR improves the behavior of resetting a column's size by
double-clicking on its column handle. We now shrink/grow to the side
that has more leftover/additional space.

We also improved the below

1. dragging was a couple of pixels off to the left because we didn't
take the column handle’s width into account.
2. Column dragging now has memory and will shift things to their exact
position when reversing a drag before letting the drag handle go.
3. Improved our test infrastructure.
4. Double clicking on a column's header resizes the column

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-07-25 13:19:05 -04:00
Kainoa Kanter
cd50958727
Add icon for SurrealQL files (#34855)
Release Notes:

- Added icon for SurrealQL (`.surql`) files

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-07-25 17:17:16 +00:00
Umesh Yadav
2f812c339c
agent_ui: Fix delay when loading keybindings in the Agent panel settings (#34954)
Fixes a annoying lag in agent settings panel where the keybindings would
show up after a lag. Close to 1-2 secs. It was a simple fix previously
we were not passing the focus handler to context menu which made the
keybindings lookup slower compared to other parts like git panel and
title bar profile dropdown.

| Before | After |
|--------|--------|
| <video
src="https://github.com/user-attachments/assets/1f9c1861-d089-41d3-8a89-4334d7b2f43a"
controls preload></video> | <video
src="https://github.com/user-attachments/assets/fa33d58d-a1ae-48cf-bff7-8e0ee07ed4e1"
controls preload></video> |





Release Notes:

- Fix delay when loading keybindings in the Agent panel settings
2025-07-25 13:55:38 -03:00
Haojian Wu
993d5753d5
docs: Add a missing "," in the C/C++ debugger configuration (#35098)
Release Notes:

- N/A
2025-07-25 16:14:44 +00:00
Piotr Osiewicz
abb3ed1ed1
git: Fix commit modal contents being searchable (#35099)
Fixes #35093

Release Notes:

- Fixed Git commit editor being searchable.
2025-07-25 15:48:09 +00:00
Piotr Osiewicz
985350f9e8
terminal: Support ~ in cwd field of task definitions (#35097)
Closes #35022

Release Notes:

- Fixed `~` not being expanded correctly in `cwd` field of task
definitions.
2025-07-25 15:39:50 +00:00
Justin Su
0e9d955e9b
Hide Copilot commands when AI functionality is disabled (#35055)
Follow-up of https://github.com/zed-industries/zed/pull/34896

Related to https://github.com/zed-industries/zed/issues/31346

cc @rtfeldman

Release Notes:

- Hide copilot commands when AI functionality is disabled
2025-07-25 10:53:57 -04:00
etimvr
5de544eb4b
Fix unnecessary Ollama model loading (#35032)
Closes https://github.com/zed-industries/zed/issues/35031

Similar solution as in https://github.com/zed-industries/zed/pull/30589

Release Notes:

- Fix unnecessary ollama model loading
2025-07-25 16:58:05 +03:00
Umesh Yadav
f21ba9e2c6
lmstudio: Propagate actual error message from server (#34538)
Discovered in this issue: #34513

Previously, we were propagating deserialization errors to users when
using LMStudio, instead of the actual error message sent from the
LMStudio server. This change will help users understand why their
request failed while streaming responses.

Release Notes:

- lmsudio: Display specific backend error messaging on failure rather
than generic ones

---------

Signed-off-by: Umesh Yadav <git@umesh.dev>
Co-authored-by: Peter Tripp <peter@zed.dev>
2025-07-25 09:36:43 -04:00
Julia Ryan
a2408f353b
Don't separately rebuild crates for the build platform (#35084)
macos:
- `cargo build`: 1838 -> 1400
- `cargo build -r`1891 -> 1400

linux:
- `cargo build`: 1893 -> 1455
- `cargo build -r`: 1893 -> 1455

windows: 
- `cargo build`: 1830 -> 1392
- `cargo build -r`: 1880 -> 1392

We definitely want this change for debug builds, for release builds it's
_possible_ that it pessimizes the critical path, but we'll see if it
impacts CI times before merging.

Release Notes:

- N/A

---------

Co-authored-by: Rahul Butani <rrbutani@users.noreply.github.com>
2025-07-25 13:12:55 +00:00
Julia Ryan
9071341a1d
Add TestCrash action (#35088)
This triggers a crash that avoids our panic-handler, which is useful for
testing that our crash reporting works even when you don't get a panic.

Release Notes:

- N/A
2025-07-25 05:40:26 -07:00
Piotr Osiewicz
57b463fd0d
typescript: Fix handling of jest/vitest tests with regex characters in name (#35090)
Closes #35065

Release Notes:

- JavaScript/TypeScript tasks: Fixed handling of Vitest/Jest tests with
regex-specific characters in their name.
2025-07-25 12:23:52 +00:00
Piotr Osiewicz
631f9a1b31
worktree: Improve performance with large # of repositories (#35052)
In this PR we've reworked how git status updates are processed. Most
notable change is moving the processing into a background thread (and
splitting it across multiple background workers). We believe it is safe
to do so, as worktree events are not deterministic (fs updates are not
guaranteed to come in any order etc), so I've figured that git store
should not be overly order-reliant anyways.

Note that this PR does not solve perf issues wholesale - other parts of
the system are still slow to process stuff (which I plan to nuke soon).

Related to #34302

Release Notes:

- Improved Zed's performance in projects with large # of repositories

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2025-07-25 13:18:19 +02:00
Agus Zubiaga
af0c909924
McpServerTool output schema (#35069)
Add an `Output` associated type to `McpServerTool`, so that we can
include its schema in `tools/list`.

Release Notes:

- N/A
2025-07-25 02:57:18 +00:00
Agus Zubiaga
15c9da4ea4
Add ability to register tools in McpServer (#35068)
Makes it easier to add tools to a server by implementing a trait

Release Notes:

- N/A
2025-07-25 02:19:20 +00:00
morgankrey
b446d66be7
Telemetry docs cleanup (#35060)
Release Notes:

- N/A
2025-07-24 19:25:39 -06:00
morgankrey
a0f2019b6f
Add sales tax to docs (#35059)
Release Notes:

- N/A
2025-07-24 19:18:40 -06:00
Smit Barmase
6e4f747041
project_panel: Fix autoscroll to treat entries behind sticky items as out of viewport (#35067)
Closes #34831

Autoscroll centers items only if they’re out of viewport. Before this
PR, entry behind sticky items was not considered out of viewport, and
hence actions like `reveal in project panel` or focusing buffer would
not autoscroll that entry into the view in that case.

This PR fixes that by using recently added `scroll_to_item_with_offset`
in https://github.com/zed-industries/zed/pull/35064.

Release Notes:

- Fixed issue where `pane: reveal in project panel` action was not
working if the entry was behind sticky items.
2025-07-25 06:21:38 +05:30
Daniel Sauble
4ee52433ae
Do not subtract gutter margin twice from the editor width (#34564)
Closes #33176

In auto-height layouts, horizontal autoscroll can occur right before
soft wrapping is triggered. This seems to be caused by gutter margin
being subtracted twice from the editor width.

If we subtract gutter width only once, the horizontal autoscroll
behavior goes away.

Before:


https://github.com/user-attachments/assets/03b6687e-3c0e-4b34-8e07-a228bcc6f798

After:


https://github.com/user-attachments/assets/84e54088-b5bd-4259-a193-d9fcf32cd3a7

Release Notes:

- Fixes issue with auto-height layouts where horizontal autoscroll is
triggered right before text wraps

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
2025-07-25 00:00:59 +00:00
Smit Barmase
f78a112387
gpui: Add scroll_to_item_with_offset to UniformListScrollState (#35064)
Previously we had `ScrollStrategy::ToPosition(usize)` which lets you
define the offset where you want to scroll that item to. This is the
same as `ScrollStrategy::Top` but imagine some space reserved at the
top.

This PR removes `ScrollStrategy::ToPosition` in favor of
`scroll_to_item_with_offset` which is the method to do the same. The
reason to add this method is that now not just `ScrollStrategy::Top` but
`ScrollStrategy::Center` can also uses this offset to center the item in
the remaining unreserved space.

```rs
// Before
scroll_handle.scroll_to_item(index, ScrollStrategy::ToPosition(offset));

// After
scroll_handle.scroll_to_item_with_offset(index, ScrollStrategy::Top, offset);

// New! Centers item skipping first x items
scroll_handle.scroll_to_item_with_offset(index, ScrollStrategy::Center, offset);
```

This will be useful for follow up PR.

Release Notes:

- N/A
2025-07-25 05:13:09 +05:30
Zachary Hamm
66acc2698a
git_hosting_providers: Support GitHub remote URLs that start with a slash (#34134)
Remote URLs like `git@github.com:/zed-industries/zed` are valid git
remotes, but currently Zed does not parse them correctly. The result is
invalid "permalink" generation, and presumably other bugs anywhere that
git remote urls are required for the current repository. This ensures
Zed will parse those URLs correctly.

Release Notes:

- Improved support for GitHub remote urls where the
username/organization is preceded by an extra `/` to match the behavior
of `git`, `gh` and `github.com`.

Co-authored-by: Peter Tripp <peter@zed.dev>
2025-07-24 18:25:21 -04:00