diff --git a/codex-rs/app-server/src/request_processors/plugins.rs b/codex-rs/app-server/src/request_processors/plugins.rs index 2681e431e8..767ef39434 100644 --- a/codex-rs/app-server/src/request_processors/plugins.rs +++ b/codex-rs/app-server/src/request_processors/plugins.rs @@ -903,7 +903,7 @@ impl PluginRequestProcessor { chatgpt_base_url: config.chatgpt_base_url.clone(), }; plugins_manager - .fetch_cached_remote_installed_marketplaces( + .fetch_remote_installed_marketplaces( &remote_plugin_service_config, auth.as_ref(), ) diff --git a/codex-rs/core-plugins/src/manager.rs b/codex-rs/core-plugins/src/manager.rs index c85fb4d6d1..a196200ce6 100644 --- a/codex-rs/core-plugins/src/manager.rs +++ b/codex-rs/core-plugins/src/manager.rs @@ -618,7 +618,7 @@ impl PluginsManager { )) } - pub async fn fetch_cached_remote_installed_marketplaces( + pub async fn fetch_remote_installed_marketplaces( &self, config: &RemotePluginServiceConfig, auth: Option<&CodexAuth>, diff --git a/codex-rs/core-plugins/src/remote.rs b/codex-rs/core-plugins/src/remote.rs index e97ee33cc2..16eaeae015 100644 --- a/codex-rs/core-plugins/src/remote.rs +++ b/codex-rs/core-plugins/src/remote.rs @@ -658,78 +658,6 @@ pub async fn fetch_remote_installed_plugins( Ok(installed_plugins) } -pub async fn fetch_remote_installed_marketplaces( - config: &RemotePluginServiceConfig, - auth: Option<&CodexAuth>, -) -> Result, RemotePluginCatalogError> { - let auth = ensure_chatgpt_auth(auth)?; - let global = async { - let scope = RemotePluginScope::Global; - let installed_plugins = fetch_installed_plugins_for_scope(config, auth, scope).await?; - Ok::<_, RemotePluginCatalogError>(installed_plugins) - }; - let workspace = async { - let scope = RemotePluginScope::Workspace; - let installed_plugins = fetch_installed_plugins_for_scope(config, auth, scope).await?; - Ok::<_, RemotePluginCatalogError>(installed_plugins) - }; - - let (global_installed_plugins, workspace_installed_plugins) = - tokio::try_join!(global, workspace)?; - let mut marketplaces = Vec::new(); - - if let Some(marketplace) = build_remote_marketplace( - REMOTE_GLOBAL_MARKETPLACE_NAME, - REMOTE_GLOBAL_MARKETPLACE_DISPLAY_NAME, - Vec::new(), - global_installed_plugins, - /*include_installed_only*/ true, - )? { - marketplaces.push(marketplace); - } - - let mut listed_plugins = Vec::new(); - let mut private_plugins = Vec::new(); - let mut unlisted_plugins = Vec::new(); - for plugin in workspace_installed_plugins { - match workspace_plugin_discoverability(&plugin.plugin)? { - RemotePluginShareDiscoverability::Listed => listed_plugins.push(plugin), - RemotePluginShareDiscoverability::Private => private_plugins.push(plugin), - RemotePluginShareDiscoverability::Unlisted => unlisted_plugins.push(plugin), - } - } - - for (name, display_name, plugins) in [ - ( - REMOTE_WORKSPACE_MARKETPLACE_NAME, - REMOTE_WORKSPACE_MARKETPLACE_DISPLAY_NAME, - listed_plugins, - ), - ( - REMOTE_WORKSPACE_SHARED_WITH_ME_PRIVATE_MARKETPLACE_NAME, - REMOTE_WORKSPACE_SHARED_WITH_ME_PRIVATE_MARKETPLACE_DISPLAY_NAME, - private_plugins, - ), - ( - REMOTE_WORKSPACE_SHARED_WITH_ME_UNLISTED_MARKETPLACE_NAME, - REMOTE_WORKSPACE_SHARED_WITH_ME_UNLISTED_MARKETPLACE_DISPLAY_NAME, - unlisted_plugins, - ), - ] { - if let Some(marketplace) = build_remote_marketplace( - name, - display_name, - Vec::new(), - plugins, - /*include_installed_only*/ true, - )? { - marketplaces.push(marketplace); - } - } - - Ok(marketplaces) -} - pub fn cached_remote_installed_marketplaces( plugins: &[RemoteInstalledPlugin], store: &PluginStore,