isSessionMemoryEmpty function
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();
}