@posthog/ai 8.11.0 → 8.11.2

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.mjs CHANGED
@@ -252,7 +252,11 @@ function toContentString(content) {
252
252
  if (content !== void 0 && content !== null && typeof content === "object") try {
253
253
  return JSON.stringify(content);
254
254
  } catch {
255
- return String(content);
255
+ try {
256
+ return String(content);
257
+ } catch {
258
+ return "";
259
+ }
256
260
  }
257
261
  return String(content);
258
262
  }
@@ -391,7 +395,7 @@ function sanitizeValues(obj) {
391
395
  }
392
396
  //#endregion
393
397
  //#region package.json
394
- var version = "8.11.0";
398
+ var version = "8.11.2";
395
399
  //#endregion
396
400
  //#region src/serializeError.ts
397
401
  const DEFAULT_MAX_DEPTH = 3;
@@ -671,7 +675,7 @@ const mapVercelOutput = (result, client) => {
671
675
  id: item.toolCallId,
672
676
  function: {
673
677
  name: item.toolName,
674
- arguments: typeof rawArgs === "string" ? rawArgs : JSON.stringify(rawArgs)
678
+ arguments: toContentString(rawArgs)
675
679
  }
676
680
  };
677
681
  }