@digipair/skill-web-chatbot 0.10.5 → 0.10.8
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/index.cjs2.js
CHANGED
|
@@ -52658,14 +52658,14 @@ function indent(str, spaces) {
|
|
|
52658
52658
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
52659
52659
|
// match is required
|
|
52660
52660
|
if (!match) {
|
|
52661
|
-
return i = i1,
|
|
52661
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
|
|
52662
52662
|
v: nextMatch1
|
|
52663
52663
|
};
|
|
52664
52664
|
}
|
|
52665
52665
|
var token = match.token, offset = match.offset;
|
|
52666
52666
|
i1 += offset;
|
|
52667
52667
|
if (token === " ") {
|
|
52668
|
-
return i = i1,
|
|
52668
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
|
52669
52669
|
}
|
|
52670
52670
|
tokens1 = _to_consumable_array$9(tokens1).concat([
|
|
52671
52671
|
token
|
|
@@ -52684,7 +52684,7 @@ function indent(str, spaces) {
|
|
|
52684
52684
|
if (contextKeys.some(function(el) {
|
|
52685
52685
|
return el.startsWith(name);
|
|
52686
52686
|
})) {
|
|
52687
|
-
return i = i1,
|
|
52687
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
|
52688
52688
|
}
|
|
52689
52689
|
if (dateTimeIdentifiers.some(function(el) {
|
|
52690
52690
|
return el === name;
|
|
@@ -52703,9 +52703,9 @@ function indent(str, spaces) {
|
|
|
52703
52703
|
if (dateTimeIdentifiers.some(function(el) {
|
|
52704
52704
|
return el.startsWith(name);
|
|
52705
52705
|
})) {
|
|
52706
|
-
return i = i1,
|
|
52706
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
|
52707
52707
|
}
|
|
52708
|
-
return i = i1,
|
|
52708
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
|
|
52709
52709
|
v: nextMatch1
|
|
52710
52710
|
};
|
|
52711
52711
|
};
|
|
@@ -56522,9 +56522,7 @@ const applyTemplate = (value, context)=>{
|
|
|
56522
56522
|
}
|
|
56523
56523
|
return result;
|
|
56524
56524
|
};
|
|
56525
|
-
const executePins = async (settingsOrigin, context = {}
|
|
56526
|
-
libraries: {}
|
|
56527
|
-
})=>{
|
|
56525
|
+
const executePins = async (settingsOrigin, context = {})=>{
|
|
56528
56526
|
var _settings_conditions;
|
|
56529
56527
|
const settings = await preparePinsSettings(settingsOrigin, context);
|
|
56530
56528
|
if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
|
|
@@ -56550,12 +56548,12 @@ const executePins = async (settingsOrigin, context = {}, options = {
|
|
|
56550
56548
|
if (typeof ((_itemSettings_conditions = itemSettings.conditions) == null ? void 0 : _itemSettings_conditions.if) !== 'undefined' && !itemSettings.conditions.if) {
|
|
56551
56549
|
continue;
|
|
56552
56550
|
}
|
|
56553
|
-
const itemResult = await executePins(itemSettingsOrigin, itemContext
|
|
56551
|
+
const itemResult = await executePins(itemSettingsOrigin, itemContext);
|
|
56554
56552
|
results.push(itemResult);
|
|
56555
56553
|
}
|
|
56556
56554
|
return results;
|
|
56557
56555
|
}
|
|
56558
|
-
const version =
|
|
56556
|
+
const version = context.config.VERSIONS[settings.library] || 'latest';
|
|
56559
56557
|
const library = _config$1.LIBRARIES[settings.library] || (typeof window === 'undefined' ? require(settings.library) : await (function (t) { return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(t)); }); })(`${_config$1.BASE_URL}/${settings.library}@${version}/index.esm.js`));
|
|
56560
56558
|
const pins = library == null ? void 0 : library[settings.element];
|
|
56561
56559
|
if (!pins) {
|
|
@@ -56563,9 +56561,7 @@ const executePins = async (settingsOrigin, context = {}, options = {
|
|
|
56563
56561
|
}
|
|
56564
56562
|
return await pins(settings.properties, settings.pins, context);
|
|
56565
56563
|
};
|
|
56566
|
-
const executePinsList = async (pinsSettingsList, context
|
|
56567
|
-
libraries: {}
|
|
56568
|
-
})=>{
|
|
56564
|
+
const executePinsList = async (pinsSettingsList, context)=>{
|
|
56569
56565
|
let previous = {};
|
|
56570
56566
|
const steps = [];
|
|
56571
56567
|
// parcourir tous les pins
|
|
@@ -56586,7 +56582,7 @@ const executePinsList = async (pinsSettingsList, context, options = {
|
|
|
56586
56582
|
steps: context.steps,
|
|
56587
56583
|
parent: context.parent
|
|
56588
56584
|
}
|
|
56589
|
-
})
|
|
56585
|
+
}));
|
|
56590
56586
|
steps[i] = {
|
|
56591
56587
|
name: settings.name,
|
|
56592
56588
|
result: previous
|
|
@@ -56594,9 +56590,7 @@ const executePinsList = async (pinsSettingsList, context, options = {
|
|
|
56594
56590
|
}
|
|
56595
56591
|
return previous;
|
|
56596
56592
|
};
|
|
56597
|
-
const generateElementFromPins = async (pinsSettings, parent, context
|
|
56598
|
-
libraries: {}
|
|
56599
|
-
})=>{
|
|
56593
|
+
const generateElementFromPins = async (pinsSettings, parent, context)=>{
|
|
56600
56594
|
var _settings_conditions, _settings_conditions1;
|
|
56601
56595
|
const settings = await preparePinsSettings(pinsSettings, context);
|
|
56602
56596
|
if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
|
|
@@ -56614,7 +56608,7 @@ const generateElementFromPins = async (pinsSettings, parent, context, options =
|
|
|
56614
56608
|
index: item.index,
|
|
56615
56609
|
parent: context.parent
|
|
56616
56610
|
}
|
|
56617
|
-
})
|
|
56611
|
+
}));
|
|
56618
56612
|
}
|
|
56619
56613
|
return;
|
|
56620
56614
|
}
|
|
@@ -56625,7 +56619,7 @@ const generateElementFromPins = async (pinsSettings, parent, context, options =
|
|
|
56625
56619
|
element.setAttribute('data-digipair-pins', '');
|
|
56626
56620
|
const library = pinsSettings.library;
|
|
56627
56621
|
if (library !== 'web' && !_config$1.LIBRARIES[library]) {
|
|
56628
|
-
const version =
|
|
56622
|
+
const version = context.config.VERSIONS[library] || 'latest';
|
|
56629
56623
|
(function (t) { return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(t)); }); })(`${_config$1.BASE_URL}/${library}@${version}/index.esm.js`);
|
|
56630
56624
|
}
|
|
56631
56625
|
Object.entries(settings.properties || {}).forEach(([key, value])=>{
|
|
@@ -56643,13 +56637,13 @@ const generateElementFromPins = async (pinsSettings, parent, context, options =
|
|
|
56643
56637
|
const event = _event;
|
|
56644
56638
|
executePinsList(pinsList, _extends({}, context, {
|
|
56645
56639
|
event: event.detail
|
|
56646
|
-
})
|
|
56640
|
+
}));
|
|
56647
56641
|
});
|
|
56648
56642
|
});
|
|
56649
56643
|
const pinsList = settings.pins || [];
|
|
56650
56644
|
for(let i = 0; i < pinsList.length; i++){
|
|
56651
56645
|
const item = pinsList[i];
|
|
56652
|
-
await generateElementFromPins(item, element, context
|
|
56646
|
+
await generateElementFromPins(item, element, context);
|
|
56653
56647
|
}
|
|
56654
56648
|
parent == null ? void 0 : parent.appendChild(element);
|
|
56655
56649
|
return element;
|
|
@@ -56811,7 +56805,7 @@ class ChatElement extends s$3 {
|
|
|
56811
56805
|
<digipair-chatbot-inputs
|
|
56812
56806
|
@change=${()=>this.requestUpdate()}
|
|
56813
56807
|
.inputs=${((_this_currentBoost3 = this.currentBoost) == null ? void 0 : _this_currentBoost3.inputs) || []}
|
|
56814
|
-
.context=${((_this_currentBoost4 = this.currentBoost) == null ? void 0 : _this_currentBoost4.context) || {}}
|
|
56808
|
+
.context=${_extends({}, this.context, ((_this_currentBoost4 = this.currentBoost) == null ? void 0 : _this_currentBoost4.context) || {})}
|
|
56815
56809
|
></digipair-chatbot-inputs>
|
|
56816
56810
|
|
|
56817
56811
|
${!this.loading ? T : x`<section class="loading"><img src=${WRITTING_IMAGE} /></section>`}
|
|
@@ -57038,6 +57032,12 @@ __decorate$3([
|
|
|
57038
57032
|
}),
|
|
57039
57033
|
__metadata("design:type", Object)
|
|
57040
57034
|
], ChatElement.prototype, "currentBoost", void 0);
|
|
57035
|
+
__decorate$3([
|
|
57036
|
+
n$3({
|
|
57037
|
+
type: Object
|
|
57038
|
+
}),
|
|
57039
|
+
__metadata("design:type", Object)
|
|
57040
|
+
], ChatElement.prototype, "context", void 0);
|
|
57041
57041
|
__decorate$3([
|
|
57042
57042
|
n$3({
|
|
57043
57043
|
type: Array
|
|
@@ -58525,7 +58525,10 @@ const config = {
|
|
|
58525
58525
|
}, value));
|
|
58526
58526
|
return;
|
|
58527
58527
|
}
|
|
58528
|
-
if (
|
|
58528
|
+
if ([
|
|
58529
|
+
'BASE_URL',
|
|
58530
|
+
'VERSIONS'
|
|
58531
|
+
].indexOf(key) >= 0) {
|
|
58529
58532
|
config$1.set('BASE_URL', value);
|
|
58530
58533
|
return;
|
|
58531
58534
|
}
|
|
@@ -58617,7 +58620,10 @@ class ChatbotElement extends s$3 {
|
|
|
58617
58620
|
digipair
|
|
58618
58621
|
});
|
|
58619
58622
|
this.metadata = _extends({}, metadata, {
|
|
58620
|
-
id: digipair
|
|
58623
|
+
id: digipair,
|
|
58624
|
+
config: {
|
|
58625
|
+
VERSIONS: metadata.config.VERSIONS
|
|
58626
|
+
}
|
|
58621
58627
|
});
|
|
58622
58628
|
await this.loadHistory();
|
|
58623
58629
|
setTimeout(()=>{
|
|
@@ -58703,10 +58709,18 @@ class ChatbotElement extends s$3 {
|
|
|
58703
58709
|
});
|
|
58704
58710
|
const detail = await executePinsList([
|
|
58705
58711
|
pins
|
|
58706
|
-
], {
|
|
58712
|
+
], {
|
|
58713
|
+
config: {
|
|
58714
|
+
VERSIONS: this.metadata.config.VERSIONS
|
|
58715
|
+
}
|
|
58716
|
+
});
|
|
58707
58717
|
this.pushAssistantMessage(detail.assistant);
|
|
58708
58718
|
if (detail.command && detail.command.length > 0) {
|
|
58709
|
-
executePinsList(detail.command, {
|
|
58719
|
+
executePinsList(detail.command, {
|
|
58720
|
+
config: {
|
|
58721
|
+
VERSIONS: this.metadata.config.VERSIONS
|
|
58722
|
+
}
|
|
58723
|
+
});
|
|
58710
58724
|
}
|
|
58711
58725
|
} catch (error) {
|
|
58712
58726
|
this.pushAssistantMessage('Oops...');
|
|
@@ -58763,6 +58777,10 @@ class ChatbotElement extends s$3 {
|
|
|
58763
58777
|
?loading=${this.loading}
|
|
58764
58778
|
.messages=${this.messages}
|
|
58765
58779
|
.currentBoost=${this.currentBoost}
|
|
58780
|
+
.context=${{
|
|
58781
|
+
config: this.metadata.config,
|
|
58782
|
+
variables: this.metadata.variables
|
|
58783
|
+
}}
|
|
58766
58784
|
@prompt=${(event)=>this.execute(this.currentBoost, event.detail.prompt)}
|
|
58767
58785
|
></digipair-chatbot-chat>
|
|
58768
58786
|
</section>
|
|
@@ -59075,7 +59093,10 @@ class DigipairFullElement extends s$3 {
|
|
|
59075
59093
|
digipair
|
|
59076
59094
|
});
|
|
59077
59095
|
this.metadata = _extends({}, metadata, {
|
|
59078
|
-
id: digipair
|
|
59096
|
+
id: digipair,
|
|
59097
|
+
config: {
|
|
59098
|
+
VERSIONS: metadata.config.VERSIONS
|
|
59099
|
+
}
|
|
59079
59100
|
});
|
|
59080
59101
|
await this.loadHistory();
|
|
59081
59102
|
setTimeout(()=>{
|
|
@@ -59144,12 +59165,20 @@ class DigipairFullElement extends s$3 {
|
|
|
59144
59165
|
});
|
|
59145
59166
|
const detail = await executePinsList([
|
|
59146
59167
|
pins
|
|
59147
|
-
], {
|
|
59168
|
+
], {
|
|
59169
|
+
config: {
|
|
59170
|
+
VERSIONS: this.metadata.config.VERSIONS
|
|
59171
|
+
}
|
|
59172
|
+
});
|
|
59148
59173
|
this.pushAssistantMessage(detail.assistant);
|
|
59149
59174
|
if (detail.command && detail.command.library && detail.command.element) {
|
|
59150
59175
|
executePinsList([
|
|
59151
59176
|
detail.command
|
|
59152
|
-
], {
|
|
59177
|
+
], {
|
|
59178
|
+
config: {
|
|
59179
|
+
VERSIONS: this.metadata.config.VERSIONS
|
|
59180
|
+
}
|
|
59181
|
+
});
|
|
59153
59182
|
}
|
|
59154
59183
|
} catch (error) {
|
|
59155
59184
|
this.pushAssistantMessage('Oops...');
|
|
@@ -59204,6 +59233,10 @@ class DigipairFullElement extends s$3 {
|
|
|
59204
59233
|
?loading=${this.loading}
|
|
59205
59234
|
.messages=${this.messages}
|
|
59206
59235
|
.currentBoost=${this.currentBoost}
|
|
59236
|
+
.context=${{
|
|
59237
|
+
config: this.metadata.config,
|
|
59238
|
+
variables: this.metadata.variables
|
|
59239
|
+
}}
|
|
59207
59240
|
@prompt=${(event)=>this.execute(this.currentBoost, event.detail.prompt)}
|
|
59208
59241
|
></digipair-chatbot-chat>
|
|
59209
59242
|
</section>
|
package/index.esm2.js
CHANGED
|
@@ -52638,14 +52638,14 @@ function indent(str, spaces) {
|
|
|
52638
52638
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
52639
52639
|
// match is required
|
|
52640
52640
|
if (!match) {
|
|
52641
|
-
return
|
|
52641
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
|
|
52642
52642
|
v: nextMatch1
|
|
52643
52643
|
};
|
|
52644
52644
|
}
|
|
52645
52645
|
var token = match.token, offset = match.offset;
|
|
52646
52646
|
i1 += offset;
|
|
52647
52647
|
if (token === " ") {
|
|
52648
|
-
return
|
|
52648
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
|
52649
52649
|
}
|
|
52650
52650
|
tokens1 = _to_consumable_array$9(tokens1).concat([
|
|
52651
52651
|
token
|
|
@@ -52664,7 +52664,7 @@ function indent(str, spaces) {
|
|
|
52664
52664
|
if (contextKeys.some(function(el) {
|
|
52665
52665
|
return el.startsWith(name);
|
|
52666
52666
|
})) {
|
|
52667
|
-
return
|
|
52667
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
|
52668
52668
|
}
|
|
52669
52669
|
if (dateTimeIdentifiers.some(function(el) {
|
|
52670
52670
|
return el === name;
|
|
@@ -52683,9 +52683,9 @@ function indent(str, spaces) {
|
|
|
52683
52683
|
if (dateTimeIdentifiers.some(function(el) {
|
|
52684
52684
|
return el.startsWith(name);
|
|
52685
52685
|
})) {
|
|
52686
|
-
return
|
|
52686
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
|
52687
52687
|
}
|
|
52688
|
-
return
|
|
52688
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
|
|
52689
52689
|
v: nextMatch1
|
|
52690
52690
|
};
|
|
52691
52691
|
};
|
|
@@ -56502,9 +56502,7 @@ const applyTemplate = (value, context)=>{
|
|
|
56502
56502
|
}
|
|
56503
56503
|
return result;
|
|
56504
56504
|
};
|
|
56505
|
-
const executePins = async (settingsOrigin, context = {}
|
|
56506
|
-
libraries: {}
|
|
56507
|
-
})=>{
|
|
56505
|
+
const executePins = async (settingsOrigin, context = {})=>{
|
|
56508
56506
|
var _settings_conditions;
|
|
56509
56507
|
const settings = await preparePinsSettings(settingsOrigin, context);
|
|
56510
56508
|
if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
|
|
@@ -56530,12 +56528,12 @@ const executePins = async (settingsOrigin, context = {}, options = {
|
|
|
56530
56528
|
if (typeof ((_itemSettings_conditions = itemSettings.conditions) == null ? void 0 : _itemSettings_conditions.if) !== 'undefined' && !itemSettings.conditions.if) {
|
|
56531
56529
|
continue;
|
|
56532
56530
|
}
|
|
56533
|
-
const itemResult = await executePins(itemSettingsOrigin, itemContext
|
|
56531
|
+
const itemResult = await executePins(itemSettingsOrigin, itemContext);
|
|
56534
56532
|
results.push(itemResult);
|
|
56535
56533
|
}
|
|
56536
56534
|
return results;
|
|
56537
56535
|
}
|
|
56538
|
-
const version =
|
|
56536
|
+
const version = context.config.VERSIONS[settings.library] || 'latest';
|
|
56539
56537
|
const library = _config$1.LIBRARIES[settings.library] || (typeof window === 'undefined' ? require(settings.library) : await import(`${_config$1.BASE_URL}/${settings.library}@${version}/index.esm.js`));
|
|
56540
56538
|
const pins = library == null ? void 0 : library[settings.element];
|
|
56541
56539
|
if (!pins) {
|
|
@@ -56543,9 +56541,7 @@ const executePins = async (settingsOrigin, context = {}, options = {
|
|
|
56543
56541
|
}
|
|
56544
56542
|
return await pins(settings.properties, settings.pins, context);
|
|
56545
56543
|
};
|
|
56546
|
-
const executePinsList = async (pinsSettingsList, context
|
|
56547
|
-
libraries: {}
|
|
56548
|
-
})=>{
|
|
56544
|
+
const executePinsList = async (pinsSettingsList, context)=>{
|
|
56549
56545
|
let previous = {};
|
|
56550
56546
|
const steps = [];
|
|
56551
56547
|
// parcourir tous les pins
|
|
@@ -56566,7 +56562,7 @@ const executePinsList = async (pinsSettingsList, context, options = {
|
|
|
56566
56562
|
steps: context.steps,
|
|
56567
56563
|
parent: context.parent
|
|
56568
56564
|
}
|
|
56569
|
-
})
|
|
56565
|
+
}));
|
|
56570
56566
|
steps[i] = {
|
|
56571
56567
|
name: settings.name,
|
|
56572
56568
|
result: previous
|
|
@@ -56574,9 +56570,7 @@ const executePinsList = async (pinsSettingsList, context, options = {
|
|
|
56574
56570
|
}
|
|
56575
56571
|
return previous;
|
|
56576
56572
|
};
|
|
56577
|
-
const generateElementFromPins = async (pinsSettings, parent, context
|
|
56578
|
-
libraries: {}
|
|
56579
|
-
})=>{
|
|
56573
|
+
const generateElementFromPins = async (pinsSettings, parent, context)=>{
|
|
56580
56574
|
var _settings_conditions, _settings_conditions1;
|
|
56581
56575
|
const settings = await preparePinsSettings(pinsSettings, context);
|
|
56582
56576
|
if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
|
|
@@ -56594,7 +56588,7 @@ const generateElementFromPins = async (pinsSettings, parent, context, options =
|
|
|
56594
56588
|
index: item.index,
|
|
56595
56589
|
parent: context.parent
|
|
56596
56590
|
}
|
|
56597
|
-
})
|
|
56591
|
+
}));
|
|
56598
56592
|
}
|
|
56599
56593
|
return;
|
|
56600
56594
|
}
|
|
@@ -56605,7 +56599,7 @@ const generateElementFromPins = async (pinsSettings, parent, context, options =
|
|
|
56605
56599
|
element.setAttribute('data-digipair-pins', '');
|
|
56606
56600
|
const library = pinsSettings.library;
|
|
56607
56601
|
if (library !== 'web' && !_config$1.LIBRARIES[library]) {
|
|
56608
|
-
const version =
|
|
56602
|
+
const version = context.config.VERSIONS[library] || 'latest';
|
|
56609
56603
|
import(`${_config$1.BASE_URL}/${library}@${version}/index.esm.js`);
|
|
56610
56604
|
}
|
|
56611
56605
|
Object.entries(settings.properties || {}).forEach(([key, value])=>{
|
|
@@ -56623,13 +56617,13 @@ const generateElementFromPins = async (pinsSettings, parent, context, options =
|
|
|
56623
56617
|
const event = _event;
|
|
56624
56618
|
executePinsList(pinsList, _extends({}, context, {
|
|
56625
56619
|
event: event.detail
|
|
56626
|
-
})
|
|
56620
|
+
}));
|
|
56627
56621
|
});
|
|
56628
56622
|
});
|
|
56629
56623
|
const pinsList = settings.pins || [];
|
|
56630
56624
|
for(let i = 0; i < pinsList.length; i++){
|
|
56631
56625
|
const item = pinsList[i];
|
|
56632
|
-
await generateElementFromPins(item, element, context
|
|
56626
|
+
await generateElementFromPins(item, element, context);
|
|
56633
56627
|
}
|
|
56634
56628
|
parent == null ? void 0 : parent.appendChild(element);
|
|
56635
56629
|
return element;
|
|
@@ -56791,7 +56785,7 @@ class ChatElement extends s$3 {
|
|
|
56791
56785
|
<digipair-chatbot-inputs
|
|
56792
56786
|
@change=${()=>this.requestUpdate()}
|
|
56793
56787
|
.inputs=${((_this_currentBoost3 = this.currentBoost) == null ? void 0 : _this_currentBoost3.inputs) || []}
|
|
56794
|
-
.context=${((_this_currentBoost4 = this.currentBoost) == null ? void 0 : _this_currentBoost4.context) || {}}
|
|
56788
|
+
.context=${_extends({}, this.context, ((_this_currentBoost4 = this.currentBoost) == null ? void 0 : _this_currentBoost4.context) || {})}
|
|
56795
56789
|
></digipair-chatbot-inputs>
|
|
56796
56790
|
|
|
56797
56791
|
${!this.loading ? T : x`<section class="loading"><img src=${WRITTING_IMAGE} /></section>`}
|
|
@@ -57018,6 +57012,12 @@ __decorate$3([
|
|
|
57018
57012
|
}),
|
|
57019
57013
|
__metadata("design:type", Object)
|
|
57020
57014
|
], ChatElement.prototype, "currentBoost", void 0);
|
|
57015
|
+
__decorate$3([
|
|
57016
|
+
n$3({
|
|
57017
|
+
type: Object
|
|
57018
|
+
}),
|
|
57019
|
+
__metadata("design:type", Object)
|
|
57020
|
+
], ChatElement.prototype, "context", void 0);
|
|
57021
57021
|
__decorate$3([
|
|
57022
57022
|
n$3({
|
|
57023
57023
|
type: Array
|
|
@@ -58505,7 +58505,10 @@ const config = {
|
|
|
58505
58505
|
}, value));
|
|
58506
58506
|
return;
|
|
58507
58507
|
}
|
|
58508
|
-
if (
|
|
58508
|
+
if ([
|
|
58509
|
+
'BASE_URL',
|
|
58510
|
+
'VERSIONS'
|
|
58511
|
+
].indexOf(key) >= 0) {
|
|
58509
58512
|
config$1.set('BASE_URL', value);
|
|
58510
58513
|
return;
|
|
58511
58514
|
}
|
|
@@ -58597,7 +58600,10 @@ class ChatbotElement extends s$3 {
|
|
|
58597
58600
|
digipair
|
|
58598
58601
|
});
|
|
58599
58602
|
this.metadata = _extends({}, metadata, {
|
|
58600
|
-
id: digipair
|
|
58603
|
+
id: digipair,
|
|
58604
|
+
config: {
|
|
58605
|
+
VERSIONS: metadata.config.VERSIONS
|
|
58606
|
+
}
|
|
58601
58607
|
});
|
|
58602
58608
|
await this.loadHistory();
|
|
58603
58609
|
setTimeout(()=>{
|
|
@@ -58683,10 +58689,18 @@ class ChatbotElement extends s$3 {
|
|
|
58683
58689
|
});
|
|
58684
58690
|
const detail = await executePinsList([
|
|
58685
58691
|
pins
|
|
58686
|
-
], {
|
|
58692
|
+
], {
|
|
58693
|
+
config: {
|
|
58694
|
+
VERSIONS: this.metadata.config.VERSIONS
|
|
58695
|
+
}
|
|
58696
|
+
});
|
|
58687
58697
|
this.pushAssistantMessage(detail.assistant);
|
|
58688
58698
|
if (detail.command && detail.command.length > 0) {
|
|
58689
|
-
executePinsList(detail.command, {
|
|
58699
|
+
executePinsList(detail.command, {
|
|
58700
|
+
config: {
|
|
58701
|
+
VERSIONS: this.metadata.config.VERSIONS
|
|
58702
|
+
}
|
|
58703
|
+
});
|
|
58690
58704
|
}
|
|
58691
58705
|
} catch (error) {
|
|
58692
58706
|
this.pushAssistantMessage('Oops...');
|
|
@@ -58743,6 +58757,10 @@ class ChatbotElement extends s$3 {
|
|
|
58743
58757
|
?loading=${this.loading}
|
|
58744
58758
|
.messages=${this.messages}
|
|
58745
58759
|
.currentBoost=${this.currentBoost}
|
|
58760
|
+
.context=${{
|
|
58761
|
+
config: this.metadata.config,
|
|
58762
|
+
variables: this.metadata.variables
|
|
58763
|
+
}}
|
|
58746
58764
|
@prompt=${(event)=>this.execute(this.currentBoost, event.detail.prompt)}
|
|
58747
58765
|
></digipair-chatbot-chat>
|
|
58748
58766
|
</section>
|
|
@@ -59055,7 +59073,10 @@ class DigipairFullElement extends s$3 {
|
|
|
59055
59073
|
digipair
|
|
59056
59074
|
});
|
|
59057
59075
|
this.metadata = _extends({}, metadata, {
|
|
59058
|
-
id: digipair
|
|
59076
|
+
id: digipair,
|
|
59077
|
+
config: {
|
|
59078
|
+
VERSIONS: metadata.config.VERSIONS
|
|
59079
|
+
}
|
|
59059
59080
|
});
|
|
59060
59081
|
await this.loadHistory();
|
|
59061
59082
|
setTimeout(()=>{
|
|
@@ -59124,12 +59145,20 @@ class DigipairFullElement extends s$3 {
|
|
|
59124
59145
|
});
|
|
59125
59146
|
const detail = await executePinsList([
|
|
59126
59147
|
pins
|
|
59127
|
-
], {
|
|
59148
|
+
], {
|
|
59149
|
+
config: {
|
|
59150
|
+
VERSIONS: this.metadata.config.VERSIONS
|
|
59151
|
+
}
|
|
59152
|
+
});
|
|
59128
59153
|
this.pushAssistantMessage(detail.assistant);
|
|
59129
59154
|
if (detail.command && detail.command.library && detail.command.element) {
|
|
59130
59155
|
executePinsList([
|
|
59131
59156
|
detail.command
|
|
59132
|
-
], {
|
|
59157
|
+
], {
|
|
59158
|
+
config: {
|
|
59159
|
+
VERSIONS: this.metadata.config.VERSIONS
|
|
59160
|
+
}
|
|
59161
|
+
});
|
|
59133
59162
|
}
|
|
59134
59163
|
} catch (error) {
|
|
59135
59164
|
this.pushAssistantMessage('Oops...');
|
|
@@ -59184,6 +59213,10 @@ class DigipairFullElement extends s$3 {
|
|
|
59184
59213
|
?loading=${this.loading}
|
|
59185
59214
|
.messages=${this.messages}
|
|
59186
59215
|
.currentBoost=${this.currentBoost}
|
|
59216
|
+
.context=${{
|
|
59217
|
+
config: this.metadata.config,
|
|
59218
|
+
variables: this.metadata.variables
|
|
59219
|
+
}}
|
|
59187
59220
|
@prompt=${(event)=>this.execute(this.currentBoost, event.detail.prompt)}
|
|
59188
59221
|
></digipair-chatbot-chat>
|
|
59189
59222
|
</section>
|
|
@@ -4,15 +4,7 @@ export declare const config: {
|
|
|
4
4
|
set: (key: CONFIG_KEY, value: any) => void;
|
|
5
5
|
};
|
|
6
6
|
export declare const applyTemplate: (value: any, context: any) => any;
|
|
7
|
-
export declare const executePinsList: (pinsSettingsList: PinsSettings[], context: any
|
|
8
|
-
|
|
9
|
-
[key: string]: string;
|
|
10
|
-
};
|
|
11
|
-
}) => Promise<any>;
|
|
12
|
-
export declare const generateElementFromPins: (pinsSettings: PinsSettings, parent: Element, context: any, options?: {
|
|
13
|
-
libraries: {
|
|
14
|
-
[key: string]: string;
|
|
15
|
-
};
|
|
16
|
-
}) => Promise<Element | void>;
|
|
7
|
+
export declare const executePinsList: (pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
8
|
+
export declare const generateElementFromPins: (pinsSettings: PinsSettings, parent: Element, context: any) => Promise<Element | void>;
|
|
17
9
|
export declare const preparePinsSettings: (settings: PinsSettings, context: any) => Promise<PinsSettings>;
|
|
18
10
|
export {};
|