search method
Searches both scopes (project first, then user).
Implementation
Future<List<MemoryEntry>> search(String query, {int limit = 10}) async {
await _refreshConfig();
final results = <MemoryEntry>[];
await projectStore; // ensure initialized
await _searchScope(_projectSearch, query, limit, 'project', results);
await userStore;
if (results.length < limit) {
await _searchScope(
_userSearch,
query,
limit - results.length,
'user',
results,
);
}
return results;
}