MCPcopy Index your code
hub / github.com/codeaashu/claude-code / useIdeLogging

Function useIdeLogging

src/hooks/useIdeLogging.ts:18–41  ·  view source on GitHub ↗
(mcpClients: MCPServerConnection[])

Source from the content-addressed store, hash-verified

16)
17
18export function useIdeLogging(mcpClients: MCPServerConnection[]): void {
19 useEffect(() => {
20 // Skip if there are no clients
21 if (!mcpClients.length) {
22 return
23 }
24
25 // Find the IDE client from the MCP clients list
26 const ideClient = getConnectedIdeClient(mcpClients)
27 if (ideClient) {
28 // Register the log event handler
29 ideClient.client.setNotificationHandler(
30 LogEventSchema(),
31 notification => {
32 const { eventName, eventData } = notification.params
33 logEvent(
34 `tengu_ide_${eventName}`,
35 eventData as { [key: string]: boolean | number | undefined },
36 )
37 },
38 )
39 }
40 }, [mcpClients])
41}
42

Callers 1

REPLFunction · 0.85

Calls 2

getConnectedIdeClientFunction · 0.85
logEventFunction · 0.85

Tested by

no test coverage detected