isTeamMemoryWriteOrEdit function

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

Check if a Write or Edit tool use targets a team memory file.

Implementation

bool isTeamMemoryWriteOrEdit(String toolName, Map<String, dynamic>? toolInput) {
  if (toolName != 'FileWrite' && toolName != 'FileEdit') return false;
  if (toolInput == null) return false;
  final filePath =
      (toolInput['file_path'] as String?) ?? (toolInput['path'] as String?);
  return filePath != null && isTeamMemFile(filePath);
}