auto-sync: 2026-05-18 00:24:07
This commit is contained in:
@@ -83,9 +83,22 @@ class ProjectRegistry:
|
||||
# 创建项目目录
|
||||
project_dir = self.root / project_id
|
||||
project_dir.mkdir(parents=True, exist_ok=True)
|
||||
for subdir in ("artifacts", "experiences", "skills"):
|
||||
for subdir in ("artifacts", "experiences", "skills", "config"):
|
||||
(project_dir / subdir).mkdir(exist_ok=True)
|
||||
|
||||
# 写 per-project config skeleton
|
||||
import yaml
|
||||
project_yaml = project_dir / "config" / "project.yaml"
|
||||
if not project_yaml.exists():
|
||||
with open(project_yaml, "w") as f:
|
||||
yaml.dump({
|
||||
"project": {
|
||||
"name": name,
|
||||
"description": description,
|
||||
"agents": agents or [],
|
||||
}
|
||||
}, f, default_flow_style=False, allow_unicode=True)
|
||||
|
||||
conn.commit()
|
||||
logger.info("Project created: %s (%s)", project_id, name)
|
||||
return self.get_project(project_id) or {}
|
||||
|
||||
Reference in New Issue
Block a user