Commit graph

26856 commits

Author SHA1 Message Date
Peter Tripp
ef4b5b0698
script: Ignore feature/meta issues from issue_response nag (#28332)
Release Notes:

- N/A
2025-04-08 17:14:07 -04:00
Kirill Bulatov
39c98ce882
Support tasks from rust-analyzer (#28359)
(and any other LSP server in theory, if it exposes any LSP-ext endpoint
for the same)

Closes https://github.com/zed-industries/zed/issues/16160

* adds a way to disable tree-sitter tasks (the ones from the plugins,
enabled by default) with
```json5
"languages": {
  "Rust": "tasks": {
      "enabled": false
    }
  }
}
```
language settings

* adds a way to disable LSP tasks (the ones from the rust-analyzer
language server, enabled by default) with
```json5
"lsp": {
  "rust-analyzer": {
    "enable_lsp_tasks": false,
  }
}
```

* adds rust-analyzer tasks into tasks modal and gutter:

<img width="1728" alt="modal"
src="https://github.com/user-attachments/assets/22b9cee1-4ffb-4c9e-b1f1-d01e80e72508"
/>

<img width="396" alt="gutter"
src="https://github.com/user-attachments/assets/bd818079-e247-4332-bdb5-1b7cb1cce768"
/>


Release Notes:

- Added tasks from rust-analyzer
2025-04-08 15:07:56 -06:00
Joseph T. Lyons
763cc6dba3
Tell the model not to act on TODO type comments (#28358)
Release Notes:

- Adjusted system prompt to direct it to never act on TODO-type comments
it encounters, unless the user directly asked it to do so or they relate
to the current task at hand.
2025-04-08 21:00:02 +00:00
Piotr Osiewicz
0b75c13034
chore: Replace as_any functions with trait upcasting (#28221)
Closes #ISSUE

Release Notes:

- N/A
2025-04-08 22:16:27 +02:00
Ben Kunkle
38ec45008c
project: Workaround invalid code action edits from pyright (#28354)
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Piotr Osiewicz <piotr@zed.dev>

fixes issue where:

In a two line python file like so
```

Path()
```

If the user asks for code actions on `Path` and they select (`From
pathlib import path`)
the result they get is
```

Pathfrom pathlib import Path


Path()
```
Instead of 

```

from pathlib import Path



Path()
```

This is due to a non-lsp-spec-compliant response from pyright below

```json
{"jsonrpc":"2.0","id":40,"result":[{"title":"from pathlib import Path","edit":{"changes":{"file:///Users/neb/Zed/example-project/pyright-project/main.py":[{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":4}},"newText":"Path"},{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":0}},"newText":"from pathlib import Path\n\n\n"}]}},"kind":"quickfix"}]}
```

Release Notes:

- Fixed an issue when using auto-import code actions provided by pyright
(or basedpyright) where the import would be jumbled with the scoped
import resulting in an invalid result

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2025-04-08 20:13:44 +00:00
Antonio Scandurra
97641c3298
Use tree-sitter when returning symbols to the model for a given file (#28352)
This also increases the threshold for when we return an outline during
`read_file`.

Release Notes:

- Fixed an issue that caused the agent to fail reading large files if
the LSP hadn't started yet.
2025-04-08 16:11:05 -04:00
Joseph T. Lyons
ca8f6e8a3f
Tell the model not to remove tests (#28349)
Release Notes:

- Adjusted system prompt to direct it to never remove tests as a way to
have the test suite pass, unless the user directly asks for test
removal.
2025-04-08 19:26:43 +00:00
Piotr Osiewicz
db53da49e1
debugger: Respect initialize_args from user profiles (#28347)
Closes #ISSUE

Release Notes:

- N/A

Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>
2025-04-08 21:15:05 +02:00
Peter Tripp
df94dcdea6
ci: Only run workspace_hack when tests run (#28346)
Skip `workspace_hack` for PRs that don't trigger tests (docs-only,
.github issue templates, etc).

Release Notes:

- N/A
2025-04-08 18:55:54 +00:00
Richard Feldman
1c85901440
Tell the model not to create .bak files (#28244)
Release Notes:

- Adjusted system prompt to avoid having the agent create backup files
unnecessarily.
2025-04-08 18:45:35 +00:00
Peter Tripp
9fb77ad176
Refine GitHub Issue templates (#28345)
Make various improvements to our github issue templates.

- Adjust line lengths to not wrap in constrained new issue view (85
cols) not just full screen view (95 columns)
- Remove reference to drag/drop logs to upload (recently multiple issues
with dead upload links)
- Cleanup list view

Release Notes:

- N/A
2025-04-08 14:41:55 -04:00
Michael Sloan
feafad2f9d
Improve comments on shader code for dashed borders (#28341)
Improvements from going over the code with @as-cii 

Release Notes:

- N/A
2025-04-08 18:08:22 +00:00
Piotr Osiewicz
86ef00054b
pylsp: Upgrade existing installation if possible (#28338)
Closes #ISSUE

Release Notes:

- Zed-managed pylsp installations will now correctly upgrade themselves
2025-04-08 20:01:09 +02:00
Conrad Irwin
9e8afa8daa
Fix local task dropped on the wrong thread (#28290)
Release Notes:

- Fixed a panic during shutdown of the remote server
2025-04-08 11:54:51 -06:00
Danilo Leal
698cdc4d1a
agent: Display "generating" label in the active thread (#28297)
Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-04-08 14:31:32 -03:00
Agus Zubiaga
85c5d8af3a
agent: Truncate bash tool output (#28291)
The bash tool will now truncate its output to 8192 bytes (or the last
newline before that).

We also added a global limit for any tool that produces a clearly large
output that wouldn't fit the context window.

Release Notes:

- agent: Truncate bash tool output

---------

Co-authored-by: Michael Sloan <mgsloan@gmail.com>
2025-04-08 16:55:35 +00:00
Anthony Eid
1774cad933
debugger: Add close button and coloring to debug panel session's menu (#28310)
This PR adds colors to debug panel's session menu that indicate the
state of each respective session. It also adds a close button to each
entry.

green - running
yellow - stopped
red - terminated/ended 


Release Notes:

- N/A
2025-04-08 16:35:33 +00:00
Conrad Irwin
ee7b1ec7f2
Fix deafening new participants (#28330)
Release Notes:

- Fixed an issue where new participants were not muted when the room was
deafened
2025-04-08 16:01:27 +00:00
Bennet Bo Fenner
14b43d573c
agent: Navigate to line when clicking on filepath in markdown codeblock (#28329)
Release Notes:

- N/A
2025-04-08 15:41:34 +00:00
Max Brunsfeld
d39e1e03b8
Demote buffer-diff to a dev dependency of collab (#28295)
This will speed up our collab deployments a little

Release Notes:

- N/A
2025-04-08 08:36:44 -07:00
Peter Tripp
9e504a1ed9
git: Fix logging FromUtf8Error when diffing (#28276)
If you attempt to load a git diff which includes a non utf-8 file,
previously
(1) the entire contents of the file was logged as ordinals and
(2) a second spurious error was logged

```
2025-04-07T16:21:28.392845-04:00 [ERROR] FromUtf8Error { bytes: [0, 1, 0, 0, 0, 19, 1, 0, 0, 4, 0, 48, 68, 83, 73, 71, 0, 0, 0, 1, 0, 2, 241, 204, 0, 0, 0, 8, 71, 68, 69, 70, 164, 172, 164, ...

[2025-04-07T17:12:16-04:00 ERROR git::repository] Error loading index text: invalid utf-8 sequence of 1 bytes from index 35
```

Having 1MB binary file in a commit would generate ~3MB-5MB of log
output.

Discovered while investigating
https://github.com/zed-industries/zed/issues/28241

Release Notes:

- git: Fixed an issue where non-UTF8 files in a git diff would generate
log spam.
2025-04-08 11:28:34 -04:00
Conrad Irwin
ca4cc4764b
Upgrade async-tungstenite to tokio (#26193)
We're seeing panics caused by a buggy implementation of AsyncWrite
that is being passed to rustls: 

https://github.com/rustls/rustls/issues/2316#issuecomment-2662838186

One hypothesis was that we're using (comparatively) non-standard async
tools for connecting over websockets; so this attempts to make us be
(comparitvely) more standard.

Release Notes:

- N/A
2025-04-08 09:17:08 -06:00
5brian
ea33d78ae4
vim: Fix visual line yank on newline char (#28005)
Problem:
When yanking in visual line on the newline char, the next line gets
yanked as well:


https://github.com/user-attachments/assets/40f332dd-19f5-445f-a30f-39d50167c46f

Changes:
Similar to visual delete, exclude the newline char from the selection in
line mode.

Release Notes:

- vim: Fixed visual line yank while on the newline character yanking
following line
2025-04-08 09:15:34 -06:00
5brian
e36a2f2739
vim: Add indent-wise motions (#28044)
Taken from:
https://github.com/jeetsukumaran/vim-indentwise?tab=readme-ov-file#movements-by-relative-indent-depth



> [- : Move to previous line of lesser indent than the current line.
> [+ : Move to previous line of greater indent than the current line.
> [= : Move to previous line of same indent as the current line that is
separated from the current line by lines of different indents.
> ]- : Move to next line of lesser indent than the current line.
> ]+ : Move to next line of greater indent than the current line.
> ]= : Move to next line of same indent as the current line that is
separated from the current line by lines of different indents.



Release Notes:

- vim: Added indent-wise motions `] -/+/=`
2025-04-08 09:07:37 -06:00
jneem
cbd9b4cc39
Switch back to the default mode after paste (#28304)
Now that the flaky tests are disabled, this should work...

Release Notes:

- Fixed vim paste action to switch back to the configured default mode.
2025-04-08 09:03:55 -06:00
James Falade
64f8b1e739
docs: Add missing comma in the Tasks page (#28324)
Added a missing command in the same tasks.json file

Release Notes:

- N/A
2025-04-08 15:03:42 +00:00
5brian
4f936d8100
vim: Fix exchange showing ccx in pending keys (#28303)
|Before|After|
|--|--|

|![image](https://github.com/user-attachments/assets/cac97981-518e-46d2-8540-a22496bc948e)|![image](https://github.com/user-attachments/assets/5158b17f-d14e-42a2-8a94-ad98d1b1c33c)|

Changes:
Add vim exchange to the clear stack

Release Notes:

- N/A
2025-04-08 09:03:24 -06:00
Bennet Bo Fenner
97abf21a28
agent: Add support for Google Gemini 2.5 preview (#28326)
Adds support for the new `gemini-2.5-pro-preview-03-25`

Release Notes:

- Added support for `gemini-2.5-pro-preview-03-25` in the assistant
2025-04-08 15:00:23 +00:00
Piotr Osiewicz
5fb1411e4d
debugger: Add scrollbars, fix papercuts with completions menu and jumps (#28321)
Closes #ISSUE

Release Notes:

- N/A
2025-04-08 16:55:18 +02:00
0x2CA
b04f7a4c7c
vim: Fix visual object expands (#28301)
Closes #28198

Release Notes:

- Fixed visual object expands
2025-04-08 08:51:41 -06:00
Marshall Bowers
61b7a05792
language_models: Allow overriding Zed completions URL via environment variable (#28323)
This PR adds support for overriding the Zed completions URL via the
`ZED_COMPLETIONS_URL` environment variable.

Release Notes:

- N/A
2025-04-08 14:46:15 +00:00
Peter Tripp
cc15598e09
keymap: Document conflicting macos ctrl-shift-space shortcut (#28325)
Closes https://github.com/zed-industries/zed/issues/26261

Release Notes:

- N/A
2025-04-08 14:46:03 +00:00
Smit Barmase
7ee9109ade
project_panel: Do not allow creating empty file/dir or file/dir with only whitespaces (#28240)
- Do not allow creating empty file or empty directory.
- Do not allow creating file or directory with just whitespace.
- Show error only in case whitespace.

<img width="352" alt="image"
src="https://github.com/user-attachments/assets/f6040332-59a6-4d09-bf07-2b4b1b8b9e03"
/>

Release Notes:

- N/A
2025-04-08 18:00:01 +05:30
Piotr Osiewicz
c21fdd212b
python: Bump PET version (#28319)
Speculative fix for #27518


Release Notes:

- N/A
2025-04-08 11:04:57 +00:00
tidely
a28929592e
gpui: Depend on workspace image crate (#28313)
Make gpui depend on the image crate on the workspace level

Release Notes:

- N/A
2025-04-08 12:21:24 +02:00
Smit Barmase
3b787e85a4
Fix scrolling too fast on selection for editor and terminal (#28309) 2025-04-08 12:16:18 +05:30
Kirill Bulatov
1264e7a200
Properly store editor restoration data (#28296)
We cannot compare versions and anchors between different `Buffer`s with
different `BufferId`s.

Release Notes:

- Fixed Zed panicking on editor reopen

Co-authored-by: Conrad Irwin <conrad@zed.dev>
2025-04-08 01:25:43 +00:00
Richard Feldman
bfe08e449f
Tell the system prompt not to write incomplete code (#28245)
Sometimes agents do this. I've had some success responding by telling it
not to do this, so trying out having it in the system prompt.

Release Notes:

- Adjusted the system prompt to avoid incomplete code generation.
2025-04-07 20:59:52 -04:00
Piotr Osiewicz
df3c7a73b5
debugger: Pick best candidate binary for debugging cargo-located tasks (#28289)
Closes #ISSUE

Release Notes:

- N/A
2025-04-08 02:30:21 +02:00
Max Brunsfeld
0dc3dffe38
Use insert_id as partition key for crash events (#28293)
Release Notes:

- N/A
2025-04-07 17:24:31 -07:00
Bennet Bo Fenner
b306a0221b
agent: Add headers for code blocks (#28253)
<img width="639" alt="image"
src="https://github.com/user-attachments/assets/1fd51387-cbdc-474d-b1a3-3d0201f3735a"
/>


Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-04-07 23:56:24 +00:00
Max Brunsfeld
d385a60ed1 Fix phrasing of crash/panic event names 2025-04-07 16:31:29 -07:00
Danilo Leal
b27922129c
agent: Refine individual file item design in the edit disclosure (#28283)
<img
src="https://github.com/user-attachments/assets/f1ad0598-d864-407f-8b81-6ca29e2ffae3"
width="650"/>

Release Notes:

- N/A
2025-04-07 19:58:49 -03:00
Max Brunsfeld
6220b86f94
Write panics and crashes to snowflake (#28284)
This will let us create a better crashes dashboard, using Hex.

Release Notes:

- N/A
2025-04-07 15:50:16 -07:00
Conrad Irwin
448db20eaa
Fix bad unicode calculations in do_completion (#28259)
Co-authored-by: João Marcos <marcospb19@hotmail.com>

Release Notes:

- Fixed a panic with completions around non-ASCII code

---------

Co-authored-by: João Marcos <marcospb19@hotmail.com>
2025-04-07 22:45:29 +00:00
renovate[bot]
e4a6943c76
Update Rust crate tokio to v1.44.2 [SECURITY] (#28277)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [tokio](https://tokio.rs)
([source](https://redirect.github.com/tokio-rs/tokio)) | dependencies |
patch | `1.44.1` -> `1.44.2` |
| [tokio](https://tokio.rs)
([source](https://redirect.github.com/tokio-rs/tokio)) |
workspace.dependencies | patch | `1.44.1` -> `1.44.2` |

### GitHub Vulnerability Alerts

####
[GHSA-rr8g-9fpq-6wmg](https://redirect.github.com/tokio-rs/tokio/pull/7232)

The broadcast channel internally calls `clone` on the stored value when
receiving it, and only requires `T:Send`. This means that using the
broadcast channel with values that are `Send` but not `Sync` can trigger
unsoundness if the `clone` implementation makes use of the value being
`!Sync`.

Thank you to Austin Bonander for finding and reporting this issue.

---

### Release Notes

<details>
<summary>tokio-rs/tokio (tokio)</summary>

###
[`v1.44.2`](https://redirect.github.com/tokio-rs/tokio/releases/tag/tokio-1.44.2):
Tokio v1.44.2

[Compare
Source](https://redirect.github.com/tokio-rs/tokio/compare/tokio-1.44.1...tokio-1.44.2)

This release fixes a soundness issue in the broadcast channel. The
channel
accepts values that are `Send` but `!Sync`. Previously, the channel
called
`clone()` on these values without synchronizing. This release fixes the
channel
by synchronizing calls to `.clone()` (Thanks Austin Bonander for finding
and
reporting the issue).

##### Fixed

- sync: synchronize `clone()` call in broadcast channel ([#&#8203;7232])

[#&#8203;7232]: https://redirect.github.com/tokio-rs/tokio/pull/7232

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "" 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 these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjIyNy4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-07 18:38:32 -04:00
Conrad Irwin
f03efeda73
Try to identify dSYMs by UUID not channel (#28268)
This should make it possible to more reliably symbolicate crash reports
from nightly, and from users with pending auto-updates.


Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>
2025-04-07 16:08:38 -06:00
Anthony Eid
862d0c07ca
debugger: Fix gdb adapter and logger (#28280)
There were two bugs that caused the gdb adapter not to work properly,
one on our end and one their end.

The bug on our end was sending `stopOnEntry: null` in our launch request
when stop on entry had no value. I fixed that bug across all dap
adapters

The other bug had to do with python's "great" type system and how we
serialized our unit structs to json; mainly,
`ConfigurationDoneArguments` and `ThreadsArguments`. Gdb seems to follow
a pattern for handling requests where they pass `**args` to a function,
this errors out when the equivalent json is `"arguments": null`.

```py
@capability("supportsConfigurationDoneRequest")
@request("configurationDone", on_dap_thread=True)
def config_done(**args): ### BUG!!
    ...
```

Release Notes:

- N/A
2025-04-07 22:02:13 +00:00
Danilo Leal
56ed5dcc89
agent: Add the history button back in the toolbar and make it a toggle (#28275)
Release Notes:

- agent: The history view is now more easily accessible via the icon
button in the Agent Panel toolbar.

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-04-07 18:58:49 -03:00
Conrad Irwin
b3f47dc5e0
Temporarily disable helix tests (#28279)
Not sure why, but recent changes to helix have made these flakey.

We can re-enable when we understand.

Release Notes:

- N/A
2025-04-07 21:50:35 +00:00