MCPcopy
hub / github.com/codeaashu/claude-code / shouldSkipHookDueToTrust

Function shouldSkipHookDueToTrust

src/utils/hooks.ts:286–296  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

284 * @returns true if hook should be skipped, false if it should execute
285 */
286export function shouldSkipHookDueToTrust(): boolean {
287 // In non-interactive mode (SDK), trust is implicit - always execute
288 const isInteractive = !getIsNonInteractiveSession()
289 if (!isInteractive) {
290 return false
291 }
292
293 // In interactive mode, ALL hooks require trust
294 const hasTrust = checkHasTrustDialogAccepted()
295 return !hasTrust
296}
297
298/**
299 * Creates the base hook input that's common to all hook types

Callers 4

executeHooksFunction · 0.85
executeHooksOutsideREPLFunction · 0.85
executeStatusLineCommandFunction · 0.85

Calls 2

Tested by

no test coverage detected