ZIm/crates/collab/src/db/tables
Kyle Kelley 49371b44cb
Semantic Index (#10329)
This introduces semantic indexing in Zed based on chunking text from
files in the developer's workspace and creating vector embeddings using
an embedding model. As part of this, we've created an embeddings
provider trait that allows us to work with OpenAI, a local Ollama model,
or a Zed hosted embedding.

The semantic index is built by breaking down text for known
(programming) languages into manageable chunks that are smaller than the
max token size. Each chunk is then fed to a language model to create a
high dimensional vector which is then normalized to a unit vector to
allow fast comparison with other vectors with a simple dot product.
Alongside the vector, we store the path of the file and the range within
the document where the vector was sourced from.

Zed will soon grok contextual similarity across different text snippets,
allowing for natural language search beyond keyword matching. This is
being put together both for human-based search as well as providing
results to Large Language Models to allow them to refine how they help
developers.

Remaining todo:

* [x] Change `provider` to `model` within the zed hosted embeddings
database (as its currently a combo of the provider and the model in one
name)


Release Notes:

- N/A

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Conrad Irwin <conrad@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Antonio <antonio@zed.dev>
2024-04-12 11:40:59 -06:00
..
access_token.rs For impersonating access tokens, store impersonatee in the new column 2024-01-17 18:06:16 -08:00
buffer.rs Denormalize buffer operations (#9026) 2024-03-07 11:35:47 -07:00
buffer_operation.rs Simplify buffer_operations schema 2023-08-23 18:37:01 -07:00
buffer_snapshot.rs Snapshot channel notes buffers when everyone leaves 2023-08-23 18:37:01 -07:00
channel.rs Fix slow query for fetching descendants of channels (#7008) 2024-01-29 13:24:59 -08:00
channel_buffer_collaborator.rs WIP 2023-08-23 18:34:43 -07:00
channel_chat_participant.rs Start work on restoring server-side code for chat messages 2023-09-07 16:32:49 -07:00
channel_member.rs Ignore old admin column 2023-10-13 14:08:40 -06:00
channel_message.rs Channel chat: Add edit message (#9035) 2024-03-19 19:49:04 -06:00
channel_message_mention.rs Persist chat mentions 2023-10-18 16:56:03 -07:00
contact.rs Reorganize source files of collab::db 2023-08-18 16:23:33 -07:00
contributor.rs Add REST APIs for getting and adding contributors 2024-01-22 10:48:33 -08:00
dev_server.rs WIP: remoting (#10085) 2024-04-11 15:36:35 -06:00
embedding.rs Semantic Index (#10329) 2024-04-12 11:40:59 -06:00
extension.rs Add an extensions API to the collaboration server (#7807) 2024-02-15 12:53:57 -08:00
extension_version.rs Add telemetry events for loading extensions (#9793) 2024-03-25 17:30:48 -04:00
feature_flag.rs Update database and RPC to provide configured feature flags 2023-08-25 14:34:32 -07:00
follower.rs Undo making project optional on stored follower states 2023-09-28 14:21:44 -07:00
hosted_project.rs Fix joining hosted projects (#9038) 2024-03-07 19:56:41 -07:00
language_server.rs Reorganize source files of collab::db 2023-08-18 16:23:33 -07:00
notification.rs Generalize notifications' actor id to entity id 2023-10-17 10:34:50 -07:00
notification_kind.rs Make notification db representation more flexible 2023-10-12 17:42:32 -07:00
observed_buffer_edits.rs Avoid N+1 query for channels with notes changes 2023-10-02 15:58:34 -07:00
observed_channel_messages.rs Add database implementation of channel message change tracking 2023-10-01 22:32:11 -07:00
project.rs WIP: remoting (#10085) 2024-04-11 15:36:35 -06:00
project_collaborator.rs Reorganize source files of collab::db 2023-08-18 16:23:33 -07:00
rate_buckets.rs Allow AI interactions to be proxied through Zed's server so you don't need an API key (#7367) 2024-03-19 19:22:26 +01:00
remote_project.rs WIP: remoting (#10085) 2024-04-11 15:36:35 -06:00
room.rs Remove environment guards (#7741) 2024-02-13 13:20:14 -07:00
room_participant.rs revert single channel click (#7738) 2024-02-13 12:53:49 -07:00
server.rs Reorganize source files of collab::db 2023-08-18 16:23:33 -07:00
signup.rs Reorganize source files of collab::db 2023-08-18 16:23:33 -07:00
user.rs Exclude staff from CLA check 2024-01-23 11:31:55 -08:00
user_feature.rs Update database and RPC to provide configured feature flags 2023-08-25 14:34:32 -07:00
worktree.rs Reorganize source files of collab::db 2023-08-18 16:23:33 -07:00
worktree_diagnostic_summary.rs Reorganize source files of collab::db 2023-08-18 16:23:33 -07:00
worktree_entry.rs Reorganize source files of collab::db 2023-08-18 16:23:33 -07:00
worktree_repository.rs Reorganize source files of collab::db 2023-08-18 16:23:33 -07:00
worktree_repository_statuses.rs Reorganize source files of collab::db 2023-08-18 16:23:33 -07:00
worktree_settings_file.rs Reorganize source files of collab::db 2023-08-18 16:23:33 -07:00