isSessionMemoryEmpty function

Future<bool> isSessionMemoryEmpty(
  1. String content,
  2. Future<String> loadTemplate()
)

Check if the session memory content is essentially empty (matches template).

Implementation

Future<bool> isSessionMemoryEmpty(
  String content,
  Future<String> Function() loadTemplate,
) async {
  final template = await loadTemplate();
  return content.trim() == template.trim();
}