(feedback?: string, contentBlocks?: ContentBlockParam[])
| 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( |
nothing calls this directly
no test coverage detected