fix(chat): use ~/.codex/skills/ for Codex expert symlinks and keep expert button always enabled
Change Codex skill storage to use only ~/.codex/skills/ instead of ~/.agents/skills/, and never disable the expert skills button so users can always access the empty-state hint. Also fix stale expert list in conversation window after linking in the separate settings window by re-fetching on window focus. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1213,11 +1213,8 @@ pub(crate) fn skill_storage_spec(agent_type: AgentType) -> Option<SkillStorageSp
|
||||
}),
|
||||
AgentType::Codex => Some(SkillStorageSpec {
|
||||
kind: SkillStorageKind::SkillDirectoryOrMarkdownFile,
|
||||
global_dirs: vec![
|
||||
home_dir_or_default().join(".agents").join("skills"),
|
||||
codex_home_dir().join("skills"),
|
||||
],
|
||||
project_rel_dirs: vec![".agents/skills", ".codex/skills"],
|
||||
global_dirs: vec![codex_home_dir().join("skills")],
|
||||
project_rel_dirs: vec![".codex/skills"],
|
||||
}),
|
||||
AgentType::OpenCode => Some(SkillStorageSpec {
|
||||
kind: SkillStorageKind::SkillDirectoryOnly,
|
||||
|
||||
@@ -851,9 +851,8 @@ pub async fn experts_unlink_from_agent(
|
||||
|
||||
let _guard = mutation_lock().lock().await;
|
||||
|
||||
// Scan ALL global dirs for this agent to handle shared-dir agents
|
||||
// (Codex and Cline both point at `~/.agents/skills/`). Remove the
|
||||
// link wherever it is found.
|
||||
// Scan ALL global dirs for this agent to handle shared-dir agents.
|
||||
// Remove the link wherever it is found.
|
||||
let dirs = scoped_skill_dirs(agent_type, AgentSkillScope::Global, None)
|
||||
.map_err(|_| ExpertsError::UnsupportedAgent(agent_type))?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user