MCPcopy Create free account
hub / github.com/codeaashu/claude-code / onReject

Function onReject

src/hooks/toolPermission/handlers/interactiveHandler.ts:183–203  ·  view source on GitHub ↗
(feedback?: string, contentBlocks?: ContentBlockParam[])

Source from the content-addressed store, hash-verified

181 )
182 },
183 onReject(feedback?: string, contentBlocks?: ContentBlockParam[]) {
184 if (!claim()) return
185
186 if (bridgeCallbacks && bridgeRequestId) {
187 bridgeCallbacks.sendResponse(bridgeRequestId, {
188 behavior: 'deny',
189 message: feedback ?? 'User denied permission',
190 })
191 bridgeCallbacks.cancelRequest(bridgeRequestId)
192 }
193 channelUnsubscribe?.()
194
195 ctx.logDecision(
196 {
197 decision: 'reject',
198 source: { type: 'user_reject', hasFeedback: !!feedback },
199 },
200 { permissionPromptStartTimeMs },
201 )
202 resolveOnce(ctx.cancelAndAbort(feedback, undefined, contentBlocks))
203 },
204 async recheckPermission() {
205 if (isResolved()) return
206 const freshResult = await hasPermissionsToUseTool(

Callers

nothing calls this directly

Calls 2

claimFunction · 0.85
resolveOnceFunction · 0.50

Tested by

no test coverage detected