mirror of
https://github.com/openai/codex.git
synced 2026-06-01 19:02:59 +00:00
Remove marketplace plugin filter parameter
This commit is contained in:
@@ -44,7 +44,6 @@ pub type PluginLoadOutcome = codex_plugin::PluginLoadOutcome<codex_config::McpSe
|
||||
pub use manager::ConfiguredMarketplace;
|
||||
pub use manager::ConfiguredMarketplaceListOutcome;
|
||||
pub use manager::ConfiguredMarketplacePlugin;
|
||||
pub use manager::ConfiguredMarketplacePluginFilter;
|
||||
pub use manager::PluginDetail;
|
||||
pub use manager::PluginDetailsUnavailableReason;
|
||||
pub use manager::PluginInstallError;
|
||||
|
||||
@@ -110,13 +110,6 @@ impl PluginsConfigInput {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
|
||||
pub enum ConfiguredMarketplacePluginFilter {
|
||||
#[default]
|
||||
All,
|
||||
InstalledOnly,
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Eq)]
|
||||
struct FeaturedPluginIdsCacheKey {
|
||||
chatgpt_base_url: String,
|
||||
@@ -1195,7 +1188,6 @@ impl PluginsManager {
|
||||
&self,
|
||||
config: &PluginsConfigInput,
|
||||
additional_roots: &[AbsolutePathBuf],
|
||||
plugin_filter: ConfiguredMarketplacePluginFilter,
|
||||
) -> Result<ConfiguredMarketplaceListOutcome, MarketplaceError> {
|
||||
if !config.plugins_enabled {
|
||||
return Ok(ConfiguredMarketplaceListOutcome::default());
|
||||
@@ -1223,11 +1215,6 @@ impl PluginsManager {
|
||||
}
|
||||
let installed = installed_plugins.contains(&plugin_key);
|
||||
let enabled = enabled_plugins.contains(&plugin_key);
|
||||
if plugin_filter == ConfiguredMarketplacePluginFilter::InstalledOnly
|
||||
&& !installed
|
||||
{
|
||||
return None;
|
||||
}
|
||||
let mut interface = plugin.interface;
|
||||
let mut local_version = plugin.local_version;
|
||||
if installed
|
||||
|
||||
@@ -1588,11 +1588,7 @@ enabled = false
|
||||
|
||||
let config = load_config(tmp.path(), &repo_root).await;
|
||||
let marketplaces = PluginsManager::new(tmp.path().to_path_buf())
|
||||
.list_marketplaces_for_config(
|
||||
&config,
|
||||
&[AbsolutePathBuf::try_from(repo_root).unwrap()],
|
||||
ConfiguredMarketplacePluginFilter::All,
|
||||
)
|
||||
.list_marketplaces_for_config(&config, &[AbsolutePathBuf::try_from(repo_root).unwrap()])
|
||||
.unwrap()
|
||||
.marketplaces;
|
||||
|
||||
@@ -1692,11 +1688,7 @@ enabled = true
|
||||
|
||||
let config = load_config(tmp.path(), &repo_root).await;
|
||||
let marketplaces = PluginsManager::new(tmp.path().to_path_buf())
|
||||
.list_marketplaces_for_config(
|
||||
&config,
|
||||
&[AbsolutePathBuf::try_from(repo_root).unwrap()],
|
||||
ConfiguredMarketplacePluginFilter::All,
|
||||
)
|
||||
.list_marketplaces_for_config(&config, &[AbsolutePathBuf::try_from(repo_root).unwrap()])
|
||||
.unwrap()
|
||||
.marketplaces;
|
||||
|
||||
@@ -1744,11 +1736,7 @@ plugins = true
|
||||
|
||||
let config = load_config(tmp.path(), &repo_root).await;
|
||||
let marketplaces = PluginsManager::new(tmp.path().to_path_buf())
|
||||
.list_marketplaces_for_config(
|
||||
&config,
|
||||
&[AbsolutePathBuf::try_from(repo_root).unwrap()],
|
||||
ConfiguredMarketplacePluginFilter::All,
|
||||
)
|
||||
.list_marketplaces_for_config(&config, &[AbsolutePathBuf::try_from(repo_root).unwrap()])
|
||||
.unwrap()
|
||||
.marketplaces;
|
||||
|
||||
@@ -2185,11 +2173,7 @@ enabled = true
|
||||
|
||||
let config = load_config(tmp.path(), &repo_root).await;
|
||||
let marketplaces = PluginsManager::new(tmp.path().to_path_buf())
|
||||
.list_marketplaces_for_config(
|
||||
&config,
|
||||
&[AbsolutePathBuf::try_from(repo_root).unwrap()],
|
||||
ConfiguredMarketplacePluginFilter::All,
|
||||
)
|
||||
.list_marketplaces_for_config(&config, &[AbsolutePathBuf::try_from(repo_root).unwrap()])
|
||||
.unwrap()
|
||||
.marketplaces;
|
||||
|
||||
@@ -2301,7 +2285,7 @@ plugins = true
|
||||
|
||||
let config = load_config(tmp.path(), tmp.path()).await;
|
||||
let marketplaces = PluginsManager::new(tmp.path().to_path_buf())
|
||||
.list_marketplaces_for_config(&config, &[], ConfiguredMarketplacePluginFilter::All)
|
||||
.list_marketplaces_for_config(&config, &[])
|
||||
.unwrap()
|
||||
.marketplaces;
|
||||
|
||||
@@ -2380,7 +2364,7 @@ source = "/tmp/debug"
|
||||
.unwrap();
|
||||
let config = load_config(tmp.path(), tmp.path()).await;
|
||||
let marketplaces = PluginsManager::new(tmp.path().to_path_buf())
|
||||
.list_marketplaces_for_config(&config, &[], ConfiguredMarketplacePluginFilter::All)
|
||||
.list_marketplaces_for_config(&config, &[])
|
||||
.unwrap()
|
||||
.marketplaces;
|
||||
|
||||
@@ -2456,7 +2440,7 @@ source = "/tmp/debug"
|
||||
|
||||
let config = load_config(tmp.path(), tmp.path()).await;
|
||||
let marketplaces = PluginsManager::new(tmp.path().to_path_buf())
|
||||
.list_marketplaces_for_config(&config, &[], ConfiguredMarketplacePluginFilter::All)
|
||||
.list_marketplaces_for_config(&config, &[])
|
||||
.unwrap()
|
||||
.marketplaces;
|
||||
|
||||
@@ -2511,7 +2495,7 @@ plugins = true
|
||||
.unwrap();
|
||||
let config = load_config(tmp.path(), tmp.path()).await;
|
||||
let marketplaces = PluginsManager::new(tmp.path().to_path_buf())
|
||||
.list_marketplaces_for_config(&config, &[], ConfiguredMarketplacePluginFilter::All)
|
||||
.list_marketplaces_for_config(&config, &[])
|
||||
.unwrap()
|
||||
.marketplaces;
|
||||
|
||||
@@ -2596,7 +2580,6 @@ enabled = false
|
||||
AbsolutePathBuf::try_from(repo_a_root).unwrap(),
|
||||
AbsolutePathBuf::try_from(repo_b_root).unwrap(),
|
||||
],
|
||||
ConfiguredMarketplacePluginFilter::All,
|
||||
)
|
||||
.unwrap()
|
||||
.marketplaces;
|
||||
@@ -2705,11 +2688,7 @@ enabled = true
|
||||
|
||||
let config = load_config(tmp.path(), &repo_root).await;
|
||||
let marketplaces = PluginsManager::new(tmp.path().to_path_buf())
|
||||
.list_marketplaces_for_config(
|
||||
&config,
|
||||
&[AbsolutePathBuf::try_from(repo_root).unwrap()],
|
||||
ConfiguredMarketplacePluginFilter::All,
|
||||
)
|
||||
.list_marketplaces_for_config(&config, &[AbsolutePathBuf::try_from(repo_root).unwrap()])
|
||||
.unwrap()
|
||||
.marketplaces;
|
||||
|
||||
@@ -2854,7 +2833,7 @@ enabled = true
|
||||
|
||||
let synced_config = load_config(tmp.path(), tmp.path()).await;
|
||||
let curated_marketplace = manager
|
||||
.list_marketplaces_for_config(&synced_config, &[], ConfiguredMarketplacePluginFilter::All)
|
||||
.list_marketplaces_for_config(&synced_config, &[])
|
||||
.unwrap()
|
||||
.marketplaces
|
||||
.into_iter()
|
||||
|
||||
Reference in New Issue
Block a user