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

Function buildYoloRejectionMessage

src/utils/messages.ts:267–282  ·  view source on GitHub ↗
(reason: string)

Source from the content-addressed store, hash-verified

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

Callers 1

hasPermissionsToUseToolFunction · 0.85

Calls 1

featureFunction · 0.85

Tested by

no test coverage detected