Jason
f963d58e6a
refactor: extract business logic to useProviderActions hook
Major improvements:
- Create `src/hooks/useProviderActions.ts` (147 lines)
- Consolidate provider operations (add, update, delete, switch)
- Extract Claude plugin sync logic
- Extract usage script save logic
- Simplify `App.tsx` (347 → 226 lines, -35%)
- Remove 8 callback functions
- Remove Claude plugin sync logic
- Remove usage script save logic
- Cleaner and more maintainable
- Replace `onNotify` prop with `toast` in:
- `UsageScriptModal.tsx`
- `McpPanel.tsx`
- `McpFormModal.tsx`
- `McpWizardModal.tsx`
- Unified notification system using sonner
Benefits:
- Reduced coupling and improved maintainability
- Business logic isolated in hooks, easier to test
- Consistent notification system across the app
2025-10-17 17:49:16 +08:00
..
2025-09-13 16:21:15 +08:00
2025-10-17 17:49:16 +08:00
2025-10-12 22:27:02 +08:00
2025-09-13 15:36:43 +08:00
2025-10-17 17:49:16 +08:00
2025-10-15 22:21:06 +08:00
2025-10-17 16:35:12 +08:00
2025-10-12 00:08:37 +08:00
2025-10-17 17:49:16 +08:00
2025-10-16 15:32:26 +08:00
2025-08-23 21:13:25 +08:00
2025-10-16 12:13:51 +08:00
2025-10-16 11:40:02 +08:00
2025-10-16 12:13:51 +08:00