Commit graph

27718 commits

Author SHA1 Message Date
Max Brunsfeld
275c808b03
Allow dragging files and tabs into the agent panel (#29959)
Release Notes:

- Added the ability to drag files and tabs onto the new agent panel.

---------

Co-authored-by: Michael Sloan <mgsloan@gmail.com>
2025-05-06 00:21:22 +00:00
Mikayla Maki
b214c9e4a8
Fix profile menu hover flickering due to documentation asides (#29958)
Fixes https://github.com/zed-industries/zed/issues/29909 

🍐'd with @nathansobo 

Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>
2025-05-05 23:05:47 +00:00
Bennet Bo Fenner
2aa06d1d0f
agent: Switch to new web search provider (#29951)
Release Notes:

- N/A
2025-05-06 00:47:11 +02:00
Nate Butler
9568fa1166
Add Zed Pro Trial Upsell (#29938)
This PR adds an upsell to try Zed Pro

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-05-05 18:46:54 -04:00
xdBronch
b4653c15b8
language: Add fallback for enum member completion highlight (#27929)
i tried to use `variant` but it wasnt giving any color despite my theme
definitely having a color for it, am i doing something wrong? i think
`property` is an alright fallback
before:

![image](https://github.com/user-attachments/assets/e020ec4d-3a85-45fb-9ddb-823c55e0afca)
after:

![image](https://github.com/user-attachments/assets/3c335ed6-746e-4136-858a-8b80e5229f29)


Release Notes:

- N/A
2025-05-05 22:25:09 +00:00
Nathan Sobo
4896e0bc02
Allow the agent panel font size to be customized (#29954)
You can set `agent_font_size` as a top-level settings key. You can also
use `zed::IncreaseBufferFontSize` and `zed::DecreaseBufferFontSize` and
`zed::ResetBufferFontSize` the agent panel is focused via the standard
bindings to adjust the agent font size. In the future, it might make
sense to rename these actions to be more general since "buffer" is now a
bit of a misnomer. 🍐'd with @mikayla-maki

Release Notes:

- N/A

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-05-05 16:13:14 -06:00
Noritada Kobayashi
0bf682a0d5
docs: Fix a broken link to the PyRight Settings section (#29283)
This PR fixes a broken link to the PyRight Settings section.
This is a follow-up to 5f390f1bf8.

Release Notes:

- N/A
2025-05-05 18:02:53 -04:00
Max Brunsfeld
3d0c4d716d
Use the same context store for all inline assists in a project (#29953)
Release Notes:

- Made context attachments in inline assist prompts persist across
inline assist invocations.

Co-authored-by: Michael Sloan <mgsloan@gmail.com>
2025-05-05 22:01:02 +00:00
Marshall Bowers
b6c7df8183
inline_completion_button: Show the initial usage data from the server (#29952)
This PR updates the usage indicator for edit predictions to show the
initial usage data returned from the server.

Release Notes:

- N/A
2025-05-05 21:39:49 +00:00
Anthony Eid
1aa92d9928
debugger: Enable setting debug panel dock position to the side (#29914)
### Preview
<img width="301" alt="Screenshot 2025-05-05 at 11 08 43 PM"
src="https://github.com/user-attachments/assets/aa445117-1c1c-4d90-a3bb-049f8417eca4"
/>


Setups the ground work to write debug panel persistence tests and allows
users to change the dock position of the debug panel.


Release Notes:

- N/A
2025-05-05 21:27:20 +00:00
Pavel
6e28400e17
gpui: Fix a bug with Japanese romaji typing in input example (#28507)
Steps to reproduce:
* On macOS, run `input` example
* type `aaa|bbb` place caret on the place marked with |
* switch to `japanese romaji`
* press `ko`
* press left arrow

<img width="412" alt="image"
src="https://github.com/user-attachments/assets/d3c02e9b-98f9-420e-a3b7-681ba90829cd"
/>

You will get `aaa` duplicated with every arrow press.

According to [reference
implementation](https://developer.apple.com/library/archive/samplecode/TextInputView/Listings/FadingTextView_m.html#//apple_ref/doc/uid/DTS40008840-FadingTextView_m-DontLinkElementID_6)
we need to unmark text when we get empty line in `setMarkedText `
2025-05-06 00:15:41 +03:00
Lorenzo Lewis
78545a93ea
gpui: Fix typo in doc comment (#29950)
Fixes a typo in gpui docs

Release Notes:

- N/A
2025-05-05 17:05:48 -04:00
Max Brunsfeld
dd79c29af9
Allow attaching text threads as context (#29947)
Release Notes:

- N/A

---------

Co-authored-by: Michael Sloan <mgsloan@gmail.com>
2025-05-05 13:59:21 -07:00
chbk
7f868a2eff
Improve Rust macro highlighting (#28182)
Release Notes:

  - Improved Rust macro highlighting

| Zed 0.180.2 | With this PR |
| --- | --- |
|
![Image](https://github.com/user-attachments/assets/013c73b1-5eee-45b1-ba37-747563c1bc4b)
|
![Image](https://github.com/user-attachments/assets/57eb97e3-1ccc-4d58-9596-bb3decedc0f4)
|

```rust
macro_rules! square {
  ($e:expr) => { $e * $e };
}
```

- `$var`: `variable`
- `expr`: `type`
2025-05-05 23:50:57 +03:00
Conrad Irwin
6497aa5341
Show request in evaluate selection command (#29621)
Closes #ISSUE

Release Notes:

- N/A
2025-05-05 21:32:00 +01:00
Nathan Sobo
55b908a8bf
Allow agent edits to be accepted/rejected before the end the turn (#29941)
Release Notes:

- N/A
2025-05-05 14:25:34 -06:00
Conrad Irwin
ff215b4f11
debugger: Run build in terminal (#29645)
Currently contains the pre-work of making sessions creatable without a
definition, but still need to change the spawn in terminal
to use the running session

Release Notes:

- N/A

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2025-05-05 20:08:14 +00:00
Cole Miller
c12e6376b8
Terminal tool improvements (#29924)
WIP

- On macOS/Linux, run the command in bash instead of the user's shell
- Try to prevent the agent from running commands that expect interaction

Release Notes:

- Agent Beta: Switched to using `bash` (if available) instead of the
user's shell when calling the terminal tool.
- Agent Beta: Prevented the agent from hanging when trying to run
interactive commands.

---------

Co-authored-by: WeetHet <stas.ale66@gmail.com>
2025-05-05 15:57:03 -04:00
Bennet Bo Fenner
9cb5ffac25
context_store: Refactor state management (#29910)
Because we instantiated `ContextServerManager` both in `agent` and
`assistant-context-editor`, and these two entities track the running MCP
servers separately, we were effectively running every MCP server twice.

This PR moves the `ContextServerManager` into the project crate (now
called `ContextServerStore`). The store can be accessed via a project
instance. This ensures that we only instantiate one `ContextServerStore`
per project.

Also, this PR adds a bunch of tests to ensure that the
`ContextServerStore` behaves correctly (Previously there were none).

Closes #28714
Closes #29530

Release Notes:

- N/A
2025-05-05 21:36:12 +02:00
Oleksiy Syvokon
8199664a5a
agent: Handle attempts to use hallucinated tools (#29946)
This change:

1. Catches attempts to use missing tools. If this happens, we now send
Agent a message listing available tools, after which Agent can
gracefully recover. Prior behavior: thread would stop in a broken state.

Example of a hallucinated call and a message we send back: 

![image](https://github.com/user-attachments/assets/92a8f700-b192-4038-8c7e-0a74ca2e0146)

2. Adds evals for hallucinated tool use and imagined edits
3. Adds ability to configure a profile name in evals.



Release Notes:

- N/A
2025-05-05 19:31:11 +00:00
Danilo Leal
7dfbe0b908
agent: Improve terminal tool card design (#29712)
To-dos:

- [x] Expose the command to defend against cases where that's just super
long
- [x] Tackle the vertical scroll conflict with panel scroll
- [x] Reduce default font-size

Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Agus Zubiaga <hi@aguz.me>
2025-05-05 18:50:53 +00:00
Nate Butler
e64f5ff358
agent: Load usage eagerly (#29937)
Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-05-05 14:42:21 -04:00
Marshall Bowers
181cd6294f
collab: Pass down staff usage in UpdatePlan message (#29939)
This PR fixes an issue where we weren't correctly passing down usage
information in the `UpdatePlan` message for Zed staff.

Release Notes:

- N/A
2025-05-05 18:02:54 +00:00
tidely
769ec59162
ollama: Add tool call support (#29563)
The goal of this PR is to support tool calls using ollama. A lot of the
serialization work was done in
https://github.com/zed-industries/zed/pull/15803 however the abstraction
over language models always disables tools.

## Changelog:

- Use `serde_json::Value` inside `OllamaFunctionCall` just as it's used
in `OllamaFunctionCall`. This fixes deserialization of ollama tool
calls.
- Added deserialization tests using json from official ollama api docs.
- Fetch model capabilities during model enumeration from ollama provider
- Added `supports_tools` setting to manually configure if a model
supports tools

## TODO:

- [x] Fix tool call serialization/deserialization
- [x] Fetch model capabilities from ollama api
- [x] Add tests for parsing model capabilities 
- [ ] Documentation for `supports_tools` field for ollama language model
config
- [ ] Convert between generic language model types
- [x] Pass tools to ollama

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2025-05-05 17:52:23 +00:00
Nathan Sobo
e9616259d0
Rename Manual profile to Minimal (#29852)
Completely subjective, but I just like it better.

Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-05-05 11:48:26 -06:00
Michael Sloan
7164124512
agent panel: Bring back search within text threads (#29934)
Release Notes:

- N/A
2025-05-05 16:26:43 +00:00
Kirill Bulatov
76c0eded0d
Add more documentation about ways to configure language servers and rust-analyzer (#29932)
Release Notes:

- N/A
2025-05-05 16:10:10 +00:00
AidanV
c56a1cf2b1
vim: Fix r enter indentation (#29838)
Release Notes:

- `r enter` now maintains indentation, matching vim

Useful info for this implementation can be found here:

c3f48e3a76/src/normal.c (L4865)
2025-05-05 16:57:32 +01:00
Richard Feldman
4b9b908233
Delete obsolete find_replace_tool description (#29928)
The tool has been deleted, but the description remained.

Release Notes:

- N/A
2025-05-05 11:56:13 -04:00
Marshall Bowers
10bdf39497
collab: Pass down billing information in UpdatePlan message (#29929)
This PR updates the `UpdatePlan` message to include some additional
information about the user's billing subscription usage.

Release Notes:

- N/A
2025-05-05 11:48:31 -04:00
Smit Barmase
07b4480396
editor: Handle more completions sort cases in Rust and Python (#29926)
Closes #29725

Adds 3 more tests for Rust `into` and `await` cases, and Python
`__init__` case. Tweaks sort logic to accommodate them.

Release Notes:

- Improved code completion sort order, handling more cases with Rust and
Python.
2025-05-05 20:48:52 +05:30
Antonio Scandurra
b0414df921
Simplify setting font size for EditToolCard (#29925)
Release Notes:

- N/A
2025-05-05 15:04:00 +00:00
Bennet Bo Fenner
0246ec2dab
agent: Tweak MCP server configuration dialog (#29878)
Tweaks the MCP configuration dialog a bit:
- Increase width of popover
- Disable soft 
- Clear errors when hitting confirm

Release Notes:

- N/A
2025-05-05 16:31:04 +02:00
Nate Butler
a72ade8762
Show prompt usage in agent overflow menu (#29922)
This PR adds prompt usage information, and easy access to managing your
account, to the agent overflow menu:

![CleanShot 2025-05-05 at 10 04
20@2x](https://github.com/user-attachments/assets/337a1a0b-6f71-49a0-9fe7-4fbf2ec1fc27)

Currently this UI will only show after making a request. We'll work on
eagerly getting the usage info later.

Release Notes:

- Added current prompt usage information to the agent menu (`...`) for
Zed AI users
2025-05-05 14:22:36 +00:00
Dan Bornstein
1c44cabaea
bash: Fix bracket autoclose behavior (#29817)
Add `autoclose_before` configuration for Bash.

Closes #23627

Release Notes:

- Bash: Improved bracket autoclose behavior.
2025-05-05 10:02:27 -04:00
Antonio Scandurra
5674b5cd4d
Don't show deleted hunks when agent overwrites file (#29918)
Release Notes:

- Improved display of diffs when the agent rewrites a file from scratch.
2025-05-05 13:13:36 +00:00
Smit Barmase
4a7b3aa4b8
zed: Fix migration message sometimes showing up on other tabs (#29917)
<img width="1178" alt="image"
src="https://github.com/user-attachments/assets/6b76fe7d-0621-4d61-936e-bfe4f72cc614"
/>


Release Notes:

- Fixed an issue where the keymap/settings migration message sometimes
showing up on tabs other than `settings.json` and `keymap.json`.
2025-05-05 18:13:26 +05:30
Cole Miller
c765da1c82
lsp: Don't log oneshot channel errors from notify (#29857)
This is kind of noisy and not very informative.

Release Notes:

- N/A
2025-05-05 08:21:45 -04:00
Cole Miller
b404024c7a
Get terminal tool working in evals (#29831)
Bypass our terminal subsystem and just run a shell in a pty.

- [x] make sure we use the same working directory
- [x] strip control chars from the pty output (?)
- [x] tests

Release Notes:

- N/A
2025-05-05 08:07:43 -04:00
Ben Brandt
ce053c9bff
Stop generating in the Agent panel when the user edits a previous message (#29915)
Otherwise the panel keeps scrolling as the new token comes in and it is
almost impossible to keep the scroll position in the right place.

Also, if the user is editing, it is likely that the current generated
tokens will need to be regenerated anyway, so we may as well stop the
current progress.

Release Notes:

- Agent Beta: Stop generating tokens if previous messages are edited.
2025-05-05 14:06:02 +02:00
Umesh Yadav
251f26d48a
copilot: Add support for tool_calls for gpt-4.1, gpt-4o, o4-mini (#29369)
Github Copilot currently supports following models for agent mode with
tool calls. Currently we are only supporting anthropic models and not
openai and gemini. This PR add support for the openai models. I have
tested it and it works for all of them. For gemini models it seems there
is a issues from copilot side so not adding that in this PR as enabling
gemini model breaks it in the ask mode as well.

<img width="392" alt="image"
src="https://github.com/user-attachments/assets/fb7a4148-e48c-45c5-9ff9-c02f71217dfb"
/>


- [x] GPT-4.1

- [x] GPT-4.0

- [x] o4-mini

Release Notes:

- agent: Add tool calling support for gpt-4.1, gpt-4o, o4-mini when
using Copilot Chat as a provider

Signed-off-by: Umesh Yadav <umesh4257@gmail.com>
2025-05-05 13:59:12 +02:00
Kirill Bulatov
7133699335
Suggest nim extension for *.nim files (#29912)
Release Notes:

- N/A
2025-05-05 11:46:42 +00:00
Antonio Scandurra
1adb4ecc95
Polish diff for the edit_file tool (#29911)
I added some padding to the editor, and removed the border around each
hunk as it would overlap in weird ways with the card container.

## Before

<img width="1148" alt="image"
src="https://github.com/user-attachments/assets/2018feaa-c847-4609-bc82-522660714b9a"
/>

## After

One Light:

<img width="1148" alt="image"
src="https://github.com/user-attachments/assets/4da1a4b6-0af2-4479-afcc-02da50178fd6"
/>

One Dark:

<img width="1148" alt="image"
src="https://github.com/user-attachments/assets/0168631d-7b76-4582-8174-c6e9c1297dc8"
/>


Release Notes:

- Improved displaying of diffs when the agent edits files.
2025-05-05 11:17:15 +00:00
Kirill Bulatov
0048e67832
Properly restore window position for SSH projects (#29904)
Release Notes:

- Fixed SSH projects not restoring their window position on reopen
2025-05-05 08:46:49 +00:00
Finn Evers
0119b66426
project_search: Ensure filter row aligns with other search rows (#29886)
Closes #29858 

This PR fixes the alignment-issue for the project saerch for cases where
the horizontally available space is large.

The issue arose because the two smaller editors within one line were
allowed to grow as much as the other editors on separate lines, up to
1200 pixels. However, these two editors should together only take up
1200 pixels at maximum, including the gap between them. To fix this, the
editors now live within one container element that grows at the same
rate as the other editors whilst allowing both editors to flex grow as
needed in the available space.

Current main:


https://github.com/user-attachments/assets/622016dc-70e5-455f-a7ba-5b69405d7e1e

This PR: 


https://github.com/user-attachments/assets/5244abf7-f0c0-4781-acb7-b774638d8a17

Release Notes:

- Improved project search input field alignment.
2025-05-05 09:35:48 +03:00
Marshall Bowers
45fe158bc9
collab: Improve GET /billing/usage endpoint (#29898)
This PR improves the `GET /billing/usage` endpoint.

We now return the usage with the default plan limits when there is no
usage record.

Release Notes:

- N/A
2025-05-05 02:31:02 +00:00
Marshall Bowers
55eb0710ed
agent: Update callout URLs (#29897)
This PR updates the Agent callout URLs to go to the account page.

Release Notes:

- N/A
2025-05-05 01:44:09 +00:00
Marshall Bowers
3e2abbf53b
ui: Make Callout constructors more flexible (#29895)
This PR updates the `Callout` constructors to be more flexible by
accepting `impl Into<SharedString>`s.

Release Notes:

- N/A
2025-05-05 01:18:48 +00:00
Marshall Bowers
a2fa10f35f
agent: Remove UsageBanner (#29896)
This PR removes the `UsageBanner` component, as it was no longer used.

Release Notes:

- N/A
2025-05-05 01:18:36 +00:00
Marshall Bowers
3db4744e18
agent: Remove unneeded tracking of request usage (#29894)
This PR removes some unneeded tracking of the model request usage in the
`ActiveThread` and `ThreadEvent::UsageUpdated` events.

Release Notes:

- N/A
2025-05-05 01:16:53 +00:00