mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Use app-server skill metadata directly in the TUI (#34368)
## Why The TUI already receives skill metadata from the app-server protocol, but converted it into the core-skills model before using it. ## What changed - Use `codex_app_server_protocol::SkillMetadata` throughout skill toggles, mentions, and input submission. - Remove the protocol-to-core conversion and the TUI's `codex-core-skills` dependency. GitOrigin-RevId: 43d43d74bfb67fc21ef11a0ca0592aa44b89a122
This commit is contained in:
1 parent
28aacbb9d9
commit
b6de5b524c
11 files changed
+46
-116
No files matched your search
@@ -203,14 +203,12 @@ impl ChatWidget {
|
||||
.strip_prefix("skill://")
|
||||
.unwrap_or(binding.path.as_str());
|
||||
let path = Path::new(path);
|
||||
if let Some(skill) = skills
|
||||
.iter()
|
||||
.find(|skill| skill.path_to_skills_md.as_path() == path)
|
||||
&& selected_skill_paths.insert(skill.path_to_skills_md.clone())
|
||||
if let Some(skill) = skills.iter().find(|skill| skill.path.as_path() == path)
|
||||
&& selected_skill_paths.insert(skill.path.clone())
|
||||
{
|
||||
items.push(UserInput::Skill {
|
||||
name: skill.name.clone(),
|
||||
path: skill.path_to_skills_md.to_path_buf(),
|
||||
path: skill.path.to_path_buf(),
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -218,13 +216,13 @@ impl ChatWidget {
|
||||
let skill_mentions = find_skill_mentions_with_tool_mentions(&mentions, skills);
|
||||
for skill in skill_mentions {
|
||||
if bound_names.contains(skill.name.as_str())
|
||||
|| !selected_skill_paths.insert(skill.path_to_skills_md.clone())
|
||||
|| !selected_skill_paths.insert(skill.path.clone())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
items.push(UserInput::Skill {
|
||||
name: skill.name.clone(),
|
||||
path: skill.path_to_skills_md.to_path_buf(),
|
||||
path: skill.path.to_path_buf(),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user