Function
subscribe
(channels: ("progress" | "control" | "monitor")[], filter?: { agentId?: string; eventTypes?: string[] })
Source from the content-addressed store, hash-verified
| 232 | |
| 233 | // 订阅事件 |
| 234 | const subscribe = (channels: ("progress" | "control" | "monitor")[], filter?: { agentId?: string; eventTypes?: string[] }) => { |
| 235 | if (!subscriptionManager.value) { |
| 236 | throw new Error("WebSocket not initialized"); |
| 237 | } |
| 238 | return subscriptionManager.value.subscribe(channels, filter); |
| 239 | }; |
| 240 | |
| 241 | // 断开连接 |
| 242 | const disconnect = () => { |
Tested by
no test coverage detected