@posthog/ai 7.16.15 → 7.17.1

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,7 +1,6 @@
1
1
  'use strict';
2
2
 
3
3
  var uuid = require('uuid');
4
- require('@posthog/core');
5
4
 
6
5
  function _interopNamespace(e) {
7
6
  if (e && e.__esModule) return e;
@@ -23,8 +22,6 @@ function _interopNamespace(e) {
23
22
 
24
23
  var uuid__namespace = /*#__PURE__*/_interopNamespace(uuid);
25
24
 
26
- var version = "7.16.15";
27
-
28
25
  // Type guards for safer type checking
29
26
 
30
27
  const isString = value => {
@@ -164,6 +161,15 @@ const sanitizeLangChain = data => {
164
161
  return processMessages(data, sanitizeLangChainImage);
165
162
  };
166
163
 
164
+ const STRING_FORMAT = 'utf8';
165
+
166
+ // Reused across calls to avoid per-invocation allocation; truncate() runs
167
+ // hundreds of times for prompts with many parts.
168
+ new TextEncoder();
169
+ new TextDecoder(STRING_FORMAT, {
170
+ fatal: false
171
+ });
172
+
167
173
  /**
168
174
  * Safely converts content to a string, preserving structure for objects/arrays.
169
175
  * - If content is already a string, returns it as-is
@@ -669,6 +675,8 @@ var BaseCallbackHandler = class extends BaseCallbackHandlerMethodsClass {
669
675
  }
670
676
  };
671
677
 
678
+ var version = "7.17.1";
679
+
672
680
  /** A run may either be a Span or a Generation */
673
681
 
674
682
  /** Storage for run metadata */