@bbearai/core 0.2.13 → 0.2.15

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/index.js CHANGED
@@ -173,7 +173,7 @@ var ContextCaptureManager = class {
173
173
  });
174
174
  }
175
175
  captureFetch() {
176
- if (typeof window === "undefined" || typeof fetch === "undefined") return;
176
+ if (typeof window === "undefined" || typeof fetch === "undefined" || typeof document === "undefined") return;
177
177
  this.originalFetch = window.fetch;
178
178
  const self = this;
179
179
  window.fetch = async function(input, init) {
@@ -1303,6 +1303,7 @@ var BugBearClient = class {
1303
1303
  return false;
1304
1304
  }
1305
1305
  await this.supabase.from("discussion_threads").update({ last_message_at: (/* @__PURE__ */ new Date()).toISOString() }).eq("id", threadId);
1306
+ await this.markThreadAsRead(threadId);
1306
1307
  return true;
1307
1308
  } catch (err) {
1308
1309
  console.error("BugBear: Error sending message", err);
package/dist/index.mjs CHANGED
@@ -144,7 +144,7 @@ var ContextCaptureManager = class {
144
144
  });
145
145
  }
146
146
  captureFetch() {
147
- if (typeof window === "undefined" || typeof fetch === "undefined") return;
147
+ if (typeof window === "undefined" || typeof fetch === "undefined" || typeof document === "undefined") return;
148
148
  this.originalFetch = window.fetch;
149
149
  const self = this;
150
150
  window.fetch = async function(input, init) {
@@ -1274,6 +1274,7 @@ var BugBearClient = class {
1274
1274
  return false;
1275
1275
  }
1276
1276
  await this.supabase.from("discussion_threads").update({ last_message_at: (/* @__PURE__ */ new Date()).toISOString() }).eq("id", threadId);
1277
+ await this.markThreadAsRead(threadId);
1277
1278
  return true;
1278
1279
  } catch (err) {
1279
1280
  console.error("BugBear: Error sending message", err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbearai/core",
3
- "version": "0.2.13",
3
+ "version": "0.2.15",
4
4
  "description": "Core utilities and types for BugBear QA platform",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",