MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / add

Method add

src/services/compact/session_memory_compact.py:337–346  ·  view source on GitHub ↗
(self, fact: str, source: str = "conversation")

Source from the content-addressed store, hash-verified

335 self._entries: list[SessionMemoryEntry] = []
336
337 def add(self, fact: str, source: str = "conversation") -> None:
338 import time
339 for entry in self._entries:
340 if entry.fact.lower().strip() == fact.lower().strip():
341 return
342 self._entries.append(SessionMemoryEntry(
343 fact=fact,
344 source=source,
345 timestamp=time.time(),
346 ))
347
348 def add_from_llm_response(self, response_text: str) -> int:
349 added = 0

Callers 15

add_from_llm_responseMethod · 0.95
test_addMethod · 0.95
test_dedupMethod · 0.95
test_add_differentMethod · 0.95
test_format_memoryMethod · 0.95
test_clearMethod · 0.95
collect_config_warningsFunction · 0.45
build_resume_entriesFunction · 0.45
_fix_orphaned_tool_usesFunction · 0.45

Calls 2

SessionMemoryEntryClass · 0.85
appendMethod · 0.45

Tested by 7

test_addMethod · 0.76
test_dedupMethod · 0.76
test_add_differentMethod · 0.76
test_format_memoryMethod · 0.76
test_clearMethod · 0.76