ttp-agent-sdk 2.34.14 → 2.35.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.
- package/ENHANCED_WIDGET_GUIDE.md +5 -32
- package/GETTING_STARTED.md +20 -73
- package/README.md +14 -38
- package/WORDPRESS_WIX_GUIDE.md +8 -18
- package/dist/agent-widget.dev.js +388 -274
- package/dist/agent-widget.dev.js.map +1 -1
- package/dist/agent-widget.esm.js +1 -1
- package/dist/agent-widget.esm.js.map +1 -1
- package/dist/agent-widget.js +1 -1
- package/dist/agent-widget.js.map +1 -1
- package/dist/examples/test-text-chat.html +2 -26
- package/dist/index.html +169 -439
- package/examples/test-text-chat.html +2 -26
- package/package.json +2 -2
- package/SIGNED_LINK_GUIDE.md +0 -249
- package/dist/examples/test-signed-link.html +0 -503
- package/examples/test-signed-link.html +0 -503
|
@@ -315,10 +315,6 @@
|
|
|
315
315
|
<span class="section-toggle" id="common-toggle">▼</span>
|
|
316
316
|
</div>
|
|
317
317
|
<div class="section-content" id="common-content">
|
|
318
|
-
<label id="labelSignedUrl" style="grid-column: 1/-1;">🔐 Signed URL (Optional - overrides Agent ID/App ID)
|
|
319
|
-
<input id="signedUrlInput" type="text" value="" placeholder="wss://speech.talktopc.com/ws/conv?signed_token=..." style="width: 100%; font-size: 12px;" />
|
|
320
|
-
<small style="color: #6B7280; font-size: 12px; margin-top: 4px; display: block;">If provided, this will be used for authentication instead of Agent ID/App ID</small>
|
|
321
|
-
</label>
|
|
322
318
|
<label id="labelAgentId">Agent ID
|
|
323
319
|
<input id="agentIdInput" type="text" value="agent_87c4a55a1" placeholder="agent_xxxxx" />
|
|
324
320
|
</label>
|
|
@@ -914,23 +910,8 @@
|
|
|
914
910
|
}
|
|
915
911
|
|
|
916
912
|
function getConfigFromForm() {
|
|
917
|
-
const
|
|
918
|
-
|
|
919
|
-
// Extract agentId and appId from signed URL if present
|
|
920
|
-
let agentId = document.getElementById('agentIdInput').value || 'agent_87c4a55a1';
|
|
921
|
-
let appId = document.getElementById('appIdInput').value || 'app_Bc01EqMQt2Euehl4qqZSi6l3FJP42Q9vJ0pC';
|
|
922
|
-
|
|
923
|
-
if (signedUrl) {
|
|
924
|
-
try {
|
|
925
|
-
const url = new URL(signedUrl);
|
|
926
|
-
const urlAgentId = url.searchParams.get('agentId');
|
|
927
|
-
const urlAppId = url.searchParams.get('appId');
|
|
928
|
-
if (urlAgentId) agentId = urlAgentId;
|
|
929
|
-
if (urlAppId) appId = urlAppId;
|
|
930
|
-
} catch (e) {
|
|
931
|
-
console.warn('Could not parse signed URL:', e);
|
|
932
|
-
}
|
|
933
|
-
}
|
|
913
|
+
const agentId = document.getElementById('agentIdInput').value || 'agent_87c4a55a1';
|
|
914
|
+
const appId = document.getElementById('appIdInput').value || 'app_Bc01EqMQt2Euehl4qqZSi6l3FJP42Q9vJ0pC';
|
|
934
915
|
|
|
935
916
|
const config = {
|
|
936
917
|
agentId: agentId,
|
|
@@ -1078,11 +1059,6 @@
|
|
|
1078
1059
|
config.button.hoverColor = hoverColorInput.value;
|
|
1079
1060
|
}
|
|
1080
1061
|
|
|
1081
|
-
// If signed URL is provided, use it directly
|
|
1082
|
-
if (signedUrl) {
|
|
1083
|
-
config.signedUrl = signedUrl;
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
1062
|
return config;
|
|
1087
1063
|
}
|
|
1088
1064
|
|