(content: str)
| 2487 | |
| 2488 | def _loads_daily_note_classification_json(content: str) -> Dict[str, Any]: |
| 2489 | try: |
| 2490 | parsed = json.loads(content) |
| 2491 | return parsed if isinstance(parsed, dict) else {} |
| 2492 | except json.JSONDecodeError: |
| 2493 | pass |
| 2494 | |
| 2495 | repaired = str(content or "") |
| 2496 | repaired = re.sub(r",\s*([}\]])", r"\1", repaired) |
| 2497 | repaired = re.sub(r"}\s*(?={)", "},", repaired) |
| 2498 | repaired = re.sub(r"}\s*\n\s*(?={)", "},\n", repaired) |
| 2499 | parsed = json.loads(repaired) |
| 2500 | return parsed if isinstance(parsed, dict) else {} |
| 2501 | |
| 2502 | |
| 2503 | def _llm_daily_note_category_assignments( |
| 2504 | blocks: List[Dict[str, str]], |
no outgoing calls
no test coverage detected