Commit graph

28627 commits

Author SHA1 Message Date
Umesh Yadav
32214abb64
Improve TypeScript shebang detection (#31437)
Closes #13981

Release Notes:

- Improved TypeScript shebang detection
2025-05-30 16:11:13 -04:00
Peter Tripp
a78563b80b
ci: Prevent "Tests Pass" job from running on forks (#31778)
Example fork [actions run](https://github.com/alphaArgon/zed/actions/runs/15349715488/job/43194591563)
which would be suppressed in the future.

(Sorry @alphaArgon)

Release Notes:

- N/A
2025-05-30 16:09:22 -04:00
Kirill Bulatov
f881cacd8a
Use both language and LSP icons for LSP tasks (#31773)
Make more explicit which language LSP tasks are used.

Before:

![image](https://github.com/user-attachments/assets/27f93c5f-942e-47a0-9b74-2c6d4d6248de)

After:

![image
(1)](https://github.com/user-attachments/assets/5a29fb0a-2e16-4c35-9dda-ae7925eaa034)


![image](https://github.com/user-attachments/assets/d1bf518e-63d1-4ebf-af3d-3c9d464c6532)


Release Notes:

- N/A
2025-05-30 19:28:56 +00:00
Umesh Yadav
a539a38f13
Revert "copilot: Fix vision request detection for follow-up messages" (#31776)
Reverts zed-industries/zed#31760

see this comment for context:
https://github.com/zed-industries/zed/pull/31760#issuecomment-2923158611.

Release Notes:

- N/A
2025-05-30 21:28:31 +02:00
Piotr Osiewicz
ca6fd101c1
debugger: Change console text color, add tooltips (#31765)
- Improved legibility of console text:

| Theme | Dark | Light |
|--------|--------|--------|
| Before |
![image](https://github.com/user-attachments/assets/756da36d-9ef4-495a-9cf9-7249c25d106a)
|
![image](https://github.com/user-attachments/assets/42558ec2-ee08-4973-8f7d-d7f4feb38cf8)
|
| After |
![image](https://github.com/user-attachments/assets/4469f000-b34f-4cbb-819d-4ae1f2f58a4a)
|
![image](https://github.com/user-attachments/assets/3b862114-0fd3-427c-9c76-f030d3442090)
|

Release Notes:

- debugger: Improved legibility of console text
- debugger: Added tooltips to all debugger items.
2025-05-30 19:21:28 +02:00
Aldo Funes
f8097c7c98
Improve compatibility with Wayland clipboard (#30251)
Closes #26672, #20984

Release Notes:

- Fixed issue where some applications won't receive the clipboard
contents from Zed

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-05-30 17:21:00 +00:00
Marshall Bowers
c1427ea802
collab: Remove POST /billing/subscriptions/migrate endpoint (#31770)
This PR removes the `POST /billing/subscriptions/migrate` endpoint, as
it is no longer needed.

Release Notes:

- N/A
2025-05-30 17:16:20 +00:00
Kirill Bulatov
1e83022f03
Add a JS/TS debug locator (#31769)
With this, a semi-working debug session is possible from the JS/TS
gutter tasks:


https://github.com/user-attachments/assets/8db6ed29-b44a-4314-ae8b-a8213291bffc

For now, available in debug builds only as a base to improve on later on
the DAP front.

Release Notes:

- N/A

---------

Co-authored-by: Piotr Osiewicz <peterosiewicz@gmail.com>
2025-05-30 17:15:42 +00:00
Chung Wei Leong
0ee900e8fb
Support macOS Sequoia titlebar double-click action (#30468)
Closes #16527

Release Notes:

- Added MacOS titlebar double-click action

---

Unfortunately, Apple doesn't seem to make the "Fill" API public or
documented anywhere.

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2025-05-30 17:13:50 +00:00
Marshall Bowers
f9f4be1fc4
collab: Use StripeClient in POST /billing/subscriptions/sync endpoint (#31764)
This PR updates the `POST /billing/subscriptions/sync` endpoint to use
the `StripeClient` trait instead of using `stripe::Client` directly.

Release Notes:

- N/A
2025-05-30 16:37:12 +00:00
Stephen Murray
a00b07371a
copilot: Fix vision request detection for follow-up messages (#31760)
Previously, the vision request header was only set if the last message
in a thread contained an image. This caused 400 errors from the Copilot
API when sending follow-up messages in a thread that contained images in
earlier messages.

Modified the `is_vision_request` check to scan all messages in a thread
for image content instead of just the last one, ensuring the proper
header is set for the entire conversation.

Added a unit test to verify all cases function correctly.

Release Notes:

- Fix GitHub Copilot chat provider error when sending follow-up messages
in threads containing images
2025-05-30 16:32:49 +00:00
Marshall Bowers
f725b5e248
collab: Use StripeClient in sync_subscription (#31761)
This PR updates the `sync_subscription` function to use the
`StripeClient` trait instead of using `stripe::Client` directly.

Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-05-30 16:08:58 +00:00
Vivek Pothina
07436b4284
breadcrumbs: Stylize filename in breadcrumbs when tab-bar is off and file is dirty (#30507)
Closes [#18870](https://github.com/zed-industries/zed/issues/18870)


- I like to use Zed with tab_bar off
- when the file is modified there is no indicator when tab_bar is off
- this PR aims to fix that

Thanks to @Qkessler for initial PR - #22418 

This is style decided in this discussion - #22418 
@iamnbutler @mikayla-maki [subtle style
decided](https://github.com/zed-industries/zed/pull/22418#issuecomment-2605253667)

Release Notes:
- When tab_bar is off, filename in the breadcrumbs will be the indicator
when file is unsaved.


#### Changes
- when tab_bar is off and file is dirty (unsaved)
<img width="834" alt="image"
src="https://github.com/user-attachments/assets/f205731b-c8e3-4d7a-9214-cbe706e372bf"
/>


- when tab_bar is off and file is not dirty (saved)
<img width="846" alt="image"
src="https://github.com/user-attachments/assets/88ea96eb-16a2-48e8-900d-64a921f0b5c3"
/>


- when tab_bar is on
<img width="741" alt="image"
src="https://github.com/user-attachments/assets/cc543544-9949-46ed-8e09-cdcbe2f47ab8"
/>

<img width="740" alt="image"
src="https://github.com/user-attachments/assets/8d347258-26f7-4bd7-82d4-8f23dbe63d61"
/>

Release Notes:

- Changed the highlighting of the current file to represent the current
saved state, when the tab bar is turned off.
2025-05-30 08:32:54 -07:00
tidely
8bec4cbecb
assistant_tools: Reduce allocations (#30776)
Another batch of allocation savings. Noteworthy ones are
`find_path_tool.rs` where one clone of *all* found matches was saved and
`web_tool_search.rs` where the tooltip no longer clones the entire url
on every hover.

I'd also like to propose using `std::borrow::Cow` a lot more around the
codebase instead of Strings. There are hundreds if not 1000+ clones that
can be saved pretty regularly simply by switching to Cow. ´Cow´'s are
likely not used because they aren't compatible with futures and because
it could cause lifetime bloat. However if we use `Cow<'static, str>`
(static lifetime) for when we need to pass them into futures, we could
save a TON of allocations for `&'static str`. Additionally I often see
structs being created using `String`'s just to be deserialized
afterwards, which only requires a reference.

Release Notes:

- N/A
2025-05-30 08:28:22 -07:00
Jason Lee
047e7eacec
gpui: Improve window.prompt to support ESC with non-English cancel text on macOS (#29538)
Release Notes:

- N/A

----

The before version GPUI used `Cancel` for cancel text, if we use
non-English text (e.g.: "取消" in Chinese), then the press `Esc` to cancel
will not work.

So this PR to change it by use `PromptButton` to instead the `&str`,
then we can use `PromptButton::cancel("取消")` for the `Cancel` button.

Run `cargo run -p gpui --example window` to test.

---

Platform Test:

- [x] macOS
- [x] Windows
- [x] Linux (x11 and Wayland)

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-05-30 15:26:27 +00:00
laizy
1d5d3de85c
gpui: Optimize the ordering update in the BoundsTree (#31025)
Release Notes:

- N/A
2025-05-30 08:23:27 -07:00
laizy
c4dbaa91f0
gpui: Fix race condition when upgrading a weak reference (#30952)
Release Notes:

- N/A
2025-05-30 08:18:25 -07:00
Ben Brandt
97c01c6720
Fix model deduplication to use provider ID and model ID (#31750)
Previously only used model ID for deduplication, which incorrectly
filtered models with the same name from different providers.

Release Notes:

- Fix to make sure all provider models are shown in the model picker
2025-05-30 13:49:09 +00:00
Marshall Bowers
310ea43048
danger: Check for changes in prompt files (#31744)
This PR adds a Danger check to remind engineers that any changes to our
various prompts need to be verified against the LLM Worker.

When changes to the prompt files are detected, we will fail the PR with
a message:

<img width="929" alt="Screenshot 2025-05-30 at 8 40 58 AM"
src="https://github.com/user-attachments/assets/79afab4e-e799-45f1-a90e-0fd7c9a73706"
/>

Once the corresponding changes have been made (or no changes to the LLM
Worker have been determined to be necessary), including the indicated
attestation message will convert the errors into informational messages:

<img width="926" alt="Screenshot 2025-05-30 at 8 41 52 AM"
src="https://github.com/user-attachments/assets/ff51c17a-7a76-46a7-b468-a7d864d480c3"
/>

Release Notes:

- N/A
2025-05-30 13:46:41 +00:00
Piotr Osiewicz
6bb4b5fa64
Revert "debugger beta: Fix bug where debug Rust main running action f… (#31743)
…ailed (#31291)"

This reverts commit aab76208b5.

Closes #31737

I cannot repro the original issue that this commit was trying to solve
anymore.

Release Notes:

- N/A
2025-05-30 14:32:59 +02:00
Alejandro Fernández Gómez
e0fa3032ec
docs: Properly nest the docs for the inline git blame settings (#31739)
From a report on
[discord](https://discord.com/channels/869392257814519848/873292398204170290/1377943171320774656):
reorders the docs for the inline git blame feature so they are properly
nested.

<img width="1719" alt="Screenshot_2025-05-30_at_11 32 17"
src="https://github.com/user-attachments/assets/3c20bda3-de81-4ac3-b8e2-e1d4eac0ce88"
/>


Release Notes:

- N/A
2025-05-30 08:18:15 -03:00
Danilo Leal
9cf6be2057
agent: Add Burn Mode setting migrator (#31718)
Follow-up https://github.com/zed-industries/zed/pull/31470.

Release Notes:

- N/A
2025-05-30 08:10:12 -03:00
Piotr Osiewicz
5462e199fb
debugger: Fix wrong path to the downloaded delve-shim-dap (#31738)
Closes #ISSUE

Release Notes:

- N/A
2025-05-30 10:43:29 +00:00
Piotr Osiewicz
3a60420b41
debugger: Fix delve-dap-shim path on Windows (#31735)
Closes #ISSUE

Release Notes:

- debugger: Fixed wrong path being picked up for delve on Windows
- debugger: Fixed delve not respecting the user-provided binary path
from settings.
2025-05-30 08:53:19 +00:00
Simon Pham
89c184a26f
markdown_preview: Fix release notes title being overridden (#31703)
Closes: #31701

Screenshot:

<img width="383" alt="image"
src="https://github.com/user-attachments/assets/7fd8ce70-2208-4aca-bc70-860d6c649765"
/>



Release Notes:

- Fixed in-app release notes having an incorrect title

---------

Co-authored-by: Gilles Peiffer <gilles.peiffer.yt@gmail.com>
2025-05-30 08:29:52 +00:00
Michael Sloan
d7f0241d7b
editor: Defer the effects of change_selections to end of transact (#31731)
In quite a few places the selection is changed multiple times in a
transaction. For example, `backspace` might do it 3 times:

* `select_autoclose_pair`
* selection of the ranges to delete
* `insert` of empty string also updates selection

Before this change, each of these selection changes appended to
selection history and did a bunch of work that's only relevant to
selections the user actually sees. So for each backspace,
`editor::UndoSelection` would need to be invoked 3-4 times before the
cursor actually moves. It still needs to be run twice after this change,
but that is a separate issue.

Signature help even had a `backspace_pressed: bool` as an incomplete
workaround, to avoid it flickering due to the selection switching
between being a range and being cursor-like.

The original motivation for this change is work I'm doing on not
re-querying completions when the language server provides a response
that has `is_incomplete: false`. Whether the menu is still visible is
determined by the cursor position, and this was complicated by it seeing
`backspace` temporarily moving the head of the selection 1 character to
the left.

This change also removes some redundant uses of
`push_to_selection_history`.

Not super stoked with the name `DeferredSelectionEffectsState`. Naming
is hard.

Release Notes:

- N/A
2025-05-30 01:53:02 -06:00
Cole Miller
1445af559b
Unify the tasks modal and the new session modal (#31646)
Release Notes:

- Debugger Beta: added a button to the quick action bar to start a debug
session or spawn a task, depending on which of these actions was taken
most recently.
- Debugger Beta: incorporated the tasks modal into the new session modal
as an additional tab.

---------

Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
Co-authored-by: Julia Ryan <p1n3appl3@users.noreply.github.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Mikayla <mikayla@zed.dev>
2025-05-29 21:33:52 -04:00
Anthony Eid
804de3316e
debugger: Update docs with more examples (#31597)
This PR also shows more completion items when defining a debug config in
a `debug.json` file. Mainly when using a pre build task argument.

### Follow ups
- Add docs for Go, JS, PHP
- Add attach docs

Release Notes:

- debugger beta: Show build task completions when editing a debug.json
configuration with a pre build task
- debugger beta: Add Python and Native Code debug config
[examples](https://zed.dev/docs/debugger)
2025-05-30 04:22:16 +03:00
Smit Barmase
a387bf5f54
zed: Fix migration banner not hiding after migration has been carried out (#31723)
- https://github.com/zed-industries/zed/pull/30444

This PR broke migration notification to only emit event when content is
migrated. This resulted in the migration banner not going away after
clicking "Backup and Migrate". It should also emit event when it's not
migrated which removes the banner.

Future: I think we should have better tests in place for banner
visibility.

Release Notes:

- Fixed an issue where migration banner wouldn't go away after clicking
"Backup and Migrate".
2025-05-30 06:00:37 +05:30
Marshall Bowers
c7047d5f0a
collab: Fully move StripeBilling over to using StripeClient (#31722)
This PR moves over the last method on `StripeBilling` to use the
`StripeClient` trait, allowing us to fully mock out Stripe behaviors for
`StripeBilling` in tests.

Release Notes:

- N/A
2025-05-29 23:49:14 +00:00
Kirill Bulatov
406d975f39
Cleanup corresponding task history on task file update (#31720)
Closes https://github.com/zed-industries/zed/issues/31715

Release Notes:

- Fixed old task history not erased after task file update
2025-05-29 23:02:59 +00:00
Finn Evers
cbed580db0
workspace: Ensure pane handle hitbox blocks mouse events (#31719)
Follow-up to #31712

Pane handle hitboxes were opaque prior to the linked PR. This was the
case because pane handles have an intentionally larger hitbox than the
pane dividers size to allow for easier dragging. The cursor style is
also updated for that hitbox to indicate that resizing is possible:


9086784038/crates/workspace/src/pane_group.rs (L1297-L1301)

Not blocking the mouse events here causes mouse events to bleed through
this hitbox whilst actually any clicks will only cause a pane resize to
happen. Hence, this hitbox should continue to block mouse events to
avoid any confusion when resizing panes.

I considered using `HitboxBehavior::BlockMouseExceptScroll` here,
however, due to the reasons mentioned above, I decided against it. The
cursor will not indicate that scrolling should be possible. Since all
other mouse events on underlying elements (like hovers) are blocked, it
felt more reasonable to just go with `HitboxBehavior::BlockMouse`.

Release Notes:

- N/A
2025-05-29 16:35:22 -06:00
Michael Sloan
8aef64bbfa
Remove block_mouse_down in favor of stop_mouse_events_except_scroll (#30401)
This method was added in #20649 to be an alternative of `occlude` which
allows scroll events. It seems a bit arbitrary to only stop left mouse
downs, so this seems like it's probably an improvement.

Release Notes:

- N/A
2025-05-29 22:07:34 +00:00
Michael Sloan
9086784038
gpui: Support hitbox blocking mouse interaction except scrolling (#31712)
tl;dr: This adds `.block_mouse_except_scroll()` which should typically
be used instead of `.occlude()` for cases when the mouse shouldn't
interact with elements drawn below an element. The rationale for
treating scroll events differently:

* Mouse move / click / styles / tooltips are for elements the user is
interacting with directly.
* Mouse scroll events are about finding the current outer scroll
container.

Most use of `occlude` should probably be switched to this, but I figured
I'd derisk this change by minimizing behavior changes to just the 3 uses
of `block_mouse_except_scroll`.

GPUI changes:

* Added `InteractiveElement::block_mouse_except_scroll()`, and removes
`stop_mouse_events_except_scroll()`

* Added `Hitbox::should_handle_scroll()` to be used when handling scroll
wheel events.

* `Window::insert_hitbox` now takes `HitboxBehavior` instead of
`occlude: bool`.

    - `false` for that bool is now `HitboxBehavior::Normal`.

    - `true` for that bool is now `HitboxBehavior::BlockMouse`.
    
    - The new mode is `HitboxBehavior::BlockMouseExceptScroll`.

* Removes `Default` impl for `HitboxId` since applications should not
manually create `HitboxId(0)`.

Release Notes:

- N/A
2025-05-29 21:41:15 +00:00
Kirill Bulatov
2abc5893c1
Improve TypeScript task detection (#31711)
Parses project's package.json to better detect Jasmine, Jest, Vitest and
Mocha and `test`, `build` scripts presence.
Also tries to detect `pnpm` and `npx` as test runners, falls back to
`npm`.


https://github.com/user-attachments/assets/112d3d8b-8daa-4ba5-8cb5-2f483036bd98

Release Notes:

- Improved TypeScript task detection
2025-05-29 20:51:20 +00:00
Marshall Bowers
a23ee61a4b
Pass up intent with completion requests (#31710)
This PR adds a new `intent` field to completion requests to assist in
categorizing them correctly.

Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-05-29 20:43:12 +00:00
Simon Pham
38e45e828b
Add View Release Notes to Help menu (#31704)
<img width="891" alt="image"
src="https://github.com/user-attachments/assets/59e98fdb-c1b5-4948-8d69-661561d838f1"
/>



Release Notes:

- Added `View Release Notes` to `Help` menu
2025-05-29 19:39:54 +00:00
Danilo Leal
181bf78b7d
agent: Change the navigation menu keybinding (#31709)
As much as I enjoyed the previous keybinding, it was causing a conflict
with the editor where it wouldn't open on text threads. To not get into
a rabbit hole and complicate the fix too much, I figured simply changing
it to something non-conflictual would be a good move.

Release Notes:

- agent: Fixed a bug where the panel navigation menu wouldn't open with
the keybinding on text threads.
2025-05-29 19:31:57 +00:00
Piotr Osiewicz
c42d060509
Update debug.json in Zed repo to run the build on session startup (#31707)
Closes #ISSUE

Release Notes:

- N/A
2025-05-29 21:29:18 +02:00
Peter Tripp
6ea9abdc1b
Cursor keymap (#31702)
To use this, spawn `weclome: toggle base keymap selector` from the
command palette.

<img width="589" alt="Screenshot 2025-05-29 at 14 07 35"
src="https://github.com/user-attachments/assets/0d4c4eff-6a3b-40f4-9032-5d8ca7664d20"
/>

MacOS is well tested to match Cursor. The [curors keymap
documentation](https://docs.cursor.com/kbd) is does not explicitly state
windows/linux keymap entries only "All Cmd keys can be replaced with
Ctrl on Windows." so that is what we've done. We welcome feedback /
refinements.

Note, because this provides a mapping for `cmd-k` (macos) and `ctrl-k`
(linux/windows) using this keymap will disable all of the default
chorded keymap entries which have `cmd-k` / `ctrl-k` as a prefix. For
example `cmd-k cmd-s` for open keymap will no longer function.

Release Notes:

- Added Cursor compatibility keymap

---------

Co-authored-by: Joseph Lyons <joseph@zed.dev>
2025-05-29 15:20:58 -04:00
Piotr Osiewicz
070eac28e3
go: Use delve-dap-shim for spawning delve (#31700)
This allows us to support terminal with go sessions

Closes #ISSUE

Release Notes:

- debugger: Add support for terminal when debugging Go programs
2025-05-29 21:19:56 +02:00
Danilo Leal
05692e298a
agent: Fix panel "go back" button (#31706)
Closes https://github.com/zed-industries/zed/issues/31652.

Release Notes:

- agent: Fixed a bug where the "go back" button wouldn't go back to the
Text Thread after visiting another view from it.
2025-05-29 16:00:37 -03:00
Richard Feldman
ccb049bd97
Format streamed edits on save (#31623)
Re-enables format on save for agent changes (when the user has that
enabled in settings), except differently from before:
- Now we do the format-on-save in the separate buffer the edit tool
uses, *before* the diff
- This means it never triggers separate staleness
- It has the downside that edits are now blocked on the formatter
completing, but that's true of saving in general.

Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <hi@aguz.me>
2025-05-29 14:33:41 -04:00
Danilo Leal
fe57eedb44
agent: Rename PromptEditor to TextThread in the panel's ActiveView (#31705)
Was touching this part of the Agent Panel and thought it could be a
quick name consistency win here, so it is aligned with the terminology
we're currently actively using in the product/docs.

Release Notes:

- N/A
2025-05-29 15:31:35 -03:00
5brian
c57e6bc784
tab_switcher: Add placeholder text (#31697)
| Before | After |
|---|---|
|<img width="478" alt="image"
src="https://github.com/user-attachments/assets/5baba783-ee31-42cd-9760-7ee19edb1123"
/>|<img width="478" alt="image"
src="https://github.com/user-attachments/assets/1b149500-4a97-4085-80e5-fd628c92471a"
/>|

Release Notes:

- N/A
2025-05-29 16:09:07 +00:00
Piotr Osiewicz
83135e98e6
Introduce $ZED_CUSTOM_PYTHON_ACTIVE_ZED_TOOLCHAIN_RAW to work around (#31685)
Follow up to #31674 

Release Notes:

- N/A

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2025-05-29 13:44:55 +00:00
Umesh Yadav
703ee29658
Rename Max Mode to Burn Mode throughout code and docs (#31668)
Follow up to https://github.com/zed-industries/zed/pull/31470.

I started looking at config and changed preferred_completion_mode to
burn to only find its max so made changes to align it better with
rebrand. As this is in preview build now.

This doesn't touch zed_llm_client. Only the Zed changes the code and doc
to match the new UI of burn mode. There are still more things to be
renamed, though.

Release Notes:

- N/A

---------

Signed-off-by: Umesh Yadav <git@umesh.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-05-29 13:12:42 +00:00
Kirill Bulatov
f792827a01
Allow to reuse PickerPopoverMenu outside of the model selector (#31684)
LSP button preparation step: move out the component that will be used to
build the button's context menu.

Release Notes:

- N/A
2025-05-29 12:55:47 +00:00
Danilo Leal
45f9edcbb9
docs: Add small refinements to CSS adjacent pages (#31683)
Follow up to https://github.com/zed-industries/zed/pull/31681. Was
visiting some of these pages and noticed these somewhat small formatting
and copywriting improvement opportunities. The docs for Svelte in
particular felt somewhat unorganized.

Release Notes:

- N/A
2025-05-29 08:43:54 -03:00
Danilo Leal
e3354543c0
docs: Improve the Tailwind CSS page (#31681)
Namely, ensuring we mention the support for their Prettier plugins.

Release Notes:

- N/A
2025-05-29 08:15:59 -03:00