4f04f93
git: Always reload current branch after pushing (cherry-pick #28327) (#28394)
Click to expand commit body
Closes #ISSUE
Release Notes:
- Fixed the git panel sometimes failing to update after pushing to a
remote.
Cole Miller
created
ce951e4
Fix panic when a file in a path-based multibuffer excerpt is renamed (cherry-pick #28364) (#28393)
Click to expand commit body
Cherry-picked Fix panic when a file in a path-based multibuffer excerpt
is renamed (#28364)
Closes #ISSUE
Release Notes:
- Fixed a panic that could occur when paths changed in the project diff.
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
gcp-cherry-pick-bot[bot]
,
Cole Miller
, and
Conrad Irwin
created
Cherry-picked project: Workaround invalid code action edits from pyright
(#28354)
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
fixes issue where:
In a two line python file like so
```
Path()
```
If the user asks for code actions on `Path` and they select (`From
pathlib import path`)
the result they get is
```
Pathfrom pathlib import Path
Path()
```
Instead of
```
from pathlib import Path
Path()
```
This is due to a non-lsp-spec-compliant response from pyright below
```json
{"jsonrpc":"2.0","id":40,"result":[{"title":"from pathlib import Path","edit":{"changes":{"file:///Users/neb/Zed/example-project/pyright-project/main.py":[{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":4}},"newText":"Path"},{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":0}},"newText":"from pathlib import Path\n\n\n"}]}},"kind":"quickfix"}]}
```
Release Notes:
- Fixed an issue when using auto-import code actions provided by pyright
(or basedpyright) where the import would be jumbled with the scoped
import resulting in an invalid result
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
gcp-cherry-pick-bot[bot]
,
Ben Kunkle
,
Max Brunsfeld
, and
Anthony Eid
created
684c765
Tell the model not to act on TODO type comments (#28358)
Click to expand commit body
Release Notes:
- Adjusted system prompt to direct it to never act on TODO-type comments
it encounters, unless the user directly asked it to do so or they relate
to the current task at hand.
Joseph T. Lyons
created
77598f5
Use tree-sitter when returning symbols to the model for a given file (#28352)
Click to expand commit body
This also increases the threshold for when we return an outline during
`read_file`.
Release Notes:
- Fixed an issue that caused the agent to fail reading large files if
the LSP hadn't started yet.
Antonio Scandurra
created
99643ab
Tell the model not to remove tests (#28349)
Click to expand commit body
Release Notes:
- Adjusted system prompt to direct it to never remove tests as a way to
have the test suite pass, unless the user directly asks for test
removal.
Joseph T. Lyons
created
bf1680e
agent: Display "generating" label in the active thread (#28297)
Click to expand commit body
Release Notes:
- N/A
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
The bash tool will now truncate its output to 8192 bytes (or the last
newline before that).
We also added a global limit for any tool that produces a clearly large
output that wouldn't fit the context window.
Release Notes:
- agent: Truncate bash tool output
---------
Co-authored-by: Michael Sloan <mgsloan@gmail.com>
Agus Zubiaga
and
Michael Sloan
created
54f7152
Tell the model not to create .bak files (#28244)
Click to expand commit body
Release Notes:
- Adjusted system prompt to avoid having the agent create backup files
unnecessarily.
Richard Feldman
created
25b7f67
Tell the system prompt not to write incomplete code (#28245)
Click to expand commit body
Sometimes agents do this. I've had some success responding by telling it
not to do this, so trying out having it in the system prompt.
Release Notes:
- Adjusted the system prompt to avoid incomplete code generation.
Richard Feldman
created
f259fb4
Fix local task dropped on the wrong thread (cherry-pick #28290) (#28343)
Click to expand commit body
Cherry-picked Fix local task dropped on the wrong thread (#28290)
Release Notes:
- Fixed a panic during shutdown of the remote server
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
gcp-cherry-pick-bot[bot]
and
Conrad Irwin
created
079b9c3
agent: Navigate to line when clicking on filepath in markdown codeblock (#28329)
Click to expand commit body
Release Notes:
- N/A
Bennet Bo Fenner
created
eb85d23
agent: Add support for Google Gemini 2.5 preview (#28326)
Click to expand commit body
Adds support for the new `gemini-2.5-pro-preview-03-25`
Release Notes:
- Added support for `gemini-2.5-pro-preview-03-25` in the assistant
2a60092
Try to identify dSYMs by UUID not channel (cherry-pick #28268) (#28294)
Click to expand commit body
Cherry-picked Try to identify dSYMs by UUID not channel (#28268)
This should make it possible to more reliably symbolicate crash reports
from nightly, and from users with pending auto-updates.
Release Notes:
- N/A
---------
Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>
gcp-cherry-pick-bot[bot]
,
Conrad Irwin
, and
Ben Kunkle
created
bcaa7cb
Properly store editor restoration data (cherry-pick #28296) (#28299)
gcp-cherry-pick-bot[bot]
created
bb1ae36
agent: Add headers for code blocks (#28253)
7230d17
agent: Add the history button back in the toolbar and make it a toggle (#28275)
Click to expand commit body
Release Notes:
- agent: The history view is now more easily accessible via the icon
button in the Agent Panel toolbar.
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Release Notes:
- agent: Copying text in the Agent Panel will now copy it as Markdown.
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Marshall Bowers
and
Antonio Scandurra
created
45fea28
agent: Add a way to go back to thread from settings/history (#28273)
Click to expand commit body
Release Notes:
- N/A
Bennet Bo Fenner
created
08bf1ef
agent: Adjust the thread generation design (#28193)
Click to expand commit body
This PR simplifies the button to send a new message as well as the
"generation" display design.
Release Notes:
- N/A
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Danilo Leal
and
Bennet Bo Fenner
created
0f5184a
markdown: Move `open_url` to the `MarkdownElement` as `on_url_click` (#28269)
Click to expand commit body
Release Notes:
- N/A
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Marshall Bowers
and
Antonio Scandurra
created
45aff05
Fix bad unicode calculations in do_completion (cherry-pick #28259) (#28286)
Click to expand commit body
Cherry-picked Fix bad unicode calculations in do_completion (#28259)
Co-authored-by: João Marcos <marcospb19@hotmail.com>
Release Notes:
- Fixed a panic with completions around non-ASCII code
---------
Co-authored-by: João Marcos <marcospb19@hotmail.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: João Marcos <marcospb19@hotmail.com>
gcp-cherry-pick-bot[bot]
,
Conrad Irwin
, and
João Marcos
created
9fd7b19
markdown: Don't retain `MarkdownStyle` in favor of using `MarkdownElement` directly (#28255)
Click to expand commit body
This PR removes the retained `MarkdownStyle` on the `Markdown` entity in
favor of using the `MarkdownElement` directly and passing the
`MarkdownStyle` to it.
This makes it so switching themes will be reflected live in the code
block styles.
Release Notes:
- N/A
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Agus Zubiaga <hi@aguz.me>
Marshall Bowers
,
Antonio Scandurra
, and
Agus Zubiaga
created
cb1b17f
agent: Remove duplicated keybinding for creating new thread in Linux (#28254)
<img width="612" alt="Screenshot 2025-04-06 at 9 59 41 PM"
src="https://github.com/user-attachments/assets/3a996b4a-ef5c-4ca6-bd16-3b180b364a3a"
/>
Release Notes:
- Agent panel now shows links to relevant source code files above code
blocks.
Richard Feldman
created
46280a6
Restore direct use of the input text for Markdown `Text` (#27620)
Click to expand commit body
PR #24388 changed the markdown parsing to copy parsed text in order to
handle markdown escaping, removing the optimization to instead reuse
text from the input.
Another issue with that change was that handling of finding links within
`Text` intermixed use of `text` and `parsed`, relying on the offsets
matching up (which I believe was true in practice).
The solution is to distinguish pulldown_cmark `Text` nodes that share
bytes with the input and those that do not.
Release Notes:
- N/A
28cca25
agent: Refresh UI when context or thread history changes (#28188)
Click to expand commit body
I found a few more cases where the UI wasn't updated immediately after
an interaction.
Release Notes:
- agent: Fixed delay after removing threads from "Past Interactions"
- agent: Fixed delay after adding/remove context via keyboard
Agus Zubiaga
created
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
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
#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
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