@cometchat/chat-uikit-react-native 5.1.2 → 5.2.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/android/.gradle/7.4/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.4/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/lib/CometChatAIAssistantChatHistory/CometChatAIAssistantChatHistory.d.ts +40 -0
- package/lib/CometChatAIAssistantChatHistory/CometChatAIAssistantChatHistory.js +467 -0
- package/lib/CometChatAIAssistantChatHistory/CometChatAIAssistantChatHistory.js.map +1 -0
- package/lib/CometChatAIAssistantChatHistory/Skeleton.d.ts +24 -0
- package/lib/CometChatAIAssistantChatHistory/Skeleton.js +130 -0
- package/lib/CometChatAIAssistantChatHistory/Skeleton.js.map +1 -0
- package/lib/CometChatAIAssistantChatHistory/index.d.ts +1 -0
- package/lib/CometChatAIAssistantChatHistory/index.js +2 -0
- package/lib/CometChatAIAssistantChatHistory/index.js.map +1 -0
- package/lib/CometChatAIAssistantChatHistory/style.d.ts +30 -0
- package/lib/CometChatAIAssistantChatHistory/style.js +122 -0
- package/lib/CometChatAIAssistantChatHistory/style.js.map +1 -0
- package/lib/CometChatConversations/CometChatConversations.js +26 -5
- package/lib/CometChatConversations/CometChatConversations.js.map +1 -1
- package/lib/CometChatMessageComposer/CometChatMessageComposer.d.ts +7 -0
- package/lib/CometChatMessageComposer/CometChatMessageComposer.js +101 -13
- package/lib/CometChatMessageComposer/CometChatMessageComposer.js.map +1 -1
- package/lib/CometChatMessageHeader/CometChatMessageHeader.d.ts +16 -0
- package/lib/CometChatMessageHeader/CometChatMessageHeader.js +63 -13
- package/lib/CometChatMessageHeader/CometChatMessageHeader.js.map +1 -1
- package/lib/CometChatMessageList/CometChatMessageList.d.ts +33 -0
- package/lib/CometChatMessageList/CometChatMessageList.js +535 -76
- package/lib/CometChatMessageList/CometChatMessageList.js.map +1 -1
- package/lib/CometChatMessageList/style.js +74 -2
- package/lib/CometChatMessageList/style.js.map +1 -1
- package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.js +6 -12
- package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.js.map +1 -1
- package/lib/calls/CometChatOutgoingCall/CometChatOutgoingCall.js +4 -3
- package/lib/calls/CometChatOutgoingCall/CometChatOutgoingCall.js.map +1 -1
- package/lib/extensions/Polls/Polls.js +38 -17
- package/lib/extensions/Polls/Polls.js.map +1 -1
- package/lib/index.d.ts +5 -1
- package/lib/index.js +6 -2
- package/lib/index.js.map +1 -1
- package/lib/shared/constants/UIKitConstants.d.ts +16 -0
- package/lib/shared/constants/UIKitConstants.js +16 -0
- package/lib/shared/constants/UIKitConstants.js.map +1 -1
- package/lib/shared/events/CometChatMessageEvents/index.d.ts +3 -0
- package/lib/shared/events/CometChatMessageEvents/index.js +3 -0
- package/lib/shared/events/CometChatMessageEvents/index.js.map +1 -1
- package/lib/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.js +3 -0
- package/lib/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.js.map +1 -1
- package/lib/shared/events/CometChatUIEventHandler/Listener.d.ts +3 -1
- package/lib/shared/events/CometChatUIEventHandler/Listener.js +4 -1
- package/lib/shared/events/CometChatUIEventHandler/Listener.js.map +1 -1
- package/lib/shared/events/ListenerInitializer.d.ts +3 -1
- package/lib/shared/events/ListenerInitializer.js +5 -1
- package/lib/shared/events/ListenerInitializer.js.map +1 -1
- package/lib/shared/events/messages.d.ts +2 -1
- package/lib/shared/events/messages.js +1 -0
- package/lib/shared/events/messages.js.map +1 -1
- package/lib/shared/framework/DataSource.d.ts +3 -1
- package/lib/shared/framework/DataSourceDecorator.d.ts +3 -1
- package/lib/shared/framework/DataSourceDecorator.js +8 -2
- package/lib/shared/framework/DataSourceDecorator.js.map +1 -1
- package/lib/shared/framework/MessageDataSource.d.ts +6 -0
- package/lib/shared/framework/MessageDataSource.js +64 -1
- package/lib/shared/framework/MessageDataSource.js.map +1 -1
- package/lib/shared/icons/components/ai-chat-history.d.ts +8 -0
- package/lib/shared/icons/components/ai-chat-history.js +9 -0
- package/lib/shared/icons/components/ai-chat-history.js.map +1 -0
- package/lib/shared/icons/components/ai-copy-option.d.ts +8 -0
- package/lib/shared/icons/components/ai-copy-option.js +9 -0
- package/lib/shared/icons/components/ai-copy-option.js.map +1 -0
- package/lib/shared/icons/components/ai-new-chat.d.ts +8 -0
- package/lib/shared/icons/components/ai-new-chat.js +9 -0
- package/lib/shared/icons/components/ai-new-chat.js.map +1 -0
- package/lib/shared/icons/components/ai-send-button.d.ts +8 -0
- package/lib/shared/icons/components/ai-send-button.js +9 -0
- package/lib/shared/icons/components/ai-send-button.js.map +1 -0
- package/lib/shared/icons/components/right-arrow.d.ts +3 -0
- package/lib/shared/icons/components/right-arrow.js +6 -0
- package/lib/shared/icons/components/right-arrow.js.map +1 -0
- package/lib/shared/icons/components/stop-fill.js +8 -7
- package/lib/shared/icons/components/stop-fill.js.map +1 -1
- package/lib/shared/icons/icon-mapping.d.ts +11 -0
- package/lib/shared/icons/icon-mapping.js +11 -0
- package/lib/shared/icons/icon-mapping.js.map +1 -1
- package/lib/shared/modals/CometChatAIAssistantTools.d.ts +47 -0
- package/lib/shared/modals/CometChatAIAssistantTools.js +44 -0
- package/lib/shared/modals/CometChatAIAssistantTools.js.map +1 -0
- package/lib/shared/modals/StreamMessage.d.ts +4 -0
- package/lib/shared/modals/StreamMessage.js +11 -0
- package/lib/shared/modals/StreamMessage.js.map +1 -0
- package/lib/shared/modals/index.d.ts +3 -1
- package/lib/shared/modals/index.js +3 -1
- package/lib/shared/modals/index.js.map +1 -1
- package/lib/shared/resources/CometChatLocalizeNew/CometChatLocalizationHelper.d.ts +126 -0
- package/lib/shared/resources/CometChatLocalizeNew/resources/de/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/en/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/es/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/fr/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/hi/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/hu/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/it/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/ja/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/ko/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/lt/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/ms/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/nl/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/pt/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/ru/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/sv/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/tr/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/zh/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/zh-tw/translation.json +7 -1
- package/lib/shared/services/stream-message.service.d.ts +84 -0
- package/lib/shared/services/stream-message.service.js +406 -0
- package/lib/shared/services/stream-message.service.js.map +1 -0
- package/lib/shared/views/CometChatAIAssistantMessageBubble/CometChatAIAssistantMessageBubble.d.ts +9 -0
- package/lib/shared/views/CometChatAIAssistantMessageBubble/CometChatAIAssistantMessageBubble.js +248 -0
- package/lib/shared/views/CometChatAIAssistantMessageBubble/CometChatAIAssistantMessageBubble.js.map +1 -0
- package/lib/shared/views/CometChatAIAssistantMessageBubble/index.d.ts +3 -0
- package/lib/shared/views/CometChatAIAssistantMessageBubble/index.js +4 -0
- package/lib/shared/views/CometChatAIAssistantMessageBubble/index.js.map +1 -0
- package/lib/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.js +5 -2
- package/lib/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.js.map +1 -1
- package/lib/shared/views/CometChatImageBubble/CometChatImageLoader.js +1 -1
- package/lib/shared/views/CometChatImageBubble/CometChatImageLoader.js.map +1 -1
- package/lib/shared/views/CometChatImageViewerModal/ImageViewerModal.js +52 -32
- package/lib/shared/views/CometChatImageViewerModal/ImageViewerModal.js.map +1 -1
- package/lib/shared/views/CometChatSendButtonView/CometChatSendButtonView.d.ts +10 -0
- package/lib/shared/views/CometChatSendButtonView/CometChatSendButtonView.js +54 -0
- package/lib/shared/views/CometChatSendButtonView/CometChatSendButtonView.js.map +1 -0
- package/lib/shared/views/CometChatSendButtonView/index.d.ts +1 -0
- package/lib/shared/views/CometChatSendButtonView/index.js +2 -0
- package/lib/shared/views/CometChatSendButtonView/index.js.map +1 -0
- package/lib/shared/views/CometChatStreamMessageBubble/CometChatStreamMessageBubble.d.ts +8 -0
- package/lib/shared/views/CometChatStreamMessageBubble/CometChatStreamMessageBubble.js +436 -0
- package/lib/shared/views/CometChatStreamMessageBubble/CometChatStreamMessageBubble.js.map +1 -0
- package/lib/shared/views/CometChatStreamMessageBubble/index.d.ts +3 -0
- package/lib/shared/views/CometChatStreamMessageBubble/index.js +3 -0
- package/lib/shared/views/CometChatStreamMessageBubble/index.js.map +1 -0
- package/lib/shared/views/CometChatTextBubble/CometChatTextBubble.d.ts +14 -6
- package/lib/shared/views/CometChatTextBubble/CometChatTextBubble.js +82 -57
- package/lib/shared/views/CometChatTextBubble/CometChatTextBubble.js.map +1 -1
- package/lib/theme/context.d.ts +96 -15
- package/lib/theme/type.d.ts +14 -1
- package/package.json +5 -2
- package/src/CometChatAIAssistantChatHistory/CometChatAIAssistantChatHistory.tsx +627 -0
- package/src/CometChatAIAssistantChatHistory/Skeleton.tsx +228 -0
- package/src/CometChatAIAssistantChatHistory/index.ts +2 -0
- package/src/CometChatAIAssistantChatHistory/style.ts +160 -0
- package/src/CometChatConversations/CometChatConversations.tsx +36 -10
- package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +137 -19
- package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +106 -18
- package/src/CometChatMessageList/CometChatMessageList.tsx +619 -72
- package/src/CometChatMessageList/style.ts +74 -2
- package/src/index.ts +31 -1
- package/src/shared/constants/UIKitConstants.ts +17 -0
- package/src/shared/events/CometChatMessageEvents/index.ts +3 -1
- package/src/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.ts +3 -0
- package/src/shared/events/CometChatUIEventHandler/Listener.ts +4 -0
- package/src/shared/events/ListenerInitializer.ts +6 -1
- package/src/shared/events/messages.ts +1 -0
- package/src/shared/framework/DataSource.ts +4 -2
- package/src/shared/framework/DataSourceDecorator.tsx +10 -2
- package/src/shared/framework/MessageDataSource.tsx +75 -2
- package/src/shared/icons/Icon.tsx +1 -1
- package/src/shared/icons/components/ai-chat-history.tsx +21 -0
- package/src/shared/icons/components/ai-copy-option.tsx +21 -0
- package/src/shared/icons/components/ai-new-chat.tsx +21 -0
- package/src/shared/icons/components/ai-send-button.tsx +24 -0
- package/src/shared/icons/components/right-arrow.tsx +13 -0
- package/src/shared/icons/components/stop-fill.tsx +14 -12
- package/src/shared/icons/icon-mapping.tsx +14 -0
- package/src/shared/modals/CometChatAIAssistantTools.ts +65 -0
- package/src/shared/modals/StreamMessage.ts +12 -0
- package/src/shared/modals/index.ts +5 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/de/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/en/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/es/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/fr/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/hi/translation.json +7 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/hu/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/it/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/ja/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/ko/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/lt/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/ms/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/nl/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/pt/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/ru/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/sv/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/tr/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/zh/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/zh-tw/translation.json +7 -1
- package/src/shared/services/stream-message.service.ts +470 -0
- package/src/shared/views/CometChatAIAssistantMessageBubble/CometChatAIAssistantMessageBubble.tsx +262 -0
- package/src/shared/views/CometChatAIAssistantMessageBubble/index.ts +4 -0
- package/src/shared/views/CometChatSendButtonView/CometChatSendButtonView.tsx +86 -0
- package/src/shared/views/CometChatSendButtonView/index.ts +1 -0
- package/src/shared/views/CometChatStreamMessageBubble/CometChatStreamMessageBubble.tsx +493 -0
- package/src/shared/views/CometChatStreamMessageBubble/index.ts +9 -0
- package/src/theme/type.ts +14 -1
|
@@ -93,7 +93,7 @@ export const getMessageListStylesLight = (
|
|
|
93
93
|
): CometChatTheme["messageListStyles"] => {
|
|
94
94
|
return {
|
|
95
95
|
containerStyle: {
|
|
96
|
-
backgroundColor: color.
|
|
96
|
+
backgroundColor: color.background3,
|
|
97
97
|
flex: 1,
|
|
98
98
|
},
|
|
99
99
|
scrollToBottomButtonStyle: {
|
|
@@ -269,6 +269,42 @@ export const getMessageListStylesLight = (
|
|
|
269
269
|
paddingRight: spacing.padding.p1,
|
|
270
270
|
},
|
|
271
271
|
},
|
|
272
|
+
assistantBubbleStyles: {
|
|
273
|
+
containerStyle: {
|
|
274
|
+
backgroundColor: "transparent",
|
|
275
|
+
borderRadius: spacing.radius.r3,
|
|
276
|
+
minWidth: 90,
|
|
277
|
+
alignSelf: "flex-start",
|
|
278
|
+
marginTop: -16,
|
|
279
|
+
},
|
|
280
|
+
textStyle: {
|
|
281
|
+
fontFamily: typography.fontFamily,
|
|
282
|
+
color: color.receiveBubbleText,
|
|
283
|
+
...typography.body.regular,
|
|
284
|
+
},
|
|
285
|
+
placeholderTextStyle: {
|
|
286
|
+
fontFamily: typography.fontFamily,
|
|
287
|
+
color: color.receiveBubbleText,
|
|
288
|
+
...typography.body.regular,
|
|
289
|
+
opacity: 0.6,
|
|
290
|
+
},
|
|
291
|
+
copyButtonStyle: {
|
|
292
|
+
backgroundColor: color.primary,
|
|
293
|
+
padding: spacing.padding.p1,
|
|
294
|
+
borderRadius: spacing.radius.r1,
|
|
295
|
+
},
|
|
296
|
+
errorContainerStyle: {
|
|
297
|
+
backgroundColor: color.error,
|
|
298
|
+
padding: spacing.padding.p2,
|
|
299
|
+
borderRadius: spacing.radius.r2,
|
|
300
|
+
marginTop: spacing.margin.m1,
|
|
301
|
+
},
|
|
302
|
+
errorTextStyle: {
|
|
303
|
+
color: color.background1,
|
|
304
|
+
fontFamily: typography.fontFamily,
|
|
305
|
+
...typography.caption1.regular,
|
|
306
|
+
},
|
|
307
|
+
},
|
|
272
308
|
audioBubbleStyles: getAudioBubbleStyleLight(color, spacing, typography)
|
|
273
309
|
.incomingAudioBubbleStyle,
|
|
274
310
|
fileBubbleStyles: getFileBubbleStyleLight(color, spacing, typography).incomingFileBubbleStyle,
|
|
@@ -537,7 +573,7 @@ export const getMessageListStylesDark = (
|
|
|
537
573
|
): CometChatTheme["messageListStyles"] => {
|
|
538
574
|
return {
|
|
539
575
|
containerStyle: {
|
|
540
|
-
backgroundColor: color.
|
|
576
|
+
backgroundColor: color.background3,
|
|
541
577
|
flex: 1,
|
|
542
578
|
},
|
|
543
579
|
scrollToBottomButtonStyle: {
|
|
@@ -715,6 +751,42 @@ export const getMessageListStylesDark = (
|
|
|
715
751
|
paddingRight: spacing.padding.p1,
|
|
716
752
|
},
|
|
717
753
|
},
|
|
754
|
+
assistantBubbleStyles: {
|
|
755
|
+
containerStyle: {
|
|
756
|
+
backgroundColor: "transparent",
|
|
757
|
+
borderRadius: spacing.radius.r3,
|
|
758
|
+
minWidth: 90,
|
|
759
|
+
alignSelf: "flex-start",
|
|
760
|
+
marginTop: -14,
|
|
761
|
+
},
|
|
762
|
+
textStyle: {
|
|
763
|
+
fontFamily: typography.fontFamily,
|
|
764
|
+
color: color.receiveBubbleText,
|
|
765
|
+
...typography.body.regular,
|
|
766
|
+
},
|
|
767
|
+
placeholderTextStyle: {
|
|
768
|
+
fontFamily: typography.fontFamily,
|
|
769
|
+
color: color.receiveBubbleText,
|
|
770
|
+
...typography.body.regular,
|
|
771
|
+
opacity: 0.6,
|
|
772
|
+
},
|
|
773
|
+
copyButtonStyle: {
|
|
774
|
+
backgroundColor: color.primary,
|
|
775
|
+
padding: spacing.padding.p1,
|
|
776
|
+
borderRadius: spacing.radius.r1,
|
|
777
|
+
},
|
|
778
|
+
errorContainerStyle: {
|
|
779
|
+
backgroundColor: color.error,
|
|
780
|
+
padding: spacing.padding.p2,
|
|
781
|
+
borderRadius: spacing.radius.r2,
|
|
782
|
+
marginTop: spacing.margin.m1,
|
|
783
|
+
},
|
|
784
|
+
errorTextStyle: {
|
|
785
|
+
color: color.background1,
|
|
786
|
+
fontFamily: typography.fontFamily,
|
|
787
|
+
...typography.caption1.regular,
|
|
788
|
+
},
|
|
789
|
+
},
|
|
718
790
|
audioBubbleStyles: getAudioBubbleStyleDark(color, spacing, typography)
|
|
719
791
|
.incomingAudioBubbleStyle,
|
|
720
792
|
fileBubbleStyles: getFileBubbleStyleDark(color, spacing, typography).incomingFileBubbleStyle,
|
package/src/index.ts
CHANGED
|
@@ -83,6 +83,11 @@ import {
|
|
|
83
83
|
getCurrentLanguage,
|
|
84
84
|
} from "./shared";
|
|
85
85
|
|
|
86
|
+
import { stopStreamingForRunId, startStreamingForRunId, streamingState$, getStreamSpeed, setAIAssistantTools, setQueueCompletionCallback, removeQueueCompletionCallback, IStreamData,QueueCompletionCallback,checkAndTriggerQueueCompletion, getAIAssistantTools, handleWebsocketMessage, messageStream, notifyStreamRenderComplete, onConnected, onConnectionError, onDisconnected, setStreamSpeed, storeAIAssistantMessage, streamConnection$ } from "./shared/services/stream-message.service";
|
|
87
|
+
|
|
88
|
+
import { StreamMessage} from "./shared/modals/StreamMessage";
|
|
89
|
+
import {CometChatAIAssistantTools} from "./shared/modals/CometChatAIAssistantTools";
|
|
90
|
+
|
|
86
91
|
import {
|
|
87
92
|
CometChatUsers,
|
|
88
93
|
CometChatUsersActionsInterface,
|
|
@@ -114,6 +119,8 @@ import {
|
|
|
114
119
|
CometChatMessageComposerInterface,
|
|
115
120
|
} from "./CometChatMessageComposer";
|
|
116
121
|
|
|
122
|
+
import { CometChatAIAssistantChatHistory } from "./CometChatAIAssistantChatHistory";
|
|
123
|
+
|
|
117
124
|
import { CometChatThreadHeader, CometChatThreadHeaderInterface } from "./CometChatThreadHeader";
|
|
118
125
|
|
|
119
126
|
import {
|
|
@@ -196,6 +203,7 @@ export {
|
|
|
196
203
|
CometChatGroups,
|
|
197
204
|
CometChatGroupsEvents,
|
|
198
205
|
CometChatGroupMembers,
|
|
206
|
+
CometChatAIAssistantChatHistory,
|
|
199
207
|
CometChatImageBubble,
|
|
200
208
|
CometChatIncomingCall,
|
|
201
209
|
//
|
|
@@ -252,7 +260,29 @@ export {
|
|
|
252
260
|
messageStatus,
|
|
253
261
|
Icon,
|
|
254
262
|
getCometChatTranslation,
|
|
255
|
-
getCurrentLanguage
|
|
263
|
+
getCurrentLanguage,
|
|
264
|
+
CometChatAIAssistantTools,
|
|
265
|
+
StreamMessage,
|
|
266
|
+
stopStreamingForRunId,
|
|
267
|
+
startStreamingForRunId,
|
|
268
|
+
streamingState$,
|
|
269
|
+
getStreamSpeed,
|
|
270
|
+
setAIAssistantTools,
|
|
271
|
+
setQueueCompletionCallback,
|
|
272
|
+
removeQueueCompletionCallback,
|
|
273
|
+
IStreamData,
|
|
274
|
+
QueueCompletionCallback,
|
|
275
|
+
checkAndTriggerQueueCompletion,
|
|
276
|
+
getAIAssistantTools,
|
|
277
|
+
handleWebsocketMessage,
|
|
278
|
+
messageStream,
|
|
279
|
+
notifyStreamRenderComplete,
|
|
280
|
+
onConnected,
|
|
281
|
+
onConnectionError,
|
|
282
|
+
onDisconnected,
|
|
283
|
+
setStreamSpeed,
|
|
284
|
+
storeAIAssistantMessage,
|
|
285
|
+
streamConnection$
|
|
256
286
|
};
|
|
257
287
|
export { CometChatThemeProvider, useTheme } from "./theme";
|
|
258
288
|
|
|
@@ -157,6 +157,8 @@ export const MessageCategoryConstants = {
|
|
|
157
157
|
action: CometChat.CATEGORY_ACTION,
|
|
158
158
|
call: CometChat.CATEGORY_CALL,
|
|
159
159
|
interactive: CometChat.CATEGORY_INTERACTIVE,
|
|
160
|
+
agentic: CometChat.CATEGORY_AGENTIC,
|
|
161
|
+
stream: "stream_message",
|
|
160
162
|
};
|
|
161
163
|
|
|
162
164
|
export const DefaultActionSheetItems = {
|
|
@@ -190,8 +192,23 @@ export const MessageTypeConstants = {
|
|
|
190
192
|
form: "form",
|
|
191
193
|
card: "card",
|
|
192
194
|
customInteractive: "customInteractive",
|
|
195
|
+
assistant: CometChat.MESSAGE_TYPE.ASSISTANT,
|
|
196
|
+
toolArguments: CometChat.MESSAGE_TYPE.TOOL_ARGUMENTS,
|
|
197
|
+
toolResults: CometChat.MESSAGE_TYPE.TOOL_RESULT,
|
|
193
198
|
};
|
|
194
199
|
|
|
200
|
+
export const streamMessageTypes = {
|
|
201
|
+
run_started: CometChat.AI_ASSISTANT_EVENTS.RUN_STARTED,
|
|
202
|
+
text_message_start: CometChat.AI_ASSISTANT_EVENTS.TEXT_MESSAGE_START,
|
|
203
|
+
text_message_content: CometChat.AI_ASSISTANT_EVENTS.TEXT_MESSAGE_CONTENT,
|
|
204
|
+
text_message_end: CometChat.AI_ASSISTANT_EVENTS.TEXT_MESSAGE_END,
|
|
205
|
+
run_finished: CometChat.AI_ASSISTANT_EVENTS.RUN_FINISHED,
|
|
206
|
+
tool_call_start: CometChat.AI_ASSISTANT_EVENTS.TOOL_CALL_STARTED,
|
|
207
|
+
tool_call_end: CometChat.AI_ASSISTANT_EVENTS.TOOL_CALL_ENDED,
|
|
208
|
+
tool_call_args: CometChat.AI_ASSISTANT_EVENTS.TOOL_CALL_ARGUMENT,
|
|
209
|
+
tool_call_result: CometChat.AI_ASSISTANT_EVENTS.TOOL_CALL_RESULT
|
|
210
|
+
}
|
|
211
|
+
|
|
195
212
|
export const ReceiverTypeConstants = {
|
|
196
213
|
user: CometChat.RECEIVER_TYPE.USER,
|
|
197
214
|
group: CometChat.RECEIVER_TYPE.GROUP,
|
|
@@ -31,7 +31,9 @@ export class CometChatMessageEvents {
|
|
|
31
31
|
static previewMessageForEdit = Symbol("previewMessageForEdit");
|
|
32
32
|
|
|
33
33
|
static onBackButtonClick = Symbol("onBackButtonClick");
|
|
34
|
-
|
|
34
|
+
static onAIAssistantMessageReceived = Symbol("onAIAssistantMessageReceived");
|
|
35
|
+
static onAIToolResultReceived = Symbol("onAIToolResultReceived");
|
|
36
|
+
static onAIToolArgumentsReceived = Symbol("onAIToolArgumentsReceived");
|
|
35
37
|
static _triggers = {};
|
|
36
38
|
|
|
37
39
|
static emit = (...args) => {
|
|
@@ -188,6 +188,9 @@ export class CometChatUIEventHandler {
|
|
|
188
188
|
case listener._eventListener?.onMessagesReadByAll?.name:
|
|
189
189
|
listener._eventListener?.onMessagesReadByAll?.(param);
|
|
190
190
|
break;
|
|
191
|
+
case listener._eventListener?.onAIAssistantMessageReceived?.name:
|
|
192
|
+
listener._eventListener?.onAIAssistantMessageReceived?.(param);
|
|
193
|
+
break;
|
|
191
194
|
}
|
|
192
195
|
});
|
|
193
196
|
}
|
|
@@ -36,6 +36,7 @@ type MessageUIEvents = {
|
|
|
36
36
|
onMessageReactionRemoved?: Function;
|
|
37
37
|
onMessagesDeliveredToAll?: Function;
|
|
38
38
|
onMessagesReadByAll?: Function;
|
|
39
|
+
onAIAssistantMessageReceived?: Function;
|
|
39
40
|
};
|
|
40
41
|
export class MessageUIEventListener {
|
|
41
42
|
ccMessageSent?: Function = undefined;
|
|
@@ -64,6 +65,7 @@ export class MessageUIEventListener {
|
|
|
64
65
|
onMessageReactionRemoved?: Function = undefined;
|
|
65
66
|
onMessagesDeliveredToAll?: Function = undefined;
|
|
66
67
|
onMessagesReadByAll?: Function = undefined;
|
|
68
|
+
onAIAssistantMessageReceived?: Function = undefined;
|
|
67
69
|
constructor({
|
|
68
70
|
ccMessageSent,
|
|
69
71
|
ccMessageEdited,
|
|
@@ -91,6 +93,7 @@ export class MessageUIEventListener {
|
|
|
91
93
|
onMessageReactionRemoved,
|
|
92
94
|
onMessagesDeliveredToAll,
|
|
93
95
|
onMessagesReadByAll,
|
|
96
|
+
onAIAssistantMessageReceived,
|
|
94
97
|
}: MessageUIEvents) {
|
|
95
98
|
if (!isFalsy(ccMessageError)) this.ccMessageError = ccMessageError;
|
|
96
99
|
if (!isFalsy(ccMessageDelivered)) this.ccMessageDelivered = ccMessageDelivered;
|
|
@@ -125,6 +128,7 @@ export class MessageUIEventListener {
|
|
|
125
128
|
if (!isFalsy(onMessagesDeliveredToAll))
|
|
126
129
|
this.onMessagesDeliveredToAll = onMessagesDeliveredToAll;
|
|
127
130
|
if (!isFalsy(onMessagesReadByAll)) this.onMessagesReadByAll = onMessagesReadByAll;
|
|
131
|
+
if (!isFalsy(onAIAssistantMessageReceived)) this.onAIAssistantMessageReceived = onAIAssistantMessageReceived;
|
|
128
132
|
}
|
|
129
133
|
}
|
|
130
134
|
|
|
@@ -2,11 +2,13 @@ import { CometChat } from "@cometchat/chat-sdk-react-native";
|
|
|
2
2
|
import { MessageTypeConstants } from "../constants/UIKitConstants";
|
|
3
3
|
import { CometChatUIEventHandler } from "./CometChatUIEventHandler/CometChatUIEventHandler";
|
|
4
4
|
import { MessageEvents } from "./messages";
|
|
5
|
+
import * as CometChatUIKitConstants from '../constants/UIKitConstants';
|
|
5
6
|
|
|
6
7
|
export class ListenerInitializer {
|
|
7
8
|
private static messageListenerId = `ListenerInitializer_listener`;
|
|
9
|
+
static streamListenerId: string = "agent_" + new Date().getTime();
|
|
8
10
|
|
|
9
|
-
public static attachListeners() {
|
|
11
|
+
public static attachListeners(user?: CometChat.User) {
|
|
10
12
|
CometChat.addMessageListener(this.messageListenerId, this.getMessageListenerObject());
|
|
11
13
|
}
|
|
12
14
|
|
|
@@ -83,6 +85,9 @@ export class ListenerInitializer {
|
|
|
83
85
|
onMessageReactionRemoved: (message: CometChat.ReactionEvent) => {
|
|
84
86
|
CometChatUIEventHandler.emitMessageEvent(MessageEvents.onMessageReactionRemoved, message);
|
|
85
87
|
},
|
|
88
|
+
onAIAssistantMessageReceived: (message: CometChat.AIAssistantMessage) => {
|
|
89
|
+
CometChatUIEventHandler.emitMessageEvent(MessageEvents.onAIAssistantMessageReceived, message);
|
|
90
|
+
}
|
|
86
91
|
});
|
|
87
92
|
}
|
|
88
93
|
}
|
|
@@ -24,4 +24,5 @@ export enum MessageEvents {
|
|
|
24
24
|
onCustomInteractiveMessageReceived = "onCustomInteractiveMessageReceived",
|
|
25
25
|
onMessageReactionAdded = "onMessageReactionAdded",
|
|
26
26
|
onMessageReactionRemoved = "onMessageReactionRemoved",
|
|
27
|
+
onAIAssistantMessageReceived = "onAIAssistantMessageReceived",
|
|
27
28
|
}
|
|
@@ -109,7 +109,8 @@ export interface DataSource {
|
|
|
109
109
|
theme: CometChatTheme
|
|
110
110
|
): JSX.Element;
|
|
111
111
|
getGroupActionBubble(message: CometChat.BaseMessage, theme: CometChatTheme): JSX.Element | null;
|
|
112
|
-
|
|
112
|
+
getAgentAssistantMessageBubble: (message: CometChat.BaseMessage, theme: CometChatTheme) => JSX.Element;
|
|
113
|
+
getAgentAssistantMessageTemplate: (theme: CometChatTheme, additionalParams?: AdditionalParams) => CometChatMessageTemplate;
|
|
113
114
|
//content views
|
|
114
115
|
getTextMessageContentView(
|
|
115
116
|
message: CometChat.BaseMessage,
|
|
@@ -167,7 +168,8 @@ export interface DataSource {
|
|
|
167
168
|
messageType: string,
|
|
168
169
|
MessageCategory: string,
|
|
169
170
|
theme: CometChatTheme,
|
|
170
|
-
additionalParams?: AdditionalParams
|
|
171
|
+
additionalParams?: AdditionalParams,
|
|
172
|
+
message?: CometChat.BaseMessage
|
|
171
173
|
): CometChatMessageTemplate | null;
|
|
172
174
|
getGroupActionTemplate(
|
|
173
175
|
theme: CometChatTheme,
|
|
@@ -158,6 +158,13 @@ export class DataSourceDecorator implements DataSource {
|
|
|
158
158
|
return this.dataSource.getGroupActionBubble(message, theme);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
+
getAgentAssistantMessageBubble(message: CometChat.BaseMessage, theme: CometChatTheme): JSX.Element {
|
|
162
|
+
return this.dataSource.getAgentAssistantMessageBubble(message, theme);
|
|
163
|
+
}
|
|
164
|
+
getAgentAssistantMessageTemplate(theme: CometChatTheme, additionalParams?: AdditionalParams): CometChatMessageTemplate {
|
|
165
|
+
return this.dataSource.getAgentAssistantMessageTemplate(theme, additionalParams);
|
|
166
|
+
}
|
|
167
|
+
|
|
161
168
|
getTextMessageContentView(
|
|
162
169
|
message: CometChat.BaseMessage,
|
|
163
170
|
alignment: MessageBubbleAlignmentType,
|
|
@@ -245,9 +252,10 @@ export class DataSourceDecorator implements DataSource {
|
|
|
245
252
|
messageType: string,
|
|
246
253
|
MessageCategory: string,
|
|
247
254
|
theme: CometChatTheme,
|
|
248
|
-
additionalParams?: AdditionalParams
|
|
255
|
+
additionalParams?: AdditionalParams,
|
|
256
|
+
message?: CometChat.BaseMessage
|
|
249
257
|
): CometChatMessageTemplate | null {
|
|
250
|
-
return this.dataSource.getMessageTemplate(messageType, MessageCategory, theme, additionalParams);
|
|
258
|
+
return this.dataSource.getMessageTemplate(messageType, MessageCategory, theme, additionalParams, message);
|
|
251
259
|
}
|
|
252
260
|
|
|
253
261
|
getGroupActionTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
MessageOptionConstants,
|
|
23
23
|
MessageTypeConstants,
|
|
24
24
|
} from "../constants/UIKitConstants";
|
|
25
|
+
import { CometChatUiKitConstants } from "../index";
|
|
25
26
|
import { CometChatMessageComposerAction } from "../helper/types";
|
|
26
27
|
import { Icon } from "../icons/Icon";
|
|
27
28
|
import { CometChatMessageOption } from "../modals/CometChatMessageOption";
|
|
@@ -33,10 +34,13 @@ import { CometChatFileBubble } from "../views/CometChatFileBubble";
|
|
|
33
34
|
import { CometChatImageBubble } from "../views/CometChatImageBubble";
|
|
34
35
|
import { CometChatTextBubble } from "../views/CometChatTextBubble";
|
|
35
36
|
import { CometChatVideoBubble } from "../views/CometChatVideoBubble";
|
|
37
|
+
import CometChatAIAssistantMessageBubble from '../views/CometChatAIAssistantMessageBubble/CometChatAIAssistantMessageBubble';
|
|
38
|
+
import CometChatStreamMessageBubble from '../views/CometChatStreamMessageBubble/CometChatStreamMessageBubble';
|
|
36
39
|
import { ChatConfigurator } from "./ChatConfigurator";
|
|
37
40
|
import { DataSource } from "./DataSource";
|
|
38
41
|
import { CommonUtils } from "../utils/CommonUtils";
|
|
39
|
-
import { DimensionValue, ViewStyle } from "react-native";
|
|
42
|
+
import { DimensionValue, TouchableOpacity, ViewStyle } from "react-native";
|
|
43
|
+
import Clipboard from "@react-native-clipboard/clipboard";
|
|
40
44
|
import { getCometChatTranslation } from "../resources/CometChatLocalizeNew/LocalizationManager";
|
|
41
45
|
|
|
42
46
|
const t = getCometChatTranslation();
|
|
@@ -90,6 +94,65 @@ function isDeletedMessage(message: CometChat.BaseMessage): boolean {
|
|
|
90
94
|
}
|
|
91
95
|
|
|
92
96
|
export class MessageDataSource implements DataSource {
|
|
97
|
+
|
|
98
|
+
// --- AI/Tool/Stream Bubble Implementations ---
|
|
99
|
+
getAgentAssistantMessageBubble(message: CometChat.BaseMessage, theme: CometChatTheme): JSX.Element {
|
|
100
|
+
return <CometChatAIAssistantMessageBubble message={message} theme={theme} />;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
getStreamMessageBubble(message: CometChat.BaseMessage, theme: CometChatTheme): JSX.Element {
|
|
104
|
+
return <CometChatStreamMessageBubble key={message.getId() + message.getType()} message={message} theme={theme} />;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
handleCopy = (message: CometChat.BaseMessage) => {
|
|
108
|
+
try {
|
|
109
|
+
let textToCopy = "";
|
|
110
|
+
|
|
111
|
+
if (isTextMessage(message)) {
|
|
112
|
+
textToCopy = message.getText();
|
|
113
|
+
} else {
|
|
114
|
+
const messageData = message as any;
|
|
115
|
+
textToCopy = messageData.data?.text ||
|
|
116
|
+
messageData.data?.content ||
|
|
117
|
+
messageData.text ||
|
|
118
|
+
messageData.content || "";
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (textToCopy?.trim()) {
|
|
122
|
+
Clipboard.setString(textToCopy);
|
|
123
|
+
}
|
|
124
|
+
} catch (err) {
|
|
125
|
+
console.error(err);
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
getAgentAssistantMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {
|
|
131
|
+
return new CometChatMessageTemplate({
|
|
132
|
+
type: 'assistant',
|
|
133
|
+
category: 'agentic',
|
|
134
|
+
ContentView: (message: CometChat.BaseMessage) =>
|
|
135
|
+
this.getAgentAssistantMessageBubble(message, theme),
|
|
136
|
+
|
|
137
|
+
options: undefined,
|
|
138
|
+
|
|
139
|
+
FooterView: (message: CometChat.BaseMessage) => (
|
|
140
|
+
<TouchableOpacity onPress={() => this.handleCopy(message as CometChat.AIAssistantMessage)}>
|
|
141
|
+
<Icon name="ai-copy-option" width={24} height={24} containerStyle={{marginLeft: 10, marginBottom: -20}} color={theme.color.textSecondary} />
|
|
142
|
+
</TouchableOpacity>
|
|
143
|
+
),
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
getStreamMessageTemplate(theme: CometChatTheme, additionalParams?: AdditionalParams): CometChatMessageTemplate {
|
|
148
|
+
return new CometChatMessageTemplate({
|
|
149
|
+
type: CometChatUiKitConstants.streamMessageTypes.run_started,
|
|
150
|
+
category: MessageCategoryConstants.stream,
|
|
151
|
+
ContentView: (message: CometChat.BaseMessage) => this.getStreamMessageBubble(message, theme),
|
|
152
|
+
options: undefined,
|
|
153
|
+
FooterView: undefined,
|
|
154
|
+
});
|
|
155
|
+
}
|
|
93
156
|
getEditOption(theme: CometChatTheme): CometChatMessageOption {
|
|
94
157
|
return {
|
|
95
158
|
id: MessageOptionConstants.editMessage,
|
|
@@ -1349,6 +1412,7 @@ export class MessageDataSource implements DataSource {
|
|
|
1349
1412
|
ChatConfigurator.dataSource.getFormMessageTemplate(theme, additionalParams),
|
|
1350
1413
|
ChatConfigurator.dataSource.getSchedulerMessageTemplate(theme, additionalParams),
|
|
1351
1414
|
ChatConfigurator.dataSource.getCardMessageTemplate(theme, additionalParams),
|
|
1415
|
+
ChatConfigurator.dataSource.getAgentAssistantMessageTemplate(theme, additionalParams),
|
|
1352
1416
|
];
|
|
1353
1417
|
}
|
|
1354
1418
|
|
|
@@ -1390,8 +1454,13 @@ export class MessageDataSource implements DataSource {
|
|
|
1390
1454
|
case MessageTypeConstants.card:
|
|
1391
1455
|
template = ChatConfigurator.dataSource.getCardMessageTemplate(theme, additionalParams);
|
|
1392
1456
|
break;
|
|
1457
|
+
case MessageTypeConstants.assistant:
|
|
1458
|
+
template = ChatConfigurator.dataSource.getAgentAssistantMessageTemplate(theme, additionalParams);
|
|
1459
|
+
break;
|
|
1460
|
+
default:
|
|
1461
|
+
return null;
|
|
1393
1462
|
}
|
|
1394
|
-
return
|
|
1463
|
+
return template;
|
|
1395
1464
|
}
|
|
1396
1465
|
|
|
1397
1466
|
getAllMessageTypes(): string[] {
|
|
@@ -1406,6 +1475,7 @@ export class MessageDataSource implements DataSource {
|
|
|
1406
1475
|
MessageTypeConstants.form,
|
|
1407
1476
|
MessageTypeConstants.card,
|
|
1408
1477
|
MessageTypeConstants.scheduler,
|
|
1478
|
+
MessageTypeConstants.assistant
|
|
1409
1479
|
];
|
|
1410
1480
|
}
|
|
1411
1481
|
getAllMessageCategories(): string[] {
|
|
@@ -1413,6 +1483,7 @@ export class MessageDataSource implements DataSource {
|
|
|
1413
1483
|
MessageCategoryConstants.message,
|
|
1414
1484
|
MessageCategoryConstants.action,
|
|
1415
1485
|
MessageCategoryConstants.interactive,
|
|
1486
|
+
MessageCategoryConstants.agentic
|
|
1416
1487
|
];
|
|
1417
1488
|
}
|
|
1418
1489
|
getAuxiliaryOptions(
|
|
@@ -1769,3 +1840,5 @@ export class MessageDataSource implements DataSource {
|
|
|
1769
1840
|
return new CometChatUrlsFormatter(loggedInUser);
|
|
1770
1841
|
}
|
|
1771
1842
|
}
|
|
1843
|
+
//for internal use only
|
|
1844
|
+
export const internalMessageDataSource = new MessageDataSource();
|
|
@@ -61,7 +61,7 @@ export const Icon = (props: IconProps) => {
|
|
|
61
61
|
return (
|
|
62
62
|
<View style={[containerStyle]}>
|
|
63
63
|
<IconComponent
|
|
64
|
-
color={color}
|
|
64
|
+
color={color as any}
|
|
65
65
|
height={typeof height === "number" ? height : (size as number)}
|
|
66
66
|
width={typeof width === "number" ? width : (size as number)}
|
|
67
67
|
/>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import Svg, { Path } from "react-native-svg";
|
|
3
|
+
|
|
4
|
+
function SvgComponent({ width = 24, height = 24, color = "#A1A1A1", ...props }) {
|
|
5
|
+
return (
|
|
6
|
+
<Svg
|
|
7
|
+
width={width}
|
|
8
|
+
height={height}
|
|
9
|
+
viewBox="0 0 24 24"
|
|
10
|
+
fill="none"
|
|
11
|
+
{...props}
|
|
12
|
+
>
|
|
13
|
+
<Path
|
|
14
|
+
d="M11.944 20.85c-2.24 0-4.18-.734-5.82-2.202-1.638-1.468-2.6-3.293-2.882-5.475a.67.67 0 01.167-.566.758.758 0 01.558-.27c.21-.01.396.052.556.188.16.136.26.313.303.53.252 1.775 1.045 3.253 2.379 4.437 1.333 1.183 2.913 1.775 4.738 1.775 2.035 0 3.764-.716 5.186-2.147 1.422-1.43 2.133-3.164 2.133-5.2 0-2.01-.717-3.711-2.15-5.101-1.435-1.39-3.162-2.086-5.183-2.086a6.661 6.661 0 00-3.146.769 8.182 8.182 0 00-2.52 2.048h1.82c.225 0 .414.076.567.23a.76.76 0 01.229.557.77.77 0 01-.23.567.77.77 0 01-.566.23H4.367a.777.777 0 01-.788-.796V4.633c0-.218.075-.403.225-.555a.757.757 0 01.563-.23c.225 0 .413.077.566.23a.76.76 0 01.23.558v1.746a9.106 9.106 0 013.026-2.375 8.422 8.422 0 013.74-.858c1.228 0 2.383.23 3.466.69a9.005 9.005 0 012.835 1.885 8.92 8.92 0 011.913 2.797 8.48 8.48 0 01.703 3.443 8.606 8.606 0 01-.703 3.462 8.993 8.993 0 01-1.91 2.823 9.021 9.021 0 01-2.827 1.902 8.65 8.65 0 01-3.462.698zm.885-9.203l2.72 2.69a.782.782 0 01.242.571c0 .22-.08.409-.241.567a.77.77 0 01-1.118-.005l-2.952-2.936a.77.77 0 01-.235-.572V7.821c0-.219.075-.405.226-.558a.755.755 0 01.562-.23.77.77 0 01.567.23.76.76 0 01.229.558v3.826z"
|
|
15
|
+
fill={color}
|
|
16
|
+
/>
|
|
17
|
+
</Svg>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default SvgComponent;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import Svg, { Path } from "react-native-svg";
|
|
3
|
+
|
|
4
|
+
function SvgComponent({ width = 24, height = 24, color = "#A1A1A1", ...props }) {
|
|
5
|
+
return (
|
|
6
|
+
<Svg
|
|
7
|
+
width={width}
|
|
8
|
+
height={height}
|
|
9
|
+
viewBox="0 0 24 24"
|
|
10
|
+
fill="none"
|
|
11
|
+
{...props}
|
|
12
|
+
>
|
|
13
|
+
<Path
|
|
14
|
+
d="M4.598 14.556c-.356 0-.664-.131-.926-.393a1.267 1.267 0 01-.393-.927V2.125c0-.356.13-.665.393-.927.262-.261.57-.392.926-.392h8.611c.357 0 .665.13.927.392s.393.571.393.927v11.111c0 .356-.131.665-.393.927s-.57.393-.926.393H4.598zm0-1.32h8.611V2.125H4.6v11.111zM1.96 17.194c-.356 0-.665-.13-.927-.392a1.267 1.267 0 01-.393-.927V4.101c0-.18.065-.334.193-.463a.638.638 0 01.47-.194.63.63 0 01.465.194.635.635 0 01.192.463v11.774h9.274a.63.63 0 01.463.194c.129.13.193.284.193.465a.635.635 0 01-.193.47.635.635 0 01-.463.19H1.96z"
|
|
15
|
+
fill={color}
|
|
16
|
+
/>
|
|
17
|
+
</Svg>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default SvgComponent;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import Svg, { Path } from "react-native-svg";
|
|
3
|
+
|
|
4
|
+
function SvgComponent({ width = 24, height = 24, color = "#A1A1A1", ...props }) {
|
|
5
|
+
return (
|
|
6
|
+
<Svg
|
|
7
|
+
width={width}
|
|
8
|
+
height={height}
|
|
9
|
+
viewBox="0 0 24 24"
|
|
10
|
+
fill="none"
|
|
11
|
+
{...props}
|
|
12
|
+
>
|
|
13
|
+
<Path
|
|
14
|
+
d="M11.167 12.833H5.833a.805.805 0 01-.594-.24.811.811 0 01-.239-.596.8.8 0 01.24-.593.81.81 0 01.593-.237h5.334V5.833c0-.236.08-.434.24-.594.16-.16.359-.239.596-.239a.8.8 0 01.593.24.81.81 0 01.237.593v5.334h5.334c.236 0 .434.08.593.24.16.16.24.359.24.596a.8.8 0 01-.24.593.81.81 0 01-.593.237h-5.334v5.334c0 .236-.08.434-.24.593a.811.811 0 01-.596.24.8.8 0 01-.593-.24.81.81 0 01-.237-.593v-5.334z"
|
|
15
|
+
fill={color}
|
|
16
|
+
/>
|
|
17
|
+
</Svg>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default SvgComponent;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import Svg, { Path } from "react-native-svg";
|
|
3
|
+
|
|
4
|
+
function SvgComponent({ width = 20, height = 20, color = "#000", ...props }) {
|
|
5
|
+
return (
|
|
6
|
+
<Svg
|
|
7
|
+
width={width}
|
|
8
|
+
height={height}
|
|
9
|
+
viewBox="0 0 20 20"
|
|
10
|
+
fill="none"
|
|
11
|
+
{...props}
|
|
12
|
+
>
|
|
13
|
+
<Path
|
|
14
|
+
d="M10 16.667V3.333m0 0l-5 5m5-5l5 5"
|
|
15
|
+
stroke={color}
|
|
16
|
+
strokeWidth={1.5}
|
|
17
|
+
strokeLinecap="round"
|
|
18
|
+
strokeLinejoin="round"
|
|
19
|
+
/>
|
|
20
|
+
</Svg>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default SvgComponent;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Svg, { Path } from "react-native-svg";
|
|
2
|
+
import type { SvgProps } from "react-native-svg";
|
|
3
|
+
|
|
4
|
+
const SvgComponent = ({ height = 11, width = 11, color = "#858585" }: SvgProps) => (
|
|
5
|
+
<Svg width={width} height={height} fill="none" viewBox="0 0 11 11">
|
|
6
|
+
<Path
|
|
7
|
+
d="M8.70648 6.52443H0.809309C0.659309 6.52443 0.533364 6.47443 0.431475 6.37443C0.329698 6.27443 0.278809 6.14943 0.278809 5.99943C0.278809 5.84943 0.329698 5.72348 0.431475 5.62159C0.533364 5.51982 0.659309 5.46893 0.809309 5.46893H8.70648L5.12881 1.89109C5.02325 1.78554 4.96997 1.66237 4.96898 1.52159C4.96809 1.38093 5.02225 1.25593 5.13147 1.14659C5.23703 1.04293 5.3602 0.990649 5.50098 0.98976C5.64175 0.98876 5.76675 1.04104 5.87598 1.14659L10.3538 5.62443C10.4075 5.68187 10.4478 5.74065 10.4746 5.80076C10.5014 5.86098 10.5148 5.92721 10.5148 5.99943C10.5148 6.07165 10.5014 6.13787 10.4746 6.19809C10.4478 6.25821 10.4075 6.31515 10.3538 6.36893L5.87598 10.8466C5.76853 10.954 5.64398 11.0078 5.50231 11.0078C5.36064 11.0078 5.23703 10.954 5.13147 10.8466C5.02225 10.741 4.96764 10.6174 4.96764 10.4758C4.96764 10.3341 5.02225 10.2105 5.13147 10.1049L8.70648 6.52443Z"
|
|
8
|
+
fill={color}
|
|
9
|
+
/>
|
|
10
|
+
</Svg>
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
export default SvgComponent;
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import Svg, { Mask, Path, G } from "react-native-svg";
|
|
2
2
|
import type { SvgProps } from "react-native-svg";
|
|
3
|
+
|
|
3
4
|
const SvgComponent = ({ height, width, color }: SvgProps) => (
|
|
4
|
-
<Svg width={width} height={height} fill=
|
|
5
|
+
<Svg width={width} height={height} fill="none" viewBox="0 0 24 24">
|
|
5
6
|
<Mask
|
|
6
|
-
id=
|
|
7
|
+
id="prefix__a"
|
|
7
8
|
width={24}
|
|
8
9
|
height={24}
|
|
9
10
|
x={0}
|
|
10
11
|
y={0}
|
|
11
|
-
maskUnits=
|
|
12
|
-
style={{
|
|
13
|
-
maskType: "alpha",
|
|
14
|
-
}}
|
|
12
|
+
maskUnits="userSpaceOnUse"
|
|
13
|
+
style={{ maskType: "alpha" }}
|
|
15
14
|
>
|
|
16
|
-
<Path fill=
|
|
15
|
+
<Path fill="#D9D9D9" d="M0 0h24v24H0z" />
|
|
17
16
|
</Mask>
|
|
18
|
-
<G mask=
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
<G mask="url(#prefix__a)">
|
|
18
|
+
{/* Scale the inner square around center */}
|
|
19
|
+
<G transform="scale(1.2) translate(-2,-2)">
|
|
20
|
+
<Path
|
|
21
|
+
fill={color}
|
|
22
|
+
d="M6.5 15.692V8.308q0-.746.531-1.277A1.74 1.74 0 0 1 8.308 6.5h7.384q.746 0 1.277.531t.531 1.277v7.384q0 .746-.531 1.277a1.74 1.74 0 0 1-1.277.531H8.308a1.74 1.74 0 0 1-1.277-.531 1.74 1.74 0 0 1-.531-1.277"
|
|
23
|
+
/>
|
|
24
|
+
</G>
|
|
23
25
|
</G>
|
|
24
26
|
</Svg>
|
|
25
27
|
);
|
|
@@ -255,6 +255,7 @@ import SubdirectoryArrowLeft from "./components/subdirectory-arrow-left";
|
|
|
255
255
|
import SubdirectoryArrowLeftFill from "./components/subdirectory-arrow-left-fill";
|
|
256
256
|
import SubdirectoryArrowRight from "./components/subdirectory-arrow-right";
|
|
257
257
|
import SubdirectoryArrowRightFill from "./components/subdirectory-arrow-right-fill";
|
|
258
|
+
import rightArrow from "./components/right-arrow";
|
|
258
259
|
import Sunny from "./components/sunny";
|
|
259
260
|
import SunnyFill from "./components/sunny-fill";
|
|
260
261
|
import Symbols from "./components/symbols";
|
|
@@ -305,6 +306,11 @@ import TextFileType from "./components/text-file-type";
|
|
|
305
306
|
import UnknownFileType from "./components/unknown-file-type";
|
|
306
307
|
import VideoFileType from "./components/video-file-type";
|
|
307
308
|
import ZipFileType from "./components/zip-file-type";
|
|
309
|
+
import AISendButton from "./components/ai-send-button";
|
|
310
|
+
import AINewChatButton from "./components/ai-new-chat";
|
|
311
|
+
import AIChatHistory from "./components/ai-chat-history";
|
|
312
|
+
import AICopyOption from "./components/ai-copy-option";
|
|
313
|
+
|
|
308
314
|
|
|
309
315
|
/**************************************** */
|
|
310
316
|
|
|
@@ -556,6 +562,7 @@ export const ICONS = {
|
|
|
556
562
|
"subdirectory-arrow-left-fill": SubdirectoryArrowLeftFill,
|
|
557
563
|
"subdirectory-arrow-right": SubdirectoryArrowRight,
|
|
558
564
|
"subdirectory-arrow-right-fill": SubdirectoryArrowRightFill,
|
|
565
|
+
"right-arrow": rightArrow,
|
|
559
566
|
sunny: Sunny,
|
|
560
567
|
"sunny-fill": SunnyFill,
|
|
561
568
|
"thumb-down": ThumbDown,
|
|
@@ -617,4 +624,11 @@ export const ICONS = {
|
|
|
617
624
|
"document-file-type": DocumentFileType,
|
|
618
625
|
"zip-file-type": ZipFileType,
|
|
619
626
|
/***************************************/
|
|
627
|
+
|
|
628
|
+
/******AI Agent Icons******/
|
|
629
|
+
"ai-send-button": AISendButton,
|
|
630
|
+
"ai-new-chat": AINewChatButton,
|
|
631
|
+
"ai-chat-history": AIChatHistory,
|
|
632
|
+
"ai-copy-option": AICopyOption,
|
|
633
|
+
|
|
620
634
|
} as const;
|