3ac14e1
agent: Fix Gemini refusing all requests with file-based tool calls (#38705)
Click to expand commit body
Solves an issue where Google APIs refuse all requests with file-based
tool calls attached.
This seems to get triggered in the case where:
- copy_path + another file-based tool call is enabled
- default terminal is `/bin/bash` or something similar
It is unclear why this is happening, but removing the terminal commands
in those tool calls seems to have solved the issue.
Closes #37180 and #37414
Release Notes:
- agent: Fix Gemini refusing requests with certain profiles/systems.
Ben Brandt
created
9e73025
Fix UTF-8 character boundary panic in DirectWrite text layout (#37767)
Click to expand commit body
## Problem
Zed was crashing with a UTF-8 character boundary error when rendering
text containing multi-byte characters (like emojis or CJK characters):
```
Thread "main" panicked with "byte index 49 is not a char boundary; it is inside '…' (bytes 48..51)"
```
## Root Cause Analysis
The PR reviewer correctly identified that the issue was not in the
DirectWrite boundary handling, but rather in the text run length
calculation in the text system. When text runs are split across lines in
`text_system.rs:426`, the calculation:
```rust
let run_len_within_line = cmp::min(line_end, run_start + run.len) - run_start;
```
This could result in `run_len_within_line` values that don't respect
UTF-8 character boundaries, especially when multi-byte characters (like
'…' which is 3 bytes) get split across lines. The resulting `FontRun`
objects would have lengths that don't align with character boundaries,
causing the panic when DirectWrite tries to slice the string.
## Solution
Fixed the issue by adding UTF-8 character boundary validation in the
text system where run lengths are calculated. The fix ensures that when
text runs are split across lines, the split always occurs at valid UTF-8
character boundaries:
```rust
// Ensure the run length respects UTF-8 character boundaries
if run_len_within_line > 0 {
let text_slice = &line_text[run_start - line_start..];
if run_len_within_line < text_slice.len() && !text_slice.is_char_boundary(run_len_within_line) {
// Find the previous character boundary using efficient bit-level checking
// UTF-8 characters are at most 4 bytes, so we only need to check up to 3 bytes back
let lower_bound = run_len_within_line.saturating_sub(3);
let search_range = &text_slice.as_bytes()[lower_bound..=run_len_within_line];
// SAFETY: A valid character boundary must exist in this range because:
// 1. run_len_within_line is a valid position in the string slice
// 2. UTF-8 characters are at most 4 bytes, so some boundary exists in [run_len_within_line-3..=run_len_within_line]
let pos_from_lower = unsafe {
search_range
.iter()
.rposition(|&b| (b as i8) >= -0x40)
.unwrap_unchecked()
};
run_len_within_line = lower_bound + pos_from_lower;
}
}
```
## Testing
- ✅ Builds successfully on all platforms
- ✅ Eliminates UTF-8 character boundary panics
- ✅ Maintains existing functionality for all text types
- ✅ Handles edge cases like very long multi-byte characters
## Benefits
1. **Root cause fix**: Addresses the issue at the source rather than
treating symptoms
2. **Performance optimal**: Uses the same efficient algorithm as the
standard library
3. **Minimal changes**: Only modifies the specific problematic code path
4. **Future compatible**: Can be easily replaced with
`str::floor_char_boundary()` when stabilized
## Alternative Approaches Considered
1. **DirectWrite boundary fixing**: Initially tried to fix in
DirectWrite, but this was treating symptoms rather than the root cause
2. **Helper function approach**: Considered extracting to a helper
function, but inlined implementation is more appropriate for this
specific use case
3. **Standard library methods**: `floor_char_boundary()` is not yet
stable, so implemented equivalent logic
The chosen approach provides the best balance of performance, safety,
and code maintainability.
---
Release Notes:
- N/A
邻二氮杂菲
created
1bf8332
editor: Deduplicate locations in `navigate_to_hover_links` (#38707)
Click to expand commit body
Closes
https://github.com/zed-industries/zed/issues/6730#issuecomment-3320933701
That way if multiple servers are running while reporting the same
results we prevent opening multi buffers for single entries.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Add tests on task commands, to ensure things like
https://github.com/zed-industries/zed/issues/38343 do not come so easily
unnoticed and to provide a base to create more tests in the future, if
needed.
Release Notes:
- N/A
---------
Co-authored-by: Lukas Wirth <lukas@zed.dev>
Kirill Bulatov
and
Lukas Wirth
created
edb804d
go: Stop running ghost tests, fix broken `go test -run` for suites (#38167)
Click to expand commit body
Closed #33759
Closed #38166
### Summary
This PR fixes the way `go test` commands are generated for **testify
suite test methods**.
Previously, only the method name was included in the `-run` flag, which
caused Go’s test runner to fail to find suite test cases.
---
### Problem
https://github.com/user-attachments/assets/e6f80a77-bcf3-457c-8bfb-a7286d44ff71
1. **Incorrect command** was generated for suite tests:
```bash
go test -run TestSomething_Success
```
This results in:
```
testing: warning: no tests to run
```
2. The correct format requires the **suite name + method name**:
```bash
go test -run ^TestFooSuite$/TestSomething_Success$
```
Without the suite prefix (`TestFooSuite`), Go cannot locate test methods
defined on a suite struct.
---
### Changes Made
* **Updated `runnables.scm`**:
* Added a new query rule for suite methods (`.*Suite` receiver types).
* Ensures only methods on suite structs (e.g., `FooSuite`) are matched.
* Tagged these with `go-testify-suite` in addition to `go-test`.
* **Extended task template generation**:
* Introduced `GO_SUITE_NAME_TASK_VARIABLE` to capture the suite name.
* Create a `TaskTemplate` for the testify suite.
* **Improved labeling**:
* Labels now show the full path (`go test ./pkg -v -run
TestFooSuite/TestSomething_Success`) for clarity.
* **Added a test** `test_testify_suite_detection`:
* Covered testify suite cases to ensure correct detection and command
generation.
---
### Impact
https://github.com/user-attachments/assets/ef509183-534a-4aa4-9dc7-01402ac32260
* **Before**: Running a suite test method produced “no tests to run.”
* **After**: Suite test methods are runnable individually with the
correct `-run` command, and full suites can still be executed as before.
### Release Notes
* Fixed generation of `go test` commands for **testify suite test
methods**.
Suite methods now include both the suite name and the method name in the
`-run` flag (e.g., `^TestFooSuite$/TestSomething_Success$`), ensuring
they are properly detected and runnable individually.
Buffer search initiates a new search every time a key is pressed in the
buffer search bar. This would cancel the task associated with any
pending searches. Whenever one of these searches was canceled Zed would
log `[search]: oneshot canceled`. This log would trigger almost on every
keypress when typing moderately fast. This PR silences these logs by not
treating canceled searches as errors.
Release Notes:
- N/A
tidely
created
1d5da68
windows: Show `alt-=` for `pane::GoForward` (#38696)
Click to expand commit body
Reorder the shortcuts for `pane::GoForward` so the menu now shows
`Alt-=` instead of `forward`
Release Notes:
- N/A
张小白
created
f07bc12
helix: Further cleanups to helix paste in line mode (#38694)
Click to expand commit body
I noticed that after we paste in line mode, the cursor position is
positioned at the beginning of the next logical line which is somewhat
undesirable since then inserting/appending will position the cursor
after the selection. This does not match helix behaviour which we should
further investigate.
Follow-up to https://github.com/zed-industries/zed/pull/38663
Release Notes:
- N/A
Jakub Konka
created
4532765
zeta2: Add prompt planner and provide access via zeta_cli (#38691)
Click to expand commit body
Release Notes:
- N/A
Michael Sloan
created
25a1827
Ensure we have the targets needed for bundling (#38688)
Click to expand commit body
Closes #ISSUE
Release Notes:
- N/A
Conrad Irwin
created
98865a3
Fix invalid anchors in breadcrumbs (#38687)
Click to expand commit body
Release Notes:
- (nightly only) Fix panic when your cursor abuts a multibyte character
Conrad Irwin
created
681a4ad
Remove `OutlineItem::signature_range` as it is no longer used (#38680)
Click to expand commit body
Use in edit predictions was removed in #38676
Release Notes:
- N/A
Michael Sloan
created
5e502a3
Fix remote server crash with JSON files (#38678)
iTerm's editor configuration dialog allows you to set your editor to
`zed \1:\2`, but not (as far as I know) to leave off the : when there's
no line number
This fixes clicking on bare filenames in iTerm for me.
Release Notes:
- Fixed line number parsing so that `zed filename.rs:` will now act as
though you did `zed filename.rs`
Creates a new `EditPredictionProvider` for zeta2, that requests
completions from a new cloud endpoint including context from the new
`edit_prediction_context` crate. This is not ready for use, but it
allows us to iterate.
Release Notes:
- N/A
---------
Co-authored-by: Michael Sloan <michael@zed.dev>
Co-authored-by: Bennet <bennet@zed.dev>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Agus Zubiaga
,
Michael Sloan
,
Bennet
, and
Bennet Bo Fenner
created
e9abd5b
docs: Mention required matching configs when developing language server extensions (#38674)
Click to expand commit body
This took me quite a while to find out when I developed my first
language extension. I had non-matching entries in the `languages` array
and in the name field of `config.toml`, and it was especially tricky
because the zed extension would start up, but not the language server. I
sure which this had been in the docs, so I am contributing it now!
Release Notes:
- N/A
---------
Co-authored-by: Nia Espera <nia@zed.dev>
Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
Piotr Osiewicz
,
Nia Espera
, and
Julia Ryan
created
46d19d8
helix: Fix helix-paste mode in line mode (#38663)
Click to expand commit body
In particular,
* if the selection ends at the beginning of the next line, and the
current line under the cursor is empty, we paste at the selection's end.
* if however the current line under the cursor is empty, we need to move
to the beginning of the next line to avoid pasting above the end of
current selection
In addition, in line mode, we always move the cursor to the end of the
inserted text. Otherwise, while it looks fine visually,
inserting/appending ends up in the next logical line which is not
desirable.
Release Notes:
- N/A
Jakub Konka
created
e484f49
language_models: Treat a `block_reason` from Gemini as a refusal (#38670)
Click to expand commit body
This PR updates the Gemini provider to treat a
`prompt_feedback.block_reason` as a refusal, as Gemini does not seem to
return a `stop_reason` to use in this case.
<img width="639" height="162" alt="Screenshot 2025-09-22 at 4 23 15 PM"
src="https://github.com/user-attachments/assets/7a86d67e-06c1-49ea-b58f-fa80666f0f8c"
/>
Previously this would just result in no feedback to the user.
Release Notes:
- Added an error message when a Gemini response contains a
`block_reason`.
e602cfa
Restore user-defined ordering of profiles (#38665)
Click to expand commit body
This PR fixes a regression where settings profiles were no longer
ordered in the same order that the user defined in their settings.
Release Notes:
- N/A
Joseph T. Lyons
created
d4adb51
languages: Update package.json and tsconfig.json schemas (#38655)
Click to expand commit body
Closes: https://github.com/zed-industries/zed/issues/34382
- Add support for `tsconfig.*.json` not just `tsconfig.json`.
- Updated JSON schemas to
[SchemaStore/schemastore@281aa4a](https://github.com/SchemaStore/schemastore/tree/281aa4aa4ac21385814423f86a54d1b8ccfc17a1)
(2025-09-21)
-
[tsconfig.json](https://github.com/SchemaStore/schemastore/commits/master/src/schemas/json/tsconfig.json)
@
[281aa4a](https://raw.githubusercontent.com/SchemaStore/schemastore/281aa4aa4ac21385814423f86a54d1b8ccfc17a1/src/schemas/json/tsconfig.json)
-
[package.json](https://github.com/SchemaStore/schemastore/commits/master/src/schemas/json/package.json)
@
[281aa4a](https://raw.githubusercontent.com/SchemaStore/schemastore/281aa4aa4ac21385814423f86a54d1b8ccfc17a1/src/schemas/json/package.json)
See also:
- [discord
thread](https://discord.com/channels/869392257814519848/1419298937290096760)
-
https://github.com/zed-industries/zed/issues/21994#issuecomment-3319321308
Release Notes:
- Updated package.json and tsconfig.json schemas to newest release
(2025-09-21). Match `tsconfig.*.json` too.
Peter Tripp
created
a0514af
editor: Make buffer search bar capture CopyPath & CopyRelativePath actions (#38645)
Click to expand commit body
Closes #38495
Cause:
- When the Find input is focused, CopyPath/CopyRelativePath were handled
by the editor and stopped during the bubble phase, preventing
BufferSearchBar from relaying to the file-backed editor.
Release Notes:
- Fixes “Workspace: Copy Relative Path” not copying while the Find bar
is focused.
Miao
created
c88fdaf
Implement Markdown link embedding on paste (#38639)
Click to expand commit body
This PR adds automatic markdown URL embedding on paste when you are in
text associated with the Markdown language and you have a valid URL in
your clipboard. This the default behavior in VS Code and GitHub, when
pasting a URL in Markdown. It works in both singleton buffers and multi
buffers.
One thing that is a bit unfortunate is that, previously, `do_paste` use
to simply call `Editor::insert()`, in the case of pasting content that
was copied from an external application, and now, we are duplicating
some of `insert()`'s logic in place, in order to have control over
transforming the edits before they are inserted.
Release Notes:
- Added automatic Markdown URL embedding on paste.
---------
Co-authored-by: Cole Miller <53574922+cole-miller@users.noreply.github.com>
Joseph T. Lyons
and
Cole Miller
created
003163e
Move my keybinding fixes to the right platform (#38654)
Click to expand commit body
In cffb883108ec07ec2f51446cb35eac19b89e625f I put the fixed keybindings
on the wrong platform
Release Notes:
- Fix syntax node shortcuts
Conrad Irwin
created
9e64b7b
terminal: Escape args in alacritty on Windows (#38650)
Click to expand commit body
Release Notes:
- N/A
Jakub Konka
created
d4fd59f
vim: Add support for `<count>gt` and `<count>gT` (#38570)
Click to expand commit body
Vim mode currently supports `gt` (go to next tab) and `gT` (go to
previous tab) but not with count. Implement the expected behavior as
defined by vim:
- `<count>gt` moves to tab `<count>`
- `<count>gT` moves to previous tab `<count>` times (with wraparound)
Release Notes:
- Improved vim `gt` and `gT` to support count, e.g. `5gt` - go to tab 5,
`8gT` - go to 8th previous tab with wraparound.
Ran Benita
created
4e6e424
acp: Support model selection for ACP agents (#38652)
Click to expand commit body
It requires the agent to implement the (still unstable) model selection
API. Will allow us to test it out before stabilizing.
Release Notes:
- N/A
Ben Brandt
created
dccbb47
Use a consistent default for window scaling (#38527)
Click to expand commit body
(And make it 2, because most macs have retina screens)
Release Notes:
- N/A
Conrad Irwin
created
b97843e
Add quick "Edit debug.json" button to debugger control strip (#38600)
Click to expand commit body
This button already exists in the main menu, as well as the "New
Session" view in the debugger panel. However, this view disappears after
starting the debugging session. This PR adds the same button to the
debugger control strip that remains accessible. This is convenient for
people editing their debug.json frequently.
Site-node: I feel like the `Cog` icon would be more appropriate, but I
picked `Code` to stay consistent with the "New Session" view.
Before:
<img width="194" height="118" alt="image"
src="https://github.com/user-attachments/assets/5b42a8a4-f48f-4145-a425-53365dd785ca"
/>
After:
<img width="194" height="118" alt="image"
src="https://github.com/user-attachments/assets/12f56ea1-150b-4564-8e6a-da4671f52079"
/>
Release Notes:
- Added "Edit debug.json" button to debugger control strip
1bbf98a
Fix arrow function detection in TypeScript/JavaScript outline (#38411)
Click to expand commit body
Closes #35102
https://github.com/user-attachments/assets/3c946d6c-0acd-4cfe-8cb3-61eb6d20f808
Release Notes:
- TypeScript/JavaScript: symbol outline now includes closures nested
within functions.
strygwyr
created
8bac1be
Disable subpixel shifting for y axis on Windows (#38440)
Click to expand commit body
Release Notes:
- N/A
---------
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
localcc
and
Jakub Konka
created
55dc9ff
text: Implement `Rope::clip_offset` in terms of the new utf8 boundary methods (#38630)
Click to expand commit body
Release Notes:
- N/A
Lukas Wirth
created
50bd8bc
docs: Add instructions for setting up `fish_indent` for fish (#38414)
Click to expand commit body
Release Notes:
- N/A
Justin Su
created
a2c71d3
text: Assert text anchor offset validity on construction (#38441)
Click to expand commit body
Attempt to aid debugging some utf8 indexing issues
Release Notes:
- N/A
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Lukas Wirth
and
Mikayla Maki
created
7962045
Docs: change format_on_save value from false to "off" (#38615)
Click to expand commit body
Found this outdated piece of information in the docs while trying to
disable it myself, this PR simply changes `false` to `"off"`.
Release Notes:
- N/A
Matheus
created
271771c
editor: Prevent non‑boundary highlight indices in UTF‑8 (#38510)
Click to expand commit body
Closes #38359
Release Notes:
- Use byte offsets for highlights; fix UTF‑8 crash
Miao
created
891a06c
docs: Small grammar fix to use a possessive pronoun (#38610)
Click to expand commit body
> Your extension can define it's own debug locators
> Your extension can define it is own debug locators
The sentence above does not make sense after expanding "it's". We should
instead be using the possessive "its" in this scenario.
Release Notes:
- N/A
Signed-off-by: Remy Suen <remy.suen@docker.com>
Expands on #38543 (notably allows setting importance categories and
weights on tests, and a lot of internal refactoring) because I couldn't
help myself. Also allows exporting runs to json and comparing across them. See code for docs.
Release Notes:
- N/A
Nia
created
839c216
terminal: Re-add sanitizing trailing periods in URL detection (#38569)
Click to expand commit body
I accidentally regressed this when bumping alacritty in
https://github.com/zed-industries/zed/pull/38505
cc @davewa
Release Notes:
- N/A
Reverts #38175, which is not correct, since in fact we do need to
pre-quote the command and arguments for the shell when using
`SpawnInTerminal` (although we should probably change the API so that
this isn't necessary). Then, applies the same fix as #38565 to fix the
root cause of being unable to spawn the login task on macOS, or in any
case where the command/args contain spaces.
Release Notes:
- Fixed being unable to login with Claude Code or Gemini using the
terminal.
remove depulicate code, this same with line: 556-562
Release Notes:
- N/A
CharlesChen0823
created
1d1bbf0
docs: Mention `herb` LSP for Ruby language (#38351)
Click to expand commit body
Hi! This pull request mentions [the `herb` LSP](https://herb-tools.dev)
for `HTML/ERB` language that the Ruby extension supports. Thanks!
Release Notes:
- N/A
---------
Co-authored-by: Finn Evers <finn.evers@outlook.de>
Vitaly Slobodin
and
Finn Evers
created
ffa23d2
Fix formatting in workspace `Cargo.toml` (#38563)
Click to expand commit body
This PR fixes some formatting issues in the workspace `Cargo.toml`.
Release Notes:
- N/A
Marshall Bowers
created
7820586
tests: Add an automatic perf profiler (#38543)
Click to expand commit body
Add an auto-profiler for our tests, to hopefully allow better triage of
performance impacts resulting from code changes. Comprehensive usage
docs are in the code.
Currently, it uses hyperfine under the hood and prints markdown to the
command line for all crates with relevant tests enabled. We may want to
expand this to allow outputting json in the future to allow e.g.
automatically comparing the difference between two runs on different
commits, and in general a lot of functionality could be added (maybe
measuring memory usage?).
It's enabled (mostly as an example) on two tests inside `gpui` and a
bunch of those inside `vim`. I'd have happily used `cargo bench`, but that's nightly-only.
Release Notes:
- N/A
Nia
created
be77682
editor: Fix adding extraneous closing tags within TSX (#38534)
Smit Barmase
created
8df616e
Suppress the 'Agent Thread Started' event when initializing the panel (#38535)
Click to expand commit body
Release Notes:
- N/A
Mikayla Maki
created
89520ea
chore: Bump alacritty_terminal to 0.25.1-rc1 (#38505)
Click to expand commit body
Release Notes:
- N/A
---------
Co-authored-by: Dave Waggoner <waggoner.dave@gmail.com>