@sinequa/assistant 3.7.2 → 3.7.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.
|
@@ -2600,7 +2600,7 @@ class ChatComponent extends AbstractFacet {
|
|
|
2600
2600
|
* @param ids - An array of document IDs to attach.
|
|
2601
2601
|
*/
|
|
2602
2602
|
attachToChat(ids) {
|
|
2603
|
-
var _a;
|
|
2603
|
+
var _a, _b;
|
|
2604
2604
|
if (!!this.chatService.streaming$.value || !!this.chatService.stoppingGeneration$.value) {
|
|
2605
2605
|
return;
|
|
2606
2606
|
}
|
|
@@ -2613,6 +2613,10 @@ class ChatComponent extends AbstractFacet {
|
|
|
2613
2613
|
return;
|
|
2614
2614
|
}
|
|
2615
2615
|
const userMsg = { role: 'user', content: '', additionalProperties: { display: false, isUserInput: false, type: "Action", forcedWorkflow: attachDocAction.forcedWorkflow, forcedWorkflowProperties: Object.assign(Object.assign({}, (attachDocAction.forcedWorkflowProperties || {})), { ids }), additionalWorkflowProperties: this.config.additionalWorkflowProperties } };
|
|
2616
|
+
// Remove the search warning message if exists
|
|
2617
|
+
if (((_b = this.chatService.chatHistory.at(-1)) === null || _b === void 0 ? void 0 : _b.role) === 'search-warning') {
|
|
2618
|
+
this.chatService.chatHistory.pop();
|
|
2619
|
+
}
|
|
2616
2620
|
const messages = [...this.chatService.chatHistory, userMsg];
|
|
2617
2621
|
this.messages$.next(messages);
|
|
2618
2622
|
this.fetch(messages);
|