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

Function handlePermissionResponse

src/hooks/useReplBridge.tsx:372–386  ·  view source on GitHub ↗
(msg_0: SDKControlResponse)

Source from the content-addressed store, hash-verified

370
371 // Dispatch incoming control_response messages to registered handlers
372 function handlePermissionResponse(msg_0: SDKControlResponse): void {
373 const requestId = msg_0.response?.request_id;
374 if (!requestId) return;
375 const handler = pendingPermissionHandlers.get(requestId);
376 if (!handler) {
377 logForDebugging(`[bridge:repl] No handler for control_response request_id=${requestId}`);
378 return;
379 }
380 pendingPermissionHandlers.delete(requestId);
381 // Extract the permission decision from the control_response payload
382 const inner = msg_0.response;
383 if (inner.subtype === 'success' && inner.response && isBridgePermissionResponse(inner.response)) {
384 handler(inner.response);
385 }
386 }
387 const handle_0 = await initReplBridge({
388 outboundOnly,
389 tags: outboundOnly ? ['ccr-mirror'] : undefined,

Callers

nothing calls this directly

Calls 5

logForDebuggingFunction · 0.85
getMethod · 0.65
deleteMethod · 0.65
handlerFunction · 0.50

Tested by

no test coverage detected