mirror of
https://github.com/openai/codex.git
synced 2026-05-16 17:23:57 +00:00
Remove remote catalog gate from installed plugins
This commit is contained in:
@@ -863,43 +863,41 @@ impl PluginRequestProcessor {
|
||||
marketplace_load_errors.extend(suggestion_errors);
|
||||
}
|
||||
|
||||
if config.features.enabled(Feature::RemotePlugin) {
|
||||
let remote_marketplaces = if let Some(remote_marketplaces) =
|
||||
plugins_manager.remote_installed_marketplaces_from_cache()
|
||||
{
|
||||
Ok(remote_marketplaces)
|
||||
} else {
|
||||
let remote_plugin_service_config = RemotePluginServiceConfig {
|
||||
chatgpt_base_url: config.chatgpt_base_url.clone(),
|
||||
};
|
||||
plugins_manager
|
||||
.fetch_and_cache_remote_installed_marketplaces(
|
||||
&remote_plugin_service_config,
|
||||
auth.as_ref(),
|
||||
)
|
||||
.await
|
||||
let remote_marketplaces = if let Some(remote_marketplaces) =
|
||||
plugins_manager.remote_installed_marketplaces_from_cache()
|
||||
{
|
||||
Ok(remote_marketplaces)
|
||||
} else {
|
||||
let remote_plugin_service_config = RemotePluginServiceConfig {
|
||||
chatgpt_base_url: config.chatgpt_base_url.clone(),
|
||||
};
|
||||
plugins_manager
|
||||
.fetch_and_cache_remote_installed_marketplaces(
|
||||
&remote_plugin_service_config,
|
||||
auth.as_ref(),
|
||||
)
|
||||
.await
|
||||
};
|
||||
|
||||
match remote_marketplaces {
|
||||
Ok(remote_marketplaces) => {
|
||||
for remote_marketplace in remote_marketplaces
|
||||
.into_iter()
|
||||
.map(remote_marketplace_to_info)
|
||||
{
|
||||
merge_plugin_marketplace_entry(&mut data, remote_marketplace);
|
||||
}
|
||||
}
|
||||
Err(
|
||||
RemotePluginCatalogError::AuthRequired
|
||||
| RemotePluginCatalogError::UnsupportedAuthMode,
|
||||
) => {}
|
||||
Err(err) => {
|
||||
warn!(
|
||||
error = %err,
|
||||
"plugin/installed remote installed plugin fetch failed; returning local marketplaces only"
|
||||
);
|
||||
match remote_marketplaces {
|
||||
Ok(remote_marketplaces) => {
|
||||
for remote_marketplace in remote_marketplaces
|
||||
.into_iter()
|
||||
.map(remote_marketplace_to_info)
|
||||
{
|
||||
merge_plugin_marketplace_entry(&mut data, remote_marketplace);
|
||||
}
|
||||
}
|
||||
Err(
|
||||
RemotePluginCatalogError::AuthRequired
|
||||
| RemotePluginCatalogError::UnsupportedAuthMode,
|
||||
) => {}
|
||||
Err(err) => {
|
||||
warn!(
|
||||
error = %err,
|
||||
"plugin/installed remote installed plugin fetch failed; returning local marketplaces only"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Ok(PluginInstalledResponse {
|
||||
|
||||
@@ -1805,7 +1805,7 @@ async fn plugin_list_does_not_append_global_remote_when_marketplace_kinds_are_ex
|
||||
async fn plugin_installed_falls_back_to_remote_installed_and_caches_response() -> Result<()> {
|
||||
let codex_home = TempDir::new()?;
|
||||
let server = MockServer::start().await;
|
||||
write_remote_plugin_catalog_config(
|
||||
write_plugins_enabled_config_with_base_url(
|
||||
codex_home.path(),
|
||||
&format!("{}/backend-api/", server.uri()),
|
||||
)?;
|
||||
|
||||
Reference in New Issue
Block a user