MCPcopy
hub / github.com/claude-code-best/claude-code / isMemoryFileAccess

Function isMemoryFileAccess

src/utils/sessionFileAccessHooks.ts:123–141  ·  view source on GitHub ↗
(
  toolName: string,
  toolInput: unknown,
)

Source from the content-addressed store, hash-verified

121 * Uses the same conditions as the PostToolUse session file access hooks.
122 */
123export function isMemoryFileAccess(
124 toolName: string,
125 toolInput: unknown,
126): boolean {
127 if (getSessionFileTypeFromInput(toolName, toolInput) === 'session_memory') {
128 return true
129 }
130
131 const filePath = getFilePathFromInput(toolName, toolInput)
132 if (
133 filePath &&
134 (isAutoMemFile(filePath) ||
135 (feature('TEAMMEM') && teamMemPaths!.isTeamMemFile(filePath)))
136 ) {
137 return true
138 }
139
140 return false
141}
142
143/**
144 * PostToolUse callback to log session file access events.

Callers 1

Calls 3

getFilePathFromInputFunction · 0.85
isAutoMemFileFunction · 0.85

Tested by

no test coverage detected