From dabcb1958e03a2dc034143d47d3bee71c2838a67 Mon Sep 17 00:00:00 2001 From: xli-oai Date: Fri, 15 May 2026 03:07:34 -0700 Subject: [PATCH] Inline plugin list marketplace conversion --- .../src/request_processors/plugins.rs | 46 ++++++++----------- 1 file changed, 18 insertions(+), 28 deletions(-) diff --git a/codex-rs/app-server/src/request_processors/plugins.rs b/codex-rs/app-server/src/request_processors/plugins.rs index 462a3b8bfd..4e2b568ec0 100644 --- a/codex-rs/app-server/src/request_processors/plugins.rs +++ b/codex-rs/app-server/src/request_processors/plugins.rs @@ -127,29 +127,6 @@ fn share_context_for_source( } } -fn convert_configured_marketplace_to_plugin_marketplace_entry( - marketplace: codex_core_plugins::ConfiguredMarketplace, - shared_plugin_ids_by_local_path: &std::collections::BTreeMap, -) -> PluginMarketplaceEntry { - PluginMarketplaceEntry { - name: marketplace.name, - path: Some(marketplace.path), - interface: marketplace.interface.map(|interface| MarketplaceInterface { - display_name: interface.display_name, - }), - plugins: marketplace - .plugins - .into_iter() - .map(|plugin| { - convert_configured_marketplace_plugin_to_plugin_summary( - plugin, - shared_plugin_ids_by_local_path, - ) - }) - .collect(), - } -} - fn convert_configured_marketplace_plugin_to_plugin_summary( plugin: codex_core_plugins::ConfiguredMarketplacePlugin, shared_plugin_ids_by_local_path: &std::collections::BTreeMap, @@ -566,11 +543,24 @@ impl PluginRequestProcessor { outcome .marketplaces .into_iter() - .map(|marketplace| { - convert_configured_marketplace_to_plugin_marketplace_entry( - marketplace, - &shared_plugin_ids_by_local_path, - ) + .map(|marketplace| PluginMarketplaceEntry { + name: marketplace.name, + path: Some(marketplace.path), + interface: marketplace.interface.map(|interface| { + MarketplaceInterface { + display_name: interface.display_name, + } + }), + plugins: marketplace + .plugins + .into_iter() + .map(|plugin| { + convert_configured_marketplace_plugin_to_plugin_summary( + plugin, + &shared_plugin_ids_by_local_path, + ) + }) + .collect(), }) .collect(), outcome