mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
Remove filter from plugins/list result (#15580)
Show all plugin marketplaces in the /plugins popup by removing the `openai-curated` marketplace filter, and update plugin popup copy/tests/snapshots to match the new behavior in both TUI codepaths.
This commit is contained in:
@@ -15,14 +15,12 @@ use codex_app_server_protocol::PluginMarketplaceEntry;
|
||||
use codex_app_server_protocol::PluginReadResponse;
|
||||
use codex_app_server_protocol::PluginSummary;
|
||||
use codex_app_server_protocol::PluginUninstallResponse;
|
||||
use codex_core::plugins::OPENAI_CURATED_MARKETPLACE_NAME;
|
||||
use codex_features::Feature;
|
||||
use codex_utils_absolute_path::AbsolutePathBuf;
|
||||
use ratatui::style::Stylize;
|
||||
use ratatui::text::Line;
|
||||
|
||||
const PLUGINS_SELECTION_VIEW_ID: &str = "plugins-selection";
|
||||
const SUPPORTED_MARKETPLACE_NAME: &str = OPENAI_CURATED_MARKETPLACE_NAME;
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub(super) enum PluginsCacheState {
|
||||
@@ -625,11 +623,7 @@ impl ChatWidget {
|
||||
}
|
||||
|
||||
fn plugins_popup_params(&self, response: &PluginListResponse) -> SelectionViewParams {
|
||||
let marketplaces: Vec<&PluginMarketplaceEntry> = response
|
||||
.marketplaces
|
||||
.iter()
|
||||
.filter(|marketplace| marketplace.name == SUPPORTED_MARKETPLACE_NAME)
|
||||
.collect();
|
||||
let marketplaces: Vec<&PluginMarketplaceEntry> = response.marketplaces.iter().collect();
|
||||
|
||||
let total: usize = marketplaces
|
||||
.iter()
|
||||
@@ -644,7 +638,7 @@ impl ChatWidget {
|
||||
let mut header = ColumnRenderable::new();
|
||||
header.push(Line::from("Plugins".bold()));
|
||||
header.push(Line::from(
|
||||
"Browse plugins from the ChatGPT marketplace.".dim(),
|
||||
"Browse plugins from available marketplaces.".dim(),
|
||||
));
|
||||
header.push(Line::from(
|
||||
format!("Installed {installed} of {total} available plugins.").dim(),
|
||||
@@ -697,9 +691,9 @@ impl ChatWidget {
|
||||
|
||||
if items.is_empty() {
|
||||
items.push(SelectionItem {
|
||||
name: "No ChatGPT marketplace plugins available".to_string(),
|
||||
name: "No marketplace plugins available".to_string(),
|
||||
description: Some(
|
||||
"This first pass only surfaces the ChatGPT plugin marketplace.".to_string(),
|
||||
"No plugins are available in the discovered marketplaces.".to_string(),
|
||||
),
|
||||
is_disabled: true,
|
||||
..Default::default()
|
||||
|
||||
Reference in New Issue
Block a user