agent-hub-runtime 0.6.0

AgentHub desktop and companion CLI runtime for Tauri applications
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(() => {
  const text = __TEXT__,
    backwards = __BACKWARDS__;
  if (!text) return { found: false, count: 0 };
  const found = window.find(text, false, backwards, true);
  const content = (document.body?.innerText || "").toLowerCase(),
    needle = text.toLowerCase();
  let count = 0,
    start = 0;
  while (count < 10000) {
    const index = content.indexOf(needle, start);
    if (index < 0) break;
    count++;
    start = index + needle.length;
  }
  return { found, count: found ? Math.max(1, count) : count };
})();