3bec4eb
markdown: Add initial support for tables (#25954)
Click to expand commit body
This PR adds initial support for displaying tables to the `markdown`
crate.
This allows us to render tables in Assistant 2:
| Before | After |
|
----------------------------------------------------------------------------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------------------------------------------------------------------------
|
| <img width="1309" alt="Screenshot 2025-03-03 at 1 39 39 PM"
src="https://github.com/user-attachments/assets/ad7ada01-f35d-4fcf-a20c-deb42b55b34e"
/> | <img width="1297" alt="Screenshot 2025-03-03 at 3 38 21 PM"
src="https://github.com/user-attachments/assets/9b771126-30a0-479b-8c29-f5f572936f56"
/> |
There are a few known issues that should be addressed as follow-ups:
- The horizontal scrolling within a table is linked with the scrolling
of the parent container (e.g., the Assistant 2 thread)
- Cells are currently cut off entirely when they are too wide, would be
nice to truncate them with an ellipsis
Release Notes:
- N/A
Drop previous reparse task, if a new one is spawned.
Release Notes:
- N/A
Kirill Bulatov
created
dc3158c
git: Don't consider $HOME as containing git repository unless it's opened directly (#25948)
Click to expand commit body
When a worktree is created, we walk up the ancestors of the root path
trying to find a git repository. In particular, if your `$HOME` is a git
repository and you open some subdirectory of `$HOME` that's *not* a git
repository, we end up scanning `$HOME` and everything under it looking
for changed and untracked files, which is often pretty slow. Consistency
here is not very useful and leads to a bad experience.
This PR adds a special case to not consider `$HOME` as a containing git
repository, unless you ask for it by doing the equivalent of `zed ~`.
Release Notes:
- Changed the behavior of git features to not treat `$HOME` as a git
repository unless opened directly
Cole Miller
created
9e2b7bc
Fix missing hunks in project diff after revert (#25906)
Click to expand commit body
Release Notes:
- N/A
Cole Miller
created
b774a4b
Add some logging to debug missing parent git repositories (#25943)
Click to expand commit body
We've had some issues reported with git repositories not getting
detected when they're a strict parent of the worktree root. Add a bit
more logging to understand what's going on here.
Release Notes:
- N/A
Cole Miller
created
16ab870
git_ui: Prevent button overflow due to long names (#25940)
Click to expand commit body
- Fix component preview widths for git panel
- Fix buttons getting pushed off the screen in git panel
Release Notes:
- N/A
---------
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Nate Butler
and
Mikayla Maki
created
b2add8c
assistant2: Restore tool uses when loading saved threads (#25942)
Click to expand commit body
This PR makes it so tool uses are restored when loading saved threads in
Assistant 2.
Release Notes:
- N/A
81ff6f7
assistant2: Persist threads using `serde_json` instead of `bincode` (#25938)
Click to expand commit body
This PR changes how we persist threads in Assistant2 to use `serde_json`
instead of `bincode` for the representation.
This makes the format more flexible to work with (and will allow for
using things like `#[serde(default)]`) if the schema changes over time.
Note: We have to bump the LMDB database version for this, so any threads
created before now will be gone.
Release Notes:
- N/A
Marshall Bowers
created
669082d
assistant2: Fix keyboard navigation issues when a picker is open (#25928)
Click to expand commit body
This fixes:
- Bug: Using "up" in model selector triggers assistant2::FocusUp not
menu::SelectPrev
- Bug: Pressing arrow up/down in the model selector opened in the inline
assistant doesn't work
- Bug: Dismissing the model selector with Esc is not working
- Bug: Dismissing context pickers with Esc no longer working
Release Notes:
- N/A
Bennet Bo Fenner
created
d5bc7b9
extension_cli: Make use of `scrollbar_thumb.background` a hard error (#25932)
Click to expand commit body
This PR updates the extension CLI to make the use of
`scrollbar_thumb.background` in a theme a hard error.
We're working to eradicate usage of this theme property, so this will
prevent new extensions from being published that use it.
Release Notes:
- N/A
Marshall Bowers
created
8bb2739
keymap: Update `Prev` to `Previous` follow-up (#25931)
Click to expand commit body
Follow-up for https://github.com/zed-industries/zed/pull/25909
Add three more action replacements:
```
1. "pane::ActivatePrevItem" -> "pane::ActivatePreviousItem"
2. "vim::MoveToPrev" -> "vim::MoveToPrevious"
3. "vim:MoveToPrevMatch" -> "vim:MoveToPreviousMatch"
```
Release Notes:
- N/A
smit
created
466be14
Revert "Use multi-line regex for '\s'" (#25926)
Click to expand commit body
Reverts zed-industries/zed#19241
Closes: https://github.com/zed-industries/zed/issues/25901
Although `\s` contains `\n` it is widely used in non-multiline regexes (unlike `\n`).
Closes https://github.com/zed-industries/zed/issues/25865
Closes https://github.com/zed-industries/zed/pull/25915
In the issue, Zed had caused `.git/lfs/tmp/466102258`-like files to
appear in the directory, which lead to background FS event listener to
handle this as an update, incrementing snapshot's `scan_id`, which lead
to git status rescan, which caused another increment to `status_scan_id`
— incrementing either of the IDs causes the related repo data to be
considered "changed:
https://github.com/zed-industries/zed/blob/41b45eaba798a56e596857fa497c862050788bc7/crates/worktree/src/worktree.rs#L1590-L1605
hence propagating events to the other parts of the system (e.g. git
blame, which was also active in the issue's case)
```
[2025-03-01T20:01:08+01:00 DEBUG worktree] ignoring event ".git/lfs/tmp/466102258" within unloaded directory
[2025-03-01T20:01:08+01:00 DEBUG worktree] received fs events []
[2025-03-01T20:01:08+01:00 DEBUG worktree] reloading repositories: ["/Users/alex/dev/monorepo/.git"]
[2025-03-01T20:01:08+01:00 DEBUG editor::git::blame] Status of git repositories updated. Regenerating blame data...
[2025-03-01T20:01:08+01:00 DEBUG editor::git::blame] Status of git repositories updated. Regenerating blame data...
[2025-03-01T20:01:08+01:00 DEBUG editor::git::blame] Status of git repositories updated. Regenerating blame data...
```
Due to repo update events sent, another `.git/lfs/tmp/` entry is
created, things start over...
The PR fixes this by ignoring any `.git/lfs/` directory-related FS
events, as needed for the current git status update heuristics.
https://github.com/zed-industries/zed/pull/25915 tried to follow further
and `scan_id` and `status_scan_id` but we do not store all git state in
memory, e.g. head
https://github.com/zed-industries/zed/blob/e0060b92cc862c4d926652e1a01f0991ccb3a805/crates/editor/src/editor_tests.rs#L13686
as
[tests](https://github.com/zed-industries/zed/actions/runs/13631960559/job/38101504549?pr=25915)
show.
Release Notes:
- Improved `.git` scan heuristics
Kirill Bulatov
created
b34c0fd
git_ui: Fix item heights in git panel (#25833)
Click to expand commit body
- Fixes items slightly overlapping in the git panel
- Fixes commit button in the project diff not opening modal
Release Notes:
- N/A
---------
Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Cole Miller <m@cole-miller.net>
Max Brunsfeld
,
Nate Butler
, and
Cole Miller
created
Mostly just fine-tuning its positioning. Other changes are mainly using
the Label's `buffer_font` method instead of using a div for that.
Release Notes:
- N/A
Danilo Leal
created
06bcc42
Revert "assistant_context_editor: Close menus on send (#25440)" (#25916)
Click to expand commit body
Reverting https://github.com/zed-industries/zed/pull/25440
This is a good change, but given the PR was open for a while, I guess it
didn't catch conflicts with main, and so it broke it. Will revert it for
now, to keep main fresh, but will look into adding this behavior back
again.
Release Notes:
- N/A
Danilo Leal
created
f24c226
assistant_context_editor: Close menus on send (#25440)
593f3dc
keymap: Update `Prev` to `Previous` for consistency (#25909)
Click to expand commit body
Closes #10167
This is take 2 on https://github.com/zed-industries/zed/pull/2341 which
was closed due to lack of migrator.
This PR contains rename of following keymap actions:
```sh
1. ["editor::GoToPrevHunk", { "center_cursor": true }] -> ["editor::GoToPreviousHunk", { "center_cursor": true }]
2. "editor::GoToPrevDiagnostic" -> "editor::GoToPreviousDiagnostic"
3. "editor::ContextMenuPrev" -> "editor::ContextMenuPrevious"
4. "search::SelectPrevMatch" -> "search::SelectPreviousMatch"
5. "file_finder::SelectPrev" -> "file_finder::SelectPrevious"
6. "menu::SelectPrev" -> "menu::SelectPrevious"
7. "editor::TabPrev" -> "editor::Backtab"
```
Release Notes:
- Renamed several keymap actions for consistency (e.g., `GoToPrevHunk` →
`GoToPreviousHunk`, `TabPrev` → `Backtab`). Your existing configured
keybindings will still work. You can click **"Backup and Update"** at
the top of your keymap file to easily update to the new actions.
Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
smit
and
Joseph T. Lyons
created
61d584d
context menu: Adjust item disabled state when there is docs aside (#25860)
Click to expand commit body
When a context menu item has a documentation aside element attached to
it, we're now hiding the keybinding (which wouldn't trigger anything
anyway) to make room for displaying an info icon, with the purpose of
indicating the existence of the docs aside, which will typically explain
the reason why the item’s disabled in the first place.
Also, changed the label color to use the `Disabled` token; more
appropriate for this, and just slightly darker, which is great!
<img
src="https://github.com/user-attachments/assets/a7f9f022-16d1-41d5-b1b5-3cbcc9630cc8"
width="500px"/>
Release Notes:
- N/A
Danilo Leal
created
c37f616
gpui: Maintain `img` aspect ratio when `max_width` is set (#25632)
Click to expand commit body
Release Notes:
- Fixed Markdown preview to display image with max width 100%.
## Before
<img width="1202" alt="image"
src="https://github.com/user-attachments/assets/359628df-8746-456f-a768-b3428923c937"
/>
<img width="750" alt="SCR-20250226-napv"
src="https://github.com/user-attachments/assets/f6154516-470e-41b2-84f5-ef0612c447ad"
/>
## After
<img width="1149" alt="image"
src="https://github.com/user-attachments/assets/2279347d-9c69-4a47-bb62-ccc8e55a98f6"
/>
<img width="520" alt="SCR-20250226-ngyz"
src="https://github.com/user-attachments/assets/03af5f14-1935-472e-822f-4c7f62630780"
/>
Jason Lee
created
73ac199
Add user-visible output for remote operations (#25849)
Click to expand commit body
This PR adds toasts for reporting success and errors from remote git
operations. This PR also adds a focus handle to notifications, in
anticipation of making them keyboard accessible.
Release Notes:
- N/A
---------
Co-authored-by: julia <julia@zed.dev>
Mikayla Maki
and
julia
created
508b9d3
Add an informative tooltip to commit button when unable to commit (#25912)
Click to expand commit body
Release Notes:
- N/A
Mikayla Maki
created
0a4ff2f
tab: Add setting to hide the close button entirely (#23880)
Click to expand commit body
Closes #23744
Release Notes:
- Changed the `always_show_close_button` key to `show_close_button` and
introduced a new `hidden` value, that allows never displaying the close
button.
---------
Co-authored-by: Peter Tripp <peter@zed.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: smit <0xtimsb@gmail.com>
Morgan Metz
,
Peter Tripp
,
Danilo Leal
, and
smit
created
ae6d350
Use system-installed git binary for push/pull/fetch (#25900)
Click to expand commit body
### Problem
When using HTTPS remotes, users are getting errors when trying to push
or pull via the git panel.
On macOS, Zed bundles a `git` binary that's part of
[`dugite-native`](https://github.com/desktop/dugite-native). But we
don't include the entire package. Additional binaries from
`dugite-native` are needed for pulling and pushing over HTTPS.
### Solution
Rather than bundling those additional binaries, I've changed the `push`,
`pull`, and `fetch` actions to rely on the *system-installed* `git`
binary. The downside of this is that, if the user does not have Git
installed, they wont' be able to push, pull, or fetch from within Zed.
But we believe that the vast majority of users will have Git installed.
Also, unlike `diff` and `status`, which Zed needs to call in the
background without any user interaction, `push`/`pull` and `fetch` are
explicit actions that the user takes in Zed, so there is an opportunity
to prompt them to install Git if they haven't.
### Background
There are three ways (that I know of) that users might authenticate when
pushing, pulling, or fetching over HTTPS.
1. Via a built-in [Git
`credential.helper`](https://git-scm.com/docs/gitcredentials). On macOS,
Git ships with a helper called `credential-osxkeychain` that stores
internet passwords in the OS Keychain. You can opt into this globally
with the command `git config --global credential.helper osxkeychain`,
which writes to your `~/.gitconfig`.
2. Via [`Git Credential Manager`
(GCM)](https://github.com/git-ecosystem/git-credential-manager), which
is a different `credential.helper`, [built by
GitHub](https://github.blog/security/application-security/git-credential-manager-authentication-for-everyone/),
which must be installed manually, and integrates with specific Git
hosting providers like GitHub and Azure.
3. By typing their Username and Password/Access-token interactively when
pushing/pulling/fetching.
### Testing Status
* [ ] 🚫 Interactive password auth - not yet supported, requires
https://github.com/zed-industries/zed/pull/25848
* [x] **credential-osxkeychain** - when using the built-in credential
helper, and the credentials are already stored in the keychain,
push/pull/fetch now work fine .
* [ ] **GCM** - still testing.
* Right now, I'm seeing `git-credential-manager` just hang indefinitely
when pushing from Zed, even though it works when pushing from a
terminal.
Release Notes:
- N/A
Max Brunsfeld
created
0e44f93
lsp: Do not add trailing slash to workspace folders (#25903)
Closes https://github.com/zed-industries/zed/issues/5105
Makes the following logs read only
- Zed error / warning log
- Zed telemetry log
Release Notes:
- N/A
Joseph T. Lyons
created
8b5ef25
docs: Add documentation for Seed search query from cursor (#25875)
Click to expand commit body
Missing documentation added for `seed_search_query_from_cursor`.
Release Notes:
- N/A
Devzeth
created
fec228b
Fix issue with `cmd-w` closing window in preview tabs on MacOS (#25878)
Click to expand commit body
Closes #25810
Reorders default macOS keymap so that `cmd-w` in `"context":
"PromptLibrary"` bindings is not the last binding for
`workspace::CloseWindow` and therefore does not get rendered in the app
menu or intercepted by MacOS
Release Notes:
- N/A
Ben Kunkle
created
e00d737
Add `constructor` highlighting for JS/TS/TSX (#25207)
Click to expand commit body
Closes #19267
Adds highlight field specifically for `constructor` in JS/TS/TSX so that
it can be highlighted as a different color than regular methods
Release Notes:
- N/A
---------
Co-authored-by: Ben Kunkle <ben@zed.dev>
Devzeth
and
Ben Kunkle
created
b0dee94
pane: Hide "Copy Relative Path" and "Reveal In Project Panel" actions for files outside of the projects (#25386)
Click to expand commit body
"Copy Relative Path" action had a check for existence of relative path
but it always passed because
[`WorktreeStore::find_worktree()`](https://github.com/zed-industries/zed/blob/1d5499bee72f1ea57ed883b942f05d5c1e7cec89/crates/project/src/worktree_store.rs#L148)
function returned empty path for these kinds of files. It feels correct
to make changes there, but I don't know what else could be impacted.
"Reveal In Project Panel" had no check whatsoever and so I made one.
Release Notes:
- N/A
Egor Krugletsov
created
e65471c
Optimize JSON merging by removing redundant key clones in serde_json operations (#25866)
Click to expand commit body
Hi Zed team! 👋
As a fan of Zed Editor who's excited to contribute, I noticed a small
optimization opportunity in the JSON merging utilities.
<b>Changes:</b>
Removed redundant key.clone() calls in insert() operations within 2
functions:
1. merge_json_value_into
2. merge_non_null_json_value_into
<b>Why:</b>
Since we're already moving ownership of `source_object` 's contents and
key is no longer used further, we could directly pass `key` to `insert`
without cloning.
Eliminates redundant allocations, improving performance slightly for
JSON-heavy operations.
<b>Testing:</b>
I have tested this locally and all existing tests passed. The change
preserves behavior while removing redundancy.
Love using Zed and happy to contribute! Let me know if any adjustments
are needed!
Release Notes:
- N/A
greathongtu
created
6713ec8
windows: Bring back restoration of tabs (#25870)
Click to expand commit body
Closes #25022
Release Notes:
- N/A
张小白
created
48e09c0
Tweak the Git beta issue template (#25869)
Click to expand commit body
Release Notes:
- N/A
Joseph T. Lyons
created
3f03d7b
Add a temporary issue template for Git beta bugs (#25867)
Click to expand commit body
Release Notes:
- N/A
Joseph T. Lyons
created
fa96e22
paths: Add support for clickable file paths in the Odin language format (#25842)
Click to expand commit body
This PR adds support for clickable file paths in the Odin language format.
The odin compiler errors use the format `/path/to/file.odin(1:1)`. We
didn't recognize this format, making these paths non-clickable in the
terminal.
Also added tests for this.
Release Notes:
- Added support for clickable file paths in the Odin language format.
---------
Co-authored-by: Peter Tripp <peter@zed.dev>
Devzeth
and
Peter Tripp
created
a8a05f2
cli: Add extra paths in `detect()` on Windows (#25765)
Click to expand commit body
I'm already integrating CLI into MSYS2 package, and this patche helped
me to make it work like in Arch:
https://github.com/msys2/MINGW-packages/pull/23537. used the same way as
in [Linux
implementation](https://github.com/zed-industries/zed/blob/6856e869fcb8fd2e164a2c43b42ac5046f1d7ea8/crates/cli/src/main.rs#L314)
Closes #ISSUE
Release Notes:
- N/A
Maksim Bondarenkov
created
aa1ab50
Add stop_at_indent for Editor::DeleteToBeginningOfLine (#25688)
Click to expand commit body
Added test_beginning_of_line_stop_at_indent editor test
- Follow-up to: https://github.com/zed-industries/zed/pull/25428
- Replaces: https://github.com/zed-industries/zed/pull/25346
This is all authored by @felixpackard in #25346
I just updated it to use `stop_at_indent` instead of
`stop_at_first_char`.
Release Notes:
- Added support for `stop_at_indent` to
`Editor::DeleteToBeginningOfLine` (thanks
[@felixpackard](https://github.com/felixpackard))
Co-authored-by: Felix Packard <felix@rigr.gg>
Peter Tripp
and
Felix Packard
created
d115cb1
windows: Use dev drive instead of `ReFS` (#25858)
42571e4
Ensure inlay hint toggling with modifiers happens fast (#25852)
Click to expand commit body
Follow-up of https://github.com/zed-industries/zed/pull/25766
Fixes the bugs found:
* modifier toggle not happening instantly due to `edit_debounce_ms`
considered
* hint update race that ignored the cache clear
Release Notes:
- N/A
Kirill Bulatov
created
2d61a51
Diff View: Scroll to center of hunks when reviewing (#25846)
Click to expand commit body
When reviewing hunks, scroll to put them at the center of the screen
so you can better see the context around that hunk.
The field `center_cursor` was added to the actions `editor::GoToHunk`
and `editor::GoToPrevHunk`, this was set to `false` by default in
keymaps, as it wouldn't help with in-editor navigation.
The field is set to `true` for when you trigger `git::StageAndNext`
and `git::UnstageAndNext`, this is also `true` for the buttons in the
Diff View toolbar.
Release Notes:
- N/A
João Marcos
created
a2876f5
Support hunk-wise `StageAndNext` and `UnstageAndNext` (#25845)
Click to expand commit body
This PR adds the `whole_excerpt` field to the actions:
- `git::StageAndNext`
- `git::UnstageAndNext`
Which is set by false by default, effectively, now staging and unstaging
with these actions is done hunk-by-hunk, this also affects the `Stage`
and
`Unstage` buttons in the Diff View toolbar.
A caveat: with this PR, there is no way to configure the buttons in the
Diff
View toolbar to restore the previous behavior, if we want, I think we
can make
it a setting, but let's see if anyone really wants that.
Release Notes:
- N/A
694afd1
Fix buffer search options not resetting when dismissed after Vim mode search then reopened with `buffer: deploy search` (#25838)
Click to expand commit body
Closes #25315
Release Notes:
- Fixes an issue where the buffer search options would not be reset when
using `buffer: deploy search` after using Vim search (`*` & `#`) which
enable all search options
Ben Kunkle
created
eb648dd
Follow-up tweaks to new git panel footer (#25832)
Click to expand commit body
- Use a popover for the branch picker
- Don't deploy a repository selector if there's only one repo
Release Notes:
- N/A
ec88a68
Fix active pane modifiers applying to parent pane axis if child pane is active (#25836)
Click to expand commit body
Closes #25304
Release Notes:
- Fixed an issue where `active_pane_modifiers` settings would be applied
to a parent pane if one of it's child panes was active
Ben Kunkle
created
7fb1697
chore: Extract PromptStore out of prompt_library (#25837)
Click to expand commit body
One step closer to removing long pole with assistant/assistant2 builds
Release Notes:
- N/A
Piotr Osiewicz
created
53b2792
Improve script/mitm-proxy.sh to support podman (#25834)