feat: enrich summaries with contacts and Obsidian links

This commit is contained in:
Benature
2026-11-06 00:04:11 +08:00
parent 41d71f83cb
commit c450206aef
7 changed files with 370 additions and 9 deletions

View File

@ -56,6 +56,7 @@ def sync_all_chats_for_day(
batch_size: int = 50,
start_ts: int | None = None,
end_ts: int | None = None,
chat_ids: list[str] | None = None,
) -> dict[str, int]:
"""Save one natural day from every visible INBOX chat; never print content."""
if not 1 <= batch_size <= 200:
@ -68,6 +69,9 @@ def sync_all_chats_for_day(
end_ts = int(end.timestamp())
own_id = str(getattr(client.auth, "user_id", "") or "")
chats = list(_feed_chats(client, page_size=50))
if chat_ids:
requested = {str(chat_id) for chat_id in chat_ids}
chats = [chat for chat in chats if str(chat.get("id") or "") in requested]
stats = {
"chats": len(chats),
"scanned": 0,