@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,4 @@
1
1
  import * as uuid from 'uuid';
2
- import '@posthog/core';
3
-
4
- var version = "7.16.15";
5
2
 
6
3
  // Type guards for safer type checking
7
4
 
@@ -142,6 +139,15 @@ const sanitizeLangChain = data => {
142
139
  return processMessages(data, sanitizeLangChainImage);
143
140
  };
144
141
 
142
+ const STRING_FORMAT = 'utf8';
143
+
144
+ // Reused across calls to avoid per-invocation allocation; truncate() runs
145
+ // hundreds of times for prompts with many parts.
146
+ new TextEncoder();
147
+ new TextDecoder(STRING_FORMAT, {
148
+ fatal: false
149
+ });
150
+
145
151
  /**
146
152
  * Safely converts content to a string, preserving structure for objects/arrays.
147
153
  * - If content is already a string, returns it as-is
@@ -647,6 +653,8 @@ var BaseCallbackHandler = class extends BaseCallbackHandlerMethodsClass {
647
653
  }
648
654
  };
649
655
 
656
+ var version = "7.17.1";
657
+
650
658
  /** A run may either be a Span or a Generation */
651
659
 
652
660
  /** Storage for run metadata */