iframe-pubsub 1.0.18 → 1.0.20
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/index.d.mts +11 -4
- package/dist/index.d.ts +11 -4
- package/dist/index.js +17 -5
- package/dist/index.mjs +17 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -89,7 +89,7 @@ declare enum AIChatNameEnum {
|
|
|
89
89
|
SET_CUSTOM_HEADERS = "setCustomHeaders",
|
|
90
90
|
SET_CUSTOM_PAYLOAD = "setCustomPayload",
|
|
91
91
|
SET_METADATA = "setMetadata",
|
|
92
|
-
|
|
92
|
+
SET_EMBED_SYSTEM_MESSAGE = "setEmbedSystemMessage",
|
|
93
93
|
SET_SUGGESTIONS = "setSuggestions",
|
|
94
94
|
SHOW_SUGGESTIONS = "showSuggestions",
|
|
95
95
|
SHOW_CHAT_MESSAGE = "showChatMessage",
|
|
@@ -98,6 +98,7 @@ declare enum AIChatNameEnum {
|
|
|
98
98
|
CONFIRM_ACTION = "confirmAction",
|
|
99
99
|
SHOW_OPTIONS = "showOptions",
|
|
100
100
|
SEND_CHAT_PROMPT = "sendChatPrompt",
|
|
101
|
+
REPLAY_LAST_PROMPT_WITH_TOOL = "replayLastPromptWithTool",
|
|
101
102
|
OPEN_INTERCOM = "openIntercom",
|
|
102
103
|
DEFAULT = "default"
|
|
103
104
|
}
|
|
@@ -145,11 +146,11 @@ declare class AIChatClient extends Client {
|
|
|
145
146
|
*/
|
|
146
147
|
setMetadata(metadata: any): void;
|
|
147
148
|
/**
|
|
148
|
-
*
|
|
149
|
+
* Set an embed system message to the AI Chat component.
|
|
149
150
|
*
|
|
150
|
-
* @param
|
|
151
|
+
* @param embedSystemMessage The embed system message to set.
|
|
151
152
|
*/
|
|
152
|
-
|
|
153
|
+
setEmbedSystemMessage(embedSystemMessage: string): void;
|
|
153
154
|
/**
|
|
154
155
|
* Show suggestions in the AI Chat component.
|
|
155
156
|
*
|
|
@@ -186,6 +187,12 @@ declare class AIChatClient extends Client {
|
|
|
186
187
|
* @param prompt The prompt to send.
|
|
187
188
|
*/
|
|
188
189
|
sendChatPrompt(prompt: string): void;
|
|
190
|
+
/**
|
|
191
|
+
* Force AI to extract provided information from conversation to have detailed information before moving forward.
|
|
192
|
+
*
|
|
193
|
+
* @returns An async actions with a tool_choice should be returned.
|
|
194
|
+
*/
|
|
195
|
+
replayLastPromptWithTool(): void;
|
|
189
196
|
/**
|
|
190
197
|
* Show an unknown error message in the AI Chat component.
|
|
191
198
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -89,7 +89,7 @@ declare enum AIChatNameEnum {
|
|
|
89
89
|
SET_CUSTOM_HEADERS = "setCustomHeaders",
|
|
90
90
|
SET_CUSTOM_PAYLOAD = "setCustomPayload",
|
|
91
91
|
SET_METADATA = "setMetadata",
|
|
92
|
-
|
|
92
|
+
SET_EMBED_SYSTEM_MESSAGE = "setEmbedSystemMessage",
|
|
93
93
|
SET_SUGGESTIONS = "setSuggestions",
|
|
94
94
|
SHOW_SUGGESTIONS = "showSuggestions",
|
|
95
95
|
SHOW_CHAT_MESSAGE = "showChatMessage",
|
|
@@ -98,6 +98,7 @@ declare enum AIChatNameEnum {
|
|
|
98
98
|
CONFIRM_ACTION = "confirmAction",
|
|
99
99
|
SHOW_OPTIONS = "showOptions",
|
|
100
100
|
SEND_CHAT_PROMPT = "sendChatPrompt",
|
|
101
|
+
REPLAY_LAST_PROMPT_WITH_TOOL = "replayLastPromptWithTool",
|
|
101
102
|
OPEN_INTERCOM = "openIntercom",
|
|
102
103
|
DEFAULT = "default"
|
|
103
104
|
}
|
|
@@ -145,11 +146,11 @@ declare class AIChatClient extends Client {
|
|
|
145
146
|
*/
|
|
146
147
|
setMetadata(metadata: any): void;
|
|
147
148
|
/**
|
|
148
|
-
*
|
|
149
|
+
* Set an embed system message to the AI Chat component.
|
|
149
150
|
*
|
|
150
|
-
* @param
|
|
151
|
+
* @param embedSystemMessage The embed system message to set.
|
|
151
152
|
*/
|
|
152
|
-
|
|
153
|
+
setEmbedSystemMessage(embedSystemMessage: string): void;
|
|
153
154
|
/**
|
|
154
155
|
* Show suggestions in the AI Chat component.
|
|
155
156
|
*
|
|
@@ -186,6 +187,12 @@ declare class AIChatClient extends Client {
|
|
|
186
187
|
* @param prompt The prompt to send.
|
|
187
188
|
*/
|
|
188
189
|
sendChatPrompt(prompt: string): void;
|
|
190
|
+
/**
|
|
191
|
+
* Force AI to extract provided information from conversation to have detailed information before moving forward.
|
|
192
|
+
*
|
|
193
|
+
* @returns An async actions with a tool_choice should be returned.
|
|
194
|
+
*/
|
|
195
|
+
replayLastPromptWithTool(): void;
|
|
189
196
|
/**
|
|
190
197
|
* Show an unknown error message in the AI Chat component.
|
|
191
198
|
*/
|
package/dist/index.js
CHANGED
|
@@ -323,7 +323,7 @@ var AIChatNameEnum = /* @__PURE__ */ ((AIChatNameEnum2) => {
|
|
|
323
323
|
AIChatNameEnum2["SET_CUSTOM_HEADERS"] = "setCustomHeaders";
|
|
324
324
|
AIChatNameEnum2["SET_CUSTOM_PAYLOAD"] = "setCustomPayload";
|
|
325
325
|
AIChatNameEnum2["SET_METADATA"] = "setMetadata";
|
|
326
|
-
AIChatNameEnum2["
|
|
326
|
+
AIChatNameEnum2["SET_EMBED_SYSTEM_MESSAGE"] = "setEmbedSystemMessage";
|
|
327
327
|
AIChatNameEnum2["SET_SUGGESTIONS"] = "setSuggestions";
|
|
328
328
|
AIChatNameEnum2["SHOW_SUGGESTIONS"] = "showSuggestions";
|
|
329
329
|
AIChatNameEnum2["SHOW_CHAT_MESSAGE"] = "showChatMessage";
|
|
@@ -332,6 +332,7 @@ var AIChatNameEnum = /* @__PURE__ */ ((AIChatNameEnum2) => {
|
|
|
332
332
|
AIChatNameEnum2["CONFIRM_ACTION"] = "confirmAction";
|
|
333
333
|
AIChatNameEnum2["SHOW_OPTIONS"] = "showOptions";
|
|
334
334
|
AIChatNameEnum2["SEND_CHAT_PROMPT"] = "sendChatPrompt";
|
|
335
|
+
AIChatNameEnum2["REPLAY_LAST_PROMPT_WITH_TOOL"] = "replayLastPromptWithTool";
|
|
335
336
|
AIChatNameEnum2["OPEN_INTERCOM"] = "openIntercom";
|
|
336
337
|
AIChatNameEnum2["DEFAULT"] = "default";
|
|
337
338
|
return AIChatNameEnum2;
|
|
@@ -403,12 +404,12 @@ var AIChatClient = class extends Client {
|
|
|
403
404
|
this.sendAIChatPubsubMethod("setMetadata" /* SET_METADATA */, metadata);
|
|
404
405
|
}
|
|
405
406
|
/**
|
|
406
|
-
*
|
|
407
|
+
* Set an embed system message to the AI Chat component.
|
|
407
408
|
*
|
|
408
|
-
* @param
|
|
409
|
+
* @param embedSystemMessage The embed system message to set.
|
|
409
410
|
*/
|
|
410
|
-
|
|
411
|
-
this.sendAIChatPubsubMethod("
|
|
411
|
+
setEmbedSystemMessage(embedSystemMessage) {
|
|
412
|
+
this.sendAIChatPubsubMethod("setEmbedSystemMessage" /* SET_EMBED_SYSTEM_MESSAGE */, embedSystemMessage);
|
|
412
413
|
}
|
|
413
414
|
/**
|
|
414
415
|
* Show suggestions in the AI Chat component.
|
|
@@ -488,6 +489,17 @@ var AIChatClient = class extends Client {
|
|
|
488
489
|
}
|
|
489
490
|
});
|
|
490
491
|
}
|
|
492
|
+
/**
|
|
493
|
+
* Force AI to extract provided information from conversation to have detailed information before moving forward.
|
|
494
|
+
*
|
|
495
|
+
* @returns An async actions with a tool_choice should be returned.
|
|
496
|
+
*/
|
|
497
|
+
replayLastPromptWithTool() {
|
|
498
|
+
this.sendMessage(this.targetAIChatClientId, {
|
|
499
|
+
type: "aichat" /* AI_CHAT_CLIENT_ID */,
|
|
500
|
+
name: "replayLastPromptWithTool" /* REPLAY_LAST_PROMPT_WITH_TOOL */
|
|
501
|
+
});
|
|
502
|
+
}
|
|
491
503
|
/**
|
|
492
504
|
* Show an unknown error message in the AI Chat component.
|
|
493
505
|
*/
|
package/dist/index.mjs
CHANGED
|
@@ -296,7 +296,7 @@ var AIChatNameEnum = /* @__PURE__ */ ((AIChatNameEnum2) => {
|
|
|
296
296
|
AIChatNameEnum2["SET_CUSTOM_HEADERS"] = "setCustomHeaders";
|
|
297
297
|
AIChatNameEnum2["SET_CUSTOM_PAYLOAD"] = "setCustomPayload";
|
|
298
298
|
AIChatNameEnum2["SET_METADATA"] = "setMetadata";
|
|
299
|
-
AIChatNameEnum2["
|
|
299
|
+
AIChatNameEnum2["SET_EMBED_SYSTEM_MESSAGE"] = "setEmbedSystemMessage";
|
|
300
300
|
AIChatNameEnum2["SET_SUGGESTIONS"] = "setSuggestions";
|
|
301
301
|
AIChatNameEnum2["SHOW_SUGGESTIONS"] = "showSuggestions";
|
|
302
302
|
AIChatNameEnum2["SHOW_CHAT_MESSAGE"] = "showChatMessage";
|
|
@@ -305,6 +305,7 @@ var AIChatNameEnum = /* @__PURE__ */ ((AIChatNameEnum2) => {
|
|
|
305
305
|
AIChatNameEnum2["CONFIRM_ACTION"] = "confirmAction";
|
|
306
306
|
AIChatNameEnum2["SHOW_OPTIONS"] = "showOptions";
|
|
307
307
|
AIChatNameEnum2["SEND_CHAT_PROMPT"] = "sendChatPrompt";
|
|
308
|
+
AIChatNameEnum2["REPLAY_LAST_PROMPT_WITH_TOOL"] = "replayLastPromptWithTool";
|
|
308
309
|
AIChatNameEnum2["OPEN_INTERCOM"] = "openIntercom";
|
|
309
310
|
AIChatNameEnum2["DEFAULT"] = "default";
|
|
310
311
|
return AIChatNameEnum2;
|
|
@@ -376,12 +377,12 @@ var AIChatClient = class extends Client {
|
|
|
376
377
|
this.sendAIChatPubsubMethod("setMetadata" /* SET_METADATA */, metadata);
|
|
377
378
|
}
|
|
378
379
|
/**
|
|
379
|
-
*
|
|
380
|
+
* Set an embed system message to the AI Chat component.
|
|
380
381
|
*
|
|
381
|
-
* @param
|
|
382
|
+
* @param embedSystemMessage The embed system message to set.
|
|
382
383
|
*/
|
|
383
|
-
|
|
384
|
-
this.sendAIChatPubsubMethod("
|
|
384
|
+
setEmbedSystemMessage(embedSystemMessage) {
|
|
385
|
+
this.sendAIChatPubsubMethod("setEmbedSystemMessage" /* SET_EMBED_SYSTEM_MESSAGE */, embedSystemMessage);
|
|
385
386
|
}
|
|
386
387
|
/**
|
|
387
388
|
* Show suggestions in the AI Chat component.
|
|
@@ -461,6 +462,17 @@ var AIChatClient = class extends Client {
|
|
|
461
462
|
}
|
|
462
463
|
});
|
|
463
464
|
}
|
|
465
|
+
/**
|
|
466
|
+
* Force AI to extract provided information from conversation to have detailed information before moving forward.
|
|
467
|
+
*
|
|
468
|
+
* @returns An async actions with a tool_choice should be returned.
|
|
469
|
+
*/
|
|
470
|
+
replayLastPromptWithTool() {
|
|
471
|
+
this.sendMessage(this.targetAIChatClientId, {
|
|
472
|
+
type: "aichat" /* AI_CHAT_CLIENT_ID */,
|
|
473
|
+
name: "replayLastPromptWithTool" /* REPLAY_LAST_PROMPT_WITH_TOOL */
|
|
474
|
+
});
|
|
475
|
+
}
|
|
464
476
|
/**
|
|
465
477
|
* Show an unknown error message in the AI Chat component.
|
|
466
478
|
*/
|