list method

Future<List<MemoryEntry>> list({
  1. int limit = 20,
})

Lists recent entries from both scopes (project first, then user).

Implementation

Future<List<MemoryEntry>> list({int limit = 20}) async {
  await _refreshConfig();
  final results = <MemoryEntry>[];
  await projectStore;
  await _listScope(_projectStorage, 'project', limit, results);
  if (results.length < limit) {
    await userStore;
    await _listScope(_userStorage, 'user', limit - results.length, results);
  }
  return results;
}