mirror of
https://github.com/openai/codex.git
synced 2026-05-05 22:01:37 +03:00
[plugins] Support plugin installation elicitation. (#14896)
It now supports: - Connectors that are from installed and enabled plugins that are not installed yet - Plugins that are on the allowlist that are not installed yet.
This commit is contained in:
@@ -68,7 +68,7 @@ use tracing::warn;
|
||||
const DEFAULT_SKILLS_DIR_NAME: &str = "skills";
|
||||
const DEFAULT_MCP_CONFIG_FILE: &str = ".mcp.json";
|
||||
const DEFAULT_APP_CONFIG_FILE: &str = ".app.json";
|
||||
const OPENAI_CURATED_MARKETPLACE_NAME: &str = "openai-curated";
|
||||
pub const OPENAI_CURATED_MARKETPLACE_NAME: &str = "openai-curated";
|
||||
static CURATED_REPO_SYNC_STARTED: AtomicBool = AtomicBool::new(false);
|
||||
const MAX_CAPABILITY_SUMMARY_DESCRIPTION_LEN: usize = 1024;
|
||||
|
||||
@@ -219,6 +219,19 @@ impl PluginCapabilitySummary {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<PluginDetailSummary> for PluginCapabilitySummary {
|
||||
fn from(value: PluginDetailSummary) -> Self {
|
||||
Self {
|
||||
config_name: value.id,
|
||||
display_name: value.name,
|
||||
description: prompt_safe_plugin_description(value.description.as_deref()),
|
||||
has_skills: !value.skills.is_empty(),
|
||||
mcp_server_names: value.mcp_server_names,
|
||||
app_connector_ids: value.apps,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn prompt_safe_plugin_description(description: Option<&str>) -> Option<String> {
|
||||
let description = description?
|
||||
.split_whitespace()
|
||||
|
||||
Reference in New Issue
Block a user