refactor(tools): skills_sync_client write_sync_state uses utils.atomic_write_text (skill_usage._atomic_write was unified away)

This commit is contained in:
Teknium
2026-09-03 01:48:35 -07:00
parent 8cd2dbe6e8
commit 1ce9ced0a6
+4 -3
View File
@@ -282,9 +282,10 @@ def read_sync_state() -> Dict[str, Any]:
def write_sync_state(data: Dict[str, Any]) -> None:
"""Write the local sync state atomically. Best-effort."""
try:
from tools.skill_usage import _atomic_write
_atomic_write(_skills_dir() / ".sync_state", ".sync_state_",
lambda f: json.dump(data, f, indent=2, sort_keys=True, ensure_ascii=False))
from utils import atomic_write_text
atomic_write_text(_skills_dir() / ".sync_state",
json.dumps(data, indent=2, sort_keys=True, ensure_ascii=False),
tmp_prefix=".sync_state_")
except Exception as e:
logger.debug("skills_sync_client: sync state write failed: %s", e)