Commit Graph
12765 Commits
Author SHA1 Message Date
Mikayla 5ea75ddea6 Restore synchronization 2023-10-21 03:08:25 -07:00
Mikayla a798fd4a32 WIP: Add test for panic, temporarily rollback synchronization changes 2023-10-21 03:05:57 -07:00
Conrad Irwin 4177fb207b Fix panic by disallowing multiple room joins 2023-10-20 14:34:25 -06:00
Julia f871762aaf Whoops (#3146)
Whoops, this is what I get for working past-midnight lol, I never pushed
the last commit for https://github.com/zed-industries/zed/pull/3141 so
this PR remedies that

Release Notes:
- NA
2023-10-20 12:07:33 -04:00
Julia 2c8acbd060 Add Tailwind autocomplete in ERB, PHP, and Laravel Blade 2023-10-20 12:06:05 -04:00
Julia e49fec1b9e Magic incantations for Tailwind autocomplete in more languages (#3141)
Release Notes:
- Added Tailwind autocomplete to Svelte files
([#2029](https://github.com/zed-industries/community/issues/2029)).
- Added Tailwind autocomplete to Phoenix HEEX files
([#2057](https://github.com/zed-industries/community/issues/2057)).
- Added Tailwind autocomplete to Phoenix ~H sigil in Elixir files
([#2057](https://github.com/zed-industries/community/issues/2057)).
- Added Tailwind autocomplete to ERB files
([#2153](https://github.com/zed-industries/community/issues/2153)).
- Added Tailwind autocomplete to PHP files
([#2159](https://github.com/zed-industries/community/issues/2159)).
- Added Tailwind autocomplete to Laravel Blade files
([#2159](https://github.com/zed-industries/community/issues/2159)).
2023-10-20 12:02:55 -04:00
Kyle Caverly bbce171a4a 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 3b022137e4 decrease temperature for inline assist on code content 2023-10-19 15:44:49 -04:00
Kyle Caverly 339ffb9f7a 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 7dc5c92f6d outlined when truncation is taking place in the prompt 2023-10-19 14:33:52 -04:00
Kirill Bulatov 74fd8a116b Sort hint request ranges before asserting to avoid flackiness (#3142) 2023-10-19 11:11:47 +03:00
Kirill Bulatov dc719f09d0 Sort hint request ranges before asserting to avoid flackiness 2023-10-19 11:05:47 +03:00
Julia e398a8dc0d Magic incantations for Tailwind autocomplete in Svelte, Elixir ~H, Heex 2023-10-19 01:54:42 -04:00
KCaverly aa2df626a7 progress on smarter truncation strategy for file context 2023-10-18 17:56:59 -04:00
KCaverly 302dfb35fb added smarter error handling for file_context prompts without provided buffers 2023-10-18 16:40:09 -04:00
KCaverly 8c124dc0cc added dumb truncation strategies to file_context and generate 2023-10-18 16:32:14 -04:00
KCaverly 59d5ae33aa fix for error when truncating a length less than the string length 2023-10-18 16:31:29 -04:00
KCaverly 769125d07d added initial placeholder for truncation without a valid strategy 2023-10-18 16:23:53 -04:00
KCaverly b6e471b9df update PromptPriority to accomodate for both Mandatory and Ordered prompts 2023-10-18 15:56:39 -04:00
Max Brunsfeld 2ea9668872 Fix possibility of infinite loop in selections_with_autoclose_regions (#3138)
Previously, that method could loop forever if the editor's autoclose
regions had unexpected selection ids.

Something must have changed recently that allowed this invariant to be
violated, but regardless, this code should not have relied on that
invariant to terminate like this.
2023-10-18 11:34:35 -07:00
KCaverly fb774eba24 update the assistant panel to use new prompt templates 2023-10-18 14:20:12 -04:00
Max BrunsfeldandPiotr 80b1b6be22 Fix possibility of infinite loop in selections_with_autoclose_regions
Previously, that method could loop forever if the editor's autoclose
regions had unexpected selection ids.

Co-authored-by: Piotr <piotr@zed.dev>
2023-10-18 11:16:14 -07:00
Joseph T. Lyons b4911dcea8 collab 0.25.0 2023-10-18 13:17:17 -04:00
KCaverly 55e04578b7 fix template ordering during prompt chain generation 2023-10-18 13:10:31 -04:00
KCaverly 0c836c3326 add prompt template for generate inline content 2023-10-18 13:03:11 -04:00
Joseph T. Lyons 99e2e5733c v0.110.x dev 2023-10-18 12:31:12 -04:00
KCaverly db5bd62891 added prompt template for file context without truncation 2023-10-18 12:29:10 -04:00
Piotr Osiewicz 36ea6531a4 buffer_search: Discard empty search suggestions. (#3136)
Now when buffer_search::Deploy action is triggered (with cmd-f), we'll
keep the previous query in query_editor (if there was one) instead of
replacing it with empty query.

This addresses this bit of feedback from Jose:
> If no text is selected, `cmd + f` should not delete the text in the
search bar when refocusing

Release Notes:
- Improved buffer search by not clearing out query editor when no text
is selected and "buffer search: deploy" (default keybind: cmd-f) is
triggered.
2023-10-18 18:05:13 +02:00
KCaverly aad3f7f9e8 Merge branch 'main' of github.com:zed-industries/zed into prompt_template 2023-10-18 10:42:16 -04:00
Kyle Caverly c8590ff675 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 d268fb71f5 revert change to return only the text and inside return all text inside markdown blocks 2023-10-18 10:35:11 -04:00
KCaverly 778cda21bc added prompt template for repository context 2023-10-17 17:29:07 -04:00
KCaverly 7e383a66b9 added openai language model tokenizer and LanguageModel trait 2023-10-17 16:21:03 -04:00
Joseph T. Lyons d61918ef4c Shorten GitHub release message 2023-10-17 15:47:17 -04:00
Conrad Irwin 58950c1d11 Start writing role to database (#3120)
Scaffolding for guest members in channels

Release notes:
- You can now set channels to "public" which will allow anyone to join
and become a member. In a future release guests joining public channels
will have reduced permissions.
2023-10-17 13:40:58 -06:00
Conrad Irwin e81e9c9538 Fix lint errors 2023-10-17 13:32:08 -06:00
Conrad Irwin 5240eb08f9 update sidebar for public channels 2023-10-17 13:30:09 -06:00
Kyle Caverly bbbab1c92e 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
Kirill Bulatov 44626a64a2 Cap every language server logs (#3134)
* on opening a language server's logs, a new editor for server logs is
now created from `\n`-joined `VecDeque` elements instead of a buffer, as
before
* every `VecDeque` entry is a log line we receiver out of stderr or LSP
server, and their general amount is capped with `let
MAX_STORED_LOG_ENTRIES: usize = 2000;`
* currently opened editor with logs (`Editor::multi_line`) keeps getting
log lines appended and may get over this cap, but only last stored 2000
entries will be restored on reopen
* similarly, cap rpc message logs

Release Notes:

- Improved memory usage by storing less language LSP server and rpc logs
2023-10-17 21:51:21 +03:00
Kirill Bulatov b1f5894b56 Reduce max log lines, clean log buffers better 2023-10-17 21:47:21 +03:00
Kirill Bulatov 3dc40711b6 Do not create buffers for rpc logs 2023-10-17 21:43:34 +03:00
Kirill Bulatov a1c88cee98 Remove another needless log buffer 2023-10-17 21:43:34 +03:00
Kirill Bulatov f3334199db Update editor with current buffer logs 2023-10-17 21:43:34 +03:00
Kirill Bulatov f73e3636a3 Do not detach subscriptions 2023-10-17 21:43:34 +03:00
Kirill Bulatov eccf64d21a Add a rough prototype 2023-10-17 21:43:34 +03:00
Nate Butler ea92a0aec5 Add link & public icons 2023-10-17 13:34:51 -04:00
Piotr Osiewicz 0113bca5ce workspace: Do not scan for .gitignore files if a .git directory is encountered along the way (#3135)
Partially fixes zed-industries/community#575

This PR will see one more fix to the case I've spotted while working on
this: namely, if a project has several nested repositories, e.g for a
structure:
/a
/a/.git/
/a/.gitignore
/a/b/
/a/b/.git/
/a/b/.gitignore

/b/ should not account for a's .gitignore at all - which is sort of
similar to the fix in commit #c416fbb, but for the paths in the project.

The release note is kinda bad, I'll try to reword it too.
- [ ] Improve release note.
- [x] Address the same bug for project files.

Release Notes:
- Fixed .gitignore files beyond the first .git directory being respected
by the worktree (zed-industries/community#575).
2023-10-17 18:56:03 +02:00
Conrad Irwin 29b1d0ad13 Temporarily join public channels as a member 2023-10-17 10:29:43 -06:00
Conrad Irwin cab542114e Fix some tests 2023-10-17 10:15:20 -06:00
Conrad Irwin 2da5b3d15e Fix channel test ordering 2023-10-17 10:01:31 -06:00