Commit Graph
283 Commits
Author SHA1 Message Date
Antonio Scandurra 8c4d2ccf80 Close inline assist when the associated transaction is undone 2023-08-28 14:23:42 +02:00
Antonio Scandurra 44f554f489 Merge remote-tracking branch 'origin/main' into ai-refactoring 2023-08-28 12:16:24 +02:00
Antonio Scandurra 1fb7ce0f4a Show icon to toggle inline assist 2023-08-28 12:13:44 +02:00
Antonio Scandurra d804afcfa9 Don't auto-indent when the assistant starts responding with indentation 2023-08-28 11:57:02 +02:00
Piotr Osiewicz 07b9c6c302 language: Make Buffer::new take an explicit ID (#2900)
See Linear description for the full explanation of the issue. This PR is
mostly a mechanical change, except for the one case where we do pass in
an explicit `next_id` instead of `model_id` in project.rs.

Release Notes:
- Fixed a bug where some results were not reported in project search in
presence of unnamed buffers.
2023-08-28 11:51:50 +02:00
Antonio Scandurra 937aabfdfd Extract a strip_markdown_codeblock function 2023-08-28 11:24:55 +02:00
Antonio Scandurra 55bf45d265 Add disabled style for prompt editor after confirming 2023-08-26 12:07:03 +02:00
Antonio Scandurra 658d616b96 Allow multiple inline assistant highlights at once 2023-08-26 11:55:47 +02:00
Antonio Scandurra c8e5c3963b Clear selection when deploying inline assistant 2023-08-26 09:52:01 +02:00
Max Brunsfeld 404f76739c Format let-else statements 2023-08-25 10:11:32 -07:00
Antonio Scandurra c4966ff57a Remove warning 2023-08-25 17:35:14 +02:00
Antonio Scandurra 75a6a94e96 Add placeholder text for inline assistant prompts 2023-08-25 17:24:26 +02:00
Antonio Scandurra b101a7edff Cancel last inline assist when escaping from the editor 2023-08-25 15:54:52 +02:00
Antonio Scandurra fdbf4680bb Ensure the inline assistant works with gpt-3.5 2023-08-25 15:39:10 +02:00
Antonio Scandurra 27c90f12f6 Merge remote-tracking branch 'origin/main' into ai-refactoring 2023-08-25 13:37:32 +02:00
Antonio Scandurra 0444b5a775 💄 2023-08-25 13:36:52 +02:00
Antonio Scandurra 971c833e80 Improve background highlighting of inline assists 2023-08-25 12:35:36 +02:00
Antonio Scandurra 144f5c5d41 Use a left bias for the prompt editor 2023-08-25 12:25:43 +02:00
Antonio Scandurra 66a496edd7 Allow generating code without editing it 2023-08-25 12:16:28 +02:00
Antonio Scandurra c1bd035875 Rework inline assistant 2023-08-25 11:39:27 +02:00
Antonio Scandurra 805e44915c WIP 2023-08-24 17:23:12 +02:00
Antonio Scandurra cbf7160054 Improve scoring 2023-08-24 16:32:55 +02:00
Antonio Scandurra c1d9b37dbc Move to an inline refactoring prompt 2023-08-24 15:46:18 +02:00
Antonio Scandurra 2468506189 Always clear refactoring text highlights, even if an error occurs 2023-08-24 14:29:05 +02:00
Antonio Scandurra 71a5964c18 Rename merge_transaction_into to merge_transactions 2023-08-24 14:26:42 +02:00
Antonio Scandurra 9674b03855 Make scoring more precise by using floats when diffing AI refactors 2023-08-24 12:45:44 +02:00
Antonio Scandurra 481bcbf204 Normalize indentation when refactoring 2023-08-24 12:45:21 +02:00
Antonio Scandurra 985397b55c 📝 2023-08-24 09:52:07 +02:00
Antonio Scandurra f22acb602e Apply a score boost when consecutive triplets of characters match 2023-08-23 19:21:44 +02:00
301a12923f Merge transactions into the original assistant transaction
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Kyle Caverly <kyle@zed.dev>
2023-08-23 18:22:17 +02:00
Antonio ScandurraandKyle Caverly a69461dba2 Don't score whitespace matches
Co-Authored-By: Kyle Caverly <kyle@zed.dev>
2023-08-23 17:19:07 +02:00
Antonio ScandurraandKyle Caverly e4f49746e1 Group modal assistant edits into the same transaction
Co-Authored-By: Kyle Caverly <kyle@zed.dev>
2023-08-23 17:09:15 +02:00
Antonio Scandurra d3238441ce 🎨 2023-08-23 16:13:37 +02:00
Antonio Scandurra 2e1a4b2591 Adjust scoring 2023-08-23 13:26:30 +02:00
Antonio Scandurra aa6d6582fd Add basic styling 2023-08-23 13:09:02 +02:00
Antonio Scandurra a2671a29a0 Highlight text when the diff is the same 2023-08-23 10:28:43 +02:00
Antonio Scandurra a93583065b Delete unused imports 2023-08-23 09:59:07 +02:00
Antonio Scandurra c2935056e8 Support multi-byte characters in diff 2023-08-23 09:46:33 +02:00
Antonio Scandurra a9871a7a70 Add randomized tests for incremental diff 2023-08-23 09:09:01 +02:00
Antonio Scandurra 3a511db5c9 🎨 2023-08-22 18:41:22 +02:00
Antonio Scandurra 69b6967838 Integrate the new diff algorithm into the modal assistant 2023-08-22 13:59:45 +02:00
Antonio Scandurra 1ae5a909cd Start on a custom diff implementation 2023-08-22 12:07:41 +02:00
Joseph T. LyonsandMikayla a836f9c23d Add a default_open_ai_model setting for the assistant (#2876)
[This PR has been sitting around for a
bit](https://github.com/zed-industries/zed/pull/2845). I received a bit
of mixed opinions from the team on how this setting should work, if it
should use the full model names or some simpler form of it, etc. I went
ahead and made the decision to do the following:

- Use the full model names in settings - ex: `gpt-4-0613`
- Default to `gpt-4-0613` when no setting is present
- Save the full model names in the conversation history files (this is
how it was prior) - ex: `gpt-4-0613`
- Display the shortened model names in the assistant - ex: `gpt-4`
- Not worry about adding an option to add custom models (can add in a
follow-up PR)
- Not query what models are available to the user via their api key (can
add in a follow-up PR)

Release Notes:

- Added a `default_open_ai_model` setting for the assistant (defaults to
`gpt-4-0613`).

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-22 02:55:27 -04:00
Antonio Scandurra 5453553cfa WIP 2023-08-22 08:16:22 +02:00
Antonio Scandurra 5b9d48d723 Avoid diffing when the length is too small 2023-08-21 15:53:43 +02:00
Antonio Scandurra 42f02eb4e7 Incrementally diff input coming from GPT 2023-08-21 15:13:26 +02:00
Antonio Scandurra 3ad7f528cb Start on a refactoring assistant 2023-08-18 17:58:22 +02:00
Mikayla afebe3faf8 Merge branch 'main' into project_search_design 2023-08-17 01:56:05 -07:00
Mikayla 2f16147055 Fix dock resizing 2023-08-16 19:47:54 -07:00
KCaverly d727ba18f2 Merge branch 'main' of github.com:zed-industries/zed into project_search_design 2023-08-16 12:43:04 +01:00