@epam/ai-dial-overlay 0.34.0-rc.8 → 0.34.0
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 +21 -1
- package/package.json +2 -2
- package/src/index.d.ts +1 -1
- package/src/lib/ChatOverlay.d.ts +8 -2
- package/src/lib/ChatOverlayManager.d.ts +2 -1
package/index.esm.js
CHANGED
|
@@ -413,7 +413,7 @@ class ChatOverlay {
|
|
|
413
413
|
/**
|
|
414
414
|
* Delete message in current selected conversation by index
|
|
415
415
|
* @param index {number} index of message in conversation
|
|
416
|
-
* NOTE: if message on index is user message it will also remove answer
|
|
416
|
+
* NOTE: if message on index is user message or assistant it will also remove paired answer or question message
|
|
417
417
|
*/
|
|
418
418
|
deleteMessage(index) {
|
|
419
419
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -423,6 +423,20 @@ class ChatOverlay {
|
|
|
423
423
|
return this.send(OverlayRequests.deleteMessage, request);
|
|
424
424
|
});
|
|
425
425
|
}
|
|
426
|
+
/**
|
|
427
|
+
* Update message in current selected conversation by index
|
|
428
|
+
* @param index {number} index of message in conversation
|
|
429
|
+
* @param updatedMessageFields {Partial<Message>} index of message in conversation
|
|
430
|
+
*/
|
|
431
|
+
updateMessage(index, updatedMessageFields) {
|
|
432
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
433
|
+
const request = {
|
|
434
|
+
index,
|
|
435
|
+
updatedMessageFields,
|
|
436
|
+
};
|
|
437
|
+
return this.send(OverlayRequests.updateMessage, request);
|
|
438
|
+
});
|
|
439
|
+
}
|
|
426
440
|
/**
|
|
427
441
|
* Set input content
|
|
428
442
|
* @param content {string} content to set in chat input
|
|
@@ -777,6 +791,12 @@ class ChatOverlayManager {
|
|
|
777
791
|
return overlay.deleteMessage(index);
|
|
778
792
|
});
|
|
779
793
|
}
|
|
794
|
+
updateMessage(overlayId, index, updatedMessageFields) {
|
|
795
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
796
|
+
const { overlay } = this.getOverlay(overlayId);
|
|
797
|
+
return overlay.updateMessage(index, updatedMessageFields);
|
|
798
|
+
});
|
|
799
|
+
}
|
|
780
800
|
setInputContent(overlayId, content) {
|
|
781
801
|
return __awaiter(this, void 0, void 0, function* () {
|
|
782
802
|
const { overlay } = this.getOverlay(overlayId);
|
package/package.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"name": "@epam/ai-dial-overlay",
|
|
3
3
|
"description": "Package for opening dial in overlay",
|
|
4
4
|
"homepage": "https://epam-rail.com",
|
|
5
|
-
"version": "0.34.0
|
|
5
|
+
"version": "0.34.0",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@epam/ai-dial-shared": "0.34.0
|
|
7
|
+
"@epam/ai-dial-shared": "0.34.0"
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"bugs": {
|
package/src/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export * from './lib/ChatOverlay';
|
|
2
2
|
export * from './lib/ChatOverlayManager';
|
|
3
3
|
export { Feature, overlayAppName, OverlayEvents, Role, LikeState, UploadStatus, PublishActions, } from '@epam/ai-dial-shared';
|
|
4
|
-
export type { ChatOverlayOptions, MessageButton, MessageButtons, OverlayConversation, SendMessageResponse, SetSystemPromptResponse, GetMessagesResponse, GetConversationsResponse, CreateConversationResponse, SelectConversationResponse, CreatePlaybackConversationResponse, RenameConversationResponse, StopSelectedPlaybackConversationResponse, ExportConversationResponse, ImportConversationResponse, SelectedConversationLoadedResponse, MessageCustomButtonResponse, ImageMIMEType, MIMEType, Attachment, StageStatus, Stage, MessageSettings, ConversationEntityModel, Entity, EntityPublicationInfo, ShareInterface, ShareEntity, ConversationInfo, TemplateMapping, Message, } from '@epam/ai-dial-shared';
|
|
4
|
+
export type { ChatOverlayOptions, MessageButton, MessageButtons, OverlayConversation, SendMessageResponse, SetSystemPromptResponse, GetMessagesResponse, GetConversationsResponse, CreateConversationResponse, SelectConversationResponse, CreatePlaybackConversationResponse, RenameConversationResponse, StopSelectedPlaybackConversationResponse, ExportConversationResponse, ImportConversationResponse, SelectedConversationLoadedResponse, MessageCustomButtonResponse, UpdateMessageResponse, ImageMIMEType, MIMEType, Attachment, StageStatus, Stage, MessageSettings, ConversationEntityModel, Entity, EntityPublicationInfo, ShareInterface, ShareEntity, ConversationInfo, TemplateMapping, Message, } from '@epam/ai-dial-shared';
|
package/src/lib/ChatOverlay.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChatOverlayOptions, CreateConversationResponse, CreateLocalConversationResponse, CreatePlaybackConversationResponse, DeferredRequest, DeleteMessageResponse, ExportConversationResponse, GetConversationsResponse, GetMessagesResponse, GetSelectedConversationsResponse, ImportConversationResponse, LatestExportConversationsFormat, OverlayRequest, OverlayRequests, RenameConversationResponse, SelectConversationResponse, SendMessageResponse, SetSystemPromptResponse, StopSelectedPlaybackConversationResponse, Styles, Task } from '@epam/ai-dial-shared';
|
|
1
|
+
import { ChatOverlayOptions, CreateConversationResponse, CreateLocalConversationResponse, CreatePlaybackConversationResponse, DeferredRequest, DeleteMessageResponse, ExportConversationResponse, GetConversationsResponse, GetMessagesResponse, GetSelectedConversationsResponse, ImportConversationResponse, LatestExportConversationsFormat, Message, OverlayRequest, OverlayRequests, RenameConversationResponse, SelectConversationResponse, SendMessageResponse, SetSystemPromptResponse, StopSelectedPlaybackConversationResponse, Styles, Task, UpdateMessageResponse } from '@epam/ai-dial-shared';
|
|
2
2
|
interface Subscription {
|
|
3
3
|
eventType: string;
|
|
4
4
|
callback: (payload: unknown) => void;
|
|
@@ -161,9 +161,15 @@ export declare class ChatOverlay {
|
|
|
161
161
|
/**
|
|
162
162
|
* Delete message in current selected conversation by index
|
|
163
163
|
* @param index {number} index of message in conversation
|
|
164
|
-
* NOTE: if message on index is user message it will also remove answer
|
|
164
|
+
* NOTE: if message on index is user message or assistant it will also remove paired answer or question message
|
|
165
165
|
*/
|
|
166
166
|
deleteMessage(index: number): Promise<DeleteMessageResponse>;
|
|
167
|
+
/**
|
|
168
|
+
* Update message in current selected conversation by index
|
|
169
|
+
* @param index {number} index of message in conversation
|
|
170
|
+
* @param updatedMessageFields {Partial<Message>} index of message in conversation
|
|
171
|
+
*/
|
|
172
|
+
updateMessage(index: number, updatedMessageFields: Partial<Message>): Promise<UpdateMessageResponse>;
|
|
167
173
|
/**
|
|
168
174
|
* Set input content
|
|
169
175
|
* @param content {string} content to set in chat input
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChatOverlay } from './ChatOverlay';
|
|
2
|
-
import { ChatOverlayOptions, LatestExportConversationsFormat } from '@epam/ai-dial-shared';
|
|
2
|
+
import { ChatOverlayOptions, LatestExportConversationsFormat, Message } from '@epam/ai-dial-shared';
|
|
3
3
|
export type OverlayPosition = 'left-bottom' | 'left-top' | 'right-bottom' | 'right-top';
|
|
4
4
|
export interface Position {
|
|
5
5
|
top: string;
|
|
@@ -87,6 +87,7 @@ export declare class ChatOverlayManager {
|
|
|
87
87
|
getMessages(overlayId: string): Promise<import("@epam/ai-dial-shared").GetMessagesResponse>;
|
|
88
88
|
sendMessage(overlayId: string, content: string): Promise<void>;
|
|
89
89
|
deleteMessage(overlayId: string, index: number): Promise<import("@epam/ai-dial-shared").DeleteMessageResponse>;
|
|
90
|
+
updateMessage(overlayId: string, index: number, updatedMessageFields: Partial<Message>): Promise<import("@epam/ai-dial-shared").UpdateMessageResponse>;
|
|
90
91
|
setInputContent(overlayId: string, content: string): Promise<void>;
|
|
91
92
|
getConversations(overlayId: string): Promise<import("@epam/ai-dial-shared").GetConversationsResponse>;
|
|
92
93
|
getSelectedConversations(overlayId: string): Promise<import("@epam/ai-dial-shared").GetSelectedConversationsResponse>;
|