@sendbird/ai-agent-messenger-react 1.38.0 → 1.39.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/index.d.ts CHANGED
@@ -427,8 +427,8 @@ declare interface AIAgentClientHandlers {
427
427
  onClickLink?: (params: { url: string }) => void;
428
428
  /**
429
429
  * Called whenever the SDK emits a live metric — connection, conversation lifecycle,
430
- * handoff, and message events. Use for real-time analytics. Implementations should be
431
- * efficient and non-blocking, as this may be called frequently.
430
+ * handoff, message, and memory dialog events. Use for real-time analytics. Implementations
431
+ * should be efficient and non-blocking, as this may be called frequently.
432
432
  */
433
433
  onLiveMetric?: (metric: LiveMetric) => void;
434
434
  }
@@ -1707,7 +1707,7 @@ export declare const ConversationHeaderLayout: {
1707
1707
  TitleArea: () => ReactNode;
1708
1708
  EndArea: () => ReactNode;
1709
1709
  MenuButton: () => ReactNode;
1710
- Title: () => ReactNode;
1710
+ Title: (props: HeaderTitleProps) => ReactNode;
1711
1711
  MemoryIndicator: () => ReactNode;
1712
1712
  HandoffButton: () => ReactNode;
1713
1713
  ConversationCloseButton: () => ReactNode;
@@ -1724,7 +1724,7 @@ export declare const ConversationHeaderLayout: {
1724
1724
  TitleArea: () => ReactNode;
1725
1725
  EndArea: () => ReactNode;
1726
1726
  MenuButton: () => ReactNode;
1727
- Title: () => ReactNode;
1727
+ Title: (props: HeaderTitleProps) => ReactNode;
1728
1728
  MemoryIndicator: () => ReactNode;
1729
1729
  HandoffButton: () => ReactNode;
1730
1730
  ConversationCloseButton: () => ReactNode;
@@ -1736,7 +1736,7 @@ export declare const ConversationHeaderLayout: {
1736
1736
  TitleArea: () => ReactNode;
1737
1737
  EndArea: () => ReactNode;
1738
1738
  MenuButton: () => ReactNode;
1739
- Title: () => ReactNode;
1739
+ Title: (props: HeaderTitleProps) => ReactNode;
1740
1740
  MemoryIndicator: () => ReactNode;
1741
1741
  HandoffButton: () => ReactNode;
1742
1742
  ConversationCloseButton: () => ReactNode;
@@ -1757,7 +1757,7 @@ export declare const ConversationHeaderLayout: {
1757
1757
  component: () => ReactNode;
1758
1758
  }) => null;
1759
1759
  Title: (props: {
1760
- component: () => ReactNode;
1760
+ component: (props: HeaderTitleProps) => ReactNode;
1761
1761
  }) => null;
1762
1762
  MemoryIndicator: (props: {
1763
1763
  component: () => ReactNode;
@@ -3163,6 +3163,11 @@ export declare interface GroundednessInfo {
3163
3163
  preview_title: string;
3164
3164
  }
3165
3165
 
3166
+ declare interface HeaderTitleProps {
3167
+ /** Overrides the default title, which is derived from the channel (AI agent nickname or channel name). */
3168
+ title?: string;
3169
+ }
3170
+
3166
3171
  /**
3167
3172
  * Hex color string type. Enforces '#' prefix at compile time.
3168
3173
  * Only validates the prefix — does not guarantee valid hex digits or length.
@@ -5390,8 +5395,9 @@ declare interface LiveMetricEmitter<S extends MetricSource = MetricSource> {
5390
5395
  *
5391
5396
  * Registers Sendbird SDK handlers, wraps raw callbacks into {@link MetricSource}s,
5392
5397
  * routes each source to its category emitter, and lets emitters dispatch public
5393
- * metrics through the settable {@link LiveMetricManager.dispatch} sink. Outgoing message
5394
- * and explicit conversation-initialized sources are injected via {@link LiveMetricManager.track}.
5398
+ * metrics through the settable {@link LiveMetricManager.dispatch} sink. Outgoing message,
5399
+ * explicit conversation-initialized, and memory dialog sources are injected via
5400
+ * {@link LiveMetricManager.track}.
5395
5401
  */
5396
5402
  declare class LiveMetricManager {
5397
5403
  private readonly id = 'aiagent_livemetric';
@@ -5414,6 +5420,7 @@ declare class LiveMetricManager {
5414
5420
  handoff: new HandoffMetricEmitter(this.emit),
5415
5421
  incomingMessage: new IncomingMessageMetricEmitter(this.emit, getCurrentUserId),
5416
5422
  outgoingMessage: new OutgoingMessageMetricEmitter(this.emit, getCurrentUserId),
5423
+ memory: new MemoryMetricEmitter(this.emit, getCurrentUserId),
5417
5424
  };
5418
5425
  }
5419
5426
 
@@ -5448,7 +5455,7 @@ declare class LiveMetricManager {
5448
5455
 
5449
5456
  /**
5450
5457
  * Routes a source to its emitter. Also the entry point for externally injected
5451
- * sources (outgoing message status, explicit conversation-initialized).
5458
+ * sources (outgoing message status, explicit conversation-initialized, memory dialog).
5452
5459
  */
5453
5460
  track(source: MetricSource): void {
5454
5461
  try {
@@ -5508,6 +5515,14 @@ declare interface ManualSessionInfoParams {
5508
5515
  sessionHandler: AIAgentSessionHandler;
5509
5516
  }
5510
5517
 
5518
+ /**
5519
+ * What happened on the memory dialog: it became visible, the user chose one of its two buttons,
5520
+ * or the user closed it without choosing (backdrop, Escape, Android back).
5521
+ */
5522
+ declare type MemoryDialogAction = 'shown' | 'confirm' | 'cancel' | 'dismiss';
5523
+
5524
+ declare type MemoryDialogVariant = 'consent' | 'on' | 'off' | 'readonly';
5525
+
5511
5526
  declare interface MemoryInfo {
5512
5527
  enabled: boolean;
5513
5528
  showIndicator: boolean;
@@ -5885,7 +5900,7 @@ declare type MessengerSettingsUpdatedParams =
5885
5900
  | { settings: MessengerSettingsResponse; source: 'server' }
5886
5901
  | { settings: CachedMessengerSettings; source: 'cache' };
5887
5902
 
5888
- declare type MetricCategory = 'handoff' | 'conversation' | 'message' | 'connection';
5903
+ declare type MetricCategory = 'handoff' | 'conversation' | 'message' | 'connection' | 'memory';
5889
5904
 
5890
5905
  /**
5891
5906
  * An event + action represented as a single value. Input to the emitters.
@@ -5895,7 +5910,8 @@ declare type MetricSource =
5895
5910
  | { type: 'handoff'; channel: ChatSDKGroupChannel }
5896
5911
  | { type: 'conversation'; channel: ChatSDKGroupChannel }
5897
5912
  | { type: 'incomingMessage'; channel: ChatSDKGroupChannel; message: ChatSDKBaseMessage }
5898
- | { type: 'outgoingMessage'; channel: ChatSDKGroupChannel; message: ChatSDKBaseMessage };
5913
+ | { type: 'outgoingMessage'; channel: ChatSDKGroupChannel; message: ChatSDKBaseMessage }
5914
+ | { type: 'memory'; variant: MemoryDialogVariant; action: MemoryDialogAction; deleteOnOff: boolean };
5899
5915
 
5900
5916
  declare type MultiSelectField = {
5901
5917
  key: string;