isMemoryFileAccess function

bool isMemoryFileAccess(
  1. String toolName,
  2. Map<String, dynamic>? toolInput
)

Check if a tool use constitutes a memory file access.

Implementation

bool isMemoryFileAccess(String toolName, Map<String, dynamic>? toolInput) {
  if (getSessionFileTypeFromInput(toolName, toolInput) == 'session_memory') {
    return true;
  }
  final filePath = getFilePathFromInput(toolName, toolInput);
  if (filePath != null && isAutoMemFile(filePath)) return true;
  return false;
}