mirror of
https://github.com/openai/codex.git
synced 2026-05-01 01:47:18 +00:00
Fix admin skills. (#8305)
We were assembling the skill roots in two different places, and the admin root was missing in one of them. This change centralizes root selection into a helper so both paths stay in sync.
This commit is contained in:
@@ -5,9 +5,7 @@ use std::sync::RwLock;
|
||||
|
||||
use crate::skills::SkillLoadOutcome;
|
||||
use crate::skills::loader::load_skills_from_roots;
|
||||
use crate::skills::loader::repo_skills_root;
|
||||
use crate::skills::loader::system_skills_root;
|
||||
use crate::skills::loader::user_skills_root;
|
||||
use crate::skills::loader::skill_roots_for_cwd;
|
||||
use crate::skills::system::install_system_skills;
|
||||
pub struct SkillsManager {
|
||||
codex_home: PathBuf,
|
||||
@@ -39,12 +37,7 @@ impl SkillsManager {
|
||||
return outcome;
|
||||
}
|
||||
|
||||
let mut roots = Vec::new();
|
||||
if let Some(repo_root) = repo_skills_root(cwd) {
|
||||
roots.push(repo_root);
|
||||
}
|
||||
roots.push(user_skills_root(&self.codex_home));
|
||||
roots.push(system_skills_root(&self.codex_home));
|
||||
let roots = skill_roots_for_cwd(&self.codex_home, cwd);
|
||||
let outcome = load_skills_from_roots(roots);
|
||||
match self.cache_by_cwd.write() {
|
||||
Ok(mut cache) => {
|
||||
|
||||
Reference in New Issue
Block a user