@posthog/ai 7.17.0 → 7.17.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.
@@ -139,6 +139,15 @@ const sanitizeLangChain = data => {
139
139
  return processMessages(data, sanitizeLangChainImage);
140
140
  };
141
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
+
142
151
  /**
143
152
  * Safely converts content to a string, preserving structure for objects/arrays.
144
153
  * - If content is already a string, returns it as-is
@@ -644,7 +653,7 @@ var BaseCallbackHandler = class extends BaseCallbackHandlerMethodsClass {
644
653
  }
645
654
  };
646
655
 
647
- var version = "7.17.0";
656
+ var version = "7.17.2";
648
657
 
649
658
  /** A run may either be a Span or a Generation */
650
659