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

Function searchWiki

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

Source from the content-addressed store, hash-verified

1226}
1227
1228async function searchWiki() {
1229 const userId = ensureUser();
1230 const q = $("wikiQuery").value || "";
1231 setStatus("检索知识库", true);
1232 const data = await api(`/api/wiki/search?user_id=${encodeURIComponent(userId)}&q=${encodeURIComponent(q)}`);
1233 renderWikiResults(data.nodes || []);
1234 setStatus("知识库检索完成");
1235}
1236
1237function renderWikiResults(nodes) {
1238 if (!nodes.length) {

Callers

nothing calls this directly

Calls 5

ensureUserFunction · 0.85
renderWikiResultsFunction · 0.85
$Function · 0.70
setStatusFunction · 0.70
apiFunction · 0.70

Tested by

no test coverage detected