@staylift-tech/conv-widget 0.0.6 → 0.0.7
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/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/staylift-widget.cjs.entry.js +5 -1
- package/dist/cjs/staylift-widget.cjs.js +1 -1
- package/dist/collection/components/staylift-widget/staylift-widget.js +43 -1
- package/dist/components/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/staylift-widget.entry.js +5 -1
- package/dist/esm/staylift-widget.js +1 -1
- package/dist/staylift-widget/{p-ed8515c7.entry.js → p-2656bb5a.entry.js} +1 -1
- package/dist/staylift-widget/staylift-widget.esm.js +1 -1
- package/dist/types/components/staylift-widget/staylift-widget.d.ts +2 -0
- package/dist/types/components.d.ts +4 -0
- package/package.json +1 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@ var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
|
6
6
|
const defineCustomElements = async (win, options) => {
|
|
7
7
|
if (typeof window === 'undefined') return undefined;
|
|
8
8
|
await appGlobals.globalScripts();
|
|
9
|
-
return index.bootstrapLazy([["staylift-orb.cjs",[[1,"staylift-orb",{"inputVolume":[2,"input-volume"],"outputVolume":[2,"output-volume"],"isActive":[4,"is-active"],"primaryColor":[1,"primary-color"],"size":[8],"animationFrame":[32]}]]],["staylift-widget.cjs",[[1,"staylift-widget",{"agentId":[1,"agent-id"],"positionX":[1,"position-x"],"positionY":[1,"position-y"],"variant":[1],"mode":[1],"primaryColor":[1,"primary-color"],"brandName":[1,"brand-name"],"language":[1],"autoExpand":[4,"auto-expand"],"showBranding":[4,"show-branding"],"avatarUrl":[1,"avatar-url"],"fabPrompt":[1,"fab-prompt"],"fabButtonText":[1,"fab-button-text"],"status":[32],"isExpanded":[32],"termsAccepted":[32],"errorMessage":[32],"inputVolume":[32],"outputVolume":[32],"messages":[32],"inputText":[32],"copiedIndex":[32],"selectedMode":[32],"startConversation":[64],"endConversation":[64],"getStatus":[64],"sendMessage":[64]}]]]], options);
|
|
9
|
+
return index.bootstrapLazy([["staylift-orb.cjs",[[1,"staylift-orb",{"inputVolume":[2,"input-volume"],"outputVolume":[2,"output-volume"],"isActive":[4,"is-active"],"primaryColor":[1,"primary-color"],"size":[8],"animationFrame":[32]}]]],["staylift-widget.cjs",[[1,"staylift-widget",{"agentId":[1,"agent-id"],"textAgentId":[1,"text-agent-id"],"voiceAgentId":[1,"voice-agent-id"],"positionX":[1,"position-x"],"positionY":[1,"position-y"],"variant":[1],"mode":[1],"primaryColor":[1,"primary-color"],"brandName":[1,"brand-name"],"language":[1],"autoExpand":[4,"auto-expand"],"showBranding":[4,"show-branding"],"avatarUrl":[1,"avatar-url"],"fabPrompt":[1,"fab-prompt"],"fabButtonText":[1,"fab-button-text"],"status":[32],"isExpanded":[32],"termsAccepted":[32],"errorMessage":[32],"inputVolume":[32],"outputVolume":[32],"messages":[32],"inputText":[32],"copiedIndex":[32],"selectedMode":[32],"startConversation":[64],"endConversation":[64],"getStatus":[64],"sendMessage":[64]}]]]], options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
|
@@ -26192,8 +26192,12 @@ const StayliftWidget = class {
|
|
|
26192
26192
|
}, CONNECTION_TIMEOUT);
|
|
26193
26193
|
// Use TextConversation for text-only mode (no mic access), VoiceConversation for voice
|
|
26194
26194
|
const ConversationClass = textOnly ? C : D;
|
|
26195
|
+
// Use mode-specific agent ID if provided, otherwise fall back to main agentId
|
|
26196
|
+
const effectiveAgentId = textOnly
|
|
26197
|
+
? (this.textAgentId || this.agentId)
|
|
26198
|
+
: (this.voiceAgentId || this.agentId);
|
|
26195
26199
|
this.conversation = await ConversationClass.startSession({
|
|
26196
|
-
agentId:
|
|
26200
|
+
agentId: effectiveAgentId,
|
|
26197
26201
|
connectionType: textOnly ? 'websocket' : 'webrtc',
|
|
26198
26202
|
overrides: {
|
|
26199
26203
|
conversation: {
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["staylift-orb.cjs",[[1,"staylift-orb",{"inputVolume":[2,"input-volume"],"outputVolume":[2,"output-volume"],"isActive":[4,"is-active"],"primaryColor":[1,"primary-color"],"size":[8],"animationFrame":[32]}]]],["staylift-widget.cjs",[[1,"staylift-widget",{"agentId":[1,"agent-id"],"positionX":[1,"position-x"],"positionY":[1,"position-y"],"variant":[1],"mode":[1],"primaryColor":[1,"primary-color"],"brandName":[1,"brand-name"],"language":[1],"autoExpand":[4,"auto-expand"],"showBranding":[4,"show-branding"],"avatarUrl":[1,"avatar-url"],"fabPrompt":[1,"fab-prompt"],"fabButtonText":[1,"fab-button-text"],"status":[32],"isExpanded":[32],"termsAccepted":[32],"errorMessage":[32],"inputVolume":[32],"outputVolume":[32],"messages":[32],"inputText":[32],"copiedIndex":[32],"selectedMode":[32],"startConversation":[64],"endConversation":[64],"getStatus":[64],"sendMessage":[64]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["staylift-orb.cjs",[[1,"staylift-orb",{"inputVolume":[2,"input-volume"],"outputVolume":[2,"output-volume"],"isActive":[4,"is-active"],"primaryColor":[1,"primary-color"],"size":[8],"animationFrame":[32]}]]],["staylift-widget.cjs",[[1,"staylift-widget",{"agentId":[1,"agent-id"],"textAgentId":[1,"text-agent-id"],"voiceAgentId":[1,"voice-agent-id"],"positionX":[1,"position-x"],"positionY":[1,"position-y"],"variant":[1],"mode":[1],"primaryColor":[1,"primary-color"],"brandName":[1,"brand-name"],"language":[1],"autoExpand":[4,"auto-expand"],"showBranding":[4,"show-branding"],"avatarUrl":[1,"avatar-url"],"fabPrompt":[1,"fab-prompt"],"fabButtonText":[1,"fab-button-text"],"status":[32],"isExpanded":[32],"termsAccepted":[32],"errorMessage":[32],"inputVolume":[32],"outputVolume":[32],"messages":[32],"inputText":[32],"copiedIndex":[32],"selectedMode":[32],"startConversation":[64],"endConversation":[64],"getStatus":[64],"sendMessage":[64]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -129,8 +129,12 @@ export class StayliftWidget {
|
|
|
129
129
|
}, CONNECTION_TIMEOUT);
|
|
130
130
|
// Use TextConversation for text-only mode (no mic access), VoiceConversation for voice
|
|
131
131
|
const ConversationClass = textOnly ? TextConversation : VoiceConversation;
|
|
132
|
+
// Use mode-specific agent ID if provided, otherwise fall back to main agentId
|
|
133
|
+
const effectiveAgentId = textOnly
|
|
134
|
+
? (this.textAgentId || this.agentId)
|
|
135
|
+
: (this.voiceAgentId || this.agentId);
|
|
132
136
|
this.conversation = await ConversationClass.startSession({
|
|
133
|
-
agentId:
|
|
137
|
+
agentId: effectiveAgentId,
|
|
134
138
|
connectionType: textOnly ? 'websocket' : 'webrtc',
|
|
135
139
|
overrides: {
|
|
136
140
|
conversation: {
|
|
@@ -480,6 +484,44 @@ export class StayliftWidget {
|
|
|
480
484
|
"reflect": false,
|
|
481
485
|
"attribute": "agent-id"
|
|
482
486
|
},
|
|
487
|
+
"textAgentId": {
|
|
488
|
+
"type": "string",
|
|
489
|
+
"mutable": false,
|
|
490
|
+
"complexType": {
|
|
491
|
+
"original": "string",
|
|
492
|
+
"resolved": "string | undefined",
|
|
493
|
+
"references": {}
|
|
494
|
+
},
|
|
495
|
+
"required": false,
|
|
496
|
+
"optional": true,
|
|
497
|
+
"docs": {
|
|
498
|
+
"tags": [],
|
|
499
|
+
"text": ""
|
|
500
|
+
},
|
|
501
|
+
"getter": false,
|
|
502
|
+
"setter": false,
|
|
503
|
+
"reflect": false,
|
|
504
|
+
"attribute": "text-agent-id"
|
|
505
|
+
},
|
|
506
|
+
"voiceAgentId": {
|
|
507
|
+
"type": "string",
|
|
508
|
+
"mutable": false,
|
|
509
|
+
"complexType": {
|
|
510
|
+
"original": "string",
|
|
511
|
+
"resolved": "string | undefined",
|
|
512
|
+
"references": {}
|
|
513
|
+
},
|
|
514
|
+
"required": false,
|
|
515
|
+
"optional": true,
|
|
516
|
+
"docs": {
|
|
517
|
+
"tags": [],
|
|
518
|
+
"text": ""
|
|
519
|
+
},
|
|
520
|
+
"getter": false,
|
|
521
|
+
"setter": false,
|
|
522
|
+
"reflect": false,
|
|
523
|
+
"attribute": "voice-agent-id"
|
|
524
|
+
},
|
|
483
525
|
"positionX": {
|
|
484
526
|
"type": "string",
|
|
485
527
|
"mutable": false,
|