mirror of
https://github.com/openai/codex.git
synced 2026-11-19 23:05:23 +00:00
1 parent
ff584c5a4b
commit
3b24a9a532
23 files changed
+308
-209
No files matched your search
@@ -42,6 +42,7 @@ use crate::legacy_core::config::edit::ConfigEdit;
|
||||
use crate::legacy_core::config::edit::ConfigEditsBuilder;
|
||||
use crate::legacy_core::config_loader::ConfigLayerStackOrdering;
|
||||
use crate::legacy_core::lookup_message_history_entry;
|
||||
use crate::legacy_core::plugins::PluginsManager;
|
||||
#[cfg(target_os = "windows")]
|
||||
use crate::legacy_core::windows_sandbox::WindowsSandboxLevelExt;
|
||||
use crate::model_catalog::ModelCatalog;
|
||||
@@ -2017,6 +2018,26 @@ impl App {
|
||||
});
|
||||
}
|
||||
|
||||
fn refresh_plugin_mentions(&mut self) {
|
||||
let config = self.config.clone();
|
||||
let app_event_tx = self.app_event_tx.clone();
|
||||
if !config.features.enabled(Feature::Plugins) {
|
||||
app_event_tx.send(AppEvent::PluginMentionsLoaded { plugins: None });
|
||||
return;
|
||||
}
|
||||
|
||||
tokio::spawn(async move {
|
||||
let plugins = PluginsManager::new(config.codex_home.to_path_buf())
|
||||
.plugins_for_config(&config)
|
||||
.await
|
||||
.capability_summaries()
|
||||
.to_vec();
|
||||
app_event_tx.send(AppEvent::PluginMentionsLoaded {
|
||||
plugins: Some(plugins),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
fn submit_feedback(
|
||||
&mut self,
|
||||
app_server: &AppServerSession,
|
||||
@@ -5044,6 +5065,15 @@ impl App {
|
||||
self.fetch_plugins_list(app_server, cwd);
|
||||
}
|
||||
}
|
||||
AppEvent::RefreshPluginMentions => {
|
||||
self.refresh_plugin_mentions();
|
||||
}
|
||||
AppEvent::PluginMentionsLoaded { mut plugins } => {
|
||||
if !self.config.features.enabled(Feature::Plugins) {
|
||||
plugins = None;
|
||||
}
|
||||
self.chat_widget.on_plugin_mentions_loaded(plugins);
|
||||
}
|
||||
AppEvent::PersistPersonalitySelection { personality } => {
|
||||
let profile = self.active_profile.as_deref();
|
||||
match ConfigEditsBuilder::new(&self.config.codex_home)
|
||||
|
||||
Reference in new issue
Block a user