@sendbird/ai-agent-messenger-react 1.38.0 → 1.39.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/cjs/6HoSeQJQ.cjs +1 -0
- package/dist/es/{BiIgmoXQ.js → BQuWAZUg.js} +31 -27
- package/dist/es/{ClcdzLx5.js → DeJTwD_w.js} +1 -1
- package/dist/index.cjs +185 -175
- package/dist/index.d.ts +31 -11
- package/dist/index.js +4169 -4000
- package/package.json +2 -2
- package/dist/cjs/VvejebHE.cjs +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -280,6 +280,8 @@ _UNSAFE_INTERNAL_dashboardTester?: {
|
|
|
280
280
|
testerType: "default" | "actionbook";
|
|
281
281
|
origin?: string;
|
|
282
282
|
};
|
|
283
|
+
/** @internal DO NOT USE THIS */
|
|
284
|
+
_sourceService?: string;
|
|
283
285
|
/**
|
|
284
286
|
* @internal DO NOT USE THIS - Used by dashboard integration for template variable injection.
|
|
285
287
|
* */
|
|
@@ -427,8 +429,8 @@ declare interface AIAgentClientHandlers {
|
|
|
427
429
|
onClickLink?: (params: { url: string }) => void;
|
|
428
430
|
/**
|
|
429
431
|
* Called whenever the SDK emits a live metric — connection, conversation lifecycle,
|
|
430
|
-
* handoff, and
|
|
431
|
-
* efficient and non-blocking, as this may be called frequently.
|
|
432
|
+
* handoff, message, and memory dialog events. Use for real-time analytics. Implementations
|
|
433
|
+
* should be efficient and non-blocking, as this may be called frequently.
|
|
432
434
|
*/
|
|
433
435
|
onLiveMetric?: (metric: LiveMetric) => void;
|
|
434
436
|
}
|
|
@@ -1027,6 +1029,8 @@ export declare type AIAgentProps = PropsWithChildren<{
|
|
|
1027
1029
|
testerType: 'default' | 'actionbook';
|
|
1028
1030
|
origin?: string;
|
|
1029
1031
|
};
|
|
1032
|
+
/** @internal DO NOT USE THIS */
|
|
1033
|
+
_sourceService?: string;
|
|
1030
1034
|
/**
|
|
1031
1035
|
* @internal DO NOT USE THIS - Used by dashboard integration for template variable injection.
|
|
1032
1036
|
* */
|
|
@@ -1707,7 +1711,7 @@ export declare const ConversationHeaderLayout: {
|
|
|
1707
1711
|
TitleArea: () => ReactNode;
|
|
1708
1712
|
EndArea: () => ReactNode;
|
|
1709
1713
|
MenuButton: () => ReactNode;
|
|
1710
|
-
Title: () => ReactNode;
|
|
1714
|
+
Title: (props: HeaderTitleProps) => ReactNode;
|
|
1711
1715
|
MemoryIndicator: () => ReactNode;
|
|
1712
1716
|
HandoffButton: () => ReactNode;
|
|
1713
1717
|
ConversationCloseButton: () => ReactNode;
|
|
@@ -1724,7 +1728,7 @@ export declare const ConversationHeaderLayout: {
|
|
|
1724
1728
|
TitleArea: () => ReactNode;
|
|
1725
1729
|
EndArea: () => ReactNode;
|
|
1726
1730
|
MenuButton: () => ReactNode;
|
|
1727
|
-
Title: () => ReactNode;
|
|
1731
|
+
Title: (props: HeaderTitleProps) => ReactNode;
|
|
1728
1732
|
MemoryIndicator: () => ReactNode;
|
|
1729
1733
|
HandoffButton: () => ReactNode;
|
|
1730
1734
|
ConversationCloseButton: () => ReactNode;
|
|
@@ -1736,7 +1740,7 @@ export declare const ConversationHeaderLayout: {
|
|
|
1736
1740
|
TitleArea: () => ReactNode;
|
|
1737
1741
|
EndArea: () => ReactNode;
|
|
1738
1742
|
MenuButton: () => ReactNode;
|
|
1739
|
-
Title: () => ReactNode;
|
|
1743
|
+
Title: (props: HeaderTitleProps) => ReactNode;
|
|
1740
1744
|
MemoryIndicator: () => ReactNode;
|
|
1741
1745
|
HandoffButton: () => ReactNode;
|
|
1742
1746
|
ConversationCloseButton: () => ReactNode;
|
|
@@ -1757,7 +1761,7 @@ export declare const ConversationHeaderLayout: {
|
|
|
1757
1761
|
component: () => ReactNode;
|
|
1758
1762
|
}) => null;
|
|
1759
1763
|
Title: (props: {
|
|
1760
|
-
component: () => ReactNode;
|
|
1764
|
+
component: (props: HeaderTitleProps) => ReactNode;
|
|
1761
1765
|
}) => null;
|
|
1762
1766
|
MemoryIndicator: (props: {
|
|
1763
1767
|
component: () => ReactNode;
|
|
@@ -3163,6 +3167,11 @@ export declare interface GroundednessInfo {
|
|
|
3163
3167
|
preview_title: string;
|
|
3164
3168
|
}
|
|
3165
3169
|
|
|
3170
|
+
declare interface HeaderTitleProps {
|
|
3171
|
+
/** Overrides the default title, which is derived from the channel (AI agent nickname or channel name). */
|
|
3172
|
+
title?: string;
|
|
3173
|
+
}
|
|
3174
|
+
|
|
3166
3175
|
/**
|
|
3167
3176
|
* Hex color string type. Enforces '#' prefix at compile time.
|
|
3168
3177
|
* Only validates the prefix — does not guarantee valid hex digits or length.
|
|
@@ -5390,8 +5399,9 @@ declare interface LiveMetricEmitter<S extends MetricSource = MetricSource> {
|
|
|
5390
5399
|
*
|
|
5391
5400
|
* Registers Sendbird SDK handlers, wraps raw callbacks into {@link MetricSource}s,
|
|
5392
5401
|
* routes each source to its category emitter, and lets emitters dispatch public
|
|
5393
|
-
* metrics through the settable {@link LiveMetricManager.dispatch} sink. Outgoing message
|
|
5394
|
-
*
|
|
5402
|
+
* metrics through the settable {@link LiveMetricManager.dispatch} sink. Outgoing message,
|
|
5403
|
+
* explicit conversation-initialized, and memory dialog sources are injected via
|
|
5404
|
+
* {@link LiveMetricManager.track}.
|
|
5395
5405
|
*/
|
|
5396
5406
|
declare class LiveMetricManager {
|
|
5397
5407
|
private readonly id = 'aiagent_livemetric';
|
|
@@ -5414,6 +5424,7 @@ declare class LiveMetricManager {
|
|
|
5414
5424
|
handoff: new HandoffMetricEmitter(this.emit),
|
|
5415
5425
|
incomingMessage: new IncomingMessageMetricEmitter(this.emit, getCurrentUserId),
|
|
5416
5426
|
outgoingMessage: new OutgoingMessageMetricEmitter(this.emit, getCurrentUserId),
|
|
5427
|
+
memory: new MemoryMetricEmitter(this.emit, getCurrentUserId),
|
|
5417
5428
|
};
|
|
5418
5429
|
}
|
|
5419
5430
|
|
|
@@ -5448,7 +5459,7 @@ declare class LiveMetricManager {
|
|
|
5448
5459
|
|
|
5449
5460
|
/**
|
|
5450
5461
|
* Routes a source to its emitter. Also the entry point for externally injected
|
|
5451
|
-
* sources (outgoing message status, explicit conversation-initialized).
|
|
5462
|
+
* sources (outgoing message status, explicit conversation-initialized, memory dialog).
|
|
5452
5463
|
*/
|
|
5453
5464
|
track(source: MetricSource): void {
|
|
5454
5465
|
try {
|
|
@@ -5508,6 +5519,14 @@ declare interface ManualSessionInfoParams {
|
|
|
5508
5519
|
sessionHandler: AIAgentSessionHandler;
|
|
5509
5520
|
}
|
|
5510
5521
|
|
|
5522
|
+
/**
|
|
5523
|
+
* What happened on the memory dialog: it became visible, the user chose one of its two buttons,
|
|
5524
|
+
* or the user closed it without choosing (backdrop, Escape, Android back).
|
|
5525
|
+
*/
|
|
5526
|
+
declare type MemoryDialogAction = 'shown' | 'confirm' | 'cancel' | 'dismiss';
|
|
5527
|
+
|
|
5528
|
+
declare type MemoryDialogVariant = 'consent' | 'on' | 'off' | 'readonly';
|
|
5529
|
+
|
|
5511
5530
|
declare interface MemoryInfo {
|
|
5512
5531
|
enabled: boolean;
|
|
5513
5532
|
showIndicator: boolean;
|
|
@@ -5885,7 +5904,7 @@ declare type MessengerSettingsUpdatedParams =
|
|
|
5885
5904
|
| { settings: MessengerSettingsResponse; source: 'server' }
|
|
5886
5905
|
| { settings: CachedMessengerSettings; source: 'cache' };
|
|
5887
5906
|
|
|
5888
|
-
declare type MetricCategory = 'handoff' | 'conversation' | 'message' | 'connection';
|
|
5907
|
+
declare type MetricCategory = 'handoff' | 'conversation' | 'message' | 'connection' | 'memory';
|
|
5889
5908
|
|
|
5890
5909
|
/**
|
|
5891
5910
|
* An event + action represented as a single value. Input to the emitters.
|
|
@@ -5895,7 +5914,8 @@ declare type MetricSource =
|
|
|
5895
5914
|
| { type: 'handoff'; channel: ChatSDKGroupChannel }
|
|
5896
5915
|
| { type: 'conversation'; channel: ChatSDKGroupChannel }
|
|
5897
5916
|
| { type: 'incomingMessage'; channel: ChatSDKGroupChannel; message: ChatSDKBaseMessage }
|
|
5898
|
-
| { type: 'outgoingMessage'; channel: ChatSDKGroupChannel; message: ChatSDKBaseMessage }
|
|
5917
|
+
| { type: 'outgoingMessage'; channel: ChatSDKGroupChannel; message: ChatSDKBaseMessage }
|
|
5918
|
+
| { type: 'memory'; variant: MemoryDialogVariant; action: MemoryDialogAction; deleteOnOff: boolean };
|
|
5899
5919
|
|
|
5900
5920
|
declare type MultiSelectField = {
|
|
5901
5921
|
key: string;
|