ttp-agent-sdk 2.31.0 → 2.32.0

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.
@@ -328,6 +328,40 @@
328
328
  </div>
329
329
  </div>
330
330
 
331
+ <div class="info-box" style="margin-top: 24px;">
332
+ <h3>👁️ Visual Assistant Configuration</h3>
333
+ <div class="config-grid" style="margin-top: 16px;">
334
+ <div class="config-group">
335
+ <label style="display: flex; align-items: center; gap: 8px;">
336
+ <input type="checkbox" id="visualAssistantEnabled" checked>
337
+ <span>Enable Visual Assistant</span>
338
+ </label>
339
+ </div>
340
+ <div class="config-group">
341
+ <label style="display: flex; align-items: center; gap: 8px;">
342
+ <input type="checkbox" id="allowHighlight" checked>
343
+ <span>Allow Highlight</span>
344
+ </label>
345
+ </div>
346
+ <div class="config-group">
347
+ <label style="display: flex; align-items: center; gap: 8px;">
348
+ <input type="checkbox" id="allowScroll" checked>
349
+ <span>Allow Scroll</span>
350
+ </label>
351
+ </div>
352
+ <div class="config-group">
353
+ <label style="display: flex; align-items: center; gap: 8px;">
354
+ <input type="checkbox" id="allowNavigate" checked>
355
+ <span>Allow Navigate</span>
356
+ </label>
357
+ </div>
358
+ </div>
359
+ <p style="margin-top: 12px; font-size: 13px; color: #1e3a8a;">
360
+ Visual Assistant enables the agent to see and interact with your page DOM.
361
+ When enabled, page context is sent with the hello message.
362
+ </p>
363
+ </div>
364
+
331
365
  <div class="button-group">
332
366
  <button class="btn btn-primary" id="initBtn">Initialize Widget</button>
333
367
  <button class="btn btn-secondary" id="destroyBtn">Destroy Widget</button>
@@ -447,6 +481,18 @@
447
481
  };
448
482
  }
449
483
 
484
+ // Add Visual Assistant configuration
485
+ const visualAssistantEnabled = document.getElementById('visualAssistantEnabled').checked;
486
+ if (visualAssistantEnabled) {
487
+ config.visualAssistant = {
488
+ enabled: true,
489
+ allowHighlight: document.getElementById('allowHighlight').checked,
490
+ allowScroll: document.getElementById('allowScroll').checked,
491
+ allowNavigate: document.getElementById('allowNavigate').checked
492
+ };
493
+ console.log('👁️ Visual Assistant enabled:', config.visualAssistant);
494
+ }
495
+
450
496
  console.log('Initializing widget with config:', config);
451
497
  console.log('TTPChatWidget constructor:', window.TTPChatWidget);
452
498
  window.widgetInstance = new window.TTPChatWidget(config);
@@ -498,6 +544,11 @@
498
544
  document.getElementById('language').value = 'en';
499
545
  document.getElementById('mode').value = 'unified';
500
546
  document.getElementById('primaryColor').value = '#7C3AED';
547
+ // Reset Visual Assistant settings
548
+ document.getElementById('visualAssistantEnabled').checked = true;
549
+ document.getElementById('allowHighlight').checked = true;
550
+ document.getElementById('allowScroll').checked = true;
551
+ document.getElementById('allowNavigate').checked = true;
501
552
  };
502
553
 
503
554
  // Attach event listeners to buttons after module loads
@@ -251,7 +251,7 @@
251
251
  </div>
252
252
 
253
253
  <!-- Load the SDK from local dist -->
254
- <script src="/dist/agent-widget.js"></script>
254
+ <script src="/dist/agent-widget.js?v=20250127"></script>
255
255
 
256
256
  <script>
257
257
  let widget = null;
@@ -312,6 +312,14 @@
312
312
  behavior: {
313
313
  mode: 'unified',
314
314
  startOpen: false
315
+ },
316
+ visualAssistant: {
317
+ enabled: true,
318
+ allowHighlight: true,
319
+ allowScroll: true,
320
+ allowNavigate: true,
321
+ allowFillForm: true,
322
+ allowClick: true
315
323
  }
316
324
  });
317
325
 
@@ -328,6 +328,40 @@
328
328
  </div>
329
329
  </div>
330
330
 
331
+ <div class="info-box" style="margin-top: 24px;">
332
+ <h3>👁️ Visual Assistant Configuration</h3>
333
+ <div class="config-grid" style="margin-top: 16px;">
334
+ <div class="config-group">
335
+ <label style="display: flex; align-items: center; gap: 8px;">
336
+ <input type="checkbox" id="visualAssistantEnabled" checked>
337
+ <span>Enable Visual Assistant</span>
338
+ </label>
339
+ </div>
340
+ <div class="config-group">
341
+ <label style="display: flex; align-items: center; gap: 8px;">
342
+ <input type="checkbox" id="allowHighlight" checked>
343
+ <span>Allow Highlight</span>
344
+ </label>
345
+ </div>
346
+ <div class="config-group">
347
+ <label style="display: flex; align-items: center; gap: 8px;">
348
+ <input type="checkbox" id="allowScroll" checked>
349
+ <span>Allow Scroll</span>
350
+ </label>
351
+ </div>
352
+ <div class="config-group">
353
+ <label style="display: flex; align-items: center; gap: 8px;">
354
+ <input type="checkbox" id="allowNavigate" checked>
355
+ <span>Allow Navigate</span>
356
+ </label>
357
+ </div>
358
+ </div>
359
+ <p style="margin-top: 12px; font-size: 13px; color: #1e3a8a;">
360
+ Visual Assistant enables the agent to see and interact with your page DOM.
361
+ When enabled, page context is sent with the hello message.
362
+ </p>
363
+ </div>
364
+
331
365
  <div class="button-group">
332
366
  <button class="btn btn-primary" id="initBtn">Initialize Widget</button>
333
367
  <button class="btn btn-secondary" id="destroyBtn">Destroy Widget</button>
@@ -447,6 +481,18 @@
447
481
  };
448
482
  }
449
483
 
484
+ // Add Visual Assistant configuration
485
+ const visualAssistantEnabled = document.getElementById('visualAssistantEnabled').checked;
486
+ if (visualAssistantEnabled) {
487
+ config.visualAssistant = {
488
+ enabled: true,
489
+ allowHighlight: document.getElementById('allowHighlight').checked,
490
+ allowScroll: document.getElementById('allowScroll').checked,
491
+ allowNavigate: document.getElementById('allowNavigate').checked
492
+ };
493
+ console.log('👁️ Visual Assistant enabled:', config.visualAssistant);
494
+ }
495
+
450
496
  console.log('Initializing widget with config:', config);
451
497
  console.log('TTPChatWidget constructor:', window.TTPChatWidget);
452
498
  window.widgetInstance = new window.TTPChatWidget(config);
@@ -498,6 +544,11 @@
498
544
  document.getElementById('language').value = 'en';
499
545
  document.getElementById('mode').value = 'unified';
500
546
  document.getElementById('primaryColor').value = '#7C3AED';
547
+ // Reset Visual Assistant settings
548
+ document.getElementById('visualAssistantEnabled').checked = true;
549
+ document.getElementById('allowHighlight').checked = true;
550
+ document.getElementById('allowScroll').checked = true;
551
+ document.getElementById('allowNavigate').checked = true;
501
552
  };
502
553
 
503
554
  // Attach event listeners to buttons after module loads
@@ -251,7 +251,7 @@
251
251
  </div>
252
252
 
253
253
  <!-- Load the SDK from local dist -->
254
- <script src="/dist/agent-widget.js"></script>
254
+ <script src="/dist/agent-widget.js?v=20250127"></script>
255
255
 
256
256
  <script>
257
257
  let widget = null;
@@ -312,6 +312,14 @@
312
312
  behavior: {
313
313
  mode: 'unified',
314
314
  startOpen: false
315
+ },
316
+ visualAssistant: {
317
+ enabled: true,
318
+ allowHighlight: true,
319
+ allowScroll: true,
320
+ allowNavigate: true,
321
+ allowFillForm: true,
322
+ allowClick: true
315
323
  }
316
324
  });
317
325
 
@@ -328,6 +328,40 @@
328
328
  </div>
329
329
  </div>
330
330
 
331
+ <div class="info-box" style="margin-top: 24px;">
332
+ <h3>👁️ Visual Assistant Configuration</h3>
333
+ <div class="config-grid" style="margin-top: 16px;">
334
+ <div class="config-group">
335
+ <label style="display: flex; align-items: center; gap: 8px;">
336
+ <input type="checkbox" id="visualAssistantEnabled" checked>
337
+ <span>Enable Visual Assistant</span>
338
+ </label>
339
+ </div>
340
+ <div class="config-group">
341
+ <label style="display: flex; align-items: center; gap: 8px;">
342
+ <input type="checkbox" id="allowHighlight" checked>
343
+ <span>Allow Highlight</span>
344
+ </label>
345
+ </div>
346
+ <div class="config-group">
347
+ <label style="display: flex; align-items: center; gap: 8px;">
348
+ <input type="checkbox" id="allowScroll" checked>
349
+ <span>Allow Scroll</span>
350
+ </label>
351
+ </div>
352
+ <div class="config-group">
353
+ <label style="display: flex; align-items: center; gap: 8px;">
354
+ <input type="checkbox" id="allowNavigate" checked>
355
+ <span>Allow Navigate</span>
356
+ </label>
357
+ </div>
358
+ </div>
359
+ <p style="margin-top: 12px; font-size: 13px; color: #1e3a8a;">
360
+ Visual Assistant enables the agent to see and interact with your page DOM.
361
+ When enabled, page context is sent with the hello message.
362
+ </p>
363
+ </div>
364
+
331
365
  <div class="button-group">
332
366
  <button class="btn btn-primary" id="initBtn">Initialize Widget</button>
333
367
  <button class="btn btn-secondary" id="destroyBtn">Destroy Widget</button>
@@ -447,6 +481,18 @@
447
481
  };
448
482
  }
449
483
 
484
+ // Add Visual Assistant configuration
485
+ const visualAssistantEnabled = document.getElementById('visualAssistantEnabled').checked;
486
+ if (visualAssistantEnabled) {
487
+ config.visualAssistant = {
488
+ enabled: true,
489
+ allowHighlight: document.getElementById('allowHighlight').checked,
490
+ allowScroll: document.getElementById('allowScroll').checked,
491
+ allowNavigate: document.getElementById('allowNavigate').checked
492
+ };
493
+ console.log('👁️ Visual Assistant enabled:', config.visualAssistant);
494
+ }
495
+
450
496
  console.log('Initializing widget with config:', config);
451
497
  console.log('TTPChatWidget constructor:', window.TTPChatWidget);
452
498
  window.widgetInstance = new window.TTPChatWidget(config);
@@ -498,6 +544,11 @@
498
544
  document.getElementById('language').value = 'en';
499
545
  document.getElementById('mode').value = 'unified';
500
546
  document.getElementById('primaryColor').value = '#7C3AED';
547
+ // Reset Visual Assistant settings
548
+ document.getElementById('visualAssistantEnabled').checked = true;
549
+ document.getElementById('allowHighlight').checked = true;
550
+ document.getElementById('allowScroll').checked = true;
551
+ document.getElementById('allowNavigate').checked = true;
501
552
  };
502
553
 
503
554
  // Attach event listeners to buttons after module loads
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ttp-agent-sdk",
3
- "version": "2.31.0",
3
+ "version": "2.32.0",
4
4
  "description": "Comprehensive Voice Agent SDK with 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.esm.js",