mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
Pretty plugin labels, preserve plugin app provenance during MCP tool refresh (#15606)
- Prefer plugin manifest `interface.displayName` for plugin labels. - Preserve plugin provenance when handling `list_mcp_tools` so connector `plugin_display_names` are not clobbered. - Add a TUI test to ensure plugin-owned app mentions are deduped correctly.
This commit is contained in:
committed by
GitHub
Unverified
parent
f1658ab642
commit
66edc347ae
@@ -8946,6 +8946,10 @@ impl ChatWidget {
|
||||
|
||||
fn on_list_mcp_tools(&mut self, ev: McpListToolsResponseEvent) {
|
||||
if self.connectors_enabled() {
|
||||
let plugin_provenance = McpManager::new(Arc::new(PluginsManager::new(
|
||||
self.config.codex_home.clone(),
|
||||
)))
|
||||
.tool_plugin_provenance(&self.config);
|
||||
let mut connectors_by_id: HashMap<String, connectors::AppInfo> = HashMap::new();
|
||||
for tool in ev.tools.values() {
|
||||
let Some(meta) = tool.meta.as_ref().and_then(serde_json::Value::as_object) else {
|
||||
@@ -8988,7 +8992,9 @@ impl ChatWidget {
|
||||
install_url: None,
|
||||
is_accessible: true,
|
||||
is_enabled: true,
|
||||
plugin_display_names: Vec::new(),
|
||||
plugin_display_names: plugin_provenance
|
||||
.plugin_display_names_for_connector_id(connector_id)
|
||||
.to_vec(),
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user