Commit Graph
100 Commits
Author SHA1 Message Date
KCaverly a65c1776d8 port rope2 to zed2 2023-11-03 12:15:23 -04:00
Kyle Caverly 343525d77b added workspace event for WorkspaceCreated (#3222)
added workspace2 event for WorkspaceCreated

Release Notes:

- NA
2023-11-03 11:06:11 -04:00
KCaverly b148c61047 added workspace event for WorkspaceCreated 2023-11-03 08:52:18 -04:00
Kyle Caverly 5ee2b01102 authenticate with completion provider on new inline assists (#3209)
authenticate with completion provider on new inline assists

Release Notes:

- Fixed bug which lead the inline assist functionality to never
authenticate
2023-11-02 10:14:52 -04:00
KCaverly d5b6300fd7 moved from Boxes to Arcs for shared access of completion providers across the assistant panel and inline assistant 2023-11-02 10:08:47 -04:00
KCaverly b5fe0d72ee authenticate with completion provider on new inline assists 2023-11-02 09:34:18 -04:00
Kyle Caverly 2105dc0022 port text2 to zed2 (#3202)
port text2 to zed2

Release Notes:

- NA
2023-11-01 16:27:08 -04:00
KCaverly 77dbb15aa3 port text2 to zed2 2023-11-01 16:13:53 -04:00
Kyle Caverly 1b9619ca7f added parsing support for <|S| |E|> spans (#3184)
added parsing support for <|S| and |E|> spans for inline generation
2023-11-01 10:26:01 -04:00
KCaverly fed391fe6b wip 2023-10-31 12:00:45 -04:00
KCaverly 551171a339 Merge branch 'zed2' of github.com:zed-industries/zed into zed2-workspace 2023-10-31 11:39:34 -04:00
KCaverly 68a1c7ce4c wip 2023-10-31 11:32:56 -04:00
KCaverlyandKirill 5550e80c4e workspace2 is compiling
Co-Authored-By: Kirill <kirill@zed.dev>
2023-10-31 11:14:43 -04:00
KCaverly e315e1bb6c small window change 2023-10-31 10:50:28 -04:00
KCaverly 663e8aed8a wip progress 2023-10-31 10:49:51 -04:00
KCaverly eb4ac2c276 wip 2023-10-31 10:12:40 -04:00
KCaverly efce38fce2 wip 2023-10-31 10:04:04 -04:00
KCaverlyandKirill 8d0905e479 dock compiling with todos outstanding
Co-Authored-By: Kirill <kirill@zed.dev>
2023-10-31 09:25:36 -04:00
KCaverly b34f0c3bee update prettier2, call2 and project2 to use fs2 2023-10-30 16:21:58 -04:00
Kyle Caverly 0efbc81b0f port ai to zed2 (#3186)
port ai to zed2
2023-10-30 20:09:49 +01:00
KCaverly c17b246bac updated for model handle rename 2023-10-30 15:04:16 -04:00
KCaverly 5ff70f7dba keeping this bad boy green during fmt checks 2023-10-30 14:49:31 -04:00
KCaverly d5077d9d0c Merge branch 'zed2' of github.com:zed-industries/zed into zed2-ai 2023-10-30 14:47:13 -04:00
KCaverly 04ab68502b port ai crate to ai2, with all tests passing 2023-10-30 14:40:31 -04:00
KCaverly 204aba07f6 Merge branch 'main' of github.com:zed-industries/zed into zed2 2023-10-30 13:44:50 -04:00
KCaverly 08e9b2e848 added parsing support for <|S| |E|> spans 2023-10-30 13:32:47 -04:00
Kyle Caverly 4986d4771d Model cleanup (#3157)
Small reorganization for the AI crates. I seperated out the base traits
and providers, to get closer to an abstraction for AI completions as
opposed to OpenAI specific functionality.
2023-10-30 16:15:11 +01:00
KCaverly 142b94bdd4 Merge branch 'main' of github.com:zed-industries/zed into model_cleanup 2023-10-30 11:07:29 -04:00
KCaverly f3c113fe02 clean up warnings and fix tests in the ai crate 2023-10-30 11:07:24 -04:00
KCaverly a2c3971ad6 moved authentication for the semantic index into the EmbeddingProvider 2023-10-30 10:02:27 -04:00
KCaverly 1e8b23d8fb replace api_key with ProviderCredential throughout the AssistantPanel 2023-10-28 18:16:45 -04:00
KCaverly 558f54c424 added credential provider to completion provider 2023-10-28 16:35:43 -04:00
KCaverly 7af77b1cf9 moved TestCompletionProvider into ai 2023-10-27 12:26:01 +02:00
KCaverly ec9d79b6fe add concept of LanguageModel to CompletionProvider 2023-10-27 08:51:30 +02: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
Kyle Caverly ff497810dd move keychain access into semantic index as opposed to on init (#3158)
remove keychain request during init

Release Notes:

- Move keychain request to inside indexing.
- Move install_default_formatters to a no op during tests
2023-10-24 13:43:10 +02:00
KCaverly feefb8d063 fixed format! call for prettier:: 2023-10-24 13:37:34 +02:00
KCaverly 0dd45bbf21 fully qualify paths inside conditional compilation methods 2023-10-24 13:35:28 +02:00
KCaverly 8ffe5a3ec7 move keychain access into semantic index as opposed to on init 2023-10-24 13:26:37 +02:00
KCaverly 0dfbfdd164 catchup with main 2023-10-23 17:21: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 d813ae8845 replace OpenAIRequest with more generalized Box<dyn CompletionRequest> 2023-10-22 14:33:19 +02:00
KCaverly 05ae978cb7 move OpenAICompletionProvider to providers location 2023-10-22 13:57:13 +02:00
KCaverly 3712794e56 move OpenAILanguageModel to providers folder 2023-10-22 13:47:28 +02:00
KCaverly a62baf34f2 rename templates to prompts in ai crate 2023-10-22 13:46:49 +02:00
KCaverly 0b57ab7303 cleaned up truncate vs truncate start 2023-10-22 13:34:22 +02:00
Kyle Caverly ef1a69156d update semantic search to use keychain as fallback (#3151)
Use the keychain for authenticating as fallback when api_key is not
present in environment variables.

Release Notes:

- Add consistency between OPENAI_API_KEY management in Semantic Search
and Assistant
2023-10-21 10:34:32 -04:00
KCaverly 4835c77840 update text for project search if not authenticated 2023-10-21 10:28:54 -04:00
KCaverly 106115676d update semantic search to use keychain as fallback 2023-10-21 10:19:50 -04:00
Kyle Caverly 9c49191031 decrease temperature for inline assist on code content (#3145)
"Temperature" is a parameter in OpenAI GPT models, to control for
randomess in the generated content. To decrease the probability of
either escaping the markdown blocks and creating invalid code, we
decreased temperature for all Non-Prose files. For Markdown or Plain
Text, in which more creativity may be a good thing, we increase the
temperature to allow for more randomness. Along with this, we ask the
generate inline prompt to include only the code and not markdown blocks,
as it appears that lower temperature may decrease the probability of
introducing random markdown blocks.

Release Notes (Internal Only):
- Decrease temperature for inline assist on code content.
2023-10-19 16:11:29 -04:00
KCaverly 71fb23f769 decrease temperature for inline assist on code content 2023-10-19 15:44:49 -04:00
Kyle Caverly e45491d2f8 Introduction of PromptTemplate and PromptChains (#3139)
(This PR was written 100% by the Inline Assistant)

This PR brings in new components into our ai and assistant crates namely
PromptTemplate and PromptChains. They offer a new way to generate
prompts that allow for a more flexible and dynamic approach than before.

Release Notes:
- Introduced PromptTemplate: an abstract base for individual parts of
the prompt.
- Added PromptChains: manage multiple PromptTemplates, sort them based
on priority and regulate the output size based on tokens.
- Provided new PromptArguments structure to encapsulate arguments needed
for PromptTemplate.
    - Extended repository_context to include PromptCodeSnippet.
2023-10-19 14:44:43 -04:00
KCaverly 19c2df4822 outlined when truncation is taking place in the prompt 2023-10-19 14:33:52 -04:00
KCaverly 178a84bcf6 progress on smarter truncation strategy for file context 2023-10-18 17:56:59 -04:00
KCaverly 587fd707ba added smarter error handling for file_context prompts without provided buffers 2023-10-18 16:40:09 -04:00
KCaverly f59f2eccd5 added dumb truncation strategies to file_context and generate 2023-10-18 16:32:14 -04:00
KCaverly a0e01e075d fix for error when truncating a length less than the string length 2023-10-18 16:31:29 -04:00
KCaverly 32853c2044 added initial placeholder for truncation without a valid strategy 2023-10-18 16:23:53 -04:00
KCaverly 473067db31 update PromptPriority to accomodate for both Mandatory and Ordered prompts 2023-10-18 15:56:39 -04:00
KCaverly aa1825681c update the assistant panel to use new prompt templates 2023-10-18 14:20:12 -04:00
KCaverly b9bb27512c fix template ordering during prompt chain generation 2023-10-18 13:10:31 -04:00
KCaverly fa61c1b9c1 add prompt template for generate inline content 2023-10-18 13:03:11 -04:00
KCaverly 178a79fc47 added prompt template for file context without truncation 2023-10-18 12:29:10 -04:00
KCaverly 4b8771f3e2 Merge branch 'main' of github.com:zed-industries/zed into prompt_template 2023-10-18 10:42:16 -04:00
Kyle Caverly fea6d70d4d return code inside a markdown block during inline assist (#3137)
Reverted prior small change in inline prompting.
We should now only return code in a markdown block during inline
assists.
2023-10-18 10:40:53 -04:00
KCaverly ed8a2c8793 revert change to return only the text and inside return all text inside markdown blocks 2023-10-18 10:35:11 -04:00
KCaverly 02853bbd60 added prompt template for repository context 2023-10-17 17:29:07 -04:00
KCaverly a874a09b7e added openai language model tokenizer and LanguageModel trait 2023-10-17 16:21:03 -04:00
Kyle Caverly 2795091f0c Introduce Context Retrieval in Inline Assistant (#3097)
This PR introduces a new Inline Assistant feature "Retrieve Context", to
dynamically fill the content in your generation prompt based on relevant
results returned from the Semantic Search for the Prompt.

Release Notes:

- Introduce "Retrieve Context" button in Inline Assistant
2023-10-17 15:04:36 -04:00
KCaverly ad92fe49c7 implement initial concept of prompt chain 2023-10-17 11:58:45 -04:00
KCaverly 500af6d775 progress on prompt chains 2023-10-16 18:47:10 -04:00
KCaverly 40755961ea added initial template outline 2023-10-16 11:54:32 -04:00
KCaverly 29f45a2e38 clean up warnings 2023-10-16 10:02:11 -04:00
KCaverly 5e1e0b4759 remove print from prompts 2023-10-16 09:55:45 -04:00
KCaverly d2e769027a catchup with main 2023-10-16 09:47:07 -04:00
KCaverly 391179657c clean up redundancies in prompts and ensure tokens are being reserved for generation when filling semantic context 2023-10-06 16:43:19 +02:00
KCaverly ecfece3ac4 catchup with main 2023-10-06 16:30:31 +02:00
KCaverly ed548a0de2 ensure indexing is only done when permissioned 2023-10-06 16:08:36 +02:00
KCaverly 84553899f6 updated spacing for assistant context status icon 2023-10-06 15:43:28 +02:00
KCaverly 38ccf23567 add indexing on inline assistant opening 2023-10-06 08:46:40 +03:00
KCaverly c0a1328532 fix spawn bug from calling 2023-10-06 08:30:54 +03:00
KCaverly 0666fa80ac moved status to icon with additional information in tooltip 2023-10-05 16:49:25 +03:00
KCaverly ec1b4e6f85 added initial working status in inline assistant prompt 2023-10-05 13:01:11 +03:00
KCaverly 933c21f3d3 add initial (non updating status) toast 2023-10-03 16:53:57 +03:00
KCaverly f40d3e82c0 add user prompt for permission to index the project, for context retrieval 2023-10-03 16:26:08 +03:00
KCaverly 1a2756a232 start greedily indexing when inline assistant is started, if project has been previously indexed 2023-10-03 14:07:42 +03:00
KCaverly ed894cc06f only render retrieve context button if semantic index is enabled 2023-10-03 12:09:35 +03:00
KCaverly 166ca2a227 catching up with main 2023-10-03 12:05:00 +03: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 bfe76467b0 add retrieve context button to inline assistant 2023-10-03 11:19:54 +03:00
KCaverly e9637267ef add placeholder button for retrieving additional context 2023-10-02 19:50:57 +03:00
KCaverly f20f096a30 searching the semantic index, and passing returned snippets to prompt generation 2023-10-02 19:15:59 +03:00
Kyle Caverly dbaaf4216d add scheme for full parseable files in semantic index (#3069)
add scheme as a parseable file type in semantic index.
Each file will operate as a single embedding, in which no real scheme
syntax or tree-sitter level data is stored.

Release Notes:

- Added scheme to Semantic Index
2023-09-29 14:42:15 -04:00
KCaverly 3c12e711a4 add scheme for full parseable files in semantic index 2023-09-29 14:35:02 -04:00