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

Function format_created_docs_summary

agents/reading-agent/main.py:1323–1344  ·  view source on GitHub ↗

Format the reading-report completion message with direct document links.

(created_docs: List[Dict[str, Any]])

Source from the content-addressed store, hash-verified

1321 }
1322 return updated_profile, metadata
1323def format_created_docs_summary(created_docs: List[Dict[str, Any]]) -> str:
1324 """Format the reading-report completion message with direct document links."""
1325 lines = [
1326 "=" * 60,
1327 f"Reading reports ready ({len(created_docs)})",
1328 "=" * 60,
1329 "",
1330 ]
1331
1332 for index, doc in enumerate(created_docs, start=1):
1333 title = doc.get("paper", {}).get("title") or doc.get("title", "Unknown")
1334 lines.append(f"{index:02d}. {title[:60]}")
1335 if doc.get("tracking_url"):
1336 lines.append(f" {doc['tracking_url']}")
1337 elif doc.get("url"):
1338 lines.append(f" {doc['url']}")
1339 elif doc.get("doc_token"):
1340 lines.append(f" doc_token: {doc['doc_token']}")
1341 lines.append("")
1342
1343 lines.append("Open the links above to start reading.")
1344 return "\n".join(lines)
1345
1346
1347def _build_reused_doc_entry(

Callers 2

create_reading_reportFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected