Commit Graph

10656 Commits

Author SHA1 Message Date
KCaverly
ca6f7d8a80 add worktree previously indexed functionality to vector db 2023-07-26 09:17:04 -04:00
KCaverly
75999204ad update project search to only show semantic button visible with semantic_index enabled 2023-07-25 16:26:37 -04:00
KCaverly
e8210b827d move visible text to just start anchor with context lines for semantic search 2023-07-25 15:24:27 -04:00
KCaverly
cdceddd2cc update semantic index tests for elixir 2023-07-25 15:20:35 -04:00
KCaverly
97c3d97792 update semantic index tests for cpp 2023-07-25 13:30:38 -04:00
KCaverly
c86096a886 update semantic index tests for javascript 2023-07-25 10:38:37 -04:00
Max Brunsfeld
81b05f2a08 Optimize glob filtering of semantic search
Co-authored-by: Kyle <kyle@zed.dev>
2023-07-20 14:23:11 -07:00
KCaverly
e02d6bc0d4 add glob filtering functionality to semantic search 2023-07-20 13:46:27 -04:00
KCaverly
efe973ebe2 add embedding query for json with nested arrays and strings
Co-authored-by: maxbrunsfeld <max@zed.dev>
2023-07-19 16:52:44 -04:00
KCaverly
9809ec3d70 update treesitter parsing to accomodate for collapsed nested functions
Co-authored-by: maxbrunsfeld <max@zed.dev>
2023-07-19 15:47:05 -04:00
KCaverly
0e071919a0 parellelize embedding api calls 2023-07-18 16:09:44 -04:00
Max Brunsfeld
342dbc6945 Fix rendering of project search while semantic index is indexing or running
Co-authored-by: Kyle <kyle@zed.dev>
2023-07-18 12:01:42 -07:00
Max Brunsfeld
8d0614ce74 Populate project search results multi-buffer from semantic search
Co-authored-by: Kyle <kyle@zed.dev>
2023-07-18 11:44:58 -07:00
KCaverly
80ef92a3e1 fix db schema update process to ensure all tables are dropped 2023-07-18 11:14:13 -04:00
KCaverly
ed1b1a5ccd update logging for open ai embedding and remove redundant truncation 2023-07-18 11:00:21 -04:00
KCaverly
b9fdfd60f0 catch up with main 2023-07-18 10:26:28 -04:00
Julia
192f747bd1
Detect Node broken-ness initially (#2745)
This will help cases where Node is broken causing Copilot to fail to
start but because it doesn't install via NPM we would not have caught it
prior.

Release Notes:
- Improved detection of broken Node installation impacting Copilot
([#1551](https://github.com/zed-industries/community/issues/1551)).
2023-07-18 10:20:47 -04:00
Julia
aee008440b Detect Node broken-ness initially
This will help cases where Node is broken causing Copilot to fail to
start but because it doesn't install via NPM we would not have caught
it prior.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-07-18 10:02:14 -04:00
Piotr Osiewicz
137734cfcf
Piotr/z 2588 php (#2721)
Release Notes:

- Added syntax highlighting & Intelephense LSP support for PHP language.
([#46](https://github.com/zed-industries/community/issues/406)).
2023-07-18 14:57:40 +02:00
Kirill Bulatov
009cf48b26
Slightly tidy up vector_db code (#2744)
Code snippet
```rust
fn main() {
    //√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√√
}
```

has length of 191, but consists of 87 chars, and the debug code with
`.truncate(100)` panicked.
Fixed that issue, cc @KCaverly 


Release Notes:

- N/A
2023-07-18 14:22:34 +03:00
Kirill Bulatov
a884bd77e1 Slightly tidy up vector_db code
Avoid panicking when truncating code with special chars
2023-07-18 14:06:57 +03:00
Piotr Osiewicz
fa529d9590 Remove redundant debug impl 2023-07-18 12:21:00 +02:00
Piotr Osiewicz
7fde3614fe Remove leftover comment 2023-07-18 12:19:35 +02:00
Max Brunsfeld
afc4c10ec1 Start work on exposing semantic search via project search view
Co-authored-by: Kyle <kyle@zed.dev>
2023-07-17 18:10:51 -07:00
KCaverly
d83c4ffb07 remove debug logging for enabled settings 2023-07-17 17:09:51 -04:00
Conrad Irwin
96abba2b7d
vim: Allow ctrl+[ as an alias for escape (#2741)
Also remove unneeded mappings in `g` and `z` modes

Release Notes:

- Adds `ctrl+[` as an alias for escape
([#538](https://github.com/zed-industries/community/issues/538)).
2023-07-17 15:07:53 -06:00
KCaverly
8b42f5b1b3 rename vector_store crate to semantic_index 2023-07-17 17:06:10 -04:00
Conrad Irwin
9e44de90af Allow ctrl+[ as an alias for escape
Also remove unneeded mappings in `g` and `z` modes

Fixes: zed-industries/community#358
2023-07-17 14:59:08 -06:00
KCaverly
e630ff38c4 add embedding treesitter queries for elixir 2023-07-17 16:29:25 -04:00
Joseph T. Lyons
9f650dfa52
Prevent multiple submissions of the same feedback text (#2740)
Fixes:
https://linear.app/zed-industries/issue/Z-2416/improvements-to-feedback-submission

We get a lot of duplicate messages through our in-app feedback. My best
guess is that because we do not tell the user we are doing anything, and
because submission takes awhile, users are hitting the submission button
mutliple times. This PR blocks the submission code, once an initial
submission is sent. If the original submission fails, we unblock the
submission code. The submit button is disabled and enabled accordingly
as well.

Release Notes:

- N/A
2023-07-17 16:15:49 -04:00
Mikayla Maki
1a8bfdfa21
feat(workspace): add option for moving the tab close button to the left (#2739)
Fixes https://github.com/zed-industries/community/issues/1760

Release Notes:

- Add option for chosing where the close button should be displayed on
editor tabs
2023-07-17 13:10:42 -07:00
Joseph T. Lyons
ede86a686c Prevent multiple submissions of the same feedback text
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
2023-07-17 16:10:34 -04:00
Alex Viscreanu
4efcf492ee
feat(workspace): add option for moving the tab close button to the left 2023-07-17 21:17:28 +02:00
Mikayla Maki
04625fe376
feat(workspace): show git status on editor tabs (#2736)
Fixes https://github.com/zed-industries/community/issues/1674

Release Notes:

- Added option for showing git status on editor tabs
2023-07-17 12:14:39 -07:00
KCaverly
f0bf60fded add css as a embeddable file type in which the entire file is embedded individually 2023-07-17 14:53:57 -04:00
Alex Viscreanu
6793d4b6b8
feat(workspace): show git status on editor tabs 2023-07-17 20:53:42 +02:00
KCaverly
1362c5a3d9 add embedding treesitter query for cpp 2023-07-17 14:43:29 -04:00
Max Brunsfeld
fef73ae921
Make macOS application menu aware of which key bindings are disabled (#2735)
Follow-up of https://github.com/zed-industries/zed/pull/2678
Deals with https://github.com/zed-industries/community/issues/772

Refreshes macOs menu panel on keymap file change and properly ignore
disabled actions.

Release Notes:

- Fixes a bug when disabled actions from macOs menu were still working
2023-07-17 11:20:41 -07:00
Julia
3e136943c0
After first panic, ignore others and tear down process even if in thread (#2725)
Spent a bit in a deep dive into how to handle this and honestly the
situation is rather unfortunate. The core problem is that when we have a
panic anywhere we need to tear down the app, and we'd like to do that as
cleanly as possible, avoiding throwing any other panics along the way if
possible.

We've been seeing a number of panics being reported which are
nonsensical, seemingly pointing to being a fallout panic from a worker
thread panic-ing, at which point we would write multiple panics to the
panic file, and we could possibly upload either both or the wrong panic
causing a wild goose chase. Unfortunately I've been entirely unable to
reproduce the specific panic we've been seeing but I was able to read
through the code responsible and confirm that under specific situations
a panic on one worker can cause another worker or the main thread to
also panic.

An easy solution to this is just to ignore any panics after the first
one. I'm thinking that *hopefully* we can trust the first panic to reach
the panic hook first so that the flag doesn't accidentally filter out
the panic we actually care about.

That being said we were expecting that to have already been the case
about which panic gets written to the panic file first, the first one in
the file being the one we upload, which doesn't seem to have been the
case. I'm hoping it was IO silliness causing that and that the flag
shouldn't be race-y, however this is still a shot in the dark. 🤞

As for cleanly shutting down, there's not really much we can do. One
thread physically cannot cause another to unwind without somehow sending
a message which isn't super useful. The only way for a thread to shut
down all threads and the process is to go nuclear and abort/exit the
process. This will never unwind other threads, effectively having the
same effect on those threads as compiling with `panic = "abort"` would.

With some (mis)use of `std::panic::resume_unwind` we can at least say
that for whatever thread actually panic-ed we will unwind, and any other
threads that panic as a result will probably get at least partway
through unwinding. This is weird, almost a combination of panic
rewinding and aborting, and may actually be worse than just biting the
bullet and aborting immediately.

I'm really not a fan of where I've ended up but it does seem to at the
very least an improvement. The main question in my mind at this point is
whether it would be better to attempt to unwind what we can or go all in
on abort. I'd love some input on that.

Release Notes:
- Improved panic reporting when a background thread panics.
2023-07-17 13:52:33 -04:00
Julia
6770aeeb3c After first panic, ignore others and tear down process even if in thread 2023-07-17 13:43:43 -04:00
Kirill Bulatov
a4bf19c5bd Simplify NoAction filtering logic
co-authored-by: Max Brunsfeld <max@zed.dev>
2023-07-17 20:42:35 +03:00
Kirill Bulatov
4cc06748c9 Ignore keybindings with NoAction in config overrides 2023-07-17 18:34:39 +03:00
KCaverly
cf0dd09b5c update vector_store to accomodate for full file parsing for JSON, TOML and YAML files 2023-07-17 10:04:32 -04:00
KCaverly
4bece54655 update jsx family of languages for preceeding comments and nested exports 2023-07-17 09:22:37 -04:00
Piotr Osiewicz
dd6b674e7e Remove dbg calls 2023-07-17 13:08:41 +02:00
Piotr Osiewicz
8642a1d074 Remove dbg! calls 2023-07-17 13:03:57 +02:00
Piotr Osiewicz
ee9123a7da Remove test 2023-07-17 12:56:25 +02:00
Piotr Osiewicz
5b6582a7c2 rustfmt 2023-07-17 12:51:00 +02:00
Piotr Osiewicz
6c7a6d43fc Cargo fix 2023-07-17 12:38:35 +02:00
Piotr Osiewicz
94796e943b Set language id for PHP. LSP works! 2023-07-17 12:36:08 +02:00