Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

TUI plugin menu polish (#15802)

canvrno-oaif24c55f0d538
diff --git a/codex-rs/core/src/plugins/manager.rs b/codex-rs/core/src/plugins/manager.rs
index 3f3097d5e3..140882a187 100644
--- a/codex-rs/core/src/plugins/manager.rs
+++ b/codex-rs/core/src/plugins/manager.rs
@@ -78,6 +78,7 @@ const DEFAULT_SKILLS_DIR_NAME: &str = "skills";
const DEFAULT_MCP_CONFIG_FILE: &str = ".mcp.json";
const DEFAULT_APP_CONFIG_FILE: &str = ".app.json";
pub const OPENAI_CURATED_MARKETPLACE_NAME: &str = "openai-curated";
+pub const OPENAI_CURATED_MARKETPLACE_DISPLAY_NAME: &str = "OpenAI Curated";
static CURATED_REPO_SYNC_STARTED: AtomicBool = AtomicBool::new(false);
const FEATURED_PLUGIN_IDS_CACHE_TTL: std::time::Duration =
std::time::Duration::from_secs(60 * 60 * 3);
@@ -889,7 +890,13 @@ impl PluginsManager {
(!plugins.is_empty()).then_some(ConfiguredMarketplace {
name: marketplace.name,
path: marketplace.path,
- interface: marketplace.interface,
+ interface: if marketplace_name == OPENAI_CURATED_MARKETPLACE_NAME {
+ Some(MarketplaceInterface {
+ display_name: Some(OPENAI_CURATED_MARKETPLACE_DISPLAY_NAME.to_string()),
+ })
+ } else {
+ marketplace.interface
+ },
plugins,
})
})
@@ -972,7 +979,11 @@ impl PluginsManager {
mcp_server_names.dedup();
Ok(PluginReadOutcome {
- marketplace_name: marketplace.name,
+ marketplace_name: if marketplace.name == OPENAI_CURATED_MARKETPLACE_NAME {
+ OPENAI_CURATED_MARKETPLACE_DISPLAY_NAME.to_string()
+ } else {
+ marketplace.name
+ },
marketplace_path: marketplace.path,
plugin: PluginDetail {
id: plugin_key.clone(),
diff --git a/codex-rs/core/src/plugins/manager_tests.rs b/codex-rs/core/src/plugins/manager_tests.rs
index 884beee66d..af33f90179 100644
--- a/codex-rs/core/src/plugins/manager_tests.rs
+++ b/codex-rs/core/src/plugins/manager_tests.rs
@@ -1386,7 +1386,7 @@ plugins = true
path: AbsolutePathBuf::try_from(curated_root.join(".agents/plugins/marketplace.json"))
.unwrap(),
interface: Some(MarketplaceInterface {
- display_name: Some("ChatGPT Official".to_string()),
+ display_name: Some(OPENAI_CURATED_MARKETPLACE_DISPLAY_NAME.to_string()),
}),
plugins: vec![ConfiguredMarketplacePlugin {
id: "linear@openai-curated".to_string(),
diff --git a/codex-rs/tui/src/bottom_pane/command_popup.rs b/codex-rs/tui/src/bottom_pane/command_popup.rs
index e7269c38ef..ef73450f34 100644
--- a/codex-rs/tui/src/bottom_pane/command_popup.rs
+++ b/codex-rs/tui/src/bottom_pane/command_popup.rs
@@ -68,6 +68,7 @@ impl CommandPopup {
slash_commands::builtins_for_input(flags.into())
.into_iter()
.filter(|(name, _)| !name.starts_with("debug"))
+ .filter(|(_, cmd)| *cmd != SlashCommand::Apps)
.collect();
// Exclude prompts that collide with builtin command names and sort by name.
let exclude: HashSet<String> = builtins.iter().map(|(n, _)| (*n).to_string()).collect();
diff --git a/codex-rs/tui/src/chatwidget/plugins.rs b/codex-rs/tui/src/chatwidget/plugins.rs
index 588884639d..9b3f91b202 100644
--- a/codex-rs/tui/src/chatwidget/plugins.rs
+++ b/codex-rs/tui/src/chatwidget/plugins.rs
@@ -418,7 +418,7 @@ impl ChatWidget {
let status_label = if is_installed {
"Already installed in this session."
} else {
- "Not installed yet."
+ "Install the required Apps in ChatGPT to continue:"
};
let mut header = ColumnRenderable::new();
header.push(Line::from("Plugins".bold()));
diff --git a/codex-rs/tui_app_server/src/bottom_pane/command_popup.rs b/codex-rs/tui_app_server/src/bottom_pane/command_popup.rs
index 36cc87668c..5ad3df5c2e 100644
--- a/codex-rs/tui_app_server/src/bottom_pane/command_popup.rs
+++ b/codex-rs/tui_app_server/src/bottom_pane/command_popup.rs
@@ -68,6 +68,7 @@ impl CommandPopup {
slash_commands::builtins_for_input(flags.into())
.into_iter()
.filter(|(name, _)| !name.starts_with("debug"))
+ .filter(|(_, cmd)| *cmd != SlashCommand::Apps)
.collect();
// Exclude prompts that collide with builtin command names and sort by name.
let exclude: HashSet<String> = builtins.iter().map(|(n, _)| (*n).to_string()).collect();
diff --git a/codex-rs/tui_app_server/src/chatwidget/plugins.rs b/codex-rs/tui_app_server/src/chatwidget/plugins.rs
index 588884639d..9b3f91b202 100644
--- a/codex-rs/tui_app_server/src/chatwidget/plugins.rs
+++ b/codex-rs/tui_app_server/src/chatwidget/plugins.rs
@@ -418,7 +418,7 @@ impl ChatWidget {
let status_label = if is_installed {
"Already installed in this session."
} else {
- "Not installed yet."
+ "Install the required Apps in ChatGPT to continue:"
};
let mut header = ColumnRenderable::new();
header.push(Line::from("Plugins".bold()));