支持配置cline的skills

This commit is contained in:
xintaofei
2026-03-31 22:35:42 +08:00
parent 80a5f8c589
commit 967a16aeaa
2 changed files with 15 additions and 2 deletions

View File

@@ -1234,7 +1234,19 @@ fn skill_storage_spec(agent_type: AgentType) -> Option<SkillStorageSpec> {
global_dirs: vec![home_dir_or_default().join(".openclaw").join("skills")], global_dirs: vec![home_dir_or_default().join(".openclaw").join("skills")],
project_rel_dirs: vec!["skills"], project_rel_dirs: vec!["skills"],
}), }),
AgentType::Cline => None, AgentType::Cline => Some(SkillStorageSpec {
kind: SkillStorageKind::SkillDirectoryOnly,
global_dirs: vec![
home_dir_or_default().join(".agents").join("skills"),
home_dir_or_default().join(".cline").join("skills"),
],
project_rel_dirs: vec![
".agents/skills",
".cline/skills",
".clinerules/skills",
".claude/skills",
],
}),
} }
} }
@@ -2225,7 +2237,7 @@ pub async fn acp_list_agent_skills(
return Ok(AgentSkillsListResult { return Ok(AgentSkillsListResult {
supported: false, supported: false,
message: Some(format!( message: Some(format!(
"{agent_type} 暂不支持在设置页管理 Skills(当前仅支持 Claude Code / Codex / OpenCode / Gemini CLI / OpenClaw" "{agent_type} 暂不支持在设置页管理 Skills"
)), )),
locations: Vec::new(), locations: Vec::new(),
skills: Vec::new(), skills: Vec::new(),

View File

@@ -98,6 +98,7 @@ function defaultSkillLayoutForAgent(
if (agentType === "codex") return "skill_directory" if (agentType === "codex") return "skill_directory"
if (agentType === "gemini") return "skill_directory" if (agentType === "gemini") return "skill_directory"
if (agentType === "open_claw") return "skill_directory" if (agentType === "open_claw") return "skill_directory"
if (agentType === "cline") return "skill_directory"
return null return null
} }