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:
xintaofei
2026-04-11 00:37:31 +08:00
parent ade59f474c
commit 19979d50d0
4 changed files with 44 additions and 30 deletions

View File

@@ -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))?;