feat: expand MCP server functionality with customer, catalogue, marketing, and user tools and integrate new health indicators and configuration models.

This commit is contained in:
2026-08-11 16:31:52 +07:00
parent 9a26c6ce2d
commit 8ecd27dd0e
188 changed files with 5672 additions and 983 deletions

View File

@@ -65,12 +65,16 @@ class StompService {
onWebSocketClose: () => {
console.warn('[StompService] WebSocket connection closed')
useConnectionStore.getState().setStatus('disconnected')
this.scheduleReconnect()
if (this.client) {
this.scheduleReconnect()
}
},
onStompError: (frame) => {
console.error('[StompService] STOMP error frame received:', frame.headers['message'])
useConnectionStore.getState().setStatus('error')
this.scheduleReconnect()
if (this.client) {
this.scheduleReconnect()
}
},
onWebSocketError: (event) => {
console.error('[StompService] WebSocket error:', event)
@@ -105,13 +109,18 @@ class StompService {
this.reconnectAttempt++
console.log(`[StompService] Scheduling reconnect attempt #${this.reconnectAttempt} in ${delay}ms`)
this.reconnectTimeoutId = setTimeout(() => {
this.reconnectTimeoutId = setTimeout(async () => {
this.reconnectTimeoutId = null
if (this.client) {
this.client.activate()
} else {
this.connect()
const oldClient = this.client
this.client = null // Clear reference to prevent loops in onWebSocketClose
try {
await oldClient.deactivate()
} catch (e) {
console.error('[StompService] Error deactivating old client:', e)
}
}
this.connect()
}, delay)
}