mirror of
https://github.com/openai/codex.git
synced 2026-11-26 07:26:11 +00:00
Deduplicate plugin skills in unified mentions (#40501)
## Why Unified `@` search could show a plugin alongside the skills it owns, creating duplicate entry points for the same capability. ## What changed - Add a nullable `pluginId` to `SkillMetadata` returned by `skills/list` so clients can associate skills with their owning plugin without inspecting names or paths. - Hide a plugin's owned skills from unified `@` results when that plugin is present, while retaining standalone skills and skills with unknown ownership. - Keep `$` focused on individual skills and apps, and use it consistently as the skills-list shortcut. Preserve the legacy mention behavior when `mentions_v2` is disabled. ## Testing - Cover plugin ownership in `skills/list` and the updated `@` and `$` composer results. GitOrigin-RevId: e168cdff8d0c58f74ce4c228a683880a3167775b
This commit is contained in:
1 parent
465eafacbc
commit
5918c743f3
18 files changed
+121
-25
No files matched your search
@@ -14,32 +14,20 @@ use codex_app_server_protocol::SkillMetadata;
|
||||
use codex_app_server_protocol::SkillsListEntry;
|
||||
use codex_app_server_protocol::SkillsListResponse;
|
||||
use codex_connectors::AppInfo;
|
||||
use codex_features::Feature;
|
||||
use codex_protocol::parse_command::ParsedCommand;
|
||||
use codex_utils_absolute_path::AbsolutePathBuf;
|
||||
use codex_utils_plugins::mention_syntax::TOOL_MENTION_SIGIL;
|
||||
|
||||
impl ChatWidget {
|
||||
pub(crate) fn open_skills_list(&mut self) {
|
||||
if self.config.features.enabled(Feature::MentionsV2) {
|
||||
self.insert_str("@");
|
||||
} else {
|
||||
self.insert_str("$");
|
||||
}
|
||||
self.insert_str("$");
|
||||
}
|
||||
|
||||
pub(crate) fn open_skills_menu(&mut self) {
|
||||
let list_shortcut = if self.config.features.enabled(Feature::MentionsV2) {
|
||||
'@'
|
||||
} else {
|
||||
'$'
|
||||
};
|
||||
let items = vec![
|
||||
SelectionItem {
|
||||
name: "List skills".to_string(),
|
||||
description: Some(format!(
|
||||
"Tip: press {list_shortcut} to open this list directly."
|
||||
)),
|
||||
description: Some("Tip: press $ to open this list directly.".to_string()),
|
||||
actions: vec![Box::new(|tx| {
|
||||
tx.send(AppEvent::OpenSkillsList);
|
||||
})],
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ expression: popup
|
||||
Skills
|
||||
Choose an action
|
||||
|
||||
› 1. List skills Tip: press @ to open this list directly.
|
||||
› 1. List skills Tip: press $ to open this list directly.
|
||||
2. Enable/Disable Skills Enable or disable skills.
|
||||
|
||||
Press enter to confirm or esc to go back
|
||||
@@ -886,6 +886,7 @@ async fn submission_prefers_selected_duplicate_skill_path() {
|
||||
path: repo_skill_path,
|
||||
scope: crate::test_support::skill_scope_repo(),
|
||||
enabled: true,
|
||||
plugin_id: None,
|
||||
},
|
||||
SkillMetadata {
|
||||
name: "figma".to_string(),
|
||||
@@ -896,6 +897,7 @@ async fn submission_prefers_selected_duplicate_skill_path() {
|
||||
path: user_skill_path.clone(),
|
||||
scope: crate::test_support::skill_scope_user(),
|
||||
enabled: true,
|
||||
plugin_id: None,
|
||||
},
|
||||
]));
|
||||
|
||||
|
||||
Reference in new issue
Block a user