Kirill Bulatov
2b59f27c3b
Fix fold map tests
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:39:18 +03:00
Kirill Bulatov
0972766d1d
Add more hint tests
2023-06-29 22:39:18 +03:00
Kirill Bulatov
15e0feb91d
Move highlights from fold to inlay randomized tests
2023-06-29 22:39:18 +03:00
Kirill Bulatov
667b70afde
Move hint settings on the language level
2023-06-29 22:39:18 +03:00
Kirill Bulatov
480d8c511b
Theme hints and suggestions differently
2023-06-29 22:39:18 +03:00
Kirill Bulatov
3312c9114b
Improve inlay hint highlights
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:39:18 +03:00
Kirill Bulatov
2c54d926ea
Test inlay hint cache
2023-06-29 22:39:18 +03:00
Nate Butler
143a020694
Update Hint Style
...
zzz
2023-06-29 22:39:17 +03:00
Kirill Bulatov
67214f0e55
Only skip /refresh inlay queries when vislble range is not updated
2023-06-29 22:25:50 +03:00
Kirill Bulatov
096bad1f73
Revert useless changes, simplify
2023-06-29 22:25:50 +03:00
Antonio Scandurra
f77b680db9
Account for inlay biases when clipping a point
2023-06-29 22:25:50 +03:00
Antonio Scandurra
976edfedf7
Add Cursor::next_item
2023-06-29 22:25:50 +03:00
Kirill Bulatov
5c21ed4263
Properly filter out task hints
2023-06-29 22:25:50 +03:00
Kirill Bulatov
dfb30218ca
Remove mutex usage from *Map contents
2023-06-29 22:25:50 +03:00
Kirill Bulatov
acef5ff195
Query hints when editors gets open and visible
2023-06-29 22:25:50 +03:00
Kirill Bulatov
11fee4ce42
Do not eagerly cancel running tasks
2023-06-29 22:25:49 +03:00
Kirill Bulatov
4d4544f680
Split excerpts into mutliple ranges for inlay hint queries
2023-06-29 22:25:49 +03:00
Kirill Bulatov
2c7900e11b
Use excerpt visible range in query filtering
2023-06-29 22:25:49 +03:00
Kirill Bulatov
83b3a914bc
Support better inlay cache parallelization
2023-06-29 22:25:49 +03:00
Kirill Bulatov
890b164278
Forward inlay hint refresh requests to clients, test coop inlay hints
2023-06-29 22:25:49 +03:00
Kirill Bulatov
a68e68a0d9
Properly filter out new hints outside of excerpts' visible ranges
2023-06-29 22:25:49 +03:00
Kirill Bulatov
ba3d1e4dba
Deduplicate inlay hints queries with buffer versions
2023-06-29 22:25:49 +03:00
Kirill Bulatov
f25a09bfd8
Avoid excessive allocations with Arc around excerpt cached inlays
2023-06-29 22:25:49 +03:00
Kirill Bulatov
48982c3036
Filter away new hints not in excerpt range
2023-06-29 22:25:49 +03:00
Kirill Bulatov
316e19ce94
Remove stale cancelled inlay hints workaround
2023-06-29 22:25:49 +03:00
Kirill Bulatov
96a34ad0ee
Use text anchors as hint position in hints cache
...
co-authored-by: Max Brunsfeld <max@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
781fa0cff4
Deduplicate LSP requests on multibuffer scroll
2023-06-29 22:25:49 +03:00
Kirill Bulatov
c61de29c11
Use proper anchors for remote LSP queries
2023-06-29 22:25:49 +03:00
Kirill Bulatov
cb4b92aa61
Simplify hint event management slightly
2023-06-29 22:25:49 +03:00
Kirill Bulatov
d59e91aff2
Insert new hints into cache better
2023-06-29 22:25:49 +03:00
Kirill Bulatov
d6828583d8
Box the cache for better performance
2023-06-29 22:25:49 +03:00
Kirill Bulatov
1722d61190
Mitigate odd offset calculations
2023-06-29 22:25:49 +03:00
Kirill Bulatov
7fddc223cd
Move away heavy inlay computations into background tasks
2023-06-29 22:25:49 +03:00
Kirill Bulatov
31f0f9f7b1
Forbid extra inlay updates
2023-06-29 22:25:49 +03:00
Kirill Bulatov
97e5d40579
Add snapshot version to use when avoiding wrong state updates
2023-06-29 22:25:49 +03:00
Kirill Bulatov
8d982a6c2d
Finish modelling
2023-06-29 22:25:49 +03:00
Kirill Bulatov
4c78019317
Start to model the background threads for InlayHintCache
2023-06-29 22:25:49 +03:00
Kirill Bulatov
2f1a27631e
React on multibuffer scrolls again
2023-06-29 22:25:49 +03:00
Kirill Bulatov
a31d3eca45
Spawn cache updates in separate tasks
2023-06-29 22:25:49 +03:00
Antonio Scandurra
9698b51524
Prevent insertion of empty inlays into InlayMap
2023-06-29 22:25:49 +03:00
Kirill Bulatov
3b9a2e3261
Do not track editor ranges in InlayHintCache
2023-06-29 22:25:49 +03:00
Kirill Bulatov
70a45fc800
Fix cache incremental updates
2023-06-29 22:25:49 +03:00
Kirill Bulatov
7ac1885449
Properly refresh hints on editor open
2023-06-29 22:25:49 +03:00
Kirill Bulatov
58343563ba
Fix hint querying bugs
2023-06-29 22:25:49 +03:00
Kirill Bulatov
debdc3603e
Finish rest of the inlay cache logic
2023-06-29 22:25:49 +03:00
Kirill Bulatov
ddcbc73bf0
Implement inlay hint replaces for conflict-less case
2023-06-29 22:25:49 +03:00
Kirill Bulatov
6368cf1a27
Merge excerpt-related hint data, move next_inlay_id into Editor
2023-06-29 22:25:49 +03:00
Kirill Bulatov
8c03e9e122
Move InlayId generation back to InlayCache
2023-06-29 22:25:49 +03:00
Kirill Bulatov
e82b4d8957
Properly handle hint addition queries
2023-06-29 22:25:49 +03:00
Kirill Bulatov
5322aa09b9
Properly handle settings toggle
2023-06-29 22:25:49 +03:00
Kirill Bulatov
8f68688a64
Allow readding inlays with existing ids, move inlay types
2023-06-29 22:25:49 +03:00
Kirill Bulatov
49c00fd571
Generate InlayIds in InlayMap, prepare InlayCache for refactoring
2023-06-29 22:25:49 +03:00
Kirill Bulatov
e217a95fcc
Cleanup the warnings
2023-06-29 22:25:49 +03:00
Kirill Bulatov
76d35b7122
Use proper, limited excerpt ranges and manage inlay cache properly
2023-06-29 22:25:49 +03:00
Kirill Bulatov
2b989a9f12
Fix all the tests
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
d4d88252c3
Fix most of the FoldMap random tests with inlays
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
f2c510000b
Fix all FoldMap tests (without real inlays inside)
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
29bb6c67b0
Fix first FoldMap methods after the map move
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
9ae611fa89
Fix InlayMap bugs after the map order revers
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
05dc672c2a
Apply questionable changes to make things compile
2023-06-29 22:25:49 +03:00
Kirill Bulatov
10765d69f4
Move inlay map to be the first one
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
e744fb8842
Avoid having carriage returns (\r) in inlays
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
d2fef07782
Remove the SuggestionMap
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
8cdf1a0faf
Switch over to inlay map for Copilot suggestions
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Antonio Scandurra
89137e2e83
Fix InlayMap::buffer_rows
2023-06-29 22:25:49 +03:00
Kirill Bulatov
34c6d66d04
Implement InlayBufferRows properly
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
bec9c26fa2
Fix more inlay_map corner cases and hangings
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
02e124cec4
Fix inlay map tests
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
b231fa47af
Apply hints setings on startup
2023-06-29 22:25:49 +03:00
Kirill Bulatov
c898298c5c
Properly update inlay hints when settings are changed
2023-06-29 22:25:49 +03:00
Kirill Bulatov
1ed52276e0
Add inlay hint settings
2023-06-29 22:25:49 +03:00
Kirill Bulatov
ea837a183b
Store inlays per paths and query on editor open
2023-06-29 22:25:49 +03:00
Kirill Bulatov
8acc5cf8f4
Deserialize more LSP inlay hint information
2023-06-29 22:25:49 +03:00
Kirill Bulatov
f155f5ded7
Better rpc inlay hint handling
2023-06-29 22:25:49 +03:00
Kirill Bulatov
b3aa75a363
Refresh inlays on buffer reopens
2023-06-29 22:25:49 +03:00
Kirill Bulatov
e1f22c3684
Cache anchors from all versions, remove out of range hints
2023-06-29 22:25:49 +03:00
Kirill Bulatov
7abaf22b93
Generate proper inlay diffs for splice
2023-06-29 22:25:49 +03:00
Kirill Bulatov
6d1068d1e9
Query inlay hints for excerpt ranges only
2023-06-29 22:25:49 +03:00
Kirill Bulatov
271cd25a1d
Display excerpt-ranged hints only
2023-06-29 22:25:49 +03:00
Kirill Bulatov
addb62c1fc
Fix the duplicate hints
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
63074c5cd8
Better bias selection for hints that prefix the type
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Antonio Scandurra
2b1b1225f5
Simplify InlayMap::splice
interface
2023-06-29 22:25:49 +03:00
Antonio Scandurra
7684a26daa
Fix point/offset translation and clipping in the InlayMap
...
This makes all randomized tests pass. We're only missing `buffer_rows`
now and we should move the map right above `MultiBuffer` and below `FoldMap`.
2023-06-29 22:25:49 +03:00
Kirill Bulatov
c7fa8dbc70
React with inlay updates on excerpt events
2023-06-29 22:25:49 +03:00
Kirill Bulatov
df20a43704
Reuse the copilot suggestion style for inlays
2023-06-29 22:25:49 +03:00
Kirill Bulatov
8a64b07622
Fixed inlay hints' edits generation and moved on with the randomized
...
test
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Antonio Scandurra
e280483c5f
Make the randomized tests pass
...
Right now we only check that the text is correct, but I think
we're getting there.
2023-06-29 22:25:49 +03:00
Kirill Bulatov
afa59eed01
Fix the randomized tests
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
f940104b6f
Add inlay hint randomization in the text
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
dbd4b33568
Fix splice edits generation
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
9ce9b73879
Generate edits for inlay hints
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
f5f495831a
Add inlay hints randomized test, fix the errors
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
2e730d8fa4
Implement initial changes reporting for inlay hints
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
4d76162da8
Report the edits per transform summary generated
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
2ba3262f29
Add line_len snapshot method
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
ab7dd80423
Add more InlaySnapshot text summary impls
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
568a67c4d7
Implement more InlaySnapshot methods
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:49 +03:00
Kirill Bulatov
daa2ebb57f
Calculate anchors for new hints
2023-06-29 22:25:49 +03:00
Kirill Bulatov
5fadbf77d4
Implement InlayHint sync method and fix the bugs
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:48 +03:00
Kirill Bulatov
5ad85b44d6
Implement chunks of the InlayMap
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:48 +03:00
Kirill Bulatov
3028767d12
Improve on inlya locations
2023-06-29 22:25:48 +03:00
Kirill Bulatov
b193d62a5d
Initial InlayMap tests and splice fn impl
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:25:48 +03:00
Kirill Bulatov
7397b8028c
Simplify inlay hint version handling
2023-06-29 22:25:48 +03:00
Kirill Bulatov
d506522eef
Correctly pass inlay hints
2023-06-29 22:25:48 +03:00
Kirill Bulatov
b5233b3ad5
Rename the new map
2023-06-29 22:25:48 +03:00
Kirill Bulatov
9287634548
Prepare to find diffs between inlay hint generations
2023-06-29 22:25:48 +03:00
Kirill Bulatov
78b3c9b88a
Store hints in the new map only
2023-06-29 22:25:48 +03:00
Kirill Bulatov
83f4320b60
Replace todo!s with stub calls to make Zed work
2023-06-29 22:25:48 +03:00
Kirill Bulatov
4c3c0eb796
Draft the hint render data flow
2023-06-29 22:25:48 +03:00
Kirill Bulatov
2ead3de7de
Add basic infrastructure for inlay hints map
2023-06-29 22:25:48 +03:00
Kirill Bulatov
6e3d1b962a
Draft the initial protobuf changes
2023-06-29 22:25:48 +03:00
Kirill Bulatov
387415eb01
Request hints for all buffers in editor
2023-06-29 22:25:48 +03:00
Kirill Bulatov
f83cfda9bc
React on message-less LSP requests properly
...
Co-Authored-By: Julia Risley <julia@zed.dev>
2023-06-29 22:25:48 +03:00
Kirill Bulatov
7a268b1cf6
Improve obvious faults
2023-06-29 22:25:48 +03:00
Kirill Bulatov
79b97f9e75
Stub initial hint requests
2023-06-29 22:25:48 +03:00
Kirill Bulatov
8a3b515f56
Initial protocol check commit
2023-06-29 22:25:48 +03:00
KCaverly
39137fc19f
updated vector_store db to leverage EMBEDDINGS_DIR path
2023-06-29 15:18:32 -04:00
Max Brunsfeld
922d8f30d6
Tweak debug log message when ignoring fs events
2023-06-29 12:01:59 -07:00
Max Brunsfeld
8609ccdcf7
Add test coverage for FS events happening inside unloaded dirs
2023-06-29 11:55:25 -07:00
Max Brunsfeld
ba80c53278
Avoid redundant FS scans when LSPs changed watched files
...
* Don't scan directories if they were already loaded.
* Do less work when FS events occur inside unloaded directories.
2023-06-29 11:35:49 -07:00
KCaverly
0a7245a583
updated semantic search modal to manage for duplicate queries
2023-06-29 13:50:49 -04:00
KCaverly
a08d60fc61
added navigation on confirm to semantic search modal
2023-06-29 11:58:47 -04:00
Mikayla Maki
6ffa6afd20
fmt
2023-06-28 16:35:57 -07:00
Mikayla Maki
e0d618862c
Add click out handler
...
Make all context menus on button click toggles instead of re-shows
2023-06-28 16:23:07 -07:00
Max Brunsfeld
fd68a2afae
Debounce searches in semantic search modal
2023-06-28 15:02:20 -07:00
Julia
2ed0284d49
Stub out for language plugin
2023-06-28 17:06:50 -04:00
Julia
48bed2ee03
Merge branch 'main' into fix-broken-lsp-installations
2023-06-28 16:46:06 -04:00
Julia
db2b3e47bc
Reinstall Node whenever a NodeRuntime operation has serious error
2023-06-28 16:43:45 -04:00
KCaverly
85e71415fe
updated embedding database calls to maintain project consistency
...
Co-authored-by: maxbrunsfeld <max@zed.dev>
2023-06-28 16:25:05 -04:00
KCaverly
400d39740c
updated both indexing and search method for vector store, to maintain both zed worktree ids and db worktree ids
...
Co-authored-by: maxbrunsfeld <max@zed.dev>
2023-06-28 16:21:03 -04:00
KCaverly
3ca3de807c
Merge branch 'main' of github.com:zed-industries/zed into vector_store
2023-06-28 14:42:24 -04:00
KCaverly
40ff7779bb
WIP: Working modal, without navigation and search on every keystroke
2023-06-28 13:27:26 -04:00
Mikayla Maki
18dd3102bf
WIP: Add click out event to fix context menus
2023-06-28 09:29:49 -07:00
Joseph T. Lyons
6c53653831
v0.94.x dev
2023-06-28 12:23:42 -04:00
Mikayla Maki
ce52d90a9d
Collab UI v2 ( #2618 )
...
This PR implements
https://www.figma.com/file/pLq7dvhx2mFeWFOedXpUQ5/Project-%E2%80%93-Collaboration-UI?type=design&node-id=666%3A8610&t=XFGk6KEtTCFXBvCQ-1
Release notes:
- [x] Redesigned collaboration UI
- [x] Added voice support
2023-06-28 09:14:39 -07:00
Mikayla Maki
cb782c5a7b
Remove menu tracking state
2023-06-28 09:06:06 -07:00
Max Brunsfeld
34b81e2aab
collab 0.15.0
2023-06-28 09:01:07 -07:00
Mikayla Maki
88b30dea10
fmt
2023-06-28 08:44:17 -07:00
Mikayla Maki
9ab0efa1f8
Fix microphone and speaking styles
2023-06-28 08:41:31 -07:00
Julia
1882ce48be
Handle new elixir-ls release zip name
2023-06-28 10:22:39 -04:00
Piotr Osiewicz
49ce1977e3
Optimize user menu trigger
2023-06-28 15:27:38 +02:00
Piotr Osiewicz
c2f5855fdc
Fix warning
2023-06-28 15:22:17 +02:00
Piotr Osiewicz
456be1f86e
Hide user menu on second click
2023-06-28 15:19:32 +02:00
KCaverly
9d19dea7dd
updated vector_store to remove parsing module
2023-06-28 08:58:50 -04:00
Antonio Scandurra
2cb4616609
Enable assistant on stable
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-06-28 12:09:49 +02:00
Nathan Sobo
8f8a99d788
Bind cmd-? to assistant::toggle_focus
...
Bypass system help menu shortcut at the app delegate level to achieve this.
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-28 11:43:24 +02:00
Piotr Osiewicz
2ddf0e12bf
Undeafen: unmute if user was not muted prior to deafening
2023-06-28 11:10:56 +02:00
Nathan Sobo
83fc7b9b7c
Avoid scrolling to the new cursor position so the assistant's output is stable
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-28 10:32:06 +02:00
Nathan Sobo
f52d3ea5ef
Clean up tooltips, create conversation on cmd-n
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-28 10:27:29 +02:00
Mikayla Maki
749f60ba81
fmt
2023-06-27 19:25:46 -07:00
Mikayla Maki
5d02b49058
Added muted and currently speaking tracking
2023-06-27 19:23:13 -07:00
Max Brunsfeld
f128cf4a33
Defer scanning some worktree subdirectories until they are expanded in the project panel ( #2622 )
...
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.
2023-06-27 17:07:23 -07:00
Max Brunsfeld
201188fdaa
Use FakeFs in worktree gitignore test
2023-06-27 15:40:36 -07:00
Max Brunsfeld
fc02381196
Fix bugs in handling combined injections exposed by HEEx ( #2652 )
...
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 )).
2023-06-27 15:17:29 -07:00
Max Brunsfeld
81c26cfea0
Fix bugs in handling combined injections exposed by HEEx
2023-06-27 15:08:26 -07:00
Nate Butler
8b2732c3aa
workspace.titlebar
-> titlebar
in Theme
2023-06-27 17:27:58 -04:00
Mikayla Maki
19ca6a8875
Seperate online and offline
2023-06-27 13:33:04 -07:00
Nate Butler
825a7cb799
Update screenshare toggle, titlebar spacing
2023-06-27 16:20:45 -04:00
Mikayla Maki
60ce584427
WIP: Add mute icons
2023-06-27 13:12:52 -07:00
KCaverly
d1bdfa0be6
Added a dummy action for testing the semantic search functionality in the command palette.
...
Co-authored-by: maxbrunsfeld <max@zed.dev>
2023-06-27 15:53:07 -04:00
KCaverly
4bfe3de1f2
Working incremental index engine, with streaming similarity search!
...
Co-authored-by: maxbrunsfeld <max@zed.dev>
2023-06-27 15:31:21 -04:00
Julia
b2de28ccfc
Match original logic when determining server to request formatting
2023-06-27 14:16:01 -04:00
Mikayla Maki
37cb202c93
Rename and toggle screenshare
2023-06-27 09:58:01 -07:00
Piotr Osiewicz
3104275d87
Keep users muted once they undeafen themselves
2023-06-27 17:19:18 +02:00
Piotr Osiewicz
625814d30a
Merge branch 'main' into collab-titlebar-2
2023-06-27 15:40:43 +02:00
Nathan Sobo
04d93dfbd9
vim: indent/outdent ( #2644 )
...
Release Notes:
- vim: support indent/outdent
([#832 ](https://github.com/zed-industries/community/issues/832 >)).
2023-06-27 04:15:55 -06:00
Nathan Sobo
fd3ee0ebd0
Vim toggle case ( #2648 )
...
Release Notes:
- vim: Add ~ to toggle case
([#1410 ](https://github.com/zed-industries/community/issues/1410 ))
2023-06-27 04:13:24 -06:00
Nathan Sobo
29b2639b4c
Merge remote-tracking branch 'origin/main' into vim-indent
2023-06-27 12:09:47 +02:00
Nathan Sobo
16c23557b8
vim: Fix scrolling ( #2647 )
...
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.
2023-06-27 04:01:14 -06:00
Nathan Sobo
0fd0b60bd6
vim: Fix code actions menu ( #2650 )
...
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 ))
2023-06-27 03:56:08 -06:00
Piotr Osiewicz
71c0b7d74d
Add styles for user menu
2023-06-27 11:55:06 +02:00
Conrad Irwin
a1343f0d2c
vim: Fix code actions menu
...
Fixes : zed-industries/community#1690
2023-06-26 21:46:06 -06:00
Conrad Irwin
a9aa5e5196
vim: Add ~ to change case
...
Fixes : zed-industries/community#1410
2023-06-26 20:22:24 -06:00
Conrad Irwin
77dc22bff6
vim: Fix cursor restoration when undoing substitute
2023-06-26 20:22:24 -06:00
KCaverly
953e928bdb
WIP: Got the streaming matrix multiplication working, and started work on file hashing.
...
Co-authored-by: maxbrunsfeld <max@zed.dev>
2023-06-26 19:01:19 -04:00
Conrad Irwin
02fc5dd6c9
vim: Fix scrolling
...
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).
2023-06-26 13:29:14 -06:00
KCaverly
74b693d6b9
Updated database calls to share single connection, and simplified top_k_search sorting.
...
Co-authored-by: maxbrunsfeld <max@zed.dev>
2023-06-26 14:57:57 -04:00
Joseph T. Lyons
c0fb98cb3f
Factor out key name
2023-06-26 13:31:41 -04:00
Joseph T. Lyons
8d1cc8815b
Merge branch 'main' into add-installation-id-to-panic-events
2023-06-26 13:27:14 -04:00
Antonio Scandurra
43723168fc
Remove assistant panel zoom test
...
The test was testing pretty straightforward logic, but for some strange reason
it was failing on CI (but passed locally). I think it's fine to delete it and
make progress, if zooming regresses we'll find out pretty quickly.
2023-06-26 19:10:59 +02:00
Antonio Scandurra
d46d3e6d15
Try fixing test on CI
2023-06-26 18:18:22 +02:00
Conrad Irwin
c3e8cae20f
vim: indent/outdent
...
Fixes : zed-industries/community#832
2023-06-26 10:08:34 -06:00
Julia
2a8d1343d6
Add installation test binaries for all remaining adapters
2023-06-26 11:54:20 -04:00
Antonio Scandurra
e77abbf64f
Add hover state to assistant buttons
2023-06-26 17:48:43 +02:00
Antonio Scandurra
723c8b98b3
Show quote selection button
2023-06-26 17:24:31 +02:00
Antonio Scandurra
e723686b72
Shwo tooltips for assistant buttons
2023-06-26 17:17:45 +02:00
Piotr Osiewicz
f6edc68613
picker: fix warnings
2023-06-26 17:07:33 +02:00
Antonio Scandurra
edc7f30660
Add assistant icons to the toolbar
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-06-26 16:49:33 +02:00
KCaverly
0f232e0ce2
added file metadata retrieval from db
2023-06-26 10:35:56 -04:00
KCaverly
7937a16002
added brute force search and VectorSearch trait
2023-06-26 10:34:12 -04:00
Julia
5632f24d24
Handle new elixir-ls release zip name
2023-06-26 10:18:30 -04:00
Antonio Scandurra
c5b3785be5
Revert "Panic in debug if global settings can't be deserialized from defaults"
...
This reverts commit 7a051a0dcb
.
2023-06-26 16:03:19 +02:00
Antonio Scandurra
00e37bc2a2
Merge remote-tracking branch 'origin/main' into save-conversations
2023-06-26 15:59:19 +02:00
Antonio Scandurra
9d4dd5c42b
Insert empty user message when assisting with the current last message
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-06-26 15:57:36 +02:00
Antonio Scandurra
92d7b6aa3b
Allow toggling back and forth between conversation list and editor
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-06-26 15:43:21 +02:00
Piotr Osiewicz
55f06dcdb5
Add headers and footers to file finder
2023-06-26 13:31:46 +02:00
Piotr Osiewicz
a9b5c1d867
Remove unnecessary call to context.notify
2023-06-26 12:45:50 +02:00
KCaverly
65bbb7c57b
added proper blob serialization for embeddings and vector search trait
2023-06-25 20:02:56 -04:00
Nathan Sobo
bede668b14
Add a derive macro for Element
...
To turn any struct into a composite element, you can implement a render method
with the following signature:
fn render<V: View>(&mut self, view: &mut V, cx: &mut ViewContext<V>) -> AnyElement<V>;
Then add #[derive(Element)] to the struct definition.
This will make it easier to introduce higher-level components that are expressed in
terms of other elements.
2023-06-25 07:51:50 -06:00
Julia
c4b83c86cc
Avoid validating/reinstalling server which refuses will_fetch/start
...
These adapters have indicated some broader reason to the user why
they cannot be started, don't waste time/bandwidth attempting to
validate and reinstall them
2023-06-24 22:42:06 -04:00
Kirill Bulatov
82bd5fb564
Fix main compilation
2023-06-25 01:43:58 +03:00
Joseph T. Lyons
7d065fa14e
Add installation_id to panic events
...
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
2023-06-23 21:02:01 -04:00
Max Brunsfeld
030984dca4
Vim: substitute support ( #2641 )
...
Release Notes:
- vim mode now supports `s` for substitute
2023-06-23 12:58:14 -07:00
Max Brunsfeld
b0631e90ad
vim: Fix 1G ( #2640 )
...
Before this change code could not distinguish between a user providing a
count of 1 and no count at all.
Fixes : zed-industries/community#710
Release Notes:
- 1G now correctly goes to the first line in vim mode
([710](zed-industries/community#710 ))
2023-06-23 12:55:46 -07:00
Max Brunsfeld
91f87bb31f
Scan any external/ignored directories needed for LSP watchers
...
Also, don't include "external" files in project searches. Treat them
the same as ignored files.
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2023-06-23 12:53:25 -07:00
Julia
7caa096bd0
Remove installation test binary from language server instance
2023-06-23 13:24:50 -04:00
Max Brunsfeld
27b74e9ea1
Prune the set of expanded dir ids as entries are removed
2023-06-23 10:23:21 -07:00
Max Brunsfeld
b22a18345e
Emit loaded events for lazily loaded paths in worktree
2023-06-23 09:39:37 -07:00
KCaverly
c071b271be
removed tokio and sqlx dependency, added dummy embeddings provider to save on open ai costs when testing
2023-06-23 10:25:12 -04:00
Piotr Osiewicz
4b52ff65c1
Add styles for button
2023-06-23 13:30:40 +02:00
Piotr Osiewicz
6c676121f2
Fixed mic's state not being updated in titlebar if user mutes a mic via command palette
2023-06-23 13:22:33 +02:00
Piotr Osiewicz
62786cd508
Add button
2023-06-23 13:15:25 +02:00
Piotr Osiewicz
437e41f99d
Add styles for microphone and speakers buttons
2023-06-23 11:52:06 +02:00
Antonio Scandurra
5c5d598623
Insert new message right before the next valid one
2023-06-23 11:13:52 +02:00
Antonio Scandurra
6c7271c633
Test serialization roundtrip
2023-06-23 10:42:15 +02:00
Antonio Scandurra
c38bf2de33
Sort conversations in descending chronological order
2023-06-23 10:05:21 +02:00
Antonio Scandurra
5ea5368c07
Re-enable buffer search in assistant
2023-06-23 09:57:31 +02:00
Antonio Scandurra
ed88f52619
Remove double constrained call
2023-06-23 09:23:52 +02:00
Antonio Scandurra
6f0efec146
Merge remote-tracking branch 'origin/main' into save-conversations
2023-06-23 09:09:42 +02:00
Antonio Scandurra
ff07d0c2ed
Fix Conversation::messages_for_offsets
with empty message at the end
2023-06-23 08:58:30 +02:00
Julia
374c1a3a3e
Remove some status stuff
2023-06-23 00:17:27 -04:00
Julia
a8acf28989
Remove now-unnecessary complexity
2023-06-22 20:19:07 -04:00
Max Brunsfeld
9ad1ebf387
Fix project panel test helper
2023-06-22 17:02:01 -07:00
Max Brunsfeld
ffb0a215ea
Fix randomized worktree test failures
...
* Distinguish between unloaded and pending directories via separate entry kind.
* Scan directories before updating ignore statuses after fs events.
2023-06-22 16:52:04 -07:00
KCaverly
dd309070eb
open ai indexing on open for rust files
2023-06-22 16:50:07 -04:00
Conrad Irwin
926acd6033
vim: substitute handles multibyte characters
...
And is now in its own file
2023-06-22 13:22:19 -06:00
Conrad Irwin
0cacf01f90
vim: Fix 1G
...
Before this change code could not distinguish between a user providing a
count of 1 and no count at all.
Fixes : zed-industries/community#710
2023-06-22 12:11:14 -06:00
Piotr Osiewicz
8bd9fe1fb0
Deafen now also mutes microphone
2023-06-22 20:05:06 +02:00
Conrad Irwin
16022e9c1a
Add counts to subsitute (and all)
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-06-22 11:50:56 -06:00
Max Brunsfeld
5350164db9
Get integration test passing. Wait for expand entry on remote projects.
2023-06-22 10:34:28 -07:00
Max Brunsfeld
400e3cda32
Scan directories when they stop being ignored
2023-06-22 10:34:28 -07:00
Max Brunsfeld
bfc90f4502
Add failing test for changing a gitignore so a pending dir is no longer ignored
2023-06-22 10:34:28 -07:00
Max Brunsfeld
d3477f75ac
Fix reloading of git repositories
...
Also, clean up logic for reloading git repositories.
2023-06-22 10:34:28 -07:00
Max Brunsfeld
4424dafcd7
Fix expansion of ancestor directories when refreshing a path
2023-06-22 10:34:28 -07:00
Max Brunsfeld
3e6aedfc69
Expand dirs on-demand when opening buffers inside unloaded dirs
2023-06-22 10:34:28 -07:00
Max Brunsfeld
cd823ede4d
Add a bit to each entry indicating if it's outside of the worktree root
2023-06-22 10:34:28 -07:00
Max Brunsfeld
1b71589514
Fix confusion between canonical vs non-canonical paths when rescanning, expanding paths
2023-06-22 10:34:28 -07:00
Max Brunsfeld
3c06bd056a
Load git repositories when inserting the entry for the .git
...
Don't wait until populating that directory entry, for two reasons:
* In the case of submodules, .git is not a directory
* We don't eagerly populate .git directories, since their contents
are automatically ignored.
2023-06-22 10:34:28 -07:00
Max Brunsfeld
6fe74602ac
Fix detection of when refreshed paths are outside of worktree root
2023-06-22 10:34:28 -07:00
Max Brunsfeld
205c758e4e
Wait for ignored directory to be expanded in descendant entries test
2023-06-22 10:34:28 -07:00
Max Brunsfeld
aa6f2f1816
Remove logic for marking worktree entries as collapsed
2023-06-22 10:34:28 -07:00
Max Brunsfeld
f910d8fe3e
Only scan ignored or externals paths if expanded in a project panel
2023-06-22 10:34:28 -07:00
Max Brunsfeld
55f1a6647f
Model symlinks better in FakeFs, add read_link Fs method
2023-06-22 10:34:28 -07:00
Max Brunsfeld
4c03231863
Maintain on the background scanner a set of expanded directories
2023-06-22 10:34:28 -07:00
KCaverly
d4a4db42aa
WIP: started DB creating and naive inserts
2023-06-22 13:25:33 -04:00
Piotr Osiewicz
f774dbfe2e
Use new icons, delete old ones
2023-06-22 18:58:11 +02:00
Piotr Osiewicz
18c4d43ee7
Add deafen button
2023-06-22 18:51:26 +02:00
Nate Butler
1a0b2bfef8
Update stream control icons
2023-06-22 12:21:59 -04:00
Piotr Osiewicz
fcce1bc488
Fixup xtask compilation
2023-06-22 18:06:52 +02:00
Piotr Osiewicz
b430be5bc6
cargo fmt
2023-06-22 17:59:56 +02:00