Reinstall Node whenever a NodeRuntime operation has serious error

This commit is contained in:
Julia 2023-06-28 16:43:45 -04:00
parent b2de28ccfc
commit db2b3e47bc
7 changed files with 126 additions and 87 deletions

View file

@ -340,7 +340,7 @@ impl Copilot {
let http = util::http::FakeHttpClient::create(|_| async { unreachable!() });
let this = cx.add_model(|cx| Self {
http: http.clone(),
node_runtime: NodeRuntime::new(http, cx.background().clone()),
node_runtime: NodeRuntime::instance(http, cx.background().clone()),
server: CopilotServer::Running(RunningCopilotServer {
lsp: Arc::new(server),
sign_in_status: SignInStatus::Authorized,