fix(setup): overwrite skills on wizard re-run, never overwrite AGENTS.md

This commit is contained in:
Research Assistant 2026-05-12 02:13:03 +08:00
parent ad77b19531
commit 078baa6ded
2 changed files with 3 additions and 5 deletions

View file

@ -69,15 +69,13 @@ def deploy_skills(
else:
errors.append("Skills source not found in package")
# ── Deploy AGENTS.md ──
# ── Deploy AGENTS.md (only if it does not exist — users customise it) ──
agents_ok = False
agents_src = source_root.parent / "AGENTS.md"
if agents_src.exists():
try:
agents_dst = vault / "AGENTS.md"
if overwrite and agents_dst.exists():
agents_dst.unlink()
if overwrite or not agents_dst.exists():
if not agents_dst.exists():
shutil.copy2(agents_src, agents_dst)
agents_ok = True
except Exception as e:

View file

@ -650,7 +650,7 @@ def headless_setup(
skill_result = _deploy_skills_service(
vault=vault,
agent_key=agent_key,
overwrite=False,
overwrite=True,
)
if skill_result["skill_deployed"]:
print(" [OK] literature-qa skill deployed")