| 3 | import { useChatStore } from './chatStore'; |
| 4 | |
| 5 | interface WebSocketState { |
| 6 | ws: WebSocket | null; |
| 7 | connectionStatus: 'connecting' | 'connected' | 'disconnected'; |
| 8 | reconnectAttempts: number; |
| 9 | |
| 10 | // Actions |
| 11 | connect: (pipelineId: string) => void; |
| 12 | disconnect: () => void; |
| 13 | send: (data: any) => void; |
| 14 | } |
| 15 | |
| 16 | export const useWebSocketStore = create<WebSocketState>((set, get) => ({ |
| 17 | ws: null, |
nothing calls this directly
no outgoing calls
no test coverage detected