Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supermaven #10788

Merged
merged 61 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
57d1ef1
start a supermaven package
as-cii Mar 19, 2024
672a136
Get tests running and app compiling
nathansobo Mar 21, 2024
2de97b3
adapt to supermaven path using SUPERMAVEN_AGENT_BINARY
rgbkrk Mar 21, 2024
f291f60
clean up typo
rgbkrk Mar 21, 2024
3d0f40f
Kill the process at the end of the exercise test
rgbkrk Mar 21, 2024
ef0ea1f
set up initialization in test for supermaven
rgbkrk Mar 21, 2024
4172bd2
editor engaged
rgbkrk Mar 21, 2024
d7f9f42
partial messaging setup
rgbkrk Mar 21, 2024
cb94763
Checkpoint
as-cii Mar 21, 2024
55a7dea
WIP
as-cii Mar 21, 2024
94ee414
Extract copilot-specific functionality into `CopilotCompletionProvider`
as-cii Mar 22, 2024
b3a4a4d
clean up from rebase
rgbkrk Mar 26, 2024
c4b387a
supermaven starter completion provider
rgbkrk Mar 26, 2024
a421210
Rework settings to allow using supermaven
rgbkrk Mar 26, 2024
0c2d635
Use supermaven if the user configured it
rgbkrk May 3, 2024
cfcefc6
Introduce a new `inline_completion_provider` setting
as-cii Mar 27, 2024
ef23f1a
Update visible completion only for focused editor
as-cii Mar 27, 2024
c34cb6b
Improve completion rendering
as-cii Mar 28, 2024
da32b4b
Stream supermaven completions in
as-cii Mar 28, 2024
1b28b94
Only use the latest completion
as-cii Mar 28, 2024
d16cc39
Checkpoint
as-cii Mar 29, 2024
f8cf059
provide some comments on the ResponseItem types
rgbkrk Apr 1, 2024
f92f1cc
update supermaven branch to build against `main`
rgbkrk Apr 23, 2024
b6c4b02
log unhandled messages
rgbkrk Apr 23, 2024
8773c96
provide note on field deprecation from within copilot settings
rgbkrk Apr 23, 2024
1e5a696
rip out the feature_enabled flag for now
rgbkrk Apr 23, 2024
ff0f712
Use supermaven if the user configured it
rgbkrk May 3, 2024
949a6e4
clean up debug
rgbkrk Apr 23, 2024
d70852d
WIP include completions in collab server
rgbkrk Apr 23, 2024
c27f59d
begin setting up a client to the Supermaven REST API
rgbkrk Apr 25, 2024
8b7522d
start up the supermaven api in earnest
rgbkrk Apr 26, 2024
3c864c5
setup downloads of the supermaven agent
rgbkrk Apr 26, 2024
28324ec
setup supermaven api calls
rgbkrk Apr 26, 2024
8979e60
download the supermaven agent on start
rgbkrk Apr 26, 2024
b8da371
:lipstick:
rgbkrk Apr 26, 2024
d717167
Register Supermaven button with Zed
rgbkrk May 3, 2024
a19160e
set executable bit on *nix, attempt windows support through OpenOptions
rgbkrk Apr 27, 2024
298df25
:lipstick:
rgbkrk Apr 29, 2024
40de454
wat
rgbkrk Apr 29, 2024
e16e484
remove `cx` from `handle_message` (unused)
rgbkrk Apr 29, 2024
99c95eb
create supermaven status logos
rgbkrk Apr 29, 2024
3dcba53
show icons for supermaven states
rgbkrk Apr 29, 2024
d9d7700
setup states for supermaven UI
rgbkrk Apr 30, 2024
9b935f3
pull icon off separately
rgbkrk Apr 30, 2024
059bbfe
:lipstick:
rgbkrk Apr 30, 2024
bf841df
Only download latest supermaven if not already downloaded
rgbkrk Apr 30, 2024
aa6f7d6
:lipstick:
rgbkrk Apr 30, 2024
de6dce9
excise `copilot` from `project`, bring into `lsp_log`
rgbkrk Apr 30, 2024
94d3f80
attempt to put copilot LSP in log view
rgbkrk Apr 30, 2024
8d15d8f
Finish removing copilot dependency from project, get copilot LSP logs…
maxbrunsfeld May 1, 2024
ea042ac
Move copilot UI modules to the copilot crate
maxbrunsfeld May 1, 2024
3ee9186
Rename copilot UI crate to inline_completion_button
maxbrunsfeld May 1, 2024
6037521
Unify status bar menus for copilot and supermaven
maxbrunsfeld May 1, 2024
90cd46a
create users for supermaven over collab
rgbkrk May 1, 2024
d157d57
:lipstick:
rgbkrk May 1, 2024
de23c02
cleanup deps
rgbkrk May 1, 2024
ba4641f
attempt to set the api key for supermaven via the client
rgbkrk May 2, 2024
18c0a86
set the API key when the user is authenticated, if allowed
rgbkrk May 3, 2024
996c612
:lipstick:
rgbkrk May 3, 2024
7788ef8
:lipstick:
rgbkrk May 3, 2024
41fe0b7
:lipstick:
rgbkrk May 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
97 changes: 72 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ members = [
"crates/command_palette",
"crates/command_palette_hooks",
"crates/copilot",
"crates/copilot_ui",
"crates/db",
"crates/diagnostics",
"crates/editor",
Expand All @@ -42,6 +41,7 @@ members = [
"crates/gpui_macros",
"crates/headless",
"crates/image_viewer",
"crates/inline_completion_button",
"crates/install_cli",
"crates/journal",
"crates/language",
Expand Down Expand Up @@ -86,6 +86,8 @@ members = [
"crates/storybook",
"crates/sum_tree",
"crates/tab_switcher",
"crates/supermaven",
"crates/supermaven_api",
"crates/terminal",
"crates/terminal_view",
"crates/text",
Expand Down Expand Up @@ -159,7 +161,6 @@ color = { path = "crates/color" }
command_palette = { path = "crates/command_palette" }
command_palette_hooks = { path = "crates/command_palette_hooks" }
copilot = { path = "crates/copilot" }
copilot_ui = { path = "crates/copilot_ui" }
db = { path = "crates/db" }
diagnostics = { path = "crates/diagnostics" }
editor = { path = "crates/editor" }
Expand All @@ -180,6 +181,7 @@ gpui_macros = { path = "crates/gpui_macros" }
headless = { path = "crates/headless" }
install_cli = { path = "crates/install_cli" }
image_viewer = { path = "crates/image_viewer" }
inline_completion_button = { path = "crates/inline_completion_button" }
journal = { path = "crates/journal" }
language = { path = "crates/language" }
language_selector = { path = "crates/language_selector" }
Expand Down Expand Up @@ -220,6 +222,8 @@ settings = { path = "crates/settings" }
snippet = { path = "crates/snippet" }
sqlez = { path = "crates/sqlez" }
sqlez_macros = { path = "crates/sqlez_macros" }
supermaven = { path = "crates/supermaven" }
supermaven_api = { path = "crates/supermaven_api"}
story = { path = "crates/story" }
storybook = { path = "crates/storybook" }
sum_tree = { path = "crates/sum_tree" }
Expand Down
8 changes: 8 additions & 0 deletions assets/icons/supermaven.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions assets/icons/supermaven_disabled.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions assets/icons/supermaven_error.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions assets/icons/supermaven_init.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assets/settings/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"base_keymap": "VSCode",
// Features that can be globally enabled or disabled
"features": {
// Show Copilot icon in status bar
"copilot": true
// Which inline completion provider to use.
"inline_completion_provider": "copilot"
},
// The name of a font to use for rendering text in the editor
"buffer_font_family": "Zed Mono",
Expand Down
4 changes: 2 additions & 2 deletions crates/anthropic/src/anthropic.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::{anyhow, Result};
use futures::{io::BufReader, stream::BoxStream, AsyncBufReadExt, AsyncReadExt, StreamExt};
use serde::{Deserialize, Serialize};
use std::convert::TryFrom;
use std::{convert::TryFrom, sync::Arc};
use util::http::{AsyncBody, HttpClient, Method, Request as HttpRequest};

#[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq)]
Expand Down Expand Up @@ -141,7 +141,7 @@ pub enum TextDelta {
}

pub async fn stream_completion(
client: &dyn HttpClient,
client: Arc<dyn HttpClient>,
api_url: &str,
api_key: &str,
request: Request,
Expand Down
1 change: 1 addition & 0 deletions crates/collab/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ live_kit_server.workspace = true
log.workspace = true
nanoid.workspace = true
open_ai.workspace = true
supermaven_api.workspace = true
parking_lot.workspace = true
prometheus = "0.13"
prost.workspace = true
Expand Down
5 changes: 5 additions & 0 deletions crates/collab/k8s/collab.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ spec:
secretKeyRef:
name: slack
key: panics_webhook
- name: SUPERMAVEN_ADMIN_API_KEY
valueFrom:
secretKeyRef:
name: supermaven
key: api_key
- name: INVITE_LINK_PREFIX
value: ${INVITE_LINK_PREFIX}
- name: RUST_BACKTRACE
Expand Down
2 changes: 2 additions & 0 deletions crates/collab/src/completion.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
use anyhow::{anyhow, Result};
use rpc::proto;
1 change: 1 addition & 0 deletions crates/collab/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ pub struct Config {
pub zed_client_checksum_seed: Option<String>,
pub slack_panics_webhook: Option<String>,
pub auto_join_channel_id: Option<ChannelId>,
pub supermaven_admin_api_key: Option<Arc<str>>,
}

impl Config {
Expand Down