MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _daily_note_sort_key

Function _daily_note_sort_key

deployments/desktop/shared/agents.py:3308–3328  ·  view source on GitHub ↗
(path: Path)

Source from the content-addressed store, hash-verified

3306 for node in nodes:
3307 node_type = str(node.get("node_type") or "node")
3308 by_type[node_type] = by_type.get(node_type, 0) + 1
3309 updated_at = node.get("updated_at")
3310 if updated_at and (latest is None or str(updated_at) > str(latest)):
3311 latest = updated_at
3312
3313 visible_ids = {str(node.get("node_id") or "") for node in nodes if node.get("node_id")}
3314 edge_count = 0
3315 citation_count = 0
3316 if visible_ids:
3317 conn = db_ops.get_connection()
3318 placeholders = ",".join("?" for _ in visible_ids)
3319 edge_count = int(
3320 conn.execute(
3321 f"""
3322 SELECT COUNT(*) AS count
3323 FROM wiki_edges
3324 WHERE user_id = ?
3325 AND src_id IN ({placeholders})
3326 AND dst_id IN ({placeholders})
3327 """,
3328 [user_id, *visible_ids, *visible_ids],
3329 ).fetchone()["count"]
3330 or 0
3331 )

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected