This PR formalizes design components with the Component and
ComponentPreview traits.
You can open the preview UI with `workspace: open component preview`.
Component previews no longer need to return `Self` allowing for more
complex previews, and previews of components like `ui::Tooltip` that
supplement other components rather than are rendered by default.
`cargo-machete` incorrectly identifies `linkme` as an unused dep on
crates that have components deriving `IntoComponent`, so you may need to
add this to that crate's `Cargo.toml`:
```toml
# cargo-machete doesn't understand that linkme is used in the component macro
[package.metadata.cargo-machete]
ignored = ["linkme"]
```
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
This PR adds the branch selector to the git panel and fixes a few bugs
in the repository selector.
Release Notes:
- N/A
---------
Co-authored-by: ConradIrwin <conrad.irwin@gmail.com>
Co-authored-by: Conrad <conrad@zed.dev>
This PR updates the edit predictions to include the prediction ID
returned from the server on the resulting telemetry events indicating
whether the prediction was accepted or discarded.
The `prediction_id` on the events can then be correlated with the
`request_id` on the server-side prediction events.
Release Notes:
- N/A
- [x] snake case keymap properties
- [x] flatten actions
- [x] keymap migration + notfication
- [x] settings migration + notification
- [x] inline completions -> edit predictions
### future:
- keymap notification doesn't show up on start up, only on keymap save.
this is existing bug in zed, will be addressed in seperate PR.
Release Notes:
- Added a notification for deprecated settings and keymaps, allowing you
to migrate them with a single click. A backup of your existing keymap
and settings will be created in your home directory.
- Modified some keymap actions and settings for consistency.
---------
Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
This is a refactoring PR that does three things:
- First, it introduces a new `diff` crate that holds the previous
contents of the `git::diff` module, plus the `BufferChangeSet` type
formerly of `project::buffer_store`. The new crate is necessary since
simply moving `BufferChangeSet` into `git::diff` results in a dependency
cycle due to the use of `language::Buffer` to represent the diff base in
`BufferChangeSet`.
- Second, it renames the two main types in the new diff crate:
`BufferDiff` becomes `BufferDiffSnapshot`, and `BufferChangeSet` becomes
`BufferDiff`. This reflects that the relationship between these two
types (immutable cheaply-cloneable "value" type + stateful "resource
type" with subscriptions) mirrors existing pairs like
`Buffer`/`BufferSnapshot`. References to "change sets" throughout the
codebase are updated to refer to "diffs" instead.
- Finally, it moves the base_text field of the new BufferDiff type to
BufferDiffSnapshot.
Release Notes:
- N/A
---------
Co-authored-by: maxbrunsfeld <max@zed.dev>
This PR makes it so we send up the diagnostic groups as additional data
with the edit prediction request.
We're not yet making use of them, but we are recording them so we can
use them later (e.g., to train the model).
Release Notes:
- N/A
---------
Co-authored-by: Nathan <nathan@zed.dev>
- Adds the `panel` crate for defining UI shared between panels, like
common button and header designs, etc
- Starts to update the git ui to be more consistent with other panels
Release Notes:
- N/A
Rework of https://github.com/zed-industries/zed/pull/24130
Uses
1033c0b57e
`COMMIT_EDITMSG` language-related definitions (thanks @d1y )
Instead of using real `.git/COMMIT_EDITMSG` file, create a buffer
without FS representation, stored in the `Repository` and shared the
regular way via the `BufferStore`.
Adds a knowledge of what `Git Commit` language is, and uses it in the
buffers which are rendered in the git panel.
Release Notes:
- N/A
---------
Co-authored-by: Conrad Irwin <conrad@zed.dev>
Co-authored-by: d1y <chenhonzhou@gmail.com>
Co-authored-by: Smit <smit@zed.dev>
This PR updates the `zeta` crate to use the predictive edit DTOs defined
in the `zed_llm_client` crate.
This way we aren't duplicating their definitions (and risk them going
out of sync).
Release Notes:
- N/A
This will help us debug a panic we're seeing in their internals.
In order to make this work, I've temporarily forked async-tls with:
https://github.com/async-rs/async-tls/pull/59/files
Closes #ISSUE
Release Notes:
- N/A
This PR removes the `POST /predict_edits` endpoint from the LLM service,
as it has been superseded by the corresponding endpoint running in
Cloudflare Workers.
All traffic is already being routed to the Cloudflare Workers via the
Workers route, so nothing is hitting this endpoint running in the LLM
service anymore.
You can see the drop off in requests to this endpoint on this graph when
the Workers route was added:
<img width="472" alt="Screenshot 2025-01-30 at 9 18 04 PM"
src="https://github.com/user-attachments/assets/fa60f7c8-2737-4329-88a3-17093bdb5a29"
/>
We also don't use the `fireworks` crate anymore in this repo, so it has
been removed.
Release Notes:
- N/A
This PR adds a `schema_generator` crate that can be used to generate our
various JSON schemas for publishing elsewhere.
Currently it does the simplest thing possible and just prints the JSON
schema to stdout. We can make this a but more robust later.
I also removed the schema-printing facilities from the `theme_importer`,
as they don't really make sense there.
Release Notes:
- N/A
This PR prevents situations like
https://github.com/zed-industries/zed/pull/23850, which caused our linux
nightly build to fail to open at all.
This PR also sorts the GPUI build and dev dependencies out from the sea
of platform specific dependencies.
Release Notes:
- N/A
Part of https://github.com/zed-industries/zed/pull/21092
As we're already depending on and using `tokio` to run `reqwest`, I've
added a crate to make running tokio futures more convenient. This should
unblock the Bedrock Cloud Model provider PR.
Note that since the `gpui_tokio` code is nearly trivial glue and I
expect that it will be useful for the nascent GPUI ecosystem, I've
elected to license it under Apache 2, like GPUI itself, instead of our
normal GPL license for Zed code.
Release Notes:
- N/A
Closes#20762
Release Notes:
- N/A
---
Enable MSAA for Anti-Aliasing to Path (`cx.paint_path`) for drawing a
better vector graphics.
```bash
cargo run -p gpui --example gradient --features macos-blade
cargo run -p gpui --example gradient
cargo run -p gpui --example painting --features macos-blade
cargo run -p gpui --example painting
```
**Before**
<img width="1089" alt="image"
src="https://github.com/user-attachments/assets/0ae7240f-4ba9-4ef5-896c-e436c1282770"
/>
**After**
<img width="944" alt="image"
src="https://github.com/user-attachments/assets/71a07ae8-be54-452c-aacc-b8cec1f810c0"
/>
## TODO
- [x] Support Metal and Blade.
- [x] Detect system support to set up sample count.
- [x] Fix extra lines between Path vertices wait #22808 to merge.
Ref https://github.com/kvark/blade/pull/213
Ask @kvark to review.
I am not sure if there is anything I missed. I modified it according to
the
[particle](https://github.com/kvark/blade/tree/main/examples/particle)
example of Blade project. But the difference is that after the first
MSAA render, I did not do it a second time, I tested it and found it was
not necessary.
- Added support for DeepSeek as a new language model provider in Zed
Assistant
- Implemented streaming API support for real-time responses from
DeepSeek models.
- Added a configuration UI for DeepSeek API key management and settings.
- Updated documentation with detailed setup instructions for DeepSeek
integration.
- Added DeepSeek-specific icons and model definitions for seamless
integration into the Zed UI.
- Integrated DeepSeek into the language model registry, making it
available alongside other providers like OpenAI and Anthropic.
Release Notes:
- Added support for DeepSeek to the Assistant.
---------
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [metal](https://redirect.github.com/gfx-rs/metal-rs) |
workspace.dependencies | minor | `0.30` -> `0.31` |
---
### Configuration
📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
Release Notes:
- N/A
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [convert_case](https://redirect.github.com/rutrum/convert-case) |
workspace.dependencies | minor | `0.6.0` -> `0.7.0` |
---
### Configuration
📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
Release Notes:
- N/A
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR introduces a new entity called Project Tree which is responsible
for finding subprojects within a worktree;
a subproject is a language-specific subset of a worktree which should be
accurately tracked on the language server side. We'll have an ability to
set multiple disjoint workspaceFolders on language server side OR spawn
multiple instances of a single language server (which will be the case
with e.g. Python language servers, as they need to interact with
multiple disjoint virtual environments).
Project Tree assumes that projects of the same LspAdapter kind cannot
overlap. Additionally project nesting is not allowed within the scope of
a single LspAdapter.
Closes https://github.com/zed-industries/zed/issues/5108
Re-lands #22182 which I had to revert due to merging it into todays
Preview.
Release Notes:
- Language servers now track their working directory more accurately.
---------
Co-authored-by: João <joao@zed.dev>
This PR introduces a new entity called Project Tree which is responsible
for finding subprojects within a worktree;
a subproject is a language-specific subset of a worktree which should be
accurately tracked on the language server side. We'll have an ability to
set multiple disjoint `workspaceFolder`s on language server side OR
spawn multiple instances of a single language server (which will be the
case with e.g. Python language servers, as they need to interact with
multiple disjoint virtual environments).
Project Tree assumes that projects of the same LspAdapter kind cannot
overlap. Additionally **project nesting** is not allowed within the
scope of a single LspAdapter.
Closes#5108
Release Notes:
- Language servers now track their working directory more accurately.
---------
Co-authored-by: João <joao@zed.dev>
This PR adds a rough-and-ready picker for selecting which of the
project's repositories the git panel should display.
Release Notes:
- N/A
---------
Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Nate <nate@zed.dev>
This PR adds a new `assistant_context_editor` crate.
This will ultimately house the `ContextEditor` so that it can be
consumed by both `assistant` and `assistant2`.
For the purposes of this PR, we just introduce the crate and move some
supporting constructs to it, such as the `ContextStore`.
Release Notes:
- N/A
Note: Design hasn't been reviewed yet, but the logic is done
When the user switches the inline completion provider to `zed`, we'll
show a modal prompting them to accept terms if they haven't done so:
https://github.com/user-attachments/assets/3fc6d368-c00a-4dcb-9484-fbbbb5eb859e
If they dismiss the modal, they'll be able to get to it again from the
inline completion button:
https://github.com/user-attachments/assets/cf842778-5538-4e06-9ed8-21579981cc47
This also stops zeta sending requests that will fail immediately when
ToS are not accepted.
Release Notes:
- N/A
---------
Co-authored-by: Richard <richard@zed.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Joao <joao@zed.dev>
Now we ensure that task output is fully drained and printed to Zed
terminal pane on task completion.
This change depends on a recent change to alacritty_terminal crate:
5e78d20c70.
Closes https://github.com/zed-industries/zed/issues/18342
Release Notes:
- Fixed missing task terminal output on Linux for short-running commands
This PR extracts the streaming diff implementation to its own
`streaming_diff` crate.
It was duplicated between `assistant` and `assistant2`, but their
implementations were exactly the same (and I don't see a reason why they
would need to diverge).
Release Notes:
- N/A
This PR adds a new `prompt_library` crate and extracts the `PromptStore`
and `PromptBuilder` to it.
Eventually we'll want to house the `PromptLibrary` itself in this crate,
but right now that involves untangling a few dependencies.
Release Notes:
- N/A
This PR dedupes the `AssistantSettings` so we can use the same settings
for both Assistant1 and Assistant2.
We originally forked them so we could change the Assistant2 settings
freely, but given our rollout strategy for the new Assistant, I don't
think that makes sense.
This also fixes the issue where the JSON language server would show a
"Matches multiple schemas when only one must validate" warning in
`settings.json`.
Closes#23171.
Release Notes:
- Fixed the "Matches multiple schemas when only one must validate"
warning for the `assistant` setting.