bunnyquery 1.10.4 → 1.10.6

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.
package/dist/engine.mjs CHANGED
@@ -3641,6 +3641,7 @@ var WORKER_PASS_ADOPT_LIMIT = 20;
3641
3641
  var LIVE_INDEX_SNAPSHOT_MAX_AGE_MS = 5e3;
3642
3642
  var INDEX_DISPATCH_CLAIM_MS = 2 * 60 * 1e3;
3643
3643
  var WORKER_PASS_ADOPT_ATTEMPTS = [0, 2e3, 6e3];
3644
+ var RECENT_INDEX_PASS_EVIDENCE_MS = 10 * 60 * 1e3;
3644
3645
  var EARLY_PROBE_SCHEDULE_MS = [400, 900, 1700];
3645
3646
  var INDEXING_DRAIN_BUSY_POLL_MS = 8e3;
3646
3647
  var INDEXING_DRAIN_CONFIRM_POLL_MS = 3e3;
@@ -6833,7 +6834,16 @@ var ChatSession = class {
6833
6834
  this.historyItemPolls.forEach(function(h) {
6834
6835
  if (h && h.kind === "bg") found = true;
6835
6836
  });
6836
- return found;
6837
+ if (found) return true;
6838
+ var cutoff = Date.now() - RECENT_INDEX_PASS_EVIDENCE_MS;
6839
+ var msgs = this.state.messages;
6840
+ for (var mi = msgs.length - 1; mi >= 0; mi--) {
6841
+ var m = msgs[mi];
6842
+ if (!m || !m._indexFile) continue;
6843
+ if (typeof m._ts !== "number") continue;
6844
+ if (m._ts >= cutoff) return true;
6845
+ }
6846
+ return false;
6837
6847
  }
6838
6848
  /** Any of these ids still queued or still polled, i.e. surviving work. */
6839
6849
  _isTrackingAny(ids) {