rio-assist-widget 0.1.10 → 0.1.14
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/rio-assist.js +170 -67
- package/package.json +1 -1
- package/src/assets/icons/arrowButton.png +0 -0
- package/src/assets/icons/hamburgerBlack.png +0 -0
- package/src/assets/icons/resizeScreen.png +0 -0
- package/src/components/conversations-panel/conversations-panel.styles.ts +43 -1
- package/src/components/conversations-panel/conversations-panel.template.ts +26 -1
- package/src/components/fullscreen/fullscreen.styles.ts +37 -16
- package/src/components/fullscreen/fullscreen.template.ts +41 -12
- package/src/components/mini-panel/mini-panel.styles.ts +68 -66
- package/src/components/mini-panel/mini-panel.template.ts +9 -0
- package/src/components/rio-assist/rio-assist.ts +517 -78
- package/src/services/rioWebsocket.ts +5 -6
|
@@ -27,28 +27,27 @@ export class RioWebsocketClient {
|
|
|
27
27
|
return this.token === value;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
async sendMessage(message: string) {
|
|
30
|
+
async sendMessage(message: string, conversationId?: string | null) {
|
|
31
31
|
const socket = await this.ensureConnection();
|
|
32
32
|
|
|
33
33
|
const payload = {
|
|
34
34
|
action: 'sendMessage',
|
|
35
35
|
message,
|
|
36
|
+
conversationId: conversationId ?? null,
|
|
36
37
|
};
|
|
37
38
|
|
|
39
|
+
console.info('[RioAssist][ws] enviando payload de mensagem', payload);
|
|
38
40
|
socket.send(JSON.stringify(payload));
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
async requestHistory(options: { conversationId?: string; limit?: number } = {}) {
|
|
43
|
+
async requestHistory(options: { conversationId?: string | null; limit?: number } = {}) {
|
|
42
44
|
const socket = await this.ensureConnection();
|
|
43
45
|
const payload: Record<string, unknown> = {
|
|
44
46
|
action: 'getHistory',
|
|
45
47
|
limit: options.limit ?? 50,
|
|
48
|
+
conversationId: options.conversationId ?? null,
|
|
46
49
|
};
|
|
47
50
|
|
|
48
|
-
if (options.conversationId) {
|
|
49
|
-
payload.conversationId = options.conversationId;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
51
|
socket.send(JSON.stringify(payload));
|
|
53
52
|
}
|
|
54
53
|
|