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

Function userDirectionBody

deployments/desktop/static/desktop.js:3486–3508  ·  view source on GitHub ↗
(userNodes, topPapers, entries)

Source from the content-addressed store, hash-verified

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);
3488 const joiner = state.locale === "en" ? ", " : "、";
3489 const papers = topPapers.slice(0, 3).map((paper) => `- ${graphTitle(paper)}`).join("\n") || (state.locale === "en" ? "- No deep-reading records yet" : "- 暂无精读记录");
3490 if (state.locale === "en") {
3491 return [
3492 "## User Direction",
3493 "This summarizes user feedback, deep-reading records, profile nodes, and interest drift to explain why these themes are centered in the graph.",
3494 "## Current Signals",
3495 signals.length ? signals.join(joiner) : entries.slice(0, 4).map((entry) => localizeWikiText(entry.label)).join(joiner) || "No stable signals yet",
3496 "## Recent Evidence",
3497 papers
3498 ].join("\n");
3499 }
3500 return [
3501 "## 用户方向",
3502 "这里汇总用户反馈、精读记录、画像节点和兴趣漂移,用来解释为什么这些主题被放在图谱中心。",
3503 "## 当前信号",
3504 signals.length ? signals.join("、") : entries.slice(0, 4).map((entry) => localizeWikiText(entry.label)).join("、") || "暂无稳定信号",
3505 "## 最近证据",
3506 papers
3507 ].join("\n");
3508 }
3509
3510 function buildWikiMap(nodes, edges) {
3511 const sourceNodes = (nodes || []).filter((node) => graphId(node).trim());

Callers 1

buildWikiMapFunction · 0.85

Calls 2

graphTitleFunction · 0.85
localizeWikiTextFunction · 0.85

Tested by

no test coverage detected