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

Function topicBody

deployments/desktop/static/desktop.js:3463–3484  ·  view source on GitHub ↗
(entry, relatedPapers)

Source from the content-addressed store, hash-verified

3461 }
3462
3463 function topicBody(entry, relatedPapers) {
3464 const label = localizeWikiText(entry.label);
3465 const papers = relatedPapers.map((paper) => `- ${graphTitle(paper)}`).join("\n") || (state.locale === "en" ? "- No direct paper evidence yet" : "- 暂无直接论文证据");
3466 if (state.locale === "en") {
3467 return [
3468 `## ${label}`,
3469 `This theme is extracted from ${entry.nodeIds.size} Wiki entries; it is not a fixed template node.`,
3470 "## Related Evidence",
3471 papers,
3472 "## Why It Helps",
3473 "It helps users quickly understand the current research center of gravity and jump into papers, sections, and reading reports."
3474 ].join("\n");
3475 }
3476 return [
3477 `## ${label}`,
3478 `这是从 ${entry.nodeIds.size} 个 Wiki 条目中抽取出的知识库主题,不是固定模板节点。`,
3479 "## 关联证据",
3480 papers,
3481 "## 展示意义",
3482 "用于帮助用户快速理解当前知识库的研究重心,并继续跳转到论文、章节和精读报告。"
3483 ].join("\n");
3484 }
3485
3486 function userDirectionBody(userNodes, topPapers, entries) {
3487 const signals = userNodes.flatMap((node) => String(node.keywords || "").split(/[,\s]+/)).filter(Boolean).map(localizeWikiText).slice(0, 8);

Callers 1

buildWikiMapFunction · 0.85

Calls 2

localizeWikiTextFunction · 0.85
graphTitleFunction · 0.85

Tested by

no test coverage detected