Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
TypeScript aiai-agentsai-memoryanthropicartificial-intelligencechromadbclaudeclaude-agent-sdkclaude-agentsclaude-codeclaude-code-pluginclaude-skillsembeddingslong-term-memorymem0memory-engineopenmemoryragsqlitesupermemory
/**
* The viewer's one search rule, for "Find in loaded memories", "Find in this session", "Find a session" and "Find in
* logs": true when every word of the query is somewhere in the text, in any case. An empty query matches everything.
*/
export function hasEveryWord(text: string, query: string): boolean {
const words = query.toLowerCase().split(/\s+/).filter(Boolean);
if (!words.length) return true;
const haystack = text.toLowerCase();
return words.every(word => haystack.includes(word));
}