personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Style: apply consistent formatting across importer modules

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+16 -13
+1 -3
tests/test_gemini_importer.py
··· 138 138 with tempfile.TemporaryDirectory() as tmpdir: 139 139 activity_dir = Path(tmpdir) / "My Activity" / "Gemini Apps" 140 140 activity_dir.mkdir(parents=True) 141 - (activity_dir / "MyActivity.json").write_text( 142 - json.dumps([_sample_activity()]) 143 - ) 141 + (activity_dir / "MyActivity.json").write_text(json.dumps([_sample_activity()])) 144 142 assert importer.detect(Path(tmpdir)) is True 145 143 146 144
-1
tests/test_import_dedup.py
··· 17 17 write_structured_import, 18 18 ) 19 19 20 - 21 20 # --- hash_source tests --- 22 21 23 22
+1 -3
tests/test_import_formatting.py
··· 280 280 "title": "Lunch with Alice", 281 281 "content": "", 282 282 } 283 - jsonl_path.write_text( 284 - json.dumps(header) + "\n" + json.dumps(entry) + "\n" 285 - ) 283 + jsonl_path.write_text(json.dumps(header) + "\n" + json.dumps(entry) + "\n") 286 284 287 285 chunks, meta = format_file(str(jsonl_path)) 288 286 assert len(chunks) == 1
+5 -1
think/formatters.py
··· 141 141 "facets/*/todos/*.jsonl": ("apps.todos.todo", "format_todos", True), 142 142 "facets/*/logs/*.jsonl": ("think.facets", "format_logs", True), 143 143 # Structured file imports (indexed) 144 - "*/import.*/imported.jsonl": ("think.importers.formatting", "format_imported", True), 144 + "*/import.*/imported.jsonl": ( 145 + "think.importers.formatting", 146 + "format_imported", 147 + True, 148 + ), 145 149 # Raw transcripts — formattable but not indexed (agent outputs are more useful) 146 150 # Layout: day/stream/segment/audio.jsonl 147 151 "*/*/*/audio.jsonl": ("observe.hear", "format_audio", False),
+3 -1
think/importers/cli.py
··· 660 660 { 661 661 os.path.basename(os.path.dirname(os.path.dirname(f))) 662 662 for f in result.files_created 663 - if os.path.basename(os.path.dirname(os.path.dirname(f))).isdigit() 663 + if os.path.basename( 664 + os.path.dirname(os.path.dirname(f)) 665 + ).isdigit() 664 666 } 665 667 ) 666 668 if days_affected:
+5 -1
think/importers/formatting.py
··· 107 107 108 108 attendees = entry.get("attendees", []) 109 109 if attendees: 110 - names = [a.get("name") or a.get("email", "") for a in attendees if isinstance(a, dict)] 110 + names = [ 111 + a.get("name") or a.get("email", "") 112 + for a in attendees 113 + if isinstance(a, dict) 114 + ] 111 115 if not names: 112 116 names = [str(a) for a in attendees] 113 117 if names:
+1 -3
think/importers/shared.py
··· 344 344 return manifest_path 345 345 346 346 347 - def find_manifest_by_hash( 348 - journal_root: Path, source_hash: str 349 - ) -> dict | None: 347 + def find_manifest_by_hash(journal_root: Path, source_hash: str) -> dict | None: 350 348 """Search existing import manifests for a matching source hash. 351 349 352 350 Returns the manifest dict if found, None otherwise.