mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-05-07 19:53:04 +08:00
bfdf7d4ad5
- Preserve and merge meta.custom_endpoints in update_provider to avoid losing custom endpoints added via Tauri commands during edit/save. Merge old and incoming meta; keep existing entries and timestamps, add new URLs only. - Persist endpoint candidates when creating a provider: union of user-added custom endpoints, selected base URL (Claude/Codex), and preset.endpointCandidates; normalize and de-duplicate. Ensures PackyCode keeps all 5 nodes after saving. Files: - src-tauri/src/commands.rs - src/components/ProviderForm.tsx Validation: - cargo check passes - Manual: create from PackyCode preset -> save -> reopen edit -> Manage & Test lists all preset nodes; edit existing provider -> add endpoint -> save -> reopen -> endpoint persists.