mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
TUI plugin menu polish (#15802)
- Add "OpenAI Curated" display name for `openai-curated` marketplace - Hide /apps menu - Change app install phase display text
This commit is contained in:
committed by
GitHub
Unverified
parent
eee692e351
commit
f24c55f0d5
@@ -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(),
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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()));
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user