MCPcopy Create free account
hub / github.com/SillyTavern/Extension-WebSearch / probeSeleniumSearchPlugin

Function probeSeleniumSearchPlugin

index.js:1259–1276  ·  view source on GitHub ↗

* Probes the Selenium search plugin to check if it's available. * @returns {Promise } Whether the plugin is available

()

Source from the content-addressed store, hash-verified

1257 * @returns {Promise<boolean>} Whether the plugin is available
1258 */
1259async function probeSeleniumSearchPlugin() {
1260 try {
1261 const result = await fetch('/api/plugins/selenium/probe', {
1262 method: 'POST',
1263 headers: getRequestHeaders(),
1264 });
1265
1266 if (!result.ok) {
1267 console.debug('WebSearch: plugin probe failed', result.statusText);
1268 return false;
1269 }
1270
1271 return true;
1272 } catch (error) {
1273 console.error('WebSearch: plugin probe failed', error);
1274 return false;
1275 }
1276}
1277
1278/**
1279 *

Callers 1

isSearchAvailableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected