@cloudflare/ai-search-snippet 0.0.32 → 0.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  var U = Object.defineProperty;
2
- var O = (n, i, e) => i in n ? U(n, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[i] = e;
3
- var a = (n, i, e) => O(n, typeof i != "symbol" ? i + "" : i, e);
2
+ var _ = (n, i, e) => i in n ? U(n, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[i] = e;
3
+ var a = (n, i, e) => _(n, typeof i != "symbol" ? i + "" : i, e);
4
4
  const g = [
5
5
  "Searching...",
6
6
  "Digging through results...",
@@ -36,7 +36,7 @@ function q(n) {
36
36
  function E(n) {
37
37
  return new DOMParser().parseFromString(n, "text/html").documentElement.textContent || "";
38
38
  }
39
- function _(n) {
39
+ function O(n) {
40
40
  const i = new Date(n), t = (/* @__PURE__ */ new Date()).getTime() - i.getTime();
41
41
  if (t < 6e4)
42
42
  return "Just now";
@@ -157,7 +157,7 @@ class K {
157
157
  ai_search_options: {
158
158
  retrieval: {
159
159
  metadata_only: !0,
160
- max_results: e.maxResults ?? 30
160
+ max_num_results: e.maxResults ?? 30
161
161
  }
162
162
  }
163
163
  },
@@ -196,7 +196,7 @@ class K {
196
196
  messages: [{ role: "user", content: i }],
197
197
  stream: !0,
198
198
  ...e.maxResults !== void 0 && {
199
- max_results: e.maxResults
199
+ max_num_results: e.maxResults
200
200
  }
201
201
  },
202
202
  "ai-search",
@@ -1270,7 +1270,7 @@ class N {
1270
1270
  ${e ? `<div class="chat-streaming"><span class="chat-streaming-dot"></span><span class="chat-streaming-dot"></span><span class="chat-streaming-dot"></span><span class="loading-text">${g[this.loadingMessageIndex]}</span></div>` : ""}
1271
1271
  </div>
1272
1272
  <div class="chat-message-metadata">
1273
- <span class="chat-message-time">${_(i.timestamp)}</span>
1273
+ <span class="chat-message-time">${O(i.timestamp)}</span>
1274
1274
  </div>
1275
1275
  </div>
1276
1276
  </div>