Commit graph

261 commits

Author SHA1 Message Date
Bennet Bo Fenner
2eadd5a396
agent2: Make model of Thread optional (#36395)
Related to #36394 

Release Notes:

- N/A
2025-08-18 09:56:02 +00:00
Cale Sennett
61ce07a91b
Add capabilities to OpenAI-compatible model settings (#36370)
### TL;DR
* Adds `capabilities` configuration for OpenAI-compatible models
* Relates to
https://github.com/zed-industries/zed/issues/36215#issuecomment-3193920491

### Summary
This PR introduces support for configuring model capabilities for
OpenAI-compatible language models. The implementation addresses the
issue that not all OpenAI-compatible APIs support the same features -
for example, Cerebras' API explicitly does not support
`parallel_tool_calls` as documented in their [OpenAI compatibility
guide](https://inference-docs.cerebras.ai/resources/openai#currently-unsupported-openai-features).

### Changes

1. **Model Capabilities Structure**:
- Added `ModelCapabilityToggles` struct for UI representation with
boolean toggle states
- Implemented proper parsing of capability toggles into
`ModelCapabilities`

2. **UI Updates**:
- Modified the "Add LLM Provider" modal to include checkboxes for each
capability
- Each OpenAI-compatible model can now be configured with its specific
capabilities through the UI

3. **Configuration File Structure**:
- Updated the settings schema to support a `capabilities` object for
each `openai_compatible` model
- Each capability (`tools`, `images`, `parallel_tool_calls`,
`prompt_cache_key`) can be individually specified per model

### Example Configuration

```json
{
  "openai_compatible": {
    "Cerebras": {
      "api_url": "https://api.cerebras.ai/v1",
      "available_models": [
        {
          "name": "gpt-oss-120b",
          "max_tokens": 131000,
          "capabilities": {
            "tools": true,
            "images": false,
            "parallel_tool_calls": false,
            "prompt_cache_key": false
          }
        }
      ]
    }
  }
}
```

### Tests Added

- Added tests to verify default capability values are correctly applied
- Added tests to verify that deselected toggles are properly parsed as
`false`
- Added tests to verify that mixed capability selections work correctly

Thanks to @osyvokon for the desired `capabilities` configuration
structure!


Release Notes:

- OpenAI-compatible models now have configurable capabilities (#36370;
thanks @calesennett)

---------

Co-authored-by: Oleksiy Syvokon <oleksiy@zed.dev>
2025-08-18 11:36:52 +03:00
Ben Brandt
b3969ed427
Standardize on canceled instead of cancelled (#36385)
Release Notes:

- N/A
2025-08-18 04:07:32 +00:00
Cole Miller
2dbc951058
agent2: Start loading mentioned threads and text threads as soon as they're added (#36374)
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-08-17 20:38:07 +00:00
Danilo Leal
9cd13a35de
agent2: Experiment with new toolbar design (#36366)
Release Notes:

- N/A
2025-08-17 13:39:14 -03:00
Piotr Osiewicz
addc4f4a11
agent_ui: Ensure that all configuration views get rendered with full width (#36362)
Closes #36097

Release Notes:

- Fixed API key input fields getting shrunk in Agent Panel settings view
on low panel widths paired with high UI font sizes.
2025-08-17 15:19:38 +00:00
Ben Brandt
5895fac377
Refactor ToolCallStatus enum to flat variants (#36356)
Replace nested Allowed variant with distinct statuses for clearer status
handling.

Release Notes:

- N/A
2025-08-17 13:05:23 +00:00
Marshall Bowers
f17f63ec84
Remove /docs slash command (#36325)
This PR removes the `/docs` slash command.

We never fully shipped this—with it requiring explicit opt-in via a
setting—and it doesn't seem like the feature is needed in an agentic
world.

Release Notes:

- Removed the `/docs` slash command.
2025-08-16 19:00:31 +00:00
Finn Evers
7b3fe0a474
Make agent font size inherit the UI font size by default (#36306)
Ensures issues like #36242 and #36295 do not arise where users are
confused that the agent panel does not follow the default UI font size
whilst also keeping the possibility of customization. The agent font
size was matching the UI font size previously alredy, which makes it
easier to change it for most scenarios.

Also cleans up some related logic around modifying the font sizes.

Release Notes:

- The agent panel font size will now inherit the UI font size by default
if not set in your settings.
2025-08-16 14:35:06 +00:00
Cole Miller
bf34e185d5
Move MentionSet to message_editor module (#36281)
This is a more natural place for it than its current home next to the
completion provider.

Release Notes:

- N/A
2025-08-15 18:47:36 -04:00
Cole Miller
3d77ad7e1a
thread_view: Start loading images as soon as they're added (#36276)
Release Notes:

- N/A
2025-08-15 17:39:33 -04:00
Yang Gang
f365403618
agent: Update use_modifier_to_send behavior description for Windows (#36230)
Release Notes:

- N/A

Signed-off-by: Yang Gang <yanggang.uefi@gmail.com>
2025-08-15 21:03:50 +00:00
Agus Zubiaga
9eb1ff2726
acp thread view: Always use editors for user messages (#36256)
This means the cursor will be at the position you clicked:


https://github.com/user-attachments/assets/0693950d-7513-4d90-88e2-55817df7213a


Release Notes:

- N/A
2025-08-15 21:03:36 +00:00
Finn Evers
3e0a755486
Remove some redundant entity clones (#36274)
`cx.entity()` already returns an owned entity, so there is no need for
these clones.

Release Notes:

- N/A
2025-08-15 20:27:44 +00:00
Marshall Bowers
2a9d4599cd
proto: Remove unused types (#36269)
This PR removes some unused types from the RPC protocol.

Release Notes:

- N/A
2025-08-15 19:46:23 +00:00
Cole Miller
1931889759
thread_view: Move handlers for confirmed completions to the MessageEditor (#36214)
Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-08-15 18:55:34 +00:00
Bennet Bo Fenner
10a2426a58
agent2: Port profile selector (#36244)
Release Notes:

- N/A
2025-08-15 14:06:56 +00:00
Bennet Bo Fenner
6f3cd42411
agent2: Port Zed AI features (#36172)
Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-08-15 11:17:17 +00:00
Cole Miller
b1e806442a
Support images in agent2 threads (#36152)
- Support adding ImageContent to messages through copy/paste and through
path completions
- Ensure images are fully converted to LanguageModelImageContent before
sending them to the model
- Update ACP crate to v0.0.24 to enable passing image paths through the
protocol

Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-08-14 21:31:14 +00:00
Agus Zubiaga
43ee604179
acp: Clean up entry views on rewind (#36197)
We were leaking diffs and terminals on rewind, we'll now clean them up.
This PR also introduces a refactor of how we mantain the entry view
state to use a `Vec` that's kept in sync with the thread entries.

Release Notes:

- N/A
2025-08-14 18:30:18 +00:00
Conrad Irwin
e5402d5464
Allow editing Agent2 messages (#36155)
Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-08-14 13:39:33 +00:00
Conrad Irwin
ab9fa03d55
UI for checkpointing (#36124)
Co-authored-by: Antonio Scandurra <me@as-cii.com>

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-08-13 22:24:47 -06:00
Danilo Leal
8452532c8f
agent2: Iterate on "new thread" selector in the toolbar (#36144)
Release Notes:

- N/A
2025-08-13 18:34:53 -03:00
Agus Zubiaga
389d24d7e5
Fully support all mention kinds (#36134)
Feature parity with the agent1 @mention kinds:
- File
- Symbols
- Selections
- Threads
- Rules
- Fetch


Release Notes:

- N/A

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2025-08-13 20:11:32 +00:00
Danilo Leal
cb0bc463f1
agent2: Add new "new thread" selector in the toolbar (#36133)
Release Notes:

- N/A
2025-08-13 14:45:37 -03:00
Ben Brandt
23cd5b59b2
agent2: Initial infra for checkpoints and message editing (#36120)
Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-08-13 15:46:28 +00:00
Ben Brandt
db497ac867
Agent2 Model Selector (#36028)
Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2025-08-13 09:01:02 +00:00
Cole Miller
1957e1f642
Add locations to native agent tool calls, and wire them up to UI (#36058)
Release Notes:

- N/A

---------

Co-authored-by: Conrad <conrad@zed.dev>
2025-08-13 01:48:28 +00:00
Danilo Leal
628b1058be
agent2: Fix some UI glitches (#36067)
Release Notes:

- N/A
2025-08-12 16:31:54 -03:00
Danilo Leal
b105028c05
agent2: Add custom UI for resource link content blocks (#36005)
Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-08-12 12:39:27 -03:00
Agus Zubiaga
44953375cc
Include mention context in acp-based native agent (#36006)
Also adds data-layer support for symbols, thread, and rules.

Release Notes:

- N/A

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2025-08-12 13:12:58 +00:00
Danilo Leal
094e878ccf
agent2: Refine terminal tool call display (#35984)
Release Notes:

- N/A
2025-08-11 17:50:47 -03:00
Cole Miller
42bf5a17b9
Delay rendering tool call diff editor until it has a revealed range (#35901)
Release Notes:

- N/A
2025-08-11 12:49:46 -04:00
Antonio Scandurra
086ea3c619
Port terminal tool to agent2 (#35918)
Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-08-11 10:31:13 +00:00
Ben Brandt
308cb9e537
Pull action_log into its own crate (#35959)
Release Notes:

- N/A
2025-08-10 21:57:55 +00:00
Cole Miller
c053923015
thread_view: Trim only trailing whitespace from last chunk of user message (#35902)
This fixes internal whitespace after the last @mention going missing
from the user message as displayed in history.

Release Notes:

- N/A
2025-08-08 23:50:59 +00:00
Cole Miller
f3a58b50c4
Handle drag and drop in new agent threads (#35879)
This is a bit simpler than for the original agent thread view, since we
don't have to deal with opening buffers or a context store.

Release Notes:

- N/A
2025-08-08 15:03:50 -04:00
Danilo Leal
2cde6da5ff
Redesign and clean up all icons across Zed (#35856)
- [x] Clean up unused and old icons
- [x] Swap SVG for all in-use icons with the redesigned version
- [x] Document guidelines

Release Notes:

- N/A
2025-08-08 15:34:36 -03:00
Agus Zubiaga
2526dcb5a5
agent2: Port edit_file tool (#35844)
TODO:
- [x] Authorization
- [x] Restore tests

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-08-08 12:43:53 +00:00
Ben Brandt
90fa921756
Wire up find_path tool in agent2 (#35799)
Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-08-07 22:21:26 +00:00
Cole Miller
e6dc6faccf
Don't insert resource links for @mentions that have been removed from the message editor (#35831)
Release Notes:

- N/A
2025-08-07 22:10:29 +00:00
Cole Miller
a1080a0411
Update diff editor font size when agent_font_size setting changes (#35834)
Release Notes:

- N/A
2025-08-07 21:31:30 +00:00
Danilo Leal
a5c25e0366
agent: Improve end of trial card display (#35789)
Now rendering the backdrop behind the card to clean up the UI, bring
focus to the card's content, and direct the user to act on it, either by
ignoring it or upgrading.

<img width="500" height="1242" alt="CleanShot 2025-08-07 at 10  30
58@2x"
src="https://github.com/user-attachments/assets/8c6b9c34-eb22-4f01-b3fa-158ac78b7439"
/>

Release Notes:

- N/A
2025-08-07 10:53:15 -03:00
Antonio Scandurra
03876d076e
Add system prompt and tool permission to agent2 (#35781)
Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-08-07 13:40:12 +00:00
Danilo Leal
8e290b446e
thread view: Add UI refinements (#35754)
More notably around how we render tool calls. Nothing too drastic,
though.

Release Notes:

- N/A
2025-08-06 20:31:11 -03:00
Agus Zubiaga
33f198fef1
Thread view scrollbar (#35655)
This also adds a convenient `Scrollbar:auto_hide` function so that we
don't have to handle that at the callsite.

Release Notes:

- N/A

---------

Co-authored-by: David Kleingeld <davidsk@zed.dev>
2025-08-06 14:01:34 +00:00
Agus Zubiaga
334bdd0efc
Fix acp thread entry width (#35723)
Release Notes:

- N/A
2025-08-06 13:39:55 +00:00
Ben Brandt
eb4b73b88e
ACP champagne (#35609)
cherry pick changes from #35510 onto latest main

Release Notes:

- N/A

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-08-06 09:01:06 +00:00
Mikayla Maki
53175263a1
Simplify ListState API (#35685)
Follow up to: https://github.com/zed-industries/zed/pull/35670,
simplifies the List state APIs so you no longer have to worry about
strong vs. weak pointers when rendering list items.

Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-08-06 00:02:26 +00:00
Danilo Leal
cc93175256
Recategorize a few items in the component preview (#35681)
Release Notes:

- N/A
2025-08-05 23:11:43 +00:00