Headless extensions (#14538)
Release Notes: - remoting (alpha only): Fix extension installation
This commit is contained in:
parent
e68d9f4625
commit
e413823ae7
4 changed files with 32 additions and 26 deletions
|
@ -1,6 +1,7 @@
|
|||
use anyhow::{anyhow, Result};
|
||||
use client::DevServerProjectId;
|
||||
use client::{user::UserStore, Client, ClientSettings};
|
||||
use extension::ExtensionStore;
|
||||
use fs::Fs;
|
||||
use futures::Future;
|
||||
use gpui::{AppContext, AsyncAppContext, Context, Global, Model, ModelContext, Task, WeakModel};
|
||||
|
@ -9,7 +10,7 @@ use node_runtime::NodeRuntime;
|
|||
use postage::stream::Stream;
|
||||
use project::Project;
|
||||
use rpc::{proto, ErrorCode, TypedEnvelope};
|
||||
use settings::Settings;
|
||||
use settings::{Settings, SettingsStore};
|
||||
use std::{collections::HashMap, sync::Arc};
|
||||
use util::{ResultExt, TryFutureExt};
|
||||
|
||||
|
@ -83,6 +84,11 @@ impl DevServer {
|
|||
move |this, cx| Self::maintain_connection(this, client.clone(), cx).log_err()
|
||||
});
|
||||
|
||||
cx.observe_global::<SettingsStore>(|_, cx| {
|
||||
ExtensionStore::global(cx).update(cx, |store, cx| store.auto_install_extensions(cx))
|
||||
})
|
||||
.detach();
|
||||
|
||||
DevServer {
|
||||
_subscriptions: vec![
|
||||
client.add_message_handler(cx.weak_model(), Self::handle_dev_server_instructions),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue