Commit graph

3639 commits

Author SHA1 Message Date
张小白
3b1f6eaab8
client: Try to re-introduce HTTP/HTTPS proxy (#31002)
When building for the `x86_64-unknown-linux-musl` target, the default
`openssl-dev` is compiled for the GNU toolchain, which causes a build
error due to missing OpenSSL. This PR fixes the issue by avoiding the
use of OpenSSL on non-macOS and non-Windows platforms.


Release Notes:

- N/A
2025-05-21 09:08:32 +08:00
Kirill Bulatov
e4262f97af
Restore the ability to drag and drop images into the editor (#31009)
`ImageItem`'s `file` is returning `""` as its `path` for single-filed
worktrees like the ones are created for the images dropped from the OS.
`ImageItem::load_image_metadata` had used that `path` in FS operations
and the other method tried to use for icon resolving.

Rework the code to use a more specific, `worktree::File` instead and
always use the `abs_path` when dealing with paths from this `file`.

Release Notes:

- Fixed images not opening on drag and drop into the editor
2025-05-20 12:38:24 +00:00
Piotr Osiewicz
a092e2dc03
extension: Add debug_adapters to extension manifest (#30676)
Also pass worktree to the get_dap_binary.

Release Notes:

- N/A
2025-05-20 11:01:33 +02:00
Max Brunsfeld
c747a57b7e
Revert "client: Add support for HTTP/HTTPS proxy" (#30979)
Reverts zed-industries/zed#30812

This PR broke nightly builds on linux by adding an OpenSSL dependency to
the `remote_server` binary, which failed to link when building against
musl.

Release Notes:

- N/A
2025-05-19 20:19:40 -04:00
Umesh Yadav
926f377c6c
language_models: Add tool use support for Mistral models (#29994)
Closes https://github.com/zed-industries/zed/issues/29855

Implement tool use handling in Mistral provider, including mapping tool
call events and updating request construction. Add support for
tool_choice and parallel_tool_calls in Mistral API requests.

This works fine with all the existing models. Didn't touched anything
else but for future. Fetching models using their models api, deducting
tool call support, parallel tool calls etc should be done from model
data from api response.

<img width="547" alt="Screenshot 2025-05-06 at 4 52 37 PM"
src="https://github.com/user-attachments/assets/4c08b544-1174-40cc-a40d-522989953448"
/>

Tasks:

- [x] Add tool call support
- [x] Auto Fetch models using mistral api
- [x] Add tests for mistral crates.
- [x] Fix mistral configurations for llm providers.

Release Notes:

- agent: Add tool call support for existing mistral models

---------

Co-authored-by: Peter Tripp <peter@zed.dev>
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
2025-05-19 18:36:59 +02:00
Ben Brandt
26a8cac0d8
extension_host: Turn on parallel compilation (#30942)
Precursor to other optimizations, but this already gets us a big
improvement.

Wasm compilation can easily be parallelized, and with all of the cores
on my M4 Max this already gets us an 86% improvement, bringing loading
an extension down to <9ms.

Not all setups will see this much improvement, but it will use the cores
available (it just uses rayon under the hood like we do elsewhere).
Since we load extensions in sequence, this should have a nice impact for
users with a lot of extensions.

#### Before

```
Benchmarking load: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 6.5s, or reduce sample count to 70.
load                    time:   [64.859 ms 64.935 ms 65.027 ms]
Found 8 outliers among 100 measurements (8.00%)
  2 (2.00%) low mild
  3 (3.00%) high mild
  3 (3.00%) high severe
```

#### After

```
load                    time:   [8.8685 ms 8.9012 ms 8.9344 ms]
                        change: [-86.347% -86.292% -86.237%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high mild
```

Release Notes:

- N/A
2025-05-19 18:06:33 +02:00
Ben Brandt
57424e4743
language_models: Update tiktoken-rs to support newer models (#30951)
I was able to get this fix in upstream, so now we can have simpler code
paths for our model selection.

I also added a test to catch if this would cause a bug again in the
future.

Release Notes:

- N/A
2025-05-19 11:40:36 +00:00
Smit Barmase
0079c99c2c
editor: Add python indentation tests (#30902)
This PR add tests for a recent PR: [language: Fix indent suggestions for
significant indented languages like
Python](https://github.com/zed-industries/zed/pull/29625)

It also covers cases from past related issues so that we don't end up
circling back to them on future fixes.

- [Python incorrect auto-indentation for
except:](https://github.com/zed-industries/zed/issues/10832)
- [Python for/while...else indention overridden by if statement
](https://github.com/zed-industries/zed/issues/30795)
- [Python: erroneous indent on newline when comment ends in
:](https://github.com/zed-industries/zed/issues/25416)
- [Newline in Python file does not indent
](https://github.com/zed-industries/zed/issues/16288)
- [Tab Indentation works incorrectly when there are multiple
cursors](https://github.com/zed-industries/zed/issues/26157)

Release Notes:

- N/A
2025-05-18 07:29:25 +05:30
Marshall Bowers
dd3956eaf1
Add a picker for jj bookmark list (#30883)
This PR adds a new picker for viewing a list of jj bookmarks, like you
would with `jj bookmark list`.

This is an exploration around what it would look like to begin adding
some dedicated jj features to Zed.

This is behind the `jj-ui` feature flag.

Release Notes:

- N/A
2025-05-17 16:42:45 +00:00
Marshall Bowers
122d6c9e4d
Upgrade tempfile to v3.20.0 (#30886)
This PR upgrades our `tempfile` dependency to v3.20.0.

Pulling out of https://github.com/zed-industries/zed/pull/30883.

Release Notes:

- N/A
2025-05-17 16:25:09 +00:00
Marshall Bowers
03419da6f1
ui_macros: Remove DerivePathStr macro (#30862)
This PR removes the `DerivePathStr` macro, as it is no longer used.

Also removes the `PathStaticStr` macro from `gpui_macros`, which was
also unused.

Release Notes:

- N/A
2025-05-17 10:05:55 +00:00
张小白
d4f47aa653
client: Add support for HTTP/HTTPS proxy (#30812)
Closes #30732

I tested it on my machine, and the HTTP proxy is working properly now.

Release Notes:

- N/A
2025-05-16 20:35:30 +08:00
Ben Brandt
355266988d
extension: Update wasi preview adapter (#30759)
Replace dynamic downloading of WASI adapter with the provided crate.

More importantly, this makes sure we are using the same adapter version
as our version of wasmtime, which includes several fixes.

Arguably we could also at this point update to wasm32-wasip2 target and
remove this dependency as well if we want, but that might need further
testing.

Release Notes:

- N/A
2025-05-15 19:10:13 +02:00
Marshall Bowers
23d42e3eaf
agent: Use inventory for AgentPreview (#30740)
This PR updates the `AgentPreview` to use `inventory` instead of
`linkme`.

Release Notes:

- N/A
2025-05-15 08:36:13 +00:00
Marshall Bowers
607bfd3b1c
component: Replace linkme with inventory (#30705)
This PR replaces the use of `linkme` with `inventory` for the component
preview registration.

Release Notes:

- N/A
2025-05-14 23:29:11 +02:00
Ben Kunkle
83498ebf2b
Improve error message around failing to install dev extensions (#30711)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-05-14 17:22:17 +00:00
Joseph T. Lyons
775370fd7d
Bump Zed to v0.188 (#30685)
Release Notes:

-N/A
2025-05-14 10:41:09 +00:00
Piotr Osiewicz
9826b7b5c1
debugger: Add extensions support (#30625)
Closes #ISSUE

Release Notes:

- N/A

---------

Co-authored-by: Anthony <anthony@zed.dev>
2025-05-13 22:42:51 +00:00
Conrad Irwin
1fd8fbe6d1
Show tasks in debugger: start (#30584)
- **Show relevant tasks in debugger: start**
- **Add history too**

Closes #ISSUE

Release Notes:

- N/A

---------

Co-authored-by: Cole <cole@zed.dev>
Co-authored-by: Anthony <anthony@zed.dev>
2025-05-13 14:25:37 +02:00
Marshall Bowers
18e911002f
zed_extension_api: Fork new version of extension API (#30611)
This PR forks a new version of the `zed_extension_api` in preparation
for new changes.

Release Notes:

- N/A
2025-05-13 08:35:15 +00:00
Bennet Bo Fenner
19b6c4444e
zeta: Do not show usage for copilot/supermaven (#30563)
Follow up to #29952

Release Notes:

- Fix an issue where zeta usage would show up when using Copilot as an
edit prediction provider
2025-05-12 14:03:50 +00:00
Liam
f14e48d202
language_models: Dynamically detect Copilot Chat models (#29027)
I noticed the discussion in #28881, and had thought of exactly the same
a few days prior.

This implementation should preserve existing functionality fairly well.

I've added a dependency (serde_with) to allow the deserializer to skip
models which cannot be deserialized, which could occur if a future
provider, for instance, is added. Without this modification, such a
change could break all models. If extra dependencies aren't desired, a
manual implementation could be used instead.

- Closes #29369 

Release Notes:

- Dynamically detect available Copilot Chat models, including all models
with tool support

---------

Co-authored-by: AidanV <aidanvanduyne@gmail.com>
Co-authored-by: imumesh18 <umesh4257@gmail.com>
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Co-authored-by: Agus Zubiaga <hi@aguz.me>
2025-05-12 11:28:41 +00:00
Julia Ryan
907b2f0521
Parse env vars and args from debug launch editor (#30538)
Release Notes:

- debugger: allow setting env vars and arguments on the launch command.

---------

Co-authored-by: Cole Miller <m@cole-miller.net>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-05-12 09:44:17 +00:00
Sergei Kartsev
cee9f4b013
Fix deprecation warning text being covered by right dock (#30456)
Closes [#30378](https://github.com/zed-industries/zed/issues/30378)

Release Notes:

- Fixed deprecation warning text being covered by right dock

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2025-05-12 03:24:21 +05:30
Piotr Osiewicz
5ba1d3edec
chore: Move component_preview into zed (#30480)
This improves our build times by ~0.2s

Closes #ISSUE

Release Notes:

- N/A
2025-05-10 22:25:35 +00:00
Kirill Bulatov
471e02d48f
Separate timeout and connection dropped errors out (#30457) 2025-05-10 15:12:58 +03:00
Marshall Bowers
fbeee1f832
zeta: Update onboarding modal with subscription info (#30439)
This PR updates the edit prediction onboarding modal with steps about
subscribing to a plan.

When the user is not subscribed to a plan, we display a link to the
account page to sign up for one:

<img width="612" alt="Screenshot 2025-05-09 at 6 04 05 PM"
src="https://github.com/user-attachments/assets/0300194a-c419-43d9-8214-080674d31e12"
/>

If the user is already subscribed to a plan we indicate which plan they
are on and how many edit predictions they get with it:

<img width="616" alt="Screenshot 2025-05-09 at 6 03 16 PM"
src="https://github.com/user-attachments/assets/e2506096-e499-41f2-ba1f-fca768cb48b9"
/>

<img width="595" alt="Screenshot 2025-05-09 at 5 46 18 PM"
src="https://github.com/user-attachments/assets/de82f8c2-cad8-45fb-8988-26606a8dc3e1"
/>

Release Notes:

- N/A
2025-05-09 22:46:10 +00:00
Marshall Bowers
f29c6e5661
Update zed_llm_client to v0.8.1 (#30433)
This PR updates the `zed_llm_client` crate to v0.8.1.

The name of `Plan::Free` changed to `Plan::ZedFree` in this version.

Release Notes:

- N/A
2025-05-09 21:08:03 +00:00
peppidesu
2b249f9e68
Add support for setting font features on Linux (#27808)
Fixes #15752.
- Updated `cosmic_text` to 0.14.0
- Made a basic implementation for setting font features.

#12176 is not fixed by this PR.

Release Notes:

- Added initial support for `font_features` on Linux
2025-05-09 16:36:11 -04:00
Michael Sloan
8c8357387e
Use a single Text segment + indoc! in active thread preview (#30373)
Release Notes:

- N/A
2025-05-09 12:27:05 +00:00
Oleksiy Syvokon
023a60806a
agent: Fuzzy search in model selector (#30281)
This change enables fuzzy search on model providers and names. For
example, the query "z41" will match "zed/gpt-4.1".

Release Notes:

- Agent: Improved model selection with fuzzy search support
2025-05-09 11:36:29 +00:00
tidely
851ab13f94
gpui: Bump blade, objc2, objc2-metal, and naga (#30347) 2025-05-09 11:40:12 +03:00
Maksim Bondarenkov
ea7756b362
deps: Update aws-lc-rs to 1.13.1 (#30332)
To pull in https://github.com/aws/aws-lc/pull/2381 which fixes build on
MinGW with Clang

Release Notes:

- N/A
2025-05-09 06:12:59 +00:00
Max Brunsfeld
29c31f020e
Implement rendering of images with data urls in markdown (#30322)
Fixes #28266

![Screenshot 2025-05-08 at 5 08
21 PM](https://github.com/user-attachments/assets/774d2dde-3f2d-466c-8eb1-c67badbd89e4)

Release Notes:

- Added support for rendering images with data URLs in markdown. This
can show up in hover documentation provided by language servers.

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-05-08 18:26:24 -07:00
Agus Zubiaga
c512d43e8c
agent: Render edit tool error as markdown (#30325)
Release Notes:

- agent: Render edit tool error as markdown and allow selecting it
2025-05-09 01:18:52 +00:00
Cole Miller
8b764a5477
Add a test for remote tool use by the agent (#30289)
- Adds a new smoke test for the use of the read_file tool by the agent
in an SSH project
- Fixes the SSH shutdown sequence to use a timer from the app's executor
instead of always using a real timer
- Changes the main executor loop for tests to advance the clock
automatically instead of panicking with `parked with nothing left to
run` when there is a delayed task

Release Notes:

- N/A
2025-05-08 16:53:04 -04:00
Marshall Bowers
9268308543
assistant_context_editor: Remove suggest edits (#30286)
This PR removes the code for the "Suggest Edits" functionality from
Assistant1.

This feature was already disabled entirely with the launch of the Agent,
we're just cleaning up the unused code.

Release Notes:

- N/A
2025-05-08 17:27:49 +00:00
Anthony Eid
dc01aef0cf
debugger: Update New Session Modal (#30018)
This PR simplifies the new session modal by flattening its three modes
and updating the UI to be less noisy. The new UI also defaults to the
Debug Scenario Picker, and allows users to save debug scenarios created
in the UI to the active worktree's .zed/debug.json file.


Release Notes:

- N/A
2025-05-08 16:19:14 +00:00
Marshall Bowers
6ac2f4e6a5
Remove assistant crate (#30168)
This PR removes the `assistant` crate, as it is no longer used.

Release Notes:

- N/A
2025-05-07 23:05:38 +00:00
Marshall Bowers
a34fb6f6b1
Send up Zed version with edit prediction and completion requests (#30136)
This PR makes it so we send up an `x-zed-version` header with the
client's version when making a request to llm.zed.dev for edit
predictions and completions.

Release Notes:

- N/A
2025-05-07 15:44:30 +00:00
Anthony Eid
1a520990cc
debugger: Add inline value tests (#29815)
## Context

This PR improves the accuracy of our inline values for Rust/Python. It
does this by only adding inline value hints to the last valid use of a
variable and checking whether variables are valid within a given scope
or not.

We also added tests for Rust/Python inline values and inline values
refreshing when stepping in a debug session.

### Future tasks
1. Handle functions that have inner functions defined within them.
2. Add inline values to variables that were used in inner scopes but not
defined in them.
3. Move the inline value provider trait and impls to the language trait
(or somewhere else).
4. Use Semantic tokens as the first inline value provider and fall back
to tree sitter
5. add let some variable statement, for loops, and function inline value
hints to Rust.
6. Make writing tests more streamlined. 
6.1 We should be able to write a test by only passing in variables,
language, source file, expected result, and stop position to a function.
7. Write a test that has coverage for selecting different stack frames. 

co-authored-by: Remco Smits \<djsmits12@gmail.com\>

Release Notes:

- N/A

---------

Co-authored-by: Remco Smits <djsmits12@gmail.com>
2025-05-07 12:39:35 +00:00
Marshall Bowers
5539d82ea6
agent: Remove feature flag checks (#30055)
This PR removes all of the feature flag checks related to the Agent.

Tried to do this in the least invasive way possible; we can follow up
with a full removal.

Release Notes:

- N/A
2025-05-06 21:38:05 -04:00
Joseph T. Lyons
ab3e5cdc6c
Bump Zed to v0.187 (#30052)
Release Notes:

-N/A
2025-05-07 00:03:16 +00:00
Agus Zubiaga
3cdf5ce947
agent: Allow customizing temperature by provider/model (#30033)
Adds a new `agent.model_parameters` setting that allows the user to
specify a custom temperature for a provider AND/OR model:

```json5
    "model_parameters": [
      // To set parameters for all requests to OpenAI models:
      {
        "provider": "openai",
        "temperature": 0.5
      },
      // To set parameters for all requests in general:
      {
        "temperature": 0
      },
      // To set parameters for a specific provider and model:
      {
        "provider": "zed.dev",
        "model": "claude-3-7-sonnet-latest",
        "temperature": 1.0
      }
    ],
```

Release Notes:

- agent: Allow customizing temperature by provider/model

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-05-06 20:36:25 +00:00
Mikayla Maki
0055a20512
Remember max mode setting per-thread and add a user setting (#30042)
Supersedes: https://github.com/zed-industries/zed/pull/29936

Thanks for your contribution @imumesh18, but we had a slightly different
take on it :)

Release Notes:

- N/A

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
2025-05-06 20:11:21 +00:00
Kirill Bulatov
007fd0586a
Adds a way to dismiss workspace notifications (#30015)
Closes https://github.com/zed-industries/zed/issues/10140

* On `menu::Cancel` action (`ESC`), close notifications, one by one, if
`Workspace` gets to handle this action.
More specific, focused items contexts (e.g. `Editor`) take priority.

* Allows to temporarily suppress notifications of this kind either by
clicking a corresponding button in the UI, or using
`workspace::SuppressNotification` action.

This might not work well out of the box for all notifications and might
require further improvement.


https://github.com/user-attachments/assets/0ea49ee6-cd21-464f-ba74-fc40f7a8dedf


Release Notes:

- Added a way to dismiss workspace notifications
2025-05-06 18:15:26 +03:00
Cole Miller
7d361ec97e
Fall back to old key when loading agent settings (#30001)
This PR updates #29943 to fall back to loading agent panel settings from
the old `assistant` key if the `agent` key is not present. Edits to
these settings will also target `assistant` in this situation instead of
`agent` as before.

Release Notes:

- Agent Beta: Fixed a regression that caused the agent panel not to
load, or buttons in the agent panel not to work.
2025-05-06 14:31:38 +00:00
Conrad Irwin
68793c0ac2
Debug adapters log to console (#29957)
Closes #ISSUE

Release Notes:

- N/A
2025-05-06 11:21:34 +01:00
Conrad Irwin
4fdd14c3d8
Remove another unwrap on regex compilation (#29984)
Follow up to #29979

Release Notes:

- Fixed a (hypothetical) panic in terminal search
2025-05-06 11:18:03 +01:00
Nate Butler
c5d8407df4
component: Component crate cleanup (#29967)
This PR further organizes and documents the component crate. It:

- Simplifies the component registry
- Gives access to `ComponentMetadata` sooner
- Enables lookup by id in preview extension implementations
(`ComponentId` -> `ComponentMetadata`)
- Should slightly improve the performance of ComponentPreview

It also brings component statuses to the Component trait:

![CleanShot 2025-05-05 at 23 27
11@2x](https://github.com/user-attachments/assets/dd95ede6-bc90-4de4-90c6-3e5e064fd676)

![CleanShot 2025-05-05 at 23 27
40@2x](https://github.com/user-attachments/assets/9520aece-04c2-418b-95e1-c11aa60a66ca)

![CleanShot 2025-05-05 at 23 27
57@2x](https://github.com/user-attachments/assets/db1713d5-9831-4d00-9b29-1fd51c25fcba)

Release Notes:

- N/A
2025-05-06 03:41:52 +00:00