(candidate_ids: List[str])
| 3742 | "updated_at": None, |
| 3743 | } |
| 3744 | |
| 3745 | |
| 3746 | def daily_note_mentions(user_id: str, query: str = "", limit: int = 8) -> Dict[str, Any]: |
| 3747 | del user_id |
| 3748 | entries = _daily_note_reading_entries(scope="all", query=query, limit=limit) |
| 3749 | nodes = [] |
| 3750 | for entry in entries: |
| 3751 | node = _daily_note_reading_node(entry) |
| 3752 | nodes.append( |
| 3753 | { |
| 3754 | "node_id": node["node_id"], |
| 3755 | "node_type": "paper", |
| 3756 | "title": node["title"], |
| 3757 | "body": str(entry.get("summary") or "")[:500], |
| 3758 | "score": 1.0, |
| 3759 | "metadata": node["metadata"], |
| 3760 | } |
| 3761 | ) |
| 3762 | return {"nodes": nodes, "source": "daily_note_deep_reading"} |
| 3763 | |
| 3764 | |
| 3765 | def _parse_daily_note_topic_summaries(path: Path) -> Dict[str, Dict[str, Any]]: |
| 3766 | try: |
| 3767 | lines = path.read_text(encoding="utf-8").splitlines() |
| 3768 | except OSError: |
| 3769 | return {} |
| 3770 | summaries: Dict[str, Dict[str, Any]] = {} |
| 3771 | current_topic = "" |
no test coverage detected