(user_profile: Optional[Dict[str, Any]])
| 2368 | |
| 2369 | def _daily_note_profile_payload(user_profile: Optional[Dict[str, Any]]) -> Dict[str, Any]: |
| 2370 | profile = user_profile if isinstance(user_profile, dict) else {} |
| 2371 | must_read = profile.get("must_read") or {} |
| 2372 | must_read_keywords = must_read.get("keywords") if isinstance(must_read, dict) else [] |
| 2373 | return { |
| 2374 | "core_directions": profile.get("core_directions") or {}, |
| 2375 | "topic_weights": profile.get("topic_weights") or {}, |
| 2376 | "methodology_preferences": profile.get("methodology_preferences") or {}, |
| 2377 | "must_read_keywords": must_read_keywords or [], |
| 2378 | } |
| 2379 | |
| 2380 | |
| 2381 | def _daily_note_topic_summary( |
| 2382 | category: str, |
no test coverage detected