mirror of
https://github.com/lllin000/PaperForge.git
synced 2026-07-22 17:00:23 +00:00
fix(setup): overwrite skills on wizard re-run, never overwrite AGENTS.md
This commit is contained in:
parent
2bb0c428d7
commit
da4ef951ac
2 changed files with 3 additions and 5 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in a new issue