Compare commits

...

462 Commits

Author SHA1 Message Date
Mikayla Maki
7c2dffc792 Wire through IPC mechanism for GIT_ASKPASS
co-authored-by: julia@zed.dev
2025-02-28 20:56:11 -08:00
Piotr Osiewicz
e4e758db3a Rust 1.85 (#25272)
Closes #ISSUE

Release Notes:

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

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2025-02-28 18:33:35 +01:00
Marshall Bowers
fc52b43159 assistant2: Factor out tool use into its own module (#25819)
This PR factors out the concerns related to tool use out of `Thread` and
into their own module.

Release Notes:

- N/A
2025-02-28 17:04:20 +00:00
Marshall Bowers
b445e4ce24 assistant2: Rework how tool results are stored and referred to (#25817)
This PR reworks how we store tool results and refer to them later.

We now maintain a mapping of the tool uses to their corresponding
results, with separate mappings for the messages and the tool uses they
correspond to.

Release Notes:

- N/A
2025-02-28 11:33:08 -05:00
Danilo Leal
508b581215 assistant: Refine settings view's instruction visuals (#25812)
I've been bothered by using simple hyphens for bullet lists here for a
while; it kinda looked cheap and not well-formatted. So, in this PR, I'm
adding a new, custom UI component in the `language_models` crate, called
`InstructionListItem`, based off the `ListItem` that's somewhat
mimic'ing what a `<li>` would be on the web.

It does have a "rigid" structure as in it's always a label followed by a
button (which is optional), but that seems okay given it has been the
overall shape of the copy we've been using here. Also, never really
loved that we were pasting URLs directly, that kinda felt cheap, too. I
could see an argument where it's just clearer, but it looks too
cluttered, as URLs aren't super pretty, necessarily.

| Before | After |
|--------|--------|
| <img
src="https://github.com/user-attachments/assets/ffd1ac27-b1f4-450d-abf5-079285fc9877"
width="700px" /> | <img
src="https://github.com/user-attachments/assets/28fb9d0d-205d-45d8-9e43-1aaa947adc96"
width="700px" /> |

Release Notes:

- N/A
2025-02-28 12:06:47 -03:00
张小白
c9aba6c10a windows: Use a clippy script instead of xtask (#25807)
Closes #ISSUE

Match the behaviour of our macOS and Linux tests

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-02-28 14:01:10 +00:00
Kirill Bulatov
5740fec9d5 Ensure search input always has regex language synced with search_options state (#25811)
Follow-up to https://github.com/zed-industries/zed/pull/25797

Release Notes:

- N/A
2025-02-28 13:15:25 +00:00
张小白
22220ed32e windows: Remove unnecessary code in #25412 (#25805)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-02-28 11:05:39 +00:00
Kirill Bulatov
7440833ff1 Add a way to toggle inlay hints with modifiers #2 (#25766)
https://github.com/zed-industries/zed/pull/25752 with fixes on top

* Ensures no flickering happens for all modifiers `: false` case
* Dismisses the toggled state on focus out
* Reworks cache state so that "enabled" and "toggled by modifiers" are
different states with their own lifecycle

Release Notes:

- N/A
2025-02-28 08:03:25 +00:00
Kirill Bulatov
bb3aef15eb Reset buffer language on buffer search redeploy (#25797)
Closes https://github.com/zed-industries/zed/issues/25792

Release Notes:

- Fixed search input regex highlight not going away after redeploy
2025-02-28 08:01:01 +00:00
Devzeth
ece1818301 docs: Add documentation for use_smartcase_search (#25786)
Closes #24795

Added missing documentation for `use_smartcase_search`. 

Release Notes:

- N/A
2025-02-28 09:45:40 +02:00
smit
604eb91a6c logging: Add runtime log replace upon max size limit (#25768)
Closes #25638

We currently only check the log size limit at startup and move `Zed.log`
to `Zed.log.old`. If a user runs Zed for an extended period, there's no
runtime restriction on the log file size, which can cause it to grow to
several gigabytes.

This PR fixes that by tracking the log file size while writing. If it
exceeds a certain threshold, we perform the same log replace and
continue logging.

Release Notes:

- Fixed an issue where `Zed.log` could grow excessively large during
long sessions of Zed.
2025-02-28 12:23:30 +05:30
5brian
472dde509f Capitalize default slash command description (#25794)
Update default slash command to use description constant format from
https://github.com/zed-industries/zed/pull/18595.

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

|![image](https://github.com/user-attachments/assets/107a321e-0e91-40dd-8c38-4d55fd4f6d28)|![image](https://github.com/user-attachments/assets/f487a518-15bb-45c4-b524-25e6373a5886)|

^ This is when you type slash in the assistant panel.

Release Notes:

- N/A
2025-02-28 00:20:50 -03:00
Nathan Igo
212c8f4c31 html: Bump to v0.1.6 (#25791)
Includes:
- #25130

Release Notes:

- N/A
2025-02-27 20:38:55 -05:00
Shardul Vaidya
6092918be8 assistant: Improve Amazon Bedrock configuration instructions (#25699) 2025-02-27 21:36:41 -03:00
Joseph T. Lyons
a5f96909cb Update to suggest commit message based on file staging (#25790)
Currently, you only get a suggested commit message if you have a single
changed file in the repository. After the PR, the suggest happens per
single-staged file.

https://github.com/user-attachments/assets/4cc19fe6-099c-4690-967d-898b8ca7540b

Release Notes:

- N/A
2025-02-28 00:19:58 +00:00
Piotr Osiewicz
b15aa5e018 rust: Fix test/doctest tasks showing up outside of tests (#25787)
Closes #ISSUE

Release Notes:

- Fixes Rust test tasks showing up outside of tests
2025-02-28 00:48:19 +01:00
Cole Miller
62fb555e18 Use "restore" more consistently in the git panel (#25780)
This PR replaces almost all uses of "discard" in the git panel UI with
"restore", since that's the verb we settled on for the project diff.

The only exception is in the confirmation prompt for restoring files,
where I've kept the "discard changes" language. I think consistency is
less important here and it's helpful to rephrase the action that's being
taken to emphasize that it's destructive.

Release Notes:

- N/A
2025-02-27 18:45:56 -05:00
FalkWoldmann
c0ecf8684e Remove once_cell dependency (#25769)
Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-27 23:34:37 +00:00
Kirill Bulatov
df7beb4217 Use active worktree's task sources (#25784)
Follow-up of https://github.com/zed-industries/zed/pull/25605

Previous PR made global tasks with `ZED_WORKTREE_ROOT` available for
"nothing open" scenario, this PR also gets all related worktree task
templates, using the centralized `TextContexts`' active worktree
detection.

Release Notes:

- N/A
2025-02-27 22:57:59 +00:00
Marshall Bowers
6f30d5da71 Use consistent comment style in default.json (#25783)
This PR updates the comments in the `default.json` file consistently use
`//`.

Some comments were using `///`, which doesn't make sense in JSONC.

Release Notes:

- N/A
2025-02-27 22:50:23 +00:00
Marshall Bowers
b8387c6077 docs: Clarify wording around ... in language_servers setting (#25782)
This PR clarifies the wording around how `...` is used in the
`language_servers` setting.

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

Release Notes:

- N/A
2025-02-27 22:27:40 +00:00
Marshall Bowers
c05ce882e9 docs: Add note about path in extensions.toml (#25778)
This PR adds a note about the `path` field in `extensions.toml` and how
to use it.

Suggested in https://github.com/zed-industries/extensions/pull/2128.

Release Notes:

- N/A
2025-02-27 21:47:01 +00:00
Agus Zubiaga
eaf3949614 edit predictions: Remove enabled_in_assistant docs for now (#25777)
I shouldn't have added this because it's not out yet

Release Notes:

- N/A
2025-02-27 21:23:20 +00:00
Devzeth
c47305dd7b title_bar: Fix the order of the collab buttons (#25775)
My previous #24761 and #25192 PR's changed the order of the buttons in
the title_bar for collab, the logic is kept the same but the order is
now as it was previously.

Release Notes:

- N/A

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-27 16:22:05 -05:00
Cole Miller
482a45feac Fix broken merge (#25776)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-02-27 20:48:14 +00:00
Cole Miller
7ec3702b47 Fix cursor position when navigating to a multibuffer's first excerpt (#25723)
This PR fixes an unexpected cursor position when jumping to the
beginning of the project diff editor's first excerpt if that excerpt
starts with a deleted region. Previously, the cursor would end up in the
*following* region in this situation; now it ends up at the start of the
deleted region, as happens already for excerpts that are not the first.

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
2025-02-27 14:53:34 -05:00
smit
91862ddc9f markdown_preview: Fix markdown preview not updating on AcceptEditPrediction (#25772)
Closes #25384

Markdown preview now subscribes to `ExcerptsEdited` event which is
emited when edit prediction is accepted.

Release Notes:

- Fixed markdown preview not updating when edit prediction is accepted.
2025-02-28 01:22:46 +05:30
Cole Miller
eb4fad52df Fix panic when scrolling in project diff (#25771)
It may happen that the column for the scroll anchor is nonzero, and the
adjustment we're doing here could result in an invalid point in that
case.

Release Notes:

- N/A

Co-authored-by: Max <max@zed.dev>
2025-02-27 19:35:03 +00:00
Agus Zubiaga
541a5c01a4 edit predictions: Fix docs for enabled_in_assistant (#25770)
Remove mention of "prompt editor" since that feature isn't out yet.

Release Notes:

- N/A
2025-02-27 19:30:26 +00:00
Agus Zubiaga
82f793144e edit predictions: Add enabled_in_assistant setting (#25767)
Release Notes:

- edit predictions: Add `enabled_in_assistant` setting
2025-02-27 18:52:45 +00:00
Agus Zubiaga
6eb2ffe77a Support absolute disabled_globs (#25755)
Closes: #25556

We were always comparing `disabled_globs` against the relative file
path, we'll now use the absolute path if the glob is also absolute.

Release Notes:

- Support absolute globs in `edit_predictions.disabled_globs`
2025-02-27 15:29:32 -03:00
Mikayla Maki
c5632f8c31 Revert "Add a way to toggle inlay hints with modifiers" (#25764)
This PR caused inlay hints to show on every modifiers press

Reverts zed-industries/zed#25752

Release Notes:

- N/A
2025-02-27 10:11:36 -08:00
Cole Miller
6856e869fc Fix git panel's suggested commit message not updating (#25708)
Closes #ISSUE

Release Notes:

- N/A
2025-02-27 12:27:09 -05:00
João Marcos
cc3b5c729e Keep cursor at top when diff view is first opened (#25682)
Previously, we had the cursor at the bottom while the scroll stayed at
the top.

Now, if you run `git: diff`, the cursor will also be at the top.

The cursor moving to the end was possibly a side-effect of using
`Bias::Right` for selections.

---

Release Notes:

- N/A

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-02-27 17:19:44 +00:00
Cole Miller
4e60ebab5e Fix toggling deletion hunk with mouse at start of buffer (#25726)
Closes #ISSUE

Release Notes:

- N/A
2025-02-27 12:08:20 -05:00
Kirill Bulatov
e8ef36edcc Add a way to toggle inlay hints with modifiers (#25752) 2025-02-27 17:53:10 +02:00
Piotr Osiewicz
2e98bc17cb lsp: Use available workspace folders in initialize params (#25753)
Closes https://github.com/zed-industries/zed/issues/25743
Closes https://github.com/biomejs/biome-zed/issues/73

Release Notes:

- Fixed issues with launching Svelte/Biome language servers
2025-02-27 16:45:59 +01:00
Danilo Leal
5c400dac8d assistant2: Adjust empty state layout (#25745)
Going for a different, arguably simpler design for the Assistant 2 empty
state here. Also took the opportunity to adjust other elements like the
toolbar, message editor, and some items in the configuration page.

<img
src="https://github.com/user-attachments/assets/03fd1d48-a675-4eac-b694-bbe4eeaf06e9"
width="700px"/>

Release Notes:

- N/A
2025-02-27 11:33:53 -03:00
Danilo Leal
635b80ed51 assistant2: Fix submit button width depending on certain conditions (#25748)
This PR makes the Assistant 2 submit button have a different width if
the platform is Linux or Windows, or if Vim mode is turned on. That's
because we now use written out words instead of icons for keybindings
when in those conditions.

| Before | After |
|--------|--------|
| ![CleanShot 2025-02-27 at 9  59
10@2x](https://github.com/user-attachments/assets/f1f8e27c-71c2-402c-8f7b-f9ed91e8e3bf)
| ![CleanShot 2025-02-27 at 9  56
59@2x](https://github.com/user-attachments/assets/ad13b179-daf7-4b38-83e8-1511deb97d96)
|

Release Notes:

- N/A
2025-02-27 11:33:44 -03:00
Danilo Leal
73ab5abee1 assistant2: Adjust tool call accordion visuals (#25749)
Just fine-tuning it a bit more.

<img
src="https://github.com/user-attachments/assets/0d46af77-d111-40a3-9204-d5d8aa9d4886"
width="700px"/>

Release Notes:

- N/A
2025-02-27 11:33:37 -03:00
smit
1f52aab7c7 buffer: Fix panic when multi-byte character is used in languages like Swift (#25739)
Closes #25471

In languages like Swift, names can be concatinated in form like `class
Example: UI`, notice here `Example` and `:` are two different words.
Before, `name_ranges`translation of above text would look like:

```
"class" -> [0..5]
" Example" -> [5..13] (Spaces are intentional)
"e:" -> [12..14] (This is incorrect, and should be ":" -> [13..14])
" UI" -> [14..16]
```

Because this translation does not account for concatinated words, this
might affect queries, but most importantly this panics when multi-byte
character (`ф`) is used in place of `e`, as it then tries to access
index which lies inside that multi-byte. For example, it panics on
`class Examplф: UI`.

---

This PR fixes this by handing concatinated words when calculating
`name_ranges`.

Now, the corrected ranges will look like:

```
"class" -> [0..5]
" Example" -> [5..13]
":" -> [13..14] (Now it's correct)
" UI" -> [14..16]
```

and for multi-byte character

```
"class" -> [0..5]
" Examplф" -> [5..14] (Notice ф takes two bytes)
":" -> [14..15]
" UI" -> [15..17]
```

This way, it no longer tries to access a previous index, preventing a
panic when that index contains a multi-byte character.

Release Notes:

- Fixed a panic when Cyrillic characters are used in languages like
Swift.
2025-02-27 16:27:07 +05:30
renovate[bot]
1732cdb90a Update Rust crate sea-orm to v1.1.6 (#25696)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [sea-orm](https://www.sea-ql.org/SeaORM)
([source](https://redirect.github.com/SeaQL/sea-orm)) | dev-dependencies
| patch | `1.1.5` -> `1.1.6` |
| [sea-orm](https://www.sea-ql.org/SeaORM)
([source](https://redirect.github.com/SeaQL/sea-orm)) | dependencies |
patch | `1.1.5` -> `1.1.6` |

---

### Release Notes

<details>
<summary>SeaQL/sea-orm (sea-orm)</summary>

###
[`v1.1.6`](https://redirect.github.com/SeaQL/sea-orm/blob/HEAD/CHANGELOG.md#116---2025-02-24)

[Compare
Source](https://redirect.github.com/SeaQL/sea-orm/compare/1.1.5...1.1.6)

##### New Features

- Support PgVector
[https://github.com/SeaQL/sea-orm/pull/2500](https://redirect.github.com/SeaQL/sea-orm/pull/2500)
- Added `Insert::exec_with_returning_keys` &
`Insert::exec_with_returning_many` (Postgres only)

```rust
assert_eq!(
    Entity::insert_many([
        ActiveModel { id: NotSet, name: Set("two".into()) },
        ActiveModel { id: NotSet, name: Set("three".into()) },
    ])
    .exec_with_returning_many(db)
    .await
    .unwrap(),
    [
        Model { id: 2, name: "two".into() },
        Model { id: 3, name: "three".into() },
    ]
);

assert_eq!(
    cakes_bakers::Entity::insert_many([
        cakes_bakers::ActiveModel {
            cake_id: Set(1),
            baker_id: Set(2),
        },
        cakes_bakers::ActiveModel {
            cake_id: Set(2),
            baker_id: Set(1),
        },
    ])
    .exec_with_returning_keys(db)
    .await
    .unwrap(),
    [(1, 2), (2, 1)]
);
```

- Added `DeleteOne::exec_with_returning` &
`DeleteMany::exec_with_returning`
[https://github.com/SeaQL/sea-orm/pull/2432](https://redirect.github.com/SeaQL/sea-orm/pull/2432)

##### Enhancements

- Expose underlying row types (e.g. `sqlx::postgres::PgRow`)
[https://github.com/SeaQL/sea-orm/pull/2265](https://redirect.github.com/SeaQL/sea-orm/pull/2265)
- \[sea-orm-cli] Added `acquire-timeout` option
[https://github.com/SeaQL/sea-orm/pull/2461](https://redirect.github.com/SeaQL/sea-orm/pull/2461)
- \[sea-orm-cli] Added `with-prelude` option
[https://github.com/SeaQL/sea-orm/pull/2322](https://redirect.github.com/SeaQL/sea-orm/pull/2322)
- \[sea-orm-cli] Added `impl-active-model-behavior` option
[https://github.com/SeaQL/sea-orm/pull/2487](https://redirect.github.com/SeaQL/sea-orm/pull/2487)

##### Bug Fixes

- Fixed `seaography::register_active_enums` macro
[https://github.com/SeaQL/sea-orm/pull/2475](https://redirect.github.com/SeaQL/sea-orm/pull/2475)

##### House keeping

- Remove `futures` crate, replace with `futures-util`
[https://github.com/SeaQL/sea-orm/pull/2466](https://redirect.github.com/SeaQL/sea-orm/pull/2466)

</details>

---

### 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 these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-27 08:13:25 +00:00
张小白
0625006a9e windows: Missing commit of #25412 (#25732)
Closes #ISSUE

Release Notes:

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

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-02-27 08:00:42 +00:00
renovate[bot]
0b96690446 Update Rust crate convert_case to 0.8.0 (#25711)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [convert_case](https://redirect.github.com/rutrum/convert-case) |
workspace.dependencies | minor | `0.7.0` -> `0.8.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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-27 07:53:30 +00:00
renovate[bot]
bc22690620 Update Rust crate ctor to 0.4.0 (#25712)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [ctor](https://redirect.github.com/mmastrac/rust-ctor) |
workspace.dependencies | minor | `0.3.0` -> `0.4.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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-27 07:48:46 +00:00
ishanray
4eb82c0731 docs: Add DeepSeek to list of providers (#25730)
Release Notes:

- N/A
2025-02-27 07:42:14 +00:00
renovate[bot]
fa91379119 Update Rust crate libc to v0.2.170 (#25690)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [libc](https://redirect.github.com/rust-lang/libc) |
workspace.dependencies | patch | `0.2.169` -> `0.2.170` |

---

### Release Notes

<details>
<summary>rust-lang/libc (libc)</summary>

###
[`v0.2.170`](https://redirect.github.com/rust-lang/libc/releases/tag/0.2.170)

[Compare
Source](https://redirect.github.com/rust-lang/libc/compare/0.2.169...0.2.170)

##### Added

- Android: Declare `setdomainname` and `getdomainname`
[#&#8203;4212](https://redirect.github.com/rust-lang/libc/pull/4212)
- FreeBSD: Add `evdev` structures
[#&#8203;3756](https://redirect.github.com/rust-lang/libc/pull/3756)
- FreeBSD: Add the new `st_filerev` field to `stat32`
([#&#8203;4254](https://redirect.github.com/rust-lang/libc/pull/4254))
- Linux: Add ` SI_*`` and `TRAP_\*\`\` signal codes
[#&#8203;4225](https://redirect.github.com/rust-lang/libc/pull/4225)
- Linux: Add experimental configuration to enable 64-bit time in kernel
APIs, set by `RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64`.
[#&#8203;4148](https://redirect.github.com/rust-lang/libc/pull/4148)
- Linux: Add recent socket timestamping flags
[#&#8203;4273](https://redirect.github.com/rust-lang/libc/pull/4273)
- Linux: Added new CANFD_FDF flag for the flags field of canfd_frame
[#&#8203;4223](https://redirect.github.com/rust-lang/libc/pull/4223)
- Musl: add CLONE_NEWTIME
[#&#8203;4226](https://redirect.github.com/rust-lang/libc/pull/4226)
- Solarish: add the posix_spawn family of functions
[#&#8203;4259](https://redirect.github.com/rust-lang/libc/pull/4259)

##### Deprecated

- Linux: deprecate kernel modules syscalls
[#&#8203;4228](https://redirect.github.com/rust-lang/libc/pull/4228)

##### Changed

- Emscripten: Assume version is at least 3.1.42
[#&#8203;4243](https://redirect.github.com/rust-lang/libc/pull/4243)

##### Fixed

- BSD: Correct the definition of `WEXITSTATUS`
[#&#8203;4213](https://redirect.github.com/rust-lang/libc/pull/4213)
- Hurd: Fix CMSG_DATA on 64bit systems
([#&#8203;4240](https://redirect.github.com/rust-lang/libc/pull/424))
- NetBSD: fix `getmntinfo`
([#&#8203;4265](https://redirect.github.com/rust-lang/libc/pull/4265)
- VxWorks: Fix the size of `time_t`
[#&#8203;426](https://redirect.github.com/rust-lang/libc/pull/426)

##### Other

- Add labels to FIXMEs
[#&#8203;4230](https://redirect.github.com/rust-lang/libc/pull/4230),
[#&#8203;4229](https://redirect.github.com/rust-lang/libc/pull/4229),
[#&#8203;4237](https://redirect.github.com/rust-lang/libc/pull/4237)
- CI: Bump FreeBSD CI to 13.4 and 14.2
[#&#8203;4260](https://redirect.github.com/rust-lang/libc/pull/4260)
- Copy definitions from core::ffi and centralize them
[#&#8203;4256](https://redirect.github.com/rust-lang/libc/pull/4256)
- Define c_char at top-level and remove per-target c_char definitions
[#&#8203;4202](https://redirect.github.com/rust-lang/libc/pull/4202)
- Port style.rs to syn and add tests for the style checker
[#&#8203;4220](https://redirect.github.com/rust-lang/libc/pull/4220)

</details>

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-27 09:28:52 +02:00
renovate[bot]
da2320fb40 Update Rust crate chrono to v0.4.40 (#25684)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [chrono](https://redirect.github.com/chronotope/chrono) |
workspace.dependencies | patch | `0.4.39` -> `0.4.40` |

---

### Release Notes

<details>
<summary>chronotope/chrono (chrono)</summary>

###
[`v0.4.40`](https://redirect.github.com/chronotope/chrono/releases/tag/v0.4.40):
0.4.40

[Compare
Source](https://redirect.github.com/chronotope/chrono/compare/v0.4.39...v0.4.40)

#### What's Changed

- Add Month::num_days() by
[@&#8203;djc](https://redirect.github.com/djc) in
[https://github.com/chronotope/chrono/pull/1645](https://redirect.github.com/chronotope/chrono/pull/1645)
- Update Windows dependencies by
[@&#8203;kennykerr](https://redirect.github.com/kennykerr) in
[https://github.com/chronotope/chrono/pull/1646](https://redirect.github.com/chronotope/chrono/pull/1646)
- Feature/round_up method on DurationRound trait by
[@&#8203;MagnumTrader](https://redirect.github.com/MagnumTrader) in
[https://github.com/chronotope/chrono/pull/1651](https://redirect.github.com/chronotope/chrono/pull/1651)
- Expose `write_to` for `DelayedFormat` by
[@&#8203;tugtugtug](https://redirect.github.com/tugtugtug) in
[https://github.com/chronotope/chrono/pull/1654](https://redirect.github.com/chronotope/chrono/pull/1654)
- Update LICENSE.txt by
[@&#8203;maximevtush](https://redirect.github.com/maximevtush) in
[https://github.com/chronotope/chrono/pull/1656](https://redirect.github.com/chronotope/chrono/pull/1656)
- docs: fix minor typo by
[@&#8203;samfolo](https://redirect.github.com/samfolo) in
[https://github.com/chronotope/chrono/pull/1659](https://redirect.github.com/chronotope/chrono/pull/1659)
- Use NaiveDateTime for internal tz_info methods. by
[@&#8203;AVee](https://redirect.github.com/AVee) in
[https://github.com/chronotope/chrono/pull/1658](https://redirect.github.com/chronotope/chrono/pull/1658)
- Upgrade to windows-bindgen 0.60 by
[@&#8203;djc](https://redirect.github.com/djc) in
[https://github.com/chronotope/chrono/pull/1665](https://redirect.github.com/chronotope/chrono/pull/1665)
- Add quarter (%q) date string specifier by
[@&#8203;drinkcat](https://redirect.github.com/drinkcat) in
[https://github.com/chronotope/chrono/pull/1666](https://redirect.github.com/chronotope/chrono/pull/1666)

</details>

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-27 09:28:33 +02:00
renovate[bot]
7bc31a69c3 Update aws-sdk-rust monorepo (#25704)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [aws-config](https://redirect.github.com/smithy-lang/smithy-rs) |
dependencies | patch | `1.5.16` -> `1.5.17` |
| [aws-config](https://redirect.github.com/smithy-lang/smithy-rs) |
workspace.dependencies | patch | `1.5.16` -> `1.5.17` |
|
[aws-sdk-bedrockruntime](https://redirect.github.com/awslabs/aws-sdk-rust)
| workspace.dependencies | minor | `1.74.0` -> `1.75.0` |
| [aws-sdk-kinesis](https://redirect.github.com/awslabs/aws-sdk-rust) |
dependencies | minor | `1.61.0` -> `1.62.0` |
| [aws-sdk-s3](https://redirect.github.com/awslabs/aws-sdk-rust) |
dependencies | minor | `1.76.0` -> `1.77.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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-27 09:26:59 +02:00
renovate[bot]
1e4752972f Update Rust crate rust-embed to v8.6.0 (#25720)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [rust-embed](https://redirect.github.com/pyros2097/rust-embed) |
workspace.dependencies | minor | `8.5.0` -> `8.6.0` |

---

### Release Notes

<details>
<summary>pyros2097/rust-embed (rust-embed)</summary>

###
[`v8.6.0`](https://redirect.github.com/pyros2097/rust-embed/blob/HEAD/changelog.md#860---2025-02-25)

- Update include-flate to 0.3
[#&#8203;246](https://redirect.github.com/pyrossh/rust-embed/pull/246).
Thanks to [krant](https://redirect.github.com/krant)
- refactor: remove redundant reference and closure
[#&#8203;250](https://redirect.github.com/pyrossh/rust-embed/pull/250).
Thanks to [hamirmahal](https://redirect.github.com/hamirmahal)
- refactor: replace map().unwrap_or_else().
[#&#8203;250](https://redirect.github.com/pyrossh/rust-embed/pull/255).
Thanks to [hamirmahal](https://redirect.github.com/hamirmahal)
- Compatible with Axum 0.7.9
[#&#8203;253](https://redirect.github.com/pyrossh/rust-embed/pull/253).
Thanks to [wkmyws](https://redirect.github.com/wkmyws)
- Add allow_missing option to derive macro
[#&#8203;256](https://redirect.github.com/pyrossh/rust-embed/pull/256).
Thanks to [lirannl](https://redirect.github.com/lirannl)

</details>

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-27 09:21:16 +02:00
renovate[bot]
91148a72a3 Update Rust crate uuid to v1.15.1 (#25728)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [uuid](https://redirect.github.com/uuid-rs/uuid) |
workspace.dependencies | minor | `1.13.2` -> `1.15.1` |

---

### Release Notes

<details>
<summary>uuid-rs/uuid (uuid)</summary>

###
[`v1.15.1`](https://redirect.github.com/uuid-rs/uuid/releases/tag/v1.15.1)

[Compare
Source](https://redirect.github.com/uuid-rs/uuid/compare/v1.15.0...v1.15.1)

#### What's Changed

- Guarantee v7 timestamp will never overflow by
[@&#8203;KodrAus](https://redirect.github.com/KodrAus) in
[https://github.com/uuid-rs/uuid/pull/811](https://redirect.github.com/uuid-rs/uuid/pull/811)
- Prepare for 1.15.1 release by
[@&#8203;KodrAus](https://redirect.github.com/KodrAus) in
[https://github.com/uuid-rs/uuid/pull/812](https://redirect.github.com/uuid-rs/uuid/pull/812)

**Full Changelog**:
https://github.com/uuid-rs/uuid/compare/v1.15.0...v1.15.1

###
[`v1.15.0`](https://redirect.github.com/uuid-rs/uuid/releases/tag/v1.15.0)

[Compare
Source](https://redirect.github.com/uuid-rs/uuid/compare/v1.14.0...v1.15.0)

#### What's Changed

- Add a manual `Debug` implementation for NonNilUUid by
[@&#8203;rick-de-water](https://redirect.github.com/rick-de-water) in
[https://github.com/uuid-rs/uuid/pull/808](https://redirect.github.com/uuid-rs/uuid/pull/808)
- Support higher precision, shiftable timestamps in V7 UUIDs by
[@&#8203;KodrAus](https://redirect.github.com/KodrAus) in
[https://github.com/uuid-rs/uuid/pull/809](https://redirect.github.com/uuid-rs/uuid/pull/809)
- Prepare for 1.15.0 release by
[@&#8203;KodrAus](https://redirect.github.com/KodrAus) in
[https://github.com/uuid-rs/uuid/pull/810](https://redirect.github.com/uuid-rs/uuid/pull/810)

#### New Contributors

- [@&#8203;rick-de-water](https://redirect.github.com/rick-de-water)
made their first contribution in
[https://github.com/uuid-rs/uuid/pull/808](https://redirect.github.com/uuid-rs/uuid/pull/808)

**Full Changelog**:
https://github.com/uuid-rs/uuid/compare/v1.14.0...v1.15.0

###
[`v1.14.0`](https://redirect.github.com/uuid-rs/uuid/releases/tag/v1.14.0)

[Compare
Source](https://redirect.github.com/uuid-rs/uuid/compare/v1.13.2...v1.14.0)

#### What's Changed

- Add FromStr impls to the fmt structs by
[@&#8203;tysen](https://redirect.github.com/tysen) in
[https://github.com/uuid-rs/uuid/pull/806](https://redirect.github.com/uuid-rs/uuid/pull/806)
- Prepare for 1.14.0 release by
[@&#8203;KodrAus](https://redirect.github.com/KodrAus) in
[https://github.com/uuid-rs/uuid/pull/807](https://redirect.github.com/uuid-rs/uuid/pull/807)

#### New Contributors

- [@&#8203;tysen](https://redirect.github.com/tysen) made their first
contribution in
[https://github.com/uuid-rs/uuid/pull/806](https://redirect.github.com/uuid-rs/uuid/pull/806)

**Full Changelog**:
https://github.com/uuid-rs/uuid/compare/v1.13.2...v1.14.0

</details>

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-27 09:10:49 +02:00
Anthony Eid
878b50c991 Update git panel entry checked box tooltip to say Stage/Unstage (#25678)
Before it would always say staged when a user hovered over the check
box. Now it will show the correct hover message depending on the state
of the entry

Release Notes:

- N/A
2025-02-27 00:29:26 -05:00
Marshall Bowers
e7df5ce61c assistant2: Avoid unnecessary String cloning in tool use (#25725)
This PR removes some unnecessary `String` cloning in the tool use paths.

We now store the data in `Arc<str>`s for cheap cloning.

Release Notes:

- N/A
2025-02-27 03:16:09 +00:00
Marshall Bowers
da22f21dec Move PopoverButton into ui (#25724)
This PR moves the `PopoverButton` component into the `ui` crate.

The `popover_button` crate only depended on `ui`, so there doesn't seem
to be a need for it to live in its own crate and add another step in the
crate graph.

Release Notes:

- N/A
2025-02-27 02:51:19 +00:00
Marshall Bowers
3505a17452 git_ui: Combine disjoint conditions into one (#25722)
This PR combines two disjoint conditions for the same value into one.

This makes it so the type checker can accurately reason about the
branches.

Release Notes:

- N/A
2025-02-27 02:33:25 +00:00
Marshall Bowers
81badd1fe6 Sort Cargo.tomls (#25721)
This PR sorts some `Cargo.toml`s that had become unsorted.

Release Notes:

- N/A
2025-02-27 02:28:59 +00:00
renovate[bot]
6dacc751fc Update Rust crate schemars to v0.8.22 (#25695)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [schemars](https://graham.cool/schemars/)
([source](https://redirect.github.com/GREsau/schemars)) |
workspace.dependencies | patch | `0.8.21` -> `0.8.22` |

---

### Release Notes

<details>
<summary>GREsau/schemars (schemars)</summary>

###
[`v0.8.22`](https://redirect.github.com/GREsau/schemars/blob/HEAD/CHANGELOG.md#0822---2025-02-25)

[Compare
Source](https://redirect.github.com/GREsau/schemars/compare/v0.8.21...v0.8.22)

##### Fixed:

- Fix compatibility with rust 2024 edition
([https://github.com/GREsau/schemars/pull/378](https://redirect.github.com/GREsau/schemars/pull/378))

</details>

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-26 21:28:21 -05:00
张小白
a0d1555470 windows: Fix terminal inline assistant (#25715)
Closes #18518
Closes #20546

Release Notes:

- N/A
2025-02-27 10:03:46 +08:00
Mikayla Maki
8ba7b349a5 Make the branch picker in the commit modal a popover (#25697)
Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
2025-02-27 01:56:07 +00:00
Shardul Vaidya
11838cf89e bedrock: Fix region bug (#25716)
Closes #25714

Internal team reported issue where the Bedrock provider defaulted to
"us-east-1" for all requests regardless of what is configured in the
credentials until first zed restart.

Release Notes:

- Fixed an issue where the Bedrock model provider would not always
respect the region.
2025-02-26 20:55:03 -05:00
renovate[bot]
84ded96cb2 Update serde monorepo to v1.0.218 (#25705)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [serde](https://serde.rs)
([source](https://redirect.github.com/serde-rs/serde)) | dependencies |
patch | `1.0.217` -> `1.0.218` |
| [serde](https://serde.rs)
([source](https://redirect.github.com/serde-rs/serde)) |
workspace.dependencies | patch | `1.0.217` -> `1.0.218` |
| [serde_derive](https://serde.rs)
([source](https://redirect.github.com/serde-rs/serde)) |
workspace.dependencies | patch | `1.0.217` -> `1.0.218` |

---

### Release Notes

<details>
<summary>serde-rs/serde (serde)</summary>

###
[`v1.0.218`](https://redirect.github.com/serde-rs/serde/releases/tag/v1.0.218)

[Compare
Source](https://redirect.github.com/serde-rs/serde/compare/v1.0.217...v1.0.218)

-   Documentation improvements

</details>

---

### 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 these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-26 19:59:20 -05:00
Marshall Bowers
afc61b9527 assistant2: Automatically respond to the model with tool results (#25706)
This PR updates the tool use flow in Assistant 2 to automatically
respond to the model with tool results when the tools have finished
running.

Release Notes:

- N/A
2025-02-27 00:37:44 +00:00
张小白
672a472a23 windows: Implement cli and handle open_urls (#25412)
Closes #ISSUE

Release Notes:

- N/A
2025-02-26 16:27:19 -08:00
Marshall Bowers
9822d9673c assistant2: Add Thread::send_to_model method (#25703)
This PR adds a new `send_to_model` method to the `Thread` to encapsulate
more of the thread-specific capabilities.

We then call this in `MessageEditor::send_to_model`.

Release Notes:

- N/A
2025-02-27 00:16:44 +00:00
Marshall Bowers
f0dec2f576 assistant2: Visualize tool use (#25692)
This PR adds visuals for tool use in Assistant 2:

<img width="1309" alt="Screenshot 2025-02-26 at 5 57 14 PM"
src="https://github.com/user-attachments/assets/4083ff65-a2f1-4a43-8815-0bade2c00af2"
/>

Release Notes:

- N/A
2025-02-26 23:19:24 +00:00
renovate[bot]
9f7c65df44 Update Rust crate clap to v4.5.31 (#25685)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [clap](https://redirect.github.com/clap-rs/clap) |
workspace.dependencies | patch | `4.5.30` -> `4.5.31` |

---

### Release Notes

<details>
<summary>clap-rs/clap (clap)</summary>

###
[`v4.5.31`](https://redirect.github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#4531---2025-02-24)

[Compare
Source](https://redirect.github.com/clap-rs/clap/compare/v4.5.30...v4.5.31)

##### Features

-   Add `ValueParserFactory` for `Saturating<T>`

</details>

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-26 17:55:48 -05:00
renovate[bot]
372e485ba8 Update Rust crate log to v0.4.26 (#25691)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [log](https://redirect.github.com/rust-lang/log) |
workspace.dependencies | patch | `0.4.25` -> `0.4.26` |

---

### Release Notes

<details>
<summary>rust-lang/log (log)</summary>

###
[`v0.4.26`](https://redirect.github.com/rust-lang/log/blob/HEAD/CHANGELOG.md#0426---2025-02-18)

[Compare
Source](https://redirect.github.com/rust-lang/log/compare/0.4.25...0.4.26)

</details>

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-26 17:55:29 -05:00
Marshall Bowers
b8fb416892 assistant2: Exclude tool uses and results when summarizing threads (#25689)
This PR fixes the generation of summaries for threads when tools are
being used.

Previously we were including the tool uses in the summarization request,
but this would result in invalid messages being sent to the model and
summaries not being generated.

We now exclude any tool uses or results from the model when summarizing
a thread.

Release Notes:

- N/A
2025-02-26 22:24:56 +00:00
Marshall Bowers
6a1c104522 language_settings: Add auto alias for subtle edit prediction mode (#25686)
This PR makes `auto` an alias for the `subtle` edit prediction mode.

Right now I'm in a state where I can't have valid settings in both
development and Nightly because the settings values are disparate.

Release Notes:

- N/A
2025-02-26 22:06:17 +00:00
Peter Tripp
b06da7f7fd ssh: Allow ssh -F ssh_config (#25619)
- Closes https://github.com/zed-industries/zed/issues/22818

Usage: `ssh -F ssh_config user@host.tld`

```
-F configfile
    Specifies an alternative per-user configuration file. If a configuration file
    is given on the command line, the system-wide configuration file
    (/etc/ssh/ssh_config) will be ignored. The default for the per-user
    configuration file is ~/.ssh/config. If set to “none”, no configuration files
    will be read.
```

Release Notes:

- ssh: Added support for specifying ssh_config files (`ssh -F
ssh_config`) in connection string
2025-02-26 16:23:25 -05:00
Peter Tripp
f80035e0ff Support busybox wget for downloading zed-remote-server (#25621)
- Closes: https://github.com/zed-industries/zed/issues/22380

Arch linux ships busybox wget not gnu wget.
BusyBox wget does not support `--max-redirect`.

Release Notes:

- ssh: Add support for downloading `zed-remote-server` with busybox wget (ArchLinux, etc)
2025-02-26 16:22:56 -05:00
renovate[bot]
7664c1cef5 Update actions/upload-artifact digest to 4cec3d8 (#25680)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[actions/upload-artifact](https://redirect.github.com/actions/upload-artifact)
| action | digest | `65c4c4a` -> `4cec3d8` |

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-26 16:07:26 -05:00
renovate[bot]
967792119b Pin clechasseur/rs-cargo action to 8435b10 (#25679)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[clechasseur/rs-cargo](https://redirect.github.com/clechasseur/rs-cargo)
| action | pinDigest | -> `8435b10` |

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-26 16:07:05 -05:00
João Marcos
be1ac78e11 Unfold buffers in multibuffers when editing them (#25677)
Release Notes:

- Multibuffers: Unfold excerpts when editing their contents.

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-02-26 17:39:33 -03:00
Kirill Bulatov
b5a1ae6526 Improve Zed tasks' ZED_WORKTREE_ROOT fallbacks (#25605)
Closes https://github.com/zed-industries/zed/issues/22912

Reworks the task context infrastructure so that it's possible to have
multiple contexts at the same time, and stores all possible worktree
context there.
Task UI code is now falling back to the "active" worktree context, if
active item's context did not produce a resolved task.

Current code does not produce meaningful results for projects with
multiple worktrees to avoid ambiguity and design changes: instead of
resolving tasks per worktree context available, extra worktree context
is only used when resolving tasks from the same worktree.

Release Notes:

- Improved Zed tasks' `ZED_WORKTREE_ROOT` fallbacks
2025-02-26 22:30:31 +02:00
Kirill Bulatov
d2b49de0e4 Dismiss active diagnostics on invalidation (#25646)
When migrating to gpui2,
588976d27a (diff-a3da3181e4ab4f73aa1697d7b6dc0caa0c17b2a187fb83b076dfc0234ec91f54R21)
removed the diagnostic style for "active but invalid" case: presumably,
it served as some sort of a cursor to show where to move on after the
diagnostics update, on the next `GoTo[Prev]Diagnostic` action call.

As this change went unchanged for some time, another approach is tested
now, to be more integrated with inline diagnostics: now, the active
state is cleared

Same as before this change, another `GoTo[Prev]Diagnostic` action call
will be needed to re-expand a new diagnostics, but this change makes
this expansion to happen after the cursor — before the change, Zed would
continue from the stale diagnostics.

Release Notes:

- Fixed active diagnostics becoming stale
2025-02-26 22:30:23 +02:00
Agus Zubiaga
d694458659 edit predictions: Rename edit prediction modes (#25657)
`auto` -> `stealth`
`eager_preview` -> `eager`

Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-02-26 20:23:39 +00:00
Cole Miller
7a34dd9888 Save buffers after restoring hunks in the project diff (#25620)
This PR fixes a bug where using the project diff editor to restore hunks
from a file that's not open in its own buffer would cause those reverts
to be lost once the project diff drops its excerpts for that file.

The fix is to save the buffers after restoring them but before the
excerpts are (potentially) dropped. This is done for the project diff
editor only. If we fail to save the affected files, we add their buffers
to the active workspace, so that the reverted contents are preserved and
the user can try again to save them.

- [x] Get it working
- [x] Test
- [ ] ~~Clean up boolean soup~~

Co-authored-by: Max <max@zed.dev>

Release Notes:

- N/A
2025-02-26 15:16:17 -05:00
Michael Sloan
add7ae8052 Try to reveal selection changing issues in undo/redo via logging (#25676)
This will hopefully help debug #22692. I tried this for a while locally
and saw neither these logs nor the issue.

Release Notes:

- N/A
2025-02-26 19:48:15 +00:00
Marshall Bowers
c53020ceaf vim: Combine match arms in Mode::is_visual (#25675)
This PR refactors the `Mode::is_visual` implementation to combine some
of the `match` arms.

Release Notes:

- N/A
2025-02-26 19:45:04 +00:00
Cole Miller
eeac1a9287 Style filenames and paths in project diff buffer headers according to git status (#25653)
This substitutes for the icons that we previously kept in these headers.

cc @iamnbutler 

Release Notes:

- N/A
2025-02-26 14:43:10 -05:00
0x2CA
e83ebd1fab vim: Add more tests for replace with register (#25316)
Closes #ISSUE

Add more tests

Release Notes:

- N/A
2025-02-26 12:38:50 -07:00
Conrad Irwin
afb0fd609b Chunk git status entries (#25627)
Prevents us trying to write 5M untracked files to postgres in one commit

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-02-26 12:38:16 -07:00
Conrad Irwin
b2a685f00a Fix staging error reporting (#25630)
Closes #ISSUE

Release Notes:

- N/A
2025-02-26 12:38:04 -07:00
Yicheng Liu
089ea5da50 vim: Fix back quotes not recognized as object (#24999)
Currently back quotes ``` `` ``` not recognized as an object in vim
mode, so ```c i ` ```, ```d i ` ``` not working.

It seems to be a typo introduced in #22632 : The`DoubleQuotes` line was
doubled while the `BackQuotes` line was missing.

Release Notes:

- vim: Fixed back quotes ``` `` ``` not recognized as object.

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-26 14:21:12 -05:00
smit
b6e8db244c vim: Fix search submit panic (#25673)
In file search submit action, handle unwrap when there are no prior
selection.

Fix is for recently made commits, hence no release notes.

Release Notes:

- N/A

---------

Co-authored-by: Anthony Eid <anthony@zed.dev>
2025-02-27 00:40:46 +05:30
Brandon Li
6267ab0396 vim: Add ability to change default mode (#25067)
Closes #13881, and technically resolves #14927.

Release Notes:

- Added the ability to set the default Vim mode.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-26 13:51:07 -05:00
Joseph T. Lyons
d105f04be5 Bump Zed to v0.177 (#25669)
Release Notes:

-N/A
2025-02-26 18:31:58 +00:00
Mikayla Maki
5edded5c02 Simplify project git code (#25662)
This was originally a part of another PR, but I wanted to get the
refactoring in and shift focus to working on bugs.

This causes all git commands via the `Repository` entity to be
serialized, and allows us to return values other than `Result<()>`

Release Notes:

- N/A
2025-02-26 18:16:10 +00:00
Marshall Bowers
78da39e19b assistant2: Add ability to delete past prompt editors (#25667)
This PR adds the ability to delete past prompt editors in Assistant 2,
the same way you can with threads.

Release Notes:

- N/A
2025-02-26 18:02:36 +00:00
Marshall Bowers
d82a132477 language_model: Use LanguageModelToolUseId instead of a String (#25666)
This PR updates the `LanguageModelToolResult` type to use a
`LanguageModelToolUseId` for the tool use ID instead of a `String`.

Release Notes:

- N/A
2025-02-26 17:34:16 +00:00
Federico Dionisi
f11357db7c context_server: Abstract server transport (#24528)
This PR abstracts the communication layer for context servers, laying
the groundwork for supporting multiple transport mechanisms and taking
one step towards enabling remote servers.

Key changes centre around creating a new `Transport` trait with methods
for sending and receiving messages. I've implemented this trait for the
existing stdio-based communication, which is now encapsulated in a
`StdioTransport` struct. The `Client` struct has been refactored to use
this new `Transport` trait instead of directly managing stdin and
stdout.

The next steps will involve implementing an SSE + HTTP transport and
defining alternative context server settings for remote servers.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-26 17:19:19 +00:00
Cole Miller
6d17546b1a Fix panic in file finder path elision (#25658)
Release Notes:

- N/A
2025-02-26 11:45:53 -05:00
Caleb!
60a96ab799 image_viewer: Hide breadcrumb (#25654)
Closes #25279 


![image](https://github.com/user-attachments/assets/15a0b092-449b-493c-8eea-10a3d9d1a912)

Release Notes:

- Added the ability to hide breadcrumb showing image path
2025-02-26 17:24:35 +01:00
Nate Butler
1f80f58104 git_ui: Commit modal editor cleanup (#25645)
- Fixes cursor style in the commit modal
- Use commit button instead of kb hint
- Update layout to scale better for large commit messages

No message:

![CleanShot 2025-02-26 at 10 33
22@2x](https://github.com/user-attachments/assets/fb6fc4ff-1e1d-46ae-aee0-7e21d73aaf70)

Long Message:
![CleanShot 2025-02-26 at 10 33
55@2x](https://github.com/user-attachments/assets/71a7773c-386b-47d5-abed-9a301360c35b)

![CleanShot 2025-02-26 at 10 34
06@2x](https://github.com/user-attachments/assets/dc41f0b9-2277-4034-9af2-d77fec0488d8)

Release Notes:

- N/A
2025-02-26 15:55:38 +00:00
Danilo Leal
bab65011b4 edit prediction: Refine the stealth mode (#25599)
Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
2025-02-26 12:50:11 -03:00
Piotr Osiewicz
c0b6d86c41 go: Do not fill out root_uri in initialization params to prevent stale notifications (#25644)
Closes #25381

Release Notes:

- N/A
2025-02-26 13:24:27 +01:00
Viktor Zahorodnii
39728cfc59 Add docs on keybindings to trigger runnables (#25582)
Addresses
https://github.com/zed-industries/zed/discussions/22810#discussioncomment-12239661

Release Notes:

- N/A

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2025-02-26 09:38:22 +00:00
Max Brunsfeld
ebccef1aa4 Fix staging and unstaging of added and deleted files (#25631)
* When staging in a buffer whose file has been deleted, do not save the
file
* Fix logic for writing to index when file is deleted

Release Notes:

- N/A
2025-02-26 07:25:31 +00:00
Conrad Irwin
33754f8eac Fix search skipping in vim mode (#25580)
Closes #8049

Co-authored-by: nilehmann <nico.lehmannm@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>

Release Notes:

- vim: Fix skipping of search results occasionally

Co-authored-by: nilehmann <nico.lehmannm@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2025-02-25 23:29:54 -07:00
Conrad Irwin
dd1ff9b998 Git: Fix prompts with a very large number of filenames (#25629)
Closes #ISSUE

Release Notes:

- N/A
2025-02-25 23:29:17 -07:00
Conrad Irwin
7f214ed25a git: Fix cmd-enter (#25628)
Closes #ISSUE

Release Notes:

- N/A
2025-02-25 23:07:55 -07:00
Conrad Irwin
08539b32d0 Fix some syncing issues with git statuses (#25535)
Like the real app, this one infinite loops if you have a diff in an
UnsharedFile.

Release Notes:

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

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-02-25 22:09:02 -07:00
5brian
88baf171c3 docs: Add apostrophe (#25624)
Release Notes:

- N/A
2025-02-26 03:46:02 +00:00
Peter Tripp
2f34af7811 docs: Fix SSH projects example settings (#25622) 2025-02-25 22:15:35 -05:00
Cole Miller
2978be95d7 Don't deploy git panel when opening the diff view (#25611)
Release Notes:

- N/A
2025-02-25 21:29:08 -05:00
Nate Butler
30568e6dd1 Add overflow menu to the git panel (#25618)
Before: 

![CleanShot 2025-02-25 at 20 11
48@2x](https://github.com/user-attachments/assets/2400270e-64fe-4711-a2aa-31588e73367a)

After:

![CleanShot 2025-02-25 at 20 13
18@2x](https://github.com/user-attachments/assets/70c88d2f-5e16-4f2d-9cc5-666b2f9b8de0)

Release Notes:

- N/A
2025-02-25 21:07:10 -05:00
Michael Sloan
a5698a430d Use carriage return instead of newline symbol for single line text (#25616)
I think this is clearer in the cases where it does appear. Use of NL
symbol was added in #10231

Release Notes:

- N/A
2025-02-25 18:26:50 -07:00
Marshall Bowers
57659b5552 assistant2: Fix "Open Prompt Library" button (#25612)
This PR fixes the "Open Prompt Library" button after the GPUI 3 changes.

Release Notes:

- N/A
2025-02-26 00:05:59 +00:00
Piotr Osiewicz
3db18ff053 lsp: Add support for dynamic registration of rename capability (#25610)
While looking at Biome LSP implementation I've noticed that they
register their rename capability dynamically, which we don't handle.

Release Notes:

- N/A
2025-02-25 23:54:29 +00:00
Cole Miller
198f56c763 Fix gutter highlights not matching diff hunks near excerpt boundaries (#25600)
Release Notes:

- Fixed gutter highlights not matching diff hunks in multibuffers in
some cases

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-02-25 15:33:16 -08:00
Max Brunsfeld
d68d858a10 Fix crash in BlockMap::sync when there are inlay hints w/ newlines ri… (#25598)
Closes https://github.com/zed-industries/zed/issues/25377

Release Notes:

- Fixed a crash that could happen when typing in the assistant panel
with edit predictions enabled.

---------

Co-authored-by: Cole Miller <m@cole-miller.net>
2025-02-25 22:32:14 +00:00
Marshall Bowers
7f166298db collab: Adjust maximum spending limit check (#25596)
This is a follow-up to https://github.com/zed-industries/zed/pull/25573.

We were still using the spend for a particular model when determining if
the user was over their maximum monthly spend instead of looking at the
usage across all models.

Release Notes:

- N/A
2025-02-25 16:45:01 -05:00
Piotr Osiewicz
0066071a89 lsp: Query first capable language server for requests using primary LS (#25591)
Release Notes:

- Improved Zed's handling of the following requests when the first
language server in language server settings for a given language is not
capable of handling them:
  - Perform Rename
  - Prepare Rename
  - Document Highlights
  - Find all references
  - Go to implementation
  - Go to definition
  - Go to declaration
  - Go to type definition
2025-02-25 22:12:13 +01:00
Marshall Bowers
e5b6194914 zeta: Fix update required notification not showing (#25588)
This PR fixes an issue introduced in #25530 that broke the notifications
that inform the user that a Zed update is required to continue using
edit prediction.

The issue is that the `Workspace` stored on the `Editor` is set _after_
the point we initialize Zeta, so capturing the `Workspace` at
construction time leads to it being `None`.

@ConradIrwin suggested that we could obtain the `Workspace` from the
`Window`, which does indeed do the trick.

I tested it both with and without this change by mocking the error
response, like so:

```rs
let response: Result<PredictEditsResponse, anyhow::Error> =
    Err(anyhow!(ZedUpdateRequiredError {
        minimum_version: SemanticVersion::new(0, 1, 0),
    }));
```

Release Notes:

- N/A
2025-02-25 20:02:43 +00:00
Ben Kunkle
23f61d5954 Add myself (Ben Kunkle) and Smit to the mailmap (#25590)
Co-authored-by: Smit <smit@zed.dev>

Release Notes:

- N/A

Co-authored-by: Smit <smit@ze3d.dev>
2025-02-25 19:55:39 +00:00
smit
0559e1f348 editor: Fix panic when editor::SelectLargerSyntaxNode overflows excerpt in multi buffer (#25585)
Closes #25513

This PR handles case when `editor::SelectLargerSyntaxNode` expands
across excerpt boundaries and eventually crashes in multi buffer.

Release Notes:

- Fixed panic caused when `editor::SelectLargerSyntaxNode` is called
repetedly in multi buffer.

Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>
2025-02-26 01:05:00 +05:30
Ben Kunkle
014d9dfce1 assistant_context_editor: Try to fix crash when trying to view patch (#25572)
Closes #24571

Attempts to fix crash described in #24571 based on the panic trace
provided by the user. In short, the panic seemed to be caused by
attempting to read an `Entity<ContextEditor>` while it was being
updated. My assumption is that at some point in
`workspace.add_item_to_current_pane` the `ContextEditor` is read.
Therefore, I moved the workspace update outside of the ContextEditor
update, and replaced another `update` call with a `read` call to clean
it up and just in case that was actually the issue.

Release Notes:

- N/A
2025-02-25 13:24:51 -06:00
Shardul Vaidya
a0aea6ef62 bedrock: Add Claude 3.7 Sonnet (#25583)
Release Notes:

- N/A
2025-02-25 13:52:42 -05:00
Peter Tripp
278620df33 Ensure emacs undo (ctrl-_) works by default in terminal on macOS (#25578) 2025-02-25 13:01:46 -05:00
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
Jason Lee
b1b6401ce7 gpui: Don’t hide Window in docs (#25449)
Release Notes:

- N/A

This side effect is only appearing in outside project.

## Before

<img width="414" alt="image"
src="https://github.com/user-attachments/assets/73d215d2-20e4-4337-82f4-74daa88a1bae"
/>

## After

<img width="453" alt="image"
src="https://github.com/user-attachments/assets/030d34d7-c425-44f6-9cc5-0f2f6fd0a1ac"
/>

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-24 18:11:46 +00:00
Jason Lee
07ba7c8c44 gpui: Add underline style method (#24784)
Release Notes:

- N/A

Add a shorter method to apply underline style.

https://tailwindcss.com/docs/text-decoration-line#underling-text

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-24 12:58:20 -05:00
Conrad Irwin
6516249302 Fix conflict state (was broken by merge conflict) (#25354)
Closes #ISSUE

Release Notes:

- N/A
2025-02-24 10:52:42 -07:00
Danilo Leal
fc8218d728 project panel: Change marked entries behavior and improve state colors (#25457)
Follow up to @0xtimsb's PR
https://github.com/zed-industries/zed/pull/22658.

- We're now changing the marked entry as we change the active buffer via
the pane tabs. If all tabs are closed, we clear all marked entries, too.
That means: if we have no open buffer, we don't have any highlighted
entry (i.e., background color) in the project panel.
- Also, now only marked entries have a different, more distinct
background color. The `is_active` state doesn't change an item's
background color anymore.
- This improves an edge case where you could have multiple entries
marked—where all of them would have a background color—and upon
unmarking one of them, that entry would continue to have a bg color.
Now, once you click or move your focus to unmark that entry, the bg
color goes away.

We discovered some new problems by doing these changes that we want to
fix:
1. 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.
2. If you mark multiple entries on the project panel and then click on
an open buffer, we still see all the multiple entries marked. This feels
incorrect. We should only allow one marked entry at a time.

These fixes should happen in follow up PRs, though.

Release Notes:

- Improved the scenario where there'd be a project panel entry
highlighted/marked even if there is no open buffer.

---------

Co-authored-by: smit <0xtimsb@gmail.com>
2025-02-24 22:44:09 +05:30
Eli Kaplan
a8d56877ee copilot: Support HTTP/HTTPS proxy for Copilot language server (#24364)
Closes #6701 (one of the top ranking issues as of writing)

Adds the ability to specify an HTTP/HTTPS proxy to route Copilot code
completion API requests through. This should fix copilot functionality
in restricted network environments (where such a proxy is required) but
also opens up the ability to point copilot code completion requests at
your own local LLM, using e.g.:
- https://github.com/jjleng/copilot-proxy
- https://github.com/bernardo-bruning/ollama-copilot/tree/master

External MITM-proxy tools permitting, this can serve as a stop-gap to
allow local LLM code completion in Zed until a proper OpenAI-compatible
local code completions provider is implemented. With this in mind, in
this PR I've added separate `settings.json` variables to configure a
proxy server _specific to the code completions provider_ instead of
using the global `proxy` setting, to allow for cases like this where we
_only_ want to proxy e.g. the Copilot requests, but not all outgoing
traffic from the application.

Currently, two new settings are added:
- `inline_completions.copilot.proxy`: Proxy server URL (HTTP and HTTPS
schemes supported)
- `inline_completions.copilot.proxy_no_verify`: Whether to disable
certificate verification through the proxy

Example:
```js
"features": {
  "inline_completion_provider": "copilot"
},
"show_completions_on_input": true,
// New:
"inline_completions": {
  "copilot": {
    "proxy": "http://example.com:15432",
    "proxy_no_verify": true
  }
}
```


Release Notes:

- Added the ability to specify an HTTP/HTTPS proxy for Copilot.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-24 12:11:00 -05:00
João Marcos
dd0de3cfa9 Git panel: Fix commit binding tooltip not showing up (#25472)
Co-authored by: Conrad <conrad@zed.dev>

Release Notes:

- N/A
2025-02-24 16:41:37 +00:00
Marshall Bowers
198c36811e Change @variable color in Gruvbox themes to be less intense (#25464)
This PR changes the color used for `@variable` syntax highlights in the
Gruvbox themes to be less intense.

We now use the same color as `editor.foreground`.

| Language | Before | After |
| -------- |
-----------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------------
|
| Rust | <img width="1410" alt="Screenshot 2025-02-24 at 10 08 41 AM"
src="https://github.com/user-attachments/assets/9a34964d-9fdc-4deb-ac30-4a1c9e6fb531"
/> | <img width="1410" alt="Screenshot 2025-02-24 at 10 55 18 AM"
src="https://github.com/user-attachments/assets/c245d0fd-28af-42b8-93f6-48cb14671d94"
/> |
| Python | <img width="1410" alt="Screenshot 2025-02-24 at 10 08 38 AM"
src="https://github.com/user-attachments/assets/8f8d111e-1d50-4229-a333-eb29b6ce9f4f"
/> | <img width="1410" alt="Screenshot 2025-02-24 at 10 55 20 AM"
src="https://github.com/user-attachments/assets/010b661e-dc9e-4ccb-8e52-ee10c8eb8342"
/> |

In #25333 and #25331 the highlight used for identifiers in Rust and
Python, respectively, was changed to `@variable`, which resulted in the
intense colors you see in the "Before" screenshots above.

We considered reverting the highlight query changes to those languages,
but after taking a look at our other languages, they already use similar
queries. Instead we're adjusting the theme to make these cases less
visually intense.

Release Notes:

- Gruvbox themes: Changed the color used for `@variable` syntax
highlights to be less intense.
2025-02-24 16:12:15 +00:00
Marshall Bowers
133704a419 Adjust @variable color in One Dark theme (#25468)
This PR adjusts the color used for `@variable`s in One Dark to use the
`editor.foreground` color.

| Language | Before | After |
| -------- |
-----------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------------
|
| Rust | <img width="1410" alt="Screenshot 2025-02-24 at 10 46 04 AM"
src="https://github.com/user-attachments/assets/3e1de7d2-03f6-45cc-87bb-93b86b5b1cb2"
/> | <img width="1410" alt="Screenshot 2025-02-24 at 10 46 15 AM"
src="https://github.com/user-attachments/assets/da6129aa-6886-4655-b305-c283e23bfd1e"
/> |
| Python | <img width="1410" alt="Screenshot 2025-02-24 at 10 46 10 AM"
src="https://github.com/user-attachments/assets/f60833f9-d306-44b6-a0b0-42b447e60498"
/> | <img width="1410" alt="Screenshot 2025-02-24 at 10 46 19 AM"
src="https://github.com/user-attachments/assets/256aa6b3-b798-46e4-9943-f21469e7d8bb"
/> |

Release Notes:

- One Dark theme: Adjusted the color used for `@variable` syntax
highlights.
2025-02-24 16:08:22 +00:00
João Marcos
d1302a7a08 Diff view: Fold excerpts of deleted files by default (#25436)
Release Notes:

- N/A
2025-02-24 12:52:13 -03:00
João Marcos
2b28b5969f Remove unused variable distinguish_unstaged_diff_hunks (#25462)
Release Notes:

- N/A
2025-02-24 15:25:13 +00:00
Nikita Pivkin
bc941bfc97 assistant_tools: Rename FileToolInput to NowToolInput (#25456)
Renamed the `FileToolInput` structure to `NowToolInput` to better
reflect its purpose, as the tool is related to time-based operations.

Release Notes:

- N/A

Signed-off-by: Nikita Pivkin <nikita.pivkin@smartforce.io>
2025-02-24 09:37:07 -05:00
Agus Zubiaga
72a9429ef6 edit predictions: Always position jump/accept popovers inside viewport (#25348)
https://github.com/user-attachments/assets/345961c5-9bcb-4ee5-80f2-03d5fd0741d3

Release Notes:

- edit prediction: Fixed jump/accept popover position for long lines

---------

Co-authored-by: Danilo <danilo@zed.dev>
2025-02-24 10:26:29 -03:00
Danilo Leal
f020291039 assistant: Rename action from New Context to New Chat (#25455)
If you looked that up via the Command Palette, we were showing an
outdated action name ("new context") which causes confusion given the
panel says "New Chat".

Release Notes:

- N/A
2025-02-24 09:19:38 -03:00
smit
4b3a2a33a8 vim: Fix auto_indent_on_paste not being respected (#25447)
Closes #12236

This PR fixes an issue where the `auto_indent_on_paste` setting was not
being applied for pasting in Vim mode. It was correctly used for normal
paste behavior.

Also includes tests.  


Release Notes:

- Fixed yank + paste indenting incorrectly when `auto_indent_on_paste`
is set to `false` in certain languages.
2025-02-24 14:59:05 +05:30
张小白
1f257f4704 fs: Fix copy_recursive (#25317)
Closes #24746

This PR modifies the implementation of `copy_recursive`. Previously, we
were copying and pasting simultaneously, which caused an issue when a
user copied a folder into one of its subfolders. This resulted in new
content being created in the folder while copying, and subsequent
recursive calls to `copy_recursive` would continue this process, leading
to an infinite loop.

In this PR, the approach has been changed: we now first collect the
paths of the files to be copied, and only then perform the copy
operation.

Additionally, I have added corresponding tests. On the main branch, this
test would previously run indefinitely.

Release Notes:

- Fixed `copy_recursive` runs infinitely when copying a folder into its
subfolder.
2025-02-24 11:02:14 +02:00
Antonio Scandurra
f517050548 Partially fix assistant onboarding (#25313)
While investigating #24896, I noticed two issues:

1. The default configuration for the `zed.dev` provider was using the
wrong string for Claude 3.5 Sonnet. This meant the provider would always
result as not configured until the user selected it from the model
picker, because we couldn't deserialize that string to a valid
`anthropic::Model` enum variant.
2. When clicking on `Open New Chat`/`Start New Thread` in the provider
configuration, we would select `Claude 3.5 Haiku` by default instead of
Claude 3.5 Sonnet.

Release Notes:

- Fixed some issues that caused AI providers to sometimes be
misconfigured.
2025-02-24 07:29:55 +00:00
Joseph T. Lyons
535ba75bc7 Do not indent on enter in python comments ending in colon (#25437)
Closes https://github.com/zed-industries/zed/issues/25416

Release Notes:

- Fixed a bug where indentation was applied when adding a newline to a
Python comment ending in `:`.
2025-02-24 04:11:22 +00:00
Joseph T. Lyons
ee280b0d05 Resurrect top-ranking issues script (#25433)
Release Notes:

- N/A
2025-02-23 14:24:56 -05:00
Marshall Bowers
a43793493a docs: Remove empty Tree-sitter grammar link in the Tailwind docs (#25426)
This PR removes the empty Tree-sitter grammar link in the Tailwind docs.

Tailwind does not use a Tree-sitter grammar.

Release Notes:

- N/A
2025-02-23 10:33:03 -05:00
Marshall Bowers
3b3c379852 docs: Fix casing of "Tree-sitter" (#25427)
This PR fixes the casing of "Tree-sitter" in the docs.

It is "Tree-sitter", not "Tree Sitter" or "Tree-Sitter".

Release Notes:

- N/A
2025-02-23 15:30:10 +00:00
Kirill Bulatov
147f407b7a Fix theme selector resetting the buffer size (#25425)
Closes https://github.com/zed-industries/zed/issues/25413

As the issue points out well, themes do not need to alter any in-memory
state on load: that is done via settings file load.
Originally, it was introduced in
https://github.com/zed-industries/zed/pull/4064 and
https://github.com/zed-industries/zed/pull/24857 had restored that
behavior, which seems wrong to do.

Apart from removing that part, removes unnecessary methods and
emphasizes that in-memory state is the Buffer/UI size — no need to add
`Adjusted` there as the settings file presence is already enough.

Release Notes:

- Fixed theme selector resetting the buffer size
2025-02-23 15:24:43 +00:00
Marshall Bowers
822f42e8fe docs: Remove outdated note about pinning @vue/language-server (#25424)
This PR removes the outdated note about pinning `@vue/language-server`
to v1.8.

As of https://github.com/zed-extensions/vue/pull/1 we now use the latest
available version.

Release Notes:

- N/A
2025-02-23 15:21:51 +00:00
Aivaz Latypov
7e097d529a zeta: Add LICENSE.md and LICENCE.md to license detection (#25422)
Maybe it's not a very common, but it has a place to be.

Release Notes:

- Added `LICENSE.md` and `LICENCE.md` files to license detection for
edit prediction.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-23 15:08:24 +00:00
Coenen Benjamin
65f76e6f4d Add support for --target-dir for Rust tasks (#24725)
This PR is an attempt to add support for `--target-dir` argument to
`cargo` commands when executing tasks with rust.
When using VSCode I was already using this trick to not block the
current binary compilation when I was trying a specific test. As it's a
different target directory it won't block the `cargo` commands I'm using
in my terminal.

I used the task variables to achieve this but I'm not sure it's the best
option to be honest. I didn't find any examples in your docs to see if
sometimes you had specific configuration for languages and tasks.

Let me know if this solution would be a good fit and if the
implementation is ok.

If so feel free to redirect me to an example I can reproduce to write a
unit test or so... And I will also update the docs.

Example of config:

```
{
  "languages": {
    "Rust": {
      "tasks": {
        "variables": {
          "RUST_TARGET_DIR": ".cargo_check"
        }
      }
    }
  }
}
```

it will run `cargo test -p XXX --target-dir .cargo-check`


Release Notes:

- Added support for `--target-dir` for Rust tasks

---------

Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
2025-02-23 11:05:07 +01:00
Piotr Osiewicz
918cba4cce lsp: Check for existing snapshots before sending off a didOpen notification (#25409)
Closes #ISSUE

Release Notes:

- Fixed Zed sending out didOpen notification to a language server when
opening documents.
2025-02-23 01:17:46 +01:00
Conrad Irwin
4067ae4b37 Fix stage/unstage buttons on new empty files (#25365)
Closes #ISSUE

Release Notes:

- N/A
2025-02-22 13:49:58 -07:00
Thomas Heartman
084a0233b6 vim: Add exchange (#24678)
Implements [vim-exchange](https://github.com/tommcdo/vim-exchange)
functionality.

Lets you swap the content of one selection/object/motion with another.

The default key bindings are the same as in exchange:
- `cx` to begin the exchange in normal mode. Visual mode does not have a
default binding due to conflicts.
- `cxx` selects the current line
- `cxc` clears the selection
- If the previous operation was an exchange, `.` will repeat that
operation.

Closes #22759

## Overlapping regions

According to the vim exchange readme:

> If one region is fully contained within the other, it will replace the
containing region.

Zed does the following:
- If one range is completely contained within another: the smaller
region replaces the larger region (as in exchange.vim)
- If the ranges only partially overlap, then we abort and cancel the
exchange. I don't think we can do anything sensible with that. Not sure
what the original does, evil-exchange aborts.

## Not implemented: cross-window exchange

Emacs's evil-exchange allows you to exchange across buffers. There is no
code to accommodate that in this PR. Personally, it'd never occurred to
me before working on this and I've never needed it. As such, I'll leave
that implementation for whomever needs it.

As an upside; this allows you to have concurrent exchange states per
buffer, which may come in handy.

## Bonus

Also adds "replace with register" for the full line with `grr` 🐕 This
was an oversight from a previous PR.

Release notes:

- Added an implementation of `vim-exchange`
- Fixed: Added missing default key binding for `Vim::CurrentLine` for
replace with register mode (`grr`)

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-02-22 20:36:21 +00:00
renovate[bot]
04732b23fb Update Rust crate ctor to v0.3.6 (#25188)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [ctor](https://redirect.github.com/mmastrac/rust-ctor) |
workspace.dependencies | patch | `0.3.1` -> `0.3.6` |

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzMuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-22 22:04:42 +02:00
Angelk90
abc027558a Only authenticate if the credentials provider has credentials when running in development (#25403)
Closes #25394

Release Notes:

- N/A

Scenarios:

| Scenarios | What it does |
|------|--------|
| Interactive Terminal + Impersonate Active Login | Login without saved
credentials |
| Interactive Terminal + Saved credentials | Login with saved
credentials |
| Interactive Terminal + No credentials | Does nothing |
| Non-interactive Terminal + Saved credentials | Login with saved
credentials |
| Non-interactive Terminal + No credentials | Does nothing |

@maxdeviant : You can take a look at it.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-22 18:29:27 +00:00
Marshall Bowers
4d106a4b0b zed_extension_api: Add simple process API (#25399)
This PR adds a simple API for working with processes to the extension
API.

The API is designed to mirror Rust's
[`std::process::Command`](https://doc.rust-lang.org/std/process/struct.Command.html).

Release Notes:

- N/A
2025-02-22 18:05:36 +00:00
Marshall Bowers
ec4d9ec111 zed_extension_api: Use v0.3.0 WIT files for codegen (#25398)
This PR updates the `zed_extension_api` to use the v0.3.0 WIT files for
code generation.

I missed this in https://github.com/zed-industries/zed/pull/25357.

Release Notes:

- N/A
2025-02-22 17:47:57 +00:00
张小白
10053e2566 windows: Fix incorrect button ID setting for TaskDialog (#25391)
Closes #22821

It turns out that on Windows, the `Cancel` button should **always** have
a button ID of `2`. Even if the button label is something like "Don't
Cancel", when the user presses the `Esc` key, Windows will still report
that the button with ID `2` was pressed.

Release Notes:

- N/A
2025-02-22 23:39:43 +08:00
Marshall Bowers
7a55da58d9 Revert "Hide the mouse when the user is typing in the editor (#25040)" (#25393)
This reverts commit a8610fbd13.

I've been seeing some reports of segmentation faults that appear to
point to this change as the culprit.

Closes #25366.

Release Notes:

- Community: Reverted #25040, so remove the corresponding entry from the
release notes.
2025-02-22 10:19:23 -05:00
mattmc3
5043eaedc4 Change C-a C-e keybindings to match macOS default behavior (#25385)
Closes #25372
2025-02-22 13:43:38 +00:00
Péter Leéh
328e4d6278 Remove unnecessary Arc from AhoCorasick since it's using it internally (#25379)
This PR removes the unnecessary `Arc` around the `AhoCorasick` struct,
since [it's already using it
internally](https://docs.rs/aho-corasick/latest/aho_corasick/struct.AhoCorasick.html#cloning).

Release Notes:

- N/A
2025-02-22 09:13:35 +00:00
Kirill Bulatov
83513bab59 Emphasize defaults for line movement actions (#25378)
Closes https://github.com/zed-industries/zed/issues/25372

Release Notes:

- N/A
2025-02-22 08:08:16 +00:00
Marshall Bowers
b9ca240242 editor: Fix compile errors after bad merge (#25374)
This PR fixes the compile errors after
https://github.com/zed-industries/zed/pull/25367 was merged without
passing CI.

Release Notes:

- N/A
2025-02-22 02:31:20 +00:00
Dino
5d751cd407 vim: Handle visual selection when jumping to mark (#25360)
Fix how vim mode handles jumping to mark, when one of vim's visual modes
is active, in order to behave just like neovim. Here's a quick video
showing the updated behavior ↓


https://github.com/user-attachments/assets/db91f574-d7e8-429d-952e-3435c43e31bd

Closes #18131 

Release Notes:

- Fixed vim's visual selections when jumping to marks
2025-02-21 19:24:54 -07:00
Cole Miller
ef53f7af22 Fix issues with adjacent diff hunks (#25367)
Closes #ISSUE

Release Notes:

- Fixed being unable to toggle diff hunks with the mouse in some cases
2025-02-21 19:07:04 -05:00
Cole Miller
4118f42d61 Rename ExpandAllHunkDiffs to ExpandAllDiffHunks (#25369)
This is more consistent with the nomenclature in the rest of Zed.

Release Notes:

- Renamed the `editor::ExpandAllHunkDiffs` action to
`editor::ExpandAllDiffHunks`
2025-02-21 19:06:03 -05:00
Marshall Bowers
ec56755f9e Eagerly load the active theme and icon theme (#25368)
This PR adds eager loading of the active theme and icon theme set in the
user settings.

Previously for themes and icon themes that were provided by extensions,
we would have to wait until extensions were loaded before we could apply
the themes.

In some cases this could lead to a visible delay during which time the
user would see the default themes, and then switch to their desired
themes once extensions had loaded.

To avoid this, we now take a fast path of loading the active themes
directly from the filesystem so that we can load them as soon as
possible.

Closes #10173 and #25305.

Release Notes:

- Added eager loading of the active theme and icon theme. This should
address some reports of seeing the default themes briefly on startup.
2025-02-21 23:57:55 +00:00
Cole Miller
aba89ba12a Shorten overflowing paths in file finder (#25303)
Closes #7711

This PR changes the file finder to shorten the path portion of each
match by replacing a segment with `...`, if it would otherwise overflow
horizontally. Details:

- The overflow calculation is based on a crude linear width estimate for
ASCII text at the current em width. No elision is done for non-ASCII
paths.
- A path component will not be elided if it contains a matching position
for the file finder's search, or if it's the first or last component.
- Elision is only applied when it is successful in shortening the path
enough to not overflow.

Release Notes:

- Improved the appearance of the file finder when long paths are shown
by eliding path segments
2025-02-21 17:04:44 -05:00
Beniamin Zagan
7ff40091d8 title_bar: Allow deafening audio without microphone permission (#24761)
The deafen audio button wasn't visible in the titlebar unless you had
the 'use microphone permission'. Meaning if I would join a call, and
didn't receive permission to speak, I wouldn't be able to use the deafen
audio button.

Now the button is directly visible when you join a call. So you can
deafen the audio even if you didn't receive the mic permission.

Release Notes:

- N/A
2025-02-21 22:02:40 +00:00
Arseny Kapoulkine
dabc35b257 Improve C++ highlighting for sized type specifiers (#25362)
For consistency, sized type specifiers should be highlighted the same
way as primitive types, to make sure 'unsigned', 'int' and 'unsigned
int' are all the same color. [A previous
change](https://github.com/zed-industries/zed/pull/18016) moved
primitive types from `@keyword` to `@type`, and this PR adjusts the
sized type specifier to follow suit.

Before this change:


![image](https://github.com/user-attachments/assets/d0982ced-882f-4477-b716-f07ac4a72170)

After this change:


![image](https://github.com/user-attachments/assets/2fb6a7e7-061b-46e1-a4e3-e906e1e87bd8)

Release Notes:

- Improved C++ syntax highlighting for sized type specifiers.
2025-02-21 16:57:57 -05:00
chbk
8f40bcc86c Improve JavaScript and TypeScript syntax highlighting (#25328)
Release Notes:

  - Improved JavaScript and TypeScript syntax highlighting.

| Zed 0.174.6 | With this PR |
| --- | --- |
|
![Image](https://github.com/user-attachments/assets/a64f0abf-3b4e-4369-80c5-1d1381c925fc)
|
![Image](https://github.com/user-attachments/assets/f8224243-f4ab-4af9-8dd8-5062dd7ea743)
|

- `regex_flags`: `keyword.regex`, see the [Regex
PR](https://github.com/zed-industries/zed/pull/25332) for other Regex
scopes
- `@`: `punctuation.special`, as in Python
- `jsx_text`: `text.jsx`
- `=`: `operator` -> `punctuation.jsx.delimiter`, `punctuation` as in
[VS
Code](0fe195613e/extensions/html/syntaxes/html.tmLanguage.json (L78))
and
[Atom](ee750a014a/grammars/tree-sitter-html.cson (L47))
- added `jsx` scope to target JSX tokens specifically

```javascript
/**
 * @keyword comment
 */
@log
class X {
  render() {
    return (
      <div jsx_attribute="value">
        <Input onKeyPress={super.bind(this)}/>
        jsx_text
      </div>
    );
  }
}
const IDENTIFIER = true
```

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-21 21:54:16 +00:00
chbk
3e75a661dd Improve Rust syntax highlighting (#25333)
Release Notes:

  - Improved Rust syntax highlighting.

| Zed 0.174.6 | With this PR |
| --- | --- |
|
![Image](https://github.com/user-attachments/assets/0ec56dd0-2c17-4b5f-98e3-0897cb4e0192)
|
![Image](https://github.com/user-attachments/assets/309de467-dd32-47e9-ac40-96334a20d5c3)
|

- `identifier`: `variable`

```rust
let identifier = true;
const IDENTIFIER: i32 = 3;
```

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-21 16:20:53 -05:00
Marshall Bowers
a9e753fc07 extension_host: Remove duplicate linker registration (#25361)
This PR fixes a panic that would occur when loading an extension using
v0.2.0 of the extension API after #25357 landed:

```
Thread "<unnamed>" panicked with "called `Result::unwrap()` on an `Err` value: map entry `zed:extension/github` defined twice" at crates/extension_host/src/wasm_host/wit.rs:38:31
10a6cd00e7/src/crates/extension_host/src/wasm_host/wit.rs (L38) (may not be uploaded, line may be incorrect if files modified)
   0: backtrace::backtrace::libunwind::trace
             at /Users/maxdeviant/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.74/src/backtrace/libunwind.rs:116:5
      backtrace::backtrace::trace_unsynchronized
             at /Users/maxdeviant/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.74/src/backtrace/mod.rs:66:5
   1: backtrace::backtrace::trace
             at /Users/maxdeviant/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.74/src/backtrace/mod.rs:53:14
   2: backtrace::capture::Backtrace::create
             at /Users/maxdeviant/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.74/src/capture.rs:292:9
   3: backtrace::capture::Backtrace::new
             at /Users/maxdeviant/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.74/src/capture.rs:257:22
   4: zed::reliability::init_panic_hook::{{closure}}
             at /Users/maxdeviant/projects/zed/crates/zed/src/reliability.rs:56:29
   5: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/alloc/src/boxed.rs:2084:9
      std::panicking::rust_panic_with_hook
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/panicking.rs:808:13
   6: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/panicking.rs:674:13
   7: std::sys::backtrace::__rust_end_short_backtrace
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/sys/backtrace.rs:168:18
   8: rust_begin_unwind
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/panicking.rs:665:5
   9: core::panicking::panic_fmt
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/panicking.rs:74:14
  10: core::result::unwrap_failed
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/result.rs:1679:5
  11: core::result::Result<T,E>::unwrap
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/result.rs:1102:23
      extension_host::wasm_host::wit::new_linker
             at /Users/maxdeviant/projects/zed/crates/extension_host/src/wasm_host/wit.rs:38:5
  12: extension_host::wasm_host::wit::since_v0_2_0::linker::{{closure}}
             at /Users/maxdeviant/projects/zed/crates/extension_host/src/wasm_host/wit/since_v0_2_0.rs:43:9
  13: std::sync::once_lock::OnceLock<T>::get_or_init::{{closure}}
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/sync/once_lock.rs:276:50
  14: std::sync::once_lock::OnceLock<T>::initialize::{{closure}}
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/sync/once_lock.rs:483:19
  15: std::sync::once::Once::call_once_force::{{closure}}
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/sync/once.rs:217:40
  16: std::sys::sync::once::queue::Once::call
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/sys/sync/once/queue.rs:183:21
  17: std::sync::once::Once::call_once_force
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/sync/once.rs:217:9
  18: std::sync::once_lock::OnceLock<T>::initialize
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/sync/once_lock.rs:482:9
  19: std::sync::once_lock::OnceLock<T>::get_or_try_init
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/sync/once_lock.rs:364:9
  20: std::sync::once_lock::OnceLock<T>::get_or_init
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/std/src/sync/once_lock.rs:276:15
  21: extension_host::wasm_host::wit::since_v0_2_0::linker
             at /Users/maxdeviant/projects/zed/crates/extension_host/src/wasm_host/wit/since_v0_2_0.rs:42:5
  22: extension_host::wasm_host::wit::Extension::instantiate_async::{{closure}}
             at /Users/maxdeviant/projects/zed/crates/extension_host/src/wasm_host/wit.rs:122:17
  23: extension_host::wasm_host::WasmHost::load_extension::{{closure}}
             at /Users/maxdeviant/projects/zed/crates/extension_host/src/wasm_host.rs:385:14
  24: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/future/future.rs:123:9
  25: async_task::raw::RawTask<F,T,S,M>::run
             at /Users/maxdeviant/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.1/src/raw.rs:557:17
  26: async_task::runnable::Runnable<M>::run
             at /Users/maxdeviant/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.1/src/runnable.rs:781:18
  27: gpui::platform::mac::dispatcher::trampoline
             at /Users/maxdeviant/projects/zed/crates/gpui/src/platform/mac/dispatcher.rs:106:5
  28: <unknown>
  29: <unknown>
  30: <unknown>
  31: _pthread_mach_thread_np
```

We don't need the added `add_to_linker` calls anymore.

Release Notes:

- N/A
2025-02-21 21:20:19 +00:00
Beniamin Zagan
2d6592dcaa title_bar: Hide screen share when user doesn't have the permission (#25192)
On macos: 
- user has the required permission to screen share. 
- user doesn't have the can_use_microphone permission


When an user doesn't have the can_use_microphone permission the screen
share icon would be visible. If an user therefor would click on it, we
would give the error that they don't have the permission given to zed to
screen share. (which is false).

I've tested this together with @JosephTLyons because we first thought it
was a mac os permission issue.

Should we mention in the zed.dev/docs/collaboration what kind of
permissions are needed to be able to screen share?

Release Notes:

- Fixed: Screen sharing would be visible even when user didn't have the
right permission resulting in errors later on.
2025-02-21 14:16:15 -07:00
chbk
59a153b2e1 Improve Python syntax highlighting (#25331)
Release Notes:

  - Improved Python syntax highlighting.

| Zed 0.174.6 | With this PR |
| --- | --- |
|
![Image](https://github.com/user-attachments/assets/3d8830c9-23cd-437d-88a6-258bcfba5f50)
|
![Image](https://github.com/user-attachments/assets/fd34ca38-c105-4f27-9979-98ab8d616c51)
|

- `identifier`: `variable`
- `.`, `,`, `:`: `punctuation.delimiter`
- `@`: `operator`, for matrix multiplication

```python
class Mat(list):
  def __matmul__(self, b):
    ...
a, b = Mat(), Mat()
identifier = a @ b
IDENTIFIER = True
```

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-21 20:52:04 +00:00
Rémi Bardon
10a6cd00e7 docs: Add missing comma in YAML configuration (#25351)
Release Notes:

- N/A
2025-02-21 15:18:11 -05:00
Marshall Bowers
f6f6980463 zed_extension_api: Fork new version of extension API (#25357)
This PR forks a new version of the `zed_extension_api` in preparation
for new changes.

Release Notes:

- N/A
2025-02-21 20:00:46 +00:00
Danilo Leal
2e302b1a7c context menu: Improve docs aside responsiveness (#25347)
Closes https://github.com/zed-industries/zed/issues/24883

While this PR closes the issue above, it still doesn't implement a
bullet-proof solution for the context menu docs aside, meaning, it might
not work the best way if there are other places using it (like the
Editor Controls menu). For that, I think we'll want a more robust
collision-aware solution, possibly similar to the LSP completion menu.

Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <hi@aguz.me>
Co-authored-by: Nate Butler <1714999+iamnbutler@users.noreply.github.com>
2025-02-21 16:12:53 -03:00
Angelk90
17323ed7b2 Show git items in the panel only when in a git repository (#24865)
| Before | After | After2 |
| - | - | - |
| <img width="368" alt="Screenshot 2025-02-14 alle 13 45 41"
src="https://github.com/user-attachments/assets/9ed6f233-c7e3-45b4-b2cd-605b6f785cbe"
/> | <img width="367" alt="Screenshot 2025-02-14 alle 14 25 24"
src="https://github.com/user-attachments/assets/808da265-dd1d-4679-9b62-a4def459fc8f"
/> | <img width="371" alt="Screenshot 2025-02-14 alle 14 25 38"
src="https://github.com/user-attachments/assets/09d0e27e-1e58-43b4-9a35-eb14c0d14961"
/> |

Release Notes:

- If it is not a git repository it shows nothing.
- Fix stage and unstage title in context_menu
2025-02-21 12:11:17 -07:00
smit
3759e0bf55 terminal: Update terminal reopening from global to per-workspace (#25336)
Closes #7145

Currently, terminal persistence is global, i.e. split configurations are
restored across all workspaces.

This PR changes it to per-workspace, so configurations are restored only
within the same workspace. Opening a new window will start with a fresh
terminal.


https://github.com/user-attachments/assets/d43fe747-9f28-4723-b409-e8dbb3a23912


Release Notes:

- Improved terminal reopening to be per workspace instead of global.
2025-02-22 00:05:52 +05:30
chbk
144d8a1db6 Improve C and C++ syntax highlighting (#25325)
Release Notes:

  - Improved C and C++ syntax highlighting.

| Zed 0.174.6 | With this PR |
| --- | --- |
|
![Image](https://github.com/user-attachments/assets/fa5bf2e0-c682-4e6a-ab64-bb873579d47c)
|
![Image](https://github.com/user-attachments/assets/dc980de9-cd6a-4b0b-8ddc-ac705f687910)
|

- `NULL`, `nullptr`: `constant` -> `constant.builtin`

```cpp
#include <stdbool.h>
int a[] = {true, false};
const int * IDENTIFIER = nullptr;
```

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-21 12:01:39 -05:00
chbk
7deceb62dc Improve Go syntax highlighting (#25327)
Release Notes:

  - Improved Go syntax highlighting.

| Zed 0.174.6 | With this PR |
| --- | --- |
|
![Image](https://github.com/user-attachments/assets/7f6113cb-0517-4ea7-a979-902a2373314e)
|
![Image](https://github.com/user-attachments/assets/0cf07ebc-c5bd-4269-af7a-49496305d265)
|

- `package_identifier`: `namespace`, language-agnostic scope for
modules, packages, namespaces
- `method_elem`: `function.method`
- `;` ,`.` ,`,` ,`:`: `punctuation.delimiter`

```go
package my_package
import (
  pkg "fmt"
)
type A interface {
  method_elem(foo int, bar float64) int
}
func main() {
  identifier := true
  const constant int = 3
  for i := 0; i <= 3; i++ {
    pkg.Println(identifier)
  }
}
```

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-21 11:32:14 -05:00
Piotr Osiewicz
a97a2ebf35 lsp: Send non-null workspaceFolders in initialize (#25337)
This is a ~workaround for next-ls not handling null workspace folders in
initialize request
Related to #25264
/cc @timfjord
Closes #ISSUE

Release Notes:

- Changed how workspace folders are shared with language servers, fixing
a startup issue with `next-ls` in the process.
2025-02-21 17:05:14 +01:00
chbk
5e4bdbbcde Improve JSON syntax highlighting (#25329)
Release Notes:

  - Improved JSON syntax highlighting.

| Zed 0.174.6 | With this PR |
| --- | --- |
|
![Image](https://github.com/user-attachments/assets/46c8ae89-aca1-4756-b66c-78ccd8f3778d)
|
![Image](https://github.com/user-attachments/assets/3ba5e5db-1467-40d7-a502-2790feec8ad3)
|

- `null`: `constant` -> `constant.builtin`
- `,`, `:`: `punctuation.delimiter`

```json
{
  "property": null,
  "boolean": true
}
```
2025-02-21 15:59:32 +00:00
chbk
d0a0303428 Improve Bash syntax highlighting (#25324)
Release Notes:

  - Improved Bash syntax highlighting

| Zed 0.174.6 | With this PR |
| --- | --- |
|
![Image](https://github.com/user-attachments/assets/ecff952a-c10c-447a-8a99-ebd4ac6d6936)
|
![Image](https://github.com/user-attachments/assets/37568a83-f32c-4d4c-bd9a-3ebbe9aa40ae)
|

- `string`: `string`
- `variable`: `property` -> `variable`
- `number`: `number`
- `regex`: `string.regex`
- `>&`, `>&-`, `:`, `//`, `/`, `%`, `%%`, `#`, `##`, `=`, `==`:
`operator`
- `-lt`, `-le`, `-gt`, `-ge`, `-eq`, `-ne`, `-z`, `-n`:
`keyword.operator`
- `;`: `punctuation.delimiter`
- `(`, `)`, `{`, `}`, `[`, `]`: `punctuation.bracket`
- `$`, `${ }`, `$( )`: `punctuation.special`, as defined in other
languages

```bash
variable=I\ like\ Zed
function my_function() {
  echo "Hello world, ${variable//regex/string}" > file
}
if [ $(uid) -lt 600 ]; then
  my_function;
  cat file | grep hello >&3
fi
```
2025-02-21 10:36:07 -05:00
Marshall Bowers
a4ade37a56 rust: Add raw to keyword list for syntax highlighting (#25342)
This PR adds support for syntax highlighting the `raw` keyword in Rust.

Release Notes:

- Added `raw` keyword to Rust language highlights (see the [Rust 1.82.0
announcement](https://blog.rust-lang.org/2024/10/17/Rust-1.82.0.html#native-syntax-for-creating-a-raw-pointer)).

Co-authored-by: everdrone <giorgiotropiano@gmail.com>
2025-02-21 15:28:30 +00:00
everdrone
1fb4620a90 Use @boolean for true and false in highlights (#25338)
Release Notes:

- Fixed issue where `true` and `false` were highlighted as constants,
ignoring the `boolean` highlight defined in themes.
  - This fix applies to: C, C++, Go, JSON, JSONC, Python, and Rust.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-21 15:26:52 +00:00
GiM
3c4903c6bf Pass "menu" key presses in windows down as a Keystroke (#25000)
This is second part needed for #17819.
There is already binding in default bindings: `"menu":
"editor::OpenContextMenu",` (but won't work on windows without this
change)

Release Notes:

- Handle "menu" key in windows
2025-02-21 23:23:58 +08:00
Marshall Bowers
ad4163b9be Revert "Add syntax scopes to themes (#25323)" (#25339)
This reverts commit 2f416aebbe.

We shouldn't have merged this yet, as it currently breaks syntax
highlighting for some languages that haven't had their requisite changes
merged yet.

We also need to be aware of the impact this will have on downstream
themes.

@chbk We should bundle any changes to the themes with the specific
language highlights that depend on those changes (and if there are
multiple languages that need the same change then pick one language to
come first and then stack the rest of the changes on top of that).

Release Notes:

- Community: This is a revert of
https://github.com/zed-industries/zed/pull/25323, so remove those notes
from the release notes.
2025-02-21 15:12:12 +00:00
chbk
2f416aebbe Add syntax scopes to themes (#25323)
Release Notes:

  - Added syntax scopes to themes

Supports:

- [Improve CSS syntax
highlighting](https://github.com/zed-industries/zed/pull/25326)
- [Improve Go syntax
highlighting](https://github.com/zed-industries/zed/pull/25327)
- [Improve Markdown syntax
highlighting](https://github.com/zed-industries/zed/pull/25330)

Changes:

- Adds highlighting rules for the following new scopes, using theme
colors:
    - `heading`
    - `namespace`
    - `selector`
    - `strikethrough`
    - `unit`

- Renames scopes that are no longer used in `zed/crates/languages/src`
or `zed/extensions` to their new names:
    - `punctuation.list_marker` -> `punctuation.markup`
    - `link_text` -> `link`
- `link_uri` -> `link.url`, as defined in the [gitcommit
grammar](dff47a8436/crates/languages/src/gitcommit/highlights.scm (L5))
    - `text.literal` -> `raw`
2025-02-21 09:21:18 -05:00
Nate Butler
5397ca23a1 ui: More component previews, UI component cleanup (#25302)
- Don't require ui component docs (this isn't really working)
- Add more component previews
- Update component preview style & navigation

Release Notes:

- N/A
2025-02-21 09:20:53 -05:00
smit
c9235ff916 Revert unintended renaming (#25318)
Just little bit clean up from #25288

Release Notes:

- N/A
2025-02-21 18:44:23 +05:30
Coenen Benjamin
dff47a8436 rust: Add support for doctest runnables (#24806)
Screenshot:


![image](https://github.com/user-attachments/assets/0ac88029-76c1-4135-bef2-373636e3587d)

I would be happy to add tests if you point me to the right place to do
it please.

Release Notes:

- Added support for doc test in tasks for Rust

---------

Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
2025-02-21 10:57:09 +01:00
smit
d45aaa1745 scrollbar: Implement minimum thumb size (#25288)
This PR addresses 3 issues with the common scrollbar component used in
the Terminal, Outline Panel, etc.

1. Extremely small or invisible scrollbar for long content.
2. Flickering issue when the thumb is already at the bottom-most
position, and the user tries to overscroll.
3. Scrollbar appearing even when there is no excessive content to
scroll.

Before:
<img width="300" alt="image"
src="https://github.com/user-attachments/assets/8a124a72-3b56-4bef-858a-a4942c871829"
/>

After:
<img width="300" alt="Screenshot 2025-02-21 at 3 26 32 AM"
src="https://github.com/user-attachments/assets/2a8a5796-b332-4c06-84b2-226d2de6e300"
/>


Release Notes:

- Fixed extremely small scrollbar thumb for long content in Terminal,
Outline Panel, and more.

---------

Co-authored-by: Danilo <danilo@zed.dev>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2025-02-21 15:21:26 +05:30
João Marcos
5e1dd91ee5 Fix UI font size changes not applying (#25307)
Related to #24857.

Release Notes:

- N/A
2025-02-21 06:24:02 -03:00
Conrad Irwin
4871d3c9e7 New commit review flow in project diff view (#25229)
Closes #ISSUE

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
2025-02-21 06:52:34 +00:00
0x2CA
6b9397c380 vim: Fix gr in visual mode (#25301)
Closes #25258

Release Notes:

- Fixed `gr` in visual mode
2025-02-20 23:39:11 -07:00
Max Brunsfeld
c31c638006 Fix relative indentation when pasting content copied from outside Zed (#25300)
Closes https://github.com/zed-industries/zed/issues/24914

Release Notes:

- Fixed incorrect indentation when pasting multi-line content that was
copied from another app.
2025-02-21 01:25:33 +00:00
Kirill Bulatov
ee1a559827 Improve expanded macro ergonomics (#25298)
Make the editor non-dirty and read-only.


Release Notes:

- Improve expanded macro ergonomics
2025-02-21 00:40:08 +00:00
Michael Sloan
30850fe3bd Add editor actions for moving and selecting to next / previous excerpt (#25299)
Covers part of #5129 by adding `MoveToStartOfExcerpt`,
`MoveToEndOfExcerpt`, `SelectToStartOfExcerpt`, and
`SelectToEndOfExcerpt`.

No default linux bindings yet as it's unclear what to use. Currently,
`ctrl-up` / `ctrl-down` scroll up and down by one line (see #13269).
Considering changing the meaning of those.

Mac:

* Previously `cmd-up` and `cmd-down` were `editor::MoveToBeginning` and
`editor::MoveToEnd`. In singleton editors these will behave the same as
before. In multibuffers, they will now step through excerpts instead of
jumping to the beginning / end of the multibuffer.

* `cmd-home` and `cmd-end`, often typed as `cmd-fn-left` and
`cmd-fn-right` are now `editor::MoveToBeginning` and
`editor::MoveToEnd`. This is useful in multibuffers.

Release Notes:

- Mac: `cmd-up` now moves to the previous
multibuffer excerpt start, and `cmd-down` moves to the next multibuffer
excerpt end. Within normal buffers these behave the same as before, moving
to the beginning or end.
2025-02-21 00:23:20 +00:00
Henrique Ferreiro
ec00fb97fd git_hosting_providers: Add support for Chromium repositories (#24881)
Add an implementation of GitHostingProvider for repositories hosted on
https://chromium.googlesource.com. Pull requests target the Gerrit
instance at https://chromium-review.googlesource.com and avatar images
are fetched using the Gerrit REST API.

<img width="513" alt="Screenshot 2025-02-20 at 6 43 37 PM"
src="https://github.com/user-attachments/assets/867af988-594d-45ea-8482-e40517443c73"
/>

<img width="511" alt="Screenshot 2025-02-20 at 6 43 51 PM"
src="https://github.com/user-attachments/assets/1d412904-048d-4a2d-8494-0837e75f8d61"
/>

Release Notes:

- Added support for repositories hosted on `chromium.googlesource.com`
for Git blames and permalinks.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-20 19:11:32 -05:00
Piotr Osiewicz
5dd351551d diagnostics: Do not run syntactic expansion on main thread (#25287)
Related to #18300

Release Notes:

- Improved diagnostic pane responsiveness with large # of diagnostics.

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2025-02-21 00:59:13 +01:00
Kirill Bulatov
5ae93ce68d Add initial inline diagnostics support (#25297)
https://github.com/user-attachments/assets/eb881707-e575-47ef-9ae0-67d8085d8065

Closes https://github.com/zed-industries/zed/pull/22668
Closes https://github.com/zed-industries/zed/issues/4901

Takes https://github.com/zed-industries/zed/pull/22668 and fixes all
review items on top.
Inline diagnostics are disabled by default, but can be enabled via
settings permanently, or temporarily toggled with the `editor:
ToggleInlineDiagnostics` action and the corresponding editor menu item
<img width="242" alt="image"
src="https://github.com/user-attachments/assets/8e177511-4626-4434-902b-d6aa4d3fafd0"
/>

Inline diagnostics does not show currently active diagnostics group, as
it gets inline into the editor too, inside the text.
Inline git blame takes precedence and is shown instead of the
diagnostics, edit predictions dim the diagnostics if located on the same
line.

One notable drawback of the implementation is the inability to wrap,
making inline diagnostics cut off the right side:


![image](https://github.com/user-attachments/assets/6e87268a-b51a-4a2b-8b8d-01d932c62fea)

(same as inline git blame and other elements to the right of the text)
Given that it's disabled by default and go to next/prev diagnostics will
show them better, seems fine to leave in the first iteration.


Release Notes:

- Added initial inline diagnostics support

---------

Co-authored-by: Paul J. Davis <paul.davis@tiledb.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-02-20 23:39:47 +00:00
Marshall Bowers
74c581b9f4 assistant2: Combine history views into one (#25293)
This PR combines the two history views in Assistant2 into one.

<img width="1309" alt="Screenshot 2025-02-20 at 5 34 37 PM"
src="https://github.com/user-attachments/assets/fbb08542-58b5-4930-8a20-254234e335fa"
/>

<img width="1309" alt="Screenshot 2025-02-20 at 5 34 41 PM"
src="https://github.com/user-attachments/assets/1174849e-edad-4e02-8bf3-bb92aafba4f8"
/>


Release Notes:

- N/A
2025-02-20 22:53:58 +00:00
Piotr Osiewicz
3a222f0666 lsp: Fill root_uri property on Initialize again (#25264)
Closes #ISSUE

Release Notes:

- Fix some language servers (elixir-ls, tailwindcss, phpactor) failing
to start up due to an unfilled root_uri property in the InitializeParams

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2025-02-20 21:55:06 +00:00
Marshall Bowers
300ed6bb4a assistant2: Remove blank line in parameter list (#25286)
This PR removes a blank line in the `ThreadHistory::new` parameter list.

Release Notes:

- N/A
2025-02-20 21:51:16 +00:00
Danilo Leal
3c8dbaf06b outline panel: Improve the search query header design (#25283)
Fine-tuning alignment and spacing.

| Before | After |
|--------|--------|
| ![CleanShot 2025-02-20 at 5  45
09@2x](https://github.com/user-attachments/assets/0db377b2-e030-4a88-8465-fb8c3a535ad3)
| ![CleanShot 2025-02-20 at 5  44
33@2x](https://github.com/user-attachments/assets/ccabef92-3e2b-47b8-a766-2f707d9d9e8f)
|

Release Notes:

- N/A
2025-02-20 18:09:33 -03:00
Peter Tripp
4151b5b12b Make cmd-t open new tab in Assistant (#25267)
Match the behavior of chrome, safari, etc.

Release Notes:

- N/A
2025-02-20 15:56:28 -05:00
Cole Miller
274e70e81d Fix cargo test task for tests module in lib.rs, main.rs, mod.rs (#25092)
Closes #19161

Release Notes:
- Fixed not being able to spawn the `cargo test` task for a `tests`
module in `lib.rs`, `main.rs`, or `mod.rs`
2025-02-20 20:28:34 +00:00
Marshall Bowers
0eea8c3e60 toml: Bump to v0.1.3 (#25278)
This PR bumps the TOML extension to v0.1.3.

Changes:

- https://github.com/zed-industries/zed/pull/25276

Release Notes:

- N/A
2025-02-20 20:02:56 +00:00
itsaphel
191a1d7b10 edit prediction: Don't show and discard completion if toggled off in the buffer (#24927)
Discards an inline completion when it's toggled to off (using, say, a
keyboard shortcut). This matches the behaviour in VS Code and JetBrains,
and I think is a bit more intuitive.

(https://github.com/zed-industries/zed/discussions/24895)

Release Notes:

- N/A
2025-02-20 17:02:31 -03:00
Marshall Bowers
2581f8be92 toml: Respect language server binary settings (#25276)
This PR updates the TOML extension to respect the `binary` settings for
the language server.

Related to https://github.com/zed-industries/zed/issues/22775.

Release Notes:

- N/A
2025-02-20 19:42:55 +00:00
Marshall Bowers
a1223e0646 Use the development credentials provider in development by default (#25273)
This PR changes the default credentials provider used in developments
builds of Zed to the development credentials provider.

Previously this required setting `ZED_DEVELOPMENT_AUTH=1` in order to
opt-in to the development credentials provider.

This led to confusion for new Zed employees who did not know that this
environment variable existed.

If you do need to interact with the system keychain for some reason, you
can run Zed with:

```
ZED_DEVELOPMENT_USE_KEYCHAIN=1
```

`ZED_DEVELOPMENT_AUTH` is dead. Long live Zed development auth!

Release Notes:

- N/A
2025-02-20 19:07:16 +00:00
Thomas Mickley-Doyle
a8610fbd13 Hide the mouse when the user is typing in the editor (#25040)
Closes https://github.com/zed-industries/zed/issues/4461

This PR improves the coding experience by hiding the mouse while the
user is typing so it does not accidentally get in their way, making it
challenging to ready characters in the editor.

Release Notes:

- The following PR hides the cursor when the user is typing by adding a
new cursor style called `None`.
- Assuming the user does not move the mouse, it will stay hidden until
it is moved again.


https://github.com/user-attachments/assets/6ba9f2ee-b9f3-4595-81e4-e9d986da4a39

---------

Co-authored-by: Agus <agus@zed.dev>
Co-authored-by: Peter Tripp <peter@zed.dev>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2025-02-20 15:54:01 -03:00
Cole Miller
3116850688 git: Take only the first line of MERGE_MSG (#25263)
The rest of the generated message consists of comments that are
redundant with what we show in the panel.

Release Notes:

- N/A
2025-02-20 13:53:37 -05:00
Marshall Bowers
21bb7242ea Add CredentialsProvider to silence keychain prompts in development (#25266)
This PR adds a new `CredentialsProvider` trait that abstracts over
interacting with the system keychain.

We had previously introduced a version of this scoped just to Zed auth
in https://github.com/zed-industries/zed/pull/11505.

However, after landing https://github.com/zed-industries/zed/pull/25123,
we now have a similar issue with the credentials for language model
providers that are also stored in the keychain (and thus also produce a
spam of popups when running a development build of Zed).

This PR takes the existing approach and makes it more generic, such that
we can use it everywhere that we need to read/store credentials in the
keychain.

There are still two credential provider implementations:

- `KeychainCredentialsProvider` will interact with the system keychain
(using the existing GPUI APIs)
- `DevelopmentCredentialsProvider` will use a local file on the file
system

We only use the `DevelopmentCredentialsProvider` when:

1. We are running a development build of Zed
2. The `ZED_DEVELOPMENT_AUTH` environment variable is set
- I am considering removing the need for this and making it the default,
but that will be explored in a follow-up PR.

Release Notes:

- N/A
2025-02-20 17:58:50 +00:00
Joseph T. Lyons
31aad858f8 Update workspace persistence doc (#25271)
Release Notes:

- N/A
2025-02-20 12:51:56 -05:00
0x2CA
c18be3ecd0 vim: Fix cursor shape hollow only in block (#25235)
Closes #ISSUE

Before this, in Vim mode, as long as the window loses focus, regardless
of the current cursor shape, it will definitely switch to a hollow
cursor.

Release Notes:

- Fixed vim cursor shape hollow only in block
2025-02-20 10:24:34 -07:00
João Marcos
f609abb48c assistant2: Highlight crease on selection (#24358)
Give the inline file crease inside of `assistant2`'s editor a
selection background when there is a selection over it

Release Notes:

- N/A

---------

Co-authored-by: Piotr <piotr@zed.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-02-20 13:25:08 -03:00
0x2CA
78a8002415 keymap: Fix shift- modifier symbol (#25238)
Closes #25230

```
The shift- modifier can only be used in combination with a letter to indicate the uppercase version. For example shift-g matches typing G. Although on many keyboards shift is used to type punctuation characters like (, the keypress is not considered to be modified and so shift-( does not match.
```

[Document](https://zed.dev/docs/key-bindings#keybinding-syntax)

Release Notes:

- Fixed Keymap use `shift-` modifier symbol
2025-02-20 08:47:51 -07:00
Finn Evers
f2b7d8a9c9 python: Properly check for Pyright language server in local environment (#24873)
Closes #24565 

As pointed out in
https://github.com/zed-industries/zed/issues/24565#issuecomment-2657822723
, the name for the Pyright language server is `pyright-langserver`, not
`pyright`. The latter is a CLI-tool as described in
https://microsoft.github.io/pyright/#/command-line which only provides
static type checking. It has neither LSP-capabilities nor a `--stdio`
argument. Thus, the error as shown in the linked issue appears.

I disagree with the fix as described in
https://github.com/zed-industries/zed/issues/24565#issuecomment-2657904208
, as it could only cause this error to reappear in rare scenarios where
Pyright, but not the Pyright language server is installed in a user's
environment. Just checking for `pyright-langserver` to be present in the
environment seems more straightforward here.

Release Notes:

- Python: Fixed Pyright failing to start when installed locally

Co-authored-by: Beniamin Zagan <47153906+beniaminzagan@users.noreply.github.com>
2025-02-20 10:43:04 -05:00
Marshall Bowers
1d513dd32b Make "allow_rewrap": "anywhere" the default for "Git Commit" files (#25260)
This PR makes `"allow_rewrap": "anywhere"` the default for "Git Commit"
files.

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

Release Notes:

- N/A
2025-02-20 15:11:29 +00:00
Ben Kunkle
b84aec0fae Centralize logic around which keybind to display (#25215)
Closes #24931

We've flipped back and forth at least once on whether the last or first
added keybinding should be shown in different contexts (See
[this](https://github.com/zed-industries/zed/issues/23621#issuecomment-2614061385)
as well as #23621 and the subsequent #23660)

This PR attempts to pick a side to stick with so that we are at least
consistent until #23660 is resolved and we have a way to determine which
keybinds to display in a manner that is both consistent and not
confusing

Release Notes:

- N/A
2025-02-20 09:08:12 -05:00
Marshall Bowers
d4392aaf2d deno: Bump to v0.1.0 (#25255)
This PR bumps the Deno extension to v0.1.0.

Changes:

- https://github.com/zed-industries/zed/pull/16955
- https://github.com/zed-industries/zed/pull/25252

Release Notes:

- N/A
2025-02-20 13:47:08 +00:00
Finn Evers
7f3e2e4aba deno: Make downloaded language server binary executable (#25252)
Closes #20347

This PR fixes the downloaded Deno LSP binary not being able to start by
marking it as executable.

Release Notes:

- N/A
2025-02-20 08:28:05 -05:00
Askar
43f2e4c476 assistant: Add missing toggle model selector action handler (#25248)
#25032 removes handling of `ToggleModelSelector` action. This PR adds
missing handler to context editor.

Release Notes:

- N/A
2025-02-20 11:59:27 +00:00
smit
48541fb05a editor: Ignore whitespaces in selection highlight (#25236)
This PR prevents whitespace selections from being highlighted.

Before:
<img
src="https://github.com/user-attachments/assets/79812ae5-6709-4e93-b203-b8f1d5ffbf7b"
alt="image" width="400px" />

After:
<img
src="https://github.com/user-attachments/assets/77540ef9-65df-476e-9cca-b2cef14f5f3a"
alt="image" width="400px" />


Release Notes:

- Fixed an issue where whitespace selections were incorrectly
highlighted.
2025-02-20 15:40:37 +05:30
renovate[bot]
f973b260c5 Update Rust crate clap to v4.5.30 (#25187)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [clap](https://redirect.github.com/clap-rs/clap) |
workspace.dependencies | patch | `4.5.29` -> `4.5.30` |

---

### Release Notes

<details>
<summary>clap-rs/clap (clap)</summary>

###
[`v4.5.30`](https://redirect.github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#4530---2025-02-17)

[Compare
Source](https://redirect.github.com/clap-rs/clap/compare/v4.5.29...v4.5.30)

##### Fixes

-   *(assert)* Allow `num_args(0..=1)` to be used with `SetTrue`
-   *(assert)* Clean up rendering of `takes_values` assertions

</details>

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzMuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-20 08:19:53 +00:00
renovate[bot]
5c40326174 Update Rust crate blake3 to v1.6.0 (#25205)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [blake3](https://redirect.github.com/BLAKE3-team/BLAKE3) |
workspace.dependencies | minor | `1.5.5` -> `1.6.0` |

---

### Release Notes

<details>
<summary>BLAKE3-team/BLAKE3 (blake3)</summary>

###
[`v1.6.0`](https://redirect.github.com/BLAKE3-team/BLAKE3/releases/tag/1.6.0)

[Compare
Source](https://redirect.github.com/BLAKE3-team/BLAKE3/compare/1.5.5...1.6.0)

version 1.6.0

Changes since 1.5.5:

- Add Hash::from_slice.
([#&#8203;448](https://redirect.github.com/BLAKE3-team/BLAKE3/issues/448))
- Fix a build error on Windows 7 targets.
([#&#8203;447](https://redirect.github.com/BLAKE3-team/BLAKE3/issues/447))

</details>

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzMuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-20 09:55:35 +02:00
renovate[bot]
c043adf764 Update Rust crate sea-orm to v1.1.5 (#25194)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [sea-orm](https://www.sea-ql.org/SeaORM)
([source](https://redirect.github.com/SeaQL/sea-orm)) | dev-dependencies
| patch | `1.1.4` -> `1.1.5` |
| [sea-orm](https://www.sea-ql.org/SeaORM)
([source](https://redirect.github.com/SeaQL/sea-orm)) | dependencies |
patch | `1.1.4` -> `1.1.5` |

---

### Release Notes

<details>
<summary>SeaQL/sea-orm (sea-orm)</summary>

###
[`v1.1.5`](https://redirect.github.com/SeaQL/sea-orm/blob/HEAD/CHANGELOG.md#115---2025-02-14)

[Compare
Source](https://redirect.github.com/SeaQL/sea-orm/compare/1.1.4...1.1.5)

##### New Features

- Added `Schema::json_schema_from_entity` to construct a schema
description in json for the given Entity

</details>

---

### 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 these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzMuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-20 09:54:08 +02:00
renovate[bot]
c309ceb52b Update Rust crate smallvec to v1.14.0 (#25210)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [smallvec](https://redirect.github.com/servo/rust-smallvec) |
workspace.dependencies | minor | `1.13.2` -> `1.14.0` |

---

### Release Notes

<details>
<summary>servo/rust-smallvec (smallvec)</summary>

###
[`v1.14.0`](https://redirect.github.com/servo/rust-smallvec/releases/tag/v1.14.0)

[Compare
Source](https://redirect.github.com/servo/rust-smallvec/compare/v1.13.2...v1.14.0)

#### What's Changed

- Implement `MallocSizeOf` for SmallVec (v1) by
[@&#8203;nicoburns](https://redirect.github.com/nicoburns) in
[https://github.com/servo/rust-smallvec/pull/370](https://redirect.github.com/servo/rust-smallvec/pull/370)

#### New Contributors

- [@&#8203;nicoburns](https://redirect.github.com/nicoburns) made their
first contribution in
[https://github.com/servo/rust-smallvec/pull/370](https://redirect.github.com/servo/rust-smallvec/pull/370)

**Full Changelog**:
https://github.com/servo/rust-smallvec/compare/v1.13.2...v1.14.0

</details>

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzMuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-20 09:53:22 +02:00
renovate[bot]
b8df91aa25 Update Rust crate tempfile to v3.17.1 (#25211)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [tempfile](https://stebalien.com/projects/tempfile-rs/)
([source](https://redirect.github.com/Stebalien/tempfile)) |
workspace.dependencies | minor | `3.16.0` -> `3.17.1` |

---

### Release Notes

<details>
<summary>Stebalien/tempfile (tempfile)</summary>

###
[`v3.17.1`](https://redirect.github.com/Stebalien/tempfile/blob/HEAD/CHANGELOG.md#3171)

[Compare
Source](https://redirect.github.com/Stebalien/tempfile/compare/v3.17.0...v3.17.1)

- Fix build with `windows-sys` 0.52. Unfortunately, we have no CI for
older `windows-sys` versions at the moment...

###
[`v3.17.0`](https://redirect.github.com/Stebalien/tempfile/blob/HEAD/CHANGELOG.md#3170)

[Compare
Source](https://redirect.github.com/Stebalien/tempfile/compare/v3.16.0...v3.17.0)

- Make sure to use absolute paths in when creating unnamed temporary
files (avoids a small race in the "immediate unlink" logic) and in
`Builder::make_in` (when creating temporary files of arbitrary types).
- Prevent a theoretical crash that could (maybe) happen when a temporary
file is created from a drop function run in a TLS destructor. Nobody has
actually reported a case of this happening in practice and I have been
unable to create this scenario in a test.
- When reseeding with `getrandom`, use platform (e.g., CPU) specific
randomness sources where possible.
-   Clarify some documentation.
- Unlink unnamed temporary files on windows *immediately* when possible
instead of waiting for the handle to be closed. We open files with
"Unix" semantics, so this is generally possible.

</details>

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzMuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-20 09:53:03 +02:00
Cole Miller
1429363218 html: Open extra newline between opening and closing HTML tags (#25130)
Closes #12064

It feels a bit strange to use `brackets` for this but it seems to work
without unintended consequences from my testing so far.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-20 01:09:19 -05:00
renovate[bot]
528da6eb26 Update Rust crate serde_json to v1.0.139 (#25221)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [serde_json](https://redirect.github.com/serde-rs/json) | dependencies
| patch | `1.0.138` -> `1.0.139` |
| [serde_json](https://redirect.github.com/serde-rs/json) |
workspace.dependencies | patch | `1.0.138` -> `1.0.139` |

---

### Release Notes

<details>
<summary>serde-rs/json (serde_json)</summary>

###
[`v1.0.139`](https://redirect.github.com/serde-rs/json/releases/tag/v1.0.139)

[Compare
Source](https://redirect.github.com/serde-rs/json/compare/v1.0.138...v1.0.139)

-   Documentation improvements

</details>

---

### 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 these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzMuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-20 01:08:32 -05:00
renovate[bot]
6b06f39fa8 Update Rust crate anyhow to v1.0.96 (#25220)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [anyhow](https://redirect.github.com/dtolnay/anyhow) |
workspace.dependencies | patch | `1.0.95` -> `1.0.96` |

---

### Release Notes

<details>
<summary>dtolnay/anyhow (anyhow)</summary>

###
[`v1.0.96`](https://redirect.github.com/dtolnay/anyhow/releases/tag/1.0.96)

[Compare
Source](https://redirect.github.com/dtolnay/anyhow/compare/1.0.95...1.0.96)

-   Documentation improvements

</details>

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzMuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-20 01:08:09 -05:00
Mikayla Maki
cc46a1fe30 Add an action to toggle the outline from the buffer search bar (#25225)
This was annoying.

Release Notes:

- Fixed a bug where you couldn't open the outline modal when focus was
in the buffer search bar.
2025-02-20 05:23:10 +00:00
Mikayla Maki
0c0201c79f Upgrade Alacritty to respect ~/.hushlogin (#25224)
Closes #4827

Release Notes:

- Fixed a bug where shells spawned by the Zed terminal would not hide
the login message when `~/.hushlogin` exists
2025-02-20 04:55:11 +00:00
Conrad Irwin
d0f7dede79 Git actions v2 (#25197)
Closes #ISSUE

Release Notes:

- Rename `editor::RevertSelectedHunks` and `editor::RevertFile` to
`git::Restore` and `git::RestoreFile` for consistency with git
2025-02-19 21:22:31 -07:00
someone13574
e3836712d6 gpui: Implement PartialEq and Eq for WindowAppearance (#25219)
Release Notes:

- N/A
2025-02-20 03:25:34 +00:00
Max Brunsfeld
0fdad0c0d6 Use line-based and word-based diff when reloading and formatting buffers (#25129)
Closes https://github.com/zed-industries/zed/issues/10122
Closes https://github.com/zed-industries/zed/issues/25034

When formatting buffers or reloading them after they change on disk, we
performed a diff between the buffer's current contents and the new
content. We need this diff in order preserve the positions of cursors
and other decorations when updating the buffer's text.

In order to handle changes within lines, we would previously compute a
*character-wise* diff. This was extremely expensive for large files.

This PR gets rid of the character-wise diff, and instead performs a
normal line-wise diff. Then, for certain replace hunks, we compute a
secondary word-based diff. Also, I've switched to the
[`imara-diff`](https://github.com/pascalkuthe/imara-diff) crate, instead
of `similar`.

Release Notes:

- Fixed a hang that could occur when large files were changed on disk or
formatted.
2025-02-20 00:56:01 +00:00
Michael Sloan
1087e05da4 Update cargo-about to 0.6.6 and remove workaround to fail on warning (#25209)
See https://github.com/EmbarkStudios/cargo-about/issues/274

Release Notes:

- N/A
2025-02-20 00:26:53 +00:00
Beniamin Zagan
121aba7106 icon_theme_selector: Add footer and related docs (#25042)
I've seen that the Theme modal has a footer with 2 links: Theme Docs
(which links to Configuration > Themes) on the left, Install Themes on
the right. I've basically done the same to the Icon Theme modal -
however we seem to be missing a Configuration > Icon Themes doc, I've
basically checked how it was made for Themes and pretty much adapted for
Icon Themes. Maybe a better solution would be to combine both. Or add
Icon themes section under Themes.

I hope somebody from Zed can have a look and adapt this PR where needed.

<img width="553" alt="Screenshot 2025-02-19 at 6 37 20 PM"
src="https://github.com/user-attachments/assets/30602027-b7a7-4690-ba05-fc9eac313e67"
/>

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-20 00:02:24 +00:00
renovate[bot]
b8ed6e8f4d Update Rust crate mdbook to v0.4.45 (#25193)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [mdbook](https://redirect.github.com/rust-lang/mdBook) | dependencies
| patch | `0.4.44` -> `0.4.45` |

---

### Release Notes

<details>
<summary>rust-lang/mdBook (mdbook)</summary>

###
[`v0.4.45`](https://redirect.github.com/rust-lang/mdBook/blob/HEAD/CHANGELOG.md#mdBook-0445)

[Compare
Source](https://redirect.github.com/rust-lang/mdBook/compare/v0.4.44...v0.4.45)


[v0.4.44...v0.4.45](https://redirect.github.com/rust-lang/mdBook/compare/v0.4.44...v0.4.45)

##### Changed

-   Added context to error message when rustdoc is not found.
[#&#8203;2545](https://redirect.github.com/rust-lang/mdBook/pull/2545)
-   Slightly changed the styling rules around margins of footnotes.
[#&#8203;2524](https://redirect.github.com/rust-lang/mdBook/pull/2524)

##### Fixed

-   Fixed an issue where it would panic if a source_path is not set.
[#&#8203;2550](https://redirect.github.com/rust-lang/mdBook/pull/2550)

</details>

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzMuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-19 18:48:02 -05:00
Michael Sloan
3a77e5c8c6 Change license of crates/livekit_api from AGPL to GPL (#25206)
Release Notes:

- N/A
2025-02-19 23:32:51 +00:00
renovate[bot]
8102051e27 Update octokit monorepo (#25203)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@octokit/rest](https://redirect.github.com/octokit/rest.js) |
[`21.1.0` ->
`21.1.1`](https://renovatebot.com/diffs/npm/@octokit%2frest/21.1.0/21.1.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@octokit%2frest/21.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@octokit%2frest/21.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@octokit%2frest/21.1.0/21.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@octokit%2frest/21.1.0/21.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [octokit](https://redirect.github.com/octokit/octokit.js) | [`4.1.1`
-> `4.1.2`](https://renovatebot.com/diffs/npm/octokit/4.1.1/4.1.2) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/octokit/4.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/octokit/4.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/octokit/4.1.1/4.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/octokit/4.1.1/4.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>octokit/rest.js (@&#8203;octokit/rest)</summary>

###
[`v21.1.1`](https://redirect.github.com/octokit/rest.js/releases/tag/v21.1.1)

[Compare
Source](https://redirect.github.com/octokit/rest.js/compare/v21.1.0...v21.1.1)

##### Bug Fixes

- **deps:** update Octokit dependencies to mitigate ReDos \[security]
([#&#8203;484](https://redirect.github.com/octokit/rest.js/issues/484))
([ca256c3](ca256c3349))

</details>

<details>
<summary>octokit/octokit.js (octokit)</summary>

###
[`v4.1.2`](https://redirect.github.com/octokit/octokit.js/releases/tag/v4.1.2)

[Compare
Source](https://redirect.github.com/octokit/octokit.js/compare/v4.1.1...v4.1.2)

##### Bug Fixes

- **deps:** update Octokit dependencies to mitigate ReDos
vulnerabilities \[security]
([#&#8203;2816](https://redirect.github.com/octokit/octokit.js/issues/2816))
([28ff745](28ff745543))

</details>

---

### 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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzMuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-19 18:17:30 -05:00
renovate[bot]
347bfad8b6 Update Rust crate uuid to v1.13.2 (#25202)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [uuid](https://redirect.github.com/uuid-rs/uuid) |
workspace.dependencies | patch | `1.13.1` -> `1.13.2` |

---

### Release Notes

<details>
<summary>uuid-rs/uuid (uuid)</summary>

###
[`v1.13.2`](https://redirect.github.com/uuid-rs/uuid/releases/tag/v1.13.2)

[Compare
Source](https://redirect.github.com/uuid-rs/uuid/compare/1.13.1...v1.13.2)

#### What's Changed

- Add a compile_error when no source of randomness is available on
wasm32-unknown-unknown by
[@&#8203;KodrAus](https://redirect.github.com/KodrAus) in
[https://github.com/uuid-rs/uuid/pull/804](https://redirect.github.com/uuid-rs/uuid/pull/804)
- Prepare for 1.13.2 release by
[@&#8203;KodrAus](https://redirect.github.com/KodrAus) in
[https://github.com/uuid-rs/uuid/pull/805](https://redirect.github.com/uuid-rs/uuid/pull/805)

**Full Changelog**:
https://github.com/uuid-rs/uuid/compare/1.13.1...v1.13.2

</details>

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzMuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-19 23:05:35 +00:00
Michael Sloan
d10430b860 Remove unnecessary icon field from snapcraft.yaml (#25200)
This is handled in `script/snap-build` by populating `snap/gui` with
`zed.png` and `zed.desktop`

Release Notes:

- N/A
2025-02-19 15:47:46 -07:00
Marshall Bowers
d0899e6af5 cli: Fix comment (#25190)
This PR fixes a comment in the `cli` crate that seems to have been
inadvertently changed in #25185.

I also reworded it to be a bit more formal.

Release Notes:

- N/A
2025-02-19 20:33:18 +00:00
Peter Tripp
365dcc5ac7 Improve support for tcsh/csh as login shells (#25122) 2025-02-19 15:31:42 -05:00
Marshall Bowers
af6cdd87cd workspace: Remove stray println! (#25189)
This PR removes a stray `println!` that was left over from #25185.

Release Notes:

- N/A
2025-02-19 20:24:00 +00:00
Mikayla Maki
40425093df Add last window closed setting (#25185)
Release Notes:

- Added an `on_last_window_closed` setting, that allows users to quit
the app when the last window is closed

---------

Co-authored-by: Richard <richard@zed.dev>
2025-02-19 20:03:10 +00:00
Matthew Penner
ffc7558a1d Enable package-version-server lookup in PATH (#23849)
Release Notes:

- Added support for checking for `package-version-server` on the
`$PATH`.

---------

Signed-off-by: Matthew Penner <me@matthewp.io>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-19 19:46:38 +00:00
Joseph T. Lyons
78b43ba745 Issue response: attempt to fix url again (#25184)
Last attempt

Release Notes:

- N/A
2025-02-19 14:38:23 -05:00
Conrad Irwin
836661503f Make ProjectDiff serializable (#25182)
Release Notes:

- N/A
2025-02-19 12:05:25 -07:00
Cole Miller
8e17b34eff Color staged and unstaged hunks differently by opacity (#25108)
Release Notes:

- Make staged diff hunks appear as more opaque than unstaged hunks

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
2025-02-19 18:33:21 +00:00
Joseph T. Lyons
c9bd44f983 Issue response: do not encode query parameters (#25180)
Release Notes:

- N/A
2025-02-19 18:22:46 +00:00
Joseph T. Lyons
5f6d049751 Include link to GitHub issues in issue response (#25178)
Release Notes:

- N/A
2025-02-19 17:48:22 +00:00
Michael Sloan
ea40c1d9b3 Add scripts and configuration for building snap package (#25064)
Release Notes:

- N/A

---------

Co-authored-by: Soumyadeep Ghosh <soumyadeepghosh2004@zohomail.in>
2025-02-19 10:28:23 -07:00
Danilo Leal
2d1a028de5 Refine the multibuffer hint design (#25167)
Just a little touch-up here.

![Screenshot 2025-02-19 at 12 45
06 PM](https://github.com/user-attachments/assets/bab2ab5d-2c4c-4a78-812c-888b216f993e)

Release Notes:

- N/A
2025-02-19 13:55:11 -03:00
Cole Miller
c34b14ae7d Revert "Rework hunk controls (#24814)" (#25174)
This reverts commit a6a8d79d86.

Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-02-19 16:48:35 +00:00
Marshall Bowers
d17c6b392e Add allow_rewrap setting to control editor::Rewrap behavior for a given language (#25173)
This PR adds a new `allow_rewrap` setting to control how
`editor::Rewrap` behaves for a given language.

This is a language setting, so it can either be configured globally or
within the context of an individual language.

For example:

```json
{
  "allow_rewrap": "in_selections",
  "languages": {
    "Typst": {
      "allow_rewrap": "anywhere"
    }
  }
}
```

There are three different values:

- `in_comment`: Only perform rewrapping within comments.
- `in_selections`: Only perform rewrapping within the current
selection(s).
- `anywhere`: Allow rewrapping anywhere.

The global default is `in_comment`, as it is the most conservative
option and allows rewrapping comments without risking breaking other
syntax.

The `Markdown` and `Plain Text` languages default to `anywhere`, which
mirrors the previous behavior for those language that was hard-coded
into the rewrap implementation.

This setting does not have any effect in Vim mode, as Vim mode already
allowed rewrapping anywhere.

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

Release Notes:

- Added an `allow_rewrap` setting to control the `editor::Rewrap`
behavior for a given language.
2025-02-19 16:37:39 +00:00
Antonio Scandurra
1ce8a51712 Ignore custom buffer line height for context menus (#25172)
Closes #24504 

Release Notes:

- Fixed a visual bug that could make context menus unusable when setting
a custom `buffer_line_height`.
2025-02-19 16:33:33 +00:00
Peter Tripp
6a9b1f0dc4 docs: Remove GitHub link from model improvement (#25171)
Release Notes:

- N/A
2025-02-19 16:22:13 +00:00
Peter Tripp
d1af7b1322 Update Assistant context limits (#25087)
- Update GitHub Copilot Chat context limits
- Add decimal separators for consistency
2025-02-19 11:06:20 -05:00
Peter Tripp
f28080a85c docs: OpenAI settings example fix (#25112) 2025-02-19 11:05:52 -05:00
PJ Tatlow
b6fd06d63c project_panel: Make scroll to bottom to use the last visible entry (#25160)
Closes #25159

Release Notes:

- Fixed project panel implementation of the `menu::SelectLast` action
2025-02-19 16:00:23 +00:00
Conrad Irwin
ddec72ecbe Better key-rendering for linux/windows (#25139)
Release Notes:

- linux: Render keystrokes more consistently

Before (note the added extra vertical padding, the + instead of the -,
and the misalignment between the text and the icons)

<img width="354" alt="Screenshot 2025-02-18 at 23 17 57"
src="https://github.com/user-attachments/assets/924cf08f-8204-4503-8052-abaa7686e644"
/>

After (note the lack of those things):

<img width="322" alt="Screenshot 2025-02-18 at 23 15 48"
src="https://github.com/user-attachments/assets/5b20a6f2-757b-44d2-a888-f495523b688d"
/>


I still think we might want to go "vim-mode" always, because the capital
letters are pretty noisy, but that does mean the letters don't match
what's on the keyboard (though they *do* match the keyboard config
files)

<img width="312" alt="Screenshot 2025-02-18 at 23 16 59"
src="https://github.com/user-attachments/assets/cf6f150c-20bc-4492-adb9-fb5c5bdce351"
/>
2025-02-19 08:55:51 -07:00
Conrad Irwin
119bd896b0 Remove language::markdown (#25136)
The language::markdown crate had been superceded by markdown::Mardown.

After #25117, the only two remaining use-cases were rendering git commit
messages (which are arguably not really markdown) and the signature help
(which is definitely not markdown).

Updated the former to use the new markdown component, and the latter to
do syntax highlighting manually.

Release Notes:

- Allow selecting the commit message in git commits
2025-02-19 08:55:36 -07:00
smit
686978d7c5 editor: Minimum scroll thumb size (#25162)
Closes #22610

This PR fixes the invisible scroll thumb or very tiny scroll thumb when
viewing long or wide files.

The difference between `track_bounds` (imagine scrollbar total height)
and `thumb_size` is the remaining area, which maps to the total height
of the page for scrolling to work as expected. This is already accounted
for. That means we can adjust the thumb size as needed, and the
remaining height/width will be mapped correctly.

So, we can simply use define a minimum size for the thumb and handle
cases where the track bounds are smaller than the defined minimum size.
In such cases, the scrollbar will take up the full height/width of the
track bounds. This is handled mainly to avoid panics in extreme edge
cases. Practically, at such small heights/widths, users are unlikely to
attempt scrolling.

Before:


https://github.com/user-attachments/assets/cf2edf03-8b9a-4678-b3c6-9dcbd01e5db8

After:


https://github.com/user-attachments/assets/e9496a44-3e7d-4be7-b892-2762cccd9959

Release Notes:

- Fixed issue where scroll thumb was invisible or too small when viewing
long or wide files.
2025-02-19 21:14:54 +05:30
Danilo Leal
486e106205 license detection: Include the UPL license (#25152)
For projects such as https://github.com/roc-lang/roc that uses this
license.

Release Notes:

- N/A
2025-02-19 12:37:22 -03:00
Nate Butler
086f002f44 git_ui: Git panel polish (#25164)
- Hides header when no active repo/no repo
- Entire commit editor now has i-beam cursor on hover
- Adds an icon to the project diff tab

Release Notes:

- N/A
2025-02-19 15:33:41 +00:00
Cole Miller
c0c48d30db Revert "file_finder: Remove common segments of long paths in search results (#25049)" (#25163)
This reverts commit 9ef0501853 due to a
panic.

```
{
  "thread": "main",
  "payload": "9 is not a valid char boundary in path \"crates/…/LiveKitBridge/\"",
  "location_data": {
    "file": "crates/file_finder/src/file_finder.rs",
    "line": 646
  }
}
```

Release Notes:

- N/A
2025-02-19 15:32:29 +00:00
Danilo Leal
f8770fee10 edit prediction: Refine subtle mode flag styles (#25157)
There's still a tiny, 1px shadow being cast in the flag pole that I
didn't figure out yet how to fix it.


https://github.com/user-attachments/assets/714da320-5995-4bd2-a0dc-6c027b4d91eb

Release Notes:

- N/A
2025-02-19 12:14:37 -03:00
Danilo Leal
044be72038 popover_menu: Add docs to the trigger_with_tooltip method (#25158)
Felt like this was relevant particularly as we're living with both
`trigger` and `trigger_with_tooltip`. At some point, I believe there
should be only one (`trigger_with_tooltip`) and that should be then
renamed to just `trigger` back again! We're supporting both for now just
for ease of migration/avoiding big changes.

Release Notes:

- N/A
2025-02-19 12:14:28 -03:00
Marshall Bowers
8b98b5c82f project: Fix doc comments for NodeBinarySettings (#25154)
This PR fixes the doc comments on the `NodeBinarySettings` struct.

Release Notes:

- N/A
2025-02-19 13:51:20 +00:00
Joseph T. Lyons
d034687475 Bump Zed to v0.176 (#25153)
Release Notes:

- N/A
2025-02-19 13:42:43 +00:00
Marshall Bowers
d4b2e88ab8 language: Fix incorrectly-formatted doc comment (#25151)
This PR fixes an incorrectly-formatted doc comment in the
`BufferSnapshot` impl.

Release Notes:

- N/A
2025-02-19 13:09:16 +00:00
smit
fb19db00ca editor: Do not highlight selected text + Clear highlight preemptively when new selection is detected (#25149)
When selecting text, it highlights all matching occurences along with
selected text itself. This causes highlight overlap, which looks bit
odd. This PR fixes it.

Bonus:

Context: We have an edge case (which we already cover) where we don’t
want to clear `SelectedTextHighlight` every time the selection changes.
This happens when you are dragging the selection across some word, if
you clear it directly on selection change, due to debounce wait, the
highlight take some time to appear, which causes flickering for the
user. We solve this by not clearing it directly but only clearing it
when a new selection is found. This avoids the flicker.

However, we also need to clear the selection even before the debounce
wait if we detect early on that the selection is different from previous
ones. Otherwise, the user will have to wait until the debounce time to
see it cleared on the screen.

The code for this is a little repetitive because we check the buffer
state both before and after the debounce. But this is necessary.

---
Before:

Notice overlapping corners and selected text is bit darker in this case.

![image](https://github.com/user-attachments/assets/ec371079-b513-4216-9f6e-73d1aff99250)

After:

![image](https://github.com/user-attachments/assets/0fb9cd58-5d4b-49e8-91cb-78999c3a54a8)

Release Notes:

- N/A
2025-02-19 17:43:36 +05:30
Kirill Bulatov
094430e5a2 Properly normalize completion labels with multi-byte characters (#25150)
Closes https://github.com/zed-industries/zed/issues/25142

Release Notes:

- Fixed panics on completion with multi-byte characters input
2025-02-19 12:11:10 +00:00
USAMI Kenta
d4414efd6f Fix link to the PHP extension (#25144)
Fix broken links to [PHP
extensions](https://github.com/zed-extensions/php) from [the
documentation](https://zed.dev/docs/languages/php).

Release Notes:

- N/A
2025-02-19 11:10:10 +00:00
Kirill Bulatov
2274e88299 Highlight regex in the project search input (#25147)
Follow-up of https://github.com/zed-industries/zed/pull/25005

Project search also has regex search option, highlight it the same way
too.

Release Notes:

- N/A
2025-02-19 11:04:44 +00:00
smit
48417866cc terminal: Handle shift+click selection (#25143)
Closes #16951

Handle the case where you click on the terminal while pressing Shift. 

Instead of setting a new selection head, we simply update the selection
to that point. This allows you to repeatedly extend the selection to new
points by pressing Shift while preserving the original selection head.

Preview:

Selection works in direct terminal, but doesn't on Vim like program,
which is expected.


https://github.com/user-attachments/assets/e46987d8-a9a3-495d-8dd9-98d461317a8d


Release Notes:

- Added ability to extend selection with Shift + click in the terminal.
2025-02-19 14:43:59 +05:30
smit
1fa105eaa5 docs: Fix selection highlight default value (#25134)
Changed default debounce value in docs to match default settings.

Release Notes:

- N/A
2025-02-19 13:27:49 +05:30
smit
043c4ed296 editor: Fix highlight selection panic (#25141)
Use the latest selection state for highlighting instead of the state
before debounce.

Release Notes:

- N/A
2025-02-19 12:50:49 +05:30
Kirill Bulatov
e57b9e5f83 Ignore selections persistence for multi buffer editors (#25140)
Follow-up of https://github.com/zed-industries/zed/pull/25083

Release Notes:

- N/A
2025-02-19 06:42:22 +00:00
Conrad Irwin
13da468e22 Fix for #25039 (#25138)
Release Notes:

- vim: Fix crash in `ci{`
2025-02-19 06:24:54 +00:00
Conrad Irwin
1678e3cbf1 Fix clicking on file links in editor (#25117)
Closes #18641
Contributes: #13194

Release Notes:

- Open LSP documentation file links in Zed not the system opener
- Render completion documentation markdown consistently with
documentation markdown
2025-02-18 22:54:35 -07:00
Ben Kunkle
ebbc6a9752 Highlight super and this as keywords in JS/TS/TSX (#25135)
Closes #24951

We were highlighting both as `@variable.special` however, they are
_techinically_ keywords and other editors (VSCode/WebStorm) seem to
highlight them as keywords as well.

Release Notes:

- N/A
2025-02-19 05:53:16 +00:00
Ben Kunkle
bb600acaa1 Set base highlight for identifiers in go to variable highlight color (#25128)
Closes #24947 

Release Notes:

- N/A
2025-02-19 01:54:51 +00:00
Marshall Bowers
372aaecdb4 language_model_selector: Authenticate all providers up front (#25123)
This PR fixes an issue where configured language model providers would
not show up unless the configuration view was opened.

The problem was that we were filtering unauthenticated language model
providers out of the language model selector, but would only
authenticate the active provider when the selector loaded.
Authenticating the rest of the providers was deferred until the
configuration view was opened for the first time.

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

Release Notes:

- Fixed an issue where configured languages models were not showing up
in the language model selector until the configuration view was opened
for the first time.
2025-02-19 01:40:07 +00:00
Marshall Bowers
7a6b652ebc language_model: Return AuthenticateErrors from LanguageModelProvider::authenticate (#25126)
This PR updates the `LanguageModelProvider::authenticate` method to
return an `AuthenticateError` instead of an `anyhow::Error`.

This allows us to model the "credentials not found" state explicitly as
`AuthenticateError::CredentialsNotFound`, which enables the caller to
check for this state and act accordingly.

Planning to use this in #25123 to silence errors about missing
credentials when authenticating providers in the background.

Release Notes:

- N/A
2025-02-19 00:01:48 +00:00
Danilo Leal
2627a5fdbe assistant: Improve the language model selector (#25125)
This PR includes change such as:

- Ensures the popover width is fixed/not dancing around
- Ensures the popover is not obscuring the trigger in the buffer and
terminal inline assistant scenarios
- Removes ellipsis from the trigger button label
- Ensures the scrollbar doesn't hide the check icon

| Terminal | Prompt Editor | Buffer |
|--------|--------|--------|
| ![Screenshot 2025-02-18 at 8 43
46 PM](https://github.com/user-attachments/assets/9cdfbaf1-f27e-4f48-877e-9cf61767ecee)
| ![Screenshot 2025-02-18 at 8 43
49 PM](https://github.com/user-attachments/assets/7abf9be2-bd2a-43d7-9a5d-d665e7e9fda3)
| ![Screenshot 2025-02-18 at 8 43
52 PM](https://github.com/user-attachments/assets/017bbdb3-185a-4bf6-9005-018ecafef9dd)
|

Release Notes:

- N/A
2025-02-18 21:01:09 -03:00
Marshall Bowers
a6006afdd7 language_model_selector: Fix variable name (#25121)
This PR fixes an inaccurate variable name that I noticed in the language
model selector.

Release Notes:

- N/A
2025-02-18 23:10:47 +00:00
Kirill Bulatov
92f128ebb0 Do not fail hard on selection persistence if the editor is removed (#25120)
Follow-up of https://github.com/zed-industries/zed/pull/25083

Follows practices from editors' scroll position persisting:
5a05b7461e/crates/editor/src/persistence.rs (L200)
and do not fail hard if the editor with the ID given does not exist.
Also add the problematic IDs into the error context to see them in the
error logs.

Release Notes:

- N/A
2025-02-18 22:52:23 +00:00
Marshall Bowers
98ea659af6 assistant2: Fix thread history only working in one Zed window (#25119)
This PR fixes an issue where the thread history would only work in one
Zed window at a time.

The backing LMDB database can only be opened once per Zed instance.
However, the `ThreadStore` has one instance per Zed window.

To fix this, we need to create the `heed` environment once and store it
as a global, and then reference the same environment across all of the
`ThreadStore`s.

Release Notes:

- N/A
2025-02-18 22:44:43 +00:00
João Marcos
d0816ef2e2 edit predictions: Fix fold not expanding after jump (#25116)
Closes #24938.

Release Notes:

- Edit predictions: Fix fold not expanding after jump
2025-02-18 18:55:00 -03:00
Agus Zubiaga
6885b28c22 assistant2: Deploy inline assistant in PromptEditor (#25094)
Release Notes:

- N/A

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-02-18 18:29:12 -03:00
Conrad Irwin
48f87a8d9a Don't open file finder menu on command (#25097)
Closes #24740

Release Notes:

- Don't open the split menu in the file finder when command is pressed
2025-02-18 14:27:10 -07:00
Danilo Leal
bff1548b48 assistant2: Add file icons for mentioned creases (#25111)
This PR makes the mentioned file creases/buttons use `FileIcons`.

<img width="700" alt="Screenshot 2025-01-21 at 11 20 49 AM"
src="https://github.com/user-attachments/assets/876da534-c11a-4d13-af82-a5948863f954"
/>

Release Notes:

- N/A

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2025-02-18 18:22:01 -03:00
Conrad Irwin
60a44359e4 Terminal mouse improvements (#25104)
Closes #24911
Closes #17983
Closes #7073

Release Notes:

- Terminal: Fix cmd-click on links/files when terminal is not focused
- Terminal: Remove hover treatment after Zed hides/re-opens

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-02-18 13:10:10 -08:00
Michael Sloan
b1872e3afd cx.background_executor().spawn(...) -> cx.background_spawn(...) (#25103)
Done automatically with

> ast-grep -p '$A.background_executor().spawn($B)' -r
'$A.background_spawn($B)' --update-all --globs "\!crates/gpui"

Followed by:

* `cargo fmt`
* Unexpected need to remove some trailing whitespace.
* Manually adding imports of `gpui::{AppContext as _}` which provides
`background_spawn`
* Added `AppContext as _` to existing use of `AppContext`

Release Notes:

- N/A
2025-02-18 20:30:33 +00:00
Piotr Osiewicz
f606b0641e workspace: Prevent user from undoing persistent session deserialization (#25106)
Closes #21846

Release Notes:

- Fixed a bug that made it possible to undo changes in dirty
deserialized buffer (with `restore_unsaved_buffers: true`)
2025-02-18 19:49:39 +00:00
Joseph T. Lyons
e5d8bd27da Issue response: pull team members from staff team (#25102)
Release Notes:

- N/A
2025-02-18 18:43:37 +00:00
Cole Miller
529c65276e Revert gutter stripes as indicator of hunk staged status (#25089)
We've decided to go in a different direction on indicating the staged
status of hunks, so go back for now to a world where we don't display
staged and unstaged hunks differently outside the (still gated) project
diff editor.

cc @iamnbutler 

This reverts commit 8c202b3b09.

Release Notes:

- N/A
2025-02-18 13:20:39 -05:00
Agus Zubiaga
737b177ab5 Switch to columnar selection by pressing alt-shift while mouse is down (#25096)
We begin a columnar selection when we drag the mouse while holding
`alt-shift`. This PR makes it possible to start the selection and then
turn it into columnar by pressing `alt-shift`.

Fixes #5372 

Release Notes:

- Support switching to columnar selection by pressing `alt-shift` while
mouse is down
2025-02-18 14:49:13 -03:00
Marshall Bowers
c10ac31866 theme: Don't log errors for missing themes until extensions have loaded (#25098)
This PR makes it so we don't log errors for missing themes or icon
themes until after the extensions have been loaded.

Currently, if you are using a theme that is defined in an extension it
is common to see one or more "theme not found" errors in the logs. This
is the result of us having to initialize the theme before the extensions
have actually finished loading.

This means that a theme that _may_ exist once extensions load is
considered non-existent before they have loaded.

To that end, we now wait until the extensions have loaded before we
start logging errors if we can't find the theme or icon theme.

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

Release Notes:

- Reduced the number of "theme not found" and "icon theme not found"
errors in the logs for themes provided by extensions.
2025-02-18 17:47:25 +00:00
Danilo Leal
1e255e41cc assistant2: Show token count in the Prompt Editor view (#25091)
Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <hi@aguz.me>
2025-02-18 13:24:15 -03:00
Danilo Leal
8a7565e04b Add small improvement to the theme picker footer (#25088)
- Always start a button's label with an imperative verb
- Use the `ArrowUpRight` icon when the button opens an external link

<img width="700" alt="Screenshot 2025-01-21 at 11 20 49 AM"
src="https://github.com/user-attachments/assets/383d9bad-2756-4e85-acad-4ed956f541cb"
/>

Release Notes:

- N/A
2025-02-18 13:24:06 -03:00
Marshall Bowers
8e7cad7848 theme: Return structured errors when a theme is not found (#25090)
This PR updates the `ThemeRegistry` to return structured errors from the
`get` and `get_icon_theme` methods (which are used to retrieve themes
and icon themes, respectively).

We want to be able to carry the name of the theme that was not found as
state on the error, which is why we use a `Result` and not an `Option`.
However, we also want to be able to accurately identify when the error
case is "not found" so we can take appropriate action, based on the
circumstances.

By using a custom error type instead of an `anyhow::Error`, we get both.

There isn't any functional change in this PR. This just sets us up for
future improvements in this error.

Release Notes:

- N/A
2025-02-18 10:49:55 -05:00
Cole Miller
76f501af71 git: Don't load shallow HEAD text of symlinks (#25058)
For symlinks, return `None` from `load_committed_text` as we do from
`load_index_text` ever since #10037.

Release Notes:

- Fixed diff hunks appearing in unchanged symlinked files
2025-02-18 15:18:23 +00:00
Cole Miller
9ef0501853 file_finder: Remove common segments of long paths in search results (#25049)
This PR makes progress on #7711 by identifying any common prefix of the
paths in the file finder's search results, and replacing the "interior"
of that prefix---every path segment but the first and last---with `...`,
when a heuristic indicates that the longest path would otherwise
overflow the modal.

The elision is not applied to any segment that contains a match for the
search query.

There may be more work to do on #7711 in the case of long result paths
that do not share a significant common prefix.

Release Notes:

- Improved display of long paths in the file finder modal

Co-authored-by: Max <max@zed.dev>
2025-02-18 10:09:15 -05:00
Kirill Bulatov
80458ffb96 Persist selections for editors (#25083)
Part of https://github.com/zed-industries/zed/issues/7371
Closes https://github.com/zed-industries/zed/issues/12853

Release Notes:

- Started to persist latest selections for editors, to restore those on
restart
2025-02-18 14:27:00 +00:00
Danilo Leal
b34037876e terminal: Change context menu item label (#25085)
Super subtle, but when I initially saw just "Close", I got weirded out
asking myself "why there's a menu item to close the context menu?", to
only then realize that it didn't close the menu, but the terminal _tab_.
Might be obvious, because that's how buffer tabs are labled, but I don't
know, it feels like the redundancy here is overall positive.

Release Notes:

- N/A
2025-02-18 11:14:10 -03:00
Danilo Leal
295e486113 edit prediction: Update disabled globs link in the onboarding modal (#25084)
Release Notes:

- N/A
2025-02-18 10:45:25 -03:00
Antonio Scandurra
00bb9a4e92 Fix LSP rename in Go (#25073)
Some language servers report version 0 even if the buffer hasn't been
opened yet. We detect this case and treat it as if the version was
`None`.

Closes #23706

Release Notes:

- Fixed a bug that prevented renames for some languages.
2025-02-18 10:37:58 +00:00
João Marcos
b4fc127e49 editor: Disable "Open in Terminal" when it's not possible (#25059)
When impossible to trigger action, the button should be disabled.

Release Notes:

- N/A
2025-02-18 04:07:04 -03:00
Joseph T. Lyons
0e38d2d4f1 Add doc on workspace persistence (#25062)
Release Notes:

- N/A
2025-02-18 06:07:18 +00:00
Max Brunsfeld
813d870a03 Bump Tree-sitter for bug fixes affecting YAML parser loaded via WASM (#25054)
Closes https://github.com/zed-industries/zed/issues/24742
Closes #24632

This PR bumps Tree-sitter to bring in bug fixes:
* https://github.com/tree-sitter/tree-sitter/pull/4218
* https://github.com/tree-sitter/tree-sitter/pull/4213
* https://github.com/tree-sitter/tree-sitter/pull/4210

I've also bumped Wasmtime and wit-bindgen, since the new Tree-sitter
uses a newer wasmtime.

Release Notes:

- Fixed a parsing bug that caused memory leaks and crashes when using
the Ansible extension

---------

Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
2025-02-17 21:29:27 -08:00
João Marcos
8942e657aa add more tests to editor::SelectAllMatches (#25060)
Release Notes:

- N/A
2025-02-18 05:07:57 +00:00
Cole Miller
06726a28d3 Revert splitting display diff hunks (#25020)
This PR reverts two recent commits that changed our gutter highlights to
mark separately the deleted and added portions of an expanded
modification hunk. It returns to the previous status quo where the
gutter highlight for an expanded modification hunk has the same color
for the deleted and added portions.

Release Notes:

- N/A
2025-02-17 23:45:37 -05:00
Marshall Bowers
93efb57c75 docs: Fix formatting (#25057)
This PR fixes a formatting issue in the docs that was introduced in
#5669.

Seems that PR was merged without passing CI.

Release Notes:

- N/A
2025-02-18 04:43:50 +00:00
João Marcos
a8de6af641 Fix editor::SplitSelectionIntoLines adding an extra line at the end (#25053)
Closes #4795

Release Notes:

- Fixed `editor::SplitSelectionIntoLines` adding an extra line at end
of selection
2025-02-18 03:23:48 +00:00
Ben Kunkle
12aa270b9a Fix TypeScript block indenting when using allman style (#25051)
Closes #24976 

Release Notes:

- Fixed an issue where writing TypeScript using Allman style would
result in incorrect auto-indent behavior
2025-02-18 01:15:10 +00:00
Michael Sloan
888dc0b344 Document file_scan_inclusions and make consistent with default.json (#25046)
Release Notes:

- N/A
2025-02-17 23:31:06 +00:00
Dylan
bb53ad9862 Only allow save_as for pane if can_save_as is true (#25028)
When saving an item, some logic is done to determine whether one can
save it. In the special case where the intent is to `SaveAs`, it was
previously allowed to proceed as long as the buffer was a singleton
(presumably since it only makes sense to provide a save path for a
single file). However, we need to _also_ check that this item can be
"saved as" at all.

For this, we resurrect the `ItemHandle`/`Item` trait method
`can_save_as`. We have given it the default implementation of returning
`false`, and then overridden this in the implementation for
`TerminalView`.

Closes #25023


Release Notes:

- Fixed crash when trying to save terminal buffer

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-02-17 16:01:56 -07:00
Danilo Leal
62a11b047d ui: Remove track_focus method from Picker render (#25043)
Follow-up to: https://github.com/zed-industries/zed/pull/25025

Removing the `track_focus` method fix the focus hijack that we
introduced in the previous PR. cc @0xtimsb
Also, I don't see any immediate affect in the actual scrollbar behavior
without this! Holler if that's not the case.

Release Notes:

- N/A
2025-02-17 19:18:12 -03:00
Osvaldo
e068c7b4b4 vim: Update anyquotes and anybrackets to behave like mini.ai plugin (#24167)
### Overview
This PR improves the existing
[mini.ai‐like](https://github.com/echasnovski/mini.ai) text-object logic
for both “AnyQuotes” (quotes) and “AnyBrackets” (brackets) by adding a
multi‐line fallback. The first pass searches only the current line for a
best match (cover or next); if none are found, we do a multi‐line pass.
This preserves mini.ai's usual “line priority” while ensuring we can
detect pairs that start on one line and end on another.

### What Changed
1. Brackets
- Line-based pass uses `gather_line_brackets(map, caret.row()) `to find
bracket pairs `((), [], {}, <>) `on the caret’s line.
- If that fails, we call `gather_brackets_multiline(map)` to single‐pass
scan the entire buffer, collecting bracket pairs that might span
multiple lines.
- Finally, we apply the mini.ai “**cover or next**” logic
(`pick_best_range`) to choose the best.
2.  Quotes
  - Similar line-based pass with `gather_line_quotes(map, caret.row())`.
- If no local quotes found, we do a multi‐line fallback with
`gather_quotes_multiline(map)`, building a big string for the whole
buffer and using naive regex for "...", '...', and `...`.
  - Also preserves “inner vs. outer” logic:
- For inner (e.g. `ciq`), we skip bounding quotes or brackets if the
range is at least 2 characters wide.
    - For outer (`caq`), we return the entire range.
3. Shared “`finalize`” helpers
- `finalize_bracket_range` and `finalize_quote_range` handle the “inner”
skip‐chars vs. “outer” logic.
  - Both rely on the same “line first, then full fallback” approach.

### Why This Matters
- **Old Behavior**: If you had multi‐line brackets { ... } or multi‐line
quotes spanning multiple lines, they weren’t found at all, since we only
scanned line by line. That made text objects like ci{ or ciq fail in
multi-line scenarios.
- **New Behavior**: We still do a quick line pass (for user‐friendly
“line priority”), but now if that fails, we do a single‐pass approach
across the entire buffer. This detects multi‐line pairs and maintains
mini.ai’s “cover‐or‐next” picking logic.

### Example Use Cases
- **Curly braces:** e.g., opening { on line 10, closing } on line 15 →
previously missed; now recognized.
- **Multi‐line quotes**: e.g., "'Line 1\nLine 2', no longer missed. We
do gather_quotes_multiline with a naive regex matching across newlines.

### Tests
- Updated and expanded coverage in:
  - test_anyquotes_object:
    - Includes a multi-line '...' test case.
- E.g. 'first' false\n<caret>string 'second' → ensuring we detect
multi‐line quotes.
  - test_anybrackets_object:
- Verifies line‐based priority but also multi‐line bracket detection.
- E.g., an open bracket ( on line 3, close ) on line 5, which used to
fail.

### Limitations / Future Enhancements
- **Escaping**: The current approach for quotes is naive and doesn’t
handle escape sequences (like \") or advanced parser logic. For deeper
correctness, we’ll need more advanced logic, this is also not supported
in the original mini.ai plugin so it is a known issue that won't be
attended for now.

### Important Notes
- Fix for the bug: https://github.com/zed-industries/zed/issues/23889
this PR addresses that bug specifically for the AnyQuotes text object.
Note that the issue still remains in the built-in motions (ci', ci",
ci`).
- Caret Position Differences: The caret position now slightly deviates
from Vim’s default behavior. This is intentional. I aim to closely mimic
the mini.ai plugin. Because these text objects are optional
(configurable via vim.json), this adjusted behavior is considered
acceptable and in my opinion the new behavior is better and it should be
the default in vim. Please review the new tests for details and context.
- Improved Special Cases: I’ve also refined how “false strings” in the
middle and certain curly-bracket scenarios are handled. The test suite
reflects these improvements, resulting in a more seamless coding
experience overall.

### References:
- Mini.AI plugin in nvim: https://github.com/echasnovski/mini.ai

Thank you for reviewing these changes!

Release Notes:

- Improve logic of aq, iq, ab and ib motions to work more like mini.ai
plugin
2025-02-17 14:55:48 -07:00
Danilo Leal
a99696b95f pane: Disable the "Close..." controls depending on certain scenarios (#25037)
Closes https://github.com/zed-industries/zed/issues/12471

- Disables "Close Others" if there's just one tab
- Disables "Close Left"/"Close Right" if the above is true or if there's
no tabs to the left/right side of the active tab

Release Notes:

- N/A
2025-02-17 18:01:13 -03:00
Danilo Leal
dc11a61ff8 assistant: Improve language model selector design (#25036)
Closes https://github.com/zed-industries/zed/issues/23234

This PR adds a scrollbar to the model selector, and ensures no label
(model and provider name) is cut off.

Release Notes:

- N/A
2025-02-17 17:12:46 -03:00
Michael Sloan
5eadeb67b0 Add newlines before some headings in licenses.md (#25035)
Release Notes:

- N/A
2025-02-17 19:59:06 +00:00
Michael Sloan
aa4c438f83 Use Vec for KeyContext instead of SmallVec (#24916)
In Zed the key context almost always has more than 1 entry, so use of
`SmallVec` is just adding overhead.

In Zed while using the editor this typically has more than 8 entries.
Since `ContextEntry` is 48 bytes, if this were made to be a
`SmallVec<[ContextEntry; 10]>` then it would use 480 bytes on the stack,
which to me seems like a lot to be copying. So, instead opting to just
use `Vec`

Release Notes:

- N/A
2025-02-17 12:43:28 -07:00
Danilo Leal
f2bc3d3738 assistant: Add model selector to the Context Editor (#25032)
This PR also removes everything related with the model selector from the
Context Editor toolbar.

Release Notes:

- N/A
2025-02-17 16:29:42 -03:00
Richard Hao
f833a01a7e copilot: Add support for Gemini 2.0 Flash model to Copilot Chat (#24952)
Co-authored-by: Peter Tripp <peter@zed.dev>
2025-02-17 19:25:38 +00:00
smit
3e9722685b editor: Highlight all matching occurrences of text in selection (#24835)
Closes #12635

- [x] Get it working
- [x] Disable for multi cursor
- [x] Disable for vim visual line selection
- [x] Add setting to disable it
- [x] Add scrollbar marker
- [x] Handle delete state capturing selection

Preview:

https://github.com/user-attachments/assets/a76cde64-4f6c-4575-91cc-3a03a954e7a9

Release Notes:

- Added support to highlight all matching occurrences of text within the
selection in editor.

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Danilo <danilo@zed.dev>
2025-02-18 00:51:14 +05:30
Max Brunsfeld
1e1b637b50 Fix handling of empty blocks in BlockMap::chunks (#25031)
Closes https://github.com/zed-industries/zed/issues/23391

Release Notes:

- Fixed a bug that sometimes caused incorrect syntax highlighting when
deploying the inline assistant.
2025-02-17 11:20:19 -08:00
Danilo Leal
69477dfd8c ui: Add show_scrollbar method to Picker (#25025)
Now, you can pass `show_scrollbar` to Picker that implement a
`uniform_list`. If that's on, the scrollbar should auto-hide if you move
your focus elsewhere. By default, this method is turned off.

Release Notes:

- N/A

---------

Co-authored-by: smit <0xtimsb@gmail.com>
2025-02-17 16:16:48 -03:00
Danilo Leal
cd108cc5f6 theme: Improve contrast for One Light's read_background token (#25027)
Closes https://github.com/zed-industries/zed/issues/20575

Subtle change, but more pronounced in single characters.

| Before | After |
|--------|--------|
| <img width="700" alt="Screenshot 2025-02-07 at 4 58 16 PM"
src="https://github.com/user-attachments/assets/dc9332e1-6e86-44a9-bb7a-5f195d778127"
/> | <img width="700" alt="Screenshot 2025-02-07 at 4 58 16 PM"
src="https://github.com/user-attachments/assets/d8fd408f-f8ea-4b87-bd20-345ffc24b5b1"
/> |

Release Notes:

- N/A
2025-02-17 16:05:57 -03:00
Agus Zubiaga
478bccadd6 edit predictions: Handle no keybind for preview (#25015)
If the user removes all modified keybinds in `edit_prediction_conflict`,
the preview bar above the completions menu would disappear. This PR
handles that case slightly better by still showing the 1-line preview
(which they might accept via an unmodified keybind) and hides the `|
Preview ⌥` section since it's impossible to invoke in this case.

Release Notes:

- Handle `edit_prediction_conflict` context without modified keybinds
for `AcceptEditPrediction`
2025-02-17 16:00:20 -03:00
Conrad Irwin
08e9080ec9 Use lowercase for vim key bindings (#25024)
Vim itself shows keybindings cased according to the character, and so
it's confusing for people coming from vim that we show all key-bindings
uppercase with an icon denoting shift (c.f. #14287).

So, in #24322 we changed Zed to use lowercase for bindings in vim mode.
Unfortunately this (in practice) looks awful because our key icons are
designed to be paired with uppercase letters.

Instead, we now (for vim mode) show the same syntax as would be used in
the keymap file for Zed. This is different from vim (i.e. we show
shift-z instead of Z, and cmd-d instead of <D-z>) but hopefully avoids
the original confusion, and as a bonus makes it easy to figure out the
syntax you need for a workspace::SendKeystrokes.

Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-02-17 10:17:22 -07:00
Peter Tripp
e45b5cadc0 Redact Google Gemini API keys from error messaging and log (#24884)
Now:
```
ERROR assistant_context_editor] error sending request for url (https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:countTokens?key=REDACTED)
```

Release Notes:

- Improved redaction of Google Gemini keys from API errors in logs
2025-02-17 11:42:22 -05:00
Danilo Leal
510260a10e Use the MessageNotification component for the release notes toast (#25013)
Closes https://github.com/zed-industries/zed/issues/24981

Release Notes:

- N/A

---------

Co-authored-by: smit <0xtimsb@gmail.com>
2025-02-17 11:32:04 -03:00
Kirill Bulatov
aca31cfb8d Use Alacritty from crates.io (#25016)
Follow-up of https://github.com/zed-industries/zed/pull/23085

Release Notes:

- N/A
2025-02-17 12:55:06 +00:00
Kirill Bulatov
b5d85b638a Add regex highlights in the query input (#25005)
Closes https://github.com/zed-industries/zed/discussions/24994

Release Notes:

- Added regex highlights in the query input
2025-02-17 09:15:43 +00:00
Michael Sloan
91c99baaf2 Allowlist for APGL crates in check-licenses (#24998)
Also makes `shellcheck` pass

Release Notes:

- N/A
2025-02-17 07:48:28 +00:00
Michael Sloan
3b5dad8a9d Improve cargo about licenses configuration (#24997)
* Remove unneeded accepted licenses

* Removes use of `workarounds`

  - `wasmtime` no longer needed in list

  - `ring` now checks the license SHA

* Checks license from `files` instead of from `git`. Execution time ~17s
instead of ~24s

Release Notes:

- N/A
2025-02-17 07:18:03 +00:00
Michael Sloan
bcba0b92ed Fail if cargo about emits warnings (#24996)
Warnings are emitted despite --fail have no license field like `ring`

Release Notes:

- N/A
2025-02-17 07:05:01 +00:00
GiM
8b088b3985 Fix F10 and Alt+F handling on Windows (#24745)
Closes #24744
and should also fix #17819 

The change is split into two commits, first one adds F10 handling (it
needs to be handled inside `parse_syskeydown_msg_keystroke`, the second
one properly handles `Alt+Fn` combinations, this also needs to happen in
`parse_syskeydown_msg_keystroke` and is similar to a fragment inside
`parse_keydown_msg_keystroke`

Release Notes:

- Fixes F10 and Alt+Fn handling on windows
2025-02-17 14:43:18 +08:00
Joseph T. Lyons
58491807a4 Fix up tasks documentation (#24991)
Release Notes:

- N/A
2025-02-17 01:03:29 +00:00
Ben Kunkle
ba2c1821af Revert "Fix issue with vim::PushOperator documentation (#24825)" (#24989)
This reverts commit 28c667a3c7.

Release Notes:

- N/A
2025-02-16 23:51:27 +00:00
Michael Sloan
c7df2d787b Rename livekit_server to livekit_api (#24984)
The name `livekit_server` was a bit misleading as it is not a server and
gets built into both the client and server - the server code is in
`collab`.

Release Notes:

- N/A
2025-02-16 20:24:12 +00:00
Conrad Irwin
2400fb4d9e Set keybindings to non-vim mode when vim is disabled (#24971)
Closes #ISSUE

Release Notes:

- N/A
2025-02-16 10:19:03 -05:00
Cole Miller
74d1a652f6 Switch back to upstream oo7 (#24957)
As of 0.4.0, the decryption panic that we were seeing has been fixed
upstream (thanks @bilelmoussaoui!), so stop using our temporary fork.

Release Notes:

- N/A
2025-02-15 18:54:54 +00:00
Maksim Bondarenkov
bd41be2caf Revert "docs: Update msys2 section (#24942)" (#24958)
This reverts commit 56f13ddc50.

I hurried with Zed update for MSYS2... anyway good news that I managed
to fix build issue

Release Notes:

- N/A
2025-02-15 18:52:10 +00:00
Cole Miller
4ff1173047 git: Fill the commit message buffer from MERGE_MSG (#24843)
This PR uses the template merge message in `.git/MERGE_MSG` to populate
the commit message buffer in the git panel. This is done:

- when the commit message buffer is first created
- when the list of merge heads in .git changes, only if the buffer
doesn't already have some text in it

Hopefully this strikes a good balance between convenience and not
stomping on the user's toes.

Release Notes:

- N/A
2025-02-15 18:29:45 +00:00
Cole Miller
394bb8f4e6 Fix a couple of diff hunk issues (#24913)
- Fix hunks losing their expandedness when staged or unstaged
- Disable collapsing hunks in the project diff editor

Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-02-15 18:18:32 +00:00
Maksim Bondarenkov
56f13ddc50 docs: Update msys2 section (#24942)
CLANG64 version of Zed is being removed in
https://github.com/msys2/MINGW-packages/pull/23391 due to build issue
with `aws-lc-sys`:
https://github.com/aws/aws-lc-rs/issues/696#issuecomment-2660839255

Closes #ISSUE

Release Notes:

- N/A
2025-02-15 07:56:52 -05:00
Conrad Irwin
79e3faffb2 Make save all prompt less noisy (#24934)
Don't show clean items from dirty multibuffers, and dedupe filenames in
case you have a file open in a buffer and a multibuffer

Release Notes:

- N/A
2025-02-14 22:40:14 -07:00
Dino
e0fc767c11 Display case-sensitive keybindings for vim commands (#24322)
This Pull Request tackles the issue outline in #14287 by changing the
way `KeyBinding`s for vim mode are displayed in the command palette.
It's worth pointing out that this whole thing was pretty much
implemented by Conrad Irwin during a pairing session, I just tried to
clean up some other changes introduced for a different issue, while
improving some comments.

Here's a quick list of the changes introduced:

- Update `KeyBinding` with a new `vim_mode` field to determine whether
the keybinding should be displayed in vim mode.
- Update the way `KeyBinding` is rendered, so as to detect if the
keybinding is for vim mode, if it is, only display keys in uppercase if
they require the shift key.
- Introduce a new global state – `VimStyle(bool)` - use to determine
whether `vim_mode` should be enabled or disabled when creating a new
`KeyBinding` struct. This global state is automatically set by the `vim`
crate whenever vim mode is enabled or disabled.
- Since the app's context is now required when building a `KeyBinding` ,
update a lot of callers to correctly pass this context.

And before and after screenshots, for comparison:

| before | after |
|--------|-------|
| <img width="1050" alt="SCR-20250205-tyeq"
src="https://github.com/user-attachments/assets/e577206d-2a3d-4e06-a96f-a98899cc15c0"
/> | <img width="1050" alt="SCR-20250205-tylh"
src="https://github.com/user-attachments/assets/ebbf70a9-e838-4d32-aee5-0ffde94d65fb"
/> |

Closes #14287 

Release Notes:

- Fix rendering of vim commands to preserve case sensitivity

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-02-14 22:03:59 -07:00
xzbdmw
14289b5a6e Fix ReplaceWithRegister with proper dot repeat (#24932)
Release Notes:

- Fixed ReplaceWithRegister with proper dot repeat
2025-02-14 21:32:21 -07:00
Aymen
1b38b9f61d theme: Add file icon associations for .rdata and .RData files (#24925)
.RData is a file that stores R objects.

Release Notes:

- Added file icon associations for `.rdata` and `.RData` files.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-15 02:04:35 +00:00
Marshall Bowers
bf21d9183e docs: Update icon theme docs with file_stems and file_suffixes (#24929)
This PR updates the icon theme docs with examples of `file_stems` and
`file_suffixes` that were added in
https://github.com/zed-industries/zed/pull/24926.

Release Notes:

- N/A
2025-02-15 01:58:19 +00:00
Marshall Bowers
e60123bbdc Allow icon themes to provide their own file associations (#24926)
This PR adds the ability for icon themes to provide their own file
associations.

The old `file_types.json` that was previously used to make these
associations has been removed in favor of storing them on the default
theme.

Icon themes have two new fields on them:

- `file_stems`: A mapping of file stems to icon keys.
- `file_suffixes`: A mapping of file suffixes to icon keys.

These mappings produce icon keys which can then be used in `file_icons`
to associate them to a particular icon:

```json
{
  "file_stems": {
    "Makefile": "make"
  },
  "file_suffixes": {
    "idr": "idris"
  },
  "file_icons": {
    "idris": { "path": "./icons/idris.svg" },
    "make": { "path": "./icons/make.svg" }
  }
}
```

When loading an icon theme, the `file_stems` and `file_icons` fields
will be merged with the ones from the base icon theme, with the values
from the icon theme being loaded overriding ones in the base theme.

Release Notes:

- Added the ability for icon themes to provide their own file
associations.
2025-02-15 00:35:13 +00:00
renovate[bot]
f2776099ab Update Rust crate rustls to v0.23.23 (#24762)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [rustls](https://redirect.github.com/rustls/rustls) |
workspace.dependencies | patch | `0.23.22` -> `0.23.23` |

---

### 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.

---

- [x] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNjcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE2Ny4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-14 23:25:15 +00:00
Randa Zraik
a01d2dd798 file_icons: Add separate icon keys for .NET solution and project files (#24851)
Add separate icon keys for .NET solution and project files.

Release Notes:

- Icon themes: Added the ability to change file icons for Visual Studio
project files:
  - Solution files (`.sln`)
  - Solution User Options files (`.suo`)
  - C# Project files (`.csproj`)
  - F# Project files (`.fsproj`)
  - Visual Basic Project files (`.vbproj`)

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-14 18:19:22 -05:00
Danilo Leal
88fe54ea02 docs: Add link to Zeta's Hugging Face profile (#24915)
Release Notes:

- N/A
2025-02-14 22:58:46 +00:00
renovate[bot]
64b2a499fa Update Rust crate filedescriptor to v0.8.3 (#24759)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [filedescriptor](https://redirect.github.com/wezterm/wezterm) |
dependencies | patch | `0.8.2` -> `0.8.3` |

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNjcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE2Ny4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-14 22:49:40 +00:00
renovate[bot]
5825413eb8 Update Rust crate jsonwebtoken to v9.3.1 (#24760)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [jsonwebtoken](https://redirect.github.com/Keats/jsonwebtoken) |
workspace.dependencies | patch | `9.3.0` -> `9.3.1` |

---

### Release Notes

<details>
<summary>Keats/jsonwebtoken (jsonwebtoken)</summary>

###
[`v9.3.1`](https://redirect.github.com/Keats/jsonwebtoken/blob/HEAD/CHANGELOG.md#931-2024-02-06)

[Compare
Source](https://redirect.github.com/Keats/jsonwebtoken/compare/v9.3.0...v9.3.1)

-   Update base64

</details>

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNjcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE2Ny4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-15 00:39:46 +02:00
renovate[bot]
86b8852e97 Update Rust crate tree-sitter-elixir to v0.3.4 (#24763)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[tree-sitter-elixir](https://redirect.github.com/elixir-lang/tree-sitter-elixir)
| workspace.dependencies | patch | `0.3.3` -> `0.3.4` |

---

### Release Notes

<details>
<summary>elixir-lang/tree-sitter-elixir (tree-sitter-elixir)</summary>

###
[`v0.3.4`](https://redirect.github.com/elixir-lang/tree-sitter-elixir/blob/HEAD/CHANGELOG.md#v034-2025-02-06)

[Compare
Source](https://redirect.github.com/elixir-lang/tree-sitter-elixir/compare/v0.3.3...v0.3.4)

##### Changed

- Changed the built-in queries to use `#any-of?` predicate over
`#match?`
([#&#8203;80](https://redirect.github.com/elixir-lang/tree-sitter-elixir/pull/80))

</details>

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNjcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE2Ny4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-15 00:39:37 +02:00
renovate[bot]
1fd099bb38 Update aws-sdk-rust monorepo (#24773)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [aws-sdk-kinesis](https://redirect.github.com/awslabs/aws-sdk-rust) |
dependencies | minor | `1.60.0` -> `1.61.0` |
| [aws-sdk-s3](https://redirect.github.com/awslabs/aws-sdk-rust) |
dependencies | minor | `1.73.0` -> `1.76.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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNjcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE2Ny4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-15 00:39:10 +02:00
renovate[bot]
082347c5c2 Update Rust crate clap to v4.5.29 (#24754)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [clap](https://redirect.github.com/clap-rs/clap) |
workspace.dependencies | patch | `4.5.28` -> `4.5.29` |

---

### Release Notes

<details>
<summary>clap-rs/clap (clap)</summary>

###
[`v4.5.29`](https://redirect.github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#4529---2025-02-11)

[Compare
Source](https://redirect.github.com/clap-rs/clap/compare/v4.5.28...v4.5.29)

##### Fixes

- Change `ArgMatches::args_present` so not-present flags are considered
not-present (matching the documentation)

</details>

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNjcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE2Ny4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-15 00:38:46 +02:00
renovate[bot]
2377f53444 Update Rust crate ctor to 0.3.0 (#24774)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [ctor](https://redirect.github.com/mmastrac/rust-ctor) |
workspace.dependencies | minor | `0.2.6` -> `0.3.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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNjcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE2Ny4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-15 00:38:18 +02:00
renovate[bot]
df02745a1f Update Rust crate uuid to v1.13.1 (#24780)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [uuid](https://redirect.github.com/uuid-rs/uuid) |
workspace.dependencies | minor | `1.12.1` -> `1.13.1` |

---

### Release Notes

<details>
<summary>uuid-rs/uuid (uuid)</summary>

###
[`v1.13.1`](https://redirect.github.com/uuid-rs/uuid/releases/tag/1.13.1)

[Compare
Source](https://redirect.github.com/uuid-rs/uuid/compare/1.13.0...1.13.1)

#### What's Changed

- Fix `wasm32` with `atomics` by
[@&#8203;bushrat011899](https://redirect.github.com/bushrat011899) in
[https://github.com/uuid-rs/uuid/pull/797](https://redirect.github.com/uuid-rs/uuid/pull/797)
- Prepare for 1.13.1 release by
[@&#8203;KodrAus](https://redirect.github.com/KodrAus) in
[https://github.com/uuid-rs/uuid/pull/799](https://redirect.github.com/uuid-rs/uuid/pull/799)

#### New Contributors

- [@&#8203;bushrat011899](https://redirect.github.com/bushrat011899)
made their first contribution in
[https://github.com/uuid-rs/uuid/pull/797](https://redirect.github.com/uuid-rs/uuid/pull/797)

**Full Changelog**:
https://github.com/uuid-rs/uuid/compare/1.13.0...1.13.1

###
[`v1.13.0`](https://redirect.github.com/uuid-rs/uuid/releases/tag/1.13.0)

[Compare
Source](https://redirect.github.com/uuid-rs/uuid/compare/1.12.1...1.13.0)

#### ⚠️ Potential Breakage

This release updates our version of `getrandom` to `0.3` and `rand` to
`0.9`. It is a **potentially breaking change** for the following users:

##### no-std users who enable the `rng` feature

`uuid` still uses `getrandom` by default on these platforms. Upgrade
your version of `getrandom` and [follow its new
docs](https://docs.rs/getrandom/0.3.1/getrandom/index.html#custom-backend)
on configuring a custom backend.

##### `wasm32-unknown-unknown` users who enable the `rng` feature
without the `js` feature

Upgrade your version of `getrandom` and [follow its new
docs](https://docs.rs/getrandom/0.3.1/getrandom/index.html#custom-backend)
on configuring a backend.

You'll also need to enable the `rng-getrandom` or `rng-rand` feature of
`uuid` to force it to use `getrandom` as its backend:

```diff
[dependencies.uuid]
version = "1.13.0"
- features = ["v4"]
+ features = ["v4", "rng-getrandom"]

[dependencies.getrandom]
version = "0.3"
```

If you're on `wasm32-unknown-unknown` and using the `js` feature of
`uuid` you shouldn't see any breakage. We've kept this behavior by
vendoring in `getrandom`'s web-based backend when the `js` feature is
enabled.

#### What's Changed

- Update `getrandom` to `0.3` and `rand` to `0.9` by
[@&#8203;KodrAus](https://redirect.github.com/KodrAus) in
[https://github.com/uuid-rs/uuid/pull/793](https://redirect.github.com/uuid-rs/uuid/pull/793)
- Support forcing `getrandom` on `wasm32-unknown-unknown` without
JavaScript by [@&#8203;KodrAus](https://redirect.github.com/KodrAus) in
[https://github.com/uuid-rs/uuid/pull/794](https://redirect.github.com/uuid-rs/uuid/pull/794)
- Prepare for 1.13.0 release by
[@&#8203;KodrAus](https://redirect.github.com/KodrAus) in
[https://github.com/uuid-rs/uuid/pull/795](https://redirect.github.com/uuid-rs/uuid/pull/795)

**Full Changelog**:
https://github.com/uuid-rs/uuid/compare/1.12.1...1.13.0

</details>

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNjcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE2Ny4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-15 00:38:07 +02:00
Étienne BERSAC
e6749b5955 Use shell script language for bats files (#24877)
bats is a superset of bash. It's a common tool for writing TAP tests in
bash.

https://bats-core.readthedocs.io/en/stable/tutorial.html#your-first-test

Release Notes:

- Added recognition for `.bats` files as "Shell Script".

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-14 17:34:43 -05:00
Richard Weber
5f6311171f Add SSH port forwards to settings (#24474)
Closes #6920

Release Notes:

- Added ability to specify port forwarding settings for remote
connections
2025-02-14 14:52:24 -07:00
Nate Butler
58b0a6c4af Remove legacy themes and licenses (#24589)
This PR removes Zed legacy themes – all themes except `One` and
`Gruvbox`.

These will likely be renamed in the future (to something like `Zed One`,
`Zed Gruvbox` to allow the original authors of those themes to provide
their own official versions.)

You can grab the
[`zed-legacy-themes`](https://github.com/zed-extensions/legacy-themes)
extension if you would like to continue using one of these themes.

## How to install the extension:

- Go to the extension store (`zed: extensions`, cmd+shift+x on macOS)
- Search for the `Zed Legacy Themes` extension and install it.
- Now the themes will be installed (with names like `Zed Legacy:
Andromeda`)

Release Notes:

- A number of themes are no longer installed in Zed by default:
`Andromeda`, `Atelier`, `Rosé Pine`, `Sandcastle`, `Solarized` &
`Summercamp`. If you would like to continue using one of these
extensions: 1. Open `zed: extensions`, 2. Install the
`zed-legacy-themes` extension. 3. Re-select your desired theme.

Co-authored-by: maxdeviant <elliott.codes@gmail.com>
2025-02-14 21:49:23 +00:00
5brian
216a5e2998 file_icons: Associate .R files with R (#24907)
Closes #24899

Sorted using:
https://github.com/zed-industries/zed/pull/12487#issue-2325944879

Release Notes:

- N/A

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-14 16:30:09 -05:00
Marshall Bowers
f9432518e5 file_icons: Sort file_types.json (#24910)
This PR sorts the `file_types.json` file alphabetically.

This is the command I used to sort it:

```
pnpm --package=json-sort-cli dlx jsonsort assets/icons/file_icons/file_types.json
```

Release Notes:

- N/A
2025-02-14 21:09:59 +00:00
Conrad Irwin
be83074243 Git context menu (#24844)
Adds the non-entry specific right click menu to the panel, and the
features contained therin:

* Stage all
* Discard Tracked Changes
* Trash Untracked Files

Also changes the naming from "Changes"/"New" to better match Git's
terminology (though not convinced on this, it was awkward to describe
"Discard Changes" without a way to distinguish between the changes and
the files containing them).

Release Notes:

- N/A
2025-02-14 14:04:32 -07:00
Kirill Bulatov
bd105a5fc7 Continue improving font adjustment settings (#24908)
Follow-up of https://github.com/zed-industries/zed/pull/24857

Based on the feedback,

* made non-persisting font size change as a default in Zed keymaps
JetBrains IDEs seem to persist font size changes by default, hence left
to do so in Zed keymaps too

* fixed a bug with holding a binding to change the font size caused
flickering

Release Notes:

- N/A
2025-02-14 21:00:56 +00:00
Marshall Bowers
c049df2a2e docs: Add section on file icons to CONTRIBUTING.md (#24905)
This PR adds a section on file icons to the `CONTRIBUTING.md` guide.

Release Notes:

- N/A
2025-02-14 20:40:52 +00:00
Margret Riegert
3040ef416a file_icons: Add icon key for Crystal and ECR files (#24903)
Release Notes:

- Icon themes: Added the ability to change the file icon for Crystal
(`.cr`, `.ecr`) files.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-14 15:27:43 -05:00
smit
e37acdeeb8 migrator: Fix keymap task_name regression (#24898)
Closes #24832

Only turns specified deperecated keys and values to snake case.

Release Notes:

- Fixed issue where keybindings would open task selector instead of
spawn that task.
2025-02-15 01:33:30 +05:30
Ashish Bhate
1d26a27afa go: Fix tree-sitter query for outlines (#24861)
Closes #14497

Release Notes:
- Fixed outline view for Go to correctly indent types and show missing
variables.
----
This PR fixes the tree-sitter query for outlines for Go code. It
correctly indents "grouped" `type` declarations. It also fixes missing
variables for "grouped" `var` declarations.

### Before: 
1. Incorrectly indented types from `G` to `K` and `aliasInt`
2. Missing vars `M` and `N` in outline 

![Screenshot_20250214_175404](https://github.com/user-attachments/assets/7c1142bd-fe60-4c65-9fa2-3bae4eb43d63)

### After:
1. Types no longer indented incorrectly
2. Missing vars `M` and `N` appear in the outline, as expected

![Screenshot_20250214_175431](https://github.com/user-attachments/assets/61010273-e98d-425d-93ad-17f04bd83b54)

### Caveats:
1. This fix comes from an hour or so of reading about tree-sitter and
its query syntax. I'm not an expert.
2. I'm not sure how to test this. I've done manual testing and it
appears to works as expected without an regressions.
2025-02-14 11:45:43 -08:00
Dino
294dea10e8 vim: Change into visual mode on select all matches (#24897)
This Pull Request fixes an issue where selecting all matches on a search
would not update vim to visual mode.

In the video below the following scenarios are tested:

1. Clicking "Select All Matches" in the buffer search bar correctly
changes vim to visual mode
2. Pressing Enter jumps the cursor to the first match and does not
change vim's mode
3. Selecting all matches with the `⌥⏎` changes vim to visual mode


https://github.com/user-attachments/assets/f7535638-987e-4f33-9364-292f99b60167

Thanks @ConradIrwin for both the quick pairing session and the solution!
🙇

Closes #14681 

Release Notes:

- vim: Use visual mode for "select all matches" in search (to be
consistent with `ga`)
2025-02-14 12:37:35 -07:00
Marshall Bowers
fc85ca0101 ci: Fix issue response script (#24891)
This PR fixes the issue response script.

There were a number of things preventing it from working:

- The directory name used in the GitHub Action did not match the one on
disk.
  - The script has been moved accordingly
- `ts-node` does not support ESM.
- `ts-node` seems unmaintained, so I changed the script to be plain JS
that is type-checked with TypeScript.
- The data being sent to the Slack API was invalid:
- Each section block can only have a maximum of 3000 characters in the
`text` field, so we need to break up the issue list across multiple
sections.
- We needed to escape `&`, `<`, and `>` characters in the issue titles.

Release Notes:

- N/A
2025-02-14 19:37:33 +00:00
Cole Miller
de020af6ef Fix duplicate hunk controls after splitting DisplayDiffHunk (#24893)
This PR fixes expanded modification hunks having two sets of hunk
controls after #24834.

Release Notes:

- N/A
2025-02-14 18:58:59 +00:00
Joseph T. Lyons
610158b2f0 Force manual publishing of preview (#24894)
This is just a temporary change to help us debug with some weird issues
happening:
- Discord release not firing for certain builds
- Random blank release drafts showing up

Release Notes:

- N/A
2025-02-14 18:58:39 +00:00
Conrad Irwin
20460239a0 Fix scroll to top on multibuffer save (#24885)
Co-Authored-By: Cole <cole@zed.dev>

Closes #ISSUE

Release Notes:

- N/A

---------

Co-authored-by: Cole <cole@zed.dev>
2025-02-14 13:18:07 -05:00
Shidfar Hodizoda
7ee492746d assistant: Add Mistral support (#24879)
Closes #12519.

Release Notes:

- Added support for Mistral to the Assistant.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-14 13:07:41 -05:00
smit
5c5caf1ffe linux: Fix reload hangs for several minutes (#24882)
Closes #22666

This PR fixes the long wait time to open Zed (2 mins in my case) after
reloading on Linux.

This bug fix is funny:

1. We were using TCP for Zed instances to talk to each other. Reload was
broken here too due to TCP connections not being killed on time.
2. [#11488](https://github.com/zed-industries/zed/pull/11488) PR fixed
the TCP connection issue by adding a wait until it gets killed. I
suppose at that time, this wait time was small.
3. Later, we changed how Zed talks to each other in
[#11585](https://github.com/zed-industries/zed/pull/11585) by using
Datagram and removing TCP. The new approach simply uses a `.sock` file
and a file descriptor to check if some program is listening to it.
4. TCP check is now unnecessary, and it still wait for a long time (I
suppose, TIME_WAIT time, don't quote me on this), even though we don’t
use TCP anymore for this.

This PR just removes that unnecessary TCP wait.

Release Notes:

- Fixed issue where reload hangs for several minutes on Linux.
2025-02-14 21:54:26 +05:30
Cole Miller
39c9b1f170 Gutter-highlight removed and added portions of expanded diff hunks separately (#24834)
cc @iamnbutler 

Release Notes:

- Color gutter highlights separately for removed and deleted portions of
git modification hunks

Co-authored-by: Conrad <conrad@zed.dev>
2025-02-14 10:31:30 -05:00
Agus Zubiaga
4aae0e2f6c welcome: Try Zed Edit Prediction (#24876)
Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-14 10:28:07 -05:00
Kirill Bulatov
744579ede9 Move git status updates to a background thread #2 (#24722)
Follow-up of https://github.com/zed-industries/zed/pull/24307

Brings back the PR and fixes the issue with the git status not
propagated, if computed too slow.
Now, git repo update
* waits in the background for all `scan_dir` repo status updates and
triggers another status update send afterwards
* ensures that the update sent is reported correctly (`scanning = true`)
if either FS or status scan is running still
* during worktree's git statuses updates, bumps `status_scan_id` to
ensure the repo update is reported to all subscribers

Release Notes:

- Improved project panel's speed in large projects
2025-02-14 16:47:11 +02:00
Agus Zubiaga
592e8fbffc edit predictions: Fix cursor popover edit preview panic (#24866)
Release Notes:

- Fixed a panic when displaying a whitespace-only line in the edit
prediction preview

---------

Co-authored-by: Antonio <antonio@zed.dev>
2025-02-14 15:44:45 +01:00
Piotr Osiewicz
a618830aea project: Fine-grained language server management (#24038)
Closes #ISSUE
https://github.com/zed-industries/zed/pull/23804
Release Notes:

- Improved detection of project roots for use by language servers.

Closes #ISSUE

Release Notes:

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

---------

Co-authored-by: smit <0xtimsb@gmail.com>
Co-authored-by: Henrikh Kantuni <henrikh.kantuni@gmail.com>
Co-authored-by: Caleb! <48127194+kaf-lamed-beyt@users.noreply.github.com>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Danilo <danilo@zed.dev>
Co-authored-by: Nate Butler <iamnbutler@gmail.com>
2025-02-14 15:41:49 +01:00
Agus Zubiaga
8d839fca06 edit predictions: Fix manually requesting completions (#24860)
We were disabling edit predictions altogether when
`show_edit_predictions` was set to `false`. However, even in that case,
`editor::ShowEditPrediction` is supposed to let your request a
prediction manually.

Release Notes:

- Fixed `editor::ShowEditPrediction` when `show_edit_predictions` is set
to `false`.
2025-02-14 10:44:28 -03:00
Sanjeev Shrestha
79ee01eb14 theme: Fix icon theme switching changing the theme (#24849)
Closes #24846 

Release Notes:

- Fixed an issue where changing the icon theme would change the theme.
2025-02-14 08:14:00 -05:00
Kirill Bulatov
3b91de8003 Adds a way to toggle font size without settings adjustments (#24857)
Closes https://github.com/zed-industries/zed/issues/23505

Now `zed::IncreaseBufferFontSize` (and all the same UI- and
Buffer-related settings) action is parameterized with `{ "persist": true
}` (default).
Using `"persist": false` brings back resizing behavior prior to
https://github.com/zed-industries/zed/pull/23265


Release Notes:

- Added a way to toggle font size without settings adjustments
2025-02-14 13:27:48 +02:00
Cole Miller
2f734cbd5e Fix missing hunks in project diff (#24847)
Release Notes:

- N/A
2025-02-14 01:07:07 -05:00
Joseph T. Lyons
5ac82161fa Attempt to fix issue_response script (#24842)
Release Notes:

- N/A
2025-02-13 19:30:50 -05:00
Joseph T. Lyons
e133d3b31e Add issues_needing_comment script (#24839)
This might require a few follow-up commits to get this to work! 😅

Release Notes:

- N/A
2025-02-13 23:48:06 +00:00
Marshall Bowers
9094f53211 Disable edit prediction in Cloudflare Workers .dev.vars files (#24838)
This PR adds `.dev.vars` files as a default exclusion for edit
prediction.

These files are used by Cloudflare Workers and are likely to contain
secrets.

Release Notes:

- Excluded Cloudflare Workers `.dev.vars` files from edit prediction.
2025-02-13 23:31:22 +00:00
Mikayla Maki
5d26ce14d7 Centralize the CopyPath and CopyRelativePath actions to zed_actions (#24836)
I spent an hour with @marcospb19 this morning debugging an issue with
adding `Copy Path` and `Copy Relative Path` actions to the editor
context menu. Turned out that the problem was using
`workspace::CopyPath` in the menu and `editor::CopyPath` in the action
handler.

This is an easy mistake to make, so let's fix it for everyone.

Release Notes:

- N/A
2025-02-13 23:30:44 +00:00
Ben Kunkle
28c667a3c7 Fix issue with vim::PushOperator documentation (#24825)
Closes: #24718

Release Notes:

- N/A
2025-02-13 22:08:46 +00:00
Marshall Bowers
c38deb1430 zeta: Remove predict-edits-launch feature flag (#24829)
This PR removes the `predict-edits-launch` feature flag that was added
in #24720.

We don't need this anymore now that we've launched!

Release Notes:

- N/A
2025-02-13 21:48:09 +00:00
Marshall Bowers
8af54c589b zeta: Update URL to edit prediction blog post (#24828)
This PR updates the URL to the edit prediction blog post.

Release Notes:

- N/A
2025-02-13 21:03:26 +00:00
Peter Tripp
8b85d26981 docs: Add model-improvement.md (#24813) 2025-02-13 15:37:49 -05:00
Nate Butler
8c202b3b09 editor: Update git hunk indicators to show staging status when hunk is expanded (#24818)
- Update git hunk indicators to show staging status when hunk is
expanded
- Updates uses of status colors to the new version control theme colors
- Adds new version control theme colors to included themes

Before:

![CleanShot 2025-02-13 at 14 42
48@2x](https://github.com/user-attachments/assets/ccca147e-0de2-4e69-9cd4-01b010bf06d0)

After:

![CleanShot 2025-02-13 at 14 42
04@2x](https://github.com/user-attachments/assets/1ab49174-bde5-43b2-83c5-d217533df49a)

(Colors here are from before theme colors were added)


Release Notes:

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

---------

Co-authored-by: cole-miller <m@cole-miller.net>
2025-02-13 20:12:23 +00:00
Cole Miller
a6a8d79d86 Rework hunk controls (#24814)
- Remove prev hunk arrow
- Replace next hunk arrow with "Skip" labelled button
- New "Stage"/"Unstage" labelled button

cc @iamnbutler 

Release Notes:

- N/A

---------

Co-authored-by: Nate <nate@zed.dev>
Co-authored-by: Nate Butler <iamnbutler@gmail.com>
2025-02-13 19:38:20 +00:00
Marshall Bowers
74e8164cd7 collab: Remove POST /snowflake/events endpoint (#24817)
This PR removes the `POST /snowflake/events` endpoint that was added in
#23842, as it is no longer used.

Release Notes:

- N/A
2025-02-13 14:31:57 -05:00
Agus Zubiaga
16ffddf48d edit predictions: Prefer keybinding with least modifiers when not in conflict mode (#24812)
This workaround a gpui issue where we don't pick the right keybinding

Release Notes:

- N/A
2025-02-13 17:15:53 +00:00
Conrad Irwin
2f741c8686 vim: Fix :wq in multibuffer (#24603)
Supercedes #24561
Closes #21059

Before this change we would skip saving multibuffers regardless of the
save intent. Now we correctly save them.

Along the way:
* Prompt to save when closing the last singleton copy of an item (even
if it's still open in a multibuffer).
* Update our file name prompt to pull out dirty project items from
multibuffers instead of counting multibuffers as untitled files.
* Fix our prompt test helpers to require passing the button name instead
of the index. A few tests were passing invalid responses to save
prompts.
* Refactor the code a bit to hopefully clarify it for the next bug.

Release Notes:

- Fixed edge-cases when closing multiple items including multibuffers.
Previously no prompt was generated when closing an item that was open in
a multibuffer, now you will be prompted.
- vim: Fix :wq in a multibuffer
2025-02-13 17:13:43 +00:00
Cole Miller
8c780ba287 Fix branches with slashes in their names not being listed (#24809)
`refs/heads/*` doesn't match e.g. `refs/heads/cole/branch-with-slash`
(thanks fnmatch), but `refs/heads/**/*` does. This also works for
several levels of slash.

Release Notes:

- N/A
2025-02-13 15:32:23 +00:00
Cole Miller
de0d9d678e Save open buffers before staging or unstaging their backing files (#24767)
Release Notes:

- N/A
2025-02-13 15:07:28 +00:00
Agus Zubiaga
2db5eed840 edit predictions: Do not use conflict context for other providers (#24807)
This is to avoid confusing copilot/supermaven users when the cursor is
on leading whitespace.

Release Notes:

- N/A
2025-02-13 14:59:52 +00:00
Peter Tripp
cf176dab20 legal: Terms of Use (2025-02-13) (#24803)
Updated [Zed Terms of Use](https://zed.dev/terms) for Edit Predictions
2025-02-13 09:41:43 -05:00
Agus Zubiaga
c3afeda80b Make edit prediction bindings backwards compatible with existing user keymaps (#24802)
Release Notes:

- N/A

---------

Co-authored-by: Antonio <antonio@zed.dev>
2025-02-13 14:22:08 +00:00
702 changed files with 33176 additions and 28383 deletions

View File

@@ -10,16 +10,39 @@ body:
value: |
<!-- Please insert a one line summary of the issue below -->
<!-- Include all steps necessary to reproduce from a clean Zed installation. Be verbose -->
SUMMARY_SENTENCE_HERE
<!-- Be verbose: Include all steps necessary to reproduce from a clean Zed installation. -->
<!-- Code snippets are better than images, a repository link that reproduces the issue is ideal. -->
Steps to trigger the problem:
1.
2.
3.
4.
Actual Behavior:
Expected Behavior:
<!--
Is there anything additional necessary to reproduce this issue?
- settings.json, keymap.json, .editorconfig etc?
- Does it happen intermittently or only with specific projects / file types?
- Have you found a workaround?
Did you check your Zed.log to see if there is any relevant details there?
- When including large items (videos, screenshots, logs, configs) please wrap with:
<details><summary>See inside for XXXXYYY</summary>
```shell
code
```
</details>
-->
validations:
required: true

View File

@@ -109,8 +109,16 @@ jobs:
- name: cargo clippy
run: ./script/clippy
- name: Install cargo-machete
uses: clechasseur/rs-cargo@8435b10f6e71c2e3d4d3b7573003a8ce4bfc6386 # v2
with:
command: install
args: cargo-machete@0.7.0
- name: Check unused dependencies
uses: bnjbvr/cargo-machete@main
uses: clechasseur/rs-cargo@8435b10f6e71c2e3d4d3b7573003a8ce4bfc6386 # v2
with:
command: machete
- name: Check licenses
run: |
@@ -232,7 +240,7 @@ jobs:
timeout-minutes: 60
name: (Windows) Run Clippy and tests
if: github.repository_owner == 'zed-industries'
runs-on: hosted-windows-1
runs-on: hosted-windows-2
steps:
# more info here:- https://github.com/rust-lang/cargo/issues/13020
- name: Enable longer pathnames for git
@@ -265,8 +273,7 @@ jobs:
- name: cargo clippy
working-directory: ${{ env.ZED_WORKSPACE }}
# Windows can't run shell scripts, so we need to use `cargo xtask`.
run: cargo xtask clippy
run: ./script/clippy.ps1
- name: Run tests
uses: ./.github/actions/run_tests_windows
@@ -298,8 +305,9 @@ jobs:
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
APPLE_NOTARIZATION_USERNAME: ${{ secrets.APPLE_NOTARIZATION_USERNAME }}
APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
@@ -350,14 +358,14 @@ jobs:
mv target/x86_64-apple-darwin/release/Zed.dmg target/x86_64-apple-darwin/release/Zed-x86_64.dmg
- name: Upload app bundle (aarch64) to workflow run if main branch or specific label
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
with:
name: Zed_${{ github.event.pull_request.head.sha || github.sha }}-aarch64.dmg
path: target/aarch64-apple-darwin/release/Zed-aarch64.dmg
- name: Upload app bundle (x86_64) to workflow run if main branch or specific label
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
with:
name: Zed_${{ github.event.pull_request.head.sha || github.sha }}-x86_64.dmg
@@ -408,7 +416,7 @@ jobs:
run: script/bundle-linux
- name: Upload Linux bundle to workflow run if main branch or specific label
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
with:
name: zed-${{ github.event.pull_request.head.sha || github.sha }}-x86_64-unknown-linux-gnu.tar.gz
@@ -456,7 +464,7 @@ jobs:
run: script/bundle-linux
- name: Upload Linux bundle to workflow run if main branch or specific label
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
with:
name: zed-${{ github.event.pull_request.head.sha || github.sha }}-aarch64-unknown-linux-gnu.tar.gz
@@ -482,6 +490,6 @@ jobs:
- bundle
steps:
- name: gh release
run: gh release edit $GITHUB_REF_NAME --draft=false
run: gh release edit $GITHUB_REF_NAME --draft=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -0,0 +1,25 @@
name: Update All Top Ranking Issues
on:
schedule:
- cron: "0 */12 * * *"
workflow_dispatch:
jobs:
update_top_ranking_issues:
runs-on: ubuntu-latest
if: github.repository == 'zed-industries/zed'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up uv
uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3
with:
version: "latest"
enable-cache: true
cache-dependency-glob: "script/update_top_ranking_issues/pyproject.toml"
- name: Install Python 3.13
run: uv python install 3.13
- name: Install dependencies
run: uv sync --project script/update_top_ranking_issues -p 3.13
- name: Run script
run: uv run --project script/update_top_ranking_issues script/update_top_ranking_issues/main.py --github-token ${{ secrets.GITHUB_TOKEN }} --issue-reference-number 5393

View File

@@ -0,0 +1,25 @@
name: Update Weekly Top Ranking Issues
on:
schedule:
- cron: "0 15 * * *"
workflow_dispatch:
jobs:
update_top_ranking_issues:
runs-on: ubuntu-latest
if: github.repository == 'zed-industries/zed'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up uv
uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3
with:
version: "latest"
enable-cache: true
cache-dependency-glob: "script/update_top_ranking_issues/pyproject.toml"
- name: Install Python 3.13
run: uv python install 3.13
- name: Install dependencies
run: uv sync --project script/update_top_ranking_issues -p 3.13
- name: Run script
run: uv run --project script/update_top_ranking_issues script/update_top_ranking_issues/main.py --github-token ${{ secrets.GITHUB_TOKEN }} --issue-reference-number 6952 --query-day-interval 7

View File

@@ -65,7 +65,7 @@ jobs:
command: deploy .cloudflare/docs-proxy/src/worker.js
- name: Preserve Wrangler logs
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
if: always()
with:
name: wrangler_logs

33
.github/workflows/issue_response.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Issue Response
on:
schedule:
- cron: "0 12 * * 2"
workflow_dispatch:
jobs:
issue-response:
if: github.repository_owner == 'zed-industries'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 9
- name: Setup Node
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
with:
node-version: "20"
cache: "pnpm"
cache-dependency-path: "script/issue_response/pnpm-lock.yaml"
- run: pnpm install --dir script/issue_response
- name: Run Issue Response
run: pnpm run --dir script/issue_response start
env:
ISSUE_RESPONSE_GITHUB_TOKEN: ${{ secrets.ISSUE_RESPONSE_GITHUB_TOKEN }}
SLACK_ISSUE_RESPONSE_WEBHOOK_URL: ${{ secrets.SLACK_ISSUE_RESPONSE_WEBHOOK_URL }}

View File

@@ -62,8 +62,9 @@ jobs:
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
APPLE_NOTARIZATION_USERNAME: ${{ secrets.APPLE_NOTARIZATION_USERNAME }}
APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}

1
.gitignore vendored
View File

@@ -26,6 +26,7 @@
/dev.zed.Zed*.json
/plugins/bin
/script/node_modules
/snap
/zed.xcworkspace
DerivedData/
Packages

View File

@@ -21,6 +21,8 @@ Andrei Zvonimir Crnković <andrei@0x7f.dev>
Andrei Zvonimir Crnković <andrei@0x7f.dev> <andreicek@0x7f.dev>
Antonio Scandurra <me@as-cii.com>
Antonio Scandurra <me@as-cii.com> <antonio@zed.dev>
Ben Kunkle <ben@zed.dev>
Ben Kunkle <ben@zed.dev> <ben.kunkle@gmail.com>
Bennet Bo Fenner <bennet@zed.dev>
Bennet Bo Fenner <bennet@zed.dev> <53836821+bennetbo@users.noreply.github.com>
Bennet Bo Fenner <bennet@zed.dev> <bennetbo@gmx.de>
@@ -112,6 +114,8 @@ Sebastijan Kelnerič <sebastijan.kelneric@sebba.dev> <sebastijan.kelneric@vichav
Sergey Onufrienko <sergey@onufrienko.com>
Shish <webmaster@shishnet.org>
Shish <webmaster@shishnet.org> <shish@shishnet.org>
Smit Barmase <0xtimsb@gmail.com>
Smit Barmase <0xtimsb@gmail.com> <smit@zed.dev>
Thorben Kröger <dev@thorben.net>
Thorben Kröger <dev@thorben.net> <thorben.kroeger@hexagon.com>
Thorsten Ball <thorsten@zed.dev>

View File

@@ -14,12 +14,12 @@
},
"JSON": {
"tab_size": 2,
"preferred_line_length": 100,
"preferred_line_length": 120,
"formatter": "prettier"
},
"JSONC": {
"tab_size": 2,
"preferred_line_length": 100,
"preferred_line_length": 120,
"formatter": "prettier"
},
"JavaScript": {

View File

@@ -37,6 +37,16 @@ We plan to set aside time each week to pair program with contributors on promisi
- Pair with us and watch us code to learn the codebase
- Low effort PRs, such as those that just re-arrange syntax, won't be merged without a compelling justification
## File icons
Zed's default icon theme consists of icons that are hand-designed to fit together in a cohesive manner.
We do not accept PRs for file icons that are just an off-the-shelf SVG taken from somewhere else.
### Adding new icons to the Zed icon theme
If you would like to add a new icon to the Zed icon theme, [open a Discussion](https://github.com/zed-industries/zed/discussions/new?category=ux-and-design) and we can work with you on getting an icon designed and added to Zed.
## Bird's-eye view of Zed
Zed is made up of several smaller crates - let's go over those you're most likely to interact with:

1096
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -15,7 +15,10 @@ members = [
"crates/audio",
"crates/auto_update",
"crates/auto_update_ui",
"crates/aws_http_client",
"crates/bedrock",
"crates/breadcrumbs",
"crates/buffer_diff",
"crates/call",
"crates/channel",
"crates/cli",
@@ -31,10 +34,10 @@ members = [
"crates/context_server",
"crates/context_server_settings",
"crates/copilot",
"crates/credentials_provider",
"crates/db",
"crates/deepseek",
"crates/diagnostics",
"crates/buffer_diff",
"crates/docs_preprocessor",
"crates/editor",
"crates/evals",
@@ -74,9 +77,9 @@ members = [
"crates/language_selector",
"crates/language_tools",
"crates/languages",
"crates/livekit_api",
"crates/livekit_client",
"crates/livekit_client_macos",
"crates/livekit_server",
"crates/lmstudio",
"crates/lsp",
"crates/markdown",
@@ -84,6 +87,7 @@ members = [
"crates/media",
"crates/menu",
"crates/migrator",
"crates/mistral",
"crates/multi_buffer",
"crates/node_runtime",
"crates/notifications",
@@ -216,6 +220,8 @@ assistant_tools = { path = "crates/assistant_tools" }
audio = { path = "crates/audio" }
auto_update = { path = "crates/auto_update" }
auto_update_ui = { path = "crates/auto_update_ui" }
aws_http_client = { path = "crates/aws_http_client" }
bedrock = { path = "crates/bedrock" }
breadcrumbs = { path = "crates/breadcrumbs" }
call = { path = "crates/call" }
channel = { path = "crates/channel" }
@@ -232,6 +238,7 @@ component_preview = { path = "crates/component_preview" }
context_server = { path = "crates/context_server" }
context_server_settings = { path = "crates/context_server_settings" }
copilot = { path = "crates/copilot" }
credentials_provider = { path = "crates/credentials_provider" }
db = { path = "crates/db" }
deepseek = { path = "crates/deepseek" }
diagnostics = { path = "crates/diagnostics" }
@@ -273,9 +280,9 @@ language_models = { path = "crates/language_models" }
language_selector = { path = "crates/language_selector" }
language_tools = { path = "crates/language_tools" }
languages = { path = "crates/languages" }
livekit_api = { path = "crates/livekit_api" }
livekit_client = { path = "crates/livekit_client" }
livekit_client_macos = { path = "crates/livekit_client_macos" }
livekit_server = { path = "crates/livekit_server" }
lmstudio = { path = "crates/lmstudio" }
lsp = { path = "crates/lsp" }
markdown = { path = "crates/markdown" }
@@ -283,6 +290,7 @@ markdown_preview = { path = "crates/markdown_preview" }
media = { path = "crates/media" }
menu = { path = "crates/menu" }
migrator = { path = "crates/migrator" }
mistral = { path = "crates/mistral" }
multi_buffer = { path = "crates/multi_buffer" }
node_runtime = { path = "crates/node_runtime" }
notifications = { path = "crates/notifications" }
@@ -362,12 +370,11 @@ zeta = { path = "crates/zeta" }
#
aho-corasick = "1.1"
# TODO(#18342): Update to version 0.25 from crates.io when it is released.
alacritty_terminal = { git = "https://github.com/alacritty/alacritty.git", rev = "5e78d20c709cb1ab8d44ca7a8702cc26d779227c" }
alacritty_terminal = { git = "https://github.com/zed-industries/alacritty.git", rev = "03c2907b44b4189aac5fdeaea331f5aab5c7072e" }
any_vec = "0.14"
anyhow = "1.0.86"
arrayvec = { version = "0.7.4", features = ["serde"] }
ashpd = { version = "0.10", default-features = false, features = ["async-std"] }
ashpd = { version = "0.11", default-features = false, features = ["async-std"] }
async-compat = "0.2.1"
async-compression = { version = "0.4", features = ["gzip", "futures-io"] }
async-dispatcher = "0.1"
@@ -379,6 +386,11 @@ async-trait = "0.1"
async-tungstenite = "0.28"
async-watch = "0.3.1"
async_zip = { version = "0.0.17", features = ["deflate", "deflate64"] }
aws-config = { version = "1.5.16", features = ["behavior-version-latest"] }
aws-credential-types = { version = "1.2.1", features = ["hardcoded-credentials"] }
aws-sdk-bedrockruntime = { version = "1.73.0", features = ["behavior-version-latest"] }
aws-smithy-runtime-api = { version = "1.7.3", features = ["http-1x", "client"] }
aws-smithy-types = { version = "1.2.13", features = ["http-body-1-x"] }
base64 = "0.22"
bitflags = "2.6.0"
blade-graphics = { git = "https://github.com/kvark/blade", rev = "b16f5c7bd873c7126f48c82c39e7ae64602ae74f" }
@@ -393,10 +405,10 @@ chrono = { version = "0.4", features = ["serde"] }
clap = { version = "4.4", features = ["derive"] }
cocoa = "0.26"
cocoa-foundation = "0.2.0"
convert_case = "0.7.0"
convert_case = "0.8.0"
core-foundation = "0.9.3"
core-foundation-sys = "0.8.6"
ctor = "0.2.6"
ctor = "0.4.0"
dashmap = "6.0"
derive_more = "0.99.17"
dirs = "4.0"
@@ -420,6 +432,7 @@ hyper = "0.14"
http = "1.1"
ignore = "0.4.22"
image = "0.25.1"
imara-diff = "0.1.8"
indexmap = { version = "2.7.0", features = ["serde"] }
indoc = "2"
inventory = "0.3.19"
@@ -497,7 +510,6 @@ sha2 = "0.10"
shellexpand = "2.1.0"
shlex = "1.3.0"
signal-hook = "0.3.17"
similar = "1.3"
simplelog = "0.12.2"
smallvec = { version = "1.6", features = ["union"] }
smol = "2.0"
@@ -524,20 +536,20 @@ tiny_http = "0.8"
toml = "0.8"
tokio = { version = "1" }
tower-http = "0.4.4"
tree-sitter = { version = "0.24", features = ["wasm"] }
tree-sitter = { version = "0.25.2", features = ["wasm"] }
tree-sitter-bash = "0.23"
tree-sitter-c = "0.23"
tree-sitter-cpp = "0.23"
tree-sitter-css = "0.23"
tree-sitter-elixir = "0.3"
tree-sitter-embedded-template = "0.23.0"
tree-sitter-gitcommit = {git = "https://github.com/zed-industries/tree-sitter-git-commit", rev = "88309716a69dd13ab83443721ba6e0b491d37ee9"}
tree-sitter-gitcommit = { git = "https://github.com/zed-industries/tree-sitter-git-commit", rev = "88309716a69dd13ab83443721ba6e0b491d37ee9" }
tree-sitter-go = "0.23"
tree-sitter-go-mod = { git = "https://github.com/camdencheek/tree-sitter-go-mod", rev = "6efb59652d30e0e9cd5f3b3a669afd6f1a926d3c", package = "tree-sitter-gomod" }
tree-sitter-gowork = { git = "https://github.com/zed-industries/tree-sitter-go-work", rev = "acb0617bf7f4fda02c6217676cc64acb89536dc7" }
tree-sitter-heex = { git = "https://github.com/zed-industries/tree-sitter-heex", rev = "1dd45142fbb05562e35b2040c6129c9bca346592" }
tree-sitter-diff = "0.1.0"
tree-sitter-html = "0.20"
tree-sitter-html = "0.23"
tree-sitter-jsdoc = "0.23"
tree-sitter-json = "0.24"
tree-sitter-md = { git = "https://github.com/tree-sitter-grammars/tree-sitter-markdown", rev = "9a23c1a96c0513d8fc6520972beedd419a973539" }
@@ -553,18 +565,18 @@ unicode-segmentation = "1.10"
unicode-script = "0.5.7"
url = "2.2"
uuid = { version = "1.1.2", features = ["v4", "v5", "v7", "serde"] }
wasmparser = "0.217"
wasm-encoder = "0.217"
wasmtime = { version = "25", default-features = false, features = [
wasmparser = "0.221"
wasm-encoder = "0.221"
wasmtime = { version = "29", default-features = false, features = [
"async",
"demangle",
"runtime",
"cranelift",
"component-model",
] }
wasmtime-wasi = "25"
wasmtime-wasi = "29"
which = "6.0.0"
wit-component = "0.201"
wit-component = "0.221"
zed_llm_client = "0.4"
zstd = "0.11"
metal = "0.31"
@@ -606,6 +618,7 @@ features = [
"Win32_Storage_FileSystem",
"Win32_System_Com",
"Win32_System_Com_StructuredStorage",
"Win32_System_Console",
"Win32_System_DataExchange",
"Win32_System_LibraryLoader",
"Win32_System_Memory",
@@ -626,7 +639,7 @@ features = [
# TODO livekit https://github.com/RustAudio/cpal/pull/891
[patch.crates-io]
cpal = { git = "https://github.com/zed-industries/cpal", rev = "fd8bc2fd39f1f5fdee5a0690656caff9a26d9d50" }
real-async-tls = { git = "https://github.com/zed-industries/async-tls", rev = "1e759a4b5e370f87dc15e40756ac4f8815b61d9d", package = "async-tls"}
real-async-tls = { git = "https://github.com/zed-industries/async-tls", rev = "1e759a4b5e370f87dc15e40756ac4f8815b61d9d", package = "async-tls" }
[profile.dev]
split-debuginfo = "unpacked"
@@ -696,6 +709,9 @@ debug = "full"
lto = false
codegen-units = 16
[workspace.lints.rust]
unexpected_cfgs = { level = "allow" }
[workspace.lints.clippy]
dbg_macro = "deny"
todo = "deny"

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="283.6413 127.3453 56 55.9999" width="16px" height="16px">
<path d="M 808.592 158.131 C 807.489 158.131 806.592 157.234 806.592 156.131 C 806.592 155.028 807.489 154.131 808.592 154.131 C 809.695 154.131 810.592 155.028 810.592 156.131 C 810.592 157.234 809.695 158.131 808.592 158.131 Z M 776.705 185.039 L 773.457 183.145 L 780.122 178.979 L 779.062 177.283 L 771.505 182.006 L 765.592 178.557 L 765.592 169.666 L 771.147 165.963 L 770.037 164.299 L 764.551 167.956 L 758.592 164.551 L 758.592 159.711 L 765.088 155.999 L 764.096 154.263 L 758.592 157.408 L 758.592 153.711 L 764.592 150.283 L 770.592 153.711 L 770.592 157.565 L 766.077 160.274 L 767.107 161.988 L 771.592 159.297 L 776.077 161.988 L 777.107 160.274 L 772.592 157.565 L 772.592 153.666 L 778.147 149.963 C 778.425 149.777 778.592 149.465 778.592 149.131 L 778.592 142.131 L 776.592 142.131 L 776.592 148.596 L 771.551 151.956 L 765.592 148.551 L 765.592 139.705 L 770.592 136.789 L 770.592 145.131 L 772.592 145.131 L 772.592 135.622 L 776.705 133.223 L 784.592 135.852 L 784.592 164.565 L 770.077 173.274 L 771.107 174.988 L 784.592 166.897 L 784.592 182.41 L 776.705 185.039 Z M 806.592 169.131 C 806.592 170.234 805.695 171.131 804.592 171.131 C 803.489 171.131 802.592 170.234 802.592 169.131 C 802.592 168.028 803.489 167.131 804.592 167.131 C 805.695 167.131 806.592 168.028 806.592 169.131 Z M 796.592 179.131 C 796.592 180.234 795.695 181.131 794.592 181.131 C 793.489 181.131 792.592 180.234 792.592 179.131 C 792.592 178.028 793.489 177.131 794.592 177.131 C 795.695 177.131 796.592 178.028 796.592 179.131 Z M 795.592 139.131 C 795.592 138.028 796.489 137.131 797.592 137.131 C 798.695 137.131 799.592 138.028 799.592 139.131 C 799.592 140.234 798.695 141.131 797.592 141.131 C 796.489 141.131 795.592 140.234 795.592 139.131 Z M 808.592 152.131 C 806.733 152.131 805.181 153.411 804.734 155.131 L 786.592 155.131 L 786.592 150.131 L 797.592 150.131 C 798.145 150.131 798.592 149.683 798.592 149.131 L 798.592 142.989 C 800.312 142.542 801.592 140.989 801.592 139.131 C 801.592 136.925 799.798 135.131 797.592 135.131 C 795.386 135.131 793.592 136.925 793.592 139.131 C 793.592 140.989 794.872 142.542 796.592 142.989 L 796.592 148.131 L 786.592 148.131 L 786.592 135.131 C 786.592 134.7 786.317 134.319 785.908 134.182 L 776.908 131.182 C 776.634 131.092 776.336 131.122 776.088 131.267 L 764.088 138.267 C 763.78 138.446 763.592 138.776 763.592 139.131 L 763.592 148.551 L 757.096 152.263 C 756.784 152.441 756.592 152.772 756.592 153.131 L 756.592 165.131 C 756.592 165.49 756.784 165.821 757.096 165.999 L 763.592 169.711 L 763.592 179.131 C 763.592 179.486 763.78 179.816 764.088 179.995 L 776.088 186.995 C 776.242 187.085 776.417 187.131 776.592 187.131 C 776.698 187.131 776.805 187.114 776.908 187.08 L 785.908 184.08 C 786.317 183.943 786.592 183.562 786.592 183.131 L 786.592 171.131 L 793.592 171.131 L 793.592 175.273 C 791.872 175.72 790.592 177.273 790.592 179.131 C 790.592 181.337 792.386 183.131 794.592 183.131 C 796.798 183.131 798.592 181.337 798.592 179.131 C 798.592 177.273 797.312 175.72 795.592 175.273 L 795.592 170.131 C 795.592 169.579 795.145 169.131 794.592 169.131 L 786.592 169.131 L 786.592 164.131 L 799.092 164.131 L 801.23 166.981 C 800.831 167.603 800.592 168.338 800.592 169.131 C 800.592 171.337 802.386 173.131 804.592 173.131 C 806.798 173.131 808.592 171.337 808.592 169.131 C 808.592 166.925 806.798 165.131 804.592 165.131 C 803.908 165.131 803.274 165.319 802.711 165.623 L 800.392 162.531 C 800.203 162.279 799.906 162.131 799.592 162.131 L 786.592 162.131 L 786.592 157.131 L 804.734 157.131 C 805.181 158.851 806.733 160.131 808.592 160.131 C 810.798 160.131 812.592 158.337 812.592 156.131 C 812.592 153.925 810.798 152.131 808.592 152.131 Z" fill-rule="evenodd" fill-opacity="1" style="" id="object-0" transform="matrix(1, 0, 0, 1, -472.9506530761719, -3.7858259677886963)"/>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -0,0 +1 @@
<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Mistral</title><g><path d="M15 6v4h-2V6h2zm4-4v4h-2V2h2zM3 2H1h2zM1 2h2v20H1V2zm8 12h2v4H9v-4zm8 0h2v8h-2v-8z"></path><path d="M19 2h4v4h-4V2zM3 2h4v4H3V2z" opacity=".4"></path><path d="M15 10V6h8v4h-8zM3 10V6h8v4H3z" opacity=".5"></path><path d="M3 14v-4h20v4z" opacity=".6"></path><path d="M11 14h4v4h-4v-4zm8 0h4v4h-4v-4zM3 14h4v4H3v-4z" opacity=".7"></path><path d="M19 18h4v4h-4v-4zM3 18h4v4H3v-4z" opacity=".8"></path></g></svg>

After

Width:  |  Height:  |  Size: 598 B

View File

@@ -1,252 +0,0 @@
{
"stems": {
"Dockerfile": "docker",
"Podfile": "ruby",
"Procfile": "heroku"
},
"suffixes": {
"Emakefile": "erlang",
"aac": "audio",
"accdb": "storage",
"app.src": "erlang",
"astro": "astro",
"avi": "video",
"avif": "image",
"bak": "backup",
"bash": "terminal",
"bash_aliases": "terminal",
"bash_logout": "terminal",
"bash_profile": "terminal",
"bashrc": "terminal",
"bicep": "bicep",
"bmp": "image",
"c": "c",
"c++": "cpp",
"cc": "cpp",
"cjs": "javascript",
"cjsx": "react",
"coffee": "coffeescript",
"conf": "settings",
"cpp": "cpp",
"cs": "csharp",
"css": "css",
"csv": "storage",
"cxx": "cpp",
"cts": "typescript",
"ctsx": "react",
"cue": "cue",
"dart": "dart",
"dat": "storage",
"db": "storage",
"dbf": "storage",
"diff": "diff",
"dll": "storage",
"doc": "document",
"docx": "document",
"eex": "elixir",
"elm": "elm",
"erl": "erlang",
"escript": "erlang",
"eslint.config.cjs": "eslint",
"eslint.config.cts": "eslint",
"eslint.config.js": "eslint",
"eslint.config.mjs": "eslint",
"eslint.config.mts": "eslint",
"eslint.config.ts": "eslint",
"eslintrc": "eslint",
"eslintrc.js": "eslint",
"eslintrc.json": "eslint",
"ex": "elixir",
"exs": "elixir",
"fish": "terminal",
"flac": "audio",
"fmp": "storage",
"fp7": "storage",
"frm": "storage",
"fs": "fsharp",
"gdb": "storage",
"gif": "image",
"gitattributes": "vcs",
"gitignore": "vcs",
"gitkeep": "vcs",
"gitlab-ci.yml": "gitlab",
"gitmodules": "vcs",
"TAG_EDITMSG": "vcs",
"MERGE_MSG": "vcs",
"COMMIT_EDITMSG": "vcs",
"NOTES_EDITMSG": "vcs",
"EDIT_DESCRIPTION": "vcs",
"gleam": "gleam",
"go": "go",
"gql": "graphql",
"graphql": "graphql",
"graphqls": "graphql",
"h": "c",
"handlebars": "code",
"hbs": "template",
"hcl": "hcl",
"heex": "elixir",
"heic": "image",
"heif": "image",
"hh": "cpp",
"hpp": "cpp",
"hrl": "erlang",
"hs": "haskell",
"htm": "html",
"html": "html",
"hxx": "cpp",
"ib": "storage",
"ico": "image",
"ini": "settings",
"inl": "cpp",
"j2k": "image",
"java": "java",
"jfif": "image",
"jl": "julia",
"jp2": "image",
"jpeg": "image",
"jpg": "image",
"js": "javascript",
"json": "json",
"jsonc": "storage",
"jsx": "react",
"jxl": "image",
"kt": "kotlin",
"ldf": "storage",
"lock": "lock",
"lockb": "bun",
"log": "log",
"lua": "lua",
"luau": "luau",
"m4a": "audio",
"m4v": "video",
"markdown": "markdown",
"md": "markdown",
"mdb": "storage",
"mdf": "storage",
"mdx": "document",
"metadata": "code",
"metal": "metal",
"mjs": "javascript",
"mjsx": "react",
"mka": "audio",
"mkv": "video",
"ml": "ocaml",
"mli": "ocaml",
"mod": "go",
"mov": "video",
"mp3": "audio",
"mp4": "video",
"mts": "typescript",
"mtsx": "react",
"myd": "storage",
"myi": "storage",
"nim": "nim",
"nix": "nix",
"nu": "terminal",
"odp": "document",
"ods": "document",
"odt": "document",
"ogg": "audio",
"opus": "audio",
"otf": "font",
"pcss": "css",
"pdb": "storage",
"pdf": "document",
"php": "php",
"plist": "template",
"png": "image",
"postcss": "css",
"ppt": "document",
"pptx": "document",
"prettier.config.cjs": "prettier",
"prettier.config.js": "prettier",
"prettier.config.mjs": "prettier",
"prettierignore": "prettier",
"prettierrc": "prettier",
"prettierrc.cjs": "prettier",
"prettierrc.js": "prettier",
"prettierrc.json": "prettier",
"prettierrc.json5": "prettier",
"prettierrc.mjs": "prettier",
"prettierrc.toml": "prettier",
"prettierrc.yaml": "prettier",
"prettierrc.yml": "prettier",
"prisma": "prisma",
"profile": "terminal",
"ps1": "terminal",
"psd": "image",
"py": "python",
"qoi": "image",
"r": "r",
"rb": "ruby",
"rebar.config": "erlang",
"rkt": "code",
"roc": "roc",
"rs": "rust",
"rtf": "document",
"sass": "sass",
"sav": "storage",
"sc": "scala",
"scala": "scala",
"scm": "code",
"scss": "sass",
"sdf": "storage",
"sh": "terminal",
"sol": "solidity",
"sql": "storage",
"sqlite": "storage",
"stylelint.config.cjs": "stylelint",
"stylelint.config.js": "stylelint",
"stylelint.config.mjs": "stylelint",
"stylelintignore": "stylelint",
"stylelintrc": "stylelint",
"stylelintrc.cjs": "stylelint",
"stylelintrc.js": "stylelint",
"stylelintrc.json": "stylelint",
"stylelintrc.mjs": "stylelint",
"stylelintrc.yaml": "stylelint",
"stylelintrc.yml": "stylelint",
"svelte": "svelte",
"svg": "image",
"swift": "swift",
"tcl": "tcl",
"tf": "terraform",
"tfvars": "terraform",
"tiff": "image",
"toml": "toml",
"ts": "typescript",
"tsv": "storage",
"tsx": "react",
"ttf": "font",
"txt": "document",
"v": "v",
"vsh": "v",
"vv": "v",
"vue": "vue",
"wav": "audio",
"webm": "video",
"webp": "image",
"wma": "audio",
"wmv": "video",
"woff": "font",
"woff2": "font",
"work": "go",
"wv": "audio",
"xls": "document",
"xlsx": "document",
"xml": "template",
"xrl": "erlang",
"yaml": "settings",
"yml": "settings",
"yrl": "erlang",
"zig": "zig",
"zlogin": "terminal",
"zsh": "terminal",
"zsh_aliases": "terminal",
"zsh_histfile": "terminal",
"zsh_profile": "terminal",
"zshenv": "terminal",
"zshrc": "terminal"
}
}

View File

@@ -24,10 +24,10 @@
"shift-escape": "workspace::ToggleZoom",
"open": "workspace::Open",
"ctrl-o": "workspace::Open",
"ctrl-=": "zed::IncreaseBufferFontSize",
"ctrl-+": "zed::IncreaseBufferFontSize",
"ctrl--": "zed::DecreaseBufferFontSize",
"ctrl-0": "zed::ResetBufferFontSize",
"ctrl-=": ["zed::IncreaseBufferFontSize", { "persist": false }],
"ctrl-+": ["zed::IncreaseBufferFontSize", { "persist": false }],
"ctrl--": ["zed::DecreaseBufferFontSize", { "persist": false }],
"ctrl-0": ["zed::ResetBufferFontSize", { "persist": false }],
"ctrl-,": "zed::OpenSettings",
"ctrl-q": "zed::Quit",
"f11": "zed::ToggleFullScreen",
@@ -84,12 +84,12 @@
"pageup": "editor::MovePageUp",
"alt-pageup": "editor::PageUp",
"shift-pageup": "editor::SelectPageUp",
"home": "editor::MoveToBeginningOfLine",
"home": ["editor::MoveToBeginningOfLine", { "stop_at_soft_wraps": true, "stop_at_indent": true }],
"down": "editor::MoveDown",
"pagedown": "editor::MovePageDown",
"alt-pagedown": "editor::PageDown",
"shift-pagedown": "editor::SelectPageDown",
"end": "editor::MoveToEndOfLine",
"end": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": true }],
"left": "editor::MoveLeft",
"right": "editor::MoveRight",
"ctrl-left": "editor::MoveToPreviousWordStart",
@@ -107,18 +107,18 @@
"ctrl-a": "editor::SelectAll",
"ctrl-l": "editor::SelectLine",
"ctrl-shift-i": "editor::Format",
// "cmd-shift-left": ["editor::SelectToBeginningOfLine", {"stop_at_soft_wraps": true }],
// "ctrl-shift-a": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true }],
"shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true }],
// "cmd-shift-left": ["editor::SelectToBeginningOfLine", {"stop_at_soft_wraps": true, "stop_at_indent": true }],
// "ctrl-shift-a": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true, "stop_at_indent": true }],
"shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true, "stop_at_indent": true }],
// "cmd-shift-right": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }],
// "ctrl-shift-e": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }],
"shift-end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }],
// "alt-v": ["editor::MovePageUp", { "center_cursor": true }],
"ctrl-alt-space": "editor::ShowCharacterPalette",
"ctrl-;": "editor::ToggleLineNumbers",
"ctrl-k ctrl-r": "editor::RevertSelectedHunks",
"ctrl-k ctrl-r": "git::Restore",
"ctrl-'": "editor::ToggleSelectedDiffHunks",
"ctrl-\"": "editor::ExpandAllHunkDiffs",
"ctrl-\"": "editor::ExpandAllDiffHunks",
"ctrl-i": "editor::ShowSignatureHelp",
"alt-g b": "editor::ToggleGitBlame",
"menu": "editor::OpenContextMenu",
@@ -184,8 +184,9 @@
"ctrl-alt-/": "assistant::ToggleModelSelector",
"ctrl-k h": "assistant::DeployHistory",
"ctrl-k l": "assistant::DeployPromptLibrary",
"new": "assistant::NewContext",
"ctrl-n": "assistant::NewContext"
"new": "assistant::NewChat",
"ctrl-t": "assistant::NewChat",
"ctrl-n": "assistant::NewChat"
}
},
{
@@ -343,9 +344,9 @@
"alt-ctrl-f12": "editor::GoToTypeDefinitionSplit",
"alt-shift-f12": "editor::FindAllReferences",
"ctrl-m": "editor::MoveToEnclosingBracket",
"ctrl-shift-\\": "editor::MoveToEnclosingBracket",
"ctrl-shift-[": "editor::Fold",
"ctrl-shift-]": "editor::UnfoldLines",
"ctrl-|": "editor::MoveToEnclosingBracket",
"ctrl-{": "editor::Fold",
"ctrl-}": "editor::UnfoldLines",
"ctrl-k ctrl-l": "editor::ToggleFold",
"ctrl-k ctrl-[": "editor::FoldRecursive",
"ctrl-k ctrl-]": "editor::UnfoldRecursive",
@@ -367,7 +368,12 @@
"ctrl-\\": "pane::SplitRight",
"ctrl-k v": "markdown::OpenPreviewToTheSide",
"ctrl-shift-v": "markdown::OpenPreview",
"ctrl-alt-shift-c": "editor::DisplayCursorNames"
"ctrl-alt-shift-c": "editor::DisplayCursorNames",
"ctrl-alt-y": "git::ToggleStaged",
"alt-y": "git::StageAndNext",
"alt-shift-y": "git::UnstageAndNext",
"alt-.": "editor::GoToHunk",
"alt-,": "editor::GoToPrevHunk"
}
},
{
@@ -510,13 +516,14 @@
"context": "Editor && edit_prediction",
"bindings": {
"alt-tab": "editor::AcceptEditPrediction",
"alt-l": "editor::AcceptEditPrediction"
"alt-l": "editor::AcceptEditPrediction",
"tab": "editor::AcceptEditPrediction"
}
},
{
"context": "Editor && edit_prediction && !edit_prediction_requires_modifier",
"context": "Editor && edit_prediction_conflict",
"bindings": {
"tab": "editor::AcceptEditPrediction",
"alt-tab": "editor::AcceptEditPrediction",
"alt-l": "editor::AcceptEditPrediction"
}
},
@@ -586,6 +593,7 @@
"save": "workspace::Save",
"ctrl->": "assistant::QuoteSelection",
"ctrl-<": "assistant::InsertIntoEditor",
"ctrl-alt-/": "assistant::ToggleModelSelector",
"shift-enter": "assistant::Split",
"ctrl-r": "assistant::CycleMessageRole",
"enter": "assistant::ConfirmCommand",
@@ -598,7 +606,7 @@
"ctrl-n": "assistant2::NewThread",
"new": "assistant2::NewThread",
"ctrl-shift-h": "assistant2::OpenHistory",
"ctrl-alt-/": "assistant2::ToggleModelSelector",
"ctrl-alt-/": "assistant::ToggleModelSelector",
"ctrl-shift-a": "assistant2::ToggleContextPicker",
"ctrl-e": "assistant2::ChatMode",
"ctrl-alt-e": "assistant2::RemoveAllContext"
@@ -649,8 +657,8 @@
"right": "outline_panel::ExpandSelectedEntry",
"alt-copy": "outline_panel::CopyPath",
"ctrl-alt-c": "outline_panel::CopyPath",
"alt-shift-copy": "outline_panel::CopyRelativePath",
"alt-ctrl-shift-c": "outline_panel::CopyRelativePath",
"alt-shift-copy": "workspace::CopyRelativePath",
"alt-ctrl-shift-c": "workspace::CopyRelativePath",
"alt-ctrl-r": "outline_panel::RevealInFileManager",
"space": "outline_panel::Open",
"shift-down": "menu::SelectNext",
@@ -678,8 +686,8 @@
"ctrl-v": "project_panel::Paste",
"alt-copy": "project_panel::CopyPath",
"ctrl-alt-c": "project_panel::CopyPath",
"alt-shift-copy": "project_panel::CopyRelativePath",
"alt-ctrl-shift-c": "project_panel::CopyRelativePath",
"alt-shift-copy": "workspace::CopyRelativePath",
"alt-ctrl-shift-c": "workspace::CopyRelativePath",
"enter": "project_panel::Rename",
"f2": "project_panel::Rename",
"backspace": ["project_panel::Trash", { "skip_prompt": false }],
@@ -702,12 +710,6 @@
"space": "project_panel::Open"
}
},
{
"context": "GitPanel && !CommitEditor",
"bindings": {
"escape": "git_panel::Close"
}
},
{
"context": "GitPanel && ChangesList",
"bindings": {
@@ -719,19 +721,42 @@
"ctrl-shift-space": "git::UnstageAll",
"tab": "git_panel::FocusEditor",
"shift-tab": "git_panel::FocusEditor",
"escape": "git_panel::ToggleFocus"
"escape": "git_panel::ToggleFocus",
"ctrl-enter": "git::Commit",
"alt-enter": "menu::SecondaryConfirm"
}
},
{
"context": "GitCommit > Editor",
"bindings": {
"enter": "editor::Newline",
"ctrl-enter": "git::Commit"
}
},
{
"context": "GitDiff > Editor",
"bindings": {
"ctrl-enter": "git::Commit"
}
},
{
"context": "GitPanel > Editor",
"bindings": {
"escape": "git_panel::FocusChanges",
"ctrl-enter": "git::Commit",
"tab": "git_panel::FocusChanges",
"shift-tab": "git_panel::FocusChanges",
"ctrl-enter": "git::Commit",
"alt-up": "git_panel::FocusChanges"
}
},
{
"context": "GitCommit > Editor",
"use_key_equivalents": true,
"bindings": {
"enter": "editor::Newline",
"ctrl-enter": "git::Commit"
}
},
{
"context": "CollabPanel && not_editing",
"bindings": {
@@ -765,13 +790,7 @@
}
},
{
"context": "FileFinder",
"bindings": {
"ctrl": "file_finder::ToggleMenu"
}
},
{
"context": "FileFinder && !menu_open",
"context": "FileFinder || (FileFinder > Picker > Editor) || (FileFinder > Picker > menu)",
"bindings": {
"ctrl-shift-p": "file_finder::SelectPrev",
"ctrl-j": "pane::SplitDown",
@@ -780,15 +799,6 @@
"ctrl-l": "pane::SplitRight"
}
},
{
"context": "FileFinder && menu_open",
"bindings": {
"j": "pane::SplitDown",
"k": "pane::SplitUp",
"h": "pane::SplitLeft",
"l": "pane::SplitRight"
}
},
{
"context": "TabSwitcher",
"bindings": {
@@ -825,6 +835,7 @@
"pagedown": ["terminal::SendKeystroke", "pagedown"],
"escape": ["terminal::SendKeystroke", "escape"],
"enter": ["terminal::SendKeystroke", "enter"],
"ctrl-b": ["terminal::SendKeystroke", "ctrl-b"],
"ctrl-c": ["terminal::SendKeystroke", "ctrl-c"],
"shift-pageup": "terminal::ScrollPageUp",
"shift-pagedown": "terminal::ScrollPageDown",

View File

@@ -28,10 +28,10 @@
"cmd-shift-w": "workspace::CloseWindow",
"shift-escape": "workspace::ToggleZoom",
"cmd-o": "workspace::Open",
"cmd-=": "zed::IncreaseBufferFontSize",
"cmd-+": "zed::IncreaseBufferFontSize",
"cmd--": "zed::DecreaseBufferFontSize",
"cmd-0": "zed::ResetBufferFontSize",
"cmd-=": ["zed::IncreaseBufferFontSize", { "persist": false }],
"cmd-+": ["zed::IncreaseBufferFontSize", { "persist": false }],
"cmd--": ["zed::DecreaseBufferFontSize", { "persist": false }],
"cmd-0": ["zed::ResetBufferFontSize", { "persist": false }],
"cmd-,": "zed::OpenSettings",
"cmd-q": "zed::Quit",
"cmd-h": "zed::Hide",
@@ -91,14 +91,16 @@
"ctrl-l": "editor::ScrollCursorCenter",
"alt-left": "editor::MoveToPreviousWordStart",
"alt-right": "editor::MoveToNextWordEnd",
"cmd-left": "editor::MoveToBeginningOfLine",
"ctrl-a": "editor::MoveToBeginningOfLine",
"home": "editor::MoveToBeginningOfLine",
"cmd-right": "editor::MoveToEndOfLine",
"ctrl-e": "editor::MoveToEndOfLine",
"end": "editor::MoveToEndOfLine",
"cmd-up": "editor::MoveToBeginning",
"cmd-down": "editor::MoveToEnd",
"cmd-left": ["editor::MoveToBeginningOfLine", { "stop_at_soft_wraps": true, "stop_at_indent": true }],
"ctrl-a": ["editor::MoveToBeginningOfLine", { "stop_at_soft_wraps": false, "stop_at_indent": true }],
"home": ["editor::MoveToBeginningOfLine", { "stop_at_soft_wraps": true, "stop_at_indent": true }],
"cmd-right": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": true }],
"ctrl-e": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": false }],
"end": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": true }],
"cmd-up": "editor::MoveToStartOfExcerpt",
"cmd-down": "editor::MoveToEndOfExcerpt",
"cmd-home": "editor::MoveToBeginning", // Typed via `cmd-fn-left`
"cmd-end": "editor::MoveToEnd", // Typed via `cmd-fn-right`
"shift-up": "editor::SelectUp",
"ctrl-shift-p": "editor::SelectUp",
"shift-down": "editor::SelectDown",
@@ -111,14 +113,14 @@
"alt-shift-right": "editor::SelectToNextWordEnd", // cursorWordRightSelect
"ctrl-shift-up": "editor::SelectToStartOfParagraph",
"ctrl-shift-down": "editor::SelectToEndOfParagraph",
"cmd-shift-up": "editor::SelectToBeginning",
"cmd-shift-down": "editor::SelectToEnd",
"cmd-shift-up": "editor::SelectToStartOfExcerpt",
"cmd-shift-down": "editor::SelectToEndOfExcerpt",
"cmd-a": "editor::SelectAll",
"cmd-l": "editor::SelectLine",
"cmd-shift-i": "editor::Format",
"cmd-shift-left": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true }],
"shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true }],
"ctrl-shift-a": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true }],
"cmd-shift-left": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true, "stop_at_indent": true }],
"shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true, "stop_at_indent": true }],
"ctrl-shift-a": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true, "stop_at_indent": true }],
"cmd-shift-right": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }],
"shift-end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }],
"ctrl-shift-e": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }],
@@ -126,9 +128,12 @@
"ctrl-shift-v": ["editor::MovePageUp", { "center_cursor": true }],
"ctrl-cmd-space": "editor::ShowCharacterPalette",
"cmd-;": "editor::ToggleLineNumbers",
"cmd-alt-z": "editor::RevertSelectedHunks",
"cmd-alt-z": "git::Restore",
"cmd-alt-y": "git::ToggleStaged",
"cmd-y": "git::StageAndNext",
"cmd-shift-y": "git::UnstageAndNext",
"cmd-'": "editor::ToggleSelectedDiffHunks",
"cmd-\"": "editor::ExpandAllHunkDiffs",
"cmd-\"": "editor::ExpandAllDiffHunks",
"cmd-alt-g b": "editor::ToggleGitBlame",
"cmd-i": "editor::ShowSignatureHelp",
"ctrl-f12": "editor::GoToDeclaration",
@@ -206,7 +211,8 @@
"cmd-alt-/": "assistant::ToggleModelSelector",
"cmd-k h": "assistant::DeployHistory",
"cmd-k l": "assistant::DeployPromptLibrary",
"cmd-n": "assistant::NewContext"
"cmd-t": "assistant::NewChat",
"cmd-n": "assistant::NewChat"
}
},
{
@@ -218,6 +224,7 @@
"cmd-s": "workspace::Save",
"cmd->": "assistant::QuoteSelection",
"cmd-<": "assistant::InsertIntoEditor",
"cmd-alt-/": "assistant::ToggleModelSelector",
"shift-enter": "assistant::Split",
"ctrl-r": "assistant::CycleMessageRole",
"enter": "assistant::ConfirmCommand",
@@ -231,7 +238,7 @@
"cmd-n": "assistant2::NewThread",
"cmd-alt-p": "assistant2::NewPromptEditor",
"cmd-shift-h": "assistant2::OpenHistory",
"cmd-alt-/": "assistant2::ToggleModelSelector",
"cmd-alt-/": "assistant::ToggleModelSelector",
"cmd-shift-a": "assistant2::ToggleContextPicker",
"cmd-e": "assistant2::ChatMode",
"cmd-alt-e": "assistant2::RemoveAllContext"
@@ -282,7 +289,8 @@
"alt-enter": "search::SelectAllMatches",
"cmd-f": "search::FocusSearch",
"cmd-alt-f": "search::ToggleReplace",
"cmd-alt-l": "search::ToggleSelection"
"cmd-alt-l": "search::ToggleSelection",
"cmd-shift-o": "outline::Toggle"
}
},
{
@@ -460,7 +468,7 @@
"ctrl-9": ["pane::ActivateItem", 8],
"ctrl-0": "pane::ActivateLastItem",
"ctrl--": "pane::GoBack",
"ctrl-shift--": "pane::GoForward",
"ctrl-_": "pane::GoForward",
"cmd-shift-f": "pane::DeploySearch"
}
},
@@ -583,14 +591,15 @@
{
"context": "Editor && edit_prediction",
"bindings": {
"alt-tab": "editor::AcceptEditPrediction"
"alt-tab": "editor::AcceptEditPrediction",
"tab": "editor::AcceptEditPrediction"
}
},
{
"context": "Editor && edit_prediction && !edit_prediction_requires_modifier",
"context": "Editor && edit_prediction_conflict",
"use_key_equivalents": true,
"bindings": {
"tab": "editor::AcceptEditPrediction"
"alt-tab": "editor::AcceptEditPrediction"
}
},
{
@@ -649,7 +658,7 @@
"use_key_equivalents": true,
"bindings": {
"cmd-shift-a": "assistant2::ToggleContextPicker",
"cmd-alt-/": "assistant2::ToggleModelSelector",
"cmd-alt-/": "assistant::ToggleModelSelector",
"cmd-alt-e": "assistant2::RemoveAllContext",
"ctrl-[": "assistant::CyclePreviousInlineAssist",
"ctrl-]": "assistant::CycleNextInlineAssist"
@@ -669,8 +678,8 @@
"escape": "menu::Cancel",
"left": "outline_panel::CollapseSelectedEntry",
"right": "outline_panel::ExpandSelectedEntry",
"cmd-alt-c": "outline_panel::CopyPath",
"alt-cmd-shift-c": "outline_panel::CopyRelativePath",
"cmd-alt-c": "workspace::CopyPath",
"alt-cmd-shift-c": "workspace::CopyRelativePath",
"alt-cmd-r": "outline_panel::RevealInFileManager",
"space": "outline_panel::Open",
"shift-down": "menu::SelectNext",
@@ -691,8 +700,8 @@
"cmd-x": "project_panel::Cut",
"cmd-c": "project_panel::Copy",
"cmd-v": "project_panel::Paste",
"cmd-alt-c": "project_panel::CopyPath",
"alt-cmd-shift-c": "project_panel::CopyRelativePath",
"cmd-alt-c": "workspace::CopyPath",
"alt-cmd-shift-c": "workspace::CopyRelativePath",
"enter": "project_panel::Rename",
"f2": "project_panel::Rename",
"backspace": ["project_panel::Trash", { "skip_prompt": false }],
@@ -730,7 +739,15 @@
"alt-down": "git_panel::FocusEditor",
"tab": "git_panel::FocusEditor",
"shift-tab": "git_panel::FocusEditor",
"escape": "git_panel::ToggleFocus"
"escape": "git_panel::ToggleFocus",
"cmd-enter": "git::Commit"
}
},
{
"context": "GitDiff > Editor",
"use_key_equivalents": true,
"bindings": {
"cmd-enter": "git::Commit"
}
},
{
@@ -744,6 +761,14 @@
"alt-up": "git_panel::FocusChanges"
}
},
{
"context": "GitCommit > Editor",
"use_key_equivalents": true,
"bindings": {
"enter": "editor::Newline",
"cmd-enter": "git::Commit"
}
},
{
"context": "CollabPanel && not_editing",
"use_key_equivalents": true,
@@ -783,14 +808,7 @@
}
},
{
"context": "FileFinder",
"use_key_equivalents": true,
"bindings": {
"cmd": "file_finder::ToggleMenu"
}
},
{
"context": "FileFinder && !menu_open",
"context": "FileFinder || (FileFinder > Picker > Editor) || (FileFinder > Picker > menu)",
"use_key_equivalents": true,
"bindings": {
"cmd-shift-p": "file_finder::SelectPrev",
@@ -800,16 +818,6 @@
"cmd-l": "pane::SplitRight"
}
},
{
"context": "FileFinder && menu_open",
"use_key_equivalents": true,
"bindings": {
"j": "pane::SplitDown",
"k": "pane::SplitUp",
"h": "pane::SplitLeft",
"l": "pane::SplitRight"
}
},
{
"context": "TabSwitcher",
"use_key_equivalents": true,
@@ -831,6 +839,7 @@
"cmd-k": "terminal::Clear",
"cmd-n": "workspace::NewTerminal",
"ctrl-enter": "assistant::InlineAssist",
"ctrl-_": null, // emacs undo
// Some nice conveniences
"cmd-backspace": ["terminal::SendText", "\u0015"],
"cmd-right": ["terminal::SendText", "\u0005"],

View File

@@ -28,6 +28,7 @@
"ctrl-e": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": false }], // move-end-of-line
"shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": false }], // move-beginning-of-line
"shift-end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": false }], // move-end-of-line
"alt-m": ["editor::MoveToBeginningOfLine", { "stop_at_soft_wraps": false, "stop_at_indent": true }], // back-to-indentation
"alt-f": "editor::MoveToNextSubwordEnd", // forward-word
"alt-b": "editor::MoveToPreviousSubwordStart", // backward-word
"alt-u": "editor::ConvertToUpperCase", // upcase-word
@@ -48,6 +49,8 @@
"ctrl-_": "editor::Undo", // undo
"ctrl-/": "editor::Undo", // undo
"ctrl-x u": "editor::Undo", // undo
"alt-{": "editor::MoveToStartOfParagraph", // backward-paragraph
"alt-}": "editor::MoveToEndOfParagraph", // forward-paragraph
"ctrl-v": "editor::MovePageDown", // scroll-up
"alt-v": "editor::MovePageUp", // scroll-down
"ctrl-x [": "editor::MoveToBeginning", // beginning-of-buffer

View File

@@ -2,15 +2,15 @@
{
"bindings": {
"ctrl-alt-s": "zed::OpenSettings",
"ctrl-shift-[": "pane::ActivatePrevItem",
"ctrl-shift-]": "pane::ActivateNextItem"
"ctrl-{": "pane::ActivatePrevItem",
"ctrl-}": "pane::ActivateNextItem"
}
},
{
"context": "Editor",
"bindings": {
"ctrl->": "zed::IncreaseBufferFontSize",
"ctrl-<": "zed::DecreaseBufferFontSize",
"ctrl->": ["zed::IncreaseBufferFontSize", { "persist": true }],
"ctrl-<": ["zed::DecreaseBufferFontSize", { "persist": true }],
"ctrl-shift-j": "editor::JoinLines",
"ctrl-d": "editor::DuplicateSelection",
"ctrl-y": "editor::DeleteLine",
@@ -44,7 +44,7 @@
"shift-f2": "editor::GoToPrevDiagnostic",
"ctrl-alt-shift-down": "editor::GoToHunk",
"ctrl-alt-shift-up": "editor::GoToPrevHunk",
"ctrl-alt-z": "editor::RevertSelectedHunks",
"ctrl-alt-z": "git::Restore",
"ctrl-home": "editor::MoveToBeginning",
"ctrl-end": "editor::MoveToEnd",
"ctrl-shift-home": "editor::SelectToBeginning",

View File

@@ -1,8 +1,8 @@
[
{
"bindings": {
"ctrl-shift-[": "pane::ActivatePrevItem",
"ctrl-shift-]": "pane::ActivateNextItem",
"ctrl-{": "pane::ActivatePrevItem",
"ctrl-}": "pane::ActivateNextItem",
"ctrl-pageup": "pane::ActivatePrevItem",
"ctrl-pagedown": "pane::ActivateNextItem",
"ctrl-1": ["workspace::ActivatePane", 0],
@@ -14,15 +14,15 @@
"ctrl-7": ["workspace::ActivatePane", 6],
"ctrl-8": ["workspace::ActivatePane", 7],
"ctrl-9": ["workspace::ActivatePane", 8],
"ctrl-shift-1": ["workspace::MoveItemToPane", { "destination": 0, "focus": true }],
"ctrl-shift-2": ["workspace::MoveItemToPane", { "destination": 1 }],
"ctrl-shift-3": ["workspace::MoveItemToPane", { "destination": 2 }],
"ctrl-shift-4": ["workspace::MoveItemToPane", { "destination": 3 }],
"ctrl-shift-5": ["workspace::MoveItemToPane", { "destination": 4 }],
"ctrl-shift-6": ["workspace::MoveItemToPane", { "destination": 5 }],
"ctrl-shift-7": ["workspace::MoveItemToPane", { "destination": 6 }],
"ctrl-shift-8": ["workspace::MoveItemToPane", { "destination": 7 }],
"ctrl-shift-9": ["workspace::MoveItemToPane", { "destination": 8 }]
"ctrl-!": ["workspace::MoveItemToPane", { "destination": 0, "focus": true }],
"ctrl-@": ["workspace::MoveItemToPane", { "destination": 1 }],
"ctrl-#": ["workspace::MoveItemToPane", { "destination": 2 }],
"ctrl-$": ["workspace::MoveItemToPane", { "destination": 3 }],
"ctrl-%": ["workspace::MoveItemToPane", { "destination": 4 }],
"ctrl-^": ["workspace::MoveItemToPane", { "destination": 5 }],
"ctrl-&": ["workspace::MoveItemToPane", { "destination": 6 }],
"ctrl-*": ["workspace::MoveItemToPane", { "destination": 7 }],
"ctrl-(": ["workspace::MoveItemToPane", { "destination": 8 }]
}
},
{

View File

@@ -28,6 +28,7 @@
"ctrl-e": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": false }], // move-end-of-line
"shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": false }], // move-beginning-of-line
"shift-end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": false }], // move-end-of-line
"alt-m": ["editor::MoveToBeginningOfLine", { "stop_at_soft_wraps": false, "stop_at_indent": true }], // back-to-indentation
"alt-f": "editor::MoveToNextSubwordEnd", // forward-word
"alt-b": "editor::MoveToPreviousSubwordStart", // backward-word
"alt-u": "editor::ConvertToUpperCase", // upcase-word
@@ -48,6 +49,8 @@
"ctrl-_": "editor::Undo", // undo
"ctrl-/": "editor::Undo", // undo
"ctrl-x u": "editor::Undo", // undo
"alt-{": "editor::MoveToStartOfParagraph", // backward-paragraph
"alt-}": "editor::MoveToEndOfParagraph", // forward-paragraph
"ctrl-v": "editor::MovePageDown", // scroll-up
"alt-v": "editor::MovePageUp", // scroll-down
"ctrl-x [": "editor::MoveToBeginning", // beginning-of-buffer

View File

@@ -1,15 +1,15 @@
[
{
"bindings": {
"cmd-shift-[": "pane::ActivatePrevItem",
"cmd-shift-]": "pane::ActivateNextItem"
"cmd-{": "pane::ActivatePrevItem",
"cmd-}": "pane::ActivateNextItem"
}
},
{
"context": "Editor",
"bindings": {
"ctrl->": "zed::IncreaseBufferFontSize",
"ctrl-<": "zed::DecreaseBufferFontSize",
"ctrl->": ["zed::IncreaseBufferFontSize", { "persist": true }],
"ctrl-<": ["zed::DecreaseBufferFontSize", { "persist": true }],
"ctrl-shift-j": "editor::JoinLines",
"cmd-d": "editor::DuplicateSelection",
"cmd-backspace": "editor::DeleteLine",

View File

@@ -1,8 +1,8 @@
[
{
"bindings": {
"cmd-shift-[": "pane::ActivatePrevItem",
"cmd-shift-]": "pane::ActivateNextItem",
"cmd-{": "pane::ActivatePrevItem",
"cmd-}": "pane::ActivateNextItem",
"ctrl-pageup": "pane::ActivatePrevItem",
"ctrl-pagedown": "pane::ActivateNextItem",
"ctrl-1": ["workspace::ActivatePane", 0],
@@ -14,15 +14,15 @@
"ctrl-7": ["workspace::ActivatePane", 6],
"ctrl-8": ["workspace::ActivatePane", 7],
"ctrl-9": ["workspace::ActivatePane", 8],
"ctrl-shift-1": ["workspace::MoveItemToPane", { "destination": 0, "focus": true }],
"ctrl-shift-2": ["workspace::MoveItemToPane", { "destination": 1 }],
"ctrl-shift-3": ["workspace::MoveItemToPane", { "destination": 2 }],
"ctrl-shift-4": ["workspace::MoveItemToPane", { "destination": 3 }],
"ctrl-shift-5": ["workspace::MoveItemToPane", { "destination": 4 }],
"ctrl-shift-6": ["workspace::MoveItemToPane", { "destination": 5 }],
"ctrl-shift-7": ["workspace::MoveItemToPane", { "destination": 6 }],
"ctrl-shift-8": ["workspace::MoveItemToPane", { "destination": 7 }],
"ctrl-shift-9": ["workspace::MoveItemToPane", { "destination": 8 }]
"ctrl-!": ["workspace::MoveItemToPane", { "destination": 0, "focus": true }],
"ctrl-@": ["workspace::MoveItemToPane", { "destination": 1 }],
"ctrl-#": ["workspace::MoveItemToPane", { "destination": 2 }],
"ctrl-$": ["workspace::MoveItemToPane", { "destination": 3 }],
"ctrl-%": ["workspace::MoveItemToPane", { "destination": 4 }],
"ctrl-^": ["workspace::MoveItemToPane", { "destination": 5 }],
"ctrl-&": ["workspace::MoveItemToPane", { "destination": 6 }],
"ctrl-*": ["workspace::MoveItemToPane", { "destination": 7 }],
"ctrl-(": ["workspace::MoveItemToPane", { "destination": 8 }]
}
},
{

View File

@@ -37,9 +37,9 @@
"[ [": "vim::PreviousSectionStart",
"[ ]": "vim::PreviousSectionEnd",
"] m": "vim::NextMethodStart",
"] M": "vim::NextMethodEnd",
"] shift-m": "vim::NextMethodEnd",
"[ m": "vim::PreviousMethodStart",
"[ M": "vim::PreviousMethodEnd",
"[ shift-m": "vim::PreviousMethodEnd",
"[ *": "vim::PreviousComment",
"[ /": "vim::PreviousComment",
"] *": "vim::NextComment",
@@ -293,6 +293,7 @@
"!": "vim::ShellCommand",
"i": ["vim::PushObject", { "around": false }],
"a": ["vim::PushObject", { "around": true }],
"g r": ["vim::Paste", { "preserve_clipboard": true }],
"g c": "vim::ToggleComments",
"g q": "vim::Rewrap",
"\"": "vim::PushRegister",
@@ -436,6 +437,7 @@
"context": "vim_operator == c",
"bindings": {
"c": "vim::CurrentLine",
"x": "vim::Exchange",
"d": "editor::Rename", // zed specific
"s": ["vim::PushChangeSurrounds", {}]
}
@@ -446,7 +448,7 @@
"d": "vim::CurrentLine",
"s": "vim::PushDeleteSurrounds",
"o": "editor::ToggleSelectedDiffHunks", // "d o"
"p": "editor::RevertSelectedHunks" // "d p"
"p": "git::Restore" // "d p"
}
},
{
@@ -522,6 +524,19 @@
"c": "vim::CurrentLine"
}
},
{
"context": "vim_operator == gr",
"bindings": {
"r": "vim::CurrentLine"
}
},
{
"context": "vim_operator == cx",
"bindings": {
"x": "vim::CurrentLine",
"c": "vim::ClearExchange"
}
},
{
"context": "vim_mode == literal",
"bindings": {
@@ -696,7 +711,7 @@
}
},
{
"context": "Editor && edit_prediction && !edit_prediction_requires_modifier",
"context": "Editor && edit_prediction",
"bindings": {
// This is identical to the binding in the base keymap, but the vim bindings above to
// "vim::Tab" shadow it, so it needs to be bound again.
@@ -704,7 +719,7 @@
}
},
{
"context": "os != macos && Editor && edit_prediction",
"context": "os != macos && Editor && edit_prediction_conflict",
"bindings": {
// alt-l is provided as an alternative to tab/alt-tab. and will be displayed in the UI. This
// is because alt-tab may not be available, as it is often used for window switching on Linux

View File

@@ -126,6 +126,13 @@
// 3. Never close the window
// "when_closing_with_no_tabs": "keep_window_open",
"when_closing_with_no_tabs": "platform_default",
// What to do when the last window is closed.
// May take 2 values:
// 1. Use the current platform's convention
// "on_last_window_closed": "platform_default"
// 2. Always quit the application
// "on_last_window_closed": "quit_app",
"on_last_window_closed": "platform_default",
// Whether to use the system provided dialogs for Open and Save As.
// When set to false, Zed will use the built-in keyboard-first pickers.
"use_system_path_prompts": true,
@@ -154,6 +161,10 @@
// 4. Highlight the full line (default):
// "all"
"current_line_highlight": "all",
// Whether to highlight all occurrences of the selected text in an editor.
"selection_highlight": true,
// The debounce delay before querying highlights based on the selected text.
"selection_highlight_debounce": 50,
// The debounce delay before querying highlights from the language
// server based on the current cursor location.
"lsp_highlight_debounce": 75,
@@ -165,8 +176,8 @@
"show_completion_documentation": true,
// Show method signatures in the editor, when inside parentheses.
"auto_signature_help": false,
/// Whether to show the signature help after completion or a bracket pair inserted.
/// If `auto_signature_help` is enabled, this setting will be treated as enabled also.
// Whether to show the signature help after completion or a bracket pair inserted.
// If `auto_signature_help` is enabled, this setting will be treated as enabled also.
"show_signature_help_after_edits": false,
// Whether to show wrap guides (vertical rulers) in the editor.
// Setting this to true will show a guide at the 'preferred_line_length' value
@@ -200,6 +211,23 @@
// Otherwise(when `true`), the closing characters are always skipped over and auto-removed
// no matter how they were inserted.
"always_treat_brackets_as_autoclosed": false,
// Controls where the `editor::Rewrap` action is allowed in the current language scope.
//
// This setting can take three values:
//
// 1. Only allow rewrapping in comments:
// "in_comments"
// 2. Only allow rewrapping in the current selection(s):
// "in_selections"
// 3. Allow rewrapping anywhere:
// "anywhere"
//
// When using values other than `in_comments`, it is possible for the rewrapping to produce code
// that is syntactically invalid. Keep this in mind when selecting which behavior you would like
// to use.
//
// Note: This setting has no effect in Vim mode, as rewrap is already allowed everywhere.
"allow_rewrap": "in_comments",
// Controls whether edit predictions are shown immediately (true)
// or manually by triggering `editor::ShowEditPrediction` (false).
"show_edit_predictions": true,
@@ -259,6 +287,8 @@
"git_diff": true,
// Whether to show buffer search results in the scrollbar.
"search_results": true,
// Whether to show selected text occurrences in the scrollbar.
"selected_text": true,
// Whether to show selected symbol occurrences in the scrollbar.
"selected_symbol": true,
// Which diagnostic indicators to show in the scrollbar:
@@ -268,11 +298,11 @@
// - "information": show only errors, warnings, and information
// - "all" or true: show all diagnostics
"diagnostics": "all",
/// Forcefully enable or disable the scrollbar for each axis
// Forcefully enable or disable the scrollbar for each axis
"axes": {
/// When false, forcefully disables the horizontal scrollbar. Otherwise, obey other settings.
// When false, forcefully disables the horizontal scrollbar. Otherwise, obey other settings.
"horizontal": true,
/// When false, forcefully disables the vertical scrollbar. Otherwise, obey other settings.
// When false, forcefully disables the vertical scrollbar. Otherwise, obey other settings.
"vertical": true
}
},
@@ -298,24 +328,24 @@
"folds": true
},
"indent_guides": {
/// Whether to show indent guides in the editor.
// Whether to show indent guides in the editor.
"enabled": true,
/// The width of the indent guides in pixels, between 1 and 10.
// The width of the indent guides in pixels, between 1 and 10.
"line_width": 1,
/// The width of the active indent guide in pixels, between 1 and 10.
// The width of the active indent guide in pixels, between 1 and 10.
"active_line_width": 1,
/// Determines how indent guides are colored.
/// This setting can take the following three values:
// Determines how indent guides are colored.
// This setting can take the following three values:
///
/// 1. "disabled"
/// 2. "fixed"
/// 3. "indent_aware"
// 1. "disabled"
// 2. "fixed"
// 3. "indent_aware"
"coloring": "fixed",
/// Determines how indent guide backgrounds are colored.
/// This setting can take the following two values:
// Determines how indent guide backgrounds are colored.
// This setting can take the following two values:
///
/// 1. "disabled"
/// 2. "indent_aware"
// 1. "disabled"
// 2. "indent_aware"
"background_coloring": "disabled"
},
// Whether the editor will scroll beyond the last line.
@@ -349,6 +379,9 @@
// 3. Never populate the search query
// "never"
"seed_search_query_from_cursor": "always",
// When enabled, automatically adjusts search case sensitivity based on your query.
// If your search query contains any uppercase letters, the search becomes case-sensitive;
// if it contains only lowercase letters, the search becomes case-insensitive.
"use_smartcase_search": false,
// Inlay hint related settings
"inlay_hints": {
@@ -368,7 +401,16 @@
"edit_debounce_ms": 700,
// Time to wait after scrolling the buffer, before requesting the hints,
// set to 0 to disable debouncing.
"scroll_debounce_ms": 50
"scroll_debounce_ms": 50,
/// A set of modifiers which, when pressed, will toggle the visibility of inlay hints.
/// If the set if empty or not all the modifiers specified are pressed, inlay hints will not be toggled.
"toggle_on_modifiers_press": {
"control": false,
"shift": false,
"alt": false,
"platform": false,
"function": false
}
},
"project_panel": {
// Whether to show the project panel button in the status bar
@@ -394,32 +436,32 @@
// Whether to fold directories automatically and show compact folders
// (e.g. "a/b/c" ) when a directory has only one subdirectory inside.
"auto_fold_dirs": true,
/// Scrollbar-related settings
// Scrollbar-related settings
"scrollbar": {
/// When to show the scrollbar in the project panel.
/// This setting can take five values:
// When to show the scrollbar in the project panel.
// This setting can take five values:
///
/// 1. null (default): Inherit editor settings
/// 2. Show the scrollbar if there's important information or
/// follow the system's configured behavior (default):
/// "auto"
/// 3. Match the system's configured behavior:
/// "system"
/// 4. Always show the scrollbar:
/// "always"
/// 5. Never show the scrollbar:
/// "never"
// 1. null (default): Inherit editor settings
// 2. Show the scrollbar if there's important information or
// follow the system's configured behavior (default):
// "auto"
// 3. Match the system's configured behavior:
// "system"
// 4. Always show the scrollbar:
// "always"
// 5. Never show the scrollbar:
// "never"
"show": null
},
/// Which files containing diagnostic errors/warnings to mark in the project panel.
/// This setting can take the following three values:
// Which files containing diagnostic errors/warnings to mark in the project panel.
// This setting can take the following three values:
///
/// 1. Do not mark any files:
/// "off"
/// 2. Only mark files with errors:
/// "errors"
/// 3. Mark files with errors and warnings:
/// "all"
// 1. Do not mark any files:
// "off"
// 2. Only mark files with errors:
// "errors"
// 3. Mark files with errors and warnings:
// "all"
"show_diagnostics": "all",
// Settings related to indent guides in the project panel.
"indent_guides": {
@@ -452,8 +494,8 @@
// when a corresponding outline entry becomes active.
// Gitignored entries are never auto revealed.
"auto_reveal_entries": true,
/// Whether to fold directories automatically
/// when a directory has only one directory inside.
// Whether to fold directories automatically
// when a directory has only one directory inside.
"auto_fold_dirs": true,
// Settings related to indent guides in the outline panel.
"indent_guides": {
@@ -466,21 +508,21 @@
// "never"
"show": "always"
},
/// Scrollbar-related settings
// Scrollbar-related settings
"scrollbar": {
/// When to show the scrollbar in the project panel.
/// This setting can take five values:
// When to show the scrollbar in the project panel.
// This setting can take five values:
///
/// 1. null (default): Inherit editor settings
/// 2. Show the scrollbar if there's important information or
/// follow the system's configured behavior (default):
/// "auto"
/// 3. Match the system's configured behavior:
/// "system"
/// 4. Always show the scrollbar:
/// "always"
/// 5. Never show the scrollbar:
/// "never"
// 1. null (default): Inherit editor settings
// 2. Show the scrollbar if there's important information or
// follow the system's configured behavior (default):
// "auto"
// 3. Match the system's configured behavior:
// "system"
// 4. Always show the scrollbar:
// "always"
// 5. Never show the scrollbar:
// "never"
"show": null
}
},
@@ -551,7 +593,7 @@
// The provider to use.
"provider": "zed.dev",
// The model to use.
"model": "claude-3-5-sonnet"
"model": "claude-3-5-sonnet-latest"
}
},
// The settings for slash commands.
@@ -598,7 +640,7 @@
"show": true,
// Whether or not to show the navigation history buttons.
"show_nav_history_buttons": true,
/// Whether or not to show the tab bar buttons.
// Whether or not to show the tab bar buttons.
"show_tab_bar_buttons": true
},
// Settings related to the editor's tabs
@@ -620,16 +662,16 @@
// 3. Activate the left neighbour tab if present
// "left_neighbour"
"activate_on_close": "history",
/// Which files containing diagnostic errors/warnings to mark in the tabs.
/// Diagnostics are only shown when file icons are also active.
/// This setting only works when can take the following three values:
// Which files containing diagnostic errors/warnings to mark in the tabs.
// Diagnostics are only shown when file icons are also active.
// This setting only works when can take the following three values:
///
/// 1. Do not mark any files:
/// "off"
/// 2. Only mark files with errors:
/// "errors"
/// 3. Mark files with errors and warnings:
/// "all"
// 1. Do not mark any files:
// "off"
// 2. Only mark files with errors:
// "errors"
// 3. Mark files with errors and warnings:
// "all"
"show_diagnostics": "off"
},
// Settings related to preview tabs.
@@ -728,11 +770,28 @@
// Diagnostics configuration.
"diagnostics": {
// Whether to show warnings or not by default.
"include_warnings": true
"include_warnings": true,
// Settings for inline diagnostics
"inline": {
// Whether to show diagnostics inline or not
"enabled": false,
// The delay in milliseconds to show inline diagnostics after the
// last diagnostic update.
"update_debounce_ms": 150,
// The amount of padding between the end of the source line and the start
// of the inline diagnostic in units of em widths.
"padding": 4,
// The minimum column to display inline diagnostics. This setting can be
// used to horizontally align inline diagnostics at some column. Lines
// longer than this value will still push diagnostics further to the right.
"min_column": 0,
// The minimum severity of the diagnostics to show inline.
// Shows all diagnostics when not specified.
"max_severity": null
}
},
// Add files or globs of files that will be excluded by Zed entirely:
// they will be skipped during FS scan(s), file tree and file search
// will lack the corresponding file entries. Overrides `file_scan_inclusions`.
// Files or globs of files that will be excluded by Zed entirely. They will be skipped during file
// scans, file searches, and not be displayed in the project file tree. Takes precedence over `file_scan_inclusions`.
"file_scan_exclusions": [
"**/.git",
"**/.svn",
@@ -744,10 +803,10 @@
"**/.classpath",
"**/.settings"
],
// Add files or globs of files that will be included by Zed, even when
// ignored by git. This is useful for files that are not tracked by git,
// but are still important to your project. Note that globs that are
// overly broad can slow down Zed's file scanning. Overridden by `file_scan_exclusions`.
// Files or globs of files that will be included by Zed, even when ignored by git. This is useful
// for files that are not tracked by git, but are still important to your project. Note that globs
// that are overly broad can slow down Zed's file scanning. `file_scan_exclusions` takes
// precedence over these inclusions.
"file_scan_inclusions": [".env*"],
// Git gutter behavior configuration.
"git": {
@@ -782,21 +841,27 @@
// A list of globs representing files that edit predictions should be disabled for.
// There's a sensible default list of globs already included.
// Any addition to this list will be merged with the default list.
// Globs are matched relative to the worktree root,
// except when starting with a slash (/) or equivalent in Windows.
"disabled_globs": [
"**/.env*",
"**/*.pem",
"**/*.key",
"**/*.cert",
"**/*.crt",
"**/.dev.vars",
"**/secrets.yml"
],
// When to show edit predictions previews in buffer.
// This setting takes two possible values:
// 1. Display inline when there are no language server completions available.
// "mode": "eager_preview"
// 2. Display inline when holding modifier key (alt by default).
// "mode": "auto"
"mode": "eager_preview"
// 1. Display predictions inline when there are no language server completions available.
// "mode": "eager"
// 2. Display predictions inline only when holding a modifier key (alt by default).
// "mode": "subtle"
"mode": "eager",
// Whether edit predictions are enabled in the assistant panel.
// This setting has no effect if globally disabled.
"enabled_in_assistant": true
},
// Settings specific to journaling
"journal": {
@@ -932,21 +997,21 @@
// Example: `echo -e "\e]2;New Title\007";`
"breadcrumbs": true
},
/// Scrollbar-related settings
// Scrollbar-related settings
"scrollbar": {
/// When to show the scrollbar in the terminal.
/// This setting can take five values:
// When to show the scrollbar in the terminal.
// This setting can take five values:
///
/// 1. null (default): Inherit editor settings
/// 2. Show the scrollbar if there's important information or
/// follow the system's configured behavior (default):
/// "auto"
/// 3. Match the system's configured behavior:
/// "system"
/// 4. Always show the scrollbar:
/// "always"
/// 5. Never show the scrollbar:
/// "never"
// 1. null (default): Inherit editor settings
// 2. Show the scrollbar if there's important information or
// follow the system's configured behavior (default):
// "auto"
// 3. Match the system's configured behavior:
// "system"
// 4. Always show the scrollbar:
// "always"
// 5. Never show the scrollbar:
// "never"
"show": null
}
// Set the terminal's font size. If this option is not included,
@@ -965,7 +1030,7 @@
// "max_scroll_history_lines": 10000,
},
"code_actions_on_format": {},
/// Settings related to running tasks.
// Settings related to running tasks.
"tasks": {
"variables": {}
},
@@ -986,20 +1051,20 @@
"JSONC": ["**/.zed/**/*.json", "**/zed/**/*.json", "**/Zed/**/*.json", "**/.vscode/**/*.json"],
"Shell Script": [".env.*"]
},
/// By default use a recent system version of node, or install our own.
/// You can override this to use a version of node that is not in $PATH with:
/// {
/// "node": {
/// "path": "/path/to/node"
/// "npm_path": "/path/to/npm" (defaults to node_path/../npm)
/// }
/// }
/// or to ensure Zed always downloads and installs an isolated version of node:
/// {
/// "node": {
/// "ignore_system_version": true,
/// }
/// NOTE: changing this setting currently requires restarting Zed.
// By default use a recent system version of node, or install our own.
// You can override this to use a version of node that is not in $PATH with:
// {
// "node": {
// "path": "/path/to/node"
// "npm_path": "/path/to/npm" (defaults to node_path/../npm)
// }
// }
// or to ensure Zed always downloads and installs an isolated version of node:
// {
// "node": {
// "ignore_system_version": true,
// }
// NOTE: changing this setting currently requires restarting Zed.
"node": {},
// The extensions that Zed should automatically install on startup.
//
@@ -1045,6 +1110,7 @@
"tab_size": 2
},
"Diff": {
"show_edit_predictions": false,
"remove_trailing_whitespace_on_save": false,
"ensure_final_newline_on_save": false
},
@@ -1054,6 +1120,9 @@
"Erlang": {
"language_servers": ["erlang-ls", "!elp", "..."]
},
"Git Commit": {
"allow_rewrap": "anywhere"
},
"Go": {
"code_actions_on_format": {
"source.organizeImports": true
@@ -1097,6 +1166,7 @@
"Markdown": {
"format_on_save": "off",
"use_on_type_format": false,
"allow_rewrap": "anywhere",
"prettier": {
"allowed": true
}
@@ -1109,6 +1179,9 @@
"parser": "php"
}
},
"Plain Text": {
"allow_rewrap": "anywhere"
},
"Ruby": {
"language_servers": ["solargraph", "!ruby-lsp", "!rubocop", "..."]
},
@@ -1192,6 +1265,9 @@
},
"deepseek": {
"api_url": "https://api.deepseek.com"
},
"mistral": {
"api_url": "https://api.mistral.ai/v1"
}
},
// Zed's Prettier integration settings.
@@ -1237,6 +1313,7 @@
},
// Vim settings
"vim": {
"default_mode": "normal",
"toggle_relative_line_numbers": false,
"use_system_clipboard": "always",
"use_multiline_find": false,

View File

@@ -1,549 +1,3 @@
## [Andromeda](https://github.com/EliverLara/Andromeda)
The MIT License (MIT)
Copyright (c) 2017 <eliverlara@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Atelier Cave Dark](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Atelier Cave Light](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Atelier Dune Dark](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Atelier Dune Light](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Atelier Estuary Dark](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Atelier Estuary Light](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Atelier Forest Dark](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Atelier Forest Light](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Atelier Heath Dark](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Atelier Heath Light](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Atelier Lakeside Dark](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Atelier Lakeside Light](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Atelier Plateau Dark](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Atelier Plateau Light](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Atelier Savanna Dark](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Atelier Savanna Light](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Atelier Seaside Dark](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Atelier Seaside Light](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Atelier Sulphurpool Dark](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Atelier Sulphurpool Light](https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/)
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Ayu Dark](https://github.com/dempfi/ayu)
The MIT License (MIT)
@@ -827,187 +281,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Rosé Pine](https://github.com/edunfelt/base16-rose-pine-scheme)
The MIT License (MIT)
Copyright (c) 2021 Emilia Dunfelt
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Rosé Pine Dawn](https://github.com/edunfelt/base16-rose-pine-scheme)
The MIT License (MIT)
Copyright (c) 2021 Emilia Dunfelt
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Rosé Pine Moon](https://github.com/edunfelt/base16-rose-pine-scheme)
The MIT License (MIT)
Copyright (c) 2021 Emilia Dunfelt
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Sandcastle](https://github.com/gessig/base16-sandcastle-scheme)
The MIT License (MIT)
Copyright (c) 2019 George Essig
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Solarized Dark](https://github.com/altercation/solarized)
The MIT License (MIT)
Copyright (c) 2011 Ethan Schoonover
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Solarized Light](https://github.com/altercation/solarized)
The MIT License (MIT)
Copyright (c) 2011 Ethan Schoonover
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Summercamp](https://github.com/zoefiri/base16-sc)
The MIT License (MIT)
Copyright (c) 2019 Zoe FiriH
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************

View File

@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2017 <eliverlara@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,378 +0,0 @@
{
"$schema": "https://zed.dev/schema/themes/v0.2.0.json",
"name": "Andromeda",
"author": "Zed Industries",
"themes": [
{
"name": "Andromeda",
"appearance": "dark",
"style": {
"border": "#2b2f38ff",
"border.variant": "#252931ff",
"border.focused": "#183934ff",
"border.selected": "#183934ff",
"border.transparent": "#00000000",
"border.disabled": "#292d37ff",
"elevated_surface.background": "#21242bff",
"surface.background": "#21242bff",
"background": "#262933ff",
"element.background": "#21242bff",
"element.hover": "#252931ff",
"element.active": "#2a2f39ff",
"element.selected": "#2a2f39ff",
"element.disabled": "#21242bff",
"drop_target.background": "#aca8ae80",
"ghost_element.background": "#00000000",
"ghost_element.hover": "#252931ff",
"ghost_element.active": "#2a2f39ff",
"ghost_element.selected": "#2a2f39ff",
"ghost_element.disabled": "#21242bff",
"text": "#f7f7f8ff",
"text.muted": "#aca8aeff",
"text.placeholder": "#6b6b73ff",
"text.disabled": "#6b6b73ff",
"text.accent": "#10a793ff",
"icon": "#f7f7f8ff",
"icon.muted": "#aca8aeff",
"icon.disabled": "#6b6b73ff",
"icon.placeholder": "#aca8aeff",
"icon.accent": "#10a793ff",
"status_bar.background": "#262933ff",
"title_bar.background": "#262933ff",
"title_bar.inactive_background": "#21242bff",
"toolbar.background": "#1e2025ff",
"tab_bar.background": "#21242bff",
"tab.inactive_background": "#21242bff",
"tab.active_background": "#1e2025ff",
"search.match_background": "#11a79366",
"panel.background": "#21242bff",
"panel.focused_border": "#10a793ff",
"pane.focused_border": null,
"scrollbar.thumb.background": "#f7f7f84c",
"scrollbar.thumb.hover_background": "#252931ff",
"scrollbar.thumb.border": "#252931ff",
"scrollbar.track.background": "#00000000",
"scrollbar.track.border": "#21232aff",
"editor.foreground": "#f7f7f8ff",
"editor.background": "#1e2025ff",
"editor.gutter.background": "#1e2025ff",
"editor.subheader.background": "#21242bff",
"editor.active_line.background": "#21242bbf",
"editor.highlighted_line.background": "#21242bff",
"editor.line_number": "#565960",
"editor.active_line_number": "#f8f8f9",
"editor.hover_line_number": "#cbcdd0",
"editor.invisible": "#64646dff",
"editor.wrap_guide": "#f7f7f80d",
"editor.active_wrap_guide": "#f7f7f81a",
"editor.document_highlight.read_background": "#10a7931a",
"editor.document_highlight.write_background": "#64646d66",
"terminal.background": "#1e2025ff",
"terminal.foreground": "#f7f7f8ff",
"terminal.bright_foreground": "#f7f7f8ff",
"terminal.dim_foreground": "#1e2025ff",
"terminal.ansi.black": "#1e2025ff",
"terminal.ansi.bright_black": "#40434cff",
"terminal.ansi.dim_black": "#f7f7f8ff",
"terminal.ansi.red": "#f82871ff",
"terminal.ansi.bright_red": "#8e0f3aff",
"terminal.ansi.dim_red": "#ffa3b5ff",
"terminal.ansi.green": "#96df71ff",
"terminal.ansi.bright_green": "#457c38ff",
"terminal.ansi.dim_green": "#cef0b9ff",
"terminal.ansi.yellow": "#fee56cff",
"terminal.ansi.bright_yellow": "#958334ff",
"terminal.ansi.dim_yellow": "#fef1b7ff",
"terminal.ansi.blue": "#10a793ff",
"terminal.ansi.bright_blue": "#1a5148ff",
"terminal.ansi.dim_blue": "#9cd4c7ff",
"terminal.ansi.magenta": "#c74cecff",
"terminal.ansi.bright_magenta": "#682681ff",
"terminal.ansi.dim_magenta": "#e7abf7ff",
"terminal.ansi.cyan": "#08e7c5ff",
"terminal.ansi.bright_cyan": "#008169ff",
"terminal.ansi.dim_cyan": "#a9f4e1ff",
"terminal.ansi.white": "#f7f7f8ff",
"terminal.ansi.bright_white": "#f7f7f8ff",
"terminal.ansi.dim_white": "#87858cff",
"link_text.hover": "#10a793ff",
"conflict": "#fee56cff",
"conflict.background": "#5c5014ff",
"conflict.border": "#796b26ff",
"created": "#96df71ff",
"created.background": "#184618ff",
"created.border": "#306129ff",
"deleted": "#f82871ff",
"deleted.background": "#54051bff",
"deleted.border": "#72092aff",
"error": "#f82871ff",
"error.background": "#54051bff",
"error.border": "#72092aff",
"hidden": "#6b6b73ff",
"hidden.background": "#262933ff",
"hidden.border": "#292d37ff",
"hint": "#618399ff",
"hint.background": "#12231fff",
"hint.border": "#183934ff",
"ignored": "#6b6b73ff",
"ignored.background": "#262933ff",
"ignored.border": "#2b2f38ff",
"info": "#10a793ff",
"info.background": "#12231fff",
"info.border": "#183934ff",
"modified": "#fee56cff",
"modified.background": "#5c5014ff",
"modified.border": "#796b26ff",
"predictive": "#315f70ff",
"predictive.background": "#184618ff",
"predictive.border": "#306129ff",
"renamed": "#10a793ff",
"renamed.background": "#12231fff",
"renamed.border": "#183934ff",
"success": "#96df71ff",
"success.background": "#184618ff",
"success.border": "#306129ff",
"unreachable": "#aca8aeff",
"unreachable.background": "#262933ff",
"unreachable.border": "#2b2f38ff",
"warning": "#fee56cff",
"warning.background": "#5c5014ff",
"warning.border": "#796b26ff",
"players": [
{
"cursor": "#10a793ff",
"background": "#10a793ff",
"selection": "#10a7933d"
},
{
"cursor": "#c74cecff",
"background": "#c74cecff",
"selection": "#c74cec3d"
},
{
"cursor": "#f29c14ff",
"background": "#f29c14ff",
"selection": "#f29c143d"
},
{
"cursor": "#893ea6ff",
"background": "#893ea6ff",
"selection": "#893ea63d"
},
{
"cursor": "#08e7c5ff",
"background": "#08e7c5ff",
"selection": "#08e7c53d"
},
{
"cursor": "#f82871ff",
"background": "#f82871ff",
"selection": "#f828713d"
},
{
"cursor": "#fee56cff",
"background": "#fee56cff",
"selection": "#fee56c3d"
},
{
"cursor": "#96df71ff",
"background": "#96df71ff",
"selection": "#96df713d"
}
],
"syntax": {
"attribute": {
"color": "#10a793ff",
"font_style": null,
"font_weight": null
},
"boolean": {
"color": "#96df71ff",
"font_style": null,
"font_weight": null
},
"comment": {
"color": "#afabb1ff",
"font_style": null,
"font_weight": null
},
"comment.doc": {
"color": "#afabb1ff",
"font_style": null,
"font_weight": null
},
"constant": {
"color": "#96df71ff",
"font_style": null,
"font_weight": null
},
"constructor": {
"color": "#10a793ff",
"font_style": null,
"font_weight": null
},
"embedded": {
"color": "#f7f7f8ff",
"font_style": null,
"font_weight": null
},
"emphasis": {
"color": "#10a793ff",
"font_style": null,
"font_weight": null
},
"emphasis.strong": {
"color": "#10a793ff",
"font_style": null,
"font_weight": 700
},
"enum": {
"color": "#f29c14ff",
"font_style": null,
"font_weight": null
},
"function": {
"color": "#fee56cff",
"font_style": null,
"font_weight": null
},
"hint": {
"color": "#618399ff",
"font_style": null,
"font_weight": 700
},
"keyword": {
"color": "#10a793ff",
"font_style": null,
"font_weight": null
},
"label": {
"color": "#10a793ff",
"font_style": null,
"font_weight": null
},
"link_text": {
"color": "#f29c14ff",
"font_style": "italic",
"font_weight": null
},
"link_uri": {
"color": "#96df71ff",
"font_style": null,
"font_weight": null
},
"number": {
"color": "#96df71ff",
"font_style": null,
"font_weight": null
},
"operator": {
"color": "#f29c14ff",
"font_style": null,
"font_weight": null
},
"predictive": {
"color": "#315f70ff",
"font_style": "italic",
"font_weight": null
},
"preproc": {
"color": "#f7f7f8ff",
"font_style": null,
"font_weight": null
},
"primary": {
"color": "#f7f7f8ff",
"font_style": null,
"font_weight": null
},
"property": {
"color": "#10a793ff",
"font_style": null,
"font_weight": null
},
"punctuation": {
"color": "#d8d5dbff",
"font_style": null,
"font_weight": null
},
"punctuation.bracket": {
"color": "#d8d5dbff",
"font_style": null,
"font_weight": null
},
"punctuation.delimiter": {
"color": "#d8d5dbff",
"font_style": null,
"font_weight": null
},
"punctuation.list_marker": {
"color": "#d8d5dbff",
"font_style": null,
"font_weight": null
},
"punctuation.special": {
"color": "#d8d5dbff",
"font_style": null,
"font_weight": null
},
"string": {
"color": "#f29c14ff",
"font_style": null,
"font_weight": null
},
"string.escape": {
"color": "#afabb1ff",
"font_style": null,
"font_weight": null
},
"string.regex": {
"color": "#f29c14ff",
"font_style": null,
"font_weight": null
},
"string.special": {
"color": "#f29c14ff",
"font_style": null,
"font_weight": null
},
"string.special.symbol": {
"color": "#f29c14ff",
"font_style": null,
"font_weight": null
},
"tag": {
"color": "#10a793ff",
"font_style": null,
"font_weight": null
},
"text.literal": {
"color": "#f29c14ff",
"font_style": null,
"font_weight": null
},
"title": {
"color": "#f7f7f8ff",
"font_style": null,
"font_weight": 700
},
"type": {
"color": "#08e7c5ff",
"font_style": null,
"font_weight": null
},
"variable": {
"color": "#f7f7f8ff",
"font_style": null,
"font_weight": null
},
"variant": {
"color": "#10a793ff",
"font_style": null,
"font_weight": null
}
}
}
}
]
}

View File

@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

File diff suppressed because it is too large Load Diff

View File

@@ -105,6 +105,9 @@
"terminal.ansi.bright_white": "#fbf1c7ff",
"terminal.ansi.dim_white": "#b0a189ff",
"link_text.hover": "#83a598ff",
"version_control_added": "#b7bb26ff",
"version_control_modified": "#f9bd2fff",
"version_control_deleted": "#fb4a35ff",
"conflict": "#f9bd2fff",
"conflict.background": "#572e10ff",
"conflict.border": "#754916ff",
@@ -376,7 +379,7 @@
"font_weight": null
},
"variable": {
"color": "#83a598ff",
"color": "#ebdbb2ff",
"font_style": null,
"font_weight": null
},
@@ -490,6 +493,9 @@
"terminal.ansi.bright_white": "#fbf1c7ff",
"terminal.ansi.dim_white": "#b0a189ff",
"link_text.hover": "#83a598ff",
"version_control_added": "#b7bb26ff",
"version_control_modified": "#f9bd2fff",
"version_control_deleted": "#fb4a35ff",
"conflict": "#f9bd2fff",
"conflict.background": "#572e10ff",
"conflict.border": "#754916ff",
@@ -761,7 +767,7 @@
"font_weight": null
},
"variable": {
"color": "#83a598ff",
"color": "#ebdbb2ff",
"font_style": null,
"font_weight": null
},
@@ -875,6 +881,9 @@
"terminal.ansi.bright_white": "#fbf1c7ff",
"terminal.ansi.dim_white": "#b0a189ff",
"link_text.hover": "#83a598ff",
"version_control_added": "#b7bb26ff",
"version_control_modified": "#f9bd2fff",
"version_control_deleted": "#fb4a35ff",
"conflict": "#f9bd2fff",
"conflict.background": "#572e10ff",
"conflict.border": "#754916ff",
@@ -1146,7 +1155,7 @@
"font_weight": null
},
"variable": {
"color": "#83a598ff",
"color": "#ebdbb2ff",
"font_style": null,
"font_weight": null
},
@@ -1260,6 +1269,9 @@
"terminal.ansi.bright_white": "#282828ff",
"terminal.ansi.dim_white": "#73675eff",
"link_text.hover": "#0b6678ff",
"version_control_added": "#797410ff",
"version_control_modified": "#b57615ff",
"version_control_deleted": "#9d0308ff",
"conflict": "#b57615ff",
"conflict.background": "#f5e2d0ff",
"conflict.border": "#ebccabff",
@@ -1531,7 +1543,7 @@
"font_weight": null
},
"variable": {
"color": "#066578ff",
"color": "#282828ff",
"font_style": null,
"font_weight": null
},
@@ -1645,6 +1657,9 @@
"terminal.ansi.bright_white": "#282828ff",
"terminal.ansi.dim_white": "#73675eff",
"link_text.hover": "#0b6678ff",
"version_control_added": "#797410ff",
"version_control_modified": "#b57615ff",
"version_control_deleted": "#9d0308ff",
"conflict": "#b57615ff",
"conflict.background": "#f5e2d0ff",
"conflict.border": "#ebccabff",
@@ -1916,7 +1931,7 @@
"font_weight": null
},
"variable": {
"color": "#066578ff",
"color": "#282828ff",
"font_style": null,
"font_weight": null
},
@@ -2030,6 +2045,9 @@
"terminal.ansi.bright_white": "#282828ff",
"terminal.ansi.dim_white": "#73675eff",
"link_text.hover": "#0b6678ff",
"version_control_added": "#797410ff",
"version_control_modified": "#b57615ff",
"version_control_deleted": "#9d0308ff",
"conflict": "#b57615ff",
"conflict.background": "#f5e2d0ff",
"conflict.border": "#ebccabff",
@@ -2301,7 +2319,7 @@
"font_weight": null
},
"variable": {
"color": "#066578ff",
"color": "#282828ff",
"font_style": null,
"font_weight": null
},

View File

@@ -96,6 +96,9 @@
"terminal.ansi.bright_white": "#dce0e5ff",
"terminal.ansi.dim_white": "#575d65ff",
"link_text.hover": "#74ade8ff",
"version_control_added": "#a7c088ff",
"version_control_modified": "#dec184ff",
"version_control_deleted": "#d07277ff",
"conflict": "#dec184ff",
"conflict.background": "#dec1841a",
"conflict.border": "#5d4c2fff",
@@ -362,7 +365,7 @@
"font_weight": null
},
"variable": {
"color": "#dce0e5ff",
"color": "#acb2beff",
"font_style": null,
"font_weight": null
},
@@ -441,7 +444,7 @@
"editor.invisible": "#a3a3a4ff",
"editor.wrap_guide": "#383a410d",
"editor.active_wrap_guide": "#383a411a",
"editor.document_highlight.read_background": "#5c78e21a",
"editor.document_highlight.read_background": "#5c78e225",
"editor.document_highlight.write_background": "#a3a3a466",
"terminal.background": "#fafafaff",
"terminal.foreground": "#242529ff",
@@ -472,6 +475,9 @@
"terminal.ansi.bright_white": "#242529ff",
"terminal.ansi.dim_white": "#97979aff",
"link_text.hover": "#5c78e2ff",
"version_control_added": "#669f59ff",
"version_control_modified": "#a48819ff",
"version_control_deleted": "#d36151ff",
"conflict": "#a48819ff",
"conflict.background": "#faf2e6ff",
"conflict.border": "#f4e7d1ff",

View File

@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2021 Emilia Dunfelt
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2019 George Essig
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,378 +0,0 @@
{
"$schema": "https://zed.dev/schema/themes/v0.2.0.json",
"name": "Sandcastle",
"author": "Zed Industries",
"themes": [
{
"name": "Sandcastle",
"appearance": "dark",
"style": {
"border": "#3d4350ff",
"border.variant": "#313741ff",
"border.focused": "#223131ff",
"border.selected": "#223131ff",
"border.transparent": "#00000000",
"border.disabled": "#393f4aff",
"elevated_surface.background": "#2b3038ff",
"surface.background": "#2b3038ff",
"background": "#333944ff",
"element.background": "#2b3038ff",
"element.hover": "#313741ff",
"element.active": "#3d4350ff",
"element.selected": "#3d4350ff",
"element.disabled": "#2b3038ff",
"drop_target.background": "#a6978280",
"ghost_element.background": "#00000000",
"ghost_element.hover": "#313741ff",
"ghost_element.active": "#3d4350ff",
"ghost_element.selected": "#3d4350ff",
"ghost_element.disabled": "#2b3038ff",
"text": "#fdf4c1ff",
"text.muted": "#a69782ff",
"text.placeholder": "#827568ff",
"text.disabled": "#827568ff",
"text.accent": "#518b8bff",
"icon": "#fdf4c1ff",
"icon.muted": "#a69782ff",
"icon.disabled": "#827568ff",
"icon.placeholder": "#a69782ff",
"icon.accent": "#518b8bff",
"status_bar.background": "#333944ff",
"title_bar.background": "#333944ff",
"title_bar.inactive_background": "#2b3038ff",
"toolbar.background": "#282c33ff",
"tab_bar.background": "#2b3038ff",
"tab.inactive_background": "#2b3038ff",
"tab.active_background": "#282c33ff",
"search.match_background": "#528b8b66",
"panel.background": "#2b3038ff",
"panel.focused_border": "#518b8bff",
"pane.focused_border": null,
"scrollbar.thumb.background": "#fdf4c14c",
"scrollbar.thumb.hover_background": "#313741ff",
"scrollbar.thumb.border": "#313741ff",
"scrollbar.track.background": "#00000000",
"scrollbar.track.border": "#2a2f38ff",
"editor.foreground": "#fdf4c1ff",
"editor.background": "#282c33ff",
"editor.gutter.background": "#282c33ff",
"editor.subheader.background": "#2b3038ff",
"editor.active_line.background": "#2b3038bf",
"editor.highlighted_line.background": "#2b3038ff",
"editor.line_number": "#6b6b61",
"editor.active_line_number": "#dbdbd7",
"editor.hover_line_number": "#b6b6af",
"editor.invisible": "#7c6f64ff",
"editor.wrap_guide": "#fdf4c10d",
"editor.active_wrap_guide": "#fdf4c11a",
"editor.document_highlight.read_background": "#518b8b1a",
"editor.document_highlight.write_background": "#7c6f6466",
"terminal.background": "#282c33ff",
"terminal.foreground": "#fdf4c1ff",
"terminal.bright_foreground": "#fdf4c1ff",
"terminal.dim_foreground": "#282c33ff",
"terminal.ansi.black": "#282c33ff",
"terminal.ansi.bright_black": "#5e5753ff",
"terminal.ansi.dim_black": "#fdf4c1ff",
"terminal.ansi.red": "#b3627aff",
"terminal.ansi.bright_red": "#57333dff",
"terminal.ansi.dim_red": "#dcb0bbff",
"terminal.ansi.green": "#83a598ff",
"terminal.ansi.bright_green": "#414f4aff",
"terminal.ansi.dim_green": "#c0d2cbff",
"terminal.ansi.yellow": "#a07d3aff",
"terminal.ansi.bright_yellow": "#4e3f22ff",
"terminal.ansi.dim_yellow": "#d3bd9aff",
"terminal.ansi.blue": "#518b8bff",
"terminal.ansi.bright_blue": "#2c4444ff",
"terminal.ansi.dim_blue": "#a8c4c4ff",
"terminal.ansi.magenta": "#a87222ff",
"terminal.ansi.bright_magenta": "#523918ff",
"terminal.ansi.dim_magenta": "#dab78eff",
"terminal.ansi.cyan": "#83a598ff",
"terminal.ansi.bright_cyan": "#414f4aff",
"terminal.ansi.dim_cyan": "#c0d2cbff",
"terminal.ansi.white": "#fdf4c1ff",
"terminal.ansi.bright_white": "#fdf4c1ff",
"terminal.ansi.dim_white": "#958776ff",
"link_text.hover": "#518b8bff",
"conflict": "#a07d3aff",
"conflict.background": "#231d12ff",
"conflict.border": "#392e19ff",
"created": "#83a598ff",
"created.background": "#1e2321ff",
"created.border": "#303a36ff",
"deleted": "#b3627aff",
"deleted.background": "#26191cff",
"deleted.border": "#3e272dff",
"error": "#b3627aff",
"error.background": "#26191cff",
"error.border": "#3e272dff",
"hidden": "#827568ff",
"hidden.background": "#333944ff",
"hidden.border": "#393f4aff",
"hint": "#727d68ff",
"hint.background": "#171e1eff",
"hint.border": "#223131ff",
"ignored": "#827568ff",
"ignored.background": "#333944ff",
"ignored.border": "#3d4350ff",
"info": "#518b8bff",
"info.background": "#171e1eff",
"info.border": "#223131ff",
"modified": "#a07d3aff",
"modified.background": "#231d12ff",
"modified.border": "#392e19ff",
"predictive": "#5c6152ff",
"predictive.background": "#1e2321ff",
"predictive.border": "#303a36ff",
"renamed": "#518b8bff",
"renamed.background": "#171e1eff",
"renamed.border": "#223131ff",
"success": "#83a598ff",
"success.background": "#1e2321ff",
"success.border": "#303a36ff",
"unreachable": "#a69782ff",
"unreachable.background": "#333944ff",
"unreachable.border": "#3d4350ff",
"warning": "#a07d3aff",
"warning.background": "#231d12ff",
"warning.border": "#392e19ff",
"players": [
{
"cursor": "#518b8bff",
"background": "#518b8bff",
"selection": "#518b8b3d"
},
{
"cursor": "#a87222ff",
"background": "#a87222ff",
"selection": "#a872223d"
},
{
"cursor": "#a07d3aff",
"background": "#a07d3aff",
"selection": "#a07d3a3d"
},
{
"cursor": "#d75f5fff",
"background": "#d75f5fff",
"selection": "#d75f5f3d"
},
{
"cursor": "#83a598ff",
"background": "#83a598ff",
"selection": "#83a5983d"
},
{
"cursor": "#b3627aff",
"background": "#b3627aff",
"selection": "#b3627a3d"
},
{
"cursor": "#a07d3aff",
"background": "#a07d3aff",
"selection": "#a07d3a3d"
},
{
"cursor": "#83a598ff",
"background": "#83a598ff",
"selection": "#83a5983d"
}
],
"syntax": {
"attribute": {
"color": "#518b8bff",
"font_style": null,
"font_weight": null
},
"boolean": {
"color": "#83a598ff",
"font_style": null,
"font_weight": null
},
"comment": {
"color": "#a89984ff",
"font_style": null,
"font_weight": null
},
"comment.doc": {
"color": "#a89984ff",
"font_style": null,
"font_weight": null
},
"constant": {
"color": "#83a598ff",
"font_style": null,
"font_weight": null
},
"constructor": {
"color": "#518b8bff",
"font_style": null,
"font_weight": null
},
"embedded": {
"color": "#fdf4c1ff",
"font_style": null,
"font_weight": null
},
"emphasis": {
"color": "#518b8bff",
"font_style": null,
"font_weight": null
},
"emphasis.strong": {
"color": "#518b8bff",
"font_style": null,
"font_weight": 700
},
"enum": {
"color": "#a07d3aff",
"font_style": null,
"font_weight": null
},
"function": {
"color": "#a07d3aff",
"font_style": null,
"font_weight": null
},
"hint": {
"color": "#727d68ff",
"font_style": null,
"font_weight": 700
},
"keyword": {
"color": "#518b8bff",
"font_style": null,
"font_weight": null
},
"label": {
"color": "#518b8bff",
"font_style": null,
"font_weight": null
},
"link_text": {
"color": "#a07d3aff",
"font_style": "italic",
"font_weight": null
},
"link_uri": {
"color": "#83a598ff",
"font_style": null,
"font_weight": null
},
"number": {
"color": "#83a598ff",
"font_style": null,
"font_weight": null
},
"operator": {
"color": "#a07d3aff",
"font_style": null,
"font_weight": null
},
"predictive": {
"color": "#5c6152ff",
"font_style": "italic",
"font_weight": null
},
"preproc": {
"color": "#fdf4c1ff",
"font_style": null,
"font_weight": null
},
"primary": {
"color": "#fdf4c1ff",
"font_style": null,
"font_weight": null
},
"property": {
"color": "#518b8bff",
"font_style": null,
"font_weight": null
},
"punctuation": {
"color": "#d5c5a1ff",
"font_style": null,
"font_weight": null
},
"punctuation.bracket": {
"color": "#d5c5a1ff",
"font_style": null,
"font_weight": null
},
"punctuation.delimiter": {
"color": "#d5c5a1ff",
"font_style": null,
"font_weight": null
},
"punctuation.list_marker": {
"color": "#d5c5a1ff",
"font_style": null,
"font_weight": null
},
"punctuation.special": {
"color": "#d5c5a1ff",
"font_style": null,
"font_weight": null
},
"string": {
"color": "#a07d3aff",
"font_style": null,
"font_weight": null
},
"string.escape": {
"color": "#a89984ff",
"font_style": null,
"font_weight": null
},
"string.regex": {
"color": "#a07d3aff",
"font_style": null,
"font_weight": null
},
"string.special": {
"color": "#a07d3aff",
"font_style": null,
"font_weight": null
},
"string.special.symbol": {
"color": "#a07d3aff",
"font_style": null,
"font_weight": null
},
"tag": {
"color": "#518b8bff",
"font_style": null,
"font_weight": null
},
"text.literal": {
"color": "#a07d3aff",
"font_style": null,
"font_weight": null
},
"title": {
"color": "#fdf4c1ff",
"font_style": null,
"font_weight": 700
},
"type": {
"color": "#83a598ff",
"font_style": null,
"font_weight": null
},
"variable": {
"color": "#fdf4c1ff",
"font_style": null,
"font_weight": null
},
"variant": {
"color": "#518b8bff",
"font_style": null,
"font_weight": null
}
}
}
}
]
}

View File

@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2011 Ethan Schoonover
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,749 +0,0 @@
{
"$schema": "https://zed.dev/schema/themes/v0.2.0.json",
"name": "Solarized",
"author": "Zed Industries",
"themes": [
{
"name": "Solarized Dark",
"appearance": "dark",
"style": {
"border": "#2b4e58ff",
"border.variant": "#053541ff",
"border.focused": "#1b3149ff",
"border.selected": "#1b3149ff",
"border.transparent": "#00000000",
"border.disabled": "#19424dff",
"elevated_surface.background": "#04313bff",
"surface.background": "#04313bff",
"background": "#073743ff",
"element.background": "#04313bff",
"element.hover": "#053541ff",
"element.active": "#294d58ff",
"element.selected": "#294d58ff",
"element.disabled": "#04313bff",
"drop_target.background": "#93a1a180",
"ghost_element.background": "#00000000",
"ghost_element.hover": "#053541ff",
"ghost_element.active": "#294d58ff",
"ghost_element.selected": "#294d58ff",
"ghost_element.disabled": "#04313bff",
"text": "#fdf6e3ff",
"text.muted": "#93a1a1ff",
"text.placeholder": "#6f8389ff",
"text.disabled": "#6f8389ff",
"text.accent": "#278ad1ff",
"icon": "#fdf6e3ff",
"icon.muted": "#93a1a1ff",
"icon.disabled": "#6f8389ff",
"icon.placeholder": "#93a1a1ff",
"icon.accent": "#278ad1ff",
"status_bar.background": "#073743ff",
"title_bar.background": "#073743ff",
"title_bar.inactive_background": "#04313bff",
"toolbar.background": "#002a35ff",
"tab_bar.background": "#04313bff",
"tab.inactive_background": "#04313bff",
"tab.active_background": "#002a35ff",
"search.match_background": "#288bd166",
"panel.background": "#04313bff",
"panel.focused_border": "#278ad1ff",
"pane.focused_border": null,
"scrollbar.thumb.background": "#fdf6e34c",
"scrollbar.thumb.hover_background": "#053541ff",
"scrollbar.thumb.border": "#053541ff",
"scrollbar.track.background": "#00000000",
"scrollbar.track.border": "#022f3bff",
"editor.foreground": "#fdf6e3ff",
"editor.background": "#002a35ff",
"editor.gutter.background": "#002a35ff",
"editor.subheader.background": "#04313bff",
"editor.active_line.background": "#04313bbf",
"editor.highlighted_line.background": "#04313bff",
"editor.line_number": "#5a6d6f",
"editor.active_line_number": "#e3e8e8",
"editor.hover_line_number": "#abb9ba",
"editor.invisible": "#6c8287ff",
"editor.wrap_guide": "#fdf6e30d",
"editor.active_wrap_guide": "#fdf6e31a",
"editor.document_highlight.read_background": "#278ad11a",
"editor.document_highlight.write_background": "#6c828766",
"terminal.background": "#002a35ff",
"terminal.foreground": "#fdf6e3ff",
"terminal.bright_foreground": "#fdf6e3ff",
"terminal.dim_foreground": "#002a35ff",
"terminal.ansi.black": "#002a35ff",
"terminal.ansi.bright_black": "#5c7279ff",
"terminal.ansi.dim_black": "#fdf6e3ff",
"terminal.ansi.red": "#dc3330ff",
"terminal.ansi.bright_red": "#7d181cff",
"terminal.ansi.dim_red": "#faa091ff",
"terminal.ansi.green": "#849903ff",
"terminal.ansi.bright_green": "#434a10ff",
"terminal.ansi.dim_green": "#c6cb8bff",
"terminal.ansi.yellow": "#b58902ff",
"terminal.ansi.bright_yellow": "#5d430fff",
"terminal.ansi.dim_yellow": "#e0c189ff",
"terminal.ansi.blue": "#278ad1ff",
"terminal.ansi.bright_blue": "#214365ff",
"terminal.ansi.dim_blue": "#a5c3e9ff",
"terminal.ansi.magenta": "#d33781ff",
"terminal.ansi.bright_magenta": "#6f1f3fff",
"terminal.ansi.dim_magenta": "#f0a2beff",
"terminal.ansi.cyan": "#2ba198ff",
"terminal.ansi.bright_cyan": "#204e4aff",
"terminal.ansi.dim_cyan": "#9fd0cbff",
"terminal.ansi.white": "#fdf6e3ff",
"terminal.ansi.bright_white": "#fdf6e3ff",
"terminal.ansi.dim_white": "#7b8e91ff",
"link_text.hover": "#278ad1ff",
"conflict": "#b58902ff",
"conflict.background": "#2e1d0cff",
"conflict.border": "#47300fff",
"created": "#849903ff",
"created.background": "#1e210cff",
"created.border": "#313510ff",
"deleted": "#dc3330ff",
"deleted.background": "#4a080eff",
"deleted.border": "#641015ff",
"error": "#dc3330ff",
"error.background": "#4a080eff",
"error.border": "#641015ff",
"hidden": "#6f8389ff",
"hidden.background": "#073743ff",
"hidden.border": "#19424dff",
"hint": "#4f8297ff",
"hint.background": "#141f2cff",
"hint.border": "#1b3149ff",
"ignored": "#6f8389ff",
"ignored.background": "#073743ff",
"ignored.border": "#2b4e58ff",
"info": "#278ad1ff",
"info.background": "#141f2cff",
"info.border": "#1b3149ff",
"modified": "#b58902ff",
"modified.background": "#2e1d0cff",
"modified.border": "#47300fff",
"predictive": "#3f718bff",
"predictive.background": "#1e210cff",
"predictive.border": "#313510ff",
"renamed": "#278ad1ff",
"renamed.background": "#141f2cff",
"renamed.border": "#1b3149ff",
"success": "#849903ff",
"success.background": "#1e210cff",
"success.border": "#313510ff",
"unreachable": "#93a1a1ff",
"unreachable.background": "#073743ff",
"unreachable.border": "#2b4e58ff",
"warning": "#b58902ff",
"warning.background": "#2e1d0cff",
"warning.border": "#47300fff",
"players": [
{
"cursor": "#278ad1ff",
"background": "#278ad1ff",
"selection": "#278ad13d"
},
{
"cursor": "#d33781ff",
"background": "#d33781ff",
"selection": "#d337813d"
},
{
"cursor": "#cb4b16ff",
"background": "#cb4b16ff",
"selection": "#cb4b163d"
},
{
"cursor": "#6c71c4ff",
"background": "#6c71c4ff",
"selection": "#6c71c43d"
},
{
"cursor": "#2ba198ff",
"background": "#2ba198ff",
"selection": "#2ba1983d"
},
{
"cursor": "#dc3330ff",
"background": "#dc3330ff",
"selection": "#dc33303d"
},
{
"cursor": "#b58902ff",
"background": "#b58902ff",
"selection": "#b589023d"
},
{
"cursor": "#849903ff",
"background": "#849903ff",
"selection": "#8499033d"
}
],
"syntax": {
"attribute": {
"color": "#278ad1ff",
"font_style": null,
"font_weight": null
},
"boolean": {
"color": "#849903ff",
"font_style": null,
"font_weight": null
},
"comment": {
"color": "#99a5a4ff",
"font_style": null,
"font_weight": null
},
"comment.doc": {
"color": "#99a5a4ff",
"font_style": null,
"font_weight": null
},
"constant": {
"color": "#849903ff",
"font_style": null,
"font_weight": null
},
"constructor": {
"color": "#278ad1ff",
"font_style": null,
"font_weight": null
},
"embedded": {
"color": "#fdf6e3ff",
"font_style": null,
"font_weight": null
},
"emphasis": {
"color": "#278ad1ff",
"font_style": null,
"font_weight": null
},
"emphasis.strong": {
"color": "#278ad1ff",
"font_style": null,
"font_weight": 700
},
"enum": {
"color": "#cb4b16ff",
"font_style": null,
"font_weight": null
},
"function": {
"color": "#b58902ff",
"font_style": null,
"font_weight": null
},
"hint": {
"color": "#4f8297ff",
"font_style": null,
"font_weight": 700
},
"keyword": {
"color": "#278ad1ff",
"font_style": null,
"font_weight": null
},
"label": {
"color": "#278ad1ff",
"font_style": null,
"font_weight": null
},
"link_text": {
"color": "#cb4b16ff",
"font_style": "italic",
"font_weight": null
},
"link_uri": {
"color": "#849903ff",
"font_style": null,
"font_weight": null
},
"number": {
"color": "#849903ff",
"font_style": null,
"font_weight": null
},
"operator": {
"color": "#cb4b16ff",
"font_style": null,
"font_weight": null
},
"predictive": {
"color": "#3f718bff",
"font_style": "italic",
"font_weight": null
},
"preproc": {
"color": "#fdf6e3ff",
"font_style": null,
"font_weight": null
},
"primary": {
"color": "#fdf6e3ff",
"font_style": null,
"font_weight": null
},
"property": {
"color": "#278ad1ff",
"font_style": null,
"font_weight": null
},
"punctuation": {
"color": "#efe9d6ff",
"font_style": null,
"font_weight": null
},
"punctuation.bracket": {
"color": "#efe9d6ff",
"font_style": null,
"font_weight": null
},
"punctuation.delimiter": {
"color": "#efe9d6ff",
"font_style": null,
"font_weight": null
},
"punctuation.list_marker": {
"color": "#efe9d6ff",
"font_style": null,
"font_weight": null
},
"punctuation.special": {
"color": "#efe9d6ff",
"font_style": null,
"font_weight": null
},
"string": {
"color": "#cb4b16ff",
"font_style": null,
"font_weight": null
},
"string.escape": {
"color": "#99a5a4ff",
"font_style": null,
"font_weight": null
},
"string.regex": {
"color": "#cb4b16ff",
"font_style": null,
"font_weight": null
},
"string.special": {
"color": "#cb4b16ff",
"font_style": null,
"font_weight": null
},
"string.special.symbol": {
"color": "#cb4b16ff",
"font_style": null,
"font_weight": null
},
"tag": {
"color": "#278ad1ff",
"font_style": null,
"font_weight": null
},
"text.literal": {
"color": "#cb4b16ff",
"font_style": null,
"font_weight": null
},
"title": {
"color": "#fdf6e3ff",
"font_style": null,
"font_weight": 700
},
"type": {
"color": "#2ba198ff",
"font_style": null,
"font_weight": null
},
"variable": {
"color": "#fdf6e3ff",
"font_style": null,
"font_weight": null
},
"variant": {
"color": "#278ad1ff",
"font_style": null,
"font_weight": null
}
}
}
},
{
"name": "Solarized Light",
"appearance": "light",
"style": {
"border": "#9faaa8ff",
"border.variant": "#dcdacbff",
"border.focused": "#bfd3efff",
"border.selected": "#bfd3efff",
"border.transparent": "#00000000",
"border.disabled": "#b6bcb5ff",
"elevated_surface.background": "#f3eddaff",
"surface.background": "#f3eddaff",
"background": "#cfd0c4ff",
"element.background": "#f3eddaff",
"element.hover": "#dcdacbff",
"element.active": "#a2aca9ff",
"element.selected": "#a2aca9ff",
"element.disabled": "#f3eddaff",
"drop_target.background": "#34555e80",
"ghost_element.background": "#00000000",
"ghost_element.hover": "#dcdacbff",
"ghost_element.active": "#a2aca9ff",
"ghost_element.selected": "#a2aca9ff",
"ghost_element.disabled": "#f3eddaff",
"text": "#002a35ff",
"text.muted": "#34555eff",
"text.placeholder": "#6a7f86ff",
"text.disabled": "#6a7f86ff",
"text.accent": "#288bd1ff",
"icon": "#002a35ff",
"icon.muted": "#34555eff",
"icon.disabled": "#6a7f86ff",
"icon.placeholder": "#34555eff",
"icon.accent": "#288bd1ff",
"status_bar.background": "#cfd0c4ff",
"title_bar.background": "#cfd0c4ff",
"title_bar.inactive_background": "#f3eddaff",
"toolbar.background": "#fdf6e3ff",
"tab_bar.background": "#f3eddaff",
"tab.inactive_background": "#f3eddaff",
"tab.active_background": "#fdf6e3ff",
"search.match_background": "#298bd166",
"panel.background": "#f3eddaff",
"panel.focused_border": "#288bd1ff",
"pane.focused_border": null,
"scrollbar.thumb.background": "#002a354c",
"scrollbar.thumb.hover_background": "#dcdacbff",
"scrollbar.thumb.border": "#dcdacbff",
"scrollbar.track.background": "#00000000",
"scrollbar.track.border": "#f5eedbff",
"editor.foreground": "#002a35ff",
"editor.background": "#fdf6e3ff",
"editor.gutter.background": "#fdf6e3ff",
"editor.subheader.background": "#f3eddaff",
"editor.active_line.background": "#f3eddabf",
"editor.highlighted_line.background": "#f3eddaff",
"editor.line_number": "#a8ad9f",
"editor.active_line_number": "#272923",
"editor.hover_line_number": "#42453b",
"editor.invisible": "#6c8287ff",
"editor.wrap_guide": "#002a350d",
"editor.active_wrap_guide": "#002a351a",
"editor.document_highlight.read_background": "#288bd11a",
"editor.document_highlight.write_background": "#6c828766",
"terminal.background": "#fdf6e3ff",
"terminal.foreground": "#002a35ff",
"terminal.bright_foreground": "#002a35ff",
"terminal.dim_foreground": "#fdf6e3ff",
"terminal.ansi.black": "#fdf6e3ff",
"terminal.ansi.bright_black": "#7b8e91ff",
"terminal.ansi.dim_black": "#002a35ff",
"terminal.ansi.red": "#dc3330ff",
"terminal.ansi.bright_red": "#faa091ff",
"terminal.ansi.dim_red": "#7d181cff",
"terminal.ansi.green": "#849903ff",
"terminal.ansi.bright_green": "#c6cb8bff",
"terminal.ansi.dim_green": "#434a10ff",
"terminal.ansi.yellow": "#b58903ff",
"terminal.ansi.bright_yellow": "#e0c189ff",
"terminal.ansi.dim_yellow": "#5d430fff",
"terminal.ansi.blue": "#288bd1ff",
"terminal.ansi.bright_blue": "#a5c3e9ff",
"terminal.ansi.dim_blue": "#214365ff",
"terminal.ansi.magenta": "#d33781ff",
"terminal.ansi.bright_magenta": "#f0a2beff",
"terminal.ansi.dim_magenta": "#6f1f3fff",
"terminal.ansi.cyan": "#2ba198ff",
"terminal.ansi.bright_cyan": "#9fd0cbff",
"terminal.ansi.dim_cyan": "#204e4aff",
"terminal.ansi.white": "#002a35ff",
"terminal.ansi.bright_white": "#002a35ff",
"terminal.ansi.dim_white": "#5c7279ff",
"link_text.hover": "#288bd1ff",
"conflict": "#b58903ff",
"conflict.background": "#f5e6d0ff",
"conflict.border": "#ebd3aaff",
"created": "#849903ff",
"created.background": "#e9ead0ff",
"created.border": "#d6d9abff",
"deleted": "#dc3330ff",
"deleted.background": "#ffd9d2ff",
"deleted.border": "#ffbbafff",
"error": "#dc3330ff",
"error.background": "#ffd9d2ff",
"error.border": "#ffbbafff",
"hidden": "#6a7f86ff",
"hidden.background": "#cfd0c4ff",
"hidden.border": "#b6bcb5ff",
"hint": "#5789a3ff",
"hint.background": "#dbe6f6ff",
"hint.border": "#bfd3efff",
"ignored": "#6a7f86ff",
"ignored.background": "#cfd0c4ff",
"ignored.border": "#9faaa8ff",
"info": "#288bd1ff",
"info.background": "#dbe6f6ff",
"info.border": "#bfd3efff",
"modified": "#b58903ff",
"modified.background": "#f5e6d0ff",
"modified.border": "#ebd3aaff",
"predictive": "#679aafff",
"predictive.background": "#e9ead0ff",
"predictive.border": "#d6d9abff",
"renamed": "#288bd1ff",
"renamed.background": "#dbe6f6ff",
"renamed.border": "#bfd3efff",
"success": "#849903ff",
"success.background": "#e9ead0ff",
"success.border": "#d6d9abff",
"unreachable": "#34555eff",
"unreachable.background": "#cfd0c4ff",
"unreachable.border": "#9faaa8ff",
"warning": "#b58903ff",
"warning.background": "#f5e6d0ff",
"warning.border": "#ebd3aaff",
"players": [
{
"cursor": "#288bd1ff",
"background": "#288bd1ff",
"selection": "#288bd13d"
},
{
"cursor": "#d33781ff",
"background": "#d33781ff",
"selection": "#d337813d"
},
{
"cursor": "#cb4b16ff",
"background": "#cb4b16ff",
"selection": "#cb4b173d"
},
{
"cursor": "#6c71c3ff",
"background": "#6c71c3ff",
"selection": "#6c71c33d"
},
{
"cursor": "#2ba198ff",
"background": "#2ba198ff",
"selection": "#2ba1983d"
},
{
"cursor": "#dc3330ff",
"background": "#dc3330ff",
"selection": "#dc33303d"
},
{
"cursor": "#b58903ff",
"background": "#b58903ff",
"selection": "#b589033d"
},
{
"cursor": "#849903ff",
"background": "#849903ff",
"selection": "#8499033d"
}
],
"syntax": {
"attribute": {
"color": "#288bd1ff",
"font_style": null,
"font_weight": null
},
"boolean": {
"color": "#849903ff",
"font_style": null,
"font_weight": null
},
"comment": {
"color": "#30525bff",
"font_style": null,
"font_weight": null
},
"comment.doc": {
"color": "#30525bff",
"font_style": null,
"font_weight": null
},
"constant": {
"color": "#849903ff",
"font_style": null,
"font_weight": null
},
"constructor": {
"color": "#288bd1ff",
"font_style": null,
"font_weight": null
},
"embedded": {
"color": "#002a35ff",
"font_style": null,
"font_weight": null
},
"emphasis": {
"color": "#288bd1ff",
"font_style": null,
"font_weight": null
},
"emphasis.strong": {
"color": "#288bd1ff",
"font_style": null,
"font_weight": 700
},
"enum": {
"color": "#cb4b16ff",
"font_style": null,
"font_weight": null
},
"function": {
"color": "#b58903ff",
"font_style": null,
"font_weight": null
},
"hint": {
"color": "#5789a3ff",
"font_style": null,
"font_weight": 700
},
"keyword": {
"color": "#288bd1ff",
"font_style": null,
"font_weight": null
},
"label": {
"color": "#288bd1ff",
"font_style": null,
"font_weight": null
},
"link_text": {
"color": "#cb4b16ff",
"font_style": "italic",
"font_weight": null
},
"link_uri": {
"color": "#849903ff",
"font_style": null,
"font_weight": null
},
"number": {
"color": "#849903ff",
"font_style": null,
"font_weight": null
},
"operator": {
"color": "#cb4b16ff",
"font_style": null,
"font_weight": null
},
"predictive": {
"color": "#679aafff",
"font_style": "italic",
"font_weight": null
},
"preproc": {
"color": "#002a35ff",
"font_style": null,
"font_weight": null
},
"primary": {
"color": "#002a35ff",
"font_style": null,
"font_weight": null
},
"property": {
"color": "#288bd1ff",
"font_style": null,
"font_weight": null
},
"punctuation": {
"color": "#04333eff",
"font_style": null,
"font_weight": null
},
"punctuation.bracket": {
"color": "#04333eff",
"font_style": null,
"font_weight": null
},
"punctuation.delimiter": {
"color": "#04333eff",
"font_style": null,
"font_weight": null
},
"punctuation.list_marker": {
"color": "#04333eff",
"font_style": null,
"font_weight": null
},
"punctuation.special": {
"color": "#04333eff",
"font_style": null,
"font_weight": null
},
"string": {
"color": "#cb4b16ff",
"font_style": null,
"font_weight": null
},
"string.escape": {
"color": "#30525bff",
"font_style": null,
"font_weight": null
},
"string.regex": {
"color": "#cb4b16ff",
"font_style": null,
"font_weight": null
},
"string.special": {
"color": "#cb4b16ff",
"font_style": null,
"font_weight": null
},
"string.special.symbol": {
"color": "#cb4b16ff",
"font_style": null,
"font_weight": null
},
"tag": {
"color": "#288bd1ff",
"font_style": null,
"font_weight": null
},
"text.literal": {
"color": "#cb4b16ff",
"font_style": null,
"font_weight": null
},
"title": {
"color": "#002a35ff",
"font_style": null,
"font_weight": 700
},
"type": {
"color": "#2ba198ff",
"font_style": null,
"font_weight": null
},
"variable": {
"color": "#002a35ff",
"font_style": null,
"font_weight": null
},
"variant": {
"color": "#288bd1ff",
"font_style": null,
"font_weight": null
}
}
}
}
]
}

View File

@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2019 Zoe FiriH
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,378 +0,0 @@
{
"$schema": "https://zed.dev/schema/themes/v0.2.0.json",
"name": "Summercamp",
"author": "Zed Industries",
"themes": [
{
"name": "Summercamp",
"appearance": "dark",
"style": {
"border": "#302c21ff",
"border.variant": "#29251bff",
"border.focused": "#193760ff",
"border.selected": "#193760ff",
"border.transparent": "#00000000",
"border.disabled": "#2e2a1fff",
"elevated_surface.background": "#231f16ff",
"surface.background": "#231f16ff",
"background": "#2a261cff",
"element.background": "#231f16ff",
"element.hover": "#29251bff",
"element.active": "#2f2b20ff",
"element.selected": "#2f2b20ff",
"element.disabled": "#231f16ff",
"drop_target.background": "#736e5580",
"ghost_element.background": "#00000000",
"ghost_element.hover": "#29251bff",
"ghost_element.active": "#2f2b20ff",
"ghost_element.selected": "#2f2b20ff",
"ghost_element.disabled": "#231f16ff",
"text": "#f8f5deff",
"text.muted": "#736e55ff",
"text.placeholder": "#4c4735ff",
"text.disabled": "#4c4735ff",
"text.accent": "#499befff",
"icon": "#f8f5deff",
"icon.muted": "#736e55ff",
"icon.disabled": "#4c4735ff",
"icon.placeholder": "#736e55ff",
"icon.accent": "#499befff",
"status_bar.background": "#2a261cff",
"title_bar.background": "#2a261cff",
"title_bar.inactive_background": "#231f16ff",
"toolbar.background": "#1b1810ff",
"tab_bar.background": "#231f16ff",
"tab.inactive_background": "#231f16ff",
"tab.active_background": "#1b1810ff",
"search.match_background": "#499bef66",
"panel.background": "#231f16ff",
"panel.focused_border": "#499befff",
"pane.focused_border": null,
"scrollbar.thumb.background": "#f8f5de4c",
"scrollbar.thumb.hover_background": "#29251bff",
"scrollbar.thumb.border": "#29251bff",
"scrollbar.track.background": "#00000000",
"scrollbar.track.border": "#221e15ff",
"editor.foreground": "#f8f5deff",
"editor.background": "#1b1810ff",
"editor.gutter.background": "#1b1810ff",
"editor.subheader.background": "#231f16ff",
"editor.active_line.background": "#231f16bf",
"editor.highlighted_line.background": "#231f16ff",
"editor.line_number": "#676559",
"editor.active_line_number": "#e3e2de",
"editor.hover_line_number": "#b8b6ad",
"editor.invisible": "#494433ff",
"editor.wrap_guide": "#f8f5de0d",
"editor.active_wrap_guide": "#f8f5de1a",
"editor.document_highlight.read_background": "#499bef1a",
"editor.document_highlight.write_background": "#49443366",
"terminal.background": "#1b1810ff",
"terminal.foreground": "#f8f5deff",
"terminal.bright_foreground": "#f8f5deff",
"terminal.dim_foreground": "#1b1810ff",
"terminal.ansi.black": "#1b1810ff",
"terminal.ansi.bright_black": "#3a3527ff",
"terminal.ansi.dim_black": "#f8f5deff",
"terminal.ansi.red": "#e35041ff",
"terminal.ansi.bright_red": "#7f2724ff",
"terminal.ansi.dim_red": "#faaa9bff",
"terminal.ansi.green": "#5dea5aff",
"terminal.ansi.bright_green": "#28842cff",
"terminal.ansi.dim_green": "#b9f7aeff",
"terminal.ansi.yellow": "#f1fe28ff",
"terminal.ansi.bright_yellow": "#8c9a0fff",
"terminal.ansi.dim_yellow": "#ffffa2ff",
"terminal.ansi.blue": "#499befff",
"terminal.ansi.bright_blue": "#234b7fff",
"terminal.ansi.dim_blue": "#b1ccf8ff",
"terminal.ansi.magenta": "#f59be6ff",
"terminal.ansi.bright_magenta": "#88487eff",
"terminal.ansi.dim_magenta": "#fccef3ff",
"terminal.ansi.cyan": "#5aeabbff",
"terminal.ansi.bright_cyan": "#288461ff",
"terminal.ansi.dim_cyan": "#b7f6ddff",
"terminal.ansi.white": "#f8f5deff",
"terminal.ansi.bright_white": "#f8f5deff",
"terminal.ansi.dim_white": "#57533fff",
"link_text.hover": "#499befff",
"conflict": "#f1fe28ff",
"conflict.background": "#546205ff",
"conflict.border": "#717f0aff",
"created": "#5dea5aff",
"created.background": "#094d12ff",
"created.border": "#1a6a20ff",
"deleted": "#e35041ff",
"deleted.background": "#490f12ff",
"deleted.border": "#651c1cff",
"error": "#e35041ff",
"error.background": "#490f12ff",
"error.border": "#651c1cff",
"hidden": "#4c4735ff",
"hidden.background": "#2a261cff",
"hidden.border": "#2e2a1fff",
"hint": "#246e61ff",
"hint.background": "#0e2242ff",
"hint.border": "#193760ff",
"ignored": "#4c4735ff",
"ignored.background": "#2a261cff",
"ignored.border": "#302c21ff",
"info": "#499befff",
"info.background": "#0e2242ff",
"info.border": "#193760ff",
"modified": "#f1fe28ff",
"modified.background": "#546205ff",
"modified.border": "#717f0aff",
"predictive": "#78434aff",
"predictive.background": "#094d12ff",
"predictive.border": "#1a6a20ff",
"renamed": "#499befff",
"renamed.background": "#0e2242ff",
"renamed.border": "#193760ff",
"success": "#5dea5aff",
"success.background": "#094d12ff",
"success.border": "#1a6a20ff",
"unreachable": "#736e55ff",
"unreachable.background": "#2a261cff",
"unreachable.border": "#302c21ff",
"warning": "#f1fe28ff",
"warning.background": "#546205ff",
"warning.border": "#717f0aff",
"players": [
{
"cursor": "#499befff",
"background": "#499befff",
"selection": "#499bef3d"
},
{
"cursor": "#f59be6ff",
"background": "#f59be6ff",
"selection": "#f59be63d"
},
{
"cursor": "#faa11cff",
"background": "#faa11cff",
"selection": "#faa11c3d"
},
{
"cursor": "#fe8080ff",
"background": "#fe8080ff",
"selection": "#fe80803d"
},
{
"cursor": "#5aeabbff",
"background": "#5aeabbff",
"selection": "#5aeabb3d"
},
{
"cursor": "#e35041ff",
"background": "#e35041ff",
"selection": "#e350413d"
},
{
"cursor": "#f1fe28ff",
"background": "#f1fe28ff",
"selection": "#f1fe283d"
},
{
"cursor": "#5dea5aff",
"background": "#5dea5aff",
"selection": "#5dea5a3d"
}
],
"syntax": {
"attribute": {
"color": "#499befff",
"font_style": null,
"font_weight": null
},
"boolean": {
"color": "#5dea5aff",
"font_style": null,
"font_weight": null
},
"comment": {
"color": "#777159ff",
"font_style": null,
"font_weight": null
},
"comment.doc": {
"color": "#777159ff",
"font_style": null,
"font_weight": null
},
"constant": {
"color": "#5dea5aff",
"font_style": null,
"font_weight": null
},
"constructor": {
"color": "#499befff",
"font_style": null,
"font_weight": null
},
"embedded": {
"color": "#f8f5deff",
"font_style": null,
"font_weight": null
},
"emphasis": {
"color": "#499befff",
"font_style": null,
"font_weight": null
},
"emphasis.strong": {
"color": "#499befff",
"font_style": null,
"font_weight": 700
},
"enum": {
"color": "#faa11cff",
"font_style": null,
"font_weight": null
},
"function": {
"color": "#f1fe28ff",
"font_style": null,
"font_weight": null
},
"hint": {
"color": "#246e61ff",
"font_style": null,
"font_weight": 700
},
"keyword": {
"color": "#499befff",
"font_style": null,
"font_weight": null
},
"label": {
"color": "#499befff",
"font_style": null,
"font_weight": null
},
"link_text": {
"color": "#faa11cff",
"font_style": "italic",
"font_weight": null
},
"link_uri": {
"color": "#5dea5aff",
"font_style": null,
"font_weight": null
},
"number": {
"color": "#5dea5aff",
"font_style": null,
"font_weight": null
},
"operator": {
"color": "#faa11cff",
"font_style": null,
"font_weight": null
},
"predictive": {
"color": "#78434aff",
"font_style": "italic",
"font_weight": null
},
"preproc": {
"color": "#f8f5deff",
"font_style": null,
"font_weight": null
},
"primary": {
"color": "#f8f5deff",
"font_style": null,
"font_weight": null
},
"property": {
"color": "#499befff",
"font_style": null,
"font_weight": null
},
"punctuation": {
"color": "#bfbb9bff",
"font_style": null,
"font_weight": null
},
"punctuation.bracket": {
"color": "#bfbb9bff",
"font_style": null,
"font_weight": null
},
"punctuation.delimiter": {
"color": "#bfbb9bff",
"font_style": null,
"font_weight": null
},
"punctuation.list_marker": {
"color": "#bfbb9bff",
"font_style": null,
"font_weight": null
},
"punctuation.special": {
"color": "#bfbb9bff",
"font_style": null,
"font_weight": null
},
"string": {
"color": "#faa11cff",
"font_style": null,
"font_weight": null
},
"string.escape": {
"color": "#777159ff",
"font_style": null,
"font_weight": null
},
"string.regex": {
"color": "#faa11cff",
"font_style": null,
"font_weight": null
},
"string.special": {
"color": "#faa11cff",
"font_style": null,
"font_weight": null
},
"string.special.symbol": {
"color": "#faa11cff",
"font_style": null,
"font_weight": null
},
"tag": {
"color": "#499befff",
"font_style": null,
"font_weight": null
},
"text.literal": {
"color": "#faa11cff",
"font_style": null,
"font_weight": null
},
"title": {
"color": "#f8f5deff",
"font_style": null,
"font_weight": 700
},
"type": {
"color": "#5aeabbff",
"font_style": null,
"font_weight": null
},
"variable": {
"color": "#f8f5deff",
"font_style": null,
"font_weight": null
},
"variant": {
"color": "#499befff",
"font_style": null,
"font_weight": null
}
}
}
}
]
}

View File

@@ -30,6 +30,8 @@ pub enum Model {
#[default]
#[serde(rename = "claude-3-5-sonnet", alias = "claude-3-5-sonnet-latest")]
Claude3_5Sonnet,
#[serde(rename = "claude-3-7-sonnet", alias = "claude-3-7-sonnet-latest")]
Claude3_7Sonnet,
#[serde(rename = "claude-3-5-haiku", alias = "claude-3-5-haiku-latest")]
Claude3_5Haiku,
#[serde(rename = "claude-3-opus", alias = "claude-3-opus-latest")]
@@ -59,6 +61,8 @@ impl Model {
pub fn from_id(id: &str) -> Result<Self> {
if id.starts_with("claude-3-5-sonnet") {
Ok(Self::Claude3_5Sonnet)
} else if id.starts_with("claude-3-7-sonnet") {
Ok(Self::Claude3_7Sonnet)
} else if id.starts_with("claude-3-5-haiku") {
Ok(Self::Claude3_5Haiku)
} else if id.starts_with("claude-3-opus") {
@@ -75,6 +79,7 @@ impl Model {
pub fn id(&self) -> &str {
match self {
Model::Claude3_5Sonnet => "claude-3-5-sonnet-latest",
Model::Claude3_7Sonnet => "claude-3-7-sonnet-latest",
Model::Claude3_5Haiku => "claude-3-5-haiku-latest",
Model::Claude3Opus => "claude-3-opus-latest",
Model::Claude3Sonnet => "claude-3-sonnet-20240229",
@@ -85,6 +90,7 @@ impl Model {
pub fn display_name(&self) -> &str {
match self {
Self::Claude3_7Sonnet => "Claude 3.7 Sonnet",
Self::Claude3_5Sonnet => "Claude 3.5 Sonnet",
Self::Claude3_5Haiku => "Claude 3.5 Haiku",
Self::Claude3Opus => "Claude 3 Opus",
@@ -98,13 +104,14 @@ impl Model {
pub fn cache_configuration(&self) -> Option<AnthropicModelCacheConfiguration> {
match self {
Self::Claude3_5Sonnet | Self::Claude3_5Haiku | Self::Claude3Haiku => {
Some(AnthropicModelCacheConfiguration {
min_total_token: 2_048,
should_speculate: true,
max_cache_anchors: 4,
})
}
Self::Claude3_5Sonnet
| Self::Claude3_5Haiku
| Self::Claude3_7Sonnet
| Self::Claude3Haiku => Some(AnthropicModelCacheConfiguration {
min_total_token: 2_048,
should_speculate: true,
max_cache_anchors: 4,
}),
Self::Custom {
cache_configuration,
..
@@ -117,6 +124,7 @@ impl Model {
match self {
Self::Claude3_5Sonnet
| Self::Claude3_5Haiku
| Self::Claude3_7Sonnet
| Self::Claude3Opus
| Self::Claude3Sonnet
| Self::Claude3Haiku => 200_000,
@@ -127,7 +135,7 @@ impl Model {
pub fn max_output_tokens(&self) -> u32 {
match self {
Self::Claude3Opus | Self::Claude3Sonnet | Self::Claude3Haiku => 4_096,
Self::Claude3_5Sonnet | Self::Claude3_5Haiku => 8_192,
Self::Claude3_5Sonnet | Self::Claude3_7Sonnet | Self::Claude3_5Haiku => 8_192,
Self::Custom {
max_output_tokens, ..
} => max_output_tokens.unwrap_or(4_096),
@@ -137,6 +145,7 @@ impl Model {
pub fn default_temperature(&self) -> f32 {
match self {
Self::Claude3_5Sonnet
| Self::Claude3_7Sonnet
| Self::Claude3_5Haiku
| Self::Claude3Opus
| Self::Claude3Sonnet

View File

@@ -43,7 +43,6 @@ indoc.workspace = true
language.workspace = true
language_model.workspace = true
language_model_selector.workspace = true
language_models.workspace = true
log.workspace = true
lsp.workspace = true
menu.workspace = true
@@ -59,7 +58,6 @@ search.workspace = true
semantic_index.workspace = true
serde.workspace = true
settings.workspace = true
similar.workspace = true
smol.workspace = true
streaming_diff.workspace = true
telemetry.workspace = true

View File

@@ -33,7 +33,7 @@ actions!(
[
InsertActivePrompt,
DeployHistory,
NewContext,
NewChat,
CycleNextInlineAssist,
CyclePreviousInlineAssist
]

View File

@@ -1,13 +1,13 @@
use crate::assistant_configuration::{ConfigurationView, ConfigurationViewEvent};
use crate::{
terminal_inline_assistant::TerminalInlineAssistant, DeployHistory, InlineAssistant, NewContext,
terminal_inline_assistant::TerminalInlineAssistant, DeployHistory, InlineAssistant, NewChat,
};
use anyhow::{anyhow, Result};
use assistant_context_editor::{
make_lsp_adapter_delegate, AssistantContext, AssistantPanelDelegate, ContextEditor,
ContextEditorToolbarItem, ContextEditorToolbarItemEvent, ContextHistory, ContextId,
ContextStore, ContextStoreEvent, InsertDraggedFiles, SlashCommandCompletionProvider,
ToggleModelSelector, DEFAULT_TAB_TITLE,
DEFAULT_TAB_TITLE,
};
use assistant_settings::{AssistantDockPosition, AssistantSettings};
use assistant_slash_command::SlashCommandWorkingSet;
@@ -20,8 +20,9 @@ use gpui::{
Subscription, Task, UpdateGlobal, WeakEntity,
};
use language::LanguageRegistry;
use language_model::{LanguageModelProviderId, LanguageModelRegistry, ZED_CLOUD_PROVIDER_ID};
use language_model_selector::LanguageModelSelector;
use language_model::{
AuthenticateError, LanguageModelProviderId, LanguageModelRegistry, ZED_CLOUD_PROVIDER_ID,
};
use project::Project;
use prompt_library::{open_prompt_library, PromptBuilder, PromptLibrary};
use search::{buffer_search::DivRegistrar, BufferSearchBar};
@@ -29,7 +30,7 @@ use settings::{update_settings_file, Settings};
use smol::stream::StreamExt;
use std::{ops::ControlFlow, path::PathBuf, sync::Arc};
use terminal_view::{terminal_panel::TerminalPanel, TerminalView};
use ui::{prelude::*, ContextMenu, PopoverMenu, PopoverMenuHandle, Tooltip};
use ui::{prelude::*, ContextMenu, PopoverMenu, Tooltip};
use util::{maybe, ResultExt};
use workspace::DraggedTab;
use workspace::{
@@ -77,7 +78,6 @@ pub struct AssistantPanel {
languages: Arc<LanguageRegistry>,
fs: Arc<dyn Fs>,
subscriptions: Vec<Subscription>,
model_selector_menu_handle: PopoverMenuHandle<LanguageModelSelector>,
model_summary_editor: Entity<Editor>,
authenticate_provider_task: Option<(LanguageModelProviderId, Task<()>)>,
configuration_subscription: Option<Subscription>,
@@ -119,17 +119,9 @@ impl AssistantPanel {
window: &mut Window,
cx: &mut Context<Self>,
) -> Self {
let model_selector_menu_handle = PopoverMenuHandle::default();
let model_summary_editor = cx.new(|cx| Editor::single_line(window, cx));
let context_editor_toolbar = cx.new(|cx| {
ContextEditorToolbarItem::new(
workspace,
model_selector_menu_handle.clone(),
model_summary_editor.clone(),
window,
cx,
)
});
let context_editor_toolbar =
cx.new(|_| ContextEditorToolbarItem::new(model_summary_editor.clone()));
let pane = cx.new(|cx| {
let mut pane = Pane::new(
@@ -137,7 +129,7 @@ impl AssistantPanel {
workspace.project().clone(),
Default::default(),
None,
NewContext.boxed_clone(),
NewChat.boxed_clone(),
window,
cx,
);
@@ -236,12 +228,12 @@ impl AssistantPanel {
IconButton::new("new-chat", IconName::Plus)
.icon_size(IconSize::Small)
.on_click(cx.listener(|_, _, window, cx| {
window.dispatch_action(NewContext.boxed_clone(), cx)
window.dispatch_action(NewChat.boxed_clone(), cx)
}))
.tooltip(move |window, cx| {
Tooltip::for_action_in(
"New Chat",
&NewContext,
&NewChat,
&focus_handle,
window,
cx,
@@ -264,7 +256,7 @@ impl AssistantPanel {
let focus_handle = _pane.focus_handle(cx);
Some(ContextMenu::build(window, cx, move |menu, _, _| {
menu.context(focus_handle.clone())
.action("New Chat", Box::new(NewContext))
.action("New Chat", Box::new(NewChat))
.action("History", Box::new(DeployHistory))
.action("Prompt Library", Box::new(DeployPromptLibrary))
.action("Configure", Box::new(ShowConfiguration))
@@ -279,7 +271,17 @@ impl AssistantPanel {
});
pane.toolbar().update(cx, |toolbar, cx| {
toolbar.add_item(context_editor_toolbar.clone(), window, cx);
toolbar.add_item(cx.new(|cx| BufferSearchBar::new(window, cx)), window, cx)
toolbar.add_item(
cx.new(|cx| {
BufferSearchBar::new(
Some(workspace.project().read(cx).languages().clone()),
window,
cx,
)
}),
window,
cx,
)
});
pane
});
@@ -321,7 +323,6 @@ impl AssistantPanel {
languages: workspace.app_state().languages.clone(),
fs: workspace.app_state().fs.clone(),
subscriptions,
model_selector_menu_handle,
model_summary_editor,
authenticate_provider_task: None,
configuration_subscription: None,
@@ -759,7 +760,7 @@ impl AssistantPanel {
pub fn create_new_context(
workspace: &mut Workspace,
_: &NewContext,
_: &NewChat,
window: &mut Window,
cx: &mut Context<Workspace>,
) {
@@ -977,7 +978,7 @@ impl AssistantPanel {
.active_provider()
.map_or(true, |p| p.id() != provider.id())
{
if let Some(model) = provider.provided_models(cx).first().cloned() {
if let Some(model) = provider.default_model(cx) {
update_settings_file::<AssistantSettings>(
this.fs.clone(),
cx,
@@ -1044,15 +1045,6 @@ impl AssistantPanel {
.detach_and_log_err(cx);
}
fn toggle_model_selector(
&mut self,
_: &ToggleModelSelector,
window: &mut Window,
cx: &mut Context<Self>,
) {
self.model_selector_menu_handle.toggle(window, cx);
}
pub(crate) fn active_context_editor(&self, cx: &App) -> Option<Entity<ContextEditor>> {
self.pane
.read(cx)
@@ -1166,7 +1158,10 @@ impl AssistantPanel {
.map_or(false, |provider| provider.is_authenticated(cx))
}
fn authenticate(&mut self, cx: &mut Context<Self>) -> Option<Task<Result<()>>> {
fn authenticate(
&mut self,
cx: &mut Context<Self>,
) -> Option<Task<Result<(), AuthenticateError>>> {
LanguageModelRegistry::read_global(cx)
.active_provider()
.map_or(None, |provider| Some(provider.authenticate(cx)))
@@ -1211,7 +1206,7 @@ impl Render for AssistantPanel {
v_flex()
.key_context("AssistantPanel")
.size_full()
.on_action(cx.listener(|this, _: &NewContext, window, cx| {
.on_action(cx.listener(|this, _: &NewChat, window, cx| {
this.new_context(window, cx);
}))
.on_action(cx.listener(|this, _: &ShowConfiguration, window, cx| {
@@ -1219,7 +1214,6 @@ impl Render for AssistantPanel {
}))
.on_action(cx.listener(AssistantPanel::deploy_history))
.on_action(cx.listener(AssistantPanel::deploy_prompt_library))
.on_action(cx.listener(AssistantPanel::toggle_model_selector))
.child(registrar.size_full().child(self.pane.clone()))
.into_any_element()
}

View File

@@ -30,13 +30,12 @@ use gpui::{
EventEmitter, FocusHandle, Focusable, FontWeight, Global, HighlightStyle, Subscription, Task,
TextStyle, UpdateGlobal, WeakEntity, Window,
};
use language::{Buffer, IndentKind, Point, Selection, TransactionId};
use language::{line_diff, Buffer, IndentKind, Point, Selection, TransactionId};
use language_model::{
LanguageModel, LanguageModelRegistry, LanguageModelRequest, LanguageModelRequestMessage,
LanguageModelTextStream, Role,
report_assistant_event, LanguageModel, LanguageModelRegistry, LanguageModelRequest,
LanguageModelRequestMessage, LanguageModelTextStream, Role,
};
use language_model_selector::{LanguageModelSelector, LanguageModelSelectorPopoverMenu};
use language_models::report_assistant_event;
use language_model_selector::{InlineLanguageModelSelector, LanguageModelSelector};
use multi_buffer::MultiBufferRow;
use parking_lot::Mutex;
use project::{CodeAction, ProjectTransaction};
@@ -1590,28 +1589,10 @@ impl Render for PromptEditor {
.w(gutter_dimensions.full_width() + (gutter_dimensions.margin / 2.0))
.justify_center()
.gap_2()
.child(LanguageModelSelectorPopoverMenu::new(
self.language_model_selector.clone(),
IconButton::new("context", IconName::SettingsAlt)
.shape(IconButtonShape::Square)
.icon_size(IconSize::Small)
.icon_color(Color::Muted),
move |window, cx| {
Tooltip::with_meta(
format!(
"Using {}",
LanguageModelRegistry::read_global(cx)
.active_model()
.map(|model| model.name().0)
.unwrap_or_else(|| "No model selected".into()),
),
None,
"Change Model",
window,
cx,
)
},
))
.child(
InlineLanguageModelSelector::new(self.language_model_selector.clone())
.render(window, cx),
)
.map(|el| {
let CodegenStatus::Error(error) = self.codegen.read(cx).status(cx) else {
return el;
@@ -1704,7 +1685,7 @@ impl PromptEditor {
// always show the cursor (even when it isn't focused) because
// typing in one will make what you typed appear in all of them.
editor.set_show_cursor_when_unfocused(true, cx);
editor.set_placeholder_text(Self::placeholder_text(codegen.read(cx), window), cx);
editor.set_placeholder_text(Self::placeholder_text(codegen.read(cx), window, cx), cx);
editor
});
@@ -1783,7 +1764,10 @@ impl PromptEditor {
self.editor = cx.new(|cx| {
let mut editor = Editor::auto_height(Self::MAX_LINES as usize, window, cx);
editor.set_soft_wrap_mode(language::language_settings::SoftWrap::EditorWidth, cx);
editor.set_placeholder_text(Self::placeholder_text(self.codegen.read(cx), window), cx);
editor.set_placeholder_text(
Self::placeholder_text(self.codegen.read(cx), window, cx),
cx,
);
editor.set_placeholder_text("Add a prompt…", cx);
editor.set_text(prompt, window, cx);
if focus {
@@ -1794,8 +1778,8 @@ impl PromptEditor {
self.subscribe_to_editor(window, cx);
}
fn placeholder_text(codegen: &Codegen, window: &Window) -> String {
let context_keybinding = text_for_action(&zed_actions::assistant::ToggleFocus, window)
fn placeholder_text(codegen: &Codegen, window: &Window, cx: &App) -> String {
let context_keybinding = text_for_action(&zed_actions::assistant::ToggleFocus, window, cx)
.map(|keybinding| format!("{keybinding} for context"))
.unwrap_or_default();
@@ -2084,12 +2068,13 @@ impl PromptEditor {
.tooltip({
let focus_handle = self.editor.focus_handle(cx);
move |window, cx| {
cx.new(|_| {
cx.new(|cx| {
let mut tooltip = Tooltip::new("Previous Alternative").key_binding(
KeyBinding::for_action_in(
&CyclePreviousInlineAssist,
&focus_handle,
window,
cx,
),
);
if !disabled && current_index != 0 {
@@ -2126,12 +2111,13 @@ impl PromptEditor {
.tooltip({
let focus_handle = self.editor.focus_handle(cx);
move |window, cx| {
cx.new(|_| {
cx.new(|cx| {
let mut tooltip = Tooltip::new("Next Alternative").key_binding(
KeyBinding::for_action_in(
&CycleNextInlineAssist,
&focus_handle,
window,
cx,
),
);
if !disabled && current_index != total_models - 1 {
@@ -2221,7 +2207,7 @@ impl PromptEditor {
},
font_family: settings.buffer_font.family.clone(),
font_fallbacks: settings.buffer_font.fallbacks.clone(),
font_size: settings.buffer_font_size.into(),
font_size: settings.buffer_font_size(cx).into(),
font_weight: settings.buffer_font.weight,
line_height: relative(settings.buffer_line_height.value()),
..Default::default()
@@ -3010,7 +2996,7 @@ impl CodegenAlternative {
let executor = cx.background_executor().clone();
let message_id = message_id.clone();
let line_based_stream_diff: Task<anyhow::Result<()>> =
cx.background_executor().spawn(async move {
cx.background_spawn(async move {
let mut response_latency = None;
let request_start = Instant::now();
let diff = async {
@@ -3324,8 +3310,7 @@ impl CodegenAlternative {
cx.spawn(|codegen, mut cx| async move {
let (deleted_row_ranges, inserted_row_ranges) = cx
.background_executor()
.spawn(async move {
.background_spawn(async move {
let old_text = old_snapshot
.text_for_range(
Point::new(old_range.start.row, 0)
@@ -3345,52 +3330,29 @@ impl CodegenAlternative {
)
.collect::<String>();
let mut old_row = old_range.start.row;
let mut new_row = new_range.start.row;
let batch_diff =
similar::TextDiff::from_lines(old_text.as_str(), new_text.as_str());
let old_start_row = old_range.start.row;
let new_start_row = new_range.start.row;
let mut deleted_row_ranges: Vec<(Anchor, RangeInclusive<u32>)> = Vec::new();
let mut inserted_row_ranges = Vec::new();
for change in batch_diff.iter_all_changes() {
let line_count = change.value().lines().count() as u32;
match change.tag() {
similar::ChangeTag::Equal => {
old_row += line_count;
new_row += line_count;
}
similar::ChangeTag::Delete => {
let old_end_row = old_row + line_count - 1;
let new_row = new_snapshot.anchor_before(Point::new(new_row, 0));
if let Some((_, last_deleted_row_range)) =
deleted_row_ranges.last_mut()
{
if *last_deleted_row_range.end() + 1 == old_row {
*last_deleted_row_range =
*last_deleted_row_range.start()..=old_end_row;
} else {
deleted_row_ranges.push((new_row, old_row..=old_end_row));
}
} else {
deleted_row_ranges.push((new_row, old_row..=old_end_row));
}
old_row += line_count;
}
similar::ChangeTag::Insert => {
let new_end_row = new_row + line_count - 1;
let start = new_snapshot.anchor_before(Point::new(new_row, 0));
let end = new_snapshot.anchor_before(Point::new(
new_end_row,
new_snapshot.line_len(MultiBufferRow(new_end_row)),
));
inserted_row_ranges.push(start..end);
new_row += line_count;
}
for (old_rows, new_rows) in line_diff(&old_text, &new_text) {
let old_rows = old_start_row + old_rows.start..old_start_row + old_rows.end;
let new_rows = new_start_row + new_rows.start..new_start_row + new_rows.end;
if !old_rows.is_empty() {
deleted_row_ranges.push((
new_snapshot.anchor_before(Point::new(new_rows.start, 0)),
old_rows.start..=old_rows.end - 1,
));
}
if !new_rows.is_empty() {
let start = new_snapshot.anchor_before(Point::new(new_rows.start, 0));
let new_end_row = new_rows.end - 1;
let end = new_snapshot.anchor_before(Point::new(
new_end_row,
new_snapshot.line_len(MultiBufferRow(new_end_row)),
));
inserted_row_ranges.push(start..end);
}
}
(deleted_row_ranges, inserted_row_ranges)
})
.await;

View File

@@ -16,10 +16,10 @@ use gpui::{
};
use language::Buffer;
use language_model::{
LanguageModelRegistry, LanguageModelRequest, LanguageModelRequestMessage, Role,
report_assistant_event, LanguageModelRegistry, LanguageModelRequest,
LanguageModelRequestMessage, Role,
};
use language_model_selector::{LanguageModelSelector, LanguageModelSelectorPopoverMenu};
use language_models::report_assistant_event;
use language_model_selector::{InlineLanguageModelSelector, LanguageModelSelector};
use prompt_library::PromptBuilder;
use settings::{update_settings_file, Settings};
use std::{
@@ -506,7 +506,7 @@ struct PromptEditor {
impl EventEmitter<PromptEditorEvent> for PromptEditor {}
impl Render for PromptEditor {
fn render(&mut self, _: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
let status = &self.codegen.read(cx).status;
let buttons = match status {
CodegenStatus::Idle => {
@@ -641,28 +641,10 @@ impl Render for PromptEditor {
.w_12()
.justify_center()
.gap_2()
.child(LanguageModelSelectorPopoverMenu::new(
self.language_model_selector.clone(),
IconButton::new("context", IconName::SettingsAlt)
.shape(IconButtonShape::Square)
.icon_size(IconSize::Small)
.icon_color(Color::Muted),
move |window, cx| {
Tooltip::with_meta(
format!(
"Using {}",
LanguageModelRegistry::read_global(cx)
.active_model()
.map(|model| model.name().0)
.unwrap_or_else(|| "No model selected".into()),
),
None,
"Change Model",
window,
cx,
)
},
))
.child(
InlineLanguageModelSelector::new(self.language_model_selector.clone())
.render(window, cx),
)
.children(
if let CodegenStatus::Error(error) = &self.codegen.read(cx).status {
let error_message = SharedString::from(error.to_string());
@@ -725,7 +707,7 @@ impl PromptEditor {
cx,
);
editor.set_soft_wrap_mode(language::language_settings::SoftWrap::EditorWidth, cx);
editor.set_placeholder_text(Self::placeholder_text(window), cx);
editor.set_placeholder_text(Self::placeholder_text(window, cx), cx);
editor
});
@@ -774,8 +756,8 @@ impl PromptEditor {
this
}
fn placeholder_text(window: &Window) -> String {
let context_keybinding = text_for_action(&zed_actions::assistant::ToggleFocus, window)
fn placeholder_text(window: &Window, cx: &App) -> String {
let context_keybinding = text_for_action(&zed_actions::assistant::ToggleFocus, window, cx)
.map(|keybinding| format!("{keybinding} for context"))
.unwrap_or_default();
@@ -1048,7 +1030,7 @@ impl PromptEditor {
},
font_family: settings.buffer_font.family.clone(),
font_fallbacks: settings.buffer_font.fallbacks.clone(),
font_size: settings.buffer_font_size.into(),
font_size: settings.buffer_font_size(cx).into(),
font_weight: settings.buffer_font.weight,
line_height: relative(settings.buffer_line_height.value()),
..Default::default()
@@ -1072,7 +1054,10 @@ pub enum CodegenEvent {
impl EventEmitter<CodegenEvent> for Codegen {}
#[cfg(not(target_os = "windows"))]
const CLEAR_INPUT: &str = "\x15";
#[cfg(target_os = "windows")]
const CLEAR_INPUT: &str = "\x03";
const CARRIAGE_RETURN: &str = "\x0d";
struct TerminalTransaction {
@@ -1150,7 +1135,7 @@ impl Codegen {
let (mut hunks_tx, mut hunks_rx) = mpsc::channel(1);
let task = cx.background_executor().spawn({
let task = cx.background_spawn({
let message_id = message_id.clone();
let executor = cx.background_executor().clone();
async move {

View File

@@ -46,7 +46,6 @@ itertools.workspace = true
language.workspace = true
language_model.workspace = true
language_model_selector.workspace = true
language_models.workspace = true
log.workspace = true
lsp.workspace = true
markdown.workspace = true
@@ -62,7 +61,6 @@ rope.workspace = true
serde.workspace = true
serde_json.workspace = true
settings.workspace = true
similar.workspace = true
smol.workspace = true
streaming_diff.workspace = true
telemetry_events.workspace = true
@@ -75,9 +73,15 @@ time_format.workspace = true
ui.workspace = true
util.workspace = true
uuid.workspace = true
vim_mode_setting.workspace = true
workspace.workspace = true
zed_actions.workspace = true
[dev-dependencies]
editor = { workspace = true, features = ["test-support"] }
gpui = { workspace = true, "features" = ["test-support"] }
language = { workspace = true, "features" = ["test-support"] }
language_model = { workspace = true, "features" = ["test-support"] }
project = { workspace = true, features = ["test-support"] }
rand.workspace = true
indoc.workspace = true

View File

@@ -8,15 +8,16 @@ use gpui::{
UnderlineStyle, WeakEntity,
};
use language::LanguageRegistry;
use language_model::Role;
use language_model::{LanguageModelRegistry, LanguageModelToolUseId, Role};
use markdown::{Markdown, MarkdownStyle};
use settings::Settings as _;
use theme::ThemeSettings;
use ui::prelude::*;
use ui::{prelude::*, Disclosure};
use workspace::Workspace;
use crate::thread::{MessageId, Thread, ThreadError, ThreadEvent};
use crate::thread::{MessageId, RequestKind, Thread, ThreadError, ThreadEvent};
use crate::thread_store::ThreadStore;
use crate::tool_use::{ToolUse, ToolUseStatus};
use crate::ui::ContextPill;
pub struct ActiveThread {
@@ -28,6 +29,7 @@ pub struct ActiveThread {
messages: Vec<MessageId>,
list_state: ListState,
rendered_messages_by_id: HashMap<MessageId, Entity<Markdown>>,
expanded_tool_uses: HashMap<LanguageModelToolUseId, bool>,
last_error: Option<ThreadError>,
_subscriptions: Vec<Subscription>,
}
@@ -55,6 +57,7 @@ impl ActiveThread {
thread: thread.clone(),
messages: Vec::new(),
rendered_messages_by_id: HashMap::default(),
expanded_tool_uses: HashMap::default(),
list_state: ListState::new(0, ListAlignment::Bottom, px(1024.), {
let this = cx.entity().downgrade();
move |ix, _: &mut Window, cx: &mut App| {
@@ -179,11 +182,10 @@ impl ActiveThread {
let markdown = cx.new(|cx| {
Markdown::new(
text,
text.into(),
markdown_style,
Some(self.language_registry.clone()),
None,
window,
cx,
)
});
@@ -215,7 +217,7 @@ impl ActiveThread {
ThreadEvent::StreamedAssistantText(message_id, text) => {
if let Some(markdown) = self.rendered_messages_by_id.get_mut(&message_id) {
markdown.update(cx, |markdown, cx| {
markdown.append(text, window, cx);
markdown.append(text, cx);
});
}
}
@@ -252,17 +254,29 @@ impl ActiveThread {
let task = tool.run(tool_use.input, self.workspace.clone(), window, cx);
self.thread.update(cx, |thread, cx| {
thread.insert_tool_output(
tool_use.assistant_message_id,
tool_use.id.clone(),
task,
cx,
);
thread.insert_tool_output(tool_use.id.clone(), task, cx);
});
}
}
}
ThreadEvent::ToolFinished { .. } => {
let all_tools_finished = self
.thread
.read(cx)
.pending_tool_uses()
.into_iter()
.all(|tool_use| tool_use.status.is_error());
if all_tools_finished {
let model_registry = LanguageModelRegistry::read_global(cx);
if let Some(model) = model_registry.active_model() {
self.thread.update(cx, |thread, cx| {
// Insert an empty user message to contain the tool results.
thread.insert_user_message("", Vec::new(), cx);
thread.send_to_model(model, RequestKind::Chat, true, cx);
});
}
}
}
ThreadEvent::ToolFinished { .. } => {}
}
}
@@ -277,8 +291,17 @@ impl ActiveThread {
};
let context = self.thread.read(cx).context_for_message(message_id);
let tool_uses = self.thread.read(cx).tool_uses_for_message(message_id);
let colors = cx.theme().colors();
// Don't render user messages that are just there for returning tool results.
if message.role == Role::User
&& message.text.is_empty()
&& self.thread.read(cx).message_has_tool_results(message_id)
{
return Empty.into_any();
}
let message_content = v_flex()
.child(div().p_2p5().text_ui(cx).child(markdown.clone()))
.when_some(context, |parent, context| {
@@ -333,7 +356,22 @@ impl ActiveThread {
)
.child(message_content),
),
Role::Assistant => div().id(("message-container", ix)).child(message_content),
Role::Assistant => div()
.id(("message-container", ix))
.child(message_content)
.map(|parent| {
if tool_uses.is_empty() {
return parent;
}
parent.child(
v_flex().children(
tool_uses
.into_iter()
.map(|tool_use| self.render_tool_use(tool_use, cx)),
),
)
}),
Role::System => div().id(("message-container", ix)).py_1().px_2().child(
v_flex()
.bg(colors.editor_background)
@@ -344,6 +382,102 @@ impl ActiveThread {
styled_message.into_any()
}
fn render_tool_use(&self, tool_use: ToolUse, cx: &mut Context<Self>) -> impl IntoElement {
let is_open = self
.expanded_tool_uses
.get(&tool_use.id)
.copied()
.unwrap_or_default();
div().px_2p5().child(
v_flex()
.gap_1()
.rounded_lg()
.border_1()
.border_color(cx.theme().colors().border)
.child(
h_flex()
.justify_between()
.py_0p5()
.pl_1()
.pr_2()
.bg(cx.theme().colors().editor_foreground.opacity(0.02))
.when(is_open, |element| element.border_b_1().rounded_t(px(6.)))
.when(!is_open, |element| element.rounded(px(6.)))
.border_color(cx.theme().colors().border)
.child(
h_flex()
.gap_1()
.child(Disclosure::new("tool-use-disclosure", is_open).on_click(
cx.listener({
let tool_use_id = tool_use.id.clone();
move |this, _event, _window, _cx| {
let is_open = this
.expanded_tool_uses
.entry(tool_use_id.clone())
.or_insert(false);
*is_open = !*is_open;
}
}),
))
.child(Label::new(tool_use.name)),
)
.child(
Label::new(match tool_use.status {
ToolUseStatus::Pending => "Pending",
ToolUseStatus::Running => "Running",
ToolUseStatus::Finished(_) => "Finished",
ToolUseStatus::Error(_) => "Error",
})
.size(LabelSize::XSmall)
.buffer_font(cx),
),
)
.map(|parent| {
if !is_open {
return parent;
}
parent.child(
v_flex()
.child(
v_flex()
.gap_0p5()
.py_1()
.px_2p5()
.border_b_1()
.border_color(cx.theme().colors().border)
.child(Label::new("Input:"))
.child(Label::new(
serde_json::to_string_pretty(&tool_use.input)
.unwrap_or_default(),
)),
)
.map(|parent| match tool_use.status {
ToolUseStatus::Finished(output) => parent.child(
v_flex()
.gap_0p5()
.py_1()
.px_2p5()
.child(Label::new("Result:"))
.child(Label::new(output)),
),
ToolUseStatus::Error(err) => parent.child(
v_flex()
.gap_0p5()
.py_1()
.px_2p5()
.child(Label::new("Error:"))
.child(Label::new(err)),
),
ToolUseStatus::Pending | ToolUseStatus::Running => parent,
}),
)
}),
)
}
}
impl Render for ActiveThread {

View File

@@ -7,6 +7,7 @@ mod context;
mod context_picker;
mod context_store;
mod context_strip;
mod history_store;
mod inline_assistant;
mod inline_prompt_editor;
mod message_editor;
@@ -15,6 +16,7 @@ mod terminal_inline_assistant;
mod thread;
mod thread_history;
mod thread_store;
mod tool_use;
mod ui;
use std::sync::Arc;
@@ -37,10 +39,8 @@ actions!(
NewThread,
NewPromptEditor,
ToggleContextPicker,
ToggleModelSelector,
RemoveAllContext,
OpenHistory,
OpenPromptEditorHistory,
OpenConfiguration,
RemoveSelectedThread,
Chat,
@@ -66,6 +66,7 @@ pub fn init(
cx: &mut App,
) {
AssistantSettings::register(cx);
thread_store::init(cx);
assistant_panel::init(cx);
inline_assistant::init(

View File

@@ -1,7 +1,7 @@
use std::sync::Arc;
use collections::HashMap;
use gpui::{AnyView, App, EventEmitter, FocusHandle, Focusable, Subscription};
use gpui::{Action, AnyView, App, EventEmitter, FocusHandle, Focusable, Subscription};
use language_model::{LanguageModelProvider, LanguageModelProviderId, LanguageModelRegistry};
use ui::{prelude::*, Divider, DividerColor, ElevationIndex};
use zed_actions::assistant::DeployPromptLibrary;
@@ -158,8 +158,16 @@ impl Render for AssistantConfiguration {
.child(
v_flex()
.p(DynamicSpacing::Base16.rems(cx))
.gap_1()
.child(Headline::new("Prompt Library").size(HeadlineSize::Small))
.gap_2()
.child(
v_flex()
.gap_0p5()
.child(Headline::new("Prompt Library").size(HeadlineSize::Small))
.child(
Label::new("Create reusable prompts and tag which ones you want sent in every LLM interaction.")
.color(Color::Muted),
),
)
.child(
Button::new("open-prompt-library", "Open Prompt Library")
.style(ButtonStyle::Filled)
@@ -168,8 +176,8 @@ impl Render for AssistantConfiguration {
.icon(IconName::Book)
.icon_size(IconSize::Small)
.icon_position(IconPosition::Start)
.on_click(|_event, _window, cx| {
cx.dispatch_action(&DeployPromptLibrary)
.on_click(|_event, window, cx| {
window.dispatch_action(DeployPromptLibrary.boxed_clone(), cx)
}),
),
)

View File

@@ -1,24 +1,19 @@
use assistant_settings::AssistantSettings;
use fs::Fs;
use gpui::{Entity, FocusHandle, SharedString};
use language_model::LanguageModelRegistry;
use language_model_selector::{LanguageModelSelector, LanguageModelSelectorPopoverMenu};
use gpui::{Entity, FocusHandle};
use language_model_selector::{AssistantLanguageModelSelector, LanguageModelSelector};
use settings::update_settings_file;
use std::sync::Arc;
use ui::{prelude::*, ButtonLike, PopoverMenuHandle, Tooltip};
use crate::ToggleModelSelector;
use ui::prelude::*;
pub struct AssistantModelSelector {
selector: Entity<LanguageModelSelector>,
menu_handle: PopoverMenuHandle<LanguageModelSelector>,
pub selector: Entity<LanguageModelSelector>,
focus_handle: FocusHandle,
}
impl AssistantModelSelector {
pub(crate) fn new(
fs: Arc<dyn Fs>,
menu_handle: PopoverMenuHandle<LanguageModelSelector>,
focus_handle: FocusHandle,
window: &mut Window,
cx: &mut App,
@@ -38,53 +33,14 @@ impl AssistantModelSelector {
cx,
)
}),
menu_handle,
focus_handle,
}
}
}
impl Render for AssistantModelSelector {
fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
let active_model = LanguageModelRegistry::read_global(cx).active_model();
let focus_handle = self.focus_handle.clone();
let model_name = match active_model {
Some(model) => model.name().0,
_ => SharedString::from("No model selected"),
};
LanguageModelSelectorPopoverMenu::new(
self.selector.clone(),
ButtonLike::new("active-model")
.style(ButtonStyle::Subtle)
.child(
h_flex()
.gap_0p5()
.child(
div().max_w_32().child(
Label::new(model_name)
.size(LabelSize::Small)
.color(Color::Muted)
.text_ellipsis()
.into_any_element(),
),
)
.child(
Icon::new(IconName::ChevronDown)
.color(Color::Muted)
.size(IconSize::XSmall),
),
),
move |window, cx| {
Tooltip::for_action_in(
"Change Model",
&ToggleModelSelector,
&focus_handle,
window,
cx,
)
},
)
.with_handle(self.menu_handle.clone())
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
AssistantLanguageModelSelector::new(self.focus_handle.clone(), self.selector.clone())
.render(window, cx)
}
}

View File

@@ -3,8 +3,8 @@ use std::sync::Arc;
use anyhow::{anyhow, Result};
use assistant_context_editor::{
make_lsp_adapter_delegate, AssistantPanelDelegate, ConfigurationError, ContextEditor,
ContextHistory, SlashCommandCompletionProvider,
make_lsp_adapter_delegate, render_remaining_tokens, AssistantPanelDelegate, ConfigurationError,
ContextEditor, SlashCommandCompletionProvider,
};
use assistant_settings::{AssistantDockPosition, AssistantSettings};
use assistant_slash_command::SlashCommandWorkingSet;
@@ -14,7 +14,7 @@ use client::zed_urls;
use editor::Editor;
use fs::Fs;
use gpui::{
prelude::*, px, svg, Action, AnyElement, App, AsyncWindowContext, Corner, Entity, EventEmitter,
prelude::*, Action, AnyElement, App, AsyncWindowContext, Corner, Entity, EventEmitter,
FocusHandle, Focusable, FontWeight, Pixels, Subscription, Task, UpdateGlobal, WeakEntity,
};
use language::LanguageRegistry;
@@ -31,14 +31,12 @@ use zed_actions::assistant::{DeployPromptLibrary, ToggleFocus};
use crate::active_thread::ActiveThread;
use crate::assistant_configuration::{AssistantConfiguration, AssistantConfigurationEvent};
use crate::history_store::{HistoryEntry, HistoryStore};
use crate::message_editor::MessageEditor;
use crate::thread::{Thread, ThreadError, ThreadId};
use crate::thread_history::{PastThread, ThreadHistory};
use crate::thread_history::{PastContext, PastThread, ThreadHistory};
use crate::thread_store::ThreadStore;
use crate::{
InlineAssistant, NewPromptEditor, NewThread, OpenConfiguration, OpenHistory,
OpenPromptEditorHistory,
};
use crate::{InlineAssistant, NewPromptEditor, NewThread, OpenConfiguration, OpenHistory};
pub fn init(cx: &mut App) {
cx.observe_new(
@@ -62,12 +60,6 @@ pub fn init(cx: &mut App) {
panel.update(cx, |panel, cx| panel.new_prompt_editor(window, cx));
}
})
.register_action(|workspace, _: &OpenPromptEditorHistory, window, cx| {
if let Some(panel) = workspace.panel::<AssistantPanel>(cx) {
workspace.focus_panel::<AssistantPanel>(window, cx);
panel.update(cx, |panel, cx| panel.open_prompt_editor_history(window, cx));
}
})
.register_action(|workspace, _: &OpenConfiguration, window, cx| {
if let Some(panel) = workspace.panel::<AssistantPanel>(cx) {
workspace.focus_panel::<AssistantPanel>(window, cx);
@@ -83,7 +75,6 @@ enum ActiveView {
Thread,
PromptEditor,
History,
PromptEditorHistory,
Configuration,
}
@@ -97,15 +88,14 @@ pub struct AssistantPanel {
message_editor: Entity<MessageEditor>,
context_store: Entity<assistant_context_editor::ContextStore>,
context_editor: Option<Entity<ContextEditor>>,
context_history: Option<Entity<ContextHistory>>,
configuration: Option<Entity<AssistantConfiguration>>,
configuration_subscription: Option<Subscription>,
tools: Arc<ToolWorkingSet>,
local_timezone: UtcOffset,
active_view: ActiveView,
history_store: Entity<HistoryStore>,
history: Entity<ThreadHistory>,
new_item_context_menu_handle: PopoverMenuHandle<ContextMenu>,
open_history_context_menu_handle: PopoverMenuHandle<ContextMenu>,
width: Option<Pixels>,
height: Option<Pixels>,
}
@@ -173,6 +163,9 @@ impl AssistantPanel {
)
});
let history_store =
cx.new(|cx| HistoryStore::new(thread_store.clone(), context_store.clone(), cx));
Self {
active_view: ActiveView::Thread,
workspace: workspace.clone(),
@@ -194,7 +187,6 @@ impl AssistantPanel {
message_editor,
context_store,
context_editor: None,
context_history: None,
configuration: None,
configuration_subscription: None,
tools,
@@ -202,9 +194,9 @@ impl AssistantPanel {
chrono::Local::now().offset().local_minus_utc(),
)
.unwrap(),
history: cx.new(|cx| ThreadHistory::new(weak_self, thread_store, cx)),
history_store: history_store.clone(),
history: cx.new(|cx| ThreadHistory::new(weak_self, history_store, cx)),
new_item_context_menu_handle: PopoverMenuHandle::default(),
open_history_context_menu_handle: PopoverMenuHandle::default(),
width: None,
height: None,
}
@@ -323,31 +315,15 @@ impl AssistantPanel {
}
fn open_history(&mut self, window: &mut Window, cx: &mut Context<Self>) {
self.thread_store
.update(cx, |thread_store, cx| thread_store.reload(cx))
.detach_and_log_err(cx);
self.active_view = ActiveView::History;
self.history.focus_handle(cx).focus(window);
cx.notify();
}
fn open_prompt_editor_history(&mut self, window: &mut Window, cx: &mut Context<Self>) {
self.active_view = ActiveView::PromptEditorHistory;
self.context_history = Some(cx.new(|cx| {
ContextHistory::new(
self.project.clone(),
self.context_store.clone(),
self.workspace.clone(),
window,
cx,
)
}));
if let Some(context_history) = self.context_history.as_ref() {
context_history.focus_handle(cx).focus(window);
}
cx.notify();
}
fn open_saved_prompt_editor(
pub(crate) fn open_saved_prompt_editor(
&mut self,
path: PathBuf,
window: &mut Window,
@@ -455,7 +431,7 @@ impl AssistantPanel {
active_provider.id() != provider.id()
})
{
if let Some(model) = provider.provided_models(cx).first().cloned() {
if let Some(model) = provider.default_model(cx) {
update_settings_file::<AssistantSettings>(
self.fs.clone(),
cx,
@@ -478,6 +454,16 @@ impl AssistantPanel {
.update(cx, |this, cx| this.delete_thread(thread_id, cx))
.detach_and_log_err(cx);
}
pub(crate) fn active_context_editor(&self) -> Option<Entity<ContextEditor>> {
self.context_editor.clone()
}
pub(crate) fn delete_context(&mut self, path: PathBuf, cx: &mut Context<Self>) {
self.context_store
.update(cx, |this, cx| this.delete_local_context(path, cx))
.detach_and_log_err(cx);
}
}
impl Focusable for AssistantPanel {
@@ -492,13 +478,6 @@ impl Focusable for AssistantPanel {
cx.focus_handle()
}
}
ActiveView::PromptEditorHistory => {
if let Some(context_history) = self.context_history.as_ref() {
context_history.focus_handle(cx)
} else {
cx.focus_handle()
}
}
ActiveView::Configuration => {
if let Some(configuration) = self.configuration.as_ref() {
configuration.focus_handle(cx)
@@ -611,21 +590,12 @@ impl AssistantPanel {
SharedString::from(context_editor.read(cx).title(cx).to_string())
})
.unwrap_or_else(|| SharedString::from("Loading Summary…")),
ActiveView::History | ActiveView::PromptEditorHistory => "History".into(),
ActiveView::History => "History".into(),
ActiveView::Configuration => "Assistant Settings".into(),
};
let sub_title = match self.active_view {
ActiveView::Thread => None,
ActiveView::PromptEditor => None,
ActiveView::History => Some("Thread"),
ActiveView::PromptEditorHistory => Some("Prompt Editor"),
ActiveView::Configuration => None,
};
h_flex()
.id("assistant-toolbar")
.px(DynamicSpacing::Base08.rems(cx))
.h(Tab::container_height(cx))
.flex_none()
.justify_between()
@@ -634,75 +604,85 @@ impl AssistantPanel {
.border_b_1()
.border_color(cx.theme().colors().border)
.child(
h_flex()
.child(Label::new(title))
.when(sub_title.is_some(), |this| {
this.child(
h_flex()
.pl_1p5()
.gap_1p5()
.child(
Label::new("/")
.size(LabelSize::Small)
.color(Color::Disabled)
.alpha(0.5),
)
.child(Label::new(sub_title.unwrap())),
)
}),
div()
.id("title")
.overflow_x_scroll()
.px(DynamicSpacing::Base08.rems(cx))
.child(Label::new(title).text_ellipsis()),
)
.child(
h_flex()
.h_full()
.pl_1p5()
.border_l_1()
.border_color(cx.theme().colors().border)
.gap(DynamicSpacing::Base02.rems(cx))
.pl_2()
.gap_2()
.bg(cx.theme().colors().tab_bar_background)
.children(if matches!(self.active_view, ActiveView::PromptEditor) {
self.context_editor
.as_ref()
.and_then(|editor| render_remaining_tokens(editor, cx))
} else {
None
})
.child(
PopoverMenu::new("assistant-toolbar-new-popover-menu")
.trigger_with_tooltip(
IconButton::new("new", IconName::Plus)
.icon_size(IconSize::Small)
.style(ButtonStyle::Subtle),
Tooltip::text("New…"),
h_flex()
.h_full()
.px(DynamicSpacing::Base08.rems(cx))
.border_l_1()
.border_color(cx.theme().colors().border)
.gap(DynamicSpacing::Base02.rems(cx))
.child(
PopoverMenu::new("assistant-toolbar-new-popover-menu")
.trigger_with_tooltip(
IconButton::new("new", IconName::Plus)
.icon_size(IconSize::Small)
.style(ButtonStyle::Subtle),
Tooltip::text("New…"),
)
.anchor(Corner::TopRight)
.with_handle(self.new_item_context_menu_handle.clone())
.menu(move |window, cx| {
Some(ContextMenu::build(
window,
cx,
|menu, _window, _cx| {
menu.action("New Thread", NewThread.boxed_clone())
.action(
"New Prompt Editor",
NewPromptEditor.boxed_clone(),
)
},
))
}),
)
.anchor(Corner::TopRight)
.with_handle(self.new_item_context_menu_handle.clone())
.menu(move |window, cx| {
Some(ContextMenu::build(window, cx, |menu, _window, _cx| {
menu.action("New Thread", NewThread.boxed_clone())
.action("New Prompt Editor", NewPromptEditor.boxed_clone())
}))
}),
)
.child(
PopoverMenu::new("assistant-toolbar-history-popover-menu")
.trigger_with_tooltip(
.child(
IconButton::new("open-history", IconName::HistoryRerun)
.icon_size(IconSize::Small)
.style(ButtonStyle::Subtle),
Tooltip::text("History…"),
.style(ButtonStyle::Subtle)
.tooltip({
let focus_handle = self.focus_handle(cx);
move |window, cx| {
Tooltip::for_action_in(
"History",
&OpenHistory,
&focus_handle,
window,
cx,
)
}
})
.on_click(move |_event, window, cx| {
window.dispatch_action(OpenHistory.boxed_clone(), cx);
}),
)
.anchor(Corner::TopRight)
.with_handle(self.open_history_context_menu_handle.clone())
.menu(move |window, cx| {
Some(ContextMenu::build(window, cx, |menu, _window, _cx| {
menu.action("Thread History", OpenHistory.boxed_clone())
.action(
"Prompt Editor History",
OpenPromptEditorHistory.boxed_clone(),
)
}))
}),
)
.child(
IconButton::new("configure-assistant", IconName::Settings)
.icon_size(IconSize::Small)
.style(ButtonStyle::Subtle)
.tooltip(Tooltip::text("Assistant Settings"))
.on_click(move |_event, window, cx| {
window.dispatch_action(OpenConfiguration.boxed_clone(), cx);
}),
.child(
IconButton::new("configure-assistant", IconName::Settings)
.icon_size(IconSize::Small)
.style(ButtonStyle::Subtle)
.tooltip(Tooltip::text("Assistant Settings"))
.on_click(move |_event, window, cx| {
window.dispatch_action(OpenConfiguration.boxed_clone(), cx);
}),
),
),
)
}
@@ -742,14 +722,13 @@ impl AssistantPanel {
window: &mut Window,
cx: &mut Context<Self>,
) -> impl IntoElement {
let recent_threads = self
.thread_store
.update(cx, |this, _cx| this.recent_threads(3));
let recent_history = self
.history_store
.update(cx, |this, cx| this.recent_entries(6, cx));
let create_welcome_heading = || {
h_flex()
.w_full()
.justify_center()
.child(Headline::new("Welcome to the Assistant Panel").size(HeadlineSize::Small))
};
@@ -757,35 +736,27 @@ impl AssistantPanel {
let no_error = configuration_error.is_none();
v_flex()
.gap_2()
.child(
v_flex().w_full().child(
svg()
.path("icons/logo_96.svg")
.text_color(cx.theme().colors().text)
.w(px(40.))
.h(px(40.))
.mx_auto()
.mb_4(),
),
)
.p_1p5()
.size_full()
.justify_end()
.gap_1()
.map(|parent| {
match configuration_error {
Some(ConfigurationError::ProviderNotAuthenticated) | Some(ConfigurationError::NoProvider) => {
Some(ConfigurationError::ProviderNotAuthenticated)
| Some(ConfigurationError::NoProvider) => {
parent.child(
v_flex()
.px_1p5()
.gap_0p5()
.child(create_welcome_heading())
.child(
h_flex().mb_2().w_full().justify_center().child(
Label::new(
"To start using the assistant, configure at least one LLM provider.",
)
.color(Color::Muted),
),
Label::new(
"To start using the assistant, configure at least one LLM provider.",
)
.color(Color::Muted),
)
.child(
h_flex().w_full().justify_center().child(
h_flex().mt_1().w_full().child(
Button::new("open-configuration", "Configure a Provider")
.size(ButtonSize::Compact)
.icon(Some(IconName::Sliders))
@@ -798,63 +769,66 @@ impl AssistantPanel {
),
)
}
Some(ConfigurationError::ProviderPendingTermsAcceptance(provider)) => {
parent.child(
v_flex()
.gap_0p5()
.child(create_welcome_heading())
.children(provider.render_accept_terms(
LanguageModelProviderTosView::ThreadEmptyState,
cx,
)),
)
}
Some(ConfigurationError::ProviderPendingTermsAcceptance(provider)) => parent
.child(v_flex().px_1p5().gap_0p5().child(create_welcome_heading()).children(
provider.render_accept_terms(
LanguageModelProviderTosView::ThreadEmptyState,
cx,
),
)),
None => parent,
}
})
.when(
recent_threads.is_empty() && no_error,
|parent| {
parent.child(
v_flex().gap_0p5().child(create_welcome_heading()).child(
h_flex().w_full().justify_center().child(
Label::new("Start typing to chat with your codebase")
.color(Color::Muted),
),
),
)
},
)
.when(!recent_threads.is_empty(), |parent| {
.when(recent_history.is_empty() && no_error, |parent| {
parent.child(v_flex().gap_0p5().child(create_welcome_heading()).child(
Label::new("Start typing to chat with your codebase").color(Color::Muted),
))
})
.when(!recent_history.is_empty(), |parent| {
parent
.child(
h_flex().w_full().justify_center().child(
Label::new("Recent Threads:")
.size(LabelSize::Small)
.color(Color::Muted),
),
h_flex()
.pl_1p5()
.pb_1()
.w_full()
.justify_between()
.border_b_1()
.border_color(cx.theme().colors().border_variant)
.child(
Label::new("Past Interactions")
.size(LabelSize::Small)
.color(Color::Muted),
)
.child(
Button::new("view-history", "View All")
.style(ButtonStyle::Subtle)
.label_size(LabelSize::Small)
.key_binding(KeyBinding::for_action_in(
&OpenHistory,
&self.focus_handle(cx),
window,
cx,
))
.on_click(move |_event, window, cx| {
window.dispatch_action(OpenHistory.boxed_clone(), cx);
}),
),
)
.child(v_flex().mx_auto().w_4_5().gap_2().children(
recent_threads.into_iter().map(|thread| {
// TODO: keyboard navigation
PastThread::new(thread, cx.entity().downgrade(), false)
.child(v_flex().gap_1().children(
recent_history.into_iter().map(|entry| {
// TODO: Add keyboard navigation.
match entry {
HistoryEntry::Thread(thread) => {
PastThread::new(thread, cx.entity().downgrade(), false)
.into_any_element()
}
HistoryEntry::Context(context) => {
PastContext::new(context, cx.entity().downgrade(), false)
.into_any_element()
}
}
}),
))
.child(
h_flex().w_full().justify_center().child(
Button::new("view-all-past-threads", "View All Past Threads")
.style(ButtonStyle::Subtle)
.label_size(LabelSize::Small)
.key_binding(KeyBinding::for_action_in(
&OpenHistory,
&self.focus_handle(cx),
window,
))
.on_click(move |_event, window, cx| {
window.dispatch_action(OpenHistory.boxed_clone(), cx);
}),
),
)
})
}
@@ -1047,7 +1021,6 @@ impl Render for AssistantPanel {
.children(self.render_last_error(cx)),
ActiveView::History => parent.child(self.history.clone()),
ActiveView::PromptEditor => parent.children(self.context_editor.clone()),
ActiveView::PromptEditorHistory => parent.children(self.context_history.clone()),
ActiveView::Configuration => parent.children(self.configuration.clone()),
})
}

View File

@@ -7,12 +7,11 @@ use collections::HashSet;
use editor::{Anchor, AnchorRangeExt, MultiBuffer, MultiBufferSnapshot, ToOffset as _, ToPoint};
use futures::{channel::mpsc, future::LocalBoxFuture, join, SinkExt, Stream, StreamExt};
use gpui::{App, AppContext as _, Context, Entity, EventEmitter, Subscription, Task};
use language::{Buffer, IndentKind, Point, TransactionId};
use language::{line_diff, Buffer, IndentKind, Point, TransactionId};
use language_model::{
LanguageModel, LanguageModelRegistry, LanguageModelRequest, LanguageModelRequestMessage,
LanguageModelTextStream, Role,
report_assistant_event, LanguageModel, LanguageModelRegistry, LanguageModelRequest,
LanguageModelRequestMessage, LanguageModelTextStream, Role,
};
use language_models::report_assistant_event;
use multi_buffer::MultiBufferRow;
use parking_lot::Mutex;
use prompt_library::PromptBuilder;
@@ -493,7 +492,7 @@ impl CodegenAlternative {
let executor = cx.background_executor().clone();
let message_id = message_id.clone();
let line_based_stream_diff: Task<anyhow::Result<()>> =
cx.background_executor().spawn(async move {
cx.background_spawn(async move {
let mut response_latency = None;
let request_start = Instant::now();
let diff = async {
@@ -807,8 +806,7 @@ impl CodegenAlternative {
cx.spawn(|codegen, mut cx| async move {
let (deleted_row_ranges, inserted_row_ranges) = cx
.background_executor()
.spawn(async move {
.background_spawn(async move {
let old_text = old_snapshot
.text_for_range(
Point::new(old_range.start.row, 0)
@@ -828,52 +826,29 @@ impl CodegenAlternative {
)
.collect::<String>();
let mut old_row = old_range.start.row;
let mut new_row = new_range.start.row;
let batch_diff =
similar::TextDiff::from_lines(old_text.as_str(), new_text.as_str());
let old_start_row = old_range.start.row;
let new_start_row = new_range.start.row;
let mut deleted_row_ranges: Vec<(Anchor, RangeInclusive<u32>)> = Vec::new();
let mut inserted_row_ranges = Vec::new();
for change in batch_diff.iter_all_changes() {
let line_count = change.value().lines().count() as u32;
match change.tag() {
similar::ChangeTag::Equal => {
old_row += line_count;
new_row += line_count;
}
similar::ChangeTag::Delete => {
let old_end_row = old_row + line_count - 1;
let new_row = new_snapshot.anchor_before(Point::new(new_row, 0));
if let Some((_, last_deleted_row_range)) =
deleted_row_ranges.last_mut()
{
if *last_deleted_row_range.end() + 1 == old_row {
*last_deleted_row_range =
*last_deleted_row_range.start()..=old_end_row;
} else {
deleted_row_ranges.push((new_row, old_row..=old_end_row));
}
} else {
deleted_row_ranges.push((new_row, old_row..=old_end_row));
}
old_row += line_count;
}
similar::ChangeTag::Insert => {
let new_end_row = new_row + line_count - 1;
let start = new_snapshot.anchor_before(Point::new(new_row, 0));
let end = new_snapshot.anchor_before(Point::new(
new_end_row,
new_snapshot.line_len(MultiBufferRow(new_end_row)),
));
inserted_row_ranges.push(start..end);
new_row += line_count;
}
for (old_rows, new_rows) in line_diff(&old_text, &new_text) {
let old_rows = old_start_row + old_rows.start..old_start_row + old_rows.end;
let new_rows = new_start_row + new_rows.start..new_start_row + new_rows.end;
if !old_rows.is_empty() {
deleted_row_ranges.push((
new_snapshot.anchor_before(Point::new(new_rows.start, 0)),
old_rows.start..=old_rows.end - 1,
));
}
if !new_rows.is_empty() {
let start = new_snapshot.anchor_before(Point::new(new_rows.start, 0));
let new_end_row = new_rows.end - 1;
let end = new_snapshot.anchor_before(Point::new(
new_end_row,
new_snapshot.line_len(MultiBufferRow(new_end_row)),
));
inserted_row_ranges.push(start..end);
}
}
(deleted_row_ranges, inserted_row_ranges)
})
.await;

View File

@@ -208,8 +208,7 @@ impl PickerDelegate for FetchContextPickerDelegate {
let confirm_behavior = self.confirm_behavior;
cx.spawn_in(window, |this, mut cx| async move {
let text = cx
.background_executor()
.spawn(Self::build_message(http_client, url.clone()))
.background_spawn(Self::build_message(http_client, url.clone()))
.await?;
this.update_in(&mut cx, |this, window, cx| {

View File

@@ -7,19 +7,19 @@ use std::sync::Arc;
use editor::actions::FoldAt;
use editor::display_map::{Crease, FoldId};
use editor::scroll::Autoscroll;
use editor::{Anchor, Editor, FoldPlaceholder, ToPoint};
use editor::{Anchor, AnchorRangeExt, Editor, FoldPlaceholder, ToPoint};
use file_icons::FileIcons;
use fuzzy::PathMatch;
use gpui::{
AnyElement, App, DismissEvent, Empty, Entity, FocusHandle, Focusable, Stateful, Task,
WeakEntity,
AnyElement, App, AppContext, DismissEvent, Empty, Entity, FocusHandle, Focusable, Stateful,
Task, WeakEntity,
};
use multi_buffer::{MultiBufferPoint, MultiBufferRow};
use picker::{Picker, PickerDelegate};
use project::{PathMatchCandidateSet, ProjectPath, WorktreeId};
use rope::Point;
use text::SelectionGoal;
use ui::{prelude::*, ButtonLike, Disclosure, ElevationIndex, ListItem, Tooltip};
use ui::{prelude::*, ButtonLike, Disclosure, ListItem, TintColor, Tooltip};
use util::ResultExt as _;
use workspace::{notifications::NotifyResultExt, Workspace};
@@ -238,11 +238,11 @@ impl PickerDelegate for FileContextPickerDelegate {
path: mat.path.clone(),
};
let Some(editor) = self.editor.upgrade() else {
let Some(editor_entity) = self.editor.upgrade() else {
return;
};
editor.update(cx, |editor, cx| {
editor_entity.update(cx, |editor, cx| {
editor.transact(window, cx, |editor, window, cx| {
// Move empty selections left by 1 column to select the `@`s, so they get overwritten when we insert.
{
@@ -288,8 +288,15 @@ impl PickerDelegate for FileContextPickerDelegate {
editor.insert("\n", window, cx); // Needed to end the fold
let file_icon = FileIcons::get_icon(&Path::new(&full_path), cx)
.unwrap_or_else(|| SharedString::new(""));
let placeholder = FoldPlaceholder {
render: render_fold_icon_button(IconName::File, file_name.into()),
render: render_fold_icon_button(
file_icon,
file_name.into(),
editor_entity.downgrade(),
),
..Default::default()
};
@@ -459,15 +466,66 @@ pub fn render_file_context_entry(
}
fn render_fold_icon_button(
icon: IconName,
icon: SharedString,
label: SharedString,
) -> Arc<dyn Send + Sync + Fn(FoldId, Range<Anchor>, &mut Window, &mut App) -> AnyElement> {
Arc::new(move |fold_id, _fold_range, _window, _cx| {
editor: WeakEntity<Editor>,
) -> Arc<dyn Send + Sync + Fn(FoldId, Range<Anchor>, &mut App) -> AnyElement> {
Arc::new(move |fold_id, fold_range, cx| {
let is_in_text_selection = editor.upgrade().is_some_and(|editor| {
editor.update(cx, |editor, cx| {
let snapshot = editor
.buffer()
.update(cx, |multi_buffer, cx| multi_buffer.snapshot(cx));
let is_in_pending_selection = || {
editor
.selections
.pending
.as_ref()
.is_some_and(|pending_selection| {
pending_selection
.selection
.range()
.includes(&fold_range, &snapshot)
})
};
let mut is_in_complete_selection = || {
editor
.selections
.disjoint_in_range::<usize>(fold_range.clone(), cx)
.into_iter()
.any(|selection| {
// This is needed to cover a corner case, if we just check for an existing
// selection in the fold range, having a cursor at the start of the fold
// marks it as selected. Non-empty selections don't cause this.
let length = selection.end - selection.start;
length > 0
})
};
is_in_pending_selection() || is_in_complete_selection()
})
});
ButtonLike::new(fold_id)
.style(ButtonStyle::Filled)
.layer(ElevationIndex::ElevatedSurface)
.child(Icon::new(icon))
.child(Label::new(label.clone()).single_line())
.selected_style(ButtonStyle::Tinted(TintColor::Accent))
.toggle_state(is_in_text_selection)
.child(
h_flex()
.gap_1()
.child(
Icon::from_path(icon.clone())
.size(IconSize::Small)
.color(Color::Muted),
)
.child(
Label::new(label.clone())
.size(LabelSize::Small)
.single_line(),
),
)
.into_any_element()
})
}

View File

@@ -123,7 +123,7 @@ impl PickerDelegate for ThreadContextPickerDelegate {
};
let executor = cx.background_executor().clone();
let search_task = cx.background_executor().spawn(async move {
let search_task = cx.background_spawn(async move {
if query.is_empty() {
threads
} else {

View File

@@ -4,7 +4,7 @@ use std::sync::Arc;
use anyhow::{anyhow, bail, Result};
use collections::{BTreeMap, HashMap, HashSet};
use futures::{self, future, Future, FutureExt};
use gpui::{App, AsyncApp, Context, Entity, SharedString, Task, WeakEntity};
use gpui::{App, AppContext as _, AsyncApp, Context, Entity, SharedString, Task, WeakEntity};
use language::Buffer;
use project::{ProjectPath, Worktree};
use rope::Rope;
@@ -456,9 +456,7 @@ fn collect_buffer_info_and_text(
};
// Important to collect version at the same time as content so that staleness logic is correct.
let content = buffer.as_rope().clone();
let text_task = cx
.background_executor()
.spawn(async move { to_fenced_codeblock(&path, content) });
let text_task = cx.background_spawn(async move { to_fenced_codeblock(&path, content) });
(buffer_info, text_task)
}

View File

@@ -453,6 +453,7 @@ impl Render for ContextStrip {
&ToggleContextPicker,
&focus_handle,
window,
cx,
)
.map(|binding| binding.into_any_element()),
),

View File

@@ -0,0 +1,61 @@
use assistant_context_editor::SavedContextMetadata;
use chrono::{DateTime, Utc};
use gpui::{prelude::*, Entity};
use crate::thread_store::{SavedThreadMetadata, ThreadStore};
pub enum HistoryEntry {
Thread(SavedThreadMetadata),
Context(SavedContextMetadata),
}
impl HistoryEntry {
pub fn updated_at(&self) -> DateTime<Utc> {
match self {
HistoryEntry::Thread(thread) => thread.updated_at,
HistoryEntry::Context(context) => context.mtime.to_utc(),
}
}
}
pub struct HistoryStore {
thread_store: Entity<ThreadStore>,
context_store: Entity<assistant_context_editor::ContextStore>,
}
impl HistoryStore {
pub fn new(
thread_store: Entity<ThreadStore>,
context_store: Entity<assistant_context_editor::ContextStore>,
_cx: &mut Context<Self>,
) -> Self {
Self {
thread_store,
context_store,
}
}
/// Returns the number of history entries.
pub fn entry_count(&self, cx: &mut Context<Self>) -> usize {
self.entries(cx).len()
}
pub fn entries(&self, cx: &mut Context<Self>) -> Vec<HistoryEntry> {
let mut history_entries = Vec::new();
for thread in self.thread_store.update(cx, |this, _cx| this.threads()) {
history_entries.push(HistoryEntry::Thread(thread));
}
for context in self.context_store.update(cx, |this, _cx| this.contexts()) {
history_entries.push(HistoryEntry::Context(context));
}
history_entries.sort_unstable_by_key(|entry| std::cmp::Reverse(entry.updated_at()));
history_entries
}
pub fn recent_entries(&self, limit: usize, cx: &mut Context<Self>) -> Vec<HistoryEntry> {
self.entries(cx).into_iter().take(limit).collect()
}
}

View File

@@ -24,8 +24,7 @@ use gpui::{
UpdateGlobal, WeakEntity, Window,
};
use language::{Buffer, Point, Selection, TransactionId};
use language_model::LanguageModelRegistry;
use language_models::report_assistant_event;
use language_model::{report_assistant_event, LanguageModelRegistry};
use multi_buffer::MultiBufferRow;
use parking_lot::Mutex;
use project::{CodeAction, ProjectTransaction};
@@ -228,8 +227,12 @@ impl InlineAssistant {
return;
}
let Some(inline_assist_target) = Self::resolve_inline_assist_target(workspace, window, cx)
else {
let Some(inline_assist_target) = Self::resolve_inline_assist_target(
workspace,
workspace.panel::<AssistantPanel>(cx),
window,
cx,
) else {
return;
};
@@ -1384,6 +1387,7 @@ impl InlineAssistant {
fn resolve_inline_assist_target(
workspace: &mut Workspace,
assistant_panel: Option<Entity<AssistantPanel>>,
window: &mut Window,
cx: &mut App,
) -> Option<InlineAssistTarget> {
@@ -1403,7 +1407,20 @@ impl InlineAssistant {
}
}
if let Some(workspace_editor) = workspace
let context_editor = assistant_panel
.and_then(|panel| panel.read(cx).active_context_editor())
.and_then(|editor| {
let editor = &editor.read(cx).editor().clone();
if editor.read(cx).is_focused(window) {
Some(editor.clone())
} else {
None
}
});
if let Some(context_editor) = context_editor {
Some(InlineAssistTarget::Editor(context_editor))
} else if let Some(workspace_editor) = workspace
.active_item(cx)
.and_then(|item| item.act_as::<Editor>(cx))
{

View File

@@ -6,7 +6,7 @@ use crate::context_strip::{ContextStrip, ContextStripEvent, SuggestContextKind};
use crate::terminal_codegen::TerminalCodegen;
use crate::thread_store::ThreadStore;
use crate::{CycleNextInlineAssist, CyclePreviousInlineAssist};
use crate::{RemoveAllContext, ToggleContextPicker, ToggleModelSelector};
use crate::{RemoveAllContext, ToggleContextPicker};
use client::ErrorExt;
use collections::VecDeque;
use editor::{
@@ -20,7 +20,6 @@ use gpui::{
EventEmitter, FocusHandle, Focusable, FontWeight, Subscription, TextStyle, WeakEntity, Window,
};
use language_model::{LanguageModel, LanguageModelRegistry};
use language_model_selector::LanguageModelSelector;
use parking_lot::Mutex;
use settings::Settings;
use std::cmp;
@@ -40,7 +39,6 @@ pub struct PromptEditor<T> {
context_strip: Entity<ContextStrip>,
context_picker_menu_handle: PopoverMenuHandle<ContextPicker>,
model_selector: Entity<AssistantModelSelector>,
model_selector_menu_handle: PopoverMenuHandle<LanguageModelSelector>,
edited_since_done: bool,
prompt_history: VecDeque<String>,
prompt_history_ix: Option<usize>,
@@ -56,7 +54,7 @@ impl<T: 'static> EventEmitter<PromptEditorEvent> for PromptEditor<T> {}
impl<T: 'static> Render for PromptEditor<T> {
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
let ui_font_size = ThemeSettings::get_global(cx).ui_font_size;
let ui_font_size = ThemeSettings::get_global(cx).ui_font_size(cx);
let mut buttons = Vec::new();
let left_gutter_width = match &self.mode {
@@ -104,7 +102,12 @@ impl<T: 'static> Render for PromptEditor<T> {
.items_start()
.cursor(CursorStyle::Arrow)
.on_action(cx.listener(Self::toggle_context_picker))
.on_action(cx.listener(Self::toggle_model_selector))
.on_action(cx.listener(|this, action, window, cx| {
let selector = this.model_selector.read(cx).selector.clone();
selector.update(cx, |selector, cx| {
selector.toggle_model_selector(action, window, cx);
})
}))
.on_action(cx.listener(Self::confirm))
.on_action(cx.listener(Self::cancel))
.on_action(cx.listener(Self::move_up))
@@ -271,7 +274,7 @@ impl<T: 'static> PromptEditor<T> {
};
let assistant_panel_keybinding =
ui::text_for_action(&zed_actions::assistant::ToggleFocus, window)
ui::text_for_action(&zed_actions::assistant::ToggleFocus, window, cx)
.map(|keybinding| format!("{keybinding} to chat ― "))
.unwrap_or_default();
@@ -347,15 +350,6 @@ impl<T: 'static> PromptEditor<T> {
self.context_picker_menu_handle.toggle(window, cx);
}
fn toggle_model_selector(
&mut self,
_: &ToggleModelSelector,
window: &mut Window,
cx: &mut Context<Self>,
) {
self.model_selector_menu_handle.toggle(window, cx);
}
pub fn remove_all_context(
&mut self,
_: &RemoveAllContext,
@@ -618,12 +612,13 @@ impl<T: 'static> PromptEditor<T> {
.tooltip({
let focus_handle = self.editor.focus_handle(cx);
move |window, cx| {
cx.new(|_| {
cx.new(|cx| {
let mut tooltip = Tooltip::new("Previous Alternative").key_binding(
KeyBinding::for_action_in(
&CyclePreviousInlineAssist,
&focus_handle,
window,
cx,
),
);
if !disabled && current_index != 0 {
@@ -659,12 +654,13 @@ impl<T: 'static> PromptEditor<T> {
.tooltip({
let focus_handle = self.editor.focus_handle(cx);
move |window, cx| {
cx.new(|_| {
cx.new(|cx| {
let mut tooltip = Tooltip::new("Next Alternative").key_binding(
KeyBinding::for_action_in(
&CycleNextInlineAssist,
&focus_handle,
window,
cx,
),
);
if !disabled && current_index != total_models - 1 {
@@ -862,7 +858,6 @@ impl PromptEditor<BufferCodegen> {
editor
});
let context_picker_menu_handle = PopoverMenuHandle::default();
let model_selector_menu_handle = PopoverMenuHandle::default();
let context_strip = cx.new(|cx| {
ContextStrip::new(
@@ -886,15 +881,8 @@ impl PromptEditor<BufferCodegen> {
context_strip,
context_picker_menu_handle,
model_selector: cx.new(|cx| {
AssistantModelSelector::new(
fs,
model_selector_menu_handle.clone(),
prompt_editor.focus_handle(cx),
window,
cx,
)
AssistantModelSelector::new(fs, prompt_editor.focus_handle(cx), window, cx)
}),
model_selector_menu_handle,
edited_since_done: false,
prompt_history,
prompt_history_ix: None,
@@ -1018,7 +1006,6 @@ impl PromptEditor<TerminalCodegen> {
editor
});
let context_picker_menu_handle = PopoverMenuHandle::default();
let model_selector_menu_handle = PopoverMenuHandle::default();
let context_strip = cx.new(|cx| {
ContextStrip::new(
@@ -1042,15 +1029,8 @@ impl PromptEditor<TerminalCodegen> {
context_strip,
context_picker_menu_handle,
model_selector: cx.new(|cx| {
AssistantModelSelector::new(
fs,
model_selector_menu_handle.clone(),
prompt_editor.focus_handle(cx),
window,
cx,
)
AssistantModelSelector::new(fs, prompt_editor.focus_handle(cx), window, cx)
}),
model_selector_menu_handle,
edited_since_done: false,
prompt_history,
prompt_history_ix: None,

View File

@@ -7,16 +7,17 @@ use gpui::{
pulsating_between, Animation, AnimationExt, App, DismissEvent, Entity, Focusable, Subscription,
TextStyle, WeakEntity,
};
use language_model::{LanguageModelRegistry, LanguageModelRequestTool};
use language_model_selector::LanguageModelSelector;
use language_model::LanguageModelRegistry;
use rope::Point;
use settings::Settings;
use std::time::Duration;
use text::Bias;
use theme::ThemeSettings;
use ui::{
prelude::*, ButtonLike, KeyBinding, PopoverMenu, PopoverMenuHandle, Switch, TintColor, Tooltip,
prelude::*, ButtonLike, KeyBinding, PlatformStyle, PopoverMenu, PopoverMenuHandle, Switch,
TintColor, Tooltip,
};
use vim_mode_setting::VimModeSetting;
use workspace::Workspace;
use crate::assistant_model_selector::AssistantModelSelector;
@@ -25,7 +26,7 @@ use crate::context_store::{refresh_context_store_text, ContextStore};
use crate::context_strip::{ContextStrip, ContextStripEvent, SuggestContextKind};
use crate::thread::{RequestKind, Thread};
use crate::thread_store::ThreadStore;
use crate::{Chat, ChatMode, RemoveAllContext, ToggleContextPicker, ToggleModelSelector};
use crate::{Chat, ChatMode, RemoveAllContext, ToggleContextPicker};
pub struct MessageEditor {
thread: Entity<Thread>,
@@ -36,7 +37,6 @@ pub struct MessageEditor {
inline_context_picker: Entity<ContextPicker>,
inline_context_picker_menu_handle: PopoverMenuHandle<ContextPicker>,
model_selector: Entity<AssistantModelSelector>,
model_selector_menu_handle: PopoverMenuHandle<LanguageModelSelector>,
use_tools: bool,
_subscriptions: Vec<Subscription>,
}
@@ -53,7 +53,6 @@ impl MessageEditor {
let context_store = cx.new(|_cx| ContextStore::new(workspace.clone()));
let context_picker_menu_handle = PopoverMenuHandle::default();
let inline_context_picker_menu_handle = PopoverMenuHandle::default();
let model_selector_menu_handle = PopoverMenuHandle::default();
let editor = cx.new(|cx| {
let mut editor = Editor::auto_height(10, window, cx);
@@ -106,30 +105,13 @@ impl MessageEditor {
context_picker_menu_handle,
inline_context_picker,
inline_context_picker_menu_handle,
model_selector: cx.new(|cx| {
AssistantModelSelector::new(
fs,
model_selector_menu_handle.clone(),
editor.focus_handle(cx),
window,
cx,
)
}),
model_selector_menu_handle,
model_selector: cx
.new(|cx| AssistantModelSelector::new(fs, editor.focus_handle(cx), window, cx)),
use_tools: false,
_subscriptions: subscriptions,
}
}
fn toggle_model_selector(
&mut self,
_: &ToggleModelSelector,
window: &mut Window,
cx: &mut Context<Self>,
) {
self.model_selector_menu_handle.toggle(window, cx)
}
fn toggle_chat_mode(&mut self, _: &ChatMode, _window: &mut Window, cx: &mut Context<Self>) {
self.use_tools = !self.use_tools;
cx.notify();
@@ -205,22 +187,7 @@ impl MessageEditor {
.update(&mut cx, |thread, cx| {
let context = context_store.read(cx).snapshot(cx).collect::<Vec<_>>();
thread.insert_user_message(user_message, context, cx);
let mut request = thread.to_completion_request(request_kind, cx);
if use_tools {
request.tools = thread
.tools()
.tools(cx)
.into_iter()
.map(|tool| LanguageModelRequestTool {
name: tool.name(),
description: tool.description(),
input_schema: tool.input_schema(),
})
.collect();
}
thread.stream_completion(request, model, cx)
thread.send_to_model(model, request_kind, use_tools, cx);
})
.ok();
})
@@ -309,7 +276,6 @@ impl Render for MessageEditor {
let inline_context_picker = self.inline_context_picker.clone();
let bg_color = cx.theme().colors().editor_background;
let is_streaming_completion = self.thread.read(cx).is_streaming();
let button_width = px(64.);
let is_model_selected = self.is_model_selected(cx);
let is_editor_empty = self.is_editor_empty(cx);
let submit_label_color = if is_editor_empty {
@@ -318,10 +284,25 @@ impl Render for MessageEditor {
Color::Default
};
let vim_mode_enabled = VimModeSetting::get_global(cx).0;
let platform = PlatformStyle::platform();
let linux = platform == PlatformStyle::Linux;
let windows = platform == PlatformStyle::Windows;
let button_width = if linux || windows || vim_mode_enabled {
px(92.)
} else {
px(64.)
};
v_flex()
.key_context("MessageEditor")
.on_action(cx.listener(Self::chat))
.on_action(cx.listener(Self::toggle_model_selector))
.on_action(cx.listener(|this, action, window, cx| {
let selector = this.model_selector.read(cx).selector.clone();
selector.update(cx, |this, cx| {
this.toggle_model_selector(action, window, cx);
})
}))
.on_action(cx.listener(Self::toggle_context_picker))
.on_action(cx.listener(Self::remove_all_context))
.on_action(cx.listener(Self::move_up))
@@ -333,7 +314,7 @@ impl Render for MessageEditor {
.child(self.context_strip.clone())
.child(
v_flex()
.gap_4()
.gap_5()
.child({
let settings = ThemeSettings::get_global(cx);
let text_style = TextStyle {
@@ -369,11 +350,7 @@ impl Render for MessageEditor {
.anchor(gpui::Corner::BottomLeft)
.offset(gpui::Point {
x: px(0.0),
y: px(-ThemeSettings::clamp_font_size(
ThemeSettings::get_global(cx).ui_font_size,
)
.0 * 2.0)
- px(4.0),
y: (-ThemeSettings::get_global(cx).ui_font_size(cx) * 2) - px(4.0),
})
.with_handle(self.inline_context_picker_menu_handle.clone()),
)
@@ -394,6 +371,7 @@ impl Render for MessageEditor {
&ChatMode,
&focus_handle,
window,
cx,
)),
)
.child(h_flex().gap_1().child(self.model_selector.clone()).child(
@@ -423,6 +401,7 @@ impl Render for MessageEditor {
&editor::actions::Cancel,
&focus_handle,
window,
cx,
)
.map(|binding| binding.into_any_element()),
),
@@ -453,6 +432,7 @@ impl Render for MessageEditor {
&Chat,
&focus_handle,
window,
cx,
)
.map(|binding| binding.into_any_element()),
),

View File

@@ -1,9 +1,8 @@
use crate::inline_prompt_editor::CodegenStatus;
use client::telemetry::Telemetry;
use futures::{channel::mpsc, SinkExt, StreamExt};
use gpui::{App, Context, Entity, EventEmitter, Task};
use language_model::{LanguageModelRegistry, LanguageModelRequest};
use language_models::report_assistant_event;
use gpui::{App, AppContext as _, Context, Entity, EventEmitter, Task};
use language_model::{report_assistant_event, LanguageModelRegistry, LanguageModelRequest};
use std::{sync::Arc, time::Instant};
use telemetry_events::{AssistantEvent, AssistantKind, AssistantPhase};
use terminal::Terminal;
@@ -53,7 +52,7 @@ impl TerminalCodegen {
let (mut hunks_tx, mut hunks_rx) = mpsc::channel(1);
let task = cx.background_executor().spawn({
let task = cx.background_spawn({
let message_id = message_id.clone();
let executor = cx.background_executor().clone();
async move {
@@ -156,7 +155,10 @@ pub enum CodegenEvent {
Finished,
}
#[cfg(not(target_os = "windows"))]
pub const CLEAR_INPUT: &str = "\x15";
#[cfg(target_os = "windows")]
pub const CLEAR_INPUT: &str = "\x03";
const CARRIAGE_RETURN: &str = "\x0d";
struct TerminalTransaction {

View File

@@ -13,9 +13,9 @@ use fs::Fs;
use gpui::{App, Entity, Focusable, Global, Subscription, UpdateGlobal, WeakEntity};
use language::Buffer;
use language_model::{
LanguageModelRegistry, LanguageModelRequest, LanguageModelRequestMessage, Role,
report_assistant_event, LanguageModelRegistry, LanguageModelRequest,
LanguageModelRequestMessage, Role,
};
use language_models::report_assistant_event;
use prompt_library::PromptBuilder;
use std::sync::Arc;
use telemetry_events::{AssistantEvent, AssistantKind, AssistantPhase};

View File

@@ -4,25 +4,26 @@ use anyhow::Result;
use assistant_tool::ToolWorkingSet;
use chrono::{DateTime, Utc};
use collections::{BTreeMap, HashMap, HashSet};
use futures::future::Shared;
use futures::{FutureExt as _, StreamExt as _};
use futures::StreamExt as _;
use gpui::{App, Context, EventEmitter, SharedString, Task};
use language_model::{
LanguageModel, LanguageModelCompletionEvent, LanguageModelRegistry, LanguageModelRequest,
LanguageModelRequestMessage, LanguageModelToolResult, LanguageModelToolUse,
LanguageModelToolUseId, MessageContent, Role, StopReason,
LanguageModelRequestMessage, LanguageModelRequestTool, LanguageModelToolUseId,
MaxMonthlySpendReachedError, MessageContent, PaymentRequiredError, Role, StopReason,
};
use language_models::provider::cloud::{MaxMonthlySpendReachedError, PaymentRequiredError};
use serde::{Deserialize, Serialize};
use util::{post_inc, TryFutureExt as _};
use uuid::Uuid;
use crate::context::{attach_context_to_message, ContextId, ContextSnapshot};
use crate::thread_store::SavedThread;
use crate::tool_use::{PendingToolUse, ToolUse, ToolUseState};
#[derive(Debug, Clone, Copy)]
pub enum RequestKind {
Chat,
/// Used when summarizing a thread.
Summarize,
}
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Serialize, Deserialize)]
@@ -41,7 +42,7 @@ impl std::fmt::Display for ThreadId {
}
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, Serialize, Deserialize)]
pub struct MessageId(usize);
pub struct MessageId(pub(crate) usize);
impl MessageId {
fn post_inc(&mut self) -> Self {
@@ -70,9 +71,7 @@ pub struct Thread {
completion_count: usize,
pending_completions: Vec<PendingCompletion>,
tools: Arc<ToolWorkingSet>,
tool_uses_by_message: HashMap<MessageId, Vec<LanguageModelToolUse>>,
tool_results_by_message: HashMap<MessageId, Vec<LanguageModelToolResult>>,
pending_tool_uses_by_id: HashMap<LanguageModelToolUseId, PendingToolUse>,
tool_use: ToolUseState,
}
impl Thread {
@@ -89,9 +88,7 @@ impl Thread {
completion_count: 0,
pending_completions: Vec::new(),
tools,
tool_uses_by_message: HashMap::default(),
tool_results_by_message: HashMap::default(),
pending_tool_uses_by_id: HashMap::default(),
tool_use: ToolUseState::default(),
}
}
@@ -123,9 +120,7 @@ impl Thread {
completion_count: 0,
pending_completions: Vec::new(),
tools,
tool_uses_by_message: HashMap::default(),
tool_results_by_message: HashMap::default(),
pending_tool_uses_by_id: HashMap::default(),
tool_use: ToolUseState::default(),
}
}
@@ -187,7 +182,15 @@ impl Thread {
}
pub fn pending_tool_uses(&self) -> Vec<&PendingToolUse> {
self.pending_tool_uses_by_id.values().collect()
self.tool_use.pending_tool_uses()
}
pub fn tool_uses_for_message(&self, id: MessageId) -> Vec<ToolUse> {
self.tool_use.tool_uses_for_message(id)
}
pub fn message_has_tool_results(&self, message_id: MessageId) -> bool {
self.tool_use.message_has_tool_results(message_id)
}
pub fn insert_user_message(
@@ -241,9 +244,34 @@ impl Thread {
text
}
pub fn send_to_model(
&mut self,
model: Arc<dyn LanguageModel>,
request_kind: RequestKind,
use_tools: bool,
cx: &mut Context<Self>,
) {
let mut request = self.to_completion_request(request_kind, cx);
if use_tools {
request.tools = self
.tools()
.tools(cx)
.into_iter()
.map(|tool| LanguageModelRequestTool {
name: tool.name(),
description: tool.description(),
input_schema: tool.input_schema(),
})
.collect();
}
self.stream_completion(request, model, cx);
}
pub fn to_completion_request(
&self,
_request_kind: RequestKind,
request_kind: RequestKind,
_cx: &App,
) -> LanguageModelRequest {
let mut request = LanguageModelRequest {
@@ -265,12 +293,13 @@ impl Thread {
content: Vec::new(),
cache: false,
};
if let Some(tool_results) = self.tool_results_by_message.get(&message.id) {
for tool_result in tool_results {
request_message
.content
.push(MessageContent::ToolResult(tool_result.clone()));
match request_kind {
RequestKind::Chat => {
self.tool_use
.attach_tool_results(message.id, &mut request_message);
}
RequestKind::Summarize => {
// We don't care about tool use during summarization.
}
}
@@ -280,11 +309,13 @@ impl Thread {
.push(MessageContent::Text(message.text.clone()));
}
if let Some(tool_uses) = self.tool_uses_by_message.get(&message.id) {
for tool_use in tool_uses {
request_message
.content
.push(MessageContent::ToolUse(tool_use.clone()));
match request_kind {
RequestKind::Chat => {
self.tool_use
.attach_tool_uses(message.id, &mut request_message);
}
RequestKind::Summarize => {
// We don't care about tool use during summarization.
}
}
@@ -360,21 +391,8 @@ impl Thread {
.rfind(|message| message.role == Role::Assistant)
{
thread
.tool_uses_by_message
.entry(last_assistant_message.id)
.or_default()
.push(tool_use.clone());
thread.pending_tool_uses_by_id.insert(
tool_use.id.clone(),
PendingToolUse {
assistant_message_id: last_assistant_message.id,
id: tool_use.id,
name: tool_use.name,
input: tool_use.input,
status: PendingToolUseStatus::Idle,
},
);
.tool_use
.request_tool_use(last_assistant_message.id, tool_use);
}
}
}
@@ -451,7 +469,7 @@ impl Thread {
return;
}
let mut request = self.to_completion_request(RequestKind::Chat, cx);
let mut request = self.to_completion_request(RequestKind::Summarize, cx);
request.messages.push(LanguageModelRequestMessage {
role: Role::User,
content: vec![
@@ -494,7 +512,6 @@ impl Thread {
pub fn insert_tool_output(
&mut self,
assistant_message_id: MessageId,
tool_use_id: LanguageModelToolUseId,
output: Task<Result<String>>,
cx: &mut Context<Self>,
@@ -505,50 +522,18 @@ impl Thread {
let output = output.await;
thread
.update(&mut cx, |thread, cx| {
// The tool use was requested by an Assistant message,
// so we want to attach the tool results to the next
// user message.
let next_user_message = MessageId(assistant_message_id.0 + 1);
thread
.tool_use
.insert_tool_output(tool_use_id.clone(), output);
let tool_results = thread
.tool_results_by_message
.entry(next_user_message)
.or_default();
match output {
Ok(output) => {
tool_results.push(LanguageModelToolResult {
tool_use_id: tool_use_id.to_string(),
content: output,
is_error: false,
});
cx.emit(ThreadEvent::ToolFinished { tool_use_id });
}
Err(err) => {
tool_results.push(LanguageModelToolResult {
tool_use_id: tool_use_id.to_string(),
content: err.to_string(),
is_error: true,
});
if let Some(tool_use) =
thread.pending_tool_uses_by_id.get_mut(&tool_use_id)
{
tool_use.status = PendingToolUseStatus::Error(err.to_string());
}
}
}
cx.emit(ThreadEvent::ToolFinished { tool_use_id });
})
.ok();
}
});
if let Some(tool_use) = self.pending_tool_uses_by_id.get_mut(&tool_use_id) {
tool_use.status = PendingToolUseStatus::Running {
_task: insert_output_task.shared(),
};
}
self.tool_use
.run_pending_tool(tool_use_id, insert_output_task);
}
/// Cancels the last pending completion, if there are any pending.
@@ -590,26 +575,3 @@ struct PendingCompletion {
id: usize,
_task: Task<()>,
}
#[derive(Debug, Clone)]
pub struct PendingToolUse {
pub id: LanguageModelToolUseId,
/// The ID of the Assistant message in which the tool use was requested.
pub assistant_message_id: MessageId,
pub name: String,
pub input: serde_json::Value,
pub status: PendingToolUseStatus,
}
#[derive(Debug, Clone)]
pub enum PendingToolUseStatus {
Idle,
Running { _task: Shared<Task<()>> },
Error(#[allow(unused)] String),
}
impl PendingToolUseStatus {
pub fn is_idle(&self) -> bool {
matches!(self, PendingToolUseStatus::Idle)
}
}

View File

@@ -1,3 +1,4 @@
use assistant_context_editor::SavedContextMetadata;
use gpui::{
uniform_list, App, Entity, FocusHandle, Focusable, ScrollStrategy, UniformListScrollHandle,
WeakEntity,
@@ -5,13 +6,14 @@ use gpui::{
use time::{OffsetDateTime, UtcOffset};
use ui::{prelude::*, IconButtonShape, ListItem, ListItemSpacing, Tooltip};
use crate::thread_store::{SavedThreadMetadata, ThreadStore};
use crate::history_store::{HistoryEntry, HistoryStore};
use crate::thread_store::SavedThreadMetadata;
use crate::{AssistantPanel, RemoveSelectedThread};
pub struct ThreadHistory {
focus_handle: FocusHandle,
assistant_panel: WeakEntity<AssistantPanel>,
thread_store: Entity<ThreadStore>,
history_store: Entity<HistoryStore>,
scroll_handle: UniformListScrollHandle,
selected_index: usize,
}
@@ -19,14 +21,13 @@ pub struct ThreadHistory {
impl ThreadHistory {
pub(crate) fn new(
assistant_panel: WeakEntity<AssistantPanel>,
thread_store: Entity<ThreadStore>,
history_store: Entity<HistoryStore>,
cx: &mut Context<Self>,
) -> Self {
Self {
focus_handle: cx.focus_handle(),
assistant_panel,
thread_store,
history_store,
scroll_handle: UniformListScrollHandle::default(),
selected_index: 0,
}
@@ -38,7 +39,9 @@ impl ThreadHistory {
window: &mut Window,
cx: &mut Context<Self>,
) {
let count = self.thread_store.read(cx).thread_count();
let count = self
.history_store
.update(cx, |this, cx| this.entry_count(cx));
if count > 0 {
if self.selected_index == 0 {
self.set_selected_index(count - 1, window, cx);
@@ -54,7 +57,9 @@ impl ThreadHistory {
window: &mut Window,
cx: &mut Context<Self>,
) {
let count = self.thread_store.read(cx).thread_count();
let count = self
.history_store
.update(cx, |this, cx| this.entry_count(cx));
if count > 0 {
if self.selected_index == count - 1 {
self.set_selected_index(0, window, cx);
@@ -65,14 +70,18 @@ impl ThreadHistory {
}
fn select_first(&mut self, _: &menu::SelectFirst, window: &mut Window, cx: &mut Context<Self>) {
let count = self.thread_store.read(cx).thread_count();
let count = self
.history_store
.update(cx, |this, cx| this.entry_count(cx));
if count > 0 {
self.set_selected_index(0, window, cx);
}
}
fn select_last(&mut self, _: &menu::SelectLast, window: &mut Window, cx: &mut Context<Self>) {
let count = self.thread_store.read(cx).thread_count();
let count = self
.history_store
.update(cx, |this, cx| this.entry_count(cx));
if count > 0 {
self.set_selected_index(count - 1, window, cx);
}
@@ -86,12 +95,23 @@ impl ThreadHistory {
}
fn confirm(&mut self, _: &menu::Confirm, window: &mut Window, cx: &mut Context<Self>) {
let threads = self.thread_store.update(cx, |this, _cx| this.threads());
let entries = self.history_store.update(cx, |this, cx| this.entries(cx));
if let Some(thread) = threads.get(self.selected_index) {
self.assistant_panel
.update(cx, move |this, cx| this.open_thread(&thread.id, window, cx))
.ok();
if let Some(entry) = entries.get(self.selected_index) {
match entry {
HistoryEntry::Thread(thread) => {
self.assistant_panel
.update(cx, move |this, cx| this.open_thread(&thread.id, window, cx))
.ok();
}
HistoryEntry::Context(context) => {
self.assistant_panel
.update(cx, move |this, cx| {
this.open_saved_prompt_editor(context.path.clone(), window, cx)
})
.ok();
}
}
cx.notify();
}
@@ -103,14 +123,25 @@ impl ThreadHistory {
_window: &mut Window,
cx: &mut Context<Self>,
) {
let threads = self.thread_store.update(cx, |this, _cx| this.threads());
let entries = self.history_store.update(cx, |this, cx| this.entries(cx));
if let Some(thread) = threads.get(self.selected_index) {
self.assistant_panel
.update(cx, |this, cx| {
this.delete_thread(&thread.id, cx);
})
.ok();
if let Some(entry) = entries.get(self.selected_index) {
match entry {
HistoryEntry::Thread(thread) => {
self.assistant_panel
.update(cx, |this, cx| {
this.delete_thread(&thread.id, cx);
})
.ok();
}
HistoryEntry::Context(context) => {
self.assistant_panel
.update(cx, |this, cx| {
this.delete_context(context.path.clone(), cx);
})
.ok();
}
}
cx.notify();
}
@@ -125,7 +156,7 @@ impl Focusable for ThreadHistory {
impl Render for ThreadHistory {
fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
let threads = self.thread_store.update(cx, |this, _cx| this.threads());
let history_entries = self.history_store.update(cx, |this, cx| this.entries(cx));
let selected_index = self.selected_index;
v_flex()
@@ -142,7 +173,7 @@ impl Render for ThreadHistory {
.on_action(cx.listener(Self::confirm))
.on_action(cx.listener(Self::remove_selected_thread))
.map(|history| {
if threads.is_empty() {
if history_entries.is_empty() {
history
.justify_center()
.child(
@@ -156,17 +187,26 @@ impl Render for ThreadHistory {
uniform_list(
cx.entity().clone(),
"thread-history",
threads.len(),
history_entries.len(),
move |history, range, _window, _cx| {
threads[range]
history_entries[range]
.iter()
.enumerate()
.map(|(index, thread)| {
h_flex().w_full().pb_1().child(PastThread::new(
thread.clone(),
history.assistant_panel.clone(),
selected_index == index,
))
.map(|(index, entry)| {
h_flex().w_full().pb_1().child(match entry {
HistoryEntry::Thread(thread) => PastThread::new(
thread.clone(),
history.assistant_panel.clone(),
selected_index == index,
)
.into_any_element(),
HistoryEntry::Context(context) => PastContext::new(
context.clone(),
history.assistant_panel.clone(),
selected_index == index,
)
.into_any_element(),
})
})
.collect()
},
@@ -214,18 +254,28 @@ impl RenderOnce for PastThread {
);
ListItem::new(SharedString::from(self.thread.id.to_string()))
.outlined()
.rounded()
.toggle_state(self.selected)
.start_slot(
Icon::new(IconName::MessageCircle)
.size(IconSize::Small)
.color(Color::Muted),
)
.spacing(ListItemSpacing::Sparse)
.child(Label::new(summary).size(LabelSize::Small).text_ellipsis())
.start_slot(
div()
.max_w_4_5()
.child(Label::new(summary).size(LabelSize::Small).text_ellipsis()),
)
.end_slot(
h_flex()
.gap_1p5()
.child(
Label::new("Thread")
.color(Color::Muted)
.size(LabelSize::XSmall),
)
.child(
div()
.size(px(3.))
.rounded_full()
.bg(cx.theme().colors().text_disabled),
)
.child(
Label::new(thread_timestamp)
.color(Color::Muted)
@@ -262,3 +312,100 @@ impl RenderOnce for PastThread {
})
}
}
#[derive(IntoElement)]
pub struct PastContext {
context: SavedContextMetadata,
assistant_panel: WeakEntity<AssistantPanel>,
selected: bool,
}
impl PastContext {
pub fn new(
context: SavedContextMetadata,
assistant_panel: WeakEntity<AssistantPanel>,
selected: bool,
) -> Self {
Self {
context,
assistant_panel,
selected,
}
}
}
impl RenderOnce for PastContext {
fn render(self, _window: &mut Window, cx: &mut App) -> impl IntoElement {
let summary = self.context.title;
let context_timestamp = time_format::format_localized_timestamp(
OffsetDateTime::from_unix_timestamp(self.context.mtime.timestamp()).unwrap(),
OffsetDateTime::now_utc(),
self.assistant_panel
.update(cx, |this, _cx| this.local_timezone())
.unwrap_or(UtcOffset::UTC),
time_format::TimestampFormat::EnhancedAbsolute,
);
ListItem::new(SharedString::from(
self.context.path.to_string_lossy().to_string(),
))
.rounded()
.toggle_state(self.selected)
.spacing(ListItemSpacing::Sparse)
.start_slot(
div()
.max_w_4_5()
.child(Label::new(summary).size(LabelSize::Small).text_ellipsis()),
)
.end_slot(
h_flex()
.gap_1p5()
.child(
Label::new("Prompt Editor")
.color(Color::Muted)
.size(LabelSize::XSmall),
)
.child(
div()
.size(px(3.))
.rounded_full()
.bg(cx.theme().colors().text_disabled),
)
.child(
Label::new(context_timestamp)
.color(Color::Muted)
.size(LabelSize::XSmall),
)
.child(
IconButton::new("delete", IconName::TrashAlt)
.shape(IconButtonShape::Square)
.icon_size(IconSize::XSmall)
.tooltip(Tooltip::text("Delete Prompt Editor"))
.on_click({
let assistant_panel = self.assistant_panel.clone();
let path = self.context.path.clone();
move |_event, _window, cx| {
assistant_panel
.update(cx, |this, cx| {
this.delete_context(path.clone(), cx);
})
.ok();
}
}),
),
)
.on_click({
let assistant_panel = self.assistant_panel.clone();
let path = self.context.path.clone();
move |_event, window, cx| {
assistant_panel
.update(cx, |this, cx| {
this.open_saved_prompt_editor(path.clone(), window, cx)
.detach_and_log_err(cx);
})
.ok();
}
})
}
}

View File

@@ -9,7 +9,9 @@ use context_server::manager::ContextServerManager;
use context_server::{ContextServerFactoryRegistry, ContextServerTool};
use futures::future::{self, BoxFuture, Shared};
use futures::FutureExt as _;
use gpui::{prelude::*, App, BackgroundExecutor, Context, Entity, SharedString, Task};
use gpui::{
prelude::*, App, BackgroundExecutor, Context, Entity, Global, ReadGlobal, SharedString, Task,
};
use heed::types::SerdeBincode;
use heed::Database;
use language_model::Role;
@@ -19,6 +21,10 @@ use util::ResultExt as _;
use crate::thread::{MessageId, Thread, ThreadId};
pub fn init(cx: &mut App) {
ThreadsDatabase::init(cx);
}
pub struct ThreadStore {
#[allow(unused)]
project: Entity<Project>,
@@ -26,7 +32,6 @@ pub struct ThreadStore {
context_server_manager: Entity<ContextServerManager>,
context_server_tool_ids: HashMap<Arc<str>, Vec<ToolId>>,
threads: Vec<SavedThreadMetadata>,
database_future: Shared<BoxFuture<'static, Result<Arc<ThreadsDatabase>, Arc<anyhow::Error>>>>,
}
impl ThreadStore {
@@ -41,24 +46,12 @@ impl ThreadStore {
ContextServerManager::new(context_server_factory_registry, project.clone(), cx)
});
let executor = cx.background_executor().clone();
let database_future = executor
.spawn({
let executor = executor.clone();
let database_path = paths::support_dir().join("threads/threads-db.0.mdb");
async move { ThreadsDatabase::new(database_path, executor) }
})
.then(|result| future::ready(result.map(Arc::new).map_err(Arc::new)))
.boxed()
.shared();
let this = Self {
project,
tools,
context_server_manager,
context_server_tool_ids: HashMap::default(),
threads: Vec::new(),
database_future,
};
this.register_context_server_handlers(cx);
this.reload(cx).detach_and_log_err(cx);
@@ -94,7 +87,7 @@ impl ThreadStore {
cx: &mut Context<Self>,
) -> Task<Result<Entity<Thread>>> {
let id = id.clone();
let database_future = self.database_future.clone();
let database_future = ThreadsDatabase::global_future(cx);
cx.spawn(|this, mut cx| async move {
let database = database_future.await.map_err(|err| anyhow!(err))?;
let thread = database
@@ -127,7 +120,7 @@ impl ThreadStore {
(id, thread)
});
let database_future = self.database_future.clone();
let database_future = ThreadsDatabase::global_future(cx);
cx.spawn(|this, mut cx| async move {
let database = database_future.await.map_err(|err| anyhow!(err))?;
database.save_thread(metadata, thread).await?;
@@ -138,7 +131,7 @@ impl ThreadStore {
pub fn delete_thread(&mut self, id: &ThreadId, cx: &mut Context<Self>) -> Task<Result<()>> {
let id = id.clone();
let database_future = self.database_future.clone();
let database_future = ThreadsDatabase::global_future(cx);
cx.spawn(|this, mut cx| async move {
let database = database_future.await.map_err(|err| anyhow!(err))?;
database.delete_thread(id.clone()).await?;
@@ -149,8 +142,8 @@ impl ThreadStore {
})
}
fn reload(&self, cx: &mut Context<Self>) -> Task<Result<()>> {
let database_future = self.database_future.clone();
pub fn reload(&self, cx: &mut Context<Self>) -> Task<Result<()>> {
let database_future = ThreadsDatabase::global_future(cx);
cx.spawn(|this, mut cx| async move {
let threads = database_future
.await
@@ -253,13 +246,40 @@ pub struct SavedMessage {
pub text: String,
}
struct ThreadsDatabase {
struct GlobalThreadsDatabase(
Shared<BoxFuture<'static, Result<Arc<ThreadsDatabase>, Arc<anyhow::Error>>>>,
);
impl Global for GlobalThreadsDatabase {}
pub(crate) struct ThreadsDatabase {
executor: BackgroundExecutor,
env: heed::Env,
threads: Database<SerdeBincode<ThreadId>, SerdeBincode<SavedThread>>,
}
impl ThreadsDatabase {
fn global_future(
cx: &mut App,
) -> Shared<BoxFuture<'static, Result<Arc<ThreadsDatabase>, Arc<anyhow::Error>>>> {
GlobalThreadsDatabase::global(cx).0.clone()
}
fn init(cx: &mut App) {
let executor = cx.background_executor().clone();
let database_future = executor
.spawn({
let executor = executor.clone();
let database_path = paths::support_dir().join("threads/threads-db.0.mdb");
async move { ThreadsDatabase::new(database_path, executor) }
})
.then(|result| future::ready(result.map(Arc::new).map_err(Arc::new)))
.boxed()
.shared();
cx.set_global(GlobalThreadsDatabase(database_future));
}
pub fn new(path: PathBuf, executor: BackgroundExecutor) -> Result<Self> {
std::fs::create_dir_all(&path)?;

View File

@@ -0,0 +1,221 @@
use std::sync::Arc;
use anyhow::Result;
use collections::HashMap;
use futures::future::Shared;
use futures::FutureExt as _;
use gpui::{SharedString, Task};
use language_model::{
LanguageModelRequestMessage, LanguageModelToolResult, LanguageModelToolUse,
LanguageModelToolUseId, MessageContent,
};
use crate::thread::MessageId;
#[derive(Debug)]
pub struct ToolUse {
pub id: LanguageModelToolUseId,
pub name: SharedString,
pub status: ToolUseStatus,
pub input: serde_json::Value,
}
#[derive(Debug, Clone)]
pub enum ToolUseStatus {
Pending,
Running,
Finished(SharedString),
Error(SharedString),
}
#[derive(Default)]
pub struct ToolUseState {
tool_uses_by_assistant_message: HashMap<MessageId, Vec<LanguageModelToolUse>>,
tool_uses_by_user_message: HashMap<MessageId, Vec<LanguageModelToolUseId>>,
tool_results: HashMap<LanguageModelToolUseId, LanguageModelToolResult>,
pending_tool_uses_by_id: HashMap<LanguageModelToolUseId, PendingToolUse>,
}
impl ToolUseState {
pub fn pending_tool_uses(&self) -> Vec<&PendingToolUse> {
self.pending_tool_uses_by_id.values().collect()
}
pub fn tool_uses_for_message(&self, id: MessageId) -> Vec<ToolUse> {
let Some(tool_uses_for_message) = &self.tool_uses_by_assistant_message.get(&id) else {
return Vec::new();
};
let mut tool_uses = Vec::new();
for tool_use in tool_uses_for_message.iter() {
let tool_result = self.tool_results.get(&tool_use.id);
let status = (|| {
if let Some(tool_result) = tool_result {
return if tool_result.is_error {
ToolUseStatus::Error(tool_result.content.clone().into())
} else {
ToolUseStatus::Finished(tool_result.content.clone().into())
};
}
if let Some(pending_tool_use) = self.pending_tool_uses_by_id.get(&tool_use.id) {
return match pending_tool_use.status {
PendingToolUseStatus::Idle => ToolUseStatus::Pending,
PendingToolUseStatus::Running { .. } => ToolUseStatus::Running,
PendingToolUseStatus::Error(ref err) => {
ToolUseStatus::Error(err.clone().into())
}
};
}
ToolUseStatus::Pending
})();
tool_uses.push(ToolUse {
id: tool_use.id.clone(),
name: tool_use.name.clone().into(),
input: tool_use.input.clone(),
status,
})
}
tool_uses
}
pub fn message_has_tool_results(&self, message_id: MessageId) -> bool {
self.tool_uses_by_user_message
.get(&message_id)
.map_or(false, |results| !results.is_empty())
}
pub fn request_tool_use(
&mut self,
assistant_message_id: MessageId,
tool_use: LanguageModelToolUse,
) {
self.tool_uses_by_assistant_message
.entry(assistant_message_id)
.or_default()
.push(tool_use.clone());
// The tool use is being requested by the Assistant, so we want to
// attach the tool results to the next user message.
let next_user_message_id = MessageId(assistant_message_id.0 + 1);
self.tool_uses_by_user_message
.entry(next_user_message_id)
.or_default()
.push(tool_use.id.clone());
self.pending_tool_uses_by_id.insert(
tool_use.id.clone(),
PendingToolUse {
assistant_message_id,
id: tool_use.id,
name: tool_use.name,
input: tool_use.input,
status: PendingToolUseStatus::Idle,
},
);
}
pub fn run_pending_tool(&mut self, tool_use_id: LanguageModelToolUseId, task: Task<()>) {
if let Some(tool_use) = self.pending_tool_uses_by_id.get_mut(&tool_use_id) {
tool_use.status = PendingToolUseStatus::Running {
_task: task.shared(),
};
}
}
pub fn insert_tool_output(
&mut self,
tool_use_id: LanguageModelToolUseId,
output: Result<String>,
) {
match output {
Ok(output) => {
self.tool_results.insert(
tool_use_id.clone(),
LanguageModelToolResult {
tool_use_id: tool_use_id.clone(),
content: output.into(),
is_error: false,
},
);
self.pending_tool_uses_by_id.remove(&tool_use_id);
}
Err(err) => {
self.tool_results.insert(
tool_use_id.clone(),
LanguageModelToolResult {
tool_use_id: tool_use_id.clone(),
content: err.to_string().into(),
is_error: true,
},
);
if let Some(tool_use) = self.pending_tool_uses_by_id.get_mut(&tool_use_id) {
tool_use.status = PendingToolUseStatus::Error(err.to_string().into());
}
}
}
}
pub fn attach_tool_uses(
&self,
message_id: MessageId,
request_message: &mut LanguageModelRequestMessage,
) {
if let Some(tool_uses) = self.tool_uses_by_assistant_message.get(&message_id) {
for tool_use in tool_uses {
request_message
.content
.push(MessageContent::ToolUse(tool_use.clone()));
}
}
}
pub fn attach_tool_results(
&self,
message_id: MessageId,
request_message: &mut LanguageModelRequestMessage,
) {
if let Some(tool_uses) = self.tool_uses_by_user_message.get(&message_id) {
for tool_use_id in tool_uses {
if let Some(tool_result) = self.tool_results.get(tool_use_id) {
request_message
.content
.push(MessageContent::ToolResult(tool_result.clone()));
}
}
}
}
}
#[derive(Debug, Clone)]
pub struct PendingToolUse {
pub id: LanguageModelToolUseId,
/// The ID of the Assistant message in which the tool use was requested.
pub assistant_message_id: MessageId,
pub name: Arc<str>,
pub input: serde_json::Value,
pub status: PendingToolUseStatus,
}
#[derive(Debug, Clone)]
pub enum PendingToolUseStatus {
Idle,
Running { _task: Shared<Task<()>> },
Error(#[allow(unused)] Arc<str>),
}
impl PendingToolUseStatus {
pub fn is_idle(&self) -> bool {
matches!(self, PendingToolUseStatus::Idle)
}
pub fn is_error(&self) -> bool {
matches!(self, PendingToolUseStatus::Error(_))
}
}

View File

@@ -30,7 +30,6 @@ indexed_docs.workspace = true
language.workspace = true
language_model.workspace = true
language_model_selector.workspace = true
language_models.workspace = true
log.workspace = true
multi_buffer.workspace = true
open_ai.workspace = true

View File

@@ -19,13 +19,10 @@ use gpui::{
};
use language::{AnchorRangeExt, Bias, Buffer, LanguageRegistry, OffsetRangeExt, Point, ToOffset};
use language_model::{
LanguageModel, LanguageModelCacheConfiguration, LanguageModelCompletionEvent,
LanguageModelImage, LanguageModelRegistry, LanguageModelRequest, LanguageModelRequestMessage,
LanguageModelToolUseId, MessageContent, Role, StopReason,
};
use language_models::{
provider::cloud::{MaxMonthlySpendReachedError, PaymentRequiredError},
report_assistant_event,
report_assistant_event, LanguageModel, LanguageModelCacheConfiguration,
LanguageModelCompletionEvent, LanguageModelImage, LanguageModelRegistry, LanguageModelRequest,
LanguageModelRequestMessage, LanguageModelToolUseId, MaxMonthlySpendReachedError,
MessageContent, PaymentRequiredError, Role, StopReason,
};
use open_ai::Model as OpenAiModel;
use paths::contexts_dir;
@@ -851,7 +848,7 @@ impl AssistantContext {
.collect::<Vec<_>>();
context_ops.extend(self.pending_ops.iter().cloned());
cx.background_executor().spawn(async move {
cx.background_spawn(async move {
let buffer_ops = buffer_ops.await;
context_ops.sort_unstable_by_key(|op| op.timestamp());
buffer_ops
@@ -1192,11 +1189,14 @@ impl AssistantContext {
let Some(model) = LanguageModelRegistry::read_global(cx).active_model() else {
return;
};
let debounce = self.token_count.is_some();
self.pending_token_count = cx.spawn(|this, mut cx| {
async move {
cx.background_executor()
.timer(Duration::from_millis(200))
.await;
if debounce {
cx.background_executor()
.timer(Duration::from_millis(200))
.await;
}
let token_count = cx.update(|cx| model.count_tokens(request, cx))?.await?;
this.update(&mut cx, |this, cx| {
@@ -3363,7 +3363,7 @@ impl SavedContextV0_1_0 {
}
}
#[derive(Clone)]
#[derive(Debug, Clone)]
pub struct SavedContextMetadata {
pub title: String,
pub path: PathBuf,

View File

@@ -29,19 +29,22 @@ use gpui::{
WeakEntity,
};
use indexed_docs::IndexedDocsStore;
use language::{language_settings::SoftWrap, BufferSnapshot, LspAdapterDelegate, ToOffset};
use language::{
language_settings::{all_language_settings, SoftWrap},
BufferSnapshot, LspAdapterDelegate, ToOffset,
};
use language_model::{
LanguageModelImage, LanguageModelProvider, LanguageModelProviderTosView, LanguageModelRegistry,
Role,
};
use language_model_selector::{LanguageModelSelector, LanguageModelSelectorPopoverMenu};
use language_model_selector::{AssistantLanguageModelSelector, LanguageModelSelector};
use multi_buffer::MultiBufferRow;
use picker::Picker;
use project::lsp_store::LocalLspAdapterDelegate;
use project::{Project, Worktree};
use rope::Point;
use serde::{Deserialize, Serialize};
use settings::{update_settings_file, Settings};
use settings::{update_settings_file, Settings, SettingsStore};
use std::{any::TypeId, borrow::Cow, cmp, ops::Range, path::PathBuf, sync::Arc, time::Duration};
use text::SelectionGoal;
use ui::{
@@ -77,7 +80,6 @@ actions!(
InsertIntoEditor,
QuoteSelection,
Split,
ToggleModelSelector,
]
);
@@ -193,6 +195,7 @@ pub struct ContextEditor {
// the file is opened. In order to keep the worktree alive for the duration of the
// context editor, we keep a reference here.
dragged_file_worktrees: Vec<Entity<Worktree>>,
language_model_selector: Entity<LanguageModelSelector>,
}
pub const DEFAULT_TAB_TITLE: &str = "New Chat";
@@ -228,6 +231,13 @@ impl ContextEditor {
editor.set_completion_provider(Some(Box::new(completion_provider)));
editor.set_menu_inline_completions_policy(MenuInlineCompletionsPolicy::Never);
editor.set_collaboration_hub(Box::new(project.clone()));
let show_edit_predictions = all_language_settings(None, cx)
.edit_predictions
.enabled_in_assistant;
editor.set_show_edit_predictions(Some(show_edit_predictions), window, cx);
editor
});
@@ -236,8 +246,24 @@ impl ContextEditor {
cx.subscribe_in(&context, window, Self::handle_context_event),
cx.subscribe_in(&editor, window, Self::handle_editor_event),
cx.subscribe_in(&editor, window, Self::handle_editor_search_event),
cx.observe_global_in::<SettingsStore>(window, Self::settings_changed),
];
let fs_clone = fs.clone();
let language_model_selector = cx.new(|cx| {
LanguageModelSelector::new(
move |model, cx| {
update_settings_file::<AssistantSettings>(
fs_clone.clone(),
cx,
move |settings, _| settings.set_model(model.clone()),
);
},
window,
cx,
)
});
let sections = context.read(cx).slash_command_output_sections().to_vec();
let patch_ranges = context.read(cx).patch_ranges().collect::<Vec<_>>();
let slash_commands = context.read(cx).slash_commands().clone();
@@ -262,6 +288,7 @@ impl ContextEditor {
show_accept_terms: false,
slash_menu_handle: Default::default(),
dragged_file_worktrees: Vec::new(),
language_model_selector,
};
this.update_message_headers(cx);
this.update_image_blocks(cx);
@@ -270,6 +297,16 @@ impl ContextEditor {
this
}
fn settings_changed(&mut self, window: &mut Window, cx: &mut Context<Self>) {
self.editor.update(cx, |editor, cx| {
let show_edit_predictions = all_language_settings(None, cx)
.edit_predictions
.enabled_in_assistant;
editor.set_show_edit_predictions(Some(show_edit_predictions), window, cx);
});
}
pub fn context(&self) -> &Entity<AssistantContext> {
&self.context
}
@@ -614,7 +651,7 @@ impl ContextEditor {
}
});
let placeholder = FoldPlaceholder {
render: Arc::new(move |_, _, _, _| Empty.into_any()),
render: Arc::new(move |_, _, _| Empty.into_any()),
..Default::default()
};
let render_toggle = {
@@ -1067,7 +1104,7 @@ impl ContextEditor {
patch: AssistantPatch,
mut cx: AsyncWindowContext,
) -> Result<()> {
let project = this.update(&mut cx, |this, _| this.project.clone())?;
let project = this.read_with(&cx, |this, _| this.project.clone())?;
let resolved_patch = patch.resolve(project.clone(), &mut cx).await;
let editor = cx.new_window_entity(|window, cx| {
@@ -1092,7 +1129,7 @@ impl ContextEditor {
editor
})?;
this.update_in(&mut cx, |this, window, cx| {
this.update(&mut cx, |this, _| {
if let Some(patch_state) = this.patches.get_mut(&patch.range) {
patch_state.editor = Some(PatchEditorState {
editor: editor.downgrade(),
@@ -1100,19 +1137,12 @@ impl ContextEditor {
});
patch_state.update_task.take();
}
this.workspace
.update(cx, |workspace, cx| {
workspace.add_item_to_active_pane(
Box::new(editor.clone()),
None,
false,
window,
cx,
)
})
.log_err();
})?;
this.read_with(&cx, |this, _| this.workspace.clone())?
.update_in(&mut cx, |workspace, window, cx| {
workspace.add_item_to_active_pane(Box::new(editor.clone()), None, false, window, cx)
})
.log_err();
Ok(())
}
@@ -1214,8 +1244,8 @@ impl ContextEditor {
.px_1()
.mr_0p5()
.border_1()
.border_color(theme::color_alpha(colors.border_variant, 0.6))
.bg(theme::color_alpha(colors.element_background, 0.6))
.border_color(colors.border_variant.alpha(0.6))
.bg(colors.element_background.alpha(0.6))
.child("esc"),
)
.child("to cancel")
@@ -1494,15 +1524,11 @@ impl ContextEditor {
(!text.is_empty()).then_some((text, true))
} else {
let anchor = context_editor.selections.newest_anchor();
let text = context_editor
.buffer()
.read(cx)
.read(cx)
.text_for_range(anchor.range())
.collect::<String>();
let selection = context_editor.selections.newest_adjusted(cx);
let buffer = context_editor.buffer().read(cx).snapshot(cx);
let selected_text = buffer.text_for_range(selection.range()).collect::<String>();
(!text.is_empty()).then_some((text, false))
(!selected_text.is_empty()).then_some((selected_text, false))
}
})
}
@@ -1757,23 +1783,16 @@ impl ContextEditor {
&mut self,
cx: &mut Context<Self>,
) -> (String, CopyMetadata, Vec<text::Selection<usize>>) {
let (snapshot, selection, creases) = self.editor.update(cx, |editor, cx| {
let mut selection = editor.selections.newest::<Point>(cx);
let (selection, creases) = self.editor.update(cx, |editor, cx| {
let mut selection = editor.selections.newest_adjusted(cx);
let snapshot = editor.buffer().read(cx).snapshot(cx);
let is_entire_line = selection.is_empty() || editor.selections.line_mode;
if is_entire_line {
selection.start = Point::new(selection.start.row, 0);
selection.end =
cmp::min(snapshot.max_point(), Point::new(selection.start.row + 1, 0));
selection.goal = SelectionGoal::None;
}
selection.goal = SelectionGoal::None;
let selection_start = snapshot.point_to_offset(selection.start);
(
snapshot.clone(),
selection.clone(),
selection.map(|point| snapshot.point_to_offset(point)),
editor.display_map.update(cx, |display_map, cx| {
display_map
.snapshot(cx)
@@ -1813,7 +1832,6 @@ impl ContextEditor {
)
});
let selection = selection.map(|point| snapshot.point_to_offset(point));
let context = self.context.read(cx);
let mut text = String::new();
@@ -2290,7 +2308,7 @@ impl ContextEditor {
},
))
.children(
KeyBinding::for_action_in(&Assist, &focus_handle, window)
KeyBinding::for_action_in(&Assist, &focus_handle, window, cx)
.map(|binding| binding.into_any_element()),
)
.on_click(move |_event, window, cx| {
@@ -2343,7 +2361,7 @@ impl ContextEditor {
.layer(ElevationIndex::ModalSurface)
.child(Label::new("Suggest Edits"))
.children(
KeyBinding::for_action_in(&Edit, &focus_handle, window)
KeyBinding::for_action_in(&Edit, &focus_handle, window, cx)
.map(|binding| binding.into_any_element()),
)
.on_click(move |_event, window, cx| {
@@ -2355,12 +2373,18 @@ impl ContextEditor {
slash_command_picker::SlashCommandSelector::new(
self.slash_commands.clone(),
cx.entity().downgrade(),
Button::new("trigger", "Add Context")
.icon(IconName::Plus)
IconButton::new("trigger", IconName::Plus)
.icon_size(IconSize::Small)
.icon_color(Color::Muted)
.icon_position(IconPosition::Start),
Tooltip::text("Type / to insert via keyboard"),
.icon_color(Color::Muted),
move |window, cx| {
Tooltip::with_meta(
"Add Context",
None,
"Type / to insert via keyboard",
window,
cx,
)
},
)
}
@@ -2593,8 +2617,8 @@ fn render_fold_icon_button(
editor: WeakEntity<Editor>,
icon: IconName,
label: SharedString,
) -> Arc<dyn Send + Sync + Fn(FoldId, Range<Anchor>, &mut Window, &mut App) -> AnyElement> {
Arc::new(move |fold_id, fold_range, _window, _cx| {
) -> Arc<dyn Send + Sync + Fn(FoldId, Range<Anchor>, &mut App) -> AnyElement> {
Arc::new(move |fold_id, fold_range, _cx| {
let editor = editor.clone();
ButtonLike::new(fold_id)
.style(ButtonStyle::Filled)
@@ -2654,7 +2678,7 @@ pub fn fold_toggle(
fn quote_selection_fold_placeholder(title: String, editor: WeakEntity<Editor>) -> FoldPlaceholder {
FoldPlaceholder {
render: Arc::new({
move |fold_id, fold_range, _window, _cx| {
move |fold_id, fold_range, _cx| {
let editor = editor.clone();
ButtonLike::new(fold_id)
.style(ButtonStyle::Filled)
@@ -2808,6 +2832,7 @@ impl Render for ContextEditor {
None
};
let language_model_selector = self.language_model_selector.clone();
v_flex()
.key_context("ContextEditor")
.capture_action(cx.listener(ContextEditor::cancel))
@@ -2820,6 +2845,11 @@ impl Render for ContextEditor {
.on_action(cx.listener(ContextEditor::edit))
.on_action(cx.listener(ContextEditor::assist))
.on_action(cx.listener(ContextEditor::split))
.on_action(move |action, window, cx| {
language_model_selector.update(cx, |this, cx| {
this.toggle_model_selector(action, window, cx);
})
})
.size_full()
.children(self.render_notice(cx))
.child(
@@ -2852,7 +2882,20 @@ impl Render for ContextEditor {
.border_t_1()
.border_color(cx.theme().colors().border_variant)
.bg(cx.theme().colors().editor_background)
.child(h_flex().gap_1().child(self.render_inject_context_menu(cx)))
.child(
h_flex()
.gap_1()
.child(self.render_inject_context_menu(cx))
.child(ui::Divider::vertical())
.child(div().pl_0p5().child({
let focus_handle = self.editor().focus_handle(cx).clone();
AssistantLanguageModelSelector::new(
focus_handle,
self.language_model_selector.clone(),
)
.render(window, cx)
})),
)
.child(
h_flex()
.w_full()
@@ -3163,80 +3206,67 @@ impl FollowableItem for ContextEditor {
pub struct ContextEditorToolbarItem {
active_context_editor: Option<WeakEntity<ContextEditor>>,
model_summary_editor: Entity<Editor>,
language_model_selector: Entity<LanguageModelSelector>,
language_model_selector_menu_handle: PopoverMenuHandle<LanguageModelSelector>,
}
impl ContextEditorToolbarItem {
pub fn new(
workspace: &Workspace,
model_selector_menu_handle: PopoverMenuHandle<LanguageModelSelector>,
model_summary_editor: Entity<Editor>,
window: &mut Window,
cx: &mut Context<Self>,
) -> Self {
pub fn new(model_summary_editor: Entity<Editor>) -> Self {
Self {
active_context_editor: None,
model_summary_editor,
language_model_selector: cx.new(|cx| {
let fs = workspace.app_state().fs.clone();
LanguageModelSelector::new(
move |model, cx| {
update_settings_file::<AssistantSettings>(
fs.clone(),
cx,
move |settings, _| settings.set_model(model.clone()),
);
},
window,
cx,
)
}),
language_model_selector_menu_handle: model_selector_menu_handle,
}
}
}
fn render_remaining_tokens(&self, cx: &mut Context<Self>) -> Option<impl IntoElement> {
let context = &self
.active_context_editor
.as_ref()?
.upgrade()?
.read(cx)
.context;
let (token_count_color, token_count, max_token_count) = match token_state(context, cx)? {
TokenState::NoTokensLeft {
max_token_count,
token_count,
} => (Color::Error, token_count, max_token_count),
TokenState::HasMoreTokens {
max_token_count,
token_count,
over_warn_threshold,
} => {
let color = if over_warn_threshold {
Color::Warning
} else {
Color::Muted
};
(color, token_count, max_token_count)
}
};
Some(
h_flex()
.gap_0p5()
.child(
Label::new(humanize_token_count(token_count))
.size(LabelSize::Small)
.color(token_count_color),
)
.child(Label::new("/").size(LabelSize::Small).color(Color::Muted))
.child(
Label::new(humanize_token_count(max_token_count))
.size(LabelSize::Small)
.color(Color::Muted),
),
)
}
pub fn render_remaining_tokens(
context_editor: &Entity<ContextEditor>,
cx: &App,
) -> Option<impl IntoElement> {
let context = &context_editor.read(cx).context;
let (token_count_color, token_count, max_token_count, tooltip) = match token_state(context, cx)?
{
TokenState::NoTokensLeft {
max_token_count,
token_count,
} => (
Color::Error,
token_count,
max_token_count,
Some("Token Limit Reached"),
),
TokenState::HasMoreTokens {
max_token_count,
token_count,
over_warn_threshold,
} => {
let (color, tooltip) = if over_warn_threshold {
(Color::Warning, Some("Token Limit is Close to Exhaustion"))
} else {
(Color::Muted, None)
};
(color, token_count, max_token_count, tooltip)
}
};
Some(
h_flex()
.id("token-count")
.gap_0p5()
.child(
Label::new(humanize_token_count(token_count))
.size(LabelSize::Small)
.color(token_count_color),
)
.child(Label::new("/").size(LabelSize::Small).color(Color::Muted))
.child(
Label::new(humanize_token_count(max_token_count))
.size(LabelSize::Small)
.color(Color::Muted),
)
.when_some(tooltip, |element, tooltip| {
element.tooltip(Tooltip::text(tooltip))
}),
)
}
impl Render for ContextEditorToolbarItem {
@@ -3263,8 +3293,7 @@ impl Render for ContextEditorToolbarItem {
})),
),
);
let active_provider = LanguageModelRegistry::read_global(cx).active_provider();
let active_model = LanguageModelRegistry::read_global(cx).active_model();
let right_side = h_flex()
.gap_2()
// TODO display this in a nicer way, once we have a design for it.
@@ -3280,57 +3309,12 @@ impl Render for ContextEditorToolbarItem {
// scan_items_remaining
// .map(|remaining_items| format!("Files to scan: {}", remaining_items))
// })
.child(
LanguageModelSelectorPopoverMenu::new(
self.language_model_selector.clone(),
ButtonLike::new("active-model")
.style(ButtonStyle::Subtle)
.child(
h_flex()
.w_full()
.gap_0p5()
.child(
div()
.overflow_x_hidden()
.flex_grow()
.whitespace_nowrap()
.child(match (active_provider, active_model) {
(Some(provider), Some(model)) => h_flex()
.gap_1()
.child(
Icon::new(
model
.icon()
.unwrap_or_else(|| provider.icon()),
)
.color(Color::Muted)
.size(IconSize::XSmall),
)
.child(
Label::new(model.name().0)
.size(LabelSize::Small)
.color(Color::Muted),
)
.into_any_element(),
_ => Label::new("No model selected")
.size(LabelSize::Small)
.color(Color::Muted)
.into_any_element(),
}),
)
.child(
Icon::new(IconName::ChevronDown)
.color(Color::Muted)
.size(IconSize::XSmall),
),
),
move |window, cx| {
Tooltip::for_action("Change Model", &ToggleModelSelector, window, cx)
},
)
.with_handle(self.language_model_selector_menu_handle.clone()),
)
.children(self.render_remaining_tokens(cx));
.children(
self.active_context_editor
.as_ref()
.and_then(|editor| editor.upgrade())
.and_then(|editor| render_remaining_tokens(&editor, cx)),
);
h_flex()
.px_0p5()
@@ -3386,7 +3370,7 @@ fn invoked_slash_command_fold_placeholder(
FoldPlaceholder {
constrain_width: false,
merge_adjacent: false,
render: Arc::new(move |fold_id, _, _window, cx| {
render: Arc::new(move |fold_id, _, cx| {
let Some(context) = context.upgrade() else {
return Empty.into_any();
};

View File

@@ -9,7 +9,7 @@ use clock::ReplicaId;
use collections::HashMap;
use context_server::manager::ContextServerManager;
use context_server::ContextServerFactoryRegistry;
use fs::Fs;
use fs::{Fs, RemoveOptions};
use futures::StreamExt;
use fuzzy::StringMatchCandidate;
use gpui::{App, AppContext as _, AsyncApp, Context, Entity, EventEmitter, Task, WeakEntity};
@@ -265,19 +265,18 @@ impl ContextStore {
local_versions.push(context.version(cx).to_proto(context_id.clone()));
let client = this.client.clone();
let project_id = envelope.payload.project_id;
cx.background_executor()
.spawn(async move {
let operations = operations.await;
for operation in operations {
client.send(proto::UpdateContext {
project_id,
context_id: context_id.to_proto(),
operation: Some(operation),
})?;
}
anyhow::Ok(())
})
.detach_and_log_err(cx);
cx.background_spawn(async move {
let operations = operations.await;
for operation in operations {
client.send(proto::UpdateContext {
project_id,
context_id: context_id.to_proto(),
operation: Some(operation),
})?;
}
anyhow::Ok(())
})
.detach_and_log_err(cx);
}
}
@@ -351,6 +350,12 @@ impl ContextStore {
}
}
pub fn contexts(&self) -> Vec<SavedContextMetadata> {
let mut contexts = self.contexts_metadata.iter().cloned().collect::<Vec<_>>();
contexts.sort_unstable_by_key(|thread| std::cmp::Reverse(thread.mtime));
contexts
}
pub fn create(&mut self, cx: &mut Context<Self>) -> Entity<AssistantContext> {
let context = cx.new(|cx| {
AssistantContext::local(
@@ -401,8 +406,7 @@ impl ContextStore {
)
})?;
let operations = cx
.background_executor()
.spawn(async move {
.background_spawn(async move {
context_proto
.operations
.into_iter()
@@ -436,7 +440,7 @@ impl ContextStore {
let languages = self.languages.clone();
let project = self.project.clone();
let telemetry = self.telemetry.clone();
let load = cx.background_executor().spawn({
let load = cx.background_spawn({
let path = path.clone();
async move {
let saved_context = fs.load(&path).await?;
@@ -471,6 +475,38 @@ impl ContextStore {
})
}
pub fn delete_local_context(
&mut self,
path: PathBuf,
cx: &mut Context<Self>,
) -> Task<Result<()>> {
let fs = self.fs.clone();
cx.spawn(|this, mut cx| async move {
fs.remove_file(
&path,
RemoveOptions {
recursive: false,
ignore_if_not_exists: true,
},
)
.await?;
this.update(&mut cx, |this, cx| {
this.contexts.retain(|context| {
context
.upgrade()
.and_then(|context| context.read(cx).path())
!= Some(&path)
});
this.contexts_metadata
.retain(|context| context.path != path);
})?;
Ok(())
})
}
fn loaded_context_for_path(&self, path: &Path, cx: &App) -> Option<Entity<AssistantContext>> {
self.contexts.iter().find_map(|context| {
let context = context.upgrade()?;
@@ -539,8 +575,7 @@ impl ContextStore {
)
})?;
let operations = cx
.background_executor()
.spawn(async move {
.background_spawn(async move {
context_proto
.operations
.into_iter()
@@ -693,7 +728,7 @@ impl ContextStore {
pub fn search(&self, query: String, cx: &App) -> Task<Vec<SavedContextMetadata>> {
let metadata = self.contexts_metadata.clone();
let executor = cx.background_executor().clone();
cx.background_executor().spawn(async move {
cx.background_spawn(async move {
if query.is_empty() {
metadata
} else {

View File

@@ -2,7 +2,7 @@ use anyhow::{anyhow, Context as _, Result};
use collections::HashMap;
use editor::ProposedChangesEditor;
use futures::{future, TryFutureExt as _};
use gpui::{App, AsyncApp, Entity, SharedString};
use gpui::{App, AppContext as _, AsyncApp, Entity, SharedString};
use language::{AutoindentMode, Buffer, BufferSnapshot};
use project::{Project, ProjectPath};
use std::{cmp, ops::Range, path::Path, sync::Arc};
@@ -140,7 +140,7 @@ impl ResolvedPatch {
buffer.edit(
edits,
Some(AutoindentMode::Block {
original_indent_columns: Vec::new(),
original_start_columns: Vec::new(),
}),
cx,
);
@@ -258,8 +258,7 @@ impl AssistantEdit {
let snapshot = buffer.update(&mut cx, |buffer, _| buffer.snapshot())?;
let suggestion = cx
.background_executor()
.spawn(async move { kind.resolve(&snapshot) })
.background_spawn(async move { kind.resolve(&snapshot) })
.await;
Ok((buffer, suggestion))
@@ -547,7 +546,7 @@ impl Eq for AssistantPatch {}
#[cfg(test)]
mod tests {
use super::*;
use gpui::{App, AppContext as _};
use gpui::App;
use language::{
language_settings::AllLanguageSettings, Language, LanguageConfig, LanguageMatcher,
};

View File

@@ -4,10 +4,10 @@ pub use assistant_slash_command::SlashCommand;
use assistant_slash_command::{AfterCompletion, SlashCommandLine, SlashCommandWorkingSet};
use editor::{CompletionProvider, Editor};
use fuzzy::{match_strings, StringMatchCandidate};
use gpui::{App, Context, Entity, Task, WeakEntity, Window};
use language::{Anchor, Buffer, CompletionDocumentation, LanguageServerId, ToPoint};
use gpui::{App, AppContext as _, Context, Entity, Task, WeakEntity, Window};
use language::{Anchor, Buffer, LanguageServerId, ToPoint};
use parking_lot::Mutex;
use project::CompletionIntent;
use project::{lsp_store::CompletionDocumentation, CompletionIntent};
use rope::Point;
use std::{
cell::RefCell,
@@ -121,7 +121,7 @@ impl SlashCommandCompletionProvider {
Some(project::Completion {
old_range: name_range.clone(),
documentation: Some(CompletionDocumentation::SingleLine(
command.description(),
command.description().into(),
)),
new_text,
label: command.label(cx),
@@ -163,7 +163,7 @@ impl SlashCommandCompletionProvider {
let editor = self.editor.clone();
let workspace = self.workspace.clone();
let arguments = arguments.to_vec();
cx.background_executor().spawn(async move {
cx.background_spawn(async move {
Ok(completions
.await?
.into_iter()

View File

@@ -102,8 +102,7 @@ impl PickerDelegate for SlashCommandDelegate {
let all_commands = self.all_commands.clone();
cx.spawn_in(window, |this, mut cx| async move {
let filtered_commands = cx
.background_executor()
.spawn(async move {
.background_spawn(async move {
if query.is_empty() {
all_commands
} else {

View File

@@ -359,6 +359,7 @@ fn providers_schema(_: &mut schemars::gen::SchemaGenerator) -> schemars::schema:
schemars::schema::SchemaObject {
enum_values: Some(vec![
"anthropic".into(),
"bedrock".into(),
"google".into(),
"lmstudio".into(),
"ollama".into(),
@@ -512,7 +513,7 @@ mod tests {
AssistantSettings::get_global(cx).default_model,
LanguageModelSelection {
provider: "zed.dev".into(),
model: "claude-3-5-sonnet".into(),
model: "claude-3-5-sonnet-latest".into(),
}
);
});

View File

@@ -103,7 +103,7 @@ impl SlashCommand for ExtensionSlashCommand {
) -> Task<Result<Vec<ArgumentCompletion>>> {
let command = self.command.clone();
let arguments = arguments.to_owned();
cx.background_executor().spawn(async move {
cx.background_spawn(async move {
let completions = self
.extension
.complete_slash_command_argument(command, arguments)
@@ -135,7 +135,7 @@ impl SlashCommand for ExtensionSlashCommand {
) -> Task<SlashCommandResult> {
let command = self.command.clone();
let arguments = arguments.to_owned();
let output = cx.background_executor().spawn(async move {
let output = cx.background_spawn(async move {
let delegate =
delegate.map(|delegate| Arc::new(WorktreeDelegateAdapter(delegate.clone())) as _);
let output = self

View File

@@ -82,7 +82,7 @@ impl SlashCommand for AutoCommand {
project_index.flush_summary_backlogs(cx)
})?;
cx.background_executor().spawn(task).await;
cx.background_spawn(task).await;
anyhow::Ok(Vec::new())
})
@@ -129,7 +129,7 @@ impl SlashCommand for AutoCommand {
// so you don't have to write it again.
let original_prompt = argument.to_string();
cx.background_executor().spawn(async move {
cx.background_spawn(async move {
let commands = task.await?;
let mut prompt = String::new();
@@ -285,57 +285,56 @@ async fn commands_for_summaries(
})
.collect::<Vec<_>>();
cx.background_executor()
.spawn(async move {
let futures = completion_streams
.into_iter()
.enumerate()
.map(|(ix, (stream, tx))| async move {
let start = std::time::Instant::now();
let events = stream.await?;
log::info!("Time taken for awaiting /await chunk stream #{ix}: {:?}", start.elapsed());
cx.background_spawn(async move {
let futures = completion_streams
.into_iter()
.enumerate()
.map(|(ix, (stream, tx))| async move {
let start = std::time::Instant::now();
let events = stream.await?;
log::info!("Time taken for awaiting /await chunk stream #{ix}: {:?}", start.elapsed());
let completion: String = events
.filter_map(|event| async {
if let Ok(LanguageModelCompletionEvent::Text(text)) = event {
Some(text)
} else {
None
}
})
.collect()
.await;
log::info!("Time taken for all /auto chunks to come back for #{ix}: {:?}", start.elapsed());
for line in completion.split('\n') {
if let Some(first_space) = line.find(' ') {
let command = &line[..first_space].trim();
let arg = &line[first_space..].trim();
tx.send(CommandToRun {
name: command.to_string(),
arg: arg.to_string(),
})
.await?;
} else if !line.trim().is_empty() {
// All slash-commands currently supported in context inference need a space for the argument.
log::warn!(
"Context inference returned a non-blank line that contained no spaces (meaning no argument for the slash command): {:?}",
line
);
let completion: String = events
.filter_map(|event| async {
if let Ok(LanguageModelCompletionEvent::Text(text)) = event {
Some(text)
} else {
None
}
})
.collect()
.await;
log::info!("Time taken for all /auto chunks to come back for #{ix}: {:?}", start.elapsed());
for line in completion.split('\n') {
if let Some(first_space) = line.find(' ') {
let command = &line[..first_space].trim();
let arg = &line[first_space..].trim();
tx.send(CommandToRun {
name: command.to_string(),
arg: arg.to_string(),
})
.await?;
} else if !line.trim().is_empty() {
// All slash-commands currently supported in context inference need a space for the argument.
log::warn!(
"Context inference returned a non-blank line that contained no spaces (meaning no argument for the slash command): {:?}",
line
);
}
}
anyhow::Ok(())
})
.collect::<Vec<_>>();
anyhow::Ok(())
})
.collect::<Vec<_>>();
let _ = futures::future::try_join_all(futures).await.log_err();
let _ = futures::future::try_join_all(futures).await.log_err();
let duration = all_start.elapsed();
eprintln!("All futures completed in {:?}", duration);
})
let duration = all_start.elapsed();
eprintln!("All futures completed in {:?}", duration);
})
.await;
drop(tx); // Close the channel so that rx.collect() won't hang. This is safe because all futures have completed.

View File

@@ -132,7 +132,7 @@ impl SlashCommand for CargoWorkspaceSlashCommand {
let project = workspace.project().clone();
let fs = workspace.project().read(cx).fs().clone();
let path = Self::path_to_cargo_toml(project, cx);
let output = cx.background_executor().spawn(async move {
let output = cx.background_spawn(async move {
let path = path.with_context(|| "Cargo.toml not found")?;
Self::build_message(fs, &path).await
});

View File

@@ -21,11 +21,11 @@ impl SlashCommand for DefaultSlashCommand {
}
fn description(&self) -> String {
"insert default prompt".into()
"Insert default prompt".into()
}
fn menu_text(&self) -> String {
"Insert Default Prompt".into()
self.description()
}
fn requires_argument(&self) -> bool {
@@ -54,7 +54,7 @@ impl SlashCommand for DefaultSlashCommand {
cx: &mut App,
) -> Task<SlashCommandResult> {
let store = PromptStore::global(cx);
cx.background_executor().spawn(async move {
cx.background_spawn(async move {
let store = store.await?;
let prompts = store.default_prompt_metadata();

View File

@@ -86,7 +86,7 @@ impl SlashCommand for DeltaSlashCommand {
}
}
cx.background_executor().spawn(async move {
cx.background_spawn(async move {
let mut output = SlashCommandOutput::default();
let mut changes_detected = false;

View File

@@ -129,7 +129,7 @@ impl SlashCommand for DiagnosticsSlashCommand {
let paths = self.search_paths(query.clone(), cancellation_flag.clone(), &workspace, cx);
let executor = cx.background_executor().clone();
cx.background_executor().spawn(async move {
cx.background_spawn(async move {
let mut matches: Vec<String> = paths
.await
.into_iter()

View File

@@ -176,7 +176,7 @@ impl SlashCommand for DocsSlashCommand {
.provider()
.ok_or_else(|| anyhow!("no docs provider specified"))
.and_then(|provider| IndexedDocsStore::try_global(provider, cx));
cx.background_executor().spawn(async move {
cx.background_spawn(async move {
fn build_completions(items: Vec<String>) -> Vec<ArgumentCompletion> {
items
.into_iter()
@@ -284,7 +284,7 @@ impl SlashCommand for DocsSlashCommand {
let args = DocsSlashCommandArgs::parse(arguments);
let executor = cx.background_executor().clone();
let task = cx.background_executor().spawn({
let task = cx.background_spawn({
let store = args
.provider()
.ok_or_else(|| anyhow!("no docs provider specified"))

View File

@@ -151,7 +151,7 @@ impl SlashCommand for FetchSlashCommand {
let http_client = workspace.read(cx).client().http_client();
let url = argument.to_string();
let text = cx.background_executor().spawn({
let text = cx.background_spawn({
let url = url.clone();
async move { Self::build_message(http_client, &url).await }
});

View File

@@ -156,7 +156,7 @@ impl SlashCommand for FileSlashCommand {
cx,
);
let comment_id = cx.theme().syntax().highlight_id("comment").map(HighlightId);
cx.background_executor().spawn(async move {
cx.background_spawn(async move {
Ok(paths
.await
.into_iter()

View File

@@ -130,49 +130,48 @@ impl SlashCommand for ProjectSlashCommand {
let results = SemanticDb::load_results(results, &fs, &cx).await?;
cx.background_executor()
.spawn(async move {
let mut output = "Project context:\n".to_string();
let mut sections = Vec::new();
cx.background_spawn(async move {
let mut output = "Project context:\n".to_string();
let mut sections = Vec::new();
for (ix, query) in search_queries.into_iter().enumerate() {
let start_ix = output.len();
writeln!(&mut output, "Results for {query}:").unwrap();
let mut has_results = false;
for result in &results {
if result.query_index == ix {
add_search_result_section(result, &mut output, &mut sections);
has_results = true;
}
}
if has_results {
sections.push(SlashCommandOutputSection {
range: start_ix..output.len(),
icon: IconName::MagnifyingGlass,
label: query.into(),
metadata: None,
});
output.push('\n');
} else {
output.truncate(start_ix);
for (ix, query) in search_queries.into_iter().enumerate() {
let start_ix = output.len();
writeln!(&mut output, "Results for {query}:").unwrap();
let mut has_results = false;
for result in &results {
if result.query_index == ix {
add_search_result_section(result, &mut output, &mut sections);
has_results = true;
}
}
sections.push(SlashCommandOutputSection {
range: 0..output.len(),
icon: IconName::Book,
label: "Project context".into(),
metadata: None,
});
Ok(SlashCommandOutput {
text: output,
sections,
run_commands_in_text: true,
if has_results {
sections.push(SlashCommandOutputSection {
range: start_ix..output.len(),
icon: IconName::MagnifyingGlass,
label: query.into(),
metadata: None,
});
output.push('\n');
} else {
output.truncate(start_ix);
}
.to_event_stream())
})
.await
}
sections.push(SlashCommandOutputSection {
range: 0..output.len(),
icon: IconName::Book,
label: "Project context".into(),
metadata: None,
});
Ok(SlashCommandOutput {
text: output,
sections,
run_commands_in_text: true,
}
.to_event_stream())
})
.await
})
}
}

View File

@@ -43,7 +43,7 @@ impl SlashCommand for PromptSlashCommand {
) -> Task<Result<Vec<ArgumentCompletion>>> {
let store = PromptStore::global(cx);
let query = arguments.to_owned().join(" ");
cx.background_executor().spawn(async move {
cx.background_spawn(async move {
let prompts = store.await?.search(query).await;
Ok(prompts
.into_iter()
@@ -77,7 +77,7 @@ impl SlashCommand for PromptSlashCommand {
let store = PromptStore::global(cx);
let title = SharedString::from(title.clone());
let prompt = cx.background_executor().spawn({
let prompt = cx.background_spawn({
let title = title.clone();
async move {
let store = store.await?;

View File

@@ -119,8 +119,7 @@ impl SlashCommand for SearchSlashCommand {
let loaded_results = SemanticDb::load_results(results, &fs, &cx).await?;
let output = cx
.background_executor()
.spawn(async move {
.background_spawn(async move {
let mut text = format!("Search results for {query}:\n");
let mut sections = Vec::new();
for loaded_result in &loaded_results {

View File

@@ -63,56 +63,55 @@ impl SlashCommand for StreamingExampleSlashCommand {
cx: &mut App,
) -> Task<SlashCommandResult> {
let (events_tx, events_rx) = mpsc::unbounded();
cx.background_executor()
.spawn(async move {
events_tx.unbounded_send(Ok(SlashCommandEvent::StartSection {
icon: IconName::FileRust,
label: "Section 1".into(),
metadata: None,
}))?;
events_tx.unbounded_send(Ok(SlashCommandEvent::Content(
SlashCommandContent::Text {
text: "Hello".into(),
run_commands_in_text: false,
},
)))?;
events_tx.unbounded_send(Ok(SlashCommandEvent::EndSection))?;
cx.background_spawn(async move {
events_tx.unbounded_send(Ok(SlashCommandEvent::StartSection {
icon: IconName::FileRust,
label: "Section 1".into(),
metadata: None,
}))?;
events_tx.unbounded_send(Ok(SlashCommandEvent::Content(
SlashCommandContent::Text {
text: "Hello".into(),
run_commands_in_text: false,
},
)))?;
events_tx.unbounded_send(Ok(SlashCommandEvent::EndSection))?;
Timer::after(Duration::from_secs(1)).await;
events_tx.unbounded_send(Ok(SlashCommandEvent::StartSection {
icon: IconName::FileRust,
label: "Section 2".into(),
metadata: None,
}))?;
events_tx.unbounded_send(Ok(SlashCommandEvent::Content(
SlashCommandContent::Text {
text: "World".into(),
run_commands_in_text: false,
},
)))?;
events_tx.unbounded_send(Ok(SlashCommandEvent::EndSection))?;
for n in 1..=10 {
Timer::after(Duration::from_secs(1)).await;
events_tx.unbounded_send(Ok(SlashCommandEvent::StartSection {
icon: IconName::FileRust,
label: "Section 2".into(),
icon: IconName::StarFilled,
label: format!("Section {n}").into(),
metadata: None,
}))?;
events_tx.unbounded_send(Ok(SlashCommandEvent::Content(
SlashCommandContent::Text {
text: "World".into(),
text: "lorem ipsum ".repeat(n).trim().into(),
run_commands_in_text: false,
},
)))?;
events_tx.unbounded_send(Ok(SlashCommandEvent::EndSection))?;
}
for n in 1..=10 {
Timer::after(Duration::from_secs(1)).await;
events_tx.unbounded_send(Ok(SlashCommandEvent::StartSection {
icon: IconName::StarFilled,
label: format!("Section {n}").into(),
metadata: None,
}))?;
events_tx.unbounded_send(Ok(SlashCommandEvent::Content(
SlashCommandContent::Text {
text: "lorem ipsum ".repeat(n).trim().into(),
run_commands_in_text: false,
},
)))?;
events_tx.unbounded_send(Ok(SlashCommandEvent::EndSection))?;
}
anyhow::Ok(())
})
.detach_and_log_err(cx);
anyhow::Ok(())
})
.detach_and_log_err(cx);
Task::ready(Ok(events_rx.boxed()))
}

View File

@@ -4,7 +4,7 @@ use assistant_slash_command::{
SlashCommandResult,
};
use editor::Editor;
use gpui::{Task, WeakEntity};
use gpui::{AppContext as _, Task, WeakEntity};
use language::{BufferSnapshot, LspAdapterDelegate};
use std::sync::Arc;
use std::{path::Path, sync::atomic::AtomicBool};
@@ -69,7 +69,7 @@ impl SlashCommand for OutlineSlashCommand {
let snapshot = buffer.read(cx).snapshot();
let path = snapshot.resolve_file_path(cx, true);
cx.background_executor().spawn(async move {
cx.background_spawn(async move {
let outline = snapshot
.outline(None)
.context("no symbols for active tab")?;

View File

@@ -152,7 +152,7 @@ impl SlashCommand for TabSlashCommand {
cx,
);
cx.background_executor().spawn(async move {
cx.background_spawn(async move {
let mut output = SlashCommandOutput::default();
for (full_path, buffer, _) in tab_items_search.await? {
append_buffer_to_output(&buffer, full_path.as_deref(), &mut output).log_err();
@@ -212,74 +212,73 @@ fn tab_items_for_queries(
})??;
let background_executor = cx.background_executor().clone();
cx.background_executor()
.spawn(async move {
open_buffers.sort_by_key(|(_, _, timestamp)| *timestamp);
if empty_query
|| queries
.iter()
.any(|query| query == ALL_TABS_COMPLETION_ITEM)
{
return Ok(open_buffers);
}
cx.background_spawn(async move {
open_buffers.sort_by_key(|(_, _, timestamp)| *timestamp);
if empty_query
|| queries
.iter()
.any(|query| query == ALL_TABS_COMPLETION_ITEM)
{
return Ok(open_buffers);
}
let matched_items = if strict_match {
let match_candidates = open_buffers
.iter()
.enumerate()
.filter_map(|(id, (full_path, ..))| {
let path_string = full_path.as_deref()?.to_string_lossy().to_string();
Some((id, path_string))
})
.fold(HashMap::default(), |mut candidates, (id, path_string)| {
candidates
.entry(path_string)
.or_insert_with(Vec::new)
.push(id);
candidates
});
queries
.iter()
.filter_map(|query| match_candidates.get(query))
.flatten()
.copied()
.filter_map(|id| open_buffers.get(id))
.cloned()
.collect()
} else {
let match_candidates = open_buffers
.iter()
.enumerate()
.filter_map(|(id, (full_path, ..))| {
let path_string = full_path.as_deref()?.to_string_lossy().to_string();
Some(fuzzy::StringMatchCandidate::new(id, &path_string))
})
.collect::<Vec<_>>();
let mut processed_matches = HashSet::default();
let file_queries = queries.iter().map(|query| {
fuzzy::match_strings(
&match_candidates,
query,
true,
usize::MAX,
&cancel,
background_executor.clone(),
)
let matched_items = if strict_match {
let match_candidates = open_buffers
.iter()
.enumerate()
.filter_map(|(id, (full_path, ..))| {
let path_string = full_path.as_deref()?.to_string_lossy().to_string();
Some((id, path_string))
})
.fold(HashMap::default(), |mut candidates, (id, path_string)| {
candidates
.entry(path_string)
.or_insert_with(Vec::new)
.push(id);
candidates
});
join_all(file_queries)
.await
.into_iter()
.flatten()
.filter(|string_match| processed_matches.insert(string_match.candidate_id))
.filter_map(|string_match| open_buffers.get(string_match.candidate_id))
.cloned()
.collect()
};
Ok(matched_items)
})
.await
queries
.iter()
.filter_map(|query| match_candidates.get(query))
.flatten()
.copied()
.filter_map(|id| open_buffers.get(id))
.cloned()
.collect()
} else {
let match_candidates = open_buffers
.iter()
.enumerate()
.filter_map(|(id, (full_path, ..))| {
let path_string = full_path.as_deref()?.to_string_lossy().to_string();
Some(fuzzy::StringMatchCandidate::new(id, &path_string))
})
.collect::<Vec<_>>();
let mut processed_matches = HashSet::default();
let file_queries = queries.iter().map(|query| {
fuzzy::match_strings(
&match_candidates,
query,
true,
usize::MAX,
&cancel,
background_executor.clone(),
)
});
join_all(file_queries)
.await
.into_iter()
.flatten()
.filter(|string_match| processed_matches.insert(string_match.candidate_id))
.filter_map(|string_match| open_buffers.get(string_match.candidate_id))
.cloned()
.collect()
};
Ok(matched_items)
})
.await
})
}

View File

@@ -17,7 +17,7 @@ pub enum Timezone {
}
#[derive(Debug, Serialize, Deserialize, JsonSchema)]
pub struct FileToolInput {
pub struct NowToolInput {
/// The timezone to use for the datetime.
timezone: Timezone,
}
@@ -34,7 +34,7 @@ impl Tool for NowTool {
}
fn input_schema(&self) -> serde_json::Value {
let schema = schemars::schema_for!(FileToolInput);
let schema = schemars::schema_for!(NowToolInput);
serde_json::to_value(&schema).unwrap()
}
@@ -45,7 +45,7 @@ impl Tool for NowTool {
_window: &mut Window,
_cx: &mut App,
) -> Task<Result<String>> {
let input: FileToolInput = match serde_json::from_value(input) {
let input: NowToolInput = match serde_json::from_value(input) {
Ok(input) => input,
Err(err) => return Task::ready(Err(anyhow!(err))),
};

View File

@@ -513,7 +513,7 @@ impl AutoUpdater {
should_show: bool,
cx: &App,
) -> Task<Result<()>> {
cx.background_executor().spawn(async move {
cx.background_spawn(async move {
if should_show {
KEY_VALUE_STORE
.write_kvp(
@@ -531,7 +531,7 @@ impl AutoUpdater {
}
pub fn should_show_update_notification(&self, cx: &App) -> Task<Result<bool>> {
cx.background_executor().spawn(async move {
cx.background_spawn(async move {
Ok(KEY_VALUE_STORE
.read_kvp(SHOULD_SHOW_UPDATE_NOTIFICATION_KEY)?
.is_some())

View File

@@ -19,7 +19,6 @@ editor.workspace = true
gpui.workspace = true
http_client.workspace = true
markdown_preview.workspace = true
menu.workspace = true
release_channel.workspace = true
serde.workspace = true
serde_json.workspace = true

View File

@@ -1,19 +1,17 @@
mod update_notification;
use auto_update::AutoUpdater;
use client::proto::UpdateNotification;
use editor::{Editor, MultiBuffer};
use gpui::{actions, prelude::*, App, Context, Entity, SharedString, Window};
use gpui::{actions, prelude::*, App, Context, DismissEvent, Entity, SharedString, Window};
use http_client::HttpClient;
use markdown_preview::markdown_preview_view::{MarkdownPreviewMode, MarkdownPreviewView};
use release_channel::{AppVersion, ReleaseChannel};
use serde::Deserialize;
use smol::io::AsyncReadExt;
use util::ResultExt as _;
use workspace::notifications::simple_message_notification::MessageNotification;
use workspace::notifications::{show_app_notification, NotificationId};
use workspace::Workspace;
use crate::update_notification::UpdateNotification;
actions!(auto_update, [ViewReleaseNotesLocally]);
pub fn init(cx: &mut App) {
@@ -131,19 +129,32 @@ pub fn notify_if_app_was_updated(cx: &mut App) {
let Some(updater) = AutoUpdater::get(cx) else {
return;
};
let version = updater.read(cx).current_version();
let should_show_notification = updater.read(cx).should_show_update_notification(cx);
cx.spawn(|cx| async move {
let should_show_notification = should_show_notification.await?;
if should_show_notification {
cx.update(|cx| {
let version = updater.read(cx).current_version();
let app_name = ReleaseChannel::global(cx).display_name();
show_app_notification(
NotificationId::unique::<UpdateNotification>(),
cx,
move |cx| {
let workspace_handle = cx.entity().downgrade();
cx.new(|_| UpdateNotification::new(version, workspace_handle))
cx.new(|_cx| {
MessageNotification::new(format!("Updated to {app_name} {}", version))
.primary_message("View Release Notes")
.primary_on_click(move |window, cx| {
if let Some(workspace) = workspace_handle.upgrade() {
workspace.update(cx, |workspace, cx| {
crate::view_release_notes_locally(
workspace, window, cx,
);
})
}
cx.emit(DismissEvent);
})
})
},
);
updater.update(cx, |updater, cx| {

View File

@@ -1,70 +0,0 @@
use gpui::{
div, Context, DismissEvent, EventEmitter, InteractiveElement, IntoElement, ParentElement,
Render, SemanticVersion, StatefulInteractiveElement, Styled, WeakEntity, Window,
};
use menu::Cancel;
use release_channel::ReleaseChannel;
use util::ResultExt;
use workspace::{
ui::{h_flex, v_flex, Icon, IconName, Label, StyledExt},
Workspace,
};
pub struct UpdateNotification {
version: SemanticVersion,
workspace: WeakEntity<Workspace>,
}
impl EventEmitter<DismissEvent> for UpdateNotification {}
impl Render for UpdateNotification {
fn render(&mut self, _: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
let app_name = ReleaseChannel::global(cx).display_name();
v_flex()
.on_action(cx.listener(UpdateNotification::dismiss))
.elevation_3(cx)
.p_4()
.child(
h_flex()
.justify_between()
.child(Label::new(format!(
"Updated to {app_name} {}",
self.version
)))
.child(
div()
.id("cancel")
.child(Icon::new(IconName::Close))
.cursor_pointer()
.on_click(cx.listener(|this, _, window, cx| {
this.dismiss(&menu::Cancel, window, cx)
})),
),
)
.child(
div()
.id("notes")
.child(Label::new("View the release notes"))
.cursor_pointer()
.on_click(cx.listener(|this, _, window, cx| {
this.workspace
.update(cx, |workspace, cx| {
crate::view_release_notes_locally(workspace, window, cx);
})
.log_err();
this.dismiss(&menu::Cancel, window, cx)
})),
)
}
}
impl UpdateNotification {
pub fn new(version: SemanticVersion, workspace: WeakEntity<Workspace>) -> Self {
Self { version, workspace }
}
pub fn dismiss(&mut self, _: &Cancel, _: &mut Window, cx: &mut Context<Self>) {
cx.emit(DismissEvent);
}
}

View File

@@ -0,0 +1,22 @@
[package]
name = "aws_http_client"
version = "0.1.0"
edition.workspace = true
publish.workspace = true
license = "GPL-3.0-or-later"
[lints]
workspace = true
[lib]
path = "src/aws_http_client.rs"
[features]
default = []
[dependencies]
aws-smithy-runtime-api.workspace = true
aws-smithy-types.workspace = true
futures.workspace = true
http_client.workspace = true
tokio = { workspace = true, features = ["rt", "rt-multi-thread"] }

View File

@@ -0,0 +1 @@
../../LICENSE-GPL

View File

@@ -0,0 +1,118 @@
use std::fmt;
use std::sync::Arc;
use aws_smithy_runtime_api::client::http::{
HttpClient as AwsClient, HttpConnector as AwsConnector,
HttpConnectorFuture as AwsConnectorFuture, HttpConnectorFuture, HttpConnectorSettings,
SharedHttpConnector,
};
use aws_smithy_runtime_api::client::orchestrator::{HttpRequest as AwsHttpRequest, HttpResponse};
use aws_smithy_runtime_api::client::result::ConnectorError;
use aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
use aws_smithy_runtime_api::http::StatusCode;
use aws_smithy_types::body::SdkBody;
use futures::AsyncReadExt;
use http_client::{AsyncBody, Inner};
use http_client::{HttpClient, Request};
use tokio::runtime::Handle;
struct AwsHttpConnector {
client: Arc<dyn HttpClient>,
handle: Handle,
}
impl std::fmt::Debug for AwsHttpConnector {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("AwsHttpConnector").finish()
}
}
impl AwsConnector for AwsHttpConnector {
fn call(&self, request: AwsHttpRequest) -> AwsConnectorFuture {
let req = match request.try_into_http1x() {
Ok(req) => req,
Err(err) => {
return HttpConnectorFuture::ready(Err(ConnectorError::other(err.into(), None)))
}
};
let (parts, body) = req.into_parts();
let response = self
.client
.send(Request::from_parts(parts, convert_to_async_body(body)));
let handle = self.handle.clone();
HttpConnectorFuture::new(async move {
let response = match response.await {
Ok(response) => response,
Err(err) => return Err(ConnectorError::other(err.into(), None)),
};
let (parts, body) = response.into_parts();
let body = convert_to_sdk_body(body, handle).await;
Ok(HttpResponse::new(
StatusCode::try_from(parts.status.as_u16()).unwrap(),
body,
))
})
}
}
#[derive(Clone)]
pub struct AwsHttpClient {
client: Arc<dyn HttpClient>,
handler: Handle,
}
impl std::fmt::Debug for AwsHttpClient {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("AwsHttpClient").finish()
}
}
impl AwsHttpClient {
pub fn new(client: Arc<dyn HttpClient>, handle: Handle) -> Self {
Self {
client,
handler: handle,
}
}
}
impl AwsClient for AwsHttpClient {
fn http_connector(
&self,
_settings: &HttpConnectorSettings,
_components: &RuntimeComponents,
) -> SharedHttpConnector {
SharedHttpConnector::new(AwsHttpConnector {
client: self.client.clone(),
handle: self.handler.clone(),
})
}
}
pub async fn convert_to_sdk_body(body: AsyncBody, handle: Handle) -> SdkBody {
match body.0 {
Inner::Empty => SdkBody::empty(),
Inner::Bytes(bytes) => SdkBody::from(bytes.into_inner()),
Inner::AsyncReader(mut reader) => {
let buffer = handle.spawn(async move {
let mut buffer = Vec::new();
let _ = reader.read_to_end(&mut buffer).await;
buffer
});
SdkBody::from(buffer.await.unwrap_or_default())
}
}
}
pub fn convert_to_async_body(body: SdkBody) -> AsyncBody {
match body.bytes() {
Some(bytes) => AsyncBody::from((*bytes).to_vec()),
None => AsyncBody::empty(),
}
}

Some files were not shown because too many files have changed in this diff Show More