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

Function _preview_payload

deployments/desktop/shared/agents.py:324–339  ·  view source on GitHub ↗
(task: Dict[str, Any])

Source from the content-addressed store, hash-verified

322 ).strip().casefold()
323
324
325def _preview_payload(task: Dict[str, Any]) -> Optional[Dict[str, Any]]:
326 items = list(task.get("preview_items") or [])
327 if not items:
328 return None
329 return {
330 "push_id": task.get("task_id"),
331 "push_time": task.get("started_at") or task.get("created_at"),
332 "papers": [_paper_card(paper, index) for index, paper in enumerate(items, start=1)],
333 "metadata": {
334 "preview": True,
335 "phase": task.get("progress_phase") or task.get("status"),
336 "fetched_count": int(task.get("fetched_count") or 0),
337 "ranked_count": int(task.get("ranked_count") or 0),
338 "total_fetched": int(task.get("fetched_count") or len(items)),
339 },
340 }
341
342

Callers 1

_daily_task_payloadFunction · 0.85

Calls 2

_paper_cardFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected