MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / buildYoloRejectionMessage

Function buildYoloRejectionMessage

source code/utils/messages.ts:269–284  ·  view source on GitHub ↗
(reason: string)

Source from the content-addressed store, hash-verified

267 * @param reason - The classifier's reason for denying the action
268 */
269export function buildYoloRejectionMessage(reason: string): string {
270 const prefix = AUTO_MODE_REJECTION_PREFIX
271
272 const ruleHint = feature('BASH_CLASSIFIER')
273 ? `To allow this type of action in the future, the user can add a permission rule like ` +
274 `Bash(prompt: <description of allowed action>) to their settings. ` +
275 `At the end of your session, recommend what permission rules to add so you don't get blocked again.`
276 : `To allow this type of action in the future, the user can add a Bash permission rule to their settings.`
277
278 return (
279 `${prefix}${reason}. ` +
280 `If you have other tasks that don't depend on this action, continue working on those. ` +
281 `${DENIAL_WORKAROUND_GUIDANCE} ` +
282 ruleHint
283 )
284}
285
286/**
287 * Build a message for when the auto mode classifier is temporarily unavailable.

Callers 1

hasPermissionsToUseToolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected