Commit Graph
1482 Commits
Author SHA1 Message Date
Antonio Scandurra 1f47ff85de Move more window-specific methods from AppContext to WindowContext 2023-04-14 10:29:35 +02:00
Antonio Scandurra 6a979c3e5e Start removing some warnings 2023-04-13 12:04:37 +02:00
Nathan Sobo d5629c7183 WIP 2023-04-12 12:38:26 -06:00
Nathan Sobo 169d6bf675 WIP 2023-04-12 12:22:26 -06:00
Nathan Sobo f5a86aecdc WIP 2023-04-12 12:13:35 -06:00
Antonio Scandurra 5f04261450 WIP 2023-04-12 15:55:43 +02:00
Nathan Sobo 0316747904 WIP 2023-04-12 06:51:03 -06:00
Nathan Sobo fabf89a1b1 WIP 2023-04-11 18:21:56 -06:00
Nathan Sobo 596940d986 WIP: Everything shredded 2023-04-10 16:10:32 -06:00
Nathan Sobo 722f47dcd1 WIP 2023-04-08 08:01:05 -06:00
Nathan Sobo 45c1106140 Don't export platform::* from gpui
I'd like to avoid cluttering the top-level namespace with all the platform-
specific types.
2023-04-07 11:45:53 -06:00
Joseph T. Lyons 0713ecedb3 Merge pull request #2363 from zed-industries/add-copy-path-commands
Update copy path commands
2023-04-07 12:09:39 -04:00
Joseph Lyons 6614f8f635 Update copy path commands 2023-04-07 02:36:56 -04:00
Nathan Sobo 5839c594d8 Fix formatting 2023-04-06 15:54:44 -06:00
Nathan Sobo d937660683 Merge MutableAppContext into AppContext
There may have been a good reason for the difference at some point, or I was
still learning Rust. But now it's just &mut AppContext vs &AppContext.
2023-04-06 15:49:03 -06:00
Mikayla Makiandantonio b36325e862 Add additional case to range invalidation test
co-authored-by: antonio <antonio@zed.dev>
2023-04-05 08:52:56 -07:00
Mikayla Makiandantonio 00d2f4f732 Invalidate copilot suggestion on backspaces
Restore an observation on initialization

co-authored-by: antonio <antonio@zed.dev>
2023-04-05 08:48:39 -07:00
Antonio Scandurra 96b9a6a50a Use the cursor variable instead of selection.start 2023-04-05 14:15:58 +02:00
Antonio Scandurra edda799aa8 📝 2023-04-05 14:14:43 +02:00
Antonio Scandurra ad8f56713a Indent instead of accepting suggestion if cursor is in leading whitespace 2023-04-05 14:09:09 +02:00
Antonio Scandurra 3b4979f08b 💄 2023-04-05 13:59:19 +02:00
Antonio Scandurra 45c8b1ff8c Update visible suggestion if edit occurs outside the current editor 2023-04-05 11:06:14 +02:00
Antonio Scandurra 963d2209df Prevent tab from accepting a copilot suggestion when it isn't visible 2023-04-05 10:31:11 +02:00
Antonio Scandurra f9f300ca61 Refresh copilot suggestions when accepting a completion 2023-04-05 10:28:00 +02:00
Antonio Scandurra 3b801f26c9 Refresh copilot suggestions when undoing/redoing 2023-04-05 10:27:19 +02:00
Antonio Scandurra cb2affcf3b Capture copilot behavior in a editor unit test 2023-04-05 10:26:43 +02:00
Antonio Scandurra 1fd9ccbfea Revert "Return the previous suggestion when replacing it"
This reverts commit f718f7ee47.
2023-04-04 18:59:28 +02:00
Antonio Scandurra cff66cc7af Trigger copilot only on insertion and deletion
Also, avoid showing the suggestion if a completion is in progress to
avoid flickering.
2023-04-04 17:51:37 +02:00
Antonio Scandurra f718f7ee47 Return the previous suggestion when replacing it 2023-04-04 17:14:52 +02:00
Antonio ScandurraandNathan Sobo e59fd9a75b Debounce copilot completions
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-04-04 16:02:25 +02:00
Antonio Scandurra 4775f133ed Refresh active copilot suggestion when accepting completion 2023-04-04 11:15:14 +02:00
Antonio Scandurra 3b3d1deb90 Clear Copilot suggestions when it gets disabled from the settings 2023-04-04 10:45:56 +02:00
Mikayla Maki d62fdb907c fixup! Remove per-file copilot enable/disable 2023-04-03 15:21:43 -07:00
Mikayla Maki 49ecb56c52 Remove per-file copilot enable/disable 2023-04-03 15:15:42 -07:00
Nathan Sobo f6cd8ed6ab Merge pull request #2343 from zed-industries/handles
Make typed handles wrappers around their untyped equivalents
2023-04-03 09:20:37 -04:00
Antonio Scandurra b23d808226 Clear active copilot suggestion only if there is one 2023-04-03 14:32:41 +02:00
Antonio Scandurra 9eba3f753f Make autocompletion and copilot mutually exclusive 2023-04-03 14:15:21 +02:00
Antonio Scandurra 7fb0df0ea3 Fix Copilot errors when opening buffers that don't exist locally 2023-04-03 12:28:32 +02:00
Nathan Sobo d0a267eaa4 Store AnyViewHandle inside ViewHandle and Deref to it 2023-04-02 14:59:55 -06:00
Antonio Scandurra 1b0e8156d2 🎨 2023-03-31 18:10:10 +02:00
93db8b20e2 Fix prefix/suffix calculation when determining copilot suggestion
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-03-31 18:05:07 +02:00
Antonio ScandurraandNathan Sobo ce3e77355e Avoid auto-indenting when accepting copilot suggestion
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-03-31 17:17:35 +02:00
Antonio ScandurraandNathan Sobo 7e44055af0 Use copilot's Completion::{range,text} to determine suggestion
Previously, we were using display text, but this isn't always correct. Now,
we just attempt to determine what text Copilot wants to insert by finding
a prefix and suffix in the existing text with the suggested text.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-03-31 17:08:41 +02:00
Mikayla Maki 2ba0046a08 Merge branch 'main' into copilot 2023-03-30 16:57:18 -07:00
Antonio Scandurra cf4cdd1b10 Speed up tab searching in TabMap::sync by looking for \t only
Instead of looking for `\n` as a stopping condition, we cap the range
we pass to `SuggestionSnapshot::chunks` to stop on the next line. This
makes character searching faster, because looking for a single character
uses `memchr`. Also, this avoids an extra conditional in a tight loop such
as the chunk scanning one contained in `TabMap::sync`.
2023-03-30 10:03:13 +02:00
Antonio Scandurra 91da51e1a2 Use + instead of | to break out of tab expansion in TabMap::sync 2023-03-30 09:49:07 +02:00
Mikayla Maki c2f6567042 Add status bar icon reflecting copilot state to Zed status bar 2023-03-29 21:31:33 -07:00
Mikayla Maki 8fd0cd638e WIP 2023-03-29 17:25:41 -07:00
Mikayla Maki 2f5eecd9a7 Merge branch 'main' into copilot 2023-03-29 16:57:38 -07:00
Mikayla Maki 900232a2cd Add copilot settings
Add copilot pause / resume
Add copilot statusbar item stub
2023-03-29 16:40:52 -07:00