Files
claude-code-v2.1.88/utils/permissions/PermissionResult.ts
T
2026-04-25 06:45:36 +09:00

36 lines
874 B
TypeScript

// Types extracted to src/types/permissions.ts to break import cycles
import type {
PermissionAllowDecision,
PermissionAskDecision,
PermissionDecision,
PermissionDecisionReason,
PermissionDenyDecision,
PermissionMetadata,
PermissionResult,
} from '../../types/permissions.js'
// Re-export for backwards compatibility
export type {
PermissionAllowDecision,
PermissionAskDecision,
PermissionDecision,
PermissionDecisionReason,
PermissionDenyDecision,
PermissionMetadata,
PermissionResult,
}
// Helper function to get the appropriate prose description for rule behavior
export function getRuleBehaviorDescription(
permissionResult: PermissionResult['behavior'],
): string {
switch (permissionResult) {
case 'allow':
return 'allowed'
case 'deny':
return 'denied'
default:
return 'asked for confirmation for'
}
}