MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / searchRemotely

Function searchRemotely

src/pages/plugins/plugins.js:369–384  ·  view source on GitHub ↗
(query)

Source from the content-addressed store, hash-verified

367 }
368
369 async function searchRemotely(query) {
370 if (!query) return [];
371 try {
372 const response = await fetch(
373 withSupportedEditor(`${config.API_BASE}/plugins?name=${query}`),
374 );
375 const plugins = await response.json();
376 // Map the plugins to Item elements and return
377 return plugins.map((plugin) => <Item {...plugin} />);
378 } catch (error) {
379 $list.all.setAttribute("empty-msg", strings["error"]);
380 window.log("error", "Failed to search remotely:");
381 window.log("error", error);
382 return [];
383 }
384 }
385
386 async function getFilteredPlugins(filterState, isInitial = false) {
387 if (!filterState) return;

Callers

nothing calls this directly

Calls 2

logMethod · 0.80
withSupportedEditorFunction · 0.50

Tested by

no test coverage detected