Commit Graph
57 Commits
Author SHA1 Message Date
Nathan Sobo f5a86aecdc WIP 2023-04-12 12:13:35 -06:00
Nathan Sobo ec73862972 WIP 2023-04-11 18:48:00 -06:00
Nathan Sobo fabf89a1b1 WIP 2023-04-11 18:21:56 -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
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 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 85fd8db65e Disable Copilot entirely for stable releases
This lets us remove the logic for detecting whether a user is a staff
member.
2023-04-05 15:49:59 +02:00
Antonio Scandurra cb2affcf3b Capture copilot behavior in a editor unit test 2023-04-05 10:26:43 +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 66dd76a64c fixup! removed copilot from generated schema and command palette 2023-04-03 21:45:18 -07:00
Mikayla Maki 66d1b92eaa removed copilot from generated schema and command palette 2023-04-03 21:38:26 -07:00
Mikayla Maki 228b661df5 Refactor staff mode into a seperate crate and make copilot initialization wait for the staff mode flag to be flipped 2023-04-03 20:16:45 -07:00
Mikayla Maki e098b976a9 Fix bug where copilot auth window will only be shown once 2023-04-03 16:01:04 -07:00
Mikayla Maki 49ecb56c52 Remove per-file copilot enable/disable 2023-04-03 15:15:42 -07:00
Antonio Scandurra b7d1c6cc9c Move creation of GetCompletionsParams entirely to the background 2023-04-03 13:30:57 +02:00
Antonio Scandurra 18c841e331 🔥 2023-04-03 13:18:16 +02:00
Antonio Scandurra 7fb0df0ea3 Fix Copilot errors when opening buffers that don't exist locally 2023-04-03 12:28:32 +02:00
Mikayla Maki d8726843cd Fix crash on initiating copilot during collaboration. Copilot is now disabled when collaborating. 2023-03-31 12:28:58 -07:00
Mikayla Maki edaf1ddf29 Update copilot.rs 2023-03-31 11:16:52 -07:00
Mikayla Maki a625559769 Add handlers for LogMessage and statusNotification to copilot LSP 2023-03-31 10:58:18 -07: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
Mikayla Maki f59c560dcf Remove test modals 2023-03-30 16:52:55 -07:00
Mikayla Maki ecd250eae9 Finish device code flow for copilot 2023-03-30 16:50:33 -07:00
Mikayla Maki 5dc4eb7a71 Added erorr states and first-pass error handling to the copilot status bar item.
Added correct icons
Added a new 'Toast' action which allows other crates to easily pop toasts with an optional click action
2023-03-30 14:10:57 -07:00
Mikayla Makiandantonio edd948c833 Switch to using zed hosted copilot LSP (again)
co-authored-by: antonio <antionio@zed.dev>
2023-03-30 09:29:49 -07:00
Mikayla Maki b217e78a9c Remove some strays 2023-03-29 22:22:02 -07:00
Mikayla Maki 4a9b78e48f Fix bug with enable setting, clean up sign in UIs 2023-03-29 21:51:07 -07: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 290933a8b7 WIP, not compiling 2023-03-29 17:59:21 -07:00
Mikayla Maki 8fd0cd638e WIP 2023-03-29 17:25:41 -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
Mikayla Makiandantonio 566b2830e8 Make modal behavior stateless
Co-authored-by: antonio <antonio@zed.dev>
2023-03-29 12:45:53 -07:00
Mikayla Maki f0e79db961 WIP Add copilot disabled setting 2023-03-28 20:52:50 -07:00
Mikayla Maki 74318eecb3 Move command palette filter into collections crate
Filter out copilot commands from command palette when not active
2023-03-28 20:13:17 -07:00
Mikayla Maki 881629223a Add rough versions of all 3 modals 2023-03-28 18:00:09 -07:00
Mikayla Maki 58f6902229 Refactor out the node runtime crate and hook up all related imports 2023-03-28 10:27:31 -07:00
Mikayla Maki efa368b1df Finish shape of copilot auth UI 2023-03-28 09:42:01 -07:00
Mikayla Maki 8f51a1e5e5 Create copilot auth popup UI 2023-03-28 09:42:01 -07:00
Antonio Scandurra e4ecd2aad5 Reuse existing suggestion when inserting to avoid flickering 2023-03-28 09:42:01 -07:00
Antonio Scandurra 97dfcfe905 Replace editor::CycleCopilotSuggestions with copilot::NextSuggestion 2023-03-28 09:42:01 -07:00
Antonio Scandurra 7ea3f89aa9 Start integrating Copilot with editor
There's still a bit to do in terms of reusing the previous suggestion
when the prefix matches, but we're getting there.
2023-03-28 09:42:01 -07:00
Antonio ScandurraandMikayla Maki ec30e108af WIP: Start on showing window for authenticating with copilot
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-03-28 09:42:01 -07:00
Antonio Scandurra d830013859 Restructure verification code prompting to open a window instead
Also, prevent multiple calls to `sign_in` from racing with each other.
2023-03-28 09:42:01 -07:00
Mikayla Maki 847021d15d Wait to show the auth modal until the sign request has returned 2023-03-28 09:42:00 -07:00
Mikayla Maki 692d59dc81 Add basic copilot modal 2023-03-28 09:42:00 -07:00
Mikayla Maki a4bc9260f6 Add copilot theme, start sketching out the auth modal 2023-03-28 09:42:00 -07:00
Antonio ScandurraandMikayla Maki 61e7f569c1 Implement Copilot::completions_cycling
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-03-28 09:42:00 -07:00
Antonio Scandurra 3e6100c024 Successfully fetch completions from Copilot
We still need to process them and return them into a more Zed-friendly
structure, but we're getting there.
2023-03-28 09:42:00 -07:00