Commit Graph
10533 Commits
Author SHA1 Message Date
Derek Briggs e11085f3ee Update README.md 2023-07-12 11:35:38 -06:00
Joseph T. Lyons 1060c2e225 v0.96.x dev 2023-07-12 13:30:28 -04:00
Kyle Caverly ccd269d983 Vector store (#2658)
This PR includes a new crate, aimed at maintaining a consistent semantic
embedding database, for any project opened with Zed. At a high level,
for each file in a project, we parse the file with treesitter, embed the
symbol "document" objects with OpenAI, and maintain a consistent
database of these embeddings and offset locations in a sqlite database.
Once stored, we have built a simple modal interface for querying on
these symbols embeddings using natural language, offering the
opportunity to navigate to the selected symbol.

This initial PR is intended to provide this functionality only in preview,
as we explore, evaluate and iterate on the vector store.

- Full task details are provided in the [Semantic Search Linear
Project](https://linear.app/zed-industries/project/semantic-search-7c787d198ebe/Z)
2023-07-12 13:26:17 -04:00
KCaverly d18911a8f9 merged with main 2023-07-12 13:15:23 -04:00
Derek Briggs 133ab08e97 Update README.md 2023-07-12 10:58:39 -06:00
Derek Briggs c2cf8f393d Update README.md 2023-07-12 10:51:09 -06:00
Piotr Osiewicz d9dab22322 Piotr/z 2556 add create branch button (#2696)
Release Notes:

- N/A
2023-07-12 18:46:33 +02:00
Nate ButlerandPiotr Osiewicz 7010dec952 Update picker footer button style
Co-Authored-By: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2023-07-12 12:40:37 -04:00
Piotr Osiewicz 45ba98fab1 Merge branch 'main' into piotr/z-2556-add-create-branch-button 2023-07-12 18:11:52 +02:00
Piotr Osiewicz b15a0b33ab Increase trailoff limit for modal branch picker. (#2710)
Z-2601

Follow-up to modal branch picker, this is the updated version:

![image](https://github.com/zed-industries/zed/assets/24362066/1017e2d9-7107-4e4c-805e-bae46412079a)
Previously a trail off limit was much smaller:

![image](https://github.com/zed-industries/zed/assets/24362066/efb6c7cf-d90d-4fbc-8c28-84872f215ac5)

Release notes:
- N/A
2023-07-12 18:07:54 +02:00
Piotr Osiewicz 62ecc36865 Increase trailoff limit for modal branch picker.
Z-2601
2023-07-12 17:58:00 +02:00
Julia 00abdcb596 Avoid user menu toggle button overlapping with tab bar top border (#2707)
Something little I noticed today

| | Normal  | Hovered |
| ------------- | ------------- | - |
| Before | ![CleanShot 2023-07-11 at 16 57
37](https://github.com/zed-industries/zed/assets/30666851/30769d09-678e-4d66-96de-df51c6d030cc)
![CleanShot 2023-07-12 at 10 17
20](https://github.com/zed-industries/zed/assets/30666851/801e1f26-1cea-45a7-8a50-b620095e2131)
| ![CleanShot 2023-07-11 at 16 59
46](https://github.com/zed-industries/zed/assets/30666851/fd1324c2-669f-42f8-96b3-4d65b555fb6e)
![CleanShot 2023-07-12 at 10 17
39](https://github.com/zed-industries/zed/assets/30666851/b286488d-b81e-44d5-a67c-dd816c072f86)
|
| After | ![CleanShot 2023-07-11 at 16 59
25](https://github.com/zed-industries/zed/assets/30666851/9942733f-8129-4854-bbfe-9a292b0e2c0e)
![CleanShot 2023-07-12 at 10 18
52](https://github.com/zed-industries/zed/assets/30666851/0b0f5fec-4c44-4c4f-8921-3b8a2cfff38c)
| ![CleanShot 2023-07-11 at 17 02
19](https://github.com/zed-industries/zed/assets/30666851/6ab82b26-0548-4ce7-8fdc-38ae561d26aa)
![CleanShot 2023-07-12 at 10 19
28](https://github.com/zed-industries/zed/assets/30666851/a024f6e8-f0f4-4d81-9f90-38a655a09031)
|

Also makes it match the contacts button and seems to more closely
resemble the mockups as far as I can tell

![CleanShot 2023-07-11 at 17 02
55](https://github.com/zed-industries/zed/assets/30666851/07fb1dea-5922-4bdc-9a3b-f7c1b105d017)

Release Notes:

- Fixed the titlebar user menu button obscuring part of the border below
it.
2023-07-12 11:31:42 -04:00
Piotr Osiewicz be396f9253 chore: Disable http2 feature in isahc. (#2709)
This removes transitive dependency on libnghttp2, which is pretty heavy.

Release Notes:

- N/A
2023-07-12 17:24:01 +02:00
Piotr Osiewicz ac71314bdd chore: Disable http2 feature in isahc.
This removes transitive dependency on libnghttp2, which is pretty heavy.
2023-07-12 16:53:01 +02:00
Piotr Osiewicz 5b877e0b9b chore: Bump ipc-channel to 0.16.1. (#2708)
Kevin Hovsäter reported a crash in cli when running 'cargo run -p cli --
--bundle-path target/debug/Zed'. It was caused by unaligned pointer
access in ipc-channel library; rustc started generating debug_asserts
for pointer alignment starting with 1.70, which we have
oh-so-conveniently upgraded to shortly before Kevin noticed a crash.
Rust 1.70 did not introduce this panic, it merely started triggering on
UB that was previously ignored.

/cc @hovsater @SomeoneToIgnore 
Release Notes:

- N/A
2023-07-12 13:49:55 +02:00
Piotr Osiewicz 86e15fc9e4 chore: Bump ipc-channel to 0.16.1.
Kevin Hovsäter reported a crash in cli when running 'cargo run -po cli -- --bundle-path target/debug/Zed'. It was caused by unaligned pointer access in ipc-channel library; rustc started generating debug_asserts for pointer alignment starting with 1.70, which we have oh-so-conveniently upgraded to shortly before Kevin noticed a fix.
Rust 1.70 did not introduce this panic, it merely started triggering on UB that was previously ignored.
2023-07-12 13:27:14 +02:00
Piotr Osiewicz 7ad2e0acf7 recent_projects: Perform fuzzy search on compacted paths. (#2703)
Match highlighting for recent projects picker was off, because the path
representation was compacted - for a path '/Users/hiro/Projects/zed' we
compact it to use a tilde instead of home directory. However, the
highlight positions were always calculated for a full path, leading to a
mismatch in highlights. This commit addresses this by running fuzzy
search on compacted paths instead of using long paths. This might lead
to a slight performance hit, but given that recent projects modal
shouldn't have that many items in the first place, it should be okay.

Z-2546

Release Notes:

- Fixed result highlighting in "Recent projects" modal.
2023-07-12 11:47:28 +02:00
KCaverly 0eb22a87b4 added test registration for project settings 2023-07-11 20:12:43 -04:00
KCaverly 95143f5fe8 Merge branch 'main' of github.com:zed-industries/zed into vector_store 2023-07-11 20:05:29 -04:00
KCaverly 0192c5232e updated vector store settings to remove batch embeddings size 2023-07-11 19:54:03 -04:00
Max Brunsfeld bf50af123b Define semantic search action regardless of whether the feature is enabled 2023-07-11 15:02:43 -07:00
Max Brunsfeld f29bf2baf1 Fix TSX embedding query 2023-07-11 15:02:19 -07:00
Max BrunsfeldandKyle 4a59d3a0d0 Get vector store test passing - wait for indexing
Co-authored-by: Kyle <kyle@zed.dev>
2023-07-11 14:30:11 -07:00
Max BrunsfeldandKyle c25b6914c2 Update dot product test to use larger vectors
Co-authored-by: Kyle <kyle@zed.dev>
2023-07-11 14:29:48 -07:00
Max BrunsfeldandKyle 0f09fec510 Use cmd-ctrl-t for semantic search key binding
Co-authored-by: Kyle <kyle@zed.dev>
2023-07-11 14:29:06 -07:00
KCaverlyandmaxbrunsfeld d67d7c8c72 added initial keymap for toggle semantic search
Co-authored-by: maxbrunsfeld <max@zed.dev>
2023-07-11 17:13:58 -04:00
Julia 0791eb1f83 Avoid user menu toggle button overlapping with tab bar top border 2023-07-11 16:49:53 -04:00
KCaverly 6fe92b0851 cleaned up warnings and added javascript 2023-07-11 16:41:08 -04:00
KCaverly 8b4537164b updated embedding queries for tsx and typescript 2023-07-11 16:22:40 -04:00
KCaverly 5e11825ef3 expanded embeddable context to accomodate for struct context and file paths 2023-07-11 15:58:33 -04:00
Mikayla Maki c1c0a979e8 Fix a bug where the terminal would not be closed by the terminal exiting (#2706)
Release Notes:

- Fixed a bug where terminal tabs in the panel would not close on tty
process exit.
2023-07-11 12:23:26 -07:00
Mikayla Maki 9b464bdd9f fmt 2023-07-11 12:17:50 -07:00
Mikayla Maki 0e73ef5339 Fix a bug where the terminal panel's items wouldn't be hooked up properly to workspace actions 2023-07-11 12:12:37 -07:00
Kirill Bulatov ed97216a04 Refactor LSP restart logic (#2705)
Instead of storing `initialization_options` in every LSP adapter as
before, store previous LSP settings in `Project` entirely.

This way, we can later have use multiple different project
configurations per single LSP with its associated adapter.

Release Notes:

- N/A
2023-07-11 22:09:40 +03:00
Kirill BulatovandMax Brunsfeld b214a1af15 Refactor LSP restart logic
Instead of storing `initialization_options` in every LSP adapter as
before, store previous LSP settings in `Project` entirely.

This way, we can later have use multiple different project
configurations per single LSP with its associated adapter.

co-authored-by: Max Brunsfeld <max@zed.dev>
2023-07-11 21:56:55 +03:00
KCaverly f2264fb0a9 brought up to speed with main 2023-07-11 14:50:48 -04:00
KCaverly 6937a77ae9 added versioning to files table 2023-07-11 14:42:03 -04:00
Joseph T. Lyons c8bd205c6e Add call events (#2704)
Release Notes:

- N/A
2023-07-11 14:40:07 -04:00
Joseph T. LyonsandMax Brunsfeld b3f5408ed4 Add call events
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2023-07-11 13:58:55 -04:00
Kirill Bulatov 6c4b0b2b2f Revert "Fix language servers improper restarts"
This reverts commit 78ecc82fed.
2023-07-11 20:46:45 +03:00
KCaverly d86877851a added opt-in default settings for vector store 2023-07-11 12:03:56 -04:00
Kirill Bulatov 0b55ee4b8d Fix language servers improper restarts (#2702)
Fixes
https://linear.app/zed-industries/issue/Z-2595/language-servers-are-unnecessarily-restarted-when-unrelated-settings

Language servers mixed `initialization_options` from hardcodes and user
settings, fix that to ensure we restart servers on their settings
changes only.

Release Notes:

- N/A
2023-07-11 17:15:19 +03:00
Kirill Bulatov 752a0fa143 Add a test 2023-07-11 17:10:34 +03:00
KCaverly 36c689777b updated vector_store to handle for removed files 2023-07-11 10:03:53 -04:00
Kirill Bulatov 78ecc82fed Fix language servers improper restarts
Language servers mixed `initialization_options` from hardcodes and user
settings, fix that to ensure we restart servers on their settings
changes only.
2023-07-11 16:36:20 +03:00
Piotr Osiewicz dbe919558f fixup! recent_projects: Perform fuzzy search on compacted paths. 2023-07-11 15:29:15 +02:00
Piotr Osiewicz 32bb87561a recent_projects: Perform fuzzy search on compacted paths.
Match highlighting for recent projects picker was off, because the path representation was compacted - for a path '/Users/hiro/Projects/zed' we compact it to use a tilde instead of home directory. However, the highlight positions were always calculated for a full path, leading to a mismatch in highlights.
This commit addresses this by running fuzzy search on compacted paths instead of using long paths. This might lead to a slight performance hit, but given that recent projects modal shouldn't have that many items in the first place, it should be okay.

Z-2546
2023-07-11 15:23:17 +02:00
Piotr Osiewicz 1d424e1793 branches: Add a modal branch list. (#2697)
Extract branch list into a separate vcs_menu crate akin to
recent_projects. Add current bind for a modal branch to branch popover's
tooltip.

Z-2555

Release Notes:
- N/A
2023-07-11 14:40:00 +02:00
Piotr Osiewicz 362d9e87cf Piotr/z 2590 search result marks jump around in scrollbar as cursor (#2700)
This closes ticket Z-2590 reported by @JosephTLyons . Thanks Joseph =)
Release Notes:

- N/A
2023-07-11 09:40:00 +02:00
Piotr Osiewicz 0e64d45e0f editor: Keep scrollbar up if there are selections (#2698)
Z-2556

/cc @JosephTLyons 

Release Notes:

- N/A
2023-07-11 09:32:34 +02:00