()
| 1217 | } |
| 1218 | |
| 1219 | async function refreshWikiStats() { |
| 1220 | const userId = activeUser(); |
| 1221 | if (!userId) return; |
| 1222 | const data = await api(`/api/wiki/stats?user_id=${encodeURIComponent(userId)}`); |
| 1223 | $("wikiNodeStat").textContent = data.nodes || 0; |
| 1224 | $("wikiStats").textContent = |
| 1225 | `节点:${data.nodes || 0} | 关系:${data.edges || 0} | 引用:${data.citations || 0} | ${data.wiki_dir || ""}`; |
| 1226 | } |
| 1227 | |
| 1228 | async function searchWiki() { |
| 1229 | const userId = ensureUser(); |
no test coverage detected