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

Callers 2

create_reading_reportFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected