Commit Graph

230 Commits

Author SHA1 Message Date
Piotr Osiewicz
e6ebe7974d
gpui: Add Global marker trait (#7095)
This should prevent a class of bugs where one queries the wrong type of
global, which results in oddities at runtime.

Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-01-30 14:08:20 -05:00
Marshall Bowers
0cb8b0e451
Clean up Cargo.toml files (#7044)
This PR cleans up some inconsistencies in the `Cargo.toml` files that
were driving me crazy.

Release Notes:

- N/A
2024-01-29 23:47:20 -05:00
Marshall Bowers
027f055841
Update casing of "OpenAI" in identifiers to match Rust conventions (#6940)
This PR updates the casing of "OpenAI" when used in Rust identifiers to
match the [Rust naming
guidelines](https://rust-lang.github.io/api-guidelines/naming.html):

> In `UpperCamelCase`, acronyms and contractions of compound words count
as one word: use `Uuid` rather than `UUID`, `Usize` rather than `USize`
or `Stdin` rather than `StdIn`.

Release Notes:

- N/A
2024-01-28 12:01:10 -05:00
Marshall Bowers
dfad36f668
Upgrade tree-sitter-php to v0.21.1 (#6902)
This PR upgrades `tree-sitter-php` to v0.21.1.

Here is the diff between our current version and this version:
d43130fd15...29a49d3a53

The primary impetus for this change is to get this change that adds the
`license` field to the `Cargo.toml`:
https://github.com/tree-sitter/tree-sitter-php/pull/193

This will silence the warning that is shown when running
`script/generate-licenses`.

Release Notes:

- Upgraded `tree-sitter-php` to v0.21.1.
2024-01-27 17:43:39 -05:00
Piotr Osiewicz
0a0a866dd5
Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535)
Release Notes:
- N/A
2024-01-27 13:51:16 +01:00
Julian Braha
08d2ba72d6 Add missing .unwrap() 2024-01-24 18:19:03 +00:00
Julian Braha
85f5e7d0bb Fix formatting with cargo-fmt 2024-01-24 18:10:11 +00:00
Julian Braha
fd6f71d287 Replace tempdir crate with tempfile 2024-01-24 17:58:09 +00:00
Antonio Scandurra
25a7eb27d2 Move interaction with keychain off the main thread 2024-01-24 14:53:05 +01:00
Antonio Scandurra
22046ef9a7 Load language models in the background 2024-01-24 13:36:44 +01:00
Piotr Osiewicz
f2ff7fa4d5
chore: Change AGPL-licensed crates to GPL (except for collab) (#4231)
- [x] Fill in GPL license text.
- [x] live_kit_client depends on live_kit_server as non-dev dependency,
even though it seems to only be used for tests. Is that an issue?

Release Notes:
- N/A
2024-01-24 00:26:58 +01:00
Piotr Osiewicz
21e6b09361
Remove license-file from Cargo.toml as it is apparently redundant (#4218)
Release Notes:

- N/A
2024-01-23 17:40:30 +01:00
Piotr Osiewicz
678bdddd7d
chore: Add crate licenses. (#4158)
- GPUI and all dependencies: Apache 2
- Everything else: AGPL

Here's a script that I've generated for it:
https://gist.github.com/osiewicz/6afdd6626e517da24a2092807e6f0b6e

Release Notes:
- N/A

---------

Co-authored-by: David <david@zed.dev>
2024-01-23 16:56:22 +01:00
Joseph T. Lyons
b807e6fe80 Use try_global() 2024-01-18 01:33:30 -05:00
Mikayla
285f4d1be9
Fix busted test 2024-01-17 14:57:13 -08:00
Mikayla
57400e9687
Fix typos detected by crate-ci/typos 2024-01-17 14:31:21 -08:00
Mikayla
5897b18cfd
remove more commented code 2024-01-12 20:10:40 -08:00
Marshall Bowers
aff119b80a
Fix possessive "its" in docs and comments (#3998)
This PR fixes a number of places where we were incorrectly using "it's"
where we needed to use the possessive "its".

Release Notes:

- N/A
2024-01-10 10:09:48 -05:00
Piotr Osiewicz
1c77104050 chore: Enable asset compression
This reduces size of release binary by ~20% from 134MB to 107MB without noticeable slowdown on startup. Assets are decompressed granularly, on first access
2024-01-10 13:54:25 +01:00
Conrad Irwin
59a1648445
Disallow creating files with '..' (#3156)
Release Notes:

- Fixed a crash that could occur when creating files with '..' in the
path
2024-01-08 15:43:57 -07:00
Conrad Irwin
71149bc7cc Fix relative path opening from project symbols
Co-Authored-By: Max <max@zed.dev>
2024-01-08 15:12:22 -07:00
Piotr Osiewicz
e4b1c76895
Display setting documentation in settings.json (#3936)
Let this screenshot of settings.json speak for itself: 

![image](https://github.com/zed-industries/zed/assets/24362066/fca60383-1788-43f9-803b-00f083394c8a)

Release Notes:
- Added code completion & on-hover documentation to Zed's settings.json
file.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-01-08 19:30:18 +01:00
Max Brunsfeld
f5ba22659b Remove 2 suffix from gpui
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:59:39 -08:00
Max Brunsfeld
0cf65223ce Remove 2 suffix for collab, rope, settings, menu
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:29:16 -08:00
Max Brunsfeld
5ddd298b4d Remove 2 suffix for fs, db, semantic_index, prettier
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:09:42 -08:00
Max Brunsfeld
64e512232d Start work on supporting custom languages 2024-01-02 08:01:59 -08:00
Max Brunsfeld
6468fe737e Use 'any-match?' predicate in elixir embedding query 2023-11-27 15:06:20 -08:00
Joseph T. Lyons
516a8790b9 Add gpt-4-1106-preview model 2023-11-14 08:28:57 -05:00
Kirill Bulatov
eb8a0e7148 Uncomment persistence tests 2023-11-03 12:38:09 +02:00
Kirill Bulatov
d673efebd2 Add prettier workspace resolution test 2023-11-03 11:02:50 +02:00
KCaverly
a2c3971ad6 moved authentication for the semantic index into the EmbeddingProvider 2023-10-30 10:02:27 -04:00
KCaverly
6c8bb4b05e ensure OpenAIEmbeddingProvider is using the provider credentials 2023-10-27 08:33:35 +02:00
KCaverly
ca82ec8e8e fixed truncation error in fake language model 2023-10-26 14:05:55 +02:00
KCaverly
3447a9478c updated authentication for embedding provider 2023-10-26 11:18:16 +02:00
KCaverly
71bc35d241 catchup with main 2023-10-25 16:31:00 +02:00
KCaverly
8ffe5a3ec7 move keychain access into semantic index as opposed to on init 2023-10-24 13:26:37 +02:00
KCaverly
4e90e45999 move embedding truncation to base model 2023-10-23 14:07:45 +02:00
KCaverly
2b780ee7b2 add base model to EmbeddingProvider, not yet leveraged for truncation 2023-10-22 15:00:09 +02:00
KCaverly
d1dec8314a move OpenAIEmbeddings to OpenAIEmbeddingProvider in providers folder 2023-10-22 14:46:22 +02:00
KCaverly
106115676d update semantic search to use keychain as fallback 2023-10-21 10:19:50 -04:00
Kirill Bulatov
525ff6bf74 Remove zed -> ... -> semantic_index -> zed Cargo dependency cycle 2023-10-13 10:27:08 +03:00
Kirill Bulatov
4b15a2bd63 Rebase fixes 2023-10-11 12:56:29 +03:00
Max Brunsfeld
95342c8c33 Merge branch 'main' into channel-changes 2023-10-03 17:52:28 -07:00
Mikayla
6007c8705c
Upgrade SeaORM to latest version, also upgrade sqlite bindings, rustqlite, and remove SeaQuery
co-authored-by: Max <max@zed.dev>
2023-10-03 12:16:53 -07:00
Kyle Caverly
cf5d89d13c
Leverage embeddings query to collapse syntax nodes if not selected (#3067)
Reverts zed-industries/zed#3049
2023-10-03 12:02:47 +03:00
KCaverly
9f160537ef move collapsed only matches outside item parent in embedding.scm 2023-10-03 11:56:45 +03:00
KCaverly
3c12e711a4 add scheme for full parseable files in semantic index 2023-09-29 14:35:02 -04:00
KCaverly
0e6fd645fd leverage embeddings len returned in construction matrix multiplication 2023-09-27 10:33:04 -04:00
KCaverly
abefa2738b removed blas and increase batch size for vector search 2023-09-27 09:43:23 -04:00
KCaverly
e75f56a0f2 move to system blas 2023-09-26 12:39:22 -04:00
KCaverly
330a71d28b fixed bug limiting number of results returned 2023-09-26 10:29:55 -04:00
KCaverly
ea278b5b12 ensure desc sort and cleanup unused imports 2023-09-26 09:53:49 -04:00
Mikayla Maki
591ec02cea
Add support for the experimental Next LS for Elixir (#3024)
This is a PR I built for a friend of a friend at StrangeLoop, who is
making a much better LSP for elixir that elixir folks want to experiment
with. This PR also improves the our debug log viewer to handle LSP
restarts.

TODO:
- [ ] Make sure NextLS binary loading works.

Release Notes:

- Added support for the experimental Next LS for Elxir, to enable it add
the following field to your settings to enable:

```json
"elixir": {
    "next": "on"
}
```
2023-09-25 12:52:56 -05:00
KCaverly
86ec0b1d9f implement new search strategy 2023-09-25 13:44:19 -04:00
KCaverly
fbd6b5b434 cargo fmt 2023-09-22 09:46:06 -04:00
KCaverly
68c37ca2a4 move embedding provider to ai crate 2023-09-22 09:33:59 -04:00
Kyle Caverly
3c2b05be90
add semantic index status, for non authenticated users (#3005)
Update project search semantic ui to accommodate for users who have not
set the OPENAI_API_KEY in their environment variables.

Release Notes:

- Expand Semantic Index status to include status for non authenticated
users
- Update Search UI to illustrate this status.
2023-09-21 14:18:58 -04:00
KCaverly
7b63369df2 move api authentication to embedding provider 2023-09-21 14:00:00 -04:00
KCaverly
997f362cc2 add semantic index status, for non authenticated users 2023-09-21 13:40:01 -04:00
KCaverly
37a0c6615f remove conditional action registration for activate semantic search mode 2023-09-20 12:38:29 -04:00
Mikayla
0cceb3fdf1
Get nextLS running 2023-09-20 06:55:24 -07:00
Kyle Caverly
2f44055079
Semantic index eval (#2988)
v0 of the Semantic Index evaluate test suite

Release Notes:

- Added eval.rs as an example to the semantic-index crates
- Generates test metrics for two small projects, as a starting point to
systematically evaluate retrieval quality
2023-09-19 19:17:06 -04:00
KCaverly
11b3bfdc99 fix warnings 2023-09-19 19:05:26 -04:00
KCaverly
25cb79e475 remove git2 dependency for repository cloning in semantic_index eval 2023-09-19 18:55:15 -04:00
KCaverly
d85acceeec move git2 to workspace dependency globally 2023-09-19 16:13:47 -04:00
KCaverly
4f1a59ebf5 formatting 2023-09-19 12:27:33 -04:00
KCaverly
fc8dd8433c remove release channel flags in semantic_index 2023-09-19 12:20:59 -04:00
KCaverly
183758a7c5 fix Cargo.lock for merge 2023-09-19 11:44:51 -04:00
KCaverly
25bd357426 add recall and precision to semantic index 2023-09-18 18:25:02 -04:00
KCaverly
566bb9f71b add map to evaluation suite for semantic_index 2023-09-18 09:57:52 -04:00
KCaverly
1433160a08 enable include based filtering for search inside open and modified buffers 2023-09-15 15:16:20 -04:00
KCaverly
04bd107ada add ndcg@k to evaluate metrics 2023-09-15 10:36:21 -04:00
KCaverly
3a661c5977 catchup with main 2023-09-15 09:31:33 -04:00
Antonio Scandurra
ae85a520f2 Refactor semantic searching of modified buffers 2023-09-15 12:12:20 +02:00
KCaverly
796bdd3da7 update searching in modified buffers to accomodate for excluded paths 2023-09-14 19:42:06 -04:00
KCaverly
c19c8899fe add initial search inside modified buffers 2023-09-14 14:58:34 -04:00
Antonio Scandurra
f86e5a987f WIP 2023-09-14 17:42:30 +02:00
Antonio Scandurra
6a271617b4 Make path optional when parsing file
Co-Authored-By: Kyle Caverly <kyle@zed.dev>
2023-09-14 17:09:08 +02:00
KCaverly
137dda3ee6 wip eval framework for semantic index 2023-09-14 09:30:19 -04:00
KCaverly
0c1b2e5aa6 cleaned up warnings 2023-09-13 20:04:53 -04:00
KCaverly
eff44f9aa4 semantic index eval, indexing appropriately 2023-09-13 20:02:15 -04:00
KCaverly
6f29582fb0 progress on eval 2023-09-13 10:32:36 -04:00
KCaverly
d4fbe99052 add eval for gpt-engineer 2023-09-12 21:27:35 -04:00
KCaverly
0d14bbbf5b add eval values for tree-sitter 2023-09-12 20:36:06 -04:00
KCaverly
66c967da88 start work on eval script for semantic_index 2023-09-12 16:25:31 -04:00
KCaverly
e678c7d9ee swap
SystemTime for Instant throughout rate_limit_expiry tracking
2023-09-11 10:26:14 -04:00
KCaverly
7df21f86dd move cx notify observe for rate_limit_expiry into ProjectState in the semantic index
Co-authored-by: Antonio <antonio@zed.dev>
2023-09-11 10:11:40 -04:00
KCaverly
37915ec4f2 updated notify to accomodate for updated countdown 2023-09-08 16:53:16 -04:00
KCaverly
bf43f93197 updated semantic_index reset status to leverage target reset system time as opposed to duration 2023-09-08 15:04:50 -04:00
KCaverly
a5ee8fc805 initial outline for rate limiting status updates 2023-09-08 12:35:15 -04:00
KCaverly
cf5d1d91a4 update semantic search to go to no results if search query is blank 2023-09-07 14:43:41 -04:00
Antonio Scandurra
eda7e00645 Implement SemanticIndex::status and use it in project search
Co-Authored-By: Kyle Caverly <kyle@zed.dev>
2023-09-07 19:39:30 +02:00
Antonio Scandurra
65e17e212d Eagerly index project on workspace creation if it was indexed before
Co-Authored-By: Kyle Caverly <kyle@zed.dev>
2023-09-07 18:51:55 +02:00
Antonio Scandurra
a45c8c380f 💄 2023-09-07 15:25:23 +02:00
Antonio Scandurra
757a285852 Keep dropping the documents table if it exists
This is because we renamed `documents` to `spans`.

Co-Authored-By: Kyle Caverly <kyle@zed.dev>
2023-09-07 15:15:16 +02:00
Antonio Scandurra
93b889a93b Merge remote-tracking branch 'origin/main' into semantic-search-watch-worktrees 2023-09-07 15:07:46 +02:00
Antonio Scandurra
3ad1befb11 Remove unneeded logging
Co-Authored-By: Kyle Caverly <kyle@zed.dev>
2023-09-07 15:07:21 +02:00
KCaverly
265d02a583 update request timeout for open ai embeddings 2023-09-06 15:09:46 -04:00
KCaverly
17237f748c update token_count for OpenAIEmbeddings to accomodate for truncation 2023-09-06 15:09:15 -04:00
Antonio Scandurra
ce62173534 Rename Document to Span 2023-09-06 17:03:08 +02:00