Commit graph

25723 commits

Author SHA1 Message Date
Marshall Bowers
75dbe189bd
Give Zed AI users access to Claude 3.7 Sonnet (#25577)
This PR updates the client-side checks to give Zed AI users access to
Claude 3.7 Sonnet.

Requires https://github.com/zed-industries/zed/pull/25576 to be
deployed.

Release Notes:

- Added support for Claude 3.7 Sonnet to Zed AI.
2025-02-25 12:15:15 -05:00
Marshall Bowers
3d7ba7c1c0
collab: Give Zed AI users access to Claude 3.7 Sonnet (#25576)
This PR updates the authorization check to give Zed AI users access to
Claude 3.7 Sonnet.

Release Notes:

- N/A
2025-02-25 12:12:09 -05:00
Peter Tripp
eebee4ab18
Add stop_at_indent for MoveToBeginningOfLine (#25428)
Add support for `stop_at_indent` option for MoveToBeginningOfLine and SelectToBeginningOfLine instead of mixing that with `stop_at_soft_wraps`.
Add emacs mapping for `alt-m` (`back-to-indentation`)
2025-02-25 12:03:14 -05:00
Marshall Bowers
3a3621f2d8
collab: Limit free tier usage across all models (#25573)
This PR adjusts the usage checks for the LLM free tier.

Previously we would limit the usage on a per-model basis, meaning the
user would get $10/mo free for each model they had access to.

We now have usage for all models count towards the free tier limit.

Release Notes:

- N/A
2025-02-25 16:42:55 +00:00
smit
524e813d20
project_panel: Fix entry not being marked when triggered via keyboard (#25567)
This is follow-up for https://github.com/zed-industries/zed/pull/25457

If you open a project without any open buffer, focus on the project
panel, navigate with arrows to a given entry, and hit space, you will
mark and open the file in the buffer. This is all correct. If you then
hit `escape` to clear the marked entries, nothing happens to the open
buffer, and the marked styled in the project panel entry go away. This
is all correct. The wrong behavior happens if you now hit space again on
the active entry. That should mark it, and thus change its styles, but
it doesn't happen. You just see it upon moving to a different entry with
arrow up/down.

Release Notes:

- Fixed project panel entry not being marked when triggering open action
via keyboard.

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-02-25 21:24:13 +05:30
zhaopeng
b12b8340de
copilot: Add Claude 3.7 Sonnet to Copilot Chat (#25529)
- Follow-up to: https://github.com/zed-industries/zed/issues/25488

Co-authored-by: Peter Tripp <peter@zed.dev>
2025-02-25 15:51:55 +00:00
Agus Zubiaga
7075bd700f
edit predictions: Disable "This Buffer" option when disabled for language (#25566)
![image](https://github.com/user-attachments/assets/7b888c7d-a1e9-4d0b-ba6d-9a41916acf79)


Release Notes:

- edit prediction: Disable "This Buffer" option when predictions are
disabled for its language
2025-02-25 15:41:13 +00:00
Marshall Bowers
21fc3c07b6
language_models: Store Bedrock credentials under https://amazonaws.com in the keychain (#25565)
This PR updates the Bedrock provider to store the AWS credentials under
`https://amazonaws.com` in the keychain.

Release Notes:

- N/A
2025-02-25 15:32:27 +00:00
Piotr Osiewicz
c90f87898a
diagnostics: Ensure that clean state is not shown when tab content indicates problems in workspace (#25345)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
2025-02-25 15:24:30 +00:00
smit
796e87ecbc
project_panel: Open file in editor on paste action when single entry (#25555)
Closes #25145

Now, upon pasting a file into the project panel after a copy or cut
operation, it will open in the editor. This buffer in the editor will be
in focus if there is no need to rename the newly pasted file. If a
rename is pending, it simply focuses on the rename editor.


https://github.com/user-attachments/assets/563b22ec-d1f6-4d92-af18-29d10620832c


Future: After the rename is completed, we can decide to focus on the
editor buffer, but this will be addressed in a follow-up, as there will
be multiple cases, such as renaming via a paste action where we want to
focus, and renaming directly via a rename action where we might not want
to focus.

Release Notes:

- Fixed scenario where pasting a file in the project panel after a
copy/cut operation wouldn't automatically open it in the editor.
2025-02-25 16:39:16 +05:30
Joseph T. Lyons
3a041cac72
Consider triagers team when finding issues needing responses (#25554)
Release Notes:

- N/A
2025-02-25 10:58:37 +00:00
Piotr Osiewicz
86283f4e3d
lsp: Fix buffer snapshots sometimes going missing (#25548)
A call to register_buffer_with_language_servers could nuke existing
snapshots, even when the buffer was already registered with a server.

Essentially, had we had the else branch in place, this would have been
detected.

Closes #ISSUE

Release Notes:

- Fixed Rust analyzer renames sometimes failing. (Preview only)
2025-02-25 09:39:09 +00:00
张小白
8e1003ef59
fs: Bring back copy paste again (#25543)
Closes #25317

cc @0xtimsb 

Release Notes:

- N/A
2025-02-25 17:36:07 +08:00
张小白
8e891c16f8
Bring back our CI (#25545)
Closes #ISSUE

Fix `The package requires the Cargo feature called edition2024, but that
feature is not stabilized in this version of Cargo (1.81.0`

Release Notes:

- N/A
2025-02-25 09:07:52 +00:00
5brian
cea06bc0ce
git_panel: Apply tooltip to checkbox instead of container (#25533)
Closes #ISSUE

Small tweak: The tooltip was activating on the icon

|Before|After|
|---|---|

|![image](https://github.com/user-attachments/assets/a1a5b4a7-f949-402e-a038-5f1b4445f068)|![image](https://github.com/user-attachments/assets/cb55f193-e665-4e88-b8d8-a437a7200eea)|

Release Notes:

- N/A
2025-02-25 00:28:35 -05:00
Cole Miller
45146b6f30
Implement staging of partially-staged hunks (#25520)
Closes: #25475 

This PR makes it possible to stage uncommitted hunks that overlap but do
not coincide with an unstaged hunk.

Release Notes:

- Made it possible to stage hunks that are already partially staged

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Max <max@zed.dev>
2025-02-24 23:13:13 -05:00
Conrad Irwin
bcbb19e06e
Fix leaked editor (#25530)
Closes #ISSUE

Release Notes:

- Fixed a bug that would prevent rejoining projects sometimes
2025-02-25 03:10:45 +00:00
Agus Zubiaga
3f168e85c2
edit predictions: Invalidate cached settings and unset provider when set to none (#25505)
Fixes a few state mismatches when changing providers and other settings

Release Notes:

- edit predictions: Fix mismatch between status bar settings and editor
control settings
- edit predictions: Turn off as soon as `edit_prediction_provider` is
set to `none`

---------

Co-authored-by: Danilo <danilo@zed.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-02-24 22:56:28 -03:00
Conrad Irwin
20440f83e9
Attempt to not notarize so much (#25515)
https://developer.apple.com/forums/thread/718583 suggests that if you
staple a dmg, then the ticket is copied along with the app when you copy
it out of the dmg.

Closes #ISSUE

Release Notes:

- N/A
2025-02-24 18:48:47 -07:00
Peter Tripp
2d63f7628f
Remove cmd-g for git::Commit (#25524)
Conflicts with `search::SelectNextMatch`
2025-02-25 01:45:45 +00:00
5brian
52f73e0c2d
vim: Refactor and fix multiline operations (#25055)
Changes:
- [x] Cursor at the start during yank operations on objects (`yip`,
`yab` etc).
- [x] Refactors this: Trim all leading and trailing whitespace from
inner multiline bracket selection.
  - This leaves a nicely indented line when doing `ci{` `vi{d` etc
  - [x] Checks for empty selection
  - [x] Removed moving cursor to the start in visual bracket operations

This cleans up the previous implementation by providing a simpler check
in `surrounding_markers`, instead of calling a new function in
`expand_object`. No functionality was changed there except for handling
the empty selection and removing some cursor adjustments that should not
have been there after further testing.

Release Notes:

- N/A
2025-02-24 18:30:21 -07:00
RieN 7z
980e1b533f
Fix missing selection range in Vim visual line mode in the assistant panel (#25133)
Closes #25132

Release Notes:

- Fixed issues with `assistant: insert into editor` and `editor: copy` not inserting/copying the correct text inside of the assistant panel when selected using line-wise selection in Vim mode

---------

Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>
2025-02-25 01:15:15 +00:00
Beniamin Zagan
2ea332421c
Update bug template (#25499) 2025-02-24 19:41:31 -05:00
josh rotenberg
4edecfed3e
docs: Update rust-analyzer doc links (#25521)
The rust-analyzer documentation has moved to mdbook. This fixes a few of
the links in the Rust documentation that point to the old manual.

Release Notes:

- N/A
2025-02-25 00:27:41 +00:00
Finn Evers
113c471bb0
rust: Restore and update attribute highlighting (#25501)
#25333 added broader highlighting for identifiers, which broke the
generic query for attribute queries, resulting in these being
highlighted the same as identifiers.

To accomodate for this change, this PR updates the attribute matches to
be more specific.

Additionally, path matches in scoped identifiers are no longer
highlighted as attributes, as seen in the comparison screenshot. Can
revert this if requested.

| Zed Preview | <img width="750" alt="preview"
src="https://github.com/user-attachments/assets/2cd2e830-f510-4adf-8ce9-c41ed6fb157c"
/> |
| --- | --- | 
| `main` | <img width="750" alt="main"
src="https://github.com/user-attachments/assets/cbe93186-9afd-4515-bc06-e519fd4ee6af"
/> |
| This PR | <img width="750" alt="pr"
src="https://github.com/user-attachments/assets/68270de8-e083-4fc6-a45e-25d3151acd87"
/> |

The generic match for `token_tree` is needed to recursively match
patterns like `#[cfg(any(test, feature = "test-support"))]` (or at least
I was unable to find a better query here). I tried to validate that this
does not break any other highlights and I believe it does not. However,
I might have still missed something.

Release Notes:

- N/A
2025-02-24 19:10:30 -05:00
Anthony Eid
10fef92eea
Dismiss git commit modal when it's out of focus (#25518)
Release Notes:

- Fix git commit modal not being dismissed when pressing esc key or
clicking outside the modal
2025-02-25 00:09:46 +00:00
Anthony Eid
3ee4edc404
Fix go to definition split (#24990)
Closes #24982 

Release Notes:

- Fix `GoToDefinitionSplit` action bug where split wouldn't happen if
definition was in the same active editor

---------

Co-authored-by: Dylan <dylwil3@gmail.com>
2025-02-24 18:46:13 -05:00
Shardul Vaidya
eda233344c
assistant: Add Bedrock support (#21092)
Closes #16544

Release Notes:

- Added support for AWS Bedrock to the Assistant.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2025-02-24 18:10:12 -05:00
Michael Sloan
17a483cb03
Make generate-licenses scripts pass shellcheck (#25516)
Release Notes:

- N/A
2025-02-24 23:03:05 +00:00
Conrad Irwin
7b277d2efd
Fix run indicators jumping when buffer content changes. (#25507)
Co-authored-by: Anthony Eid <hello@anthonyeid.me>

Release Notes:

- Fix run indicators jumping when content changes

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2025-02-24 22:57:54 +00:00
Conrad Irwin
63cfcc26fb
Fix jumping to multibuffer excerpts from deleted hunks (#25512)
Co-authored-by: Anthony Eid <hello@anthonyeid.me>

Release Notes:

- N/A

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2025-02-24 15:56:11 -07:00
Conrad Irwin
53a5145dc8
Fix performance of GitPanel::update_visible_entries (#25504)
Co-authored-by: Anthony Eid <hello@anthonyeid.me>

Closes #19022

Release Notes:

- Fixes pessimal performance with the new git panel when a very large
number of files are untracked

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2025-02-24 15:55:44 -07:00
Marshall Bowers
def342e35c
Remove dependents of language_models (#25511)
This PR removes the dependents of the `language_models` crate.

The following types have been moved from `language_models` to
`language_model` to facilitate this:

- `LlmApiToken`
- `RefreshLlmTokenListener`
- `MaxMonthlySpendReachedError`
- `PaymentRequiredError`

With this change only `zed` now depends on `language_models`.

Release Notes:

- N/A
2025-02-24 22:46:45 +00:00
5brian
bbb8d63de0
vim: Register backquote object (#25502)
Closes #25496

Release Notes:

- vim: Fixed operations on backtick quotes
2025-02-24 15:33:17 -07:00
Marshall Bowers
e5b97a5e48
Move report_assistant_event into language_model crate (#25508)
This PR moves the `report_assistant_event` function from the
`language_models` crate to the `language_model` crate.

This allows us to drop some dependencies on `language_models`.

Release Notes:

- N/A
2025-02-24 22:27:26 +00:00
Cole Miller
e06666759a
Improve performance of project panel with many git statuses (#25465)
Closes #ISSUE

Release Notes:

- Improved performance of project panel in large git repositories
2025-02-24 17:03:52 -05:00
Conrad Irwin
a78f3cfea2
Notarize with a team key (#25479)
Should make it less likely that notorization fails when nathan changes
his passwords.

(though probably no less likly to fail beacuse apple forces us to resign
new agreements on the regular)

Release Notes:

- N/A

---------

Co-authored-by: Peter Tripp <peter@zed.dev>
2025-02-24 14:43:59 -07:00
Marshall Bowers
0acd556106
language_model: Remove dependencies on individual model provider crates (#25503)
This PR removes the dependencies on the individual model provider crates
from the `language_model` crate.

The various conversion methods for converting a `LanguageModelRequest`
into its provider-specific request type have been inlined into the
various provider modules in the `language_models` crate.

The model providers we provide via Zed's cloud offering get to stay, for
now.

Release Notes:

- N/A
2025-02-24 16:41:35 -05:00
Agus Zubiaga
2f7a62780a
edit predictions: Refine leading whitespace behavior (#25491)
Closes https://github.com/zed-industries/zed/issues/25406

### Problem

Users have been confused about requiring `alt-tab` instead of just `tab`
in cases where they don't have a completions menu open (see issue
above). When they insert a newline and are in leading whitespace, they
expect to be able to accept a prediction with just `tab`, but doing so
increasing the indentation instead.

This PR changes the behavior in so a modifier is only required if the
cursor isn't already at the right indentation level based on the
surrounding block. In this case, `tab` would increase the indentation
and the prediction would get interpolated, allowing the user to press
`tab` again to accept it.

We also updated the docs to break down this behavior:
https://github.com/zed-industries/zed/pull/25493

### Before


https://github.com/user-attachments/assets/91fe6193-dddd-43c1-8c26-0f4648bdc3fa

### After


https://github.com/user-attachments/assets/671041bf-bf22-46a3-8466-b19b3e7dd6a0


Release Notes:

- edit predictions: Do not require a modifier key when indentation is
correct according to its surrounding block

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-02-24 18:37:18 -03:00
João Marcos
f1e6b144e8
Git: Add hotkey to open file from changes list (#25500)
Release Notes:

- N/A
2025-02-24 21:22:25 +00:00
Peter Tripp
10a4760f90
Add Anthropic Claude 3.7 support (#25497) 2025-02-24 16:10:26 -05:00
Marshall Bowers
cdd07fdf29
Add aws_http_client and bedrock crates (#25490)
This PR adds new `aws_http_client` and `bedrock` crates for supporting
AWS Bedrock.

Pulling out of https://github.com/zed-industries/zed/pull/21092 to make
it easier to land.

Release Notes:

- N/A

---------

Co-authored-by: Shardul Vaidya <cam.v737@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2025-02-24 20:28:20 +00:00
Michael Sloan
8a3fb890b0
Document why ForegroundExecutor is !Send (#25492)
Release Notes:

- N/A
2025-02-24 19:48:59 +00:00
Nate Butler
30af8d0a81
git_ui: Commit modal refinement (#25484)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-02-24 19:19:06 +00:00
Agus Zubiaga
ceb7fc2cb2
edit predictions: Split layout_edit_prediction popover (#25463)
This function has grown a lot and it was getting really hard to
navigate. This PR splits it into smaller methods and moves it into
`Editor` with the rest of the edit prediction popovers' code.

I think there are opportunities to consolidate the many popovers we
have, but we'll do that separately.

Release Notes:

- N/A
2025-02-24 16:16:19 -03:00
Peter Tripp
d8694510b5
emacs: Add support for paragraph navigation (#25284)
- emacs: Added support for `alt-{` and `alt-}` paragraph navigation
2025-02-24 19:02:07 +00:00
João Marcos
ec7ce41324
Git: Fix Linux bindings (#25486)
- Tooltip with binding wasn't showing up
- Missing Linux bindings
- Commit modal wasn't opening when binding was pressed

Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-02-24 18:49:17 +00:00
Peter Tripp
b2921bd3fd
Disable edit predictions in diff/patch files by default (#25291) 2025-02-24 13:47:11 -05:00
Peter Tripp
64756fa96f
Fix tmux being broken by default on Linux (#25476)
Tmux uses `ctrl-b` as default prefix.
Prior to this tmux was basically useless in the default zed configuration.
(ctrl-b would toggle the left dock).
2025-02-24 13:43:15 -05:00
Mikayla Maki
ff6844300e
Git push/pull/fetch (#25445)
Release Notes:

- N/A

---------

Co-authored-by: Michael Sloan <mgsloan@gmail.com>
2025-02-24 18:29:52 +00:00