Files
CodePilot/src/hooks
7418andClaude Opus 4.6 cfc4db1507 refactor: extract data logic into reusable hooks (PR5)
New hooks:
- useSettings: generic settings CRUD (fetch/save with loading/saving states)
- useBridgeAdapter: bridge adapter settings + verify flow
- useBridgeStatus: bridge status polling + start/stop control
- useAccountInfo: Claude SDK account info fetching

Refactored components:
- GeneralSection: replace inline fetchAccountInfo with useAccountInfo hook
- BridgeSection: replace inline fetchStatus/startBridge/stopBridge + polling
  interval with useBridgeStatus hook (removed ~50 lines)

The remaining bridge adapter sections (Telegram/Discord/Feishu/QQ) can be
migrated to useBridgeAdapter in a follow-up — hooks are ready for adoption.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:53:57 +08:00
..