MCPcopy Create free account
hub / github.com/Noumena-Network/code / buildYoloRejectionMessage

Function buildYoloRejectionMessage

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

Source from the content-addressed store, hash-verified

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