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

Function readPdfDirect

deployments/desktop/static/app.js:1115–1133  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1113}
1114
1115async function readPdfDirect() {
1116 const userId = ensureUser();
1117 const pdfPath = $("directPdfPath").value.trim();
1118 if (!pdfPath) throw new Error("请输入 PDF 路径。");
1119 setStatus("生成 PDF 精读报告", true);
1120 const data = await api("/api/read/pdf", {
1121 method: "POST",
1122 body: JSON.stringify({
1123 user_id: userId,
1124 pdf_path: pdfPath,
1125 title: $("directPdfTitle").value.trim(),
1126 write_feishu: isChecked("directPdfWriteFeishu"),
1127 }),
1128 });
1129 $("directReportResults").classList.remove("hidden");
1130 renderReportList("directReportList", data);
1131 await Promise.allSettled([refreshDashboard(), refreshWikiStats()]);
1132 setStatus("精读报告已生成");
1133}
1134
1135async function refreshDashboard() {
1136 const userId = activeUser();

Callers

nothing calls this directly

Calls 8

ensureUserFunction · 0.85
isCheckedFunction · 0.85
refreshDashboardFunction · 0.85
refreshWikiStatsFunction · 0.85
$Function · 0.70
setStatusFunction · 0.70
apiFunction · 0.70
renderReportListFunction · 0.70

Tested by

no test coverage detected