@cometchat/chat-uikit-react 6.1.2 → 6.2.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/dist/assets/Profile.png +0 -0
- package/dist/assets/chat-history.svg +3 -0
- package/dist/assets/copy-text.svg +3 -0
- package/dist/assets/message_blocked.svg +8 -0
- package/dist/assets/new-chat.svg +3 -0
- package/dist/assets/right-arrow.svg +3 -0
- package/dist/assets/send-message.svg +3 -0
- package/dist/assets/stop-message.svg +3 -0
- package/dist/assets/warning-small.svg +0 -0
- package/dist/index.d.ts +447 -198
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/styles/CometChatAIAssistantChat.css +465 -0
- package/dist/styles/CometChatAIAssistantChatHistory.css +175 -0
- package/dist/styles/CometChatAIAssistantMessageBubble.css +118 -0
- package/dist/styles/CometChatConversations.css +19 -0
- package/dist/styles/CometChatErrorView.css +22 -0
- package/dist/styles/CometChatMessageComposer.css +9 -9
- package/dist/styles/CometChatMessageHeader.css +2 -4
- package/dist/styles/CometChatMessageList.css +34 -19
- package/dist/styles/CometChatModerationView.css +25 -0
- package/dist/styles/CometChatSearch.css +13 -0
- package/dist/styles/CometChatStreamMessageBubble.css +183 -0
- package/dist/styles/CometChatToolCallArgumentBubble.css +100 -0
- package/dist/styles/CometChatToolCallResultBubble.css +91 -0
- package/dist/styles/components/CometChatAIAssistantChat.css +465 -0
- package/dist/styles/components/CometChatAIAssistantChatHistory.css +175 -0
- package/dist/styles/components/CometChatAIAssistantMessageBubble.css +118 -0
- package/dist/styles/components/CometChatConversations.css +19 -0
- package/dist/styles/components/CometChatErrorView.css +22 -0
- package/dist/styles/components/CometChatMessageComposer.css +9 -9
- package/dist/styles/components/CometChatMessageHeader.css +2 -4
- package/dist/styles/components/CometChatMessageList.css +34 -19
- package/dist/styles/components/CometChatModerationView.css +25 -0
- package/dist/styles/components/CometChatSearch.css +13 -0
- package/dist/styles/components/CometChatStreamMessageBubble.css +183 -0
- package/dist/styles/components/CometChatToolCallArgumentBubble.css +100 -0
- package/dist/styles/components/CometChatToolCallResultBubble.css +91 -0
- package/dist/styles/components/index.css +9 -2
- package/dist/styles/css-variables.css +5 -0
- package/dist/styles/index.css +9 -2
- package/dist/types/components/BaseComponents/CometChatAIAssistantMessageBubble/CometChatAIAssistantMessageBubble.d.ts +6 -0
- package/dist/types/components/BaseComponents/CometChatErrorView/CometChatErrorView.d.ts +9 -0
- package/dist/types/components/BaseComponents/CometChatList/CometChatList.d.ts +7 -0
- package/dist/types/components/BaseComponents/CometChatMessageBubble/CometChatMessageBubble.d.ts +1 -0
- package/dist/types/components/BaseComponents/CometChatModerationView/CometChatModerationView.d.ts +2 -0
- package/dist/types/components/BaseComponents/CometChatSendButtonView/CometChatSendButtonView.d.ts +4 -0
- package/dist/types/components/BaseComponents/CometChatStreamMessageBubble/CometChatStreamMessageBubble.d.ts +6 -0
- package/dist/types/components/BaseComponents/CometChatToolCallArgumentBubble/CometChatToolCallArgumentBubble.d.ts +6 -0
- package/dist/types/components/BaseComponents/CometChatToolCallResultBubble/CometChatToolCallResultBubble.d.ts +6 -0
- package/dist/types/components/CometChatAIAssistantChat/CometChatAIAssistantChat.d.ts +30 -0
- package/dist/types/components/CometChatAIAssistantChatHistory/CometChatAIAssistantChatHistory.d.ts +24 -0
- package/dist/types/components/CometChatMessageComposer/CometChatMessageComposer.d.ts +5 -0
- package/dist/types/components/CometChatMessageComposer/useCometChatMessageComposer.d.ts +2 -0
- package/dist/types/components/CometChatMessageList/CometChatMessageList.d.ts +24 -14
- package/dist/types/components/CometChatMessageList/CometChatMessageListController.d.ts +3 -2
- package/dist/types/components/CometChatMessageList/useCometChatMessageList.d.ts +1 -1
- package/dist/types/constants/CometChatUIKitConstants.d.ts +21 -0
- package/dist/types/events/CometChatMessageEvents.d.ts +4 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/modals/CometChatAIAssistantTools.d.ts +47 -0
- package/dist/types/modals/CometChatMessageTemplate.d.ts +1 -1
- package/dist/types/services/stream-message.service.d.ts +44 -0
- package/dist/types/utils/DataSource.d.ts +9 -1
- package/dist/types/utils/DataSourceDecorator.d.ts +9 -1
- package/dist/types/utils/MessageReceiptUtils.d.ts +1 -1
- package/dist/types/utils/MessageUtils.d.ts +6 -0
- package/dist/types/utils/MessagesDataSource.d.ts +15 -6
- package/dist/types/utils/util.d.ts +9 -0
- package/package.json +7 -3
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
.cometchat-stream-message-bubble * {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
max-width: 100%;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.cometchat-stream-message-bubble .cometchat-stream-message-bubble__copy {
|
|
8
|
+
mask: url("../../assets/Copy.svg") center center no-repeat;
|
|
9
|
+
-webkit-mask: url("../../assets/Copy.svg") center center no-repeat;
|
|
10
|
+
mask-size: contain;
|
|
11
|
+
-webkit-mask-size: contain;
|
|
12
|
+
align-self: flex-start;
|
|
13
|
+
display: flex;
|
|
14
|
+
justify-content: flex-start;
|
|
15
|
+
align-items: flex-start;
|
|
16
|
+
margin-top: var(--cometchat-margin-3);
|
|
17
|
+
height: 20px;
|
|
18
|
+
width: 20px;
|
|
19
|
+
background: var(--cometchat-icon-color-secondary);
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.cometchat-stream-message-bubble {
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
text-align: left;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.cometchat-message-bubble__wrapper {
|
|
29
|
+
align-items: center;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
/* Target all <p> tags without a class */
|
|
34
|
+
.cometchat-stream-message-bubble>p:not([class]) {
|
|
35
|
+
text-align: left;
|
|
36
|
+
line-height: 1.4 !important;
|
|
37
|
+
/* color: var(--cometchat-text-color-secondary); */
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.cometchat-stream-message-bubble>ol:not([class]) {
|
|
41
|
+
padding-left: 0px !important;
|
|
42
|
+
margin-top: 0px !important;
|
|
43
|
+
text-align: left !important;
|
|
44
|
+
/* color: var(--cometchat-text-color-secondary); */
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.cometchat-stream-message-bubble li:not([class]) {
|
|
49
|
+
text-align: left !important;
|
|
50
|
+
/* color: var(--cometchat-text-color-secondary); */
|
|
51
|
+
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.cometchat-stream-message-bubble>ol:not([class]) ul:not([class]) {
|
|
55
|
+
padding-left: 20px !important;
|
|
56
|
+
text-align: left !important;
|
|
57
|
+
/* color: var(--cometchat-text-color-secondary); */
|
|
58
|
+
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.cometchat-stream-message-bubble>ul:not([class]) {
|
|
62
|
+
text-align: left !important;
|
|
63
|
+
/* color: var(--cometchat-text-color-secondary); */
|
|
64
|
+
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.cometchat-stream-message-bubble__code-block {
|
|
68
|
+
max-height: 300px;
|
|
69
|
+
overflow: auto;
|
|
70
|
+
border: 1px solid var(--cometchat-border-color-default);
|
|
71
|
+
width: 100%;
|
|
72
|
+
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.cometchat-stream-message-bubble *:not(pre *) {
|
|
76
|
+
color: var(--cometchat-text-color-primary);
|
|
77
|
+
font-size: 14px;
|
|
78
|
+
font-family: var(--cometchat-font-family);
|
|
79
|
+
}
|
|
80
|
+
.cometchat-stream-message-bubble .cometchat-stream-message-bubble__code-block,.cometchat-stream-message-bubble .cometchat-stream-message-bubble__code-block *{
|
|
81
|
+
font-size: 14px;
|
|
82
|
+
}
|
|
83
|
+
.cometchat-stream-message-bubble__thinking {
|
|
84
|
+
border-radius: 16px;
|
|
85
|
+
animation: fadeIn 0.5s ease;
|
|
86
|
+
position: relative;
|
|
87
|
+
overflow: hidden;
|
|
88
|
+
color: #717680;
|
|
89
|
+
font: var(--cometchat-font-body-regular);
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
justify-content: flex-start;
|
|
93
|
+
align-self: flex-start;
|
|
94
|
+
height: fit-content;
|
|
95
|
+
width: fit-content;
|
|
96
|
+
min-width: fit-content;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
.cometchat-stream-message-bubble__thinking::after {
|
|
101
|
+
content: '';
|
|
102
|
+
position: absolute;
|
|
103
|
+
top: 0;
|
|
104
|
+
left: -60%;
|
|
105
|
+
width: 60%;
|
|
106
|
+
height: 100%;
|
|
107
|
+
background: var( --cometchat-text-shimmer-gradient-color);
|
|
108
|
+
animation: shimmer 1.5s infinite;
|
|
109
|
+
pointer-events: none;
|
|
110
|
+
opacity: 0.7;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.cometchat-stream-message-bubble__tool-call-text {
|
|
114
|
+
width: fit-content;
|
|
115
|
+
text-align: left;
|
|
116
|
+
color: var(--cometchat-text-color-secondary);
|
|
117
|
+
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.cometchat-stream-message-bubble__thinking {
|
|
121
|
+
align-items: flex-start;
|
|
122
|
+
border-radius: 0px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.cometchat-stream-message-bubble__thinking>.cometchat-stream-message-bubble__thinking-text {
|
|
126
|
+
border-radius: 0px;
|
|
127
|
+
color: var(--cometchat-text-color-secondary);
|
|
128
|
+
}
|
|
129
|
+
.cometchat-stream-message-bubble__code-block::-webkit-scrollbar {
|
|
130
|
+
width: 0px;
|
|
131
|
+
height: 8px;
|
|
132
|
+
background: transparent;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.cometchat-stream-message-bubble__code-block::-webkit-scrollbar-track {
|
|
136
|
+
background: transparent;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.cometchat-stream-message-bubble__code-block::-webkit-scrollbar-thumb {
|
|
140
|
+
background: var(--cometchat-icon-color-secondary);
|
|
141
|
+
border-radius: 4px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.cometchat-stream-message-bubble table {
|
|
145
|
+
width: 100%;
|
|
146
|
+
border-collapse: collapse;
|
|
147
|
+
table-layout: auto;
|
|
148
|
+
display: block;
|
|
149
|
+
overflow-x: auto;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.cometchat-stream-message-bubble th,
|
|
153
|
+
.cometchat-stream-message-bubble td {
|
|
154
|
+
padding: var(--cometchat-padding-2);
|
|
155
|
+
border: 1px solid var(--cometchat-border-color-light);
|
|
156
|
+
text-align: left;
|
|
157
|
+
word-break: break-word; /* prevents text overflow in cells */
|
|
158
|
+
min-width: 100px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.cometchat-stream-message-bubble table::-webkit-scrollbar {
|
|
162
|
+
width: 0px;
|
|
163
|
+
height: 8px;
|
|
164
|
+
background: transparent;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.cometchat-stream-message-bubble table::-webkit-scrollbar-track {
|
|
168
|
+
background: transparent;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.cometchat-stream-message-bubble table::-webkit-scrollbar-thumb {
|
|
172
|
+
background: var(--cometchat-icon-color-secondary);
|
|
173
|
+
border-radius: var(--cometchat-radius-2);
|
|
174
|
+
}
|
|
175
|
+
@keyframes shimmer {
|
|
176
|
+
0% {
|
|
177
|
+
left: -60%;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
100% {
|
|
181
|
+
left: 100%;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
.cometchat-toolcall-argument-bubble {
|
|
2
|
+
flex-direction: column;
|
|
3
|
+
gap: 12px;
|
|
4
|
+
display: flex;
|
|
5
|
+
text-align: left;
|
|
6
|
+
justify-content: flex-start;
|
|
7
|
+
width: 100%;
|
|
8
|
+
max-width: 100%;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
padding: 12px;
|
|
11
|
+
border-radius: 8px;
|
|
12
|
+
background: transparent;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.cometchat-toolcall-argument-bubble * {
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
max-width: 100%;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.cometchat-toolcall-argument-bubble .cometchat-toolcall-argument__item {
|
|
22
|
+
margin-bottom: 16px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.cometchat-toolcall-argument-bubble .cometchat-toolcall-argument__item:last-child {
|
|
26
|
+
margin-bottom: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.cometchat-toolcall-argument-bubble .cometchat-toolcall-argument__name {
|
|
30
|
+
margin-bottom: 8px;
|
|
31
|
+
color: var(--cometchat-text-color-primary, #141414);
|
|
32
|
+
font: var(--cometchat-font-subtitle-medium) !important;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.cometchat-toolcall-argument-bubble .cometchat-toolcall-argument__label {
|
|
36
|
+
margin-bottom: 4px;
|
|
37
|
+
/* color: var(--cometchat-text-color-secondary, #666666); */
|
|
38
|
+
font: var(--cometchat-font-body-regular) !important;
|
|
39
|
+
font-size: 12px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.cometchat-toolcall-argument-bubble .cometchat-toolcall-argument__arguments {
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.cometchat-toolcall-argument-bubble pre > div {
|
|
48
|
+
max-height: 200px;
|
|
49
|
+
overflow: scroll;
|
|
50
|
+
border-radius: 4px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@media (min-width: 620px) and (max-width: 780px) {
|
|
54
|
+
.cometchat-toolcall-argument-bubble pre > div {
|
|
55
|
+
max-width: 600px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@media (min-width: 480px) and (max-width: 619px) {
|
|
60
|
+
.cometchat-toolcall-argument-bubble pre > div {
|
|
61
|
+
max-width: 400px;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@media (min-width: 320px) and (max-width: 479px) {
|
|
66
|
+
.cometchat-toolcall-argument-bubble pre > div {
|
|
67
|
+
max-width: 320px;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.cometchat-toolcall-argument-bubble pre *{
|
|
72
|
+
font-size: 14px;
|
|
73
|
+
|
|
74
|
+
/* font: var(--cometchat-font-body-regular) !important; */
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Target all <p> tags without a class */
|
|
78
|
+
.cometchat-toolcall-argument-bubble > p:not([class]) {
|
|
79
|
+
text-align: left;
|
|
80
|
+
line-height: 1.4 !important;
|
|
81
|
+
/* color: var(--cometchat-text-color-secondary); */
|
|
82
|
+
}
|
|
83
|
+
.cometchat-toolcall-argument-bubble > ol:not([class]){
|
|
84
|
+
padding-left: 0px !important;
|
|
85
|
+
margin-top: 0px !important;
|
|
86
|
+
text-align: left !important;
|
|
87
|
+
/* color: var(--cometchat-text-color-secondary); */
|
|
88
|
+
|
|
89
|
+
}
|
|
90
|
+
.cometchat-toolcall-argument-bubble > ol:not([class]) ul:not([class]) {
|
|
91
|
+
padding-left: 20px !important;
|
|
92
|
+
text-align: left !important;
|
|
93
|
+
/* color: var(--cometchat-text-color-secondary); */
|
|
94
|
+
|
|
95
|
+
}
|
|
96
|
+
.cometchat-toolcall-argument-bubble > ul:not([class]){
|
|
97
|
+
text-align: left !important;
|
|
98
|
+
/* color: var(--cometchat-text-color-secondary); */
|
|
99
|
+
|
|
100
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
.cometchat-toolcall-result-bubble {
|
|
2
|
+
flex-direction: column;
|
|
3
|
+
gap: 12px;
|
|
4
|
+
display: flex;
|
|
5
|
+
text-align: left;
|
|
6
|
+
justify-content: flex-start;
|
|
7
|
+
width: 100%;
|
|
8
|
+
max-width: 100%;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
padding: 12px;
|
|
11
|
+
border-radius: 8px;
|
|
12
|
+
background: transparent;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.cometchat-toolcall-result-bubble * {
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
max-width: 100%;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.cometchat-toolcall-result-bubble .cometchat-toolcall-result__item {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.cometchat-toolcall-result-bubble .cometchat-toolcall-result__label {
|
|
27
|
+
margin-bottom: 4px;
|
|
28
|
+
/* color: var(--cometchat-text-color-secondary, #666666); */
|
|
29
|
+
font: var(--cometchat-font-body-regular) !important;
|
|
30
|
+
font-size: 12px;
|
|
31
|
+
font-weight: 500;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.cometchat-toolcall-result-bubble pre > div {
|
|
35
|
+
max-height: 300px;
|
|
36
|
+
overflow: scroll;
|
|
37
|
+
border-radius: 4px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@media (min-width: 620px) and (max-width: 780px) {
|
|
41
|
+
.cometchat-toolcall-result-bubble pre > div {
|
|
42
|
+
max-width: 600px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@media (min-width: 480px) and (max-width: 619px) {
|
|
47
|
+
.cometchat-toolcall-result-bubble pre > div {
|
|
48
|
+
max-width: 400px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@media (min-width: 320px) and (max-width: 479px) {
|
|
53
|
+
.cometchat-toolcall-result-bubble pre > div {
|
|
54
|
+
max-width: 320px;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
.cometchat-toolcall-result-bubble pre *{
|
|
58
|
+
/* font: var(--cometchat-font-body-regular) !important; */
|
|
59
|
+
font-size: 14px;
|
|
60
|
+
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* Target all <p> tags without a class */
|
|
64
|
+
.cometchat-toolcall-result-bubble > p:not([class]) {
|
|
65
|
+
text-align: left;
|
|
66
|
+
line-height: 1.4 !important;
|
|
67
|
+
/* color: var(--cometchat-text-color-secondary); */
|
|
68
|
+
}
|
|
69
|
+
.cometchat-toolcall-result-bubble > ol:not([class]){
|
|
70
|
+
padding-left: 0px !important;
|
|
71
|
+
margin-top: 0px !important;
|
|
72
|
+
text-align: left !important;
|
|
73
|
+
/* color: var(--cometchat-text-color-secondary); */
|
|
74
|
+
|
|
75
|
+
}
|
|
76
|
+
.cometchat-toolcall-result-bubble > ol:not([class]) ul:not([class]) {
|
|
77
|
+
padding-left: 20px !important;
|
|
78
|
+
text-align: left !important;
|
|
79
|
+
/* color: var(--cometchat-text-color-secondary); */
|
|
80
|
+
|
|
81
|
+
}
|
|
82
|
+
.cometchat-toolcall-result-bubble li:not([class]){
|
|
83
|
+
text-align: left !important;
|
|
84
|
+
/* color: var(--cometchat-text-color-secondary); */
|
|
85
|
+
|
|
86
|
+
}
|
|
87
|
+
.cometchat-toolcall-result-bubble > ul:not([class]){
|
|
88
|
+
text-align: left !important;
|
|
89
|
+
/* color: var(--cometchat-text-color-secondary); */
|
|
90
|
+
|
|
91
|
+
}
|
|
@@ -55,7 +55,14 @@
|
|
|
55
55
|
@import url('./CometChatThreadHeader.css');
|
|
56
56
|
@import url('./CometChatToast.css');
|
|
57
57
|
@import url('./CometChatSearch.css');
|
|
58
|
-
|
|
58
|
+
@import url('./CometChatModerationView.css');
|
|
59
|
+
@import url('./CometChatAIAssistantChat.css');
|
|
60
|
+
@import url('./CometChatAIAssistantMessageBubble.css');
|
|
61
|
+
@import url('./CometChatStreamMessageBubble.css');
|
|
62
|
+
@import url('./CometChatAIAssistantChatHistory.css');
|
|
63
|
+
@import url('./CometChatErrorView.css');
|
|
64
|
+
/* @import url('./CometChatToolCallResultBubble.css');
|
|
65
|
+
@import url('./CometChatToolCallArgumentBubble.css'); */
|
|
59
66
|
.cometchat * {
|
|
60
67
|
box-sizing: border-box;
|
|
61
68
|
}
|
|
@@ -114,4 +121,4 @@ font:var(--cometchat-font-body-regular);
|
|
|
114
121
|
|
|
115
122
|
.cometchat-text-bubble .cometchat-text-highlight {
|
|
116
123
|
font: var(--cometchat-font-body-bold);
|
|
117
|
-
}
|
|
124
|
+
}
|
|
@@ -235,6 +235,7 @@ and errors.
|
|
|
235
235
|
--cometchat-warning-color: #FFAB00;
|
|
236
236
|
--cometchat-success-color: #09C26F;
|
|
237
237
|
--cometchat-error-color: #F44649;
|
|
238
|
+
--cometchat-error-color-100: #FEF3F2;
|
|
238
239
|
|
|
239
240
|
/*
|
|
240
241
|
Static colors
|
|
@@ -293,6 +294,8 @@ Define border colors for UI elements,
|
|
|
293
294
|
*/
|
|
294
295
|
--cometchat-shimmer-background-color: var(--cometchat-neutral-color-200);
|
|
295
296
|
--cometchat-shimmer-gradient-color: linear-gradient(90deg, #E0E0E0 0%, #EEE 100%);
|
|
297
|
+
--cometchat-text-shimmer-gradient-color: linear-gradient(270deg, rgba(255, 255, 255, 0.00) 0%, rgba(255, 255, 255, 0.70) 50%, rgba(255, 255, 255, 0.00) 100%);
|
|
298
|
+
|
|
296
299
|
|
|
297
300
|
/*
|
|
298
301
|
Styling for buttons.
|
|
@@ -347,6 +350,7 @@ Define border colors for UI elements,
|
|
|
347
350
|
--cometchat-success-color: #0B9F5D;
|
|
348
351
|
--cometchat-message-seen-color: #56E8A7;
|
|
349
352
|
--cometchat-error-color: #C73C3E;
|
|
353
|
+
--cometchat-error-color-100: #3A0C05;
|
|
350
354
|
|
|
351
355
|
/*
|
|
352
356
|
Static colors
|
|
@@ -401,6 +405,7 @@ Define border colors for UI elements,
|
|
|
401
405
|
*/
|
|
402
406
|
--cometchat-shimmer-background-color: var(--cometchat-background-color-01);
|
|
403
407
|
--cometchat-shimmer-gradient-color: linear-gradient(90deg, #383838 0%, #272727 100%);
|
|
408
|
+
--cometchat-text-shimmer-gradient-color: linear-gradient(270deg, rgba(26, 26, 26, 0.00) 0%, rgba(26, 26, 26, 0.70) 50%, rgba(26, 26, 26, 0.00) 100%);
|
|
404
409
|
|
|
405
410
|
/*
|
|
406
411
|
Styling for buttons.
|
package/dist/styles/index.css
CHANGED
|
@@ -55,7 +55,14 @@
|
|
|
55
55
|
@import url('./CometChatThreadHeader.css');
|
|
56
56
|
@import url('./CometChatToast.css');
|
|
57
57
|
@import url('./CometChatSearch.css');
|
|
58
|
-
|
|
58
|
+
@import url('./CometChatModerationView.css');
|
|
59
|
+
@import url('./CometChatAIAssistantChat.css');
|
|
60
|
+
@import url('./CometChatAIAssistantMessageBubble.css');
|
|
61
|
+
@import url('./CometChatStreamMessageBubble.css');
|
|
62
|
+
@import url('./CometChatAIAssistantChatHistory.css');
|
|
63
|
+
@import url('./CometChatErrorView.css');
|
|
64
|
+
/* @import url('./CometChatToolCallResultBubble.css');
|
|
65
|
+
@import url('./CometChatToolCallArgumentBubble.css'); */
|
|
59
66
|
.cometchat * {
|
|
60
67
|
box-sizing: border-box;
|
|
61
68
|
}
|
|
@@ -114,4 +121,4 @@ font:var(--cometchat-font-body-regular);
|
|
|
114
121
|
|
|
115
122
|
.cometchat-text-bubble .cometchat-text-highlight {
|
|
116
123
|
font: var(--cometchat-font-body-bold);
|
|
117
|
-
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface CometChatAIAssistantMessageBubbleProps {
|
|
3
|
+
message?: CometChat.AIAssistantMessage;
|
|
4
|
+
}
|
|
5
|
+
declare const CometChatAIAssistantMessageBubble: React.FC<CometChatAIAssistantMessageBubbleProps>;
|
|
6
|
+
export { CometChatAIAssistantMessageBubble };
|
|
@@ -140,6 +140,13 @@ interface ListProps<T> {
|
|
|
140
140
|
* @defaultValue `false`
|
|
141
141
|
*/
|
|
142
142
|
showScrollbar?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Set the scrollbar to the bottom-most position of the scrollable list in Agent Chat
|
|
145
|
+
*
|
|
146
|
+
* @remarks
|
|
147
|
+
*
|
|
148
|
+
*/
|
|
149
|
+
scrollToEnd?: boolean;
|
|
143
150
|
}
|
|
144
151
|
/**
|
|
145
152
|
* Renders a list component that can display a title, search bar,
|
package/dist/types/components/BaseComponents/CometChatMessageBubble/CometChatMessageBubble.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ interface MessageBubbleProps {
|
|
|
13
13
|
threadView?: JSX.Element | null;
|
|
14
14
|
footerView?: JSX.Element | null;
|
|
15
15
|
statusInfoView?: JSX.Element | null;
|
|
16
|
+
includeBottomViewHeight?: boolean;
|
|
16
17
|
options: (CometChatActionsIcon | CometChatActionsView)[];
|
|
17
18
|
alignment: MessageBubbleAlignment;
|
|
18
19
|
topMenuSize?: number;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CometChatAIAssistantTools } from '../../modals/CometChatAIAssistantTools';
|
|
3
|
+
interface AIAssistantChatProps {
|
|
4
|
+
hideChatHistory?: boolean;
|
|
5
|
+
hideNewChat?: boolean;
|
|
6
|
+
user: CometChat.User;
|
|
7
|
+
onBackButtonClicked?: () => void;
|
|
8
|
+
onCloseButtonClicked?: () => void;
|
|
9
|
+
showBackButton?: boolean;
|
|
10
|
+
showCloseButton?: boolean;
|
|
11
|
+
headerItemView?: React.JSX.Element;
|
|
12
|
+
headerTitleView?: React.JSX.Element;
|
|
13
|
+
headerSubtitleView?: React.JSX.Element;
|
|
14
|
+
headerLeadingView?: React.JSX.Element;
|
|
15
|
+
headerTrailingView?: React.JSX.Element;
|
|
16
|
+
headerAuxiliaryButtonView?: React.JSX.Element;
|
|
17
|
+
streamingSpeed?: number;
|
|
18
|
+
suggestedMessages?: Array<string>;
|
|
19
|
+
hideSuggestedMessages?: boolean;
|
|
20
|
+
emptyView?: React.JSX.Element;
|
|
21
|
+
loadingView?: React.JSX.Element;
|
|
22
|
+
errorView?: React.JSX.Element;
|
|
23
|
+
onError?: (e: CometChat.CometChatException) => void;
|
|
24
|
+
emptyChatGreetingView?: React.JSX.Element;
|
|
25
|
+
emptyChatIntroMessageView?: React.JSX.Element;
|
|
26
|
+
emptyChatImageView?: React.JSX.Element;
|
|
27
|
+
aiAssistantTools?: CometChatAIAssistantTools;
|
|
28
|
+
}
|
|
29
|
+
export declare const CometChatAIAssistantChat: React.MemoExoticComponent<(props: AIAssistantChatProps) => import("react/jsx-runtime").JSX.Element>;
|
|
30
|
+
export {};
|
package/dist/types/components/CometChatAIAssistantChatHistory/CometChatAIAssistantChatHistory.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface CometChatAIAssistantChatHistoryProps {
|
|
2
|
+
/**
|
|
3
|
+
* A `CometChat.User` object representing the participant of the chat whose message history is displayed.
|
|
4
|
+
*/
|
|
5
|
+
user?: CometChat.User;
|
|
6
|
+
/**
|
|
7
|
+
* A `CometChat.Group` object representing the group whose message history is displayed.
|
|
8
|
+
*/
|
|
9
|
+
group?: CometChat.Group;
|
|
10
|
+
/**
|
|
11
|
+
* Callback function triggered when an error occurs during message fetching.
|
|
12
|
+
*/
|
|
13
|
+
onError?: ((error: CometChat.CometChatException) => void) | null;
|
|
14
|
+
/**
|
|
15
|
+
* Callback function triggered when clicked on closeIcon button
|
|
16
|
+
*/
|
|
17
|
+
onClose?: (() => void) | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Callback function triggered when clicked on a message
|
|
20
|
+
*/
|
|
21
|
+
onMessageClicked?: ((message: CometChat.BaseMessage) => void) | undefined;
|
|
22
|
+
}
|
|
23
|
+
declare const CometChatAIAssistantChatHistory: (props: CometChatAIAssistantChatHistoryProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export { CometChatAIAssistantChatHistory };
|
|
@@ -154,6 +154,11 @@ interface MessageComposerProps {
|
|
|
154
154
|
* @defaultValue `false`
|
|
155
155
|
*/
|
|
156
156
|
showScrollbar?: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* The placeholder text to display in the message input field when it is empty.
|
|
159
|
+
* @defaultValue ""
|
|
160
|
+
*/
|
|
161
|
+
placeholderText?: string;
|
|
157
162
|
}
|
|
158
163
|
/**
|
|
159
164
|
* Represents the state of the message composer.
|
|
@@ -9,6 +9,7 @@ type Args = {
|
|
|
9
9
|
mySetAddToMsgInputText: (text: string) => void;
|
|
10
10
|
errorHandler: (error: unknown, source?: string) => void;
|
|
11
11
|
pasteHtmlAtCaret: (text: string) => void;
|
|
12
|
+
renderSanitizedHtml: (text: string) => void;
|
|
12
13
|
textFormatters: Array<CometChatTextFormatter>;
|
|
13
14
|
disableMentions: boolean;
|
|
14
15
|
textFormatterArray: Array<CometChatTextFormatter>;
|
|
@@ -40,6 +41,7 @@ type Args = {
|
|
|
40
41
|
textMessageToEdit: CometChat.TextMessage | null;
|
|
41
42
|
getCurrentWindow: () => Window;
|
|
42
43
|
getCurrentDocument: () => Document;
|
|
44
|
+
onTextChange: ((text: string) => void) | undefined;
|
|
43
45
|
};
|
|
44
46
|
export declare function useCometChatMessageComposer(args: Args): void;
|
|
45
47
|
export {};
|
|
@@ -27,6 +27,11 @@ interface MessageListProps {
|
|
|
27
27
|
* @default false
|
|
28
28
|
*/
|
|
29
29
|
hideStickyDate?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Hides the visibility of moderation status in the message list.
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
hideModerationView?: boolean;
|
|
30
35
|
/**
|
|
31
36
|
* Hides the visibility of receipts in the message list.
|
|
32
37
|
* @default false
|
|
@@ -140,10 +145,10 @@ interface MessageListProps {
|
|
|
140
145
|
*/
|
|
141
146
|
customSoundForMessages?: string;
|
|
142
147
|
/**
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
148
|
+
* Specifies the keywords in incoming messages that will trigger Smart Replies.
|
|
149
|
+
* If set to an empty array [], Smart Replies will be generated for all messages.
|
|
150
|
+
* @default ['what', 'when', 'why', 'who', 'where', 'how', '?']
|
|
151
|
+
*/
|
|
147
152
|
smartRepliesKeywords?: string[];
|
|
148
153
|
/**
|
|
149
154
|
* Specifies the delay in milliseconds before Smart Replies are displayed.
|
|
@@ -199,20 +204,20 @@ interface MessageListProps {
|
|
|
199
204
|
*/
|
|
200
205
|
footerView?: JSX.Element;
|
|
201
206
|
/**
|
|
202
|
-
|
|
203
|
-
|
|
207
|
+
* Format for the date separators in the message list.
|
|
208
|
+
*/
|
|
204
209
|
separatorDateTimeFormat?: CalendarObject;
|
|
205
210
|
/**
|
|
206
|
-
|
|
207
|
-
|
|
211
|
+
* Format for sticky date headers displayed in the message list.
|
|
212
|
+
*/
|
|
208
213
|
stickyDateTimeFormat?: CalendarObject;
|
|
209
214
|
/**
|
|
210
|
-
|
|
211
|
-
|
|
215
|
+
* Format for the timestamp displayed next to messages.
|
|
216
|
+
*/
|
|
212
217
|
messageSentAtDateTimeFormat?: CalendarObject;
|
|
213
218
|
/**
|
|
214
|
-
|
|
215
|
-
|
|
219
|
+
* Format for timestamps displayed in message details (e.g., delivery or read time).
|
|
220
|
+
*/
|
|
216
221
|
messageInfoDateTimeFormat?: CalendarObject;
|
|
217
222
|
/**
|
|
218
223
|
* ID of the message to automatically scroll to when the message list loads.
|
|
@@ -221,10 +226,15 @@ interface MessageListProps {
|
|
|
221
226
|
*/
|
|
222
227
|
goToMessageId?: string;
|
|
223
228
|
/**
|
|
224
|
-
|
|
229
|
+
* Controls the visibility of the scrollbar in the list.
|
|
230
|
+
* @defaultValue `false`
|
|
231
|
+
*/
|
|
232
|
+
showScrollbar?: boolean;
|
|
233
|
+
/**
|
|
234
|
+
* Toggles AI Agent functionality.
|
|
225
235
|
* @defaultValue `false`
|
|
226
236
|
*/
|
|
227
|
-
|
|
237
|
+
isAgentChat?: boolean;
|
|
228
238
|
}
|
|
229
239
|
declare const CometChatMessageList: (props: MessageListProps) => import("react/jsx-runtime").JSX.Element;
|
|
230
240
|
export { CometChatMessageList };
|