Commit graph

28047 commits

Author SHA1 Message Date
Richard Feldman
49887d6934
Add no_tools_enabled eval (#30537)
This is our first eval of the Minimal tool profile. Right now they're
all passing; the value of having it is to catch regressions in the
system prompt (which has special logic in it for the case where no tools
are enabled).

Release Notes:

- N/A
2025-05-12 08:52:03 +00:00
Shardul Vaidya
d867897746
bedrock: Support cross-region inference for US Claude 3.5 Haiku (#28523)
Release Notes:

- Added Cross-Region inference support for US Claude 3.5 Haiku

Co-authored-by: Peter Tripp <peter@zed.dev>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-05-12 08:41:45 +00:00
Shardul Vaidya
1f58ce80f2
bedrock: Support Amazon Nova Premier (#29720)
Release Notes:

- Bedrock: Added support for Amazon Nova Premier.


https://aws.amazon.com/blogs/aws/amazon-nova-premier-our-most-capable-model-for-complex-tasks-and-teacher-for-model-distillation/

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-05-12 08:15:18 +00:00
Chris Kelly
ed772e6baf
agent: Allow to collapse provider sections in the settings view (#30437)
This is my first time contributing, so happy to make changes as needed.

## Problem

I found the LLM Provider settings to be pretty difficult to scan as I
was looking to enter my API credentials for a provider. Because all of
the provider configuration is exposed by default, providers that come at
the end of the list are pushed fairly far down and require scrolling. As
this list increases the problem only get worse.

## Solution

This is strictly a UI change.

* I put each provider configuration in a Disclosure that is closed by
default. This made scanning for my provider easy, and exposing the
configuration takes a single click. No scrolling is required to see all
providers on my 956px high laptop screen.
* I also added the success checkmark to authenticated providers to make
it even easier to find them to update a key or sign out.
* The `Start New Thread` had a class applied that was overriding the
default hover behavior of other buttons, so I removed it.

## Before
![CleanShot 2025-05-09 at 14 06
04@2x](https://github.com/user-attachments/assets/48d1e7ea-0dc8-4adc-845c-5227ec965130)

## After
![CleanShot 2025-05-09 at 14 33
23](https://github.com/user-attachments/assets/67e842a7-3251-46e5-ab18-7c4e600b84d8)

Release Notes:

- Improved Agent Panel settings view scannability by making each
provider block collapsible by default.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-05-12 05:07:30 -03:00
Shardul Vaidya
559725d8f5
bedrock: Support Writer Palmyra models (#29719)
Release Notes:

- Added support for Writer Palmyra X4, and X5


https://writer.com/engineering/long-context-palmyra-x5/

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-05-12 07:54:09 +00:00
Agus Zubiaga
f0da3b74f8
agent: Handle thread title generation errors (#30273)
The title of a (text) thread would get stuck in "Loading Summary..."
when the request to generate it failed. We now handle this case by
falling back to the default title, and letting the user manually edit
the title or retry generating it.



https://github.com/user-attachments/assets/898d26ad-d31f-4b62-9b05-519d923b1b22



Release Notes:

- agent: Handle thread title generation errors

---------

Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2025-05-12 07:45:48 +00:00
Sergei Kartsev
cee9f4b013
Fix deprecation warning text being covered by right dock (#30456)
Closes [#30378](https://github.com/zed-industries/zed/issues/30378)

Release Notes:

- Fixed deprecation warning text being covered by right dock

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2025-05-12 03:24:21 +05:30
Sergei Kartsev
ae31aa2759
Fix apply buffer font features to completion tooltip (#30362) (#30519)
Closes #30362

Release Notes:

- Fixed completion tooltip to respect custom font features set in
`buffer_font_features`
2025-05-11 19:45:41 +00:00
Finn Evers
82a7aca5a6
ui: Account for padding of parent container during scrollbar layout (#27402)
Closes https://github.com/zed-industries/zed/issues/23386

This PR updates the scrollbar-component to account for padding present
in the parent container.

Since the linked issue was opened,
https://github.com/zed-industries/zed/pull/25288 improved the behaviour
so that the scrollbar does allow scrolling the entire container, however
the scrollbar thumb still does not go the entire way to the bottom. This
can be seen here:


https://github.com/user-attachments/assets/89204355-e6b8-428b-9fa9-bb614051b6fa

This happens because during layouting of the scrollbar, padding of the
parent container is not taken into account. The scrollbar thumb size is
calculated as if no padding was present.

With this change, padding is now included in the calculation, which
resolves the issue:


https://github.com/user-attachments/assets/1d4c62e0-4555-4332-a9ab-4e114684b4b3

The change here is to store the calculated content size during prepaint
_including_ padding and use this for layouting the scrollbar. This
ensures that the actual scroll max and the content size are always in
sync. Furthermore, the existing `TODO`-comment is also resolved, as we
now no longer look at the size of the last child but the actual parent
size instead.

This also removes an existing panic of the scrollbar-component in cases
where the content size was 0, which was previously not accounted for
(this never happened in practice so far, for example because of the
padding added here:

43712285bf/crates/editor/src/hover_popover.rs (L802-L809)
which prevented the container size from ever being 0).

---

Lastly, as I was wiring through the changes of the `content_size` I
noticed that some code was duplicated during the initial layouting as
well as in the click handlers. I refactored this in the second commit to
use `along` where possible as well as computing the new click offset in
one closure which can be passed to both event listeners. As always,
should any of these changes not be wanted, feel free to let me know and
I will revert these.

Looking forward to your feedback 😄 

Release Notes:

- Fixed scrollbars sometimes not scrolling all the way to the bottom.
2025-05-11 21:40:45 +02:00
tidely
b34f19a46f
agent: Reduce allocations (#30220)
Just a tiny patch to reduce allocations during context loading

Calling `.cloned()` on an iterator clones each element one by one, while
`into_iter().collect()` pre-allocates the resulting `Vec`

Release Notes:

- N/A
2025-05-11 16:14:17 +00:00
Finn Evers
09ace088ac
editor: Prevent vertical scrollbar from overlapping with buffer headers (#30477)
Closes #16993

This PR fixes an issue where the vertical editor scrollbar was
overlaying with buffer headers. I fixed this by reserving space for the
scrollbar as needed which is provided by the recently introduced
`right_margin`.

Most of the diff consists of moving the `EditorMargins` creation out of
`render_block`, as the right margin is stored in this struct and moving
this out reduces the length of the parameter list of `render_blocks` by
one. I thought of this to be a small but nice side effect.

When it comes to the dividers, I decided against these considering the
margin as well, since it felt a bit off. However, I can see arguments
for these also considering the margins. I did include an image for
comparison in the list below. Happy to change this should it be
preferred the other way around.

| `main` |
![main](https://github.com/user-attachments/assets/1148a553-cf66-4ef7-b81a-9595e9b42308)
|
| --- | --- |
| PR |
![PR](https://github.com/user-attachments/assets/811c8385-0596-427f-8d09-f800cc8d7285)
|
| Fix with shortened divider |
![pr_line_shortened](https://github.com/user-attachments/assets/9938e27f-17a5-460f-99cf-47d1fab234ed)
|

Release Notes:

- Ensured that the vertical editor scrollbar no longer overlaps with
buffer headers.
2025-05-11 17:54:57 +02:00
Max Nordlund
49ba4ed49c
Only include diagnostic instruction once (#29975)
Instead of once per diagnostic error.

Release Notes:

- N/A
2025-05-11 17:33:49 +02:00
Bennet Bo Fenner
06af0310f7
markdown: Fix out of range panic in parser (#30510)
For some reason `pulldown_cmark` treats \````` as a codeblock, meaning
that we could end up with an invalid range generated from
`extract_code_block_content_range` (`3..2`)

Closes #30495

Release Notes:

- agent: Fix an edge case where the editor would crash when model
generated malformed markdown
2025-05-11 15:08:37 +00:00
Michael Sloan
1fa19c69a6
Agent panel: Zoom support (workspace::ToggleZoom) (#30504)
Release Notes:

- Added support for zooming the agent panel via `workspace::ToggleZoom`.
2025-05-11 13:08:55 +00:00
Piotr Osiewicz
5ba1d3edec
chore: Move component_preview into zed (#30480)
This improves our build times by ~0.2s

Closes #ISSUE

Release Notes:

- N/A
2025-05-10 22:25:35 +00:00
Jens Krause
e4525b80f8
docs: Suggest checking zed_extension_api compatibility (#30474)
Or your extension might not work as expected. Or you have to downgrade
`zed_extension_api` later. Happened
[here](https://github.com/sectore/zed-just-ls/issues/2) or
[here](842b0cdb69)
recently.

Release Notes:

- N/A
2025-05-10 17:07:00 -04:00
Marshall Bowers
18a2a50227
title_bar: Hide plans without a subscription period (#30478)
This PR updates the plan display in the user menu in the title bar to
hide plans that do not have a subscription period.

Release Notes:

- Improved the displaying of the plan in the user menu.
2025-05-10 20:52:38 +00:00
Smit Barmase
172a475515
editor: Fix multicursor indent edge case where few lines would indent incorrectly (#30461)
This should have been part of [editor: Fix inconsistent relative indent
when using tab with multi
cursors](https://github.com/zed-industries/zed/pull/29519)

Before / After:


https://github.com/user-attachments/assets/b7ab0eef-2764-44dc-b51f-b96dccd5ecb3

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>
2025-05-10 18:43:15 +05:30
Kirill Bulatov
471e02d48f
Separate timeout and connection dropped errors out (#30457) 2025-05-10 15:12:58 +03:00
Danilo Leal
39da72161f
agent: Make terminal command render with Markdown in the tool card (#30430)
Closes https://github.com/zed-industries/zed/issues/30411

Rendering as markdown gives us text selection and copying for free. In
the future, we may want to explore having these commands be actual
editors, allowing you to step in, change the command, and re-run it
right from there.

Release Notes:

- agent: Made the terminal command in the tool card selectable and
copyable.
2025-05-09 21:53:11 -03:00
Marshall Bowers
daa777440d
collab: Push down plan changes to the client (#30447)
This PR makes it so we push down plan updates from the server when the
user's subscription changes.

Release Notes:

- N/A
2025-05-10 00:08:48 +00:00
Piotr Osiewicz
79ba22673b
debugger: Fix removal of running sessions when spawning a debug session (#30384)
Fixed regression introduced in
https://github.com/zed-industries/zed/pull/29646/files#diff-85cbb0a26f1949431ec63870fc2d52b583227a5a00b6e10b64dcdb7fe7ef13afL314

Release Notes:

- N/A
2025-05-09 22:52:43 +00:00
Marshall Bowers
074e78301a
docs: Update docs for viewing subscription invoices (#30443)
This PR updates the docs for how to access the invoice history for your
account.

Release Notes:

- N/A
2025-05-09 22:51:56 +00:00
Marshall Bowers
fbeee1f832
zeta: Update onboarding modal with subscription info (#30439)
This PR updates the edit prediction onboarding modal with steps about
subscribing to a plan.

When the user is not subscribed to a plan, we display a link to the
account page to sign up for one:

<img width="612" alt="Screenshot 2025-05-09 at 6 04 05 PM"
src="https://github.com/user-attachments/assets/0300194a-c419-43d9-8214-080674d31e12"
/>

If the user is already subscribed to a plan we indicate which plan they
are on and how many edit predictions they get with it:

<img width="616" alt="Screenshot 2025-05-09 at 6 03 16 PM"
src="https://github.com/user-attachments/assets/e2506096-e499-41f2-ba1f-fca768cb48b9"
/>

<img width="595" alt="Screenshot 2025-05-09 at 5 46 18 PM"
src="https://github.com/user-attachments/assets/de82f8c2-cad8-45fb-8988-26606a8dc3e1"
/>

Release Notes:

- N/A
2025-05-09 22:46:10 +00:00
Marshall Bowers
bff259731f
docs: Redirect docs/ai to docs/ai/overview (#30442)
This PR adds a redirect from `zed.dev/docs/ai` to
`zed.dev/docs/ai/overview`.

Not 100% sure this will work, but want to give it a try.

Release Notes:

- N/A
2025-05-09 22:36:25 +00:00
Marshall Bowers
6c5b9b43c1
zeta: Factor out render_data_collection_explanation (#30438)
This PR factors out a `render_data_collection_explanation` method in the
`ZedPredictModal`.

This allows `rustfmt` to work inside of `render` once again.

Release Notes:

- N/A
2025-05-09 22:12:41 +00:00
Marshall Bowers
f29c6e5661
Update zed_llm_client to v0.8.1 (#30433)
This PR updates the `zed_llm_client` crate to v0.8.1.

The name of `Plan::Free` changed to `Plan::ZedFree` in this version.

Release Notes:

- N/A
2025-05-09 21:08:03 +00:00
Cole Miller
000077facf
agent: Fix reinsertion of creases when editing past messages (#30417)
Just noticed this got lost when main was merged in #29828.

Release Notes:

- agent: Fixed the rendering of added context when editing past messages
in a thread.
2025-05-09 20:53:30 +00:00
peppidesu
2b249f9e68
Add support for setting font features on Linux (#27808)
Fixes #15752.
- Updated `cosmic_text` to 0.14.0
- Made a basic implementation for setting font features.

#12176 is not fixed by this PR.

Release Notes:

- Added initial support for `font_features` on Linux
2025-05-09 16:36:11 -04:00
Marshall Bowers
e13ecc07bc
assistant_context_editor: Register ContextEditor actions that were lost (#30428)
This PR restores the `ContextEditor` actions that were lost in
https://github.com/zed-industries/zed/pull/30168.

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

Release Notes:

- agent: Added back some missing actions, including `assistant: quote
selection`.
2025-05-09 19:59:44 +00:00
Smit Barmase
bef25c7290
git_ui: Fix co-author tooltip message (#30426)
It should show "Remove co-authored-by" when hovering on co-author is
already added state. And should say
"Add co-authored-by" when it is at disabled state.

Release Notes:

- N/A

Co-authored-by: Ben Kunkle <ben@zed.dev>
2025-05-09 15:50:25 -04:00
Max Brunsfeld
65b13968a2
Wait to locate system-installed Node until the shell environment is loaded (#30416)
Release Notes:

- Fixed a race condition that sometimes prevented a system-installed
`node` binary from being detected.
- Fixed a bug where the `node.path` setting was not respected when
invoking npm.
2025-05-09 19:24:28 +00:00
Danilo Leal
9afc6f6f5c
agent: Fix layout shift due to the "Generating" label (#30422)
Closes https://github.com/zed-industries/zed/issues/30238

Release Notes:

- agent: Fixed layout shift happening in the toolbar (both in the
singleton and multibuffers) due to the "Generating" label that appeared
while the agent is still generating a response.
2025-05-09 16:20:14 -03:00
Agus Zubiaga
82d271cb5b
agent: Thread history update improvements (#30415)
- Try to preserve previously selected item on update
- Do not clear list items while updating to avoid a frame with no items
rendered

Release Notes:

- agent: Preserve previously selected item in Thread History on update

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2025-05-09 16:13:50 -03:00
Marshall Bowers
77ad6d7fbb
zeta: Restore ZED_PREDICT_EDITS_URL environment variable (#30418)
This PR restores the `ZED_PREDICT_EDITS_URL` that was removed in
https://github.com/zed-industries/zed/pull/30290.

While we don't need to use it anymore for local development against the
LLM Worker, some folks reported using it to run versions of Zeta hosted
elsewhere.

Since we don't yet have an officially-supported mechanism today for
bringing your own Zeta for edit predictions, I'm putting the environment
variable back to not break that use case.

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

Release Notes:

- N/A
2025-05-09 18:54:59 +00:00
Cole Miller
d6ab416168
Revert "Load Profile state from Thread and tie visibility to the thread's model" (#30413)
This reverts commit 3615d6d96c.

Ultimately, we want to restore the ability to store a profile
per-thread, but for now reverting this fixes a fairly disruptive bug.

Release Notes:

- Fixed a bug causing the agent to use the wrong profile in some cases.
2025-05-09 14:09:38 -04:00
Marshall Bowers
8f07135201
collab: Don't require payment method to subscribe to Zed Free (#30398)
This PR makes it so we don't require a payment method to subscribe to
the Zed Free plan.

Release Notes:

- N/A
2025-05-09 17:11:37 +00:00
Ben Brandt
1dfddf0a29
agent: write latest profile change to default setting (#30408)
Reverts back to previous behavior where we update your settings so we
can load a new thread from your last configuration.

Release Notes:

- agent: Persist profile changes for new threads
2025-05-09 17:09:19 +00:00
Marshall Bowers
cf8f003916
collab: Improve error message when requesting an LLM token without a subscription (#30405)
This PR improves the error message when trying to obtain an LLM token
without a subscription:

<img width="411" alt="Screenshot 2025-05-09 at 12 30 41 PM"
src="https://github.com/user-attachments/assets/c53326ba-4a99-4d9c-88ba-674e520f941f"
/>

Release Notes:

- N/A
2025-05-09 16:51:41 +00:00
Danilo Leal
00292450e0
agent: Show delete thread icon buttons on hover/focus (#30370)
This PR's main goal is to show the delete thread button when the list
item is either focused or hovered. In order to do that, we ended up
refactoring (i.e., merging) the `PastThread` and `PastContext` elements
into a single `HistoryElementEntry` that already matches to the entry
type (i.e., context or thread).

Release Notes:

- agent: Simplify the UI by showing the delete thread icon button only
on hover or focus.

---------

Co-authored-by: Agus Zubiaga <hi@aguz.me>
2025-05-09 12:55:40 -03:00
Ben Kunkle
49c01c60b7
askpass: Remove attempt to surface friendly error if zed exe path is not executable before use in askpass script (#30396)
Closes #29819

Release Notes:

- Removed a faulty check in the askpass implementation causing
unintended "Failed to check metadata of Zed executable path for use in
askpass" errors when remoting via SSH or doing git operations that
require authentication.
2025-05-09 15:37:19 +00:00
Michael Sloan
863d7ccb6d
Fix agent panel scroll while editing a past message (#30394)
This is similar to the `block_mouse_down` method added in #20649 (which
has a very similar motivation), but is more comprehensive in stopping
mouse events. Since I want to cherry-pick this to the releases, keeping
this change just to the agent panel. In a follow-up will replace
existing use of `block_mouse_down` to instead use this.

Release Notes:

- N/A
2025-05-09 15:33:33 +00:00
Marshall Bowers
d270f6b953
collab: Require subscription_period in LLM token claims (#30392)
This PR makes the `subscription_period` field in the LLM token claims
required.

Release Notes:

- N/A
2025-05-09 15:20:14 +00:00
Michael Sloan
08f516ce9a
Misc improvement of code for agent markdown codeblock (#30388)
Release Notes:

- N/A
2025-05-09 14:48:24 +00:00
Cole Miller
9cff5cfe3a
agent: Keyboard navigation improvements (#30274)
- Fix `ctrl-p` not working in the model selector
- Select first entry when opening the context picker

Release Notes:

- Fixed `menu::SelectPrevious` keybindings not working in the agent
panel's model selector.
2025-05-09 13:52:06 +00:00
Michael Sloan
0abee5668a
Fix text overlap with markdown code block in list in agent response (#30377)
Seems that `h_full` was causing it to use the height of the overall list
item for some reason.

Closes #30002 

Release Notes:

- Agent Panel: Fixed text overlap for code blocks nested in lists in
agent response.
2025-05-09 12:48:16 +00:00
Michael Sloan
c58b6903b8
Remove unnecessary use of MarkdownElementBuilder::flush_text (#30376)
The next statement calls `modify_current_div` which immediately does
`flush_text`.

Release Notes:

- N/A
2025-05-09 12:35:06 +00:00
Tristan Hume
11b6ce46e2
Add ability to keybind search filter (#30327)
Useful for large monorepos with many subdirectories, users can keybind a
filter to their commonly used directories.

Release Notes:

- Added a new `included_files` field to the `DeploySearch` action to
automatically pre-fill which files to include in the search. This lets
you use a keybinding to search in a particular folder or for a certain
set of files.

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-05-09 12:29:03 +00:00
Michael Sloan
8c8357387e
Use a single Text segment + indoc! in active thread preview (#30373)
Release Notes:

- N/A
2025-05-09 12:27:05 +00:00
Antonio Scandurra
25ced2e3c2
Fix error when Copilot calls tools without arguments (#30371)
Fixes https://github.com/zed-industries/zed/issues/30346

The model can output an empty string to indicate the absence of
arguments, which can't be parsed as a `serde_json::Value`. When that
happens, we now create an empty object instead on behalf of the model.

Release Notes:

- Fixed a bug that prevented Copilot models from calling the
`diagnostic` tool.
2025-05-09 12:14:36 +00:00