Commit Graph
78 Commits
Author SHA1 Message Date
Max Brunsfeld a1df9baa29 Allow EP cli to fetch rejections from snowflake (#47628)
Release Notes:

- N/A
2026-01-26 10:49:44 +00:00
Max Brunsfeld bf19f03f51 Apply common prefix/suffix stripping to zeta2 and mercury (#47530)
Fixes an issue where edits would be shown like this:

<img width="1262" height="1072" alt="image"
src="https://github.com/user-attachments/assets/f3ec865a-4bf2-423c-8465-62a54a21a882"
/>

When they should be like this:

<img width="1260" height="388" alt="image"
src="https://github.com/user-attachments/assets/ac555a25-f222-48aa-b922-0ae5b9f4e260"
/>


Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-01-24 18:07:59 -08:00
Max Brunsfeld 2301c5f9f0 Send EP trigger as part of zeta2 prediction request (#47523)
Release Notes:

- N/A
2026-01-23 23:40:49 +00:00
Ben KunkleandZed Zippy ff34f22835 zeta2: Include context in captured examples (#47516)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...

---------

Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-01-23 17:18:50 -05:00
Marshall Bowers 097cfae77e Add helper method for checking if the LLM token needs to be refreshed (#47511)
This PR adds a new `needs_llm_token_refresh` helper method for checking
if the LLM token needs to be refreshed.

We were duplicating the check for the `x-zed-expired-token` header in a
number of spots, and it will be gaining an additional case soon.

Release Notes:

- N/A
2026-01-23 20:50:50 +00:00
7c98f1732e copilot: Decouple authentication from the lifetime of any single Copilot instance (#47473)
Users had trouble signing in due to us relying on the Copilot::global
being set, which was never the case. We've decided to use a dedicated
LSP instance just for handling auth of Copilot Chat and other goodies.
That instance is subscribed to by local Copilot instances for projects.
When the Auth instance changes it's state, local instances are prompted
to re-check their own sign in status.

Closes #47352

Co-authored-by: dino <dinojoaocosta@gmail.com>

Release Notes:

- Fixed authentication issues with Copilot.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-01-23 17:20:16 +01:00
Oleksiy Syvokon 9a97c5c3db ep: Add a prompt with git-style merge markers (#47215)
Release Notes:

- N/A
2026-01-20 13:33:43 +00:00
Max Brunsfeld 50a90d35b2 Add a 'rejected patch' field to example specs, for DPO examples (#47043)
The `capture example` action now populates the markdown file with a noop
"Rejected Patch", so that you can easily specify the good and bad
output.

Release Notes:

- N/A
2026-01-18 20:25:23 -08:00
afaccf9c67 Fix edit history clearing bug in ep (#47017)
We were including changes due to Buffer.reload in the edit history.

Release Notes:

- N/A

---------

Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-01-16 15:44:38 -08:00
Ben Kunkle d1e4ef09ee Fix not sending file_chunks parameter to Sweep in evals (#46999)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-01-16 11:56:33 -05:00
Ben Kunkle 73458a074c Fix context enabled race condition in edit prediction cli (#46997)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-01-16 15:55:39 +00:00
Max Brunsfeld 780a87dd98 Introduce new predict_edits/v3 endpoint (#46960)
Release Notes:

- N/A
2026-01-16 02:16:34 +00:00
3ce386a118 ep: Add 180 token editable region experiment (#46945)
Release Notes:

- N/A

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
2026-01-15 17:46:22 -03:00
Lukas Wirth 3d0222a5af remote: Support opening builtin host files in remote workspaces on wsl (#46910)
Release Notes:

- Opening bundled files, keymap, and local release notes now opens in
remote windows instead of opening a new local zed window
- Opening the settings files, keymap files, task files, debug files and
logs will now open within wsl windows instead of opening a new local zed
window
2026-01-15 15:21:57 +00:00
Max BrunsfeldandAgus Zubiaga 445c95aa3c Fix issues processing captured edit prediction examples (#46773)
Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2026-01-14 14:32:42 -08:00
Max BrunsfeldandAgus Zubiaga 14e05ccb78 Allow passing custom access token to zeta2 models via env var (#46830)
Release Notes:

- N/A

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2026-01-14 12:37:51 -08:00
Piotr Osiewicz ca23fa7c7c copilot: Un-globalify copilot + handle it more directly with EditPredictionStore (#46618)
- **copilot: Fix double lease panic when signing out**
- **Extract copilot_chat into a separate crate**
- **Do not use re-exports from copilot**
- **Use new SignIn API**
- **Extract copilot_ui out of copilot**

Closes #7501

Release Notes:

- Fixed Copilot providing suggestions from different Zed windows.
- Copilot edit predictions now support jumping to unresolved
diagnostics.
2026-01-14 14:44:13 +00:00
20284e4f21 Introduce zeta2 format with cursor content in original order (#46732)
This one does `fim_prefix`, `fim_middle`, and `fim_suffix` in that
order, in the prompt, instead of putting the current middle last.

Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Ben Kunkle <ben@zed.dev>
2026-01-13 21:53:44 +00:00
Max BrunsfeldandBen Kunkle d67c8f2884 Prevent stale related excerpts by avoiding storing their contents as strings (#46666)
This fixes an issue that we noticed in particular with Mercury edit
predictions.

* [x] fix storage to not go stale
* [x] exclude excerpts that intersect the cursor excerpt
* [x] see if string representation of excerpts can be cached, to avoid
rebuilding it on every prediction

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
2026-01-13 13:31:23 -08:00
Agus Zubiaga 79c69dc622 ep: Fix raw request shape (#46711)
Release Notes:

- N/A
2026-01-13 15:27:31 +00:00
Max Brunsfeld 6b1eb25370 Fix a missing newline in the zeta prompt (#46677)
Release Notes:

- N/A
2026-01-12 23:27:06 -08:00
Agus ZubiagaandMax Brunsfeld 90ec58836e ep: Use FIM-like prompt for zeta2 (#46657)
Release Notes:

- N/A

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2026-01-13 00:16:24 +00:00
7853589033 ep: Use non-chat completions for /predict/raw (#46633)
Release Notes:

- N/A

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
2026-01-12 17:42:50 +00:00
Oleksiy SyvokonandAgus Zubiaga cbb6e2f563 ep: Fix applying patch to text without a trailing newline (#46471)
Release Notes:

- N/A

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2026-01-12 14:59:25 +00:00
Max Brunsfeld 0afe91ff24 Prepopulate empty patch in example capture (#46480)
This makes it a smoother workflow to capture an edit prediction example
from Zed and then write what you'd expect the patch to be.

Release Notes:

- N/A
2026-01-09 13:58:07 -08:00
Oleksiy SyvokonandAgus Zubiaga e6467fc47a ep: Fix editable region for teacher models (#46459)
Editable region was different for Zeta2 and Teacher, leading to "Edits
outside of editable region" errors.

Release Notes:

- N/A

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2026-01-09 16:01:19 +00:00
0f75c079a5 Edit prediction: teacher prompt improvements (#46392)
Release Notes:

- N/A

---------

Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Ben Kunkle <ben@zed.dev>
2026-01-08 22:12:32 +00:00
Agus ZubiagaandBen Kunkle 23f571d64c ep: Enable workspace test-support (#46395)
Some code got added to `workspace` that prevents us from running tests
for the `edit_prediction(cli)` crates specifically without the
`test-support` feature flag.

Release Notes:

- N/A

Co-authored-by: Ben Kunkle <ben@zed.dev>
2026-01-08 18:30:07 -03:00
Oleksiy Syvokon a87d4c84c9 ep: Allow matching patches against files without trailing newlines (#46357)
A proper fix would be to add `\No trailing newline` marker and handle
it. For now, we do a simpler workaround

Release Notes:

- N/A
2026-01-08 11:54:26 +00:00
Agus Zubiaga 42af91ddee ep cli: Resume from output file (#46293) 2026-01-07 21:50:46 -03:00
Ben Kunkle 6758732a4f mercury: Fix spurious newline removal (#46289)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-01-07 21:10:07 +00:00
Mikayla MakiandClaude Opus 4.5 97c35c084b gpui: Actually remove the Result from AsyncApp (#45809)
Depends on: https://github.com/zed-industries/zed/pull/45768

Refactor plan:
https://gist.github.com/mikayla-maki/6c4bf263fd80050715ba01f45478796e
Overall plan:
https://gist.github.com/mikayla-maki/7bb5078e4385a2e683e1e1eb40d17d38

This is the big one.

Release Notes:

- N/A

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 12:48:24 -08:00
Oleksiy SyvokonandAgus Zubiaga 76fed22668 ep: Add file deletion support in unified diff parsing (#46279)
- Replace `is_new_file: bool` with `FileStatus` enum
(Created/Modified/Deleted) in udiff.rs to properly track file status
through diff operations
- Handle deleted files in `apply_diff` by calling
`project.delete_file()`
- Fix diff serialization in reorder_patch.rs to output `+++ /dev/null`
for file deletions and parse both `--- /dev/null` and `+++ /dev/null`
correctly
- Add bounds check for edit ranges exceeding buffer length

Also includes edit_prediction_cli improvements:
- Track `context_range` and `editable_range` in ExampleBuffer for more
precise prompt formatting
- Export MAX_CONTEXT_TOKENS and MAX_REWRITE_TOKENS from zeta2
- Wait for buffer parsing before computing ranges
- Respect NO_COLOR env var and enable info-level logging


Release Notes:

- N/A

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2026-01-07 18:54:22 +00:00
Agus Zubiaga f119b978f5 ep cli: Make the udiff parsing more resilient (#46264)
We will now properly handle `\ No newline at the end of file` after
context lines and repeated occurrences. Also, when line numbers are
present in hunk headers, we will use them to disambiguate the location
when the context is not unique enough.

Release Notes:

- N/A
2026-01-07 15:14:17 +00:00
Ben Kunkle 7fa65ea5b1 Add action tracking to enable token healing for Sweep (#46212)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-01-07 09:58:24 -05:00
Agus Zubiaga 134c5e6bf9 ep cli: Handle opening buffers from files created by the edit history (#46254)
Since we don't persist new files to disk, they don't have entries, so we
have to look them up in memory first.

Release Notes:

- N/A
2026-01-07 13:52:42 +00:00
Max Brunsfeld 67e2a23cba Fix coalescing of multi-line edits (#46220)
I was seeing some surprising un-coalesced edits in the edit history when
looking at captured examples. I realized that we were only coalescing
based on the *ends* of edit ranges, but I think we want to combine hunks
where there are 8 or less unchanged lines in between changes. This PR
implements that.

Release Notes:

- N/A
2026-01-07 02:04:43 +00:00
Max Brunsfeld ff73a91e63 Make all paths relative in captured EP examples (#46213)
I also added debug events for Sweep edit predictions so that we can see
the API response for "no prediction" events when running evals.

Release Notes:

- N/A
2026-01-06 17:27:57 -08:00
Ben Kunkle f3c02086e4 Add sweep acceptance tracking (#46199)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-01-06 17:20:25 -05:00
Max Brunsfeld 8ca638150a Fix some issues with edit prediction CLI (#46197)
* Added `--repo` and `--name` flags for running only examples with a
specific name, or repo (substring matching)
* Fixed a race condition that caused hangs when running multiple
examples at the same repo and sha
* Fixed a bug where scoring was completely wrong because I had passed
the arguments to `apply_diff_to_string` in the wrong order
* The current evals now run quickly and without errors.

Release Notes:

- N/A
2026-01-06 14:11:19 -08:00
Agus Zubiaga 6070b30524 ep cli: Create entries from new files in edit history (#46196)
Release Notes:

- N/A
2026-01-06 18:56:55 -03:00
Agus Zubiaga 5be7d6f641 ep cli: Refresh cursor path entry (#46195)
Release Notes:

- N/A
2026-01-06 21:41:58 +00:00
114bc699a8 ep: Support both full paths and relative paths in examples (#46177)
Release Notes:

- N/A

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
2026-01-06 15:14:36 -03:00
61175fceb6 ep: Always collect for staff (#46176)
Release Notes:

- N/A

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
2026-01-06 15:14:20 -03:00
Oleksiy SyvokonandAgus Zubiaga efeea7973e Edit prediction changes (#46169)
1. Handle diffs with no trailing new lines 
2. ep: Don't assume workdir name in edit history paths
3. Fix `imitate_human_edits()` for pure insertions

Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2026-01-06 16:49:26 +00:00
Oleksiy Syvokon 92b0f144c0 Changes to make ep split-commits work (#46160)
1. `apply_diff` will create a file if the diff says so (by starting with
`--- /dev/null`)
2. Update examples format to match recent changes
3. `ep split-commits` can work with a stream of inputs and generate `n`
samples per input
4. Unicode handling fixes

Release Notes:

- N/A
2026-01-06 14:38:44 +00:00
Ben Kunkle 93c447e874 zeta2: Fix double lease panic in event capture (#46096)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-01-05 18:51:00 +00:00
Max Brunsfeld 0549689eee Improve collection of edit prediction examples (#46010)
Release Notes:

- N/A
2026-01-04 21:53:02 +00:00
Max Brunsfeld 9a79cb8ba1 Improve support for collecting edit prediction training and eval examples (#45914)
* Fix some bugs in capture of EP examples from running app
* Tweak markdown format for EP examples
    * Store repo and revision in TOML front matter
    * Represent cursor position using a comment line
* Allow multiple expected patches in evals
* Remove line-based scoring criteria for evals
* Add a `synthesize` subcommand to the EP cli that generates examples
from git commits

Release Notes:

- N/A
2026-01-03 16:08:35 -08:00
Max Brunsfeld 07ada58466 Improve edit prediction example capture (#45536)
This PR improves the `edit prediction: Capture Example` in several ways:
* fixed bugs in how the uncommitted diff was calculated
* added a `edit_predictions.examples_dir` setting that can be set in
order to have the action automatically save examples into the given
folder
* moved the action into the `edit_predictions` crate, in preparation for
collecting this data passively from end users, when they have opted in
to data sharing, similar to what we did for Zeta 1

Release Notes:

- N/A
2025-12-22 20:40:02 +00:00