mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
3a7272d03dc1388552067f8029a08e9bc8ee6bd4
Replace manual state management with TanStack Query (React Query) for more robust server state handling. This refactoring introduces: - New hooks for queries: useSessions, useSession, useMessages, useMachines - New hooks for mutations: useSendMessage, useSessionActions, useSpawnSession - Centralized query client with optimized configuration (5s staleTime, disabled window focus refetch) - Query key factory for consistent cache invalidation - Improved message synchronization via socket events with cache updates - Optimistic updates for message sending with retry capability - Simplified App.tsx by removing manual state management logic - Integrated React Query devtools in development mode This enables automatic cache management, better error handling, and a foundation for more sophisticated data fetching patterns.
hapi
Monorepo with three Bun workspace packages:
cli/(hapi): CLI (npm package) exposinghapi/hapi-mcpserver/(hapi-server): backend API + Telegram bot server, servesweb/dist/web/(hapi-web): web frontend (Vite) building toweb/dist/
Commands
Run from the repo root:
bun install
bun run typecheck
bun run build
Languages
TypeScript
99.5%
CSS
0.2%
JavaScript
0.2%
HTML
0.1%