MCPcopy
hub / github.com/xintaofei/codeg / subscribe

Function subscribe

src/lib/platform.ts:30–35  ·  view source on GitHub ↗
(
  event: string,
  handler: (payload: T) => void
)

Source from the content-addressed store, hash-verified

28 * Uses Tauri listen() in desktop mode, WebSocket in web mode.
29 */
30export async function subscribe<T>(
31 event: string,
32 handler: (payload: T) => void
33): Promise<UnsubscribeFn> {
34 return getTransport().subscribe(event, handler)
35}
36
37/**
38 * Register a callback to fire after a WebSocket transport reconnects.

Callers 7

GitLogTabFunction · 0.90
BranchDropdownFunction · 0.90
ConflictDialogFunction · 0.90
ChannelListTabFunction · 0.90
RunHistoryFunction · 0.90
AcpConnectionsProviderFunction · 0.90
AutomationsViewProviderFunction · 0.90

Calls 2

getTransportFunction · 0.90
subscribeMethod · 0.65

Tested by

no test coverage detected