MCPcopy Create free account
hub / github.com/cortexkit/magic-context / closeRpc

Function closeRpc

packages/plugin/src/tui/data/context-db.ts:45–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43
44/** Clean up the RPC client. */
45export function closeRpc(): void {
46 // Closing invalidates any already-issued RPC calls; their callbacks must
47 // observe the new generation and abandon (the WS socket checks it too).
48 rpcGeneration += 1;
49 rpcClient?.reset();
50 rpcClient = null;
51}
52
53const EMPTY_SNAPSHOT: SidebarSnapshot = {
54 sessionId: "",

Callers 1

tuiFunction · 0.90

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected