mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 12:23:22 +00:00
Extract resolveAgentBackupPath() in restore_tui.go to replace 3 identical inline agent path resolution blocks (~30 lines removed). The new helper delegates to the canonical resolveAgentTargetPath() with builtin fallback. Add agent directory backup before sync (backupTargetsBeforeSync) and before target removal (backupTargets) so agent data is preserved alongside skill backups. Extract resolveGlobalAgentBackupContextFromCfg to avoid redundant config.Load() when config is already available.