Commit log

3fde499 agent: Refresh UI when sending first message (#28180)

Click to expand commit body
Release Notes:

- Agent Beta: Fixed a delay when sending the first message in a new
thread

Agus Zubiaga created

f176715 Try to improve behavior when agent is stuck (#28169)

Click to expand commit body
Currently, it's pretty common that when the agent gets stuck, it deletes
whatever it's stuck on and replaces it with a TODO comment, then
cheerfully reports that it has "simpified" the implementation. This is
worse than leaving the broken code, because at least a human could take
over and try to get it across the finish line.

This system prompt adjustment attempts to make the agent do something
more useful when in this situation: report that it's stuck, explain why
it's stuck, and ask the user what to do.

Release Notes:

- N/A

Richard Feldman created

4a302a2 If file is too big, provide the outline and suggest a follow-up tool (#28158)

Click to expand commit body
<img width="622" alt="Screenshot 2025-04-05 at 5 48 14 PM"
src="https://github.com/user-attachments/assets/24b9c7d4-d3e2-4929-bca8-79db5b4e5748"
/>

Release Notes:

- The `read_files` tool now reads only the symbol outline files above a
certain size, to conserve context window space. Then it suggests that
the agent call `read_files` again with the relevant line ranges it saw
in the outline.

Richard Feldman created

3154b53 assistant: Fix `assistant: open prompt library` not opening the prompt library (#28156)

Click to expand commit body
This PR fixes the `assistant: open prompt library` action in the command
palette not opening the prompt library when the Assistant Panel did not
have focus.

Fixes https://github.com/zed-industries/zed/issues/28058.

Release Notes:

- assistant: Fixed `assistant: open prompt library` not opening the
prompt library when the Assistant Panel was not focused.

Marshall Bowers created

959d5f5 bedrock: Add support for tool use, cross-region inference, and Claude 3.7 Thinking (#28137)

Click to expand commit body
Closes #27223
Merges: #27996, #26734, #27949 

Release Notes:

- AWS Bedrock: Added advanced authentication strategies with:
  - Short lived credentials with Session Tokens 
  - AWS Named Profile
  - EC2 Identity, Pod Identity, Web Identity
- AWS Bedrock: Added Claude 3.7 Thinking support.
- AWS Bedrock: Adding Cross Region Inference for all combinations of
regions and model availability.
- Agent Beta: Added support for AWS Bedrock.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>

Shardul Vaidya and Marshall Bowers created

2771623 copilot: Create Copilot directory if it does not exist (cherry-pick #28157) (#28178)

Click to expand commit body
Cherry-picked copilot: Create Copilot directory if it does not exist
(#28157)

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

Issue:

- Copilot is failing to launch because the copilot directory is missing

<img width="497" alt="image"

src="https://github.com/user-attachments/assets/af35eb66-7e91-4dc6-a862-d1575da33b5b"
/>


<img width="943" alt="image"

src="https://github.com/user-attachments/assets/0b195c8c-52eb-42b9-bf36-40086398cc3f"
/>


Release Notes:

- copilot: Fixed an issue where GitHub Copilot would not install
properly if the directory was not present.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>

Co-authored-by: Richard Hao <richard@0xdev.dev>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>

gcp-cherry-pick-bot[bot] , Richard Hao , and Marshall Bowers created

9204877 agent: Fix opening configuration view from the model selector (cherry-pick #28154) (#28155)

Click to expand commit body
Cherry-picked agent: Fix opening configuration view from the model
selector (#28154)

This PR fixes an issue where opening the configuration view from the
model selector in the Agent (or inline assist) was not working properly.

Fixes https://github.com/zed-industries/zed/issues/28078.

Release Notes:

- Agent Beta: Fixed an issue where selecting "Configure" in the model
selector would not bring up the configuration view.

Co-authored-by: Marshall Bowers <git@maxdeviant.com>

gcp-cherry-pick-bot[bot] and Marshall Bowers created

3d5035d title_bar: Ensure git onboarding banner dismissal is properly respected (cherry-pick #28147) (#28148)

Click to expand commit body
Cherry-picked title_bar: Ensure git onboarding banner dismissal is
properly respected (#28147)

A user reported this issue [on

Discord](https://discord.com/channels/869392257814519848/873292398204170290/1357879959422636185).

The issue here only arises for users which recently installed Zed or had
previously not dismissed the Git Onboarding component. It was introduced
by https://github.com/zed-industries/zed/pull/27412, which made the
banner component reusable.

For every banner, there is a value stored in the KVP store when it was
first dismissed. For the git onboarding banner, this was
`zed_git_banner_dismissed_at` initially, but this key would have been
changed by the linked PR. A change would have resulted in the banner
being shown again for users who already dismissed the panel, so for the
special case of `Git Onboarding`, a check was added which ensured this
would not happen.

However, this check was only added for reading from the key from the DB
but not on writing the git onboarding dismissal it to the DB. Thus, if a
user who had not previously dismissed the panel opened Zed, we would
check for the old key to be present in the DB. Since that would not be
the case, the banner would be shown. If the user dismissed the panel, it
would be stored in the database with the new key. Thus, on a reopen of
Zed, the banner would again be shown since for the old key there would
still be no value present and users are unable to dismiss the panel.


This PR fixes this behavior by moving the check into the method that
generates the key. With this, users which were unaffected by the bug
will still not see the panel again. Users who would install Zed with
this change present will be able to properly dismiss the panel aswell.
Users which were affected by the bug need to dismiss the banner one more
time. That happens because I did not want to modify the dismissal check
to check for two keys (the original one and the new one), as it would
clutter the logic even more for this special case. If this would be
preferred, feel free to let me know.

Release Notes:

- Fixed an issue where dismissing the git onboarding banner would not be
persisted across sessions.

Co-authored-by: Finn Evers <dev@bahn.sh>

gcp-cherry-pick-bot[bot] and Finn Evers created

d047801 agent: Fix tool use output rendering (#28146)

Click to expand commit body
Tool use output wouldn't get rendered in some states.

Release Notes:

- N/A

Agus Zubiaga created

e7d1d73 agent: Add missing notify in `ThreadHistory::delete_thread` (#28144)

Click to expand commit body
This would cause the history view not to get refreshed immediately when
a thread was deleted

Release Notes:

- agent: Fixed a bug where the history view wouldn't refresh after
deleting a thread

Agus Zubiaga created

149db5c agent: Fix thread summary generation (#28143)

Click to expand commit body
#28102 introduced a bug where thread summaries wouldn't get generated
because they would get set to the default title instead of `None`.

Not adding a release note because the bug didn't make it to Preview.

Release Notes:

- N/A

Agus Zubiaga created

992d791 Introduce "Near" block type (#28032)

Click to expand commit body
A "Near" block acts similarly to a "Below" block, but can (if it's
height is <= one line height) be shown on the end of the preceding line
instead of adding an entire blank line to the editor.

You can test it out by pasting this into `go_to_diagnostic_impl` and
then press `F8`
```
        let buffer = self.buffer.read(cx).snapshot(cx);
        let selection = self.selections.newest_anchor();

        self.display_map.update(cx, |display_map, cx| {
            display_map.insert_blocks(
                [BlockProperties {
                    placement: BlockPlacement::Near(selection.start),
                    height: Some(1),
                    style: BlockStyle::Flex,
                    render: Arc::new(|_| {
                        div()
                            .w(px(100.))
                            .h(px(16.))
                            .bg(gpui::hsla(0., 0., 1., 0.5))
                            .into_any_element()
                    }),
                    priority: 0,
                }],
                cx,
            )
        });
        return;
```

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>

Conrad Irwin and Antonio Scandurra created

18bf078 Fix panic calling blocks_intersecting_buffer_range with an empty range (#28049)

Click to expand commit body
Previously, when comparing a block with an empty range to an empty query
range in non-inclusive mode, our binary search logic could end up
computing an inverted range, causing a panic.

This commit adds special casing when comparing empty blocks with empty
ranges.

cc @as-cii: I'm realizing that the approach to searching for the
intersecting replacement blocks makes some invalid assumptions about the
ordering of replace decorations. They aren't ordered at all by their end
range. @maxbrunsfeld and I are wondering if long term, we should remove
replace decorations and find another solution for folding buffers in
multi buffers.

Release Notes:

- Fixed an occasional panic that would occur when navigating to the next
change hunk with a pending inline transformation present.

Co-authored-by: Peter Tripp <petertripp@gmail.com>

Nathan Sobo and Peter Tripp created

3ba619d agent: Fix panic when opening Agent diff from the workspace (#28132)

Click to expand commit body
This PR fixes a panic that could occur when opening the Agent diff from
the workspace (with the agent panel closed).

Release Notes:

- agent: Fixed a panic when running the `agent: open agent diff` command
with the Agent Panel closed.

Marshall Bowers created

3559464 agent: Use Markdown to render tool input and output content (#28127)

Click to expand commit body
Release Notes:

- agent: Tool call's input and output content are now rendered with
Markdown, which allows them to be selected and copied.

---------

Co-authored-by: Agus Zubiaga <hi@aguz.me>

Danilo Leal and Agus Zubiaga created

32a03ee agent: Hide the scrollbar if there's no mouse movement (#28129)

Click to expand commit body
Release Notes:

- agent: The scrollbar now automatically hides if there's no mouse
movement on the thread list.

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Agus Zubiaga <hi@aguz.me>

Danilo Leal , Agus Zubiaga , and Agus Zubiaga created

912ce5d Add tool calling support for GitHub Copilot Chat (#28035)

Click to expand commit body
This PR adds tool calling support for GitHub Copilot Chat models.

Currently only supports the Claude family of models.

Release Notes:

- agent: Added tool calling support for Claude models in GitHub Copilot
Chat.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>

Bennet Bo Fenner and Marshall Bowers created

97e8f49 agent: Fix deleting threads in history via keyboard (#28113)

Click to expand commit body
Using `shift-backspace` now because we need `backspace` for search

Release Notes:
- agent: Fix deleting threads in history via keyboard

Agus Zubiaga created

736d5e6 agent: Disable redundant tools (might delete later) (#28114)

Click to expand commit body
Release Notes:

- agent: Disable tools that are redundant in the presence of the bash
tool

Agus Zubiaga created

68023fd Properly query remote ssh server for language servers by name (cherry-pick #28124) (#28125)

Click to expand commit body
Cherry-picked Properly query remote ssh server for language servers by
name (#28124)

Follow-up of https://github.com/zed-industries/zed/pull/27775

Release Notes:

- N/A

Co-authored-by: Kirill Bulatov <kirill@zed.dev>

gcp-cherry-pick-bot[bot] and Kirill Bulatov created

253ef7e jsx-tag-auto-close: Remove potential source of bugs and panics (cherry-pick #28119) (#28122)

Click to expand commit body
Cherry-picked jsx-tag-auto-close: Remove potential source of bugs and
panics (#28119)

Switch to using anchors for storing edited ranges rather than offsets as
they have to be used with multiple buffer snapshots

Release Notes:

- N/A

Co-authored-by: Ben Kunkle <ben@zed.dev>

gcp-cherry-pick-bot[bot] and Ben Kunkle created

687cc5d Fix panic or bad hunks when expanding hunks w/ multiple ranges in 1 hunk (#28117)

Click to expand commit body
Release Notes:

- Fixed a crash that could happen when expanding diff hunks with
multiple cursors in one hunk.

Max Brunsfeld created

290d249 agent: Fix invalid tool names in batch tool description (#28109)

Click to expand commit body
The description of the Batch Tool was still referring using `-` as a
seperator for tool names

Release Notes:

- N/A

Bennet Bo Fenner created

4922a00 agent: Remove `edit_files` tool (#28041)

Click to expand commit body
Release Notes:

- agent: Remove `edit_files` tool  in favor of `find_replace`

Agus Zubiaga created

96c9824 agent: Allow renaming threads (#28102)

Click to expand commit body
Release Notes:

- agent: Add support for renaming threads

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>

Agus Zubiaga , Danilo Leal , Bennet Bo Fenner , and Richard Feldman created

a831517 Try adding beta token-efficient tool use for 3.7 Sonnet (#28100)

Click to expand commit body
Release Notes:

- Enabled [token-efficient tool use
(beta)](https://docs.anthropic.com/en/docs/build-with-claude/tool-use/token-efficient-tool-use)
for Claude 3.7 Sonnet models

Richard Feldman created

9933512 zed 0.181.3

Joseph T. Lyons created

e845765 ai: Separate model settings for each feature (#28088)

Click to expand commit body
Closes: https://github.com/zed-industries/zed/issues/20582

Allows users to select a specific model for each AI-powered feature:
- Agent panel
- Inline assistant
- Thread summarization
- Commit message generation

If unspecified for a given feature, it will use the `default_model`
setting.

Release Notes:

- Added support for configuring a specific model for each AI-powered
feature

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>

Agus Zubiaga , Danilo Leal , and Bennet Bo Fenner created

b037c91 assistant_eval: Add ACE framework (#27181)

Click to expand commit body
Release Notes:

- N/A

---------

Co-authored-by: Michael Sloan <michael@zed.dev>

Thomas Mickley-Doyle and Michael Sloan created

aca7f54 agent: Add search to Thread History (#28085)

Click to expand commit body
![CleanShot 2025-04-04 at 09 45
47@2x](https://github.com/user-attachments/assets/a8ec4086-f71e-4ff4-a5b3-4eb5d4c48294)


Release Notes:

- agent: Add search box to thread history

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>

Agus Zubiaga , Bennet Bo Fenner , and Danilo Leal created

10a3ad0 Clear path-based excerpt data properly (cherry-pick #28026) (#28082)

Click to expand commit body
Cherry-picked Clear path-based excerpt data properly (#28026)

Follow-up of https://github.com/zed-industries/zed/pull/27893

Release Notes:

- N/A

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

gcp-cherry-pick-bot[bot] , Kirill Bulatov , and Conrad Irwin created

c4bbdd0 Temporarily disable flaky conflicted-cherry-pick test (cherry-pick #27950) (#28087)

Click to expand commit body
Cherry-picked Temporarily disable flaky conflicted-cherry-pick test
(#27950)

Closes #ISSUE

Release Notes:

- N/A

Co-authored-by: Cole Miller <cole@zed.dev>

gcp-cherry-pick-bot[bot] and Cole Miller created

27a4723 Implement edit rejection in `ActionLog` (#28080)

Click to expand commit body
Release Notes:

- Fixed a bug that would prevent rejecting certain agent edits.

Antonio Scandurra created

0b8c14f agent: Show which lines were read when using `read_file` tool (#28077)

Click to expand commit body
This makes sure that we specify which lines the agent actually read,
avoids confusing scenarios such as:

<img width="642" alt="Screenshot 2025-04-04 at 10 22 10"
src="https://github.com/user-attachments/assets/2680c313-4f77-4971-8743-8e3f5327c18d"
/>

Here the agent starts out by actually only reading a certain amount of
lines when the first tool call happens, then it does a second tool call
to read the whole file. To the user this looks like to identical tool
calls.

Now:
<img width="621" alt="image"
src="https://github.com/user-attachments/assets/76222258-9cc8-4b7c-98c0-6d5cffb282f2"
/>
<img width="362" alt="image"
src="https://github.com/user-attachments/assets/293f2fc0-365d-4b84-8400-4c11474caeb8"
/>
<img width="420" alt="image"
src="https://github.com/user-attachments/assets/ca92493e-67ce-4d45-8f83-0168df575326"
/>



Release Notes:

- N/A

Bennet Bo Fenner created

800f405 agent: Differentiate @mentions from markdown links (#28073)

Click to expand commit body
This ensures that we display @mentions and normal markdown links
differently:

<img width="670" alt="Screenshot 2025-04-04 at 11 07 51"
src="https://github.com/user-attachments/assets/0a4d0881-abb9-42a8-b3fa-912cd6873ae0"
/>


Release Notes:

- N/A

Bennet Bo Fenner created

1f4a2d5 Scroll to first hunk when clicking on a file to review in Agent Panel (#28075)

Click to expand commit body
Release Notes:

- Added the ability to scroll to a file when clicking on it in the Agent
Panel review section.

Antonio Scandurra created

c706acb open_ai: Disable `parallel_tool_calls` (#28056)

Click to expand commit body
This PR disables `parallel_tool_calls` for the models that support it,
as the Agent currently expects at most one tool use per turn.

It was a bit of trial and error to figure this out. OpenAI's API
annoyingly will return an error if passing `parallel_tool_calls` to a
model that doesn't support it.

Release Notes:

- N/A

Marshall Bowers created

3f19ae1 Add tool use support for OpenAI models (#28051)

Click to expand commit body
This PR adds support for using tools to the OpenAI models.

Release Notes:

- agent: Added support for tool use with OpenAI models (Preview only).

Marshall Bowers created

4744c4f Remove unused `extract_tool_args_from_events` functions (#28038)

Click to expand commit body
This PR removes the unused `extract_tool_args_from_events` functions
that were defined in some of the LLM provider crates.

Release Notes:

- N/A

Marshall Bowers created

aa168c6 ui_input: `TextField` -> `SingleLineInput` (#28031)

Click to expand commit body
- Rename `TextField` -> `SingleLineInput`
- Add a component preview for `SingleLineInput`
- Apply `SingleLineInput` to the AddContextServerModal

Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <hi@aguz.me>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>

Nate Butler , Agus Zubiaga , Danilo Leal , and Danilo Leal created

ce2918e agent: Snapshot context in user message instead of recreating it (#27967)

Click to expand commit body
This makes context essentially work the same way as `read-file`,
increasing the likelihood of cache hits.

Just like with `read-file`, we'll notify the model when the user makes
an edit to one of the tracked files. In the future, we want to send a
diff instead of just a list of files, but that's an orthogonal change.


Release Notes:
- agent: Improved caching of files in context

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>

Agus Zubiaga and Antonio Scandurra created

3cfaadd zed 0.181.2

Joseph T. Lyons created

b69219e agent: Add token count in the thread view (#28037)

Click to expand commit body
This PR adds the token count to the active thread view. It doesn't
behaves quite like Assistant 1 where it updates as you type, though; it
updates after you submit the message.

<img
src="https://github.com/user-attachments/assets/82d2a180-554a-43ee-b776-3743359b609b"
width="700" />

---

Release Notes:

- agent: Add token count in the thread view

---------

Co-authored-by: Agus Zubiaga <hi@aguz.me>

Danilo Leal and Agus Zubiaga created

0ae3518 Fix soft-wrapping with fold creases (#28029)

Click to expand commit body
Release Notes:

- Fixed a rendering bug that caused context in the agent to not wrap
properly.

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Zed AI <ai+claude-3.7@zed.dev>

Antonio Scandurra , Conrad Irwin , and Zed AI created

7396435 agent: Handle tool use without text (#28030)

Click to expand commit body
### Context 

The Anthropic API fails if a request message contains a tool use and no
`Text` segments or it only contains empty `Text` segments. These are
cases that the model itself produces, but the API doesn't support
sending them back.

#27917 fixed this by appending "Using tool..." in the thread's message,
but this causes the actual conversation to include it, so it would
appear in the UI (we would actually display a gap because we never
rendered its markdown, but "Using tool..." would show up when the thread
was restored).

### Solution

We'll now only append this placeholder when we build the request, so the
API still sees it, but the UI/Thread doesn't.

Another issue we found is that the model starts mimicking these
placeholders in later tool uses which is undesirable. So unfortunately,
we had to add logic to filter them out.

Release Notes:

- agent: Improved rendering of tool uses without text

---------

Co-authored-by: Bennet <bennet@zed.dev>

Agus Zubiaga and Bennet created

bf6e7cb agent: Add button to continue iterating once all reviews are done (#28027)

Click to expand commit body
This PR adds a button on the review tab empty state that toggles the
focus back to the agent panel so that users can keep iterating on the
thread that's active in the panel.

<img
src="https://github.com/user-attachments/assets/ace5cf93-8869-49bb-8106-e03a9e3c90f2"
width="700"/>

Release Notes:

- N/A

Danilo Leal created

36c4f60 zed 0.181.1

Joseph T. Lyons created

3d032bc agent: Fix thinking step showing up as pending when completion is cancelled (#28019)

Click to expand commit body
Previously the "Thinking..." step would show up as pending, even though
the user cancelled the generation:
<img width="672" alt="image"
src="https://github.com/user-attachments/assets/c9cdce0a-d827-4e23-96f5-b150465911a7"
/>


Release Notes:

- Fixed an issue where the thinking step would show up as pending even
when the generation was cancelled

Bennet Bo Fenner created

3e28fa2 agent: Include active file in recent history (#27914)

Click to expand commit body
This happened because of two reasons:

- `Workspace::recent_navigation_history` didn't include the current file
- The context picker added the current file to a exclude list

The latter was actually intentional because we already show the file in
the suggested context, but now that we actually have mentions, it's just
inconvenient not to have it there.

Release Notes:

- N/A

Agus Zubiaga created

c424429 workspace-hack: remove openssl from remote_server (#27990)

Click to expand commit body
This was accidentally getting added due to increased feature
unification. We've manually excluded reqwest to go back to the desired
behavior: remote_server, doesn't depend on openssl.

Release Notes:

- N/A

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>

Julia Ryan and Mikayla Maki created