Add copilot crate

Refactor HTTP and github release downloading into util
Lazily download / upgrade the copilot LSP from Zed

Co-authored-by: Max <max@zed.dev>
Co-Authored-By: Antonio <antonio@zed.dev>
This commit is contained in:
Mikayla Maki 2023-03-22 19:22:08 -07:00
parent 35b2aceffb
commit 455cdc8b37
41 changed files with 435 additions and 265 deletions

View file

@ -8,11 +8,7 @@ use cli::{
ipc::{self, IpcSender},
CliRequest, CliResponse, IpcHandshake,
};
use client::{
self,
http::{self, HttpClient},
UserStore, ZED_APP_VERSION, ZED_SECRET_CLIENT_TOKEN,
};
use client::{self, UserStore, ZED_APP_VERSION, ZED_SECRET_CLIENT_TOKEN};
use db::kvp::KEY_VALUE_STORE;
use futures::{
channel::{mpsc, oneshot},
@ -36,6 +32,7 @@ use std::{
path::PathBuf, sync::Arc, thread, time::Duration,
};
use terminal_view::{get_working_directory, TerminalView};
use util::http::{self, HttpClient};
use welcome::{show_welcome_experience, FIRST_OPEN};
use fs::RealFs;
@ -165,6 +162,7 @@ fn main() {
terminal_view::init(cx);
theme_testbench::init(cx);
recent_projects::init(cx);
copilot::init(client.clone(), cx);
cx.spawn(|cx| watch_themes(fs.clone(), themes.clone(), cx))
.detach();