fix(skills): skip hidden directories when scanning for skills

Filter out directories starting with '.' (e.g., .system) during skill
scanning to avoid exposing internal system directories from Codex.
This commit is contained in:
Jason
2026-01-03 11:42:10 +08:00
parent 0e085aa01a
commit 0a9de282a3

View File

@@ -405,6 +405,11 @@ impl SkillService {
let dir_name = entry.file_name().to_string_lossy().to_string();
// 跳过隐藏目录(以 . 开头,如 .system
if dir_name.starts_with('.') {
continue;
}
// 跳过已管理的
if managed_dirs.contains(&dir_name) {
continue;
@@ -999,6 +1004,11 @@ pub fn migrate_skills_to_ssot(db: &Arc<Database>) -> Result<usize> {
let dir_name = entry.file_name().to_string_lossy().to_string();
// 跳过隐藏目录(以 . 开头,如 .system
if dir_name.starts_with('.') {
continue;
}
// 复制到 SSOT如果不存在
let ssot_path = ssot_dir.join(&dir_name);
if !ssot_path.exists() {