ttp-agent-sdk 2.5.2 → 2.5.3

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.
@@ -359,12 +359,19 @@
359
359
 
360
360
  <!-- Load SDK -->
361
361
  <script type="module">
362
- import { TTPChatWidget } from '../dist/agent-widget.js';
362
+ import { TTPChatWidget } from '../agent-widget.js';
363
363
 
364
364
  window.TTPChatWidget = TTPChatWidget;
365
365
  window.widgetInstance = null;
366
366
 
367
+ console.log('✅ SDK loaded successfully. TTPChatWidget:', TTPChatWidget);
368
+
367
369
  window.initializeWidget = function() {
370
+ if (!window.TTPChatWidget) {
371
+ alert('TTPChatWidget is not available. Check browser console for errors.');
372
+ console.error('TTPChatWidget is undefined');
373
+ return;
374
+ }
368
375
  const agentId = document.getElementById('agentId').value;
369
376
  const appId = document.getElementById('appId').value;
370
377
  const getSessionUrl = document.getElementById('getSessionUrl').value;
@@ -415,7 +422,9 @@
415
422
  }
416
423
 
417
424
  console.log('Initializing widget with config:', config);
418
- window.widgetInstance = new TTPChatWidget(config);
425
+ console.log('TTPChatWidget constructor:', window.TTPChatWidget);
426
+ window.widgetInstance = new window.TTPChatWidget(config);
427
+ console.log('Widget instance created:', window.widgetInstance);
419
428
 
420
429
  // Update status
421
430
  document.getElementById('status').style.display = 'block';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ttp-agent-sdk",
3
- "version": "2.5.2",
3
+ "version": "2.5.3",
4
4
  "description": "Comprehensive Voice Agent SDK with Enhanced Customizable Widget - Real-time audio, WebSocket communication, React components, and extensive customization options",
5
5
  "main": "dist/agent-widget.js",
6
6
  "module": "dist/agent-widget.js",