Commit log

c2f5855 Fix warning

Piotr Osiewicz created

456be1f Hide user menu on second click

Piotr Osiewicz created

dddff64 tests: Test 'db' package sequentially (#2654)

Click to expand commit body
/cc @as-cii  @nathansobo  

Release Notes:

- N/A

Piotr Osiewicz created

9d19dea updated vector_store to remove parsing module

KCaverly created

2cb4616 Enable assistant on stable

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Antonio Scandurra and Nathan Sobo created

0d0c71e Polish assistant (#2653)

Click to expand commit body
This is a mix of styling and behavioral improvements to the assistant
that we wanted to land before shipping today.

Release Notes:

- N/A

Antonio Scandurra created

8f8a99d Bind cmd-? to assistant::toggle_focus

Click to expand commit body
Bypass system help menu shortcut at the app delegate level to achieve this.

Co-Authored-By: Antonio Scandurra <antonio@zed.dev>

Nathan Sobo and Antonio Scandurra created

2ddf0e1 Undeafen: unmute if user was not muted prior to deafening

Piotr Osiewicz created

7efcd60 Remove border from assistant message header

Click to expand commit body
Also: Increase right margin on token count to space it from the scrollbar.

Co-Authored-By: Antonio Scandurra <antonio@zed.dev>

Nathan Sobo and Antonio Scandurra created

83fc7b9 Avoid scrolling to the new cursor position so the assistant's output is stable

Click to expand commit body
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>

Nathan Sobo and Antonio Scandurra created

f52d3ea Clean up tooltips, create conversation on cmd-n

Click to expand commit body
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>

Nathan Sobo and Antonio Scandurra created

d41a7f4 Space out assistant icons to match pane icons

Click to expand commit body
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>

Nathan Sobo and Antonio Scandurra created

749f60b fmt

Mikayla Maki created

5d02b49 Added muted and currently speaking tracking

Mikayla Maki created

f128cf4 Defer scanning some worktree subdirectories until they are expanded in the project panel (#2622)

Click to expand commit body
Closes
https://linear.app/zed-industries/issue/Z-352/high-memory-usage-from-fs-scanning-if-project-contains-symlinks-that

### Background

Currently, when you open a project, Zed eagerly scans the directory,
building an in-memory representation of all of the files and directories
within. This scanning includes all git-ignored files and follows any
symlinks. When any directory changes on disk, Zed recursively rescans it
in order to keep its in-memory representation up-to-date. When
collaborating, all of these files are replicated to all guests.

Right now, there are some performance problems associated with the
maintenance of this filesystem state:
* For various reasons, some projects contain symlinks that point out to
large folders like `$HOME`, which itself contains many symlinks that
point to the same large directory. When these projects are opened, the
worktree scans endlessly, using more and more memory.
* Some git-ignored directories (like `target` in a rust project) contain
*many* more files than are actually tracked in the git repository. These
files often change as a result of saving, (e.g. because the compiler
runs). Maintaining in memory all of these paths isn't useful to the
user, and causes significant CPU usage on every save. Most importantly,
when collaborating sending all of these changes to guests can be slow,
and can delay all other RPC messages.

### Change

This PR changes the worktree's filesystem-scanning logic to be *lazy*
about scanning two types of directories:
* git ignored directories
* "external" directories (those that are canonically located outside of
the worktree root, but accessed via symlinks)

The laziness works as follows. When, during a recursive scan, a
directory is found that falls into one of the above 2 categories, that
directory is marked as "unloaded". The directory might later be scanned,
if some explicit operation is performed within it (like opening a
buffer, or creating a file), if any collaborator expands that directory
in their project panel, or if an LSP requests that it be watched.

### Results

When collaborating on the `zed` folder:

| metric | before | after |
|-------|--------|------|
| # `worktree_entries` in collab db initially | 154,763 |  77,679 |
| # `worktree_entries` in collab db after 5 saves | 181,952 | 77,679
(nothing new to scan) |
| app memory footprint (host) | 260MB | 228.5 MB  |

The db thing is a win, because reading and writing to the
`worktree_entries` table is one of the most expensive thing that the
`collab` server does.

There's also generally lower background CPU usage after every save,
because we don't need to recursively rescan directories inside of
`target`.

### Limitations

We still end up scanning some unnecessary directories (like
`target/debug/build/zed-b612db829aeac16e/out`) because the LSP instructs
us to watch those.

### To do:

* [x] Expand parent directories of any path opened via LSP
* [x] Avoid creating orphaned entries when FS events happen inside of
unscanned directories
* [x] Scan any newly-non-ignored directories after gitignore changes
* [x] Emit correct events for newly-discovered paths when expanding dirs
* [x] GC the set of expanded directory ids when dirs are removed
* [x] Don't include "external" entries in file-finder
* [x] Expand any directories watched by LSP
* [ ] manual testing and profiling

### Release Notes:

- Fixed a bug where Zed would use excessive memory when a project folder
contained symlinks pointing to directories outside of the project.
- Reduced Zed's memory and CPU usage when working in folders containing
many git-ignored files.

Max Brunsfeld created

201188f Use FakeFs in worktree gitignore test

Max Brunsfeld created

fc02381 Fix bugs in handling combined injections exposed by HEEx (#2652)

Click to expand commit body
Fixes
https://linear.app/zed-industries/issue/Z-2481/heex-this-snippet-triggers-a-hard-crash

Release Notes:

- Fixed a crash that would sometimes occur when editing a HEEx file
([#1703](https://github.com/zed-industries/community/issues/1703)).

Max Brunsfeld created

81c26cf Fix bugs in handling combined injections exposed by HEEx

Max Brunsfeld created

9a07696 Update titlebar item spacing

Nate Butler created

8b2732c `workspace.titlebar` -> `titlebar` in Theme

Nate Butler created

19ca6a8 Seperate online and offline

Mikayla Maki created

825a7cb Update screenshare toggle, titlebar spacing

Nate Butler created

60ce584 WIP: Add mute icons

Mikayla Maki created

d1bdfa0 Added a dummy action for testing the semantic search functionality in the command palette.

Click to expand commit body
Co-authored-by: maxbrunsfeld <max@zed.dev>

KCaverly and maxbrunsfeld created

4bfe3de Working incremental index engine, with streaming similarity search!

Click to expand commit body
Co-authored-by: maxbrunsfeld <max@zed.dev>

KCaverly and maxbrunsfeld created

b2de28c Match original logic when determining server to request formatting

Julia created

37cb202 Rename and toggle screenshare

Mikayla Maki created

b4f9fae Update share, call control buttons

Nate Butler created

5af3340 Add script for building theme types

Nate Butler created

331800c Use `icon_button` for leave call

Nate Butler created

3104275 Keep users muted once they undeafen themselves

Piotr Osiewicz created

9389b50 Update local-collaboration.md

Click to expand commit body
Add missing livekit info

Nate Butler created

0548df0 Update local-collaboration.md

Nate Butler created

f311d30 Create local-collaboration.md (#2651)

Click to expand commit body
I forget how to do this every single time 😅 Please update anything that
is incorrect!

[[PR Description]]

Release Notes:

- N/A

Nate Butler created

a67eba9 Create local-collaboration.md

Click to expand commit body
I forget how to do this every single time 😅

Nate Butler created

625814d Merge branch 'main' into collab-titlebar-2

Piotr Osiewicz created

04d93df vim: indent/outdent (#2644)

Click to expand commit body
Release Notes:

- vim: support indent/outdent
([#832](https://github.com/zed-industries/community/issues/832>)).

Nathan Sobo created

fd3ee0e Vim toggle case (#2648)

Click to expand commit body
Release Notes:

- vim: Add ~ to toggle case
([#1410](https://github.com/zed-industries/community/issues/1410))

Nathan Sobo created

29b2639 Merge remote-tracking branch 'origin/main' into vim-indent

Nathan Sobo created

16c2355 vim: Fix scrolling (#2647)

Click to expand commit body
After #2641 we noticed that scrolling didn't take a count parameter, and
a few other issues with the way that we calculated the distance to
scroll.
 
Release Notes:

- Improved distance calculations for page-up/page-down
- vim: Allow counts to work with scrolling shortcuts.

Nathan Sobo created

7294314 vim: shortcuts for tab navigation (#2649)

Click to expand commit body
Release Notes:

- vim: added gt/ctrl-pagedown and gT/ctrl-pageup for tab navigation

Nathan Sobo created

0fd0b60 vim: Fix code actions menu (#2650)

Click to expand commit body
Fixes: zed-industries/community#1690

I'm not sure this is the correct way to fix this...
* A simpler approach would be to just say `!showing_code_actions` in the
binding file (as `showing_completions` can only happen in insert mode -
and `VimControl` will be false). This seemed a little error prone if
more menus were added in the future.
* A more complicated approach would be to copy the way this is done from
the MouseContextMenu, which registers its own keyboard shortcuts, and as
such uses those when it's open. This seems "more correct", but is a
major refactoring for a very small reward.

Release Notes:

- vim: Fix code actions menu
([#1690](https://github.com/zed-industries/community/issues/1690))

Nathan Sobo created

71c0b7d Add styles for user menu

Piotr Osiewicz created

a1343f0 vim: Fix code actions menu

Click to expand commit body
Fixes: zed-industries/community#1690

Conrad Irwin created

a9aa5e5 vim: Add ~ to change case

Click to expand commit body
Fixes: zed-industries/community#1410

Conrad Irwin created

77dc22b vim: Fix cursor restoration when undoing substitute

Conrad Irwin created

953e928 WIP: Got the streaming matrix multiplication working, and started work on file hashing.

Click to expand commit body
Co-authored-by: maxbrunsfeld <max@zed.dev>

KCaverly and maxbrunsfeld created

7392080 vim: shortcuts for tab navigation

Conrad Irwin created

02fc5dd vim: Fix scrolling

Click to expand commit body
After #2641 we noticed that scrolling didn't take a count parameter.

The PageDown/PageUp logic was also broken by an additional -1 (for both
vim mode and not).

Conrad Irwin created

74b693d Updated database calls to share single connection, and simplified top_k_search sorting.

Click to expand commit body
Co-authored-by: maxbrunsfeld <max@zed.dev>

KCaverly and maxbrunsfeld created