(sessionId)
| 4416 | if (options.renderRelations !== false) { |
| 4417 | renderWikiRelations(state.currentWikiNodeId); |
| 4418 | if (state.wikiView === "graph") renderWikiGraph(); |
| 4419 | } |
| 4420 | } |
| 4421 | |
| 4422 | function setWikiView(view) { |
| 4423 | state.wikiView = view; |
| 4424 | document.querySelectorAll("[data-wiki-view]").forEach((button) => { |
| 4425 | button.classList.toggle("active", button.dataset.wikiView === view); |
| 4426 | }); |
| 4427 | if (view === "list") { |
| 4428 | renderWikiList(); |
| 4429 | } else { |
| 4430 | renderWikiGraph(); |
| 4431 | } |
| 4432 | } |
| 4433 | |
| 4434 | function wikiEvidenceMeta(node) { |
| 4435 | const type = node.node_type || node.type ? graphTypeLabel(node) : "node"; |
| 4436 | const score = node.score !== undefined ? `${normalizeScore(node.score)}%` : ""; |
| 4437 | const source = localizeWikiText(node.source || node.paper_title || node.file_path || ""); |
| 4438 | return [type, score, source].filter(Boolean).slice(0, 3); |
| 4439 | } |
| 4440 | |
| 4441 | function setWikiMapFocus(nodeId = "architecture:core") { |
| 4442 | const focus = state.wikiMap?.byId?.[nodeId] || state.wikiMap?.nodes?.[0]; |
| 4443 | if (!focus) { |
no test coverage detected