feat(mem0-plugin): improve auto-triggering — pre-fetch, dedup, skill enforcement v0.2.3 (#5237)
This commit is contained in:
@@ -158,6 +158,7 @@ def main() -> None:
|
||||
|
||||
hashes = load_hashes()
|
||||
updated = False
|
||||
seen_content_hashes: set[str] = set()
|
||||
|
||||
for filename in TARGET_FILES:
|
||||
filepath = ""
|
||||
@@ -187,6 +188,11 @@ def main() -> None:
|
||||
log.debug("Cannot hash %s: %s", filename, e)
|
||||
continue
|
||||
|
||||
if current_hash in seen_content_hashes:
|
||||
log.debug("Duplicate content, skipping: %s (same as earlier file)", filename)
|
||||
continue
|
||||
seen_content_hashes.add(current_hash)
|
||||
|
||||
hash_key = f"{project_id}:{filename}"
|
||||
if hashes.get(hash_key) == current_hash:
|
||||
log.debug("Unchanged, skipping: %s", filename)
|
||||
|
||||
Reference in New Issue
Block a user