@sendbird/ai-agent-messenger-react 1.12.1 → 1.13.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/dist/cjs/{BqqUZm8O.cjs → B1EyhD-2.cjs} +1 -1
- package/dist/cjs/{B7nHrkZr.cjs → B75_RK1b.cjs} +1 -1
- package/dist/cjs/{DmDrTrAj.cjs → BR_bOr-Y.cjs} +1 -1
- package/dist/cjs/{CYl0TB9K.cjs → Ci7Su9OO.cjs} +1 -1
- package/dist/cjs/{5Lr6wyPw.cjs → D0ZzpfdW.cjs} +1 -1
- package/dist/cjs/{DFPyrSw6.cjs → D3sz6O-l.cjs} +1 -1
- package/dist/cjs/{XvnynRF8.cjs → DUDXGnqg.cjs} +1 -1
- package/dist/cjs/{CaVzYM3U.cjs → DUJ7QCV9.cjs} +1 -1
- package/dist/cjs/{6EKqJLfN.cjs → DkIeZWe9.cjs} +1 -1
- package/dist/cjs/DteMrIDa.cjs +306 -0
- package/dist/cjs/{BDoTTrEp.cjs → FPcgniHk.cjs} +1 -1
- package/dist/es/{BxyHxGIQ.js → 4_6hq4x3.js} +1 -1
- package/dist/es/{D6dxVf94.js → BGcty2ek.js} +1 -1
- package/dist/es/{BqB6-SJq.js → BxWKGsN8.js} +1 -1
- package/dist/es/{DwQa75gK.js → C9VMhstH.js} +1 -1
- package/dist/es/{DymDm9yp.js → D5KHmygq.js} +1 -1
- package/dist/es/{DS8WzEux.js → D7zRQ3VS.js} +1 -1
- package/dist/es/{BnsJMOqR.js → DQFii4-w.js} +1561 -1555
- package/dist/es/{BAbu4Z0g.js → DsASYf2Y.js} +1 -1
- package/dist/es/{C3PwqRVy.js → Dur4PKN0.js} +1 -1
- package/dist/es/{CDuYbuWq.js → kx5oY12W.js} +1 -1
- package/dist/es/{COiJ47m_.js → mtnNHynw.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +34 -6
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/DVzY6ycf.cjs +0 -306
|
@@ -3,7 +3,7 @@ import { useCallback as s } from "react";
|
|
|
3
3
|
import h from "dompurify";
|
|
4
4
|
import x, { RuleType as g } from "markdown-to-jsx";
|
|
5
5
|
import b from "styled-components";
|
|
6
|
-
import { A as c, e as m, c as r } from "./
|
|
6
|
+
import { A as c, e as m, c as r } from "./DQFii4-w.js";
|
|
7
7
|
const w = (d, o, a, e) => o.type === g.textStrikethroughed ? /* @__PURE__ */ t.createElement("span", { key: e.key }, `~~${a(o.children, e)}~~`) : d(), v = ({ className: d, children: o, style: a, onClickImage: e }) => {
|
|
8
8
|
const p = s((i) => {
|
|
9
9
|
const n = /* @__PURE__ */ t.createElement("img", { ...i, alt: i.alt || "" }), l = i.src;
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./cjs/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./cjs/DteMrIDa.cjs");require("react");exports.AgentProviderContainer=e.AgentProviderContainer;exports.AgentUIProviderContainer=e.AgentUIProviderContainer;exports.AnonymousSessionInfo=e.AnonymousSessionInfo;exports.CSATType=e.CSATType;exports.Commands=e.DispatcherCommands;exports.Conversation=e.Conversation;exports.ConversationContext=e.ConversationContext;exports.ConversationContextProvider=e.ConversationContextProvider;exports.ConversationHeaderLayout=e.ConversationHeaderLayout;exports.ConversationLayout=e.ConversationLayout;exports.ConversationList=e.ConversationList;exports.ConversationListContext=e.ConversationListContext;exports.ConversationListContextProvider=e.ConversationListContextProvider;exports.ConversationListHeaderLayout=e.ConversationListHeaderLayout;exports.ConversationListItemLayout=e.ConversationListItemLayout;exports.ConversationListLayout=e.ConversationListLayout;exports.DefaultMessenger=e.DefaultMessenger;exports.FixedMessenger=e.FixedMessenger;exports.IncomingMessageLayout=e.IncomingMessageLayout;exports.LauncherBase=e.LauncherBase;exports.LogLevel=e.LogLevel;exports.ManualSessionInfo=e.ManualSessionInfo;exports.MessageLogs=e.MessageLogs;exports.OutgoingMessageLayout=e.OutgoingMessageLayout;exports.PlaceholderLayout=e.PlaceholderLayout;exports.SystemMessageLayout=e.SystemMessageLayout;exports.messengerDispatcher=e.messengerDispatcher;exports.useConversationContext=e.useConversationContext;exports.useConversationListContext=e.useConversationListContext;exports.useLocalizationContext=e.useLocalizationContext;exports.useMessengerContext=e.useMessengerContext;exports.useMessengerSessionContext=e.useMessengerSessionContext;exports.useRefreshActiveChannel=e.useRefreshActiveChannel;
|
package/dist/index.d.ts
CHANGED
|
@@ -127,7 +127,7 @@ customChatSDK?: SendbirdChatWith<[GroupChannelModule, AIAgentModule]>;
|
|
|
127
127
|
* @public
|
|
128
128
|
* @description Custom parameters for initializing the chat SDK.
|
|
129
129
|
* */
|
|
130
|
-
chatParams?: SendbirdChatParams<[GroupChannelModule, AIAgentModule]
|
|
130
|
+
chatParams?: Partial<SendbirdChatParams<[GroupChannelModule, AIAgentModule]>>;
|
|
131
131
|
/**
|
|
132
132
|
* @public
|
|
133
133
|
* @description Custom state management for the ai agent client.
|
|
@@ -496,7 +496,7 @@ export declare type AIAgentProps = PropsWithChildren<{
|
|
|
496
496
|
* @public
|
|
497
497
|
* @description Custom parameters for initializing the chat SDK.
|
|
498
498
|
* */
|
|
499
|
-
chatParams?: SendbirdChatParams<[GroupChannelModule, AIAgentModule]
|
|
499
|
+
chatParams?: Partial<SendbirdChatParams<[GroupChannelModule, AIAgentModule]>>;
|
|
500
500
|
/**
|
|
501
501
|
* @public
|
|
502
502
|
* @description Custom state management for the ai agent client.
|
|
@@ -789,7 +789,7 @@ declare interface ContextObject {
|
|
|
789
789
|
context: Record<string, string>;
|
|
790
790
|
}
|
|
791
791
|
|
|
792
|
-
export declare const Conversation: ({ children, onNavigateToConversationList, channelUrl, onClearChannelUrl, shouldMarkAsRead, closedChannelUrl, onClearClosedChannelUrl, }:
|
|
792
|
+
export declare const Conversation: ({ children, onNavigateToConversationList, channelUrl, onClearChannelUrl, shouldMarkAsRead, closedChannelUrl, onClearClosedChannelUrl, }: Props_5) => JSX.Element;
|
|
793
793
|
|
|
794
794
|
export declare const ConversationContext: Context<ConversationContextValue | null>;
|
|
795
795
|
|
|
@@ -927,7 +927,7 @@ export declare const ConversationLayout: {
|
|
|
927
927
|
}) => null;
|
|
928
928
|
};
|
|
929
929
|
|
|
930
|
-
export declare const ConversationList: ({ conversationListLimit, conversationListFilter, children, onOpenConversationView, }:
|
|
930
|
+
export declare const ConversationList: ({ conversationListLimit, conversationListFilter, children, onOpenConversationView, }: Props_6) => JSX.Element;
|
|
931
931
|
|
|
932
932
|
/**
|
|
933
933
|
* Parameters for creating a ConversationListCollection instance.
|
|
@@ -1155,6 +1155,15 @@ declare type CustomEvent_2 = {
|
|
|
1155
1155
|
};
|
|
1156
1156
|
export { CustomEvent_2 as CustomEvent }
|
|
1157
1157
|
|
|
1158
|
+
declare interface CustomMessageTemplateData {
|
|
1159
|
+
id: string;
|
|
1160
|
+
response: {
|
|
1161
|
+
status: number;
|
|
1162
|
+
content: string | null;
|
|
1163
|
+
};
|
|
1164
|
+
error: string | null;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1158
1167
|
export declare const DefaultMessenger: ForwardRefExoticComponent<MessengerProps & RefAttributes<MessengerSessionRef>>;
|
|
1159
1168
|
|
|
1160
1169
|
declare interface Dispatcher {
|
|
@@ -1170,6 +1179,16 @@ declare function ExtendedCitation({ extendedMessagePayload, onClickCitation, }:
|
|
|
1170
1179
|
|
|
1171
1180
|
declare function ExtendedCTAButton({ extendedMessagePayload, onClickCTA, }: IncomingMessageProps): JSX.Element | null;
|
|
1172
1181
|
|
|
1182
|
+
/**
|
|
1183
|
+
* Default component for rendering custom message templates. Intentionally empty by default.
|
|
1184
|
+
*
|
|
1185
|
+
* Replace this to render custom templates from `extendedMessagePayload.custom_message_templates`.
|
|
1186
|
+
*
|
|
1187
|
+
* @example
|
|
1188
|
+
* <IncomingMessageLayout.CustomMessageTemplate component={MyCustomTemplate} />
|
|
1189
|
+
*/
|
|
1190
|
+
declare function ExtendedCustomMessageTemplate(_: Props_4): JSX.Element;
|
|
1191
|
+
|
|
1173
1192
|
declare function ExtendedFeedback({ isBotMessage, isConversationClosed, isStreaming, isFeedbackEnabled, isFeedbackCommentEnabled, extendedMessagePayload, onFeedbackUpdate, }: IncomingMessageProps): JSX.Element | null;
|
|
1174
1193
|
|
|
1175
1194
|
/**
|
|
@@ -1191,6 +1210,7 @@ export declare interface ExtendedMessagePayload {
|
|
|
1191
1210
|
suggested_replies: string[];
|
|
1192
1211
|
user_input_disabled_by: 'suggested_replies';
|
|
1193
1212
|
message_template: MessageTemplateShape;
|
|
1213
|
+
custom_message_templates: CustomMessageTemplateData[];
|
|
1194
1214
|
csat: {
|
|
1195
1215
|
type: 'AI_AGENT_CSAT_5' | 'AI_AGENT_CSAT_5_WITH_CRE' | 'HELPDESK_CSAT_5';
|
|
1196
1216
|
visibility: boolean;
|
|
@@ -1448,6 +1468,7 @@ export declare const IncomingMessageLayout: {
|
|
|
1448
1468
|
TypingIndicator: typeof IncomingTypingIndicator;
|
|
1449
1469
|
SuggestedReplies: typeof ExtendedSuggestedReplies;
|
|
1450
1470
|
MessageTemplate: typeof ExtendedMessageTemplate;
|
|
1471
|
+
CustomMessageTemplate: typeof ExtendedCustomMessageTemplate;
|
|
1451
1472
|
CTAButton: typeof ExtendedCTAButton;
|
|
1452
1473
|
Citation: typeof ExtendedCitation;
|
|
1453
1474
|
Form: (props: IncomingMessageProps) => JSX.Element | null;
|
|
@@ -1467,6 +1488,7 @@ export declare const IncomingMessageLayout: {
|
|
|
1467
1488
|
TypingIndicator: typeof IncomingTypingIndicator;
|
|
1468
1489
|
SuggestedReplies: typeof ExtendedSuggestedReplies;
|
|
1469
1490
|
MessageTemplate: typeof ExtendedMessageTemplate;
|
|
1491
|
+
CustomMessageTemplate: typeof ExtendedCustomMessageTemplate;
|
|
1470
1492
|
CTAButton: typeof ExtendedCTAButton;
|
|
1471
1493
|
Citation: typeof ExtendedCitation;
|
|
1472
1494
|
Form: (props: IncomingMessageProps) => JSX.Element | null;
|
|
@@ -1481,6 +1503,7 @@ export declare const IncomingMessageLayout: {
|
|
|
1481
1503
|
TypingIndicator: typeof IncomingTypingIndicator;
|
|
1482
1504
|
SuggestedReplies: typeof ExtendedSuggestedReplies;
|
|
1483
1505
|
MessageTemplate: typeof ExtendedMessageTemplate;
|
|
1506
|
+
CustomMessageTemplate: typeof ExtendedCustomMessageTemplate;
|
|
1484
1507
|
CTAButton: typeof ExtendedCTAButton;
|
|
1485
1508
|
Citation: typeof ExtendedCitation;
|
|
1486
1509
|
Form: (props: IncomingMessageProps) => JSX.Element | null;
|
|
@@ -1509,6 +1532,9 @@ export declare const IncomingMessageLayout: {
|
|
|
1509
1532
|
SuggestedReplies: (props: {
|
|
1510
1533
|
component: typeof ExtendedSuggestedReplies;
|
|
1511
1534
|
}) => null;
|
|
1535
|
+
CustomMessageTemplate: (props: {
|
|
1536
|
+
component: typeof ExtendedCustomMessageTemplate;
|
|
1537
|
+
}) => null;
|
|
1512
1538
|
CTAButton: (props: {
|
|
1513
1539
|
component: typeof ExtendedCTAButton;
|
|
1514
1540
|
}) => null;
|
|
@@ -2110,7 +2136,9 @@ declare type Props_2 = {
|
|
|
2110
2136
|
|
|
2111
2137
|
declare type Props_3 = Pick<IncomingMessageProps, 'extendedMessagePayload' | 'onGetCachedMessageTemplate' | 'onRequestMessageTemplate' | 'onHandleTemplateInternalAction' | 'messageTemplateErrorFallback' | 'messageTemplateLoadingFallback'>;
|
|
2112
2138
|
|
|
2113
|
-
declare type Props_4 =
|
|
2139
|
+
declare type Props_4 = IncomingMessageProps;
|
|
2140
|
+
|
|
2141
|
+
declare type Props_5 = PropsWithChildren<{
|
|
2114
2142
|
channelUrl?: string;
|
|
2115
2143
|
onClearChannelUrl?: () => void;
|
|
2116
2144
|
onNavigateToConversationList?: () => void;
|
|
@@ -2121,7 +2149,7 @@ declare type Props_4 = PropsWithChildren<{
|
|
|
2121
2149
|
onClearClosedChannelUrl?: () => void;
|
|
2122
2150
|
}>;
|
|
2123
2151
|
|
|
2124
|
-
declare type
|
|
2152
|
+
declare type Props_6 = PropsWithChildren<{
|
|
2125
2153
|
conversationListLimit?: number;
|
|
2126
2154
|
conversationListFilter?: Partial<AIAgentGroupChannelFilter>;
|
|
2127
2155
|
onOpenConversationView?: (channelUrl: string, status: 'open' | 'closed') => void;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as o, b as n, B as t, x as i, D as r, j as C, n as L, o as u, l as v, k as g, q as y, t as x, v as d, s as M, C as m, r as l, h as c, F as f, I as h, L as I, y as P, z as S, M as p, O as A, P as D, S as z, g as B, p as F, w as H, f as O, u as T, d as b, i as j } from "./es/
|
|
1
|
+
import { a as o, b as n, B as t, x as i, D as r, j as C, n as L, o as u, l as v, k as g, q as y, t as x, v as d, s as M, C as m, r as l, h as c, F as f, I as h, L as I, y as P, z as S, M as p, O as A, P as D, S as z, g as B, p as F, w as H, f as O, u as T, d as b, i as j } from "./es/DQFii4-w.js";
|
|
2
2
|
import "react";
|
|
3
3
|
export {
|
|
4
4
|
o as AgentProviderContainer,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sendbird/ai-agent-messenger-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "Delight AI Agent Messenger for React",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"react-dom": "^19.0.0",
|
|
45
45
|
"strip-json-comments": "^5.0.1",
|
|
46
46
|
"styled-components": "^6.1.15",
|
|
47
|
-
"@sendbird/ai-agent-core": "1.
|
|
47
|
+
"@sendbird/ai-agent-core": "1.13.0",
|
|
48
48
|
"@sendbird/vite-tools": "0.0.1",
|
|
49
49
|
"@sendbird/config-editor": "0.1.0"
|
|
50
50
|
},
|