@epam/ai-dial-shared 0.35.0-rc.9 → 0.35.1

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.esm.js CHANGED
@@ -21,9 +21,15 @@ var Feature;
21
21
  Feature["InputFiles"] = "input-files";
22
22
  Feature["InputLinks"] = "input-links";
23
23
  Feature["MessageTemplates"] = "message-templates";
24
- // Edit assistant
24
+ // Edit assistant message
25
25
  Feature["EditLastAssistantContent"] = "edit-last-assistant-message";
26
26
  Feature["EditAllAssistantContent"] = "edit-all-assistant-message";
27
+ // Edit user message
28
+ Feature["HideEditUserMessage"] = "hide-edit-user-message";
29
+ // Regenerate assistant message
30
+ Feature["HideRegenerateAssistantMessage"] = "hide-regenerate-assistant-message";
31
+ // Delete user message
32
+ Feature["HideDeleteUserMessage"] = "hide-delete-user-message";
27
33
  // Chat input
28
34
  Feature["SkipFocusChatInputOnLoad"] = "skip-focus-chat-input-onload";
29
35
  // Send button
@@ -93,6 +99,12 @@ var FeatureType;
93
99
  FeatureType["Application"] = "application";
94
100
  })(FeatureType || (FeatureType = {}));
95
101
 
102
+ var MessageButtonPlacement;
103
+ (function (MessageButtonPlacement) {
104
+ MessageButtonPlacement["PREPEND_DEFAULT_BUTTONS"] = "PREPEND_DEFAULT_BUTTONS";
105
+ MessageButtonPlacement["CONTENT_APPEND"] = "CONTENT_APPEND";
106
+ })(MessageButtonPlacement || (MessageButtonPlacement = {}));
107
+
96
108
  var FormSchemaPropertyWidget;
97
109
  (function (FormSchemaPropertyWidget) {
98
110
  FormSchemaPropertyWidget["buttons"] = "buttons";
@@ -260,6 +272,10 @@ var OverlayEvents;
260
272
  * Chat dispatch this event when user end receiving message from assistant
261
273
  */
262
274
  OverlayEvents["gptEndGenerating"] = "GPT_END_GENERATING";
275
+ /**
276
+ * Chat dispatch this event when user stop streaming explicitly or something happened
277
+ */
278
+ OverlayEvents["stopGenerating"] = "STOP_GENERATING";
263
279
  /**
264
280
  * Chat dispatch this event when any of conversations updated, added or removed
265
281
  */
@@ -269,6 +285,26 @@ var OverlayEvents;
269
285
  * Can include different events like mouseover, mousedown, etc.
270
286
  */
271
287
  OverlayEvents["messageCustomButton"] = "MESSAGE_CUSTOM_BUTTON";
288
+ /**
289
+ * Chat dispatch this event when any of the messages updates by user
290
+ */
291
+ OverlayEvents["editMessage"] = "EDIT_MESSAGE";
292
+ /**
293
+ * Chat dispatch this event when last message regenerated
294
+ */
295
+ OverlayEvents["regenerateMessage"] = "REGENERATE_MESSAGE";
296
+ /**
297
+ * Chat dispatch this event when user message deleted
298
+ */
299
+ OverlayEvents["deleteMessage"] = "DELETE_MESSAGE";
300
+ /**
301
+ * Chat dispatch this event when user change playback to previous message
302
+ */
303
+ OverlayEvents["prevPlaybackMessage"] = "PREV_PLAYBACK_MESSAGE";
304
+ /**
305
+ * Chat dispatch this event when user change playback to next message
306
+ */
307
+ OverlayEvents["nextPlaybackMessage"] = "NEXT_PLAYBACK_MESSAGE";
272
308
  })(OverlayEvents || (OverlayEvents = {}));
273
309
  const overlayLibName = 'ChatOverlay';
274
310
 
@@ -286,4 +322,4 @@ var VisualizerConnectorRequests;
286
322
  VisualizerConnectorRequests["setVisualizerOptions"] = "SET_VISUALIZER_OPTIONS";
287
323
  })(VisualizerConnectorRequests || (VisualizerConnectorRequests = {}));
288
324
 
289
- export { DeferredRequest, DialSchemaProperties, Feature, FeatureType, FormSchemaPropertyType, FormSchemaPropertyWidget, LikeState, OverlayEvents, OverlayRequests, PublishActions, Role, SharePermission, Task, UploadStatus, VisualizerConnectorEvents, VisualizerConnectorRequests, overlayAppName, overlayLibName, setStyles, validateFeature, visualizerConnectorLibName };
325
+ export { DeferredRequest, DialSchemaProperties, Feature, FeatureType, FormSchemaPropertyType, FormSchemaPropertyWidget, LikeState, MessageButtonPlacement, OverlayEvents, OverlayRequests, PublishActions, Role, SharePermission, Task, UploadStatus, VisualizerConnectorEvents, VisualizerConnectorRequests, overlayAppName, overlayLibName, setStyles, validateFeature, visualizerConnectorLibName };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@epam/ai-dial-shared",
3
3
  "description": "Shared elements that support developing DIAL",
4
4
  "homepage": "https://epam-rail.com",
5
- "version": "0.35.0-rc.9",
5
+ "version": "0.35.1",
6
6
  "dependencies": {},
7
7
  "type": "module",
8
8
  "bugs": {
@@ -52,6 +52,10 @@ export declare enum OverlayEvents {
52
52
  * Chat dispatch this event when user end receiving message from assistant
53
53
  */
54
54
  gptEndGenerating = "GPT_END_GENERATING",
55
+ /**
56
+ * Chat dispatch this event when user stop streaming explicitly or something happened
57
+ */
58
+ stopGenerating = "STOP_GENERATING",
55
59
  /**
56
60
  * Chat dispatch this event when any of conversations updated, added or removed
57
61
  */
@@ -60,6 +64,26 @@ export declare enum OverlayEvents {
60
64
  * Chat dispatch this event when events occured on custom message buttons
61
65
  * Can include different events like mouseover, mousedown, etc.
62
66
  */
63
- messageCustomButton = "MESSAGE_CUSTOM_BUTTON"
67
+ messageCustomButton = "MESSAGE_CUSTOM_BUTTON",
68
+ /**
69
+ * Chat dispatch this event when any of the messages updates by user
70
+ */
71
+ editMessage = "EDIT_MESSAGE",
72
+ /**
73
+ * Chat dispatch this event when last message regenerated
74
+ */
75
+ regenerateMessage = "REGENERATE_MESSAGE",
76
+ /**
77
+ * Chat dispatch this event when user message deleted
78
+ */
79
+ deleteMessage = "DELETE_MESSAGE",
80
+ /**
81
+ * Chat dispatch this event when user change playback to previous message
82
+ */
83
+ prevPlaybackMessage = "PREV_PLAYBACK_MESSAGE",
84
+ /**
85
+ * Chat dispatch this event when user change playback to next message
86
+ */
87
+ nextPlaybackMessage = "NEXT_PLAYBACK_MESSAGE"
64
88
  }
65
89
  export declare const overlayLibName = "ChatOverlay";
@@ -19,6 +19,9 @@ export declare enum Feature {
19
19
  MessageTemplates = "message-templates",// message templates
20
20
  EditLastAssistantContent = "edit-last-assistant-message",// allow edit last assistant message only
21
21
  EditAllAssistantContent = "edit-all-assistant-message",// allow edit all assistant messages
22
+ HideEditUserMessage = "hide-edit-user-message",// Hide editing button of user message
23
+ HideRegenerateAssistantMessage = "hide-regenerate-assistant-message",// Hide regenerate button of assistant message
24
+ HideDeleteUserMessage = "hide-delete-user-message",// Hide delete button of user message
22
25
  SkipFocusChatInputOnLoad = "skip-focus-chat-input-onload",// Skip default focusing chat input when on screen onload or after navigation
23
26
  DisabledSend = "disabled-send",// Disable input
24
27
  DisabledPlaybackControls = "disabled-playback-controls",// Disable changing playback current message
@@ -1,8 +1,27 @@
1
- export interface SelectedConversationLoadedResponse {
1
+ import { Message, Playback } from '../chat';
2
+ export interface SelectedConversationLoadedEventResponse {
2
3
  selectedConversationIds: string[];
3
4
  }
4
- export interface MessageCustomButtonResponse {
5
+ export interface MessageCustomButtonEventResponse {
5
6
  eventName: keyof WindowEventMap;
6
7
  buttonKey: string;
7
8
  messageIndex: number;
8
9
  }
10
+ export interface EditMessageEventResponse {
11
+ editedMessage: Message;
12
+ index: number;
13
+ convId: string;
14
+ }
15
+ export interface DeleteMessageEventResponse {
16
+ index: number;
17
+ }
18
+ export interface PrevMessagePlaybackEventResponse {
19
+ newActiveIndex: number;
20
+ updatedMessages: Message[];
21
+ playbackState: Playback;
22
+ }
23
+ export interface NextMessagePlaybackEventResponse {
24
+ newActiveIndex: number;
25
+ updatedMessages: Message[];
26
+ playbackState: Playback;
27
+ }
@@ -24,6 +24,10 @@ interface OverlaySignInOptions {
24
24
  signInProvider?: string;
25
25
  signInInNewWindow?: boolean;
26
26
  }
27
+ export declare enum MessageButtonPlacement {
28
+ PREPEND_DEFAULT_BUTTONS = "PREPEND_DEFAULT_BUTTONS",// Buttons to show before default buttons
29
+ CONTENT_APPEND = "CONTENT_APPEND"
30
+ }
27
31
  export interface MessageButton {
28
32
  buttonKey: string;
29
33
  events: (keyof WindowEventMap)[];
@@ -35,6 +39,7 @@ export interface MessageButton {
35
39
  hoverStyles?: Styles;
36
40
  focusStyles?: Styles;
37
41
  disabledStyles?: Styles;
42
+ placement?: MessageButtonPlacement;
38
43
  disabled?: boolean;
39
44
  }
40
45
  export interface MessageButtons {