@sendbird/ai-agent-messenger-react 1.28.0 → 1.30.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/BMDJStMQ.cjs +1 -0
- package/dist/cjs/CLIpC7kY.cjs +1 -0
- package/dist/cjs/CPZf2TWM.cjs +1 -0
- package/dist/cjs/ChrM6HN1.cjs +1 -0
- package/dist/cjs/D7UQ9OK7.cjs +1 -0
- package/dist/cjs/DKQwAy8C.cjs +1 -0
- package/dist/cjs/D_km8dcd.cjs +1 -0
- package/dist/cjs/I-l-5Zo-.cjs +1 -0
- package/dist/cjs/etCQgYrr.cjs +1 -0
- package/dist/es/{8X3t-sY0.js → BDCT28XM.js} +2 -1
- package/dist/es/{C7ORG8dj.js → BWCZN9kg.js} +4 -3
- package/dist/es/{Buaxc-u0.js → C5fUw0RP.js} +2 -1
- package/dist/es/{WbShwALJ.js → CZXgaS-3.js} +2 -1
- package/dist/es/{xcbApuhi.js → DbWklFH0.js} +2 -1
- package/dist/es/{BujlRRjm.js → Dh05zfqw.js} +2 -1
- package/dist/es/{DWG2RYIZ.js → FMOCAKFw.js} +6 -5
- package/dist/es/{CMoPrp7P.js → RwjGyHFV.js} +2 -1
- package/dist/es/{D7dxgV1B.js → hPxGrQQg.js} +2 -1
- package/dist/index.cjs +161 -153
- package/dist/index.d.ts +1158 -542
- package/dist/index.js +3743 -3718
- package/package.json +4 -4
- package/dist/cjs/0hIk0F0O.cjs +0 -1
- package/dist/cjs/BA3mgvxo.cjs +0 -1
- package/dist/cjs/CCEnmnDV.cjs +0 -1
- package/dist/cjs/CSiVLAQX.cjs +0 -1
- package/dist/cjs/CUwm0Oc7.cjs +0 -1
- package/dist/cjs/CybHF_pZ.cjs +0 -1
- package/dist/cjs/D57XEzyM.cjs +0 -1
- package/dist/cjs/DVsz-h87.cjs +0 -1
- package/dist/cjs/aLvBaYD0.cjs +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Action } from '@sendbird/uikit-message-template';
|
|
2
2
|
import type { AIAgentChannelFilter } from '@sendbird/chat/aiAgent';
|
|
3
|
-
import type { AIAgentGroupChannelListQuery } from '@sendbird/chat/aiAgent';
|
|
4
3
|
import type { AIAgentModule } from '@sendbird/chat/aiAgent';
|
|
5
|
-
import
|
|
4
|
+
import { AriaRole } from 'react';
|
|
5
|
+
import type { BaseChannelCollectionEventHandler } from '@sendbird/chat/groupChannel';
|
|
6
6
|
import type { BaseMessage } from '@sendbird/chat/message';
|
|
7
7
|
import type { CollectionEventSource } from '@sendbird/chat';
|
|
8
8
|
import { ComponentType } from 'react';
|
|
9
|
-
import type { ConnectionHandler } from '@sendbird/chat';
|
|
10
9
|
import { Context } from 'react';
|
|
11
10
|
import type { Conversation as Conversation_2 } from '@sendbird/chat/aiAgent';
|
|
12
11
|
import type { ConversationStatus } from '@sendbird/chat/aiAgent';
|
|
@@ -17,9 +16,6 @@ import type { FileMessageCreateParams } from '@sendbird/chat/message';
|
|
|
17
16
|
import { format } from 'date-fns';
|
|
18
17
|
import { ForwardRefExoticComponent } from 'react';
|
|
19
18
|
import type { GroupChannel } from '@sendbird/chat/groupChannel';
|
|
20
|
-
import type { GroupChannelChangelogs } from '@sendbird/chat/aiAgent';
|
|
21
|
-
import type { GroupChannelHandler } from '@sendbird/chat/groupChannel';
|
|
22
|
-
import type { GroupChannelListOrder } from '@sendbird/chat/groupChannel';
|
|
23
19
|
import type { GroupChannelModule } from '@sendbird/chat/groupChannel';
|
|
24
20
|
import { JSX } from 'react/jsx-runtime';
|
|
25
21
|
import type { Locale } from 'date-fns';
|
|
@@ -486,6 +482,13 @@ declare interface AIAgentConfig_2 {
|
|
|
486
482
|
* @default 'default'
|
|
487
483
|
* */
|
|
488
484
|
markdownImageRenderMode: MarkdownImageRenderMode;
|
|
485
|
+
/**
|
|
486
|
+
* Controls how markdown links are displayed while a message is streaming.
|
|
487
|
+
* - `default`: Renders partial markdown as-is.
|
|
488
|
+
* - `complete-only`: Hides incomplete link markdown until the link token is complete.
|
|
489
|
+
* @default 'default'
|
|
490
|
+
* */
|
|
491
|
+
markdownLinkRenderMode: MarkdownLinkRenderMode;
|
|
489
492
|
};
|
|
490
493
|
header: {
|
|
491
494
|
/**
|
|
@@ -528,6 +531,15 @@ declare interface AIAgentConfig_2 {
|
|
|
528
531
|
downloadEnabled: boolean;
|
|
529
532
|
};
|
|
530
533
|
};
|
|
534
|
+
launcher: {
|
|
535
|
+
/**
|
|
536
|
+
* Whether to show a red-dot badge on the launcher when there are unread
|
|
537
|
+
* messages in AI agent channels. The count is fetched once on connect and
|
|
538
|
+
* again after each successful reconnect (not in real time).
|
|
539
|
+
* @default false
|
|
540
|
+
* */
|
|
541
|
+
unreadBadgeEnabled: boolean;
|
|
542
|
+
};
|
|
531
543
|
}
|
|
532
544
|
|
|
533
545
|
declare interface AIAgentContextValue {
|
|
@@ -727,7 +739,7 @@ declare interface AIAgentInterface {
|
|
|
727
739
|
/** Closes an open conversation */
|
|
728
740
|
closeConversation: (channelUrl: string) => Promise<void>;
|
|
729
741
|
/** Creates a collection for paginating through conversations */
|
|
730
|
-
createConversationListCollection: (params?: ConversationListCollectionParams) =>
|
|
742
|
+
createConversationListCollection: (params?: ConversationListCollectionParams) => ConversationListCollectionInterface;
|
|
731
743
|
/** Patches (merges) context data for the specified channel */
|
|
732
744
|
patchContext: (channelUrl: string, context: Record<string, string>) => Promise<ContextObject>;
|
|
733
745
|
/** Replaces the entire context data for the specified channel */
|
|
@@ -1119,6 +1131,7 @@ declare interface AIAgentStringSet {
|
|
|
1119
1131
|
a11y_conversation_closed: string;
|
|
1120
1132
|
a11y_file_image: (name: string) => string;
|
|
1121
1133
|
a11y_file_video: (name: string) => string;
|
|
1134
|
+
a11y_file_pdf: (name: string) => string;
|
|
1122
1135
|
a11y_file_document: (name: string) => string;
|
|
1123
1136
|
a11y_received_file_image: string;
|
|
1124
1137
|
a11y_received_file_video: string;
|
|
@@ -1309,20 +1322,29 @@ declare type CachedMessengerSettings = Omit<MessengerSettingsResponse, 'memory'>
|
|
|
1309
1322
|
memory?: MessengerSettingsResponse['memory'];
|
|
1310
1323
|
};
|
|
1311
1324
|
|
|
1312
|
-
declare type
|
|
1325
|
+
export declare type ChallengeActionParams = {
|
|
1326
|
+
key: string;
|
|
1327
|
+
requestId: string;
|
|
1328
|
+
action: 'submit' | 'cancel';
|
|
1329
|
+
data?: Record<string, unknown>;
|
|
1330
|
+
};
|
|
1313
1331
|
|
|
1314
|
-
declare
|
|
1332
|
+
export declare interface ChallengeInfo {
|
|
1333
|
+
key: string;
|
|
1334
|
+
request_id: string;
|
|
1335
|
+
status: 'pending' | 'succeeded' | 'failed' | 'canceled' | (string & {});
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
declare type ChatSDKAIAgentChannelFilter = AIAgentChannelFilter;
|
|
1315
1339
|
|
|
1316
1340
|
declare type ChatSDKAIAgentModule = AIAgentModule;
|
|
1317
1341
|
|
|
1318
|
-
declare type
|
|
1342
|
+
declare type ChatSDKBaseChannelCollectionEventHandler = BaseChannelCollectionEventHandler;
|
|
1319
1343
|
|
|
1320
1344
|
declare type ChatSDKBaseMessage = BaseMessage;
|
|
1321
1345
|
|
|
1322
1346
|
declare type ChatSDKCollectionEventSource = CollectionEventSource;
|
|
1323
1347
|
|
|
1324
|
-
declare type ChatSDKConnectionHandler = ConnectionHandler;
|
|
1325
|
-
|
|
1326
1348
|
declare type ChatSDKConversation = Conversation_2;
|
|
1327
1349
|
|
|
1328
1350
|
declare type ChatSDKConversationStatus = ConversationStatus;
|
|
@@ -1335,12 +1357,6 @@ declare type ChatSDKFileMessageCreateParams = FileMessageCreateParams;
|
|
|
1335
1357
|
|
|
1336
1358
|
declare type ChatSDKGroupChannel = GroupChannel;
|
|
1337
1359
|
|
|
1338
|
-
declare type ChatSDKGroupChannelChangelogs = GroupChannelChangelogs;
|
|
1339
|
-
|
|
1340
|
-
declare type ChatSDKGroupChannelHandler = GroupChannelHandler;
|
|
1341
|
-
|
|
1342
|
-
declare type ChatSDKGroupChannelListOrder = GroupChannelListOrder;
|
|
1343
|
-
|
|
1344
1360
|
declare type ChatSDKGroupChannelModule = GroupChannelModule;
|
|
1345
1361
|
|
|
1346
1362
|
declare type ChatSDKLogLevel = LogLevel_2;
|
|
@@ -1503,7 +1519,7 @@ declare interface ContextObject {
|
|
|
1503
1519
|
context: Record<string, string>;
|
|
1504
1520
|
}
|
|
1505
1521
|
|
|
1506
|
-
export declare const Conversation: ({ children, onNavigateToConversationList, channelUrl, onClearChannelUrl, shouldMarkAsRead, announcementsEnabled, style, closedChannelUrl, onClearClosedChannelUrl, }: Props_3) => JSX.Element;
|
|
1522
|
+
export declare const Conversation: ({ children, onNavigateToConversationList, channelUrl, onClearChannelUrl, shouldMarkAsRead, announcementsEnabled, initialFocusTarget, style, closedChannelUrl, onClearClosedChannelUrl, }: Props_3) => JSX.Element;
|
|
1507
1523
|
|
|
1508
1524
|
export declare const ConversationContext: Context<ConversationContextValue | null>;
|
|
1509
1525
|
|
|
@@ -1611,6 +1627,8 @@ declare interface ConversationHeaderTemplateProps {
|
|
|
1611
1627
|
titleAlign?: 'start' | 'center' | 'end';
|
|
1612
1628
|
}
|
|
1613
1629
|
|
|
1630
|
+
declare type ConversationInitialFocusTarget = 'messageInput';
|
|
1631
|
+
|
|
1614
1632
|
declare class ConversationInitialRenderStats extends AIAgentBaseStats {
|
|
1615
1633
|
private presentMethod: PresentMethod = 'direct_present';
|
|
1616
1634
|
|
|
@@ -1798,382 +1816,15 @@ declare interface ConversationLayoutTemplateProps {
|
|
|
1798
1816
|
export declare const ConversationList: ({ conversationListLimit, conversationListFilter, children, onOpenConversationView, announcementsEnabled, style, }: Props_4) => JSX.Element;
|
|
1799
1817
|
|
|
1800
1818
|
/**
|
|
1801
|
-
*
|
|
1802
|
-
*
|
|
1819
|
+
* Public interface for ConversationListCollection.
|
|
1820
|
+
* Exposes only the public contract without leaking internal BaseChannelCollection generics.
|
|
1803
1821
|
*/
|
|
1804
|
-
declare
|
|
1805
|
-
|
|
1806
|
-
readonly
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
private _channels: ChatSDKGroupChannel[];
|
|
1811
|
-
|
|
1812
|
-
private _isDisposed = false;
|
|
1813
|
-
private _handlerId = `handler-id-${Date.now()}`;
|
|
1814
|
-
private _order: ChatSDKGroupChannelListOrder = GroupChannelListOrder.LATEST_LAST_MESSAGE;
|
|
1815
|
-
|
|
1816
|
-
private _limit: number;
|
|
1817
|
-
private _query: ChatSDKAIAgentGroupChannelListQuery;
|
|
1818
|
-
|
|
1819
|
-
private _token: string;
|
|
1820
|
-
private _timestamp: number;
|
|
1821
|
-
private _isSyncing: boolean;
|
|
1822
|
-
|
|
1823
|
-
private _channelHandler: ChatSDKGroupChannelHandler;
|
|
1824
|
-
private _connectionHandler: ChatSDKConnectionHandler;
|
|
1825
|
-
private _collectionEventHandler?: ConversationListCollectionEventHandler;
|
|
1826
|
-
private _throttledOnChannelChanged: ThrottledFunction<(channel: ChatSDKBaseChannel) => void>;
|
|
1827
|
-
|
|
1828
|
-
/**
|
|
1829
|
-
* Creates a new ConversationListCollection instance.
|
|
1830
|
-
* @param sdk - The Sendbird Chat SDK instance
|
|
1831
|
-
* @param params - Configuration parameters for the collection
|
|
1832
|
-
*/
|
|
1833
|
-
constructor(sdk: ChatSDKType, { filter, limit = 20 }: ConversationListCollectionParams) {
|
|
1834
|
-
this.filter = filter;
|
|
1835
|
-
|
|
1836
|
-
this._sdk = sdk;
|
|
1837
|
-
this._pinnedChannels = [];
|
|
1838
|
-
this._channels = [];
|
|
1839
|
-
|
|
1840
|
-
this._limit = limit;
|
|
1841
|
-
this._query = this._sdk.aiAgent.createMyGroupChannelListQuery({
|
|
1842
|
-
aiAgentChannelFilter: this.filter?.aiAgentChannelFilter,
|
|
1843
|
-
aiAgentConversationStatusFilter: this.filter?.aiAgentConversationStatusFilter,
|
|
1844
|
-
aiAgentIds: this.filter?.aiAgentIds,
|
|
1845
|
-
deskChannelFilter: this.filter?.deskChannelFilter,
|
|
1846
|
-
pinnedChannelUrls: this.filter?.pinnedChannelUrls,
|
|
1847
|
-
copilotConversationOnly: this.filter?.copilotConversationOnly,
|
|
1848
|
-
copilotSupportChannelUrl: this.filter?.copilotSupportChannelUrl,
|
|
1849
|
-
limit: this._limit,
|
|
1850
|
-
});
|
|
1851
|
-
|
|
1852
|
-
this._token = '';
|
|
1853
|
-
this._timestamp = Number.MAX_SAFE_INTEGER;
|
|
1854
|
-
this._isSyncing = false;
|
|
1855
|
-
|
|
1856
|
-
this._throttledOnChannelChanged = throttle(
|
|
1857
|
-
(channel: ChatSDKGroupChannel) => {
|
|
1858
|
-
if (this._query.belongsTo(channel)) {
|
|
1859
|
-
this._addChannelsToView([channel], false);
|
|
1860
|
-
} else {
|
|
1861
|
-
this._removeChannelsFromView([channel.url]);
|
|
1862
|
-
}
|
|
1863
|
-
},
|
|
1864
|
-
250,
|
|
1865
|
-
{ trailing: false, leading: true },
|
|
1866
|
-
);
|
|
1867
|
-
|
|
1868
|
-
this._channelHandler = new GroupChannelHandler({
|
|
1869
|
-
onChannelChanged: (channel) => {
|
|
1870
|
-
if (!channel.isGroupChannel()) return;
|
|
1871
|
-
this._throttledOnChannelChanged(channel);
|
|
1872
|
-
},
|
|
1873
|
-
onChannelDeleted: (channelUrl) => {
|
|
1874
|
-
this._removeChannelsFromView([channelUrl]);
|
|
1875
|
-
},
|
|
1876
|
-
});
|
|
1877
|
-
|
|
1878
|
-
this._connectionHandler = new ConnectionHandler({
|
|
1879
|
-
onReconnectSucceeded: () => {
|
|
1880
|
-
if (this._isDefaultChangelogSyncTimestampUpdated) this._syncChannelChangelogs();
|
|
1881
|
-
},
|
|
1882
|
-
});
|
|
1883
|
-
|
|
1884
|
-
this._sdk.addConnectionHandler(this._handlerId, this._connectionHandler);
|
|
1885
|
-
this._sdk.groupChannel.addGroupChannelHandler(this._handlerId, this._channelHandler);
|
|
1886
|
-
}
|
|
1887
|
-
|
|
1888
|
-
/**
|
|
1889
|
-
* Checks if the default changelog sync timestamp has been updated.
|
|
1890
|
-
*/
|
|
1891
|
-
private get _isDefaultChangelogSyncTimestampUpdated() {
|
|
1892
|
-
return this._timestamp !== Number.MAX_SAFE_INTEGER;
|
|
1893
|
-
}
|
|
1894
|
-
|
|
1895
|
-
/**
|
|
1896
|
-
* Sets the default changelog sync timestamp based on the first non-pinned channel.
|
|
1897
|
-
* @param channels - Array of channels to analyze
|
|
1898
|
-
*/
|
|
1899
|
-
private _setDefaultChangelogsSyncTimestamp(channels: ChatSDKGroupChannel[]) {
|
|
1900
|
-
const pinnedUrlsSet = new Set(this.filter?.pinnedChannelUrls ?? []);
|
|
1901
|
-
const firstChannel = channels.find((it) => {
|
|
1902
|
-
return !pinnedUrlsSet.has(it.url);
|
|
1903
|
-
});
|
|
1904
|
-
|
|
1905
|
-
let candidate: number;
|
|
1906
|
-
if (firstChannel) {
|
|
1907
|
-
candidate = firstChannel.lastMessage?.createdAt ?? firstChannel.createdAt;
|
|
1908
|
-
} else {
|
|
1909
|
-
candidate = this._query.lastResponseAt;
|
|
1910
|
-
}
|
|
1911
|
-
|
|
1912
|
-
if (this._timestamp > candidate) {
|
|
1913
|
-
this._timestamp = candidate;
|
|
1914
|
-
}
|
|
1915
|
-
}
|
|
1916
|
-
|
|
1917
|
-
/**
|
|
1918
|
-
* Synchronizes channel changelogs to keep the collection up-to-date.
|
|
1919
|
-
* @returns Promise that resolves to an empty array
|
|
1920
|
-
*/
|
|
1921
|
-
private async _syncChannelChangelogs(): Promise<ChatSDKGroupChannel[]> {
|
|
1922
|
-
if (this._isDisposed) return [];
|
|
1923
|
-
if (this._isSyncing) return [];
|
|
1924
|
-
|
|
1925
|
-
try {
|
|
1926
|
-
this._isSyncing = true;
|
|
1927
|
-
let response: ChatSDKGroupChannelChangelogs;
|
|
1928
|
-
|
|
1929
|
-
if (this._token) {
|
|
1930
|
-
response = await this._sdk.aiAgent.getMyGroupChannelChangeLogsByToken(this._token, this.filter);
|
|
1931
|
-
} else {
|
|
1932
|
-
response = await this._sdk.aiAgent.getMyGroupChannelChangeLogsByTimestamp(this._timestamp, this.filter);
|
|
1933
|
-
}
|
|
1934
|
-
this._token = response.token;
|
|
1935
|
-
this._addChannelsToView(response.updatedChannels);
|
|
1936
|
-
this._removeChannelsFromView(response.deletedChannelUrls);
|
|
1937
|
-
|
|
1938
|
-
while (response.hasMore && !!response.token) {
|
|
1939
|
-
response = await this._sdk.aiAgent.getMyGroupChannelChangeLogsByToken(this._token, this.filter);
|
|
1940
|
-
this._token = response.token;
|
|
1941
|
-
this._addChannelsToView(response.updatedChannels);
|
|
1942
|
-
this._removeChannelsFromView(response.deletedChannelUrls);
|
|
1943
|
-
}
|
|
1944
|
-
} catch (error) {
|
|
1945
|
-
// Silently handle changelog sync errors to prevent disrupting the collection
|
|
1946
|
-
// The collection will continue to work with existing data
|
|
1947
|
-
} finally {
|
|
1948
|
-
this._isSyncing = false;
|
|
1949
|
-
}
|
|
1950
|
-
return [];
|
|
1951
|
-
}
|
|
1952
|
-
|
|
1953
|
-
/**
|
|
1954
|
-
* Upserts pinned channels maintaining the order specified in pinnedChannelUrls.
|
|
1955
|
-
* @param channels - Pinned channels to upsert
|
|
1956
|
-
* @returns Object containing added, updated channels and unmatched URLs
|
|
1957
|
-
*/
|
|
1958
|
-
private _upsertPinnedChannelsToArray(channels: ChatSDKGroupChannel[]): {
|
|
1959
|
-
addedChannels: ChatSDKGroupChannel[];
|
|
1960
|
-
updatedChannels: ChatSDKGroupChannel[];
|
|
1961
|
-
unmatchedChannelUrls: string[];
|
|
1962
|
-
} {
|
|
1963
|
-
const pinnedUrls = this.filter?.pinnedChannelUrls ?? [];
|
|
1964
|
-
const pinnedIndexMap = new Map(pinnedUrls.map((url, index) => [url, index]));
|
|
1965
|
-
|
|
1966
|
-
const addedChannels: ChatSDKGroupChannel[] = [];
|
|
1967
|
-
const updatedChannels: ChatSDKGroupChannel[] = [];
|
|
1968
|
-
const unmatchedChannelUrls: string[] = [];
|
|
1969
|
-
|
|
1970
|
-
for (const channel of channels) {
|
|
1971
|
-
if (!this._query.belongsTo(channel)) {
|
|
1972
|
-
unmatchedChannelUrls.push(channel.url);
|
|
1973
|
-
continue;
|
|
1974
|
-
}
|
|
1975
|
-
|
|
1976
|
-
const targetIndex = pinnedIndexMap.get(channel.url);
|
|
1977
|
-
if (targetIndex === undefined) continue;
|
|
1978
|
-
|
|
1979
|
-
const existingPosition = indexOfChannel(this._pinnedChannels, channel);
|
|
1980
|
-
const isExisting = existingPosition >= 0;
|
|
1981
|
-
|
|
1982
|
-
if (isExisting) {
|
|
1983
|
-
this._pinnedChannels.splice(existingPosition, 1);
|
|
1984
|
-
updatedChannels.push(channel);
|
|
1985
|
-
} else {
|
|
1986
|
-
addedChannels.push(channel);
|
|
1987
|
-
}
|
|
1988
|
-
|
|
1989
|
-
const insertPosition = this._pinnedChannels.findIndex((existingChannel) => {
|
|
1990
|
-
const existingIndex = pinnedIndexMap.get(existingChannel.url) ?? Infinity;
|
|
1991
|
-
return existingIndex > targetIndex;
|
|
1992
|
-
});
|
|
1993
|
-
|
|
1994
|
-
const finalPosition = insertPosition === -1 ? this._pinnedChannels.length : insertPosition;
|
|
1995
|
-
this._pinnedChannels.splice(finalPosition, 0, channel);
|
|
1996
|
-
}
|
|
1997
|
-
|
|
1998
|
-
return { addedChannels, updatedChannels, unmatchedChannelUrls };
|
|
1999
|
-
}
|
|
2000
|
-
|
|
2001
|
-
/**
|
|
2002
|
-
* Upserts regular (non-pinned) channels with time-based sorting.
|
|
2003
|
-
* @param channels - Regular channels to upsert
|
|
2004
|
-
* @param forceAppend - Whether to force append channels at the end regardless of hasMore status
|
|
2005
|
-
* @returns Object containing added, updated channels and unmatched URLs
|
|
2006
|
-
*/
|
|
2007
|
-
private _upsertRegularChannelsToArray(
|
|
2008
|
-
channels: ChatSDKGroupChannel[],
|
|
2009
|
-
forceAppend = false,
|
|
2010
|
-
): { addedChannels: ChatSDKGroupChannel[]; updatedChannels: ChatSDKGroupChannel[]; unmatchedChannelUrls: string[] } {
|
|
2011
|
-
const unmatchedChannelUrls: string[] = [];
|
|
2012
|
-
|
|
2013
|
-
const addedChannels: ChatSDKGroupChannel[] = [];
|
|
2014
|
-
const updatedChannels: ChatSDKGroupChannel[] = [];
|
|
2015
|
-
|
|
2016
|
-
for (const channel of channels) {
|
|
2017
|
-
if (!this._query.belongsTo(channel)) {
|
|
2018
|
-
unmatchedChannelUrls.push(channel.url);
|
|
2019
|
-
continue;
|
|
2020
|
-
}
|
|
2021
|
-
|
|
2022
|
-
const oldPosition = indexOfChannel(this._channels, channel);
|
|
2023
|
-
const isNewChannel = oldPosition < 0;
|
|
2024
|
-
const shouldRemoveBeforeInsert = !isNewChannel;
|
|
2025
|
-
|
|
2026
|
-
if (shouldRemoveBeforeInsert) {
|
|
2027
|
-
this._channels.splice(oldPosition, 1);
|
|
2028
|
-
}
|
|
2029
|
-
|
|
2030
|
-
const insertionIndex = placeOfChannel(this._channels, channel, this._order).place;
|
|
2031
|
-
const isAtEnd = insertionIndex === this._channels.length;
|
|
2032
|
-
|
|
2033
|
-
if (isNewChannel) {
|
|
2034
|
-
if (isAtEnd) {
|
|
2035
|
-
if (forceAppend || !this.hasMore) {
|
|
2036
|
-
this._channels.push(channel);
|
|
2037
|
-
addedChannels.push(channel);
|
|
2038
|
-
}
|
|
2039
|
-
} else {
|
|
2040
|
-
this._channels.splice(insertionIndex, 0, channel);
|
|
2041
|
-
addedChannels.push(channel);
|
|
2042
|
-
}
|
|
2043
|
-
} else {
|
|
2044
|
-
this._channels.splice(insertionIndex, 0, channel);
|
|
2045
|
-
updatedChannels.push(channel);
|
|
2046
|
-
}
|
|
2047
|
-
}
|
|
2048
|
-
|
|
2049
|
-
return { addedChannels, updatedChannels, unmatchedChannelUrls };
|
|
2050
|
-
}
|
|
2051
|
-
|
|
2052
|
-
/**
|
|
2053
|
-
* Adds or updates channels in the collection, separating pinned and non-pinned channels.
|
|
2054
|
-
* @param channels - Channels to add or update
|
|
2055
|
-
* @param forceAppend - Whether to force append channels at the end
|
|
2056
|
-
*/
|
|
2057
|
-
private _addChannelsToView(channels: ChatSDKGroupChannel[], forceAppend = false): void {
|
|
2058
|
-
const pinnedUrlsSet = new Set(this.filter?.pinnedChannelUrls ?? []);
|
|
2059
|
-
|
|
2060
|
-
const pinnedChannels: ChatSDKGroupChannel[] = [];
|
|
2061
|
-
const regularChannels: ChatSDKGroupChannel[] = [];
|
|
2062
|
-
|
|
2063
|
-
for (const channel of channels) {
|
|
2064
|
-
if (pinnedUrlsSet.has(channel.url)) {
|
|
2065
|
-
pinnedChannels.push(channel);
|
|
2066
|
-
} else {
|
|
2067
|
-
regularChannels.push(channel);
|
|
2068
|
-
}
|
|
2069
|
-
}
|
|
2070
|
-
|
|
2071
|
-
const pinnedResult = this._upsertPinnedChannelsToArray(pinnedChannels);
|
|
2072
|
-
const regularResult = this._upsertRegularChannelsToArray(regularChannels, forceAppend);
|
|
2073
|
-
|
|
2074
|
-
const addedChannels = pinnedResult.addedChannels.concat(regularResult.addedChannels);
|
|
2075
|
-
const updatedChannels = pinnedResult.updatedChannels.concat(regularResult.updatedChannels);
|
|
2076
|
-
const unmatchedChannelUrls = pinnedResult.unmatchedChannelUrls.concat(regularResult.unmatchedChannelUrls);
|
|
2077
|
-
|
|
2078
|
-
if (addedChannels.length > 0) this._collectionEventHandler?.onChannelsAdded?.({}, addedChannels);
|
|
2079
|
-
if (updatedChannels.length > 0) this._collectionEventHandler?.onChannelsUpdated?.({}, updatedChannels);
|
|
2080
|
-
if (unmatchedChannelUrls.length > 0) this._removeChannelsFromView(unmatchedChannelUrls);
|
|
2081
|
-
}
|
|
2082
|
-
|
|
2083
|
-
/**
|
|
2084
|
-
* Removes channels from the collection by their URLs.
|
|
2085
|
-
* @param channelUrls - Array of channel URLs to remove
|
|
2086
|
-
*/
|
|
2087
|
-
private _removeChannelsFromView(channelUrls: string[]) {
|
|
2088
|
-
const pinnedUrlsSet = new Set(this.filter?.pinnedChannelUrls ?? []);
|
|
2089
|
-
const removedChannelUrls: string[] = [];
|
|
2090
|
-
|
|
2091
|
-
for (const channelUrl of channelUrls) {
|
|
2092
|
-
if (pinnedUrlsSet.has(channelUrl)) {
|
|
2093
|
-
const index = this._pinnedChannels.findIndex((channel) => channel.url === channelUrl);
|
|
2094
|
-
if (index >= 0) {
|
|
2095
|
-
removedChannelUrls.push(channelUrl);
|
|
2096
|
-
this._pinnedChannels.splice(index, 1);
|
|
2097
|
-
}
|
|
2098
|
-
} else {
|
|
2099
|
-
const index = this._channels.findIndex((channel) => channel.url === channelUrl);
|
|
2100
|
-
if (index >= 0) {
|
|
2101
|
-
removedChannelUrls.push(channelUrl);
|
|
2102
|
-
this._channels.splice(index, 1);
|
|
2103
|
-
}
|
|
2104
|
-
}
|
|
2105
|
-
}
|
|
2106
|
-
|
|
2107
|
-
if (removedChannelUrls.length > 0) this._collectionEventHandler?.onChannelsDeleted?.({}, removedChannelUrls);
|
|
2108
|
-
}
|
|
2109
|
-
|
|
2110
|
-
/**
|
|
2111
|
-
* Gets all channels in the collection.
|
|
2112
|
-
* Pinned channels are always returned first, followed by non-pinned channels.
|
|
2113
|
-
* @returns Array of GroupChannel objects
|
|
2114
|
-
*/
|
|
2115
|
-
public get channels(): ChatSDKGroupChannel[] {
|
|
2116
|
-
return this._isDisposed ? [] : [...this._pinnedChannels, ...this._channels];
|
|
2117
|
-
}
|
|
2118
|
-
|
|
2119
|
-
/**
|
|
2120
|
-
* Indicates whether the collection has more channels to load.
|
|
2121
|
-
* @returns True if more channels can be loaded, false otherwise
|
|
2122
|
-
*/
|
|
2123
|
-
public get hasMore(): boolean {
|
|
2124
|
-
return this._isDisposed ? false : this._query.hasNext;
|
|
2125
|
-
}
|
|
2126
|
-
|
|
2127
|
-
/**
|
|
2128
|
-
* Loads the next batch of channels from the server.
|
|
2129
|
-
* @returns Promise that resolves to an array of newly loaded channels
|
|
2130
|
-
*/
|
|
2131
|
-
public async loadMore(): Promise<ChatSDKGroupChannel[]> {
|
|
2132
|
-
if (this._isDisposed) return [];
|
|
2133
|
-
|
|
2134
|
-
if (this.hasMore) {
|
|
2135
|
-
const channels = await this._query.next();
|
|
2136
|
-
|
|
2137
|
-
this._setDefaultChangelogsSyncTimestamp(channels);
|
|
2138
|
-
this._addChannelsToView(channels, true);
|
|
2139
|
-
return channels;
|
|
2140
|
-
}
|
|
2141
|
-
|
|
2142
|
-
return [];
|
|
2143
|
-
}
|
|
2144
|
-
|
|
2145
|
-
/**
|
|
2146
|
-
* Sets the event handler for collection updates.
|
|
2147
|
-
* @param handler - Event handler for channel collection changes
|
|
2148
|
-
*/
|
|
2149
|
-
public setConversationListCollectionHandler(handler: ConversationListCollectionEventHandler): void {
|
|
2150
|
-
this._collectionEventHandler = handler;
|
|
2151
|
-
}
|
|
2152
|
-
|
|
2153
|
-
/**
|
|
2154
|
-
* Disposes the collection and cleans up all resources.
|
|
2155
|
-
* Stops all event handlers and clears all channels.
|
|
2156
|
-
*/
|
|
2157
|
-
public dispose(): void {
|
|
2158
|
-
if (this._isDisposed) return;
|
|
2159
|
-
|
|
2160
|
-
this._isDisposed = true;
|
|
2161
|
-
this._throttledOnChannelChanged.cancel();
|
|
2162
|
-
this._collectionEventHandler = undefined;
|
|
2163
|
-
this._sdk.removeConnectionHandler(this._handlerId);
|
|
2164
|
-
this._sdk.groupChannel.removeGroupChannelHandler(this._handlerId);
|
|
2165
|
-
this._pinnedChannels.length = 0;
|
|
2166
|
-
this._channels.length = 0;
|
|
2167
|
-
}
|
|
2168
|
-
}
|
|
2169
|
-
|
|
2170
|
-
declare interface ConversationListCollectionEventHandler {
|
|
2171
|
-
/** Called when there are newly added {@link GroupChannel}s. */
|
|
2172
|
-
onChannelsAdded?: (context: ConversationListContext_2, channels: ChatSDKGroupChannel[]) => void;
|
|
2173
|
-
/** Called when there's an update in one or more of the {@link GroupChannel}s that `GroupChannelCollection` holds. */
|
|
2174
|
-
onChannelsUpdated?: (context: ConversationListContext_2, channels: ChatSDKGroupChannel[]) => void;
|
|
2175
|
-
/** Called when one or more of the {@link GroupChannel}s that `GroupChannelCollection` holds has been deleted. */
|
|
2176
|
-
onChannelsDeleted?: (context: ConversationListContext_2, channelUrls: string[]) => void;
|
|
1822
|
+
declare interface ConversationListCollectionInterface {
|
|
1823
|
+
readonly channels: ChatSDKGroupChannel[];
|
|
1824
|
+
readonly hasMore: boolean;
|
|
1825
|
+
loadMore(): Promise<ChatSDKGroupChannel[]>;
|
|
1826
|
+
setConversationListCollectionHandler(handler: ChatSDKBaseChannelCollectionEventHandler): void;
|
|
1827
|
+
dispose(): void;
|
|
2177
1828
|
}
|
|
2178
1829
|
|
|
2179
1830
|
/**
|
|
@@ -2188,18 +1839,16 @@ declare interface ConversationListCollectionParams {
|
|
|
2188
1839
|
|
|
2189
1840
|
export declare const ConversationListContext: Context<ConversationListContextValue | null>;
|
|
2190
1841
|
|
|
2191
|
-
declare interface ConversationListContext_2 {}
|
|
2192
|
-
|
|
2193
1842
|
declare interface ConversationListContextProps {
|
|
2194
1843
|
conversationListLimit?: number;
|
|
2195
1844
|
conversationListFilter?: Partial<AIAgentGroupChannelFilter>;
|
|
2196
|
-
onOpenConversationView?: (channelUrl: string, status: 'open' | 'closed') => void;
|
|
1845
|
+
onOpenConversationView?: (channelUrl: string, status: 'open' | 'closed', options?: ConversationListOpenOptions) => void;
|
|
2197
1846
|
}
|
|
2198
1847
|
|
|
2199
1848
|
export declare function ConversationListContextProvider({ conversationListLimit, conversationListFilter, onOpenConversationView, children, }: PropsWithChildren<ConversationListContextProps>): JSX.Element;
|
|
2200
1849
|
|
|
2201
1850
|
declare interface ConversationListContextValue extends AIAgentConversationListContextValue {
|
|
2202
|
-
onOpenConversationView: (channelUrl: string, status: 'open' | 'closed') => void;
|
|
1851
|
+
onOpenConversationView: (channelUrl: string, status: 'open' | 'closed', options?: ConversationListOpenOptions) => void;
|
|
2203
1852
|
}
|
|
2204
1853
|
|
|
2205
1854
|
export declare const ConversationListHeaderLayout: {
|
|
@@ -2314,6 +1963,10 @@ export declare const ConversationListLayout: {
|
|
|
2314
1963
|
}) => null;
|
|
2315
1964
|
};
|
|
2316
1965
|
|
|
1966
|
+
declare interface ConversationListOpenOptions {
|
|
1967
|
+
initialFocusTarget?: 'messageInput';
|
|
1968
|
+
}
|
|
1969
|
+
|
|
2317
1970
|
declare type ConversationMessageEvent = ConversationMessageEventPayload & { id: number };
|
|
2318
1971
|
|
|
2319
1972
|
declare type ConversationMessageEventPayload =
|
|
@@ -2432,6 +2085,7 @@ export declare interface CustomMessageTemplateData {
|
|
|
2432
2085
|
export declare type DateSeparatorProps = SBUFoundationProps<{
|
|
2433
2086
|
/** date or timestamp */
|
|
2434
2087
|
date?: Date | number;
|
|
2088
|
+
role?: AriaRole;
|
|
2435
2089
|
}>;
|
|
2436
2090
|
|
|
2437
2091
|
/**
|
|
@@ -2575,6 +2229,7 @@ export declare interface ExtendedMessagePayload {
|
|
|
2575
2229
|
| 'safeguard'
|
|
2576
2230
|
| 'error';
|
|
2577
2231
|
citations?: CitationInfo[];
|
|
2232
|
+
challenge?: ChallengeInfo;
|
|
2578
2233
|
feedback?: FeedbackInfo;
|
|
2579
2234
|
form?: Form;
|
|
2580
2235
|
steward?: Steward;
|
|
@@ -2710,6 +2365,7 @@ BaseMessageProps<{
|
|
|
2710
2365
|
isFeedbackCommentEnabled?: boolean;
|
|
2711
2366
|
isSenderAvatarVisible?: boolean;
|
|
2712
2367
|
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
2368
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
2713
2369
|
|
|
2714
2370
|
// handlers
|
|
2715
2371
|
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
@@ -2721,6 +2377,7 @@ BaseMessageProps<{
|
|
|
2721
2377
|
onFeedbackUpdate?: (params: { rating: 'good' | 'bad'; comment?: string } | null) => void;
|
|
2722
2378
|
onSubmitForm?: (params: { key: string; data: Record<string, FormFieldValue> }) => Promise<void>;
|
|
2723
2379
|
onCancelForm?: (params: { key: string }) => Promise<void>;
|
|
2380
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
2724
2381
|
onStreamAnimationStart?: () => void;
|
|
2725
2382
|
onStreamAnimationProgress?: () => void;
|
|
2726
2383
|
onStreamAnimationComplete?: () => void;
|
|
@@ -2790,6 +2447,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2790
2447
|
isFeedbackCommentEnabled?: boolean;
|
|
2791
2448
|
isSenderAvatarVisible?: boolean;
|
|
2792
2449
|
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
2450
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
2793
2451
|
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
2794
2452
|
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
2795
2453
|
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
@@ -2811,6 +2469,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2811
2469
|
onCancelForm?: (params: {
|
|
2812
2470
|
key: string;
|
|
2813
2471
|
}) => Promise<void>;
|
|
2472
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
2814
2473
|
onStreamAnimationStart?: () => void;
|
|
2815
2474
|
onStreamAnimationProgress?: () => void;
|
|
2816
2475
|
onStreamAnimationComplete?: () => void;
|
|
@@ -2867,6 +2526,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2867
2526
|
isFeedbackCommentEnabled?: boolean;
|
|
2868
2527
|
isSenderAvatarVisible?: boolean;
|
|
2869
2528
|
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
2529
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
2870
2530
|
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
2871
2531
|
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
2872
2532
|
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
@@ -2888,6 +2548,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2888
2548
|
onCancelForm?: (params: {
|
|
2889
2549
|
key: string;
|
|
2890
2550
|
}) => Promise<void>;
|
|
2551
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
2891
2552
|
onStreamAnimationStart?: () => void;
|
|
2892
2553
|
onStreamAnimationProgress?: () => void;
|
|
2893
2554
|
onStreamAnimationComplete?: () => void;
|
|
@@ -2944,6 +2605,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2944
2605
|
isFeedbackCommentEnabled?: boolean;
|
|
2945
2606
|
isSenderAvatarVisible?: boolean;
|
|
2946
2607
|
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
2608
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
2947
2609
|
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
2948
2610
|
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
2949
2611
|
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
@@ -2965,6 +2627,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2965
2627
|
onCancelForm?: (params: {
|
|
2966
2628
|
key: string;
|
|
2967
2629
|
}) => Promise<void>;
|
|
2630
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
2968
2631
|
onStreamAnimationStart?: () => void;
|
|
2969
2632
|
onStreamAnimationProgress?: () => void;
|
|
2970
2633
|
onStreamAnimationComplete?: () => void;
|
|
@@ -2997,138 +2660,607 @@ export declare const IncomingMessageLayout: {
|
|
|
2997
2660
|
}) => void;
|
|
2998
2661
|
children?: ReactNode;
|
|
2999
2662
|
})) => ReactNode;
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
2663
|
+
Challenge: (_: ({
|
|
2664
|
+
messageType: "user";
|
|
2665
|
+
message: string;
|
|
2666
|
+
} & {
|
|
2667
|
+
sender: {
|
|
2668
|
+
nickname: string;
|
|
2669
|
+
profileUrl?: string;
|
|
2670
|
+
};
|
|
2671
|
+
thinkingMessage?: string;
|
|
2672
|
+
suggestedRepliesVisible?: boolean;
|
|
2673
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
2674
|
+
isBotMessage?: boolean;
|
|
2675
|
+
isTyping?: boolean;
|
|
2676
|
+
isStreaming?: boolean;
|
|
2677
|
+
isHandedOff?: boolean;
|
|
2678
|
+
isConversationClosed?: boolean;
|
|
2679
|
+
isFeedbackEnabled?: boolean;
|
|
2680
|
+
isFeedbackCommentEnabled?: boolean;
|
|
2681
|
+
isSenderAvatarVisible?: boolean;
|
|
2682
|
+
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
2683
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
2684
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
2685
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
2686
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
2687
|
+
onClickSuggestedReply?: (params: {
|
|
2688
|
+
reply: string;
|
|
2689
|
+
}) => void;
|
|
2690
|
+
onClickCTA?: (params: {
|
|
2691
|
+
url: string;
|
|
2692
|
+
}) => void;
|
|
2693
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
2694
|
+
onFeedbackUpdate?: (params: {
|
|
2695
|
+
rating: "good" | "bad";
|
|
2696
|
+
comment?: string;
|
|
2697
|
+
} | null) => void;
|
|
2698
|
+
onSubmitForm?: (params: {
|
|
2699
|
+
key: string;
|
|
2700
|
+
data: Record<string, FormFieldValue>;
|
|
2701
|
+
}) => Promise<void>;
|
|
2702
|
+
onCancelForm?: (params: {
|
|
2703
|
+
key: string;
|
|
2704
|
+
}) => Promise<void>;
|
|
2705
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
2706
|
+
onStreamAnimationStart?: () => void;
|
|
2707
|
+
onStreamAnimationProgress?: () => void;
|
|
2708
|
+
onStreamAnimationComplete?: () => void;
|
|
2709
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
2710
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
2711
|
+
} & {
|
|
2712
|
+
data?: string;
|
|
2713
|
+
createdAt?: number;
|
|
2714
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
2715
|
+
groupType?: MessageGroupType;
|
|
2716
|
+
maxBodyWidth?: number;
|
|
2717
|
+
onClickMedia?: (params: {
|
|
2718
|
+
url: string;
|
|
2719
|
+
type: string;
|
|
2720
|
+
}) => void;
|
|
2721
|
+
onClickMediaFiles?: (params: {
|
|
2722
|
+
files: Array<{
|
|
2723
|
+
url: string;
|
|
2724
|
+
type: string;
|
|
2725
|
+
name?: string;
|
|
2726
|
+
}>;
|
|
2727
|
+
index: number;
|
|
2728
|
+
}) => void;
|
|
2729
|
+
onClickFile?: (params: {
|
|
2730
|
+
url: string;
|
|
2731
|
+
type: string;
|
|
2732
|
+
}) => void;
|
|
2733
|
+
onClickLink?: (params: {
|
|
2734
|
+
url: string;
|
|
2735
|
+
}) => void;
|
|
2736
|
+
children?: ReactNode;
|
|
2737
|
+
}) | ({
|
|
2738
|
+
messageType: "file";
|
|
2739
|
+
message: string;
|
|
2740
|
+
file: {
|
|
2741
|
+
type: string;
|
|
2742
|
+
url: string;
|
|
2743
|
+
name: string;
|
|
2744
|
+
};
|
|
2745
|
+
} & {
|
|
2746
|
+
sender: {
|
|
2747
|
+
nickname: string;
|
|
2748
|
+
profileUrl?: string;
|
|
2749
|
+
};
|
|
2750
|
+
thinkingMessage?: string;
|
|
2751
|
+
suggestedRepliesVisible?: boolean;
|
|
2752
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
2753
|
+
isBotMessage?: boolean;
|
|
2754
|
+
isTyping?: boolean;
|
|
2755
|
+
isStreaming?: boolean;
|
|
2756
|
+
isHandedOff?: boolean;
|
|
2757
|
+
isConversationClosed?: boolean;
|
|
2758
|
+
isFeedbackEnabled?: boolean;
|
|
2759
|
+
isFeedbackCommentEnabled?: boolean;
|
|
2760
|
+
isSenderAvatarVisible?: boolean;
|
|
2761
|
+
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
2762
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
2763
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
2764
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
2765
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
2766
|
+
onClickSuggestedReply?: (params: {
|
|
2767
|
+
reply: string;
|
|
2768
|
+
}) => void;
|
|
2769
|
+
onClickCTA?: (params: {
|
|
2770
|
+
url: string;
|
|
2771
|
+
}) => void;
|
|
2772
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
2773
|
+
onFeedbackUpdate?: (params: {
|
|
2774
|
+
rating: "good" | "bad";
|
|
2775
|
+
comment?: string;
|
|
2776
|
+
} | null) => void;
|
|
2777
|
+
onSubmitForm?: (params: {
|
|
2778
|
+
key: string;
|
|
2779
|
+
data: Record<string, FormFieldValue>;
|
|
2780
|
+
}) => Promise<void>;
|
|
2781
|
+
onCancelForm?: (params: {
|
|
2782
|
+
key: string;
|
|
2783
|
+
}) => Promise<void>;
|
|
2784
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
2785
|
+
onStreamAnimationStart?: () => void;
|
|
2786
|
+
onStreamAnimationProgress?: () => void;
|
|
2787
|
+
onStreamAnimationComplete?: () => void;
|
|
2788
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
2789
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
2790
|
+
} & {
|
|
2791
|
+
data?: string;
|
|
2792
|
+
createdAt?: number;
|
|
2793
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
2794
|
+
groupType?: MessageGroupType;
|
|
2795
|
+
maxBodyWidth?: number;
|
|
2796
|
+
onClickMedia?: (params: {
|
|
2797
|
+
url: string;
|
|
2798
|
+
type: string;
|
|
2799
|
+
}) => void;
|
|
2800
|
+
onClickMediaFiles?: (params: {
|
|
2801
|
+
files: Array<{
|
|
2802
|
+
url: string;
|
|
2803
|
+
type: string;
|
|
2804
|
+
name?: string;
|
|
2805
|
+
}>;
|
|
2806
|
+
index: number;
|
|
2807
|
+
}) => void;
|
|
2808
|
+
onClickFile?: (params: {
|
|
2809
|
+
url: string;
|
|
2810
|
+
type: string;
|
|
2811
|
+
}) => void;
|
|
2812
|
+
onClickLink?: (params: {
|
|
2813
|
+
url: string;
|
|
2814
|
+
}) => void;
|
|
2815
|
+
children?: ReactNode;
|
|
2816
|
+
}) | ({
|
|
2817
|
+
messageType: "multipleFiles";
|
|
2818
|
+
message: string;
|
|
2819
|
+
files: {
|
|
2820
|
+
type: string;
|
|
2821
|
+
url: string;
|
|
2822
|
+
name: string;
|
|
2823
|
+
}[];
|
|
2824
|
+
} & {
|
|
2825
|
+
sender: {
|
|
2826
|
+
nickname: string;
|
|
2827
|
+
profileUrl?: string;
|
|
2828
|
+
};
|
|
2829
|
+
thinkingMessage?: string;
|
|
2830
|
+
suggestedRepliesVisible?: boolean;
|
|
2831
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
2832
|
+
isBotMessage?: boolean;
|
|
2833
|
+
isTyping?: boolean;
|
|
2834
|
+
isStreaming?: boolean;
|
|
2835
|
+
isHandedOff?: boolean;
|
|
2836
|
+
isConversationClosed?: boolean;
|
|
2837
|
+
isFeedbackEnabled?: boolean;
|
|
2838
|
+
isFeedbackCommentEnabled?: boolean;
|
|
2839
|
+
isSenderAvatarVisible?: boolean;
|
|
2840
|
+
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
2841
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
2842
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
2843
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
2844
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
2845
|
+
onClickSuggestedReply?: (params: {
|
|
2846
|
+
reply: string;
|
|
2847
|
+
}) => void;
|
|
2848
|
+
onClickCTA?: (params: {
|
|
2849
|
+
url: string;
|
|
2850
|
+
}) => void;
|
|
2851
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
2852
|
+
onFeedbackUpdate?: (params: {
|
|
2853
|
+
rating: "good" | "bad";
|
|
2854
|
+
comment?: string;
|
|
2855
|
+
} | null) => void;
|
|
2856
|
+
onSubmitForm?: (params: {
|
|
2857
|
+
key: string;
|
|
2858
|
+
data: Record<string, FormFieldValue>;
|
|
2859
|
+
}) => Promise<void>;
|
|
2860
|
+
onCancelForm?: (params: {
|
|
2861
|
+
key: string;
|
|
2862
|
+
}) => Promise<void>;
|
|
2863
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
2864
|
+
onStreamAnimationStart?: () => void;
|
|
2865
|
+
onStreamAnimationProgress?: () => void;
|
|
2866
|
+
onStreamAnimationComplete?: () => void;
|
|
2867
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
2868
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
2869
|
+
} & {
|
|
2870
|
+
data?: string;
|
|
2871
|
+
createdAt?: number;
|
|
2872
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
2873
|
+
groupType?: MessageGroupType;
|
|
2874
|
+
maxBodyWidth?: number;
|
|
2875
|
+
onClickMedia?: (params: {
|
|
2876
|
+
url: string;
|
|
2877
|
+
type: string;
|
|
2878
|
+
}) => void;
|
|
2879
|
+
onClickMediaFiles?: (params: {
|
|
2880
|
+
files: Array<{
|
|
2881
|
+
url: string;
|
|
2882
|
+
type: string;
|
|
2883
|
+
name?: string;
|
|
2884
|
+
}>;
|
|
2885
|
+
index: number;
|
|
2886
|
+
}) => void;
|
|
2887
|
+
onClickFile?: (params: {
|
|
2888
|
+
url: string;
|
|
2889
|
+
type: string;
|
|
2890
|
+
}) => void;
|
|
2891
|
+
onClickLink?: (params: {
|
|
2892
|
+
url: string;
|
|
2893
|
+
}) => void;
|
|
2894
|
+
children?: ReactNode;
|
|
2895
|
+
})) => ReactNode;
|
|
2896
|
+
CTAButton: ({ extendedMessagePayload, onClickCTA, }: IncomingMessageProps) => ReactNode;
|
|
2897
|
+
Citation: ({ extendedMessagePayload, onClickCitation, }: IncomingMessageProps) => ReactNode;
|
|
2898
|
+
Form: (props: IncomingMessageProps) => ReactNode;
|
|
2899
|
+
Feedback: ({ isBotMessage, isConversationClosed, isStreaming, isFeedbackEnabled, isFeedbackCommentEnabled, extendedMessagePayload, onFeedbackUpdate, }: IncomingMessageProps) => ReactNode;
|
|
2900
|
+
MessageLogs: (_: IncomingMessageProps) => ReactNode;
|
|
2901
|
+
};
|
|
2902
|
+
};
|
|
2903
|
+
Template: ({ template, children }: {
|
|
2904
|
+
template?: ComponentType<IncomingMessageTemplateProps> | undefined;
|
|
2905
|
+
children?: ReactNode;
|
|
2906
|
+
}) => JSX.Element;
|
|
2907
|
+
Context: Context<LayoutContextValue<IncomingMessageTemplateProps, {
|
|
2908
|
+
SenderName: ({ sender }: Pick<IncomingMessageProps, "sender">) => ReactNode;
|
|
2909
|
+
SenderAvatar: ({ sender, isBotMessage, }: Pick<IncomingMessageProps, "sender" | "isBotMessage">) => ReactNode;
|
|
2910
|
+
SentTime: ({ createdAt }: Pick<IncomingMessageProps, "createdAt">) => ReactNode;
|
|
2911
|
+
MessageBody: (props: IncomingMessageBodyProps) => ReactNode;
|
|
2912
|
+
TextMessageBody: typeof IncomingTextBody;
|
|
2913
|
+
MediaMessageBody: typeof IncomingMediaBody;
|
|
2914
|
+
FileMessageBody: typeof IncomingFileBody;
|
|
2915
|
+
MultipleFilesMessageBody: ({ files, children, onClickMedia, onClickMediaFiles, }: IncomingMessageBodyProps<"multipleFiles">) => JSX.Element;
|
|
2916
|
+
TypingIndicator: ({ thinkingMessage, customStyle }: IncomingMessageProps & {
|
|
2917
|
+
customStyle?: {
|
|
2918
|
+
bubbleContentColor?: string;
|
|
2919
|
+
bubbleBackgroundColor?: string;
|
|
2920
|
+
};
|
|
2921
|
+
}) => ReactNode;
|
|
2922
|
+
SuggestedReplies: ({ extendedMessagePayload, onClickSuggestedReply, suggestedRepliesDirection, }: IncomingMessageProps) => ReactNode;
|
|
2923
|
+
MessageTemplate: (props: {
|
|
2924
|
+
onGetCachedMessageTemplate?: ((templateKey: string) => string | null) | undefined;
|
|
2925
|
+
onRequestMessageTemplate?: ((templateKey: string) => Promise<string>) | undefined;
|
|
2926
|
+
onHandleTemplateInternalAction?: ((action: Action) => void) | undefined;
|
|
2927
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
2928
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
2929
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload> | undefined;
|
|
2930
|
+
}) => ReactNode;
|
|
2931
|
+
CustomMessageTemplate: (_: ({
|
|
2932
|
+
messageType: "user";
|
|
2933
|
+
message: string;
|
|
2934
|
+
} & {
|
|
2935
|
+
sender: {
|
|
2936
|
+
nickname: string;
|
|
2937
|
+
profileUrl?: string;
|
|
2938
|
+
};
|
|
2939
|
+
thinkingMessage?: string;
|
|
2940
|
+
suggestedRepliesVisible?: boolean;
|
|
2941
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
2942
|
+
isBotMessage?: boolean;
|
|
2943
|
+
isTyping?: boolean;
|
|
2944
|
+
isStreaming?: boolean;
|
|
2945
|
+
isHandedOff?: boolean;
|
|
2946
|
+
isConversationClosed?: boolean;
|
|
2947
|
+
isFeedbackEnabled?: boolean;
|
|
2948
|
+
isFeedbackCommentEnabled?: boolean;
|
|
2949
|
+
isSenderAvatarVisible?: boolean;
|
|
2950
|
+
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
2951
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
2952
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
2953
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
2954
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
2955
|
+
onClickSuggestedReply?: (params: {
|
|
2956
|
+
reply: string;
|
|
2957
|
+
}) => void;
|
|
2958
|
+
onClickCTA?: (params: {
|
|
2959
|
+
url: string;
|
|
2960
|
+
}) => void;
|
|
2961
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
2962
|
+
onFeedbackUpdate?: (params: {
|
|
2963
|
+
rating: "good" | "bad";
|
|
2964
|
+
comment?: string;
|
|
2965
|
+
} | null) => void;
|
|
2966
|
+
onSubmitForm?: (params: {
|
|
2967
|
+
key: string;
|
|
2968
|
+
data: Record<string, FormFieldValue>;
|
|
2969
|
+
}) => Promise<void>;
|
|
2970
|
+
onCancelForm?: (params: {
|
|
2971
|
+
key: string;
|
|
2972
|
+
}) => Promise<void>;
|
|
2973
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
2974
|
+
onStreamAnimationStart?: () => void;
|
|
2975
|
+
onStreamAnimationProgress?: () => void;
|
|
2976
|
+
onStreamAnimationComplete?: () => void;
|
|
2977
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
2978
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
2979
|
+
} & {
|
|
2980
|
+
data?: string;
|
|
2981
|
+
createdAt?: number;
|
|
2982
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
2983
|
+
groupType?: MessageGroupType;
|
|
2984
|
+
maxBodyWidth?: number;
|
|
2985
|
+
onClickMedia?: (params: {
|
|
2986
|
+
url: string;
|
|
2987
|
+
type: string;
|
|
2988
|
+
}) => void;
|
|
2989
|
+
onClickMediaFiles?: (params: {
|
|
2990
|
+
files: Array<{
|
|
2991
|
+
url: string;
|
|
2992
|
+
type: string;
|
|
2993
|
+
name?: string;
|
|
2994
|
+
}>;
|
|
2995
|
+
index: number;
|
|
2996
|
+
}) => void;
|
|
2997
|
+
onClickFile?: (params: {
|
|
2998
|
+
url: string;
|
|
2999
|
+
type: string;
|
|
3000
|
+
}) => void;
|
|
3001
|
+
onClickLink?: (params: {
|
|
3002
|
+
url: string;
|
|
3003
|
+
}) => void;
|
|
3004
|
+
children?: ReactNode;
|
|
3005
|
+
}) | ({
|
|
3006
|
+
messageType: "file";
|
|
3007
|
+
message: string;
|
|
3008
|
+
file: {
|
|
3009
|
+
type: string;
|
|
3010
|
+
url: string;
|
|
3011
|
+
name: string;
|
|
3012
|
+
};
|
|
3013
|
+
} & {
|
|
3014
|
+
sender: {
|
|
3015
|
+
nickname: string;
|
|
3016
|
+
profileUrl?: string;
|
|
3017
|
+
};
|
|
3018
|
+
thinkingMessage?: string;
|
|
3019
|
+
suggestedRepliesVisible?: boolean;
|
|
3020
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
3021
|
+
isBotMessage?: boolean;
|
|
3022
|
+
isTyping?: boolean;
|
|
3023
|
+
isStreaming?: boolean;
|
|
3024
|
+
isHandedOff?: boolean;
|
|
3025
|
+
isConversationClosed?: boolean;
|
|
3026
|
+
isFeedbackEnabled?: boolean;
|
|
3027
|
+
isFeedbackCommentEnabled?: boolean;
|
|
3028
|
+
isSenderAvatarVisible?: boolean;
|
|
3029
|
+
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
3030
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
3031
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
3032
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
3033
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
3034
|
+
onClickSuggestedReply?: (params: {
|
|
3035
|
+
reply: string;
|
|
3036
|
+
}) => void;
|
|
3037
|
+
onClickCTA?: (params: {
|
|
3038
|
+
url: string;
|
|
3039
|
+
}) => void;
|
|
3040
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
3041
|
+
onFeedbackUpdate?: (params: {
|
|
3042
|
+
rating: "good" | "bad";
|
|
3043
|
+
comment?: string;
|
|
3044
|
+
} | null) => void;
|
|
3045
|
+
onSubmitForm?: (params: {
|
|
3046
|
+
key: string;
|
|
3047
|
+
data: Record<string, FormFieldValue>;
|
|
3048
|
+
}) => Promise<void>;
|
|
3049
|
+
onCancelForm?: (params: {
|
|
3050
|
+
key: string;
|
|
3051
|
+
}) => Promise<void>;
|
|
3052
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
3053
|
+
onStreamAnimationStart?: () => void;
|
|
3054
|
+
onStreamAnimationProgress?: () => void;
|
|
3055
|
+
onStreamAnimationComplete?: () => void;
|
|
3056
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
3057
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
3058
|
+
} & {
|
|
3059
|
+
data?: string;
|
|
3060
|
+
createdAt?: number;
|
|
3061
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
3062
|
+
groupType?: MessageGroupType;
|
|
3063
|
+
maxBodyWidth?: number;
|
|
3064
|
+
onClickMedia?: (params: {
|
|
3065
|
+
url: string;
|
|
3066
|
+
type: string;
|
|
3067
|
+
}) => void;
|
|
3068
|
+
onClickMediaFiles?: (params: {
|
|
3069
|
+
files: Array<{
|
|
3070
|
+
url: string;
|
|
3071
|
+
type: string;
|
|
3072
|
+
name?: string;
|
|
3073
|
+
}>;
|
|
3074
|
+
index: number;
|
|
3075
|
+
}) => void;
|
|
3076
|
+
onClickFile?: (params: {
|
|
3077
|
+
url: string;
|
|
3078
|
+
type: string;
|
|
3079
|
+
}) => void;
|
|
3080
|
+
onClickLink?: (params: {
|
|
3081
|
+
url: string;
|
|
3082
|
+
}) => void;
|
|
3083
|
+
children?: ReactNode;
|
|
3084
|
+
}) | ({
|
|
3085
|
+
messageType: "multipleFiles";
|
|
3086
|
+
message: string;
|
|
3087
|
+
files: {
|
|
3088
|
+
type: string;
|
|
3089
|
+
url: string;
|
|
3090
|
+
name: string;
|
|
3091
|
+
}[];
|
|
3092
|
+
} & {
|
|
3093
|
+
sender: {
|
|
3094
|
+
nickname: string;
|
|
3095
|
+
profileUrl?: string;
|
|
3096
|
+
};
|
|
3097
|
+
thinkingMessage?: string;
|
|
3098
|
+
suggestedRepliesVisible?: boolean;
|
|
3099
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
3100
|
+
isBotMessage?: boolean;
|
|
3101
|
+
isTyping?: boolean;
|
|
3102
|
+
isStreaming?: boolean;
|
|
3103
|
+
isHandedOff?: boolean;
|
|
3104
|
+
isConversationClosed?: boolean;
|
|
3105
|
+
isFeedbackEnabled?: boolean;
|
|
3106
|
+
isFeedbackCommentEnabled?: boolean;
|
|
3107
|
+
isSenderAvatarVisible?: boolean;
|
|
3108
|
+
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
3109
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
3110
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
3111
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
3112
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
3113
|
+
onClickSuggestedReply?: (params: {
|
|
3114
|
+
reply: string;
|
|
3115
|
+
}) => void;
|
|
3116
|
+
onClickCTA?: (params: {
|
|
3117
|
+
url: string;
|
|
3118
|
+
}) => void;
|
|
3119
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
3120
|
+
onFeedbackUpdate?: (params: {
|
|
3121
|
+
rating: "good" | "bad";
|
|
3122
|
+
comment?: string;
|
|
3123
|
+
} | null) => void;
|
|
3124
|
+
onSubmitForm?: (params: {
|
|
3125
|
+
key: string;
|
|
3126
|
+
data: Record<string, FormFieldValue>;
|
|
3127
|
+
}) => Promise<void>;
|
|
3128
|
+
onCancelForm?: (params: {
|
|
3129
|
+
key: string;
|
|
3130
|
+
}) => Promise<void>;
|
|
3131
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
3132
|
+
onStreamAnimationStart?: () => void;
|
|
3133
|
+
onStreamAnimationProgress?: () => void;
|
|
3134
|
+
onStreamAnimationComplete?: () => void;
|
|
3135
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
3136
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
3137
|
+
} & {
|
|
3138
|
+
data?: string;
|
|
3139
|
+
createdAt?: number;
|
|
3140
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
3141
|
+
groupType?: MessageGroupType;
|
|
3142
|
+
maxBodyWidth?: number;
|
|
3143
|
+
onClickMedia?: (params: {
|
|
3144
|
+
url: string;
|
|
3145
|
+
type: string;
|
|
3146
|
+
}) => void;
|
|
3147
|
+
onClickMediaFiles?: (params: {
|
|
3148
|
+
files: Array<{
|
|
3149
|
+
url: string;
|
|
3150
|
+
type: string;
|
|
3151
|
+
name?: string;
|
|
3152
|
+
}>;
|
|
3153
|
+
index: number;
|
|
3154
|
+
}) => void;
|
|
3155
|
+
onClickFile?: (params: {
|
|
3156
|
+
url: string;
|
|
3157
|
+
type: string;
|
|
3158
|
+
}) => void;
|
|
3159
|
+
onClickLink?: (params: {
|
|
3160
|
+
url: string;
|
|
3161
|
+
}) => void;
|
|
3162
|
+
children?: ReactNode;
|
|
3163
|
+
})) => ReactNode;
|
|
3164
|
+
Challenge: (_: ({
|
|
3165
|
+
messageType: "user";
|
|
3166
|
+
message: string;
|
|
3167
|
+
} & {
|
|
3168
|
+
sender: {
|
|
3169
|
+
nickname: string;
|
|
3170
|
+
profileUrl?: string;
|
|
3171
|
+
};
|
|
3172
|
+
thinkingMessage?: string;
|
|
3173
|
+
suggestedRepliesVisible?: boolean;
|
|
3174
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
3175
|
+
isBotMessage?: boolean;
|
|
3176
|
+
isTyping?: boolean;
|
|
3177
|
+
isStreaming?: boolean;
|
|
3178
|
+
isHandedOff?: boolean;
|
|
3179
|
+
isConversationClosed?: boolean;
|
|
3180
|
+
isFeedbackEnabled?: boolean;
|
|
3181
|
+
isFeedbackCommentEnabled?: boolean;
|
|
3182
|
+
isSenderAvatarVisible?: boolean;
|
|
3183
|
+
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
3184
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
3185
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
3186
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
3187
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
3188
|
+
onClickSuggestedReply?: (params: {
|
|
3189
|
+
reply: string;
|
|
3190
|
+
}) => void;
|
|
3191
|
+
onClickCTA?: (params: {
|
|
3192
|
+
url: string;
|
|
3193
|
+
}) => void;
|
|
3194
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
3195
|
+
onFeedbackUpdate?: (params: {
|
|
3196
|
+
rating: "good" | "bad";
|
|
3197
|
+
comment?: string;
|
|
3198
|
+
} | null) => void;
|
|
3199
|
+
onSubmitForm?: (params: {
|
|
3200
|
+
key: string;
|
|
3201
|
+
data: Record<string, FormFieldValue>;
|
|
3202
|
+
}) => Promise<void>;
|
|
3203
|
+
onCancelForm?: (params: {
|
|
3204
|
+
key: string;
|
|
3205
|
+
}) => Promise<void>;
|
|
3206
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
3207
|
+
onStreamAnimationStart?: () => void;
|
|
3208
|
+
onStreamAnimationProgress?: () => void;
|
|
3209
|
+
onStreamAnimationComplete?: () => void;
|
|
3210
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
3211
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
3212
|
+
} & {
|
|
3213
|
+
data?: string;
|
|
3214
|
+
createdAt?: number;
|
|
3215
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
3216
|
+
groupType?: MessageGroupType;
|
|
3217
|
+
maxBodyWidth?: number;
|
|
3218
|
+
onClickMedia?: (params: {
|
|
3219
|
+
url: string;
|
|
3220
|
+
type: string;
|
|
3221
|
+
}) => void;
|
|
3222
|
+
onClickMediaFiles?: (params: {
|
|
3223
|
+
files: Array<{
|
|
3224
|
+
url: string;
|
|
3225
|
+
type: string;
|
|
3226
|
+
name?: string;
|
|
3227
|
+
}>;
|
|
3228
|
+
index: number;
|
|
3229
|
+
}) => void;
|
|
3230
|
+
onClickFile?: (params: {
|
|
3231
|
+
url: string;
|
|
3232
|
+
type: string;
|
|
3233
|
+
}) => void;
|
|
3234
|
+
onClickLink?: (params: {
|
|
3235
|
+
url: string;
|
|
3236
|
+
}) => void;
|
|
3237
|
+
children?: ReactNode;
|
|
3238
|
+
}) | ({
|
|
3239
|
+
messageType: "file";
|
|
3240
|
+
message: string;
|
|
3241
|
+
file: {
|
|
3242
|
+
type: string;
|
|
3243
|
+
url: string;
|
|
3244
|
+
name: string;
|
|
3245
|
+
};
|
|
3246
|
+
} & {
|
|
3247
|
+
sender: {
|
|
3248
|
+
nickname: string;
|
|
3249
|
+
profileUrl?: string;
|
|
3250
|
+
};
|
|
3251
|
+
thinkingMessage?: string;
|
|
3252
|
+
suggestedRepliesVisible?: boolean;
|
|
3253
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
3254
|
+
isBotMessage?: boolean;
|
|
3255
|
+
isTyping?: boolean;
|
|
3256
|
+
isStreaming?: boolean;
|
|
3257
|
+
isHandedOff?: boolean;
|
|
3258
|
+
isConversationClosed?: boolean;
|
|
3259
|
+
isFeedbackEnabled?: boolean;
|
|
3260
|
+
isFeedbackCommentEnabled?: boolean;
|
|
3261
|
+
isSenderAvatarVisible?: boolean;
|
|
3262
|
+
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
3263
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
3132
3264
|
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
3133
3265
|
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
3134
3266
|
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
@@ -3150,6 +3282,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3150
3282
|
onCancelForm?: (params: {
|
|
3151
3283
|
key: string;
|
|
3152
3284
|
}) => Promise<void>;
|
|
3285
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
3153
3286
|
onStreamAnimationStart?: () => void;
|
|
3154
3287
|
onStreamAnimationProgress?: () => void;
|
|
3155
3288
|
onStreamAnimationComplete?: () => void;
|
|
@@ -3206,6 +3339,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3206
3339
|
isFeedbackCommentEnabled?: boolean;
|
|
3207
3340
|
isSenderAvatarVisible?: boolean;
|
|
3208
3341
|
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
3342
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
3209
3343
|
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
3210
3344
|
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
3211
3345
|
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
@@ -3227,6 +3361,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3227
3361
|
onCancelForm?: (params: {
|
|
3228
3362
|
key: string;
|
|
3229
3363
|
}) => Promise<void>;
|
|
3364
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
3230
3365
|
onStreamAnimationStart?: () => void;
|
|
3231
3366
|
onStreamAnimationProgress?: () => void;
|
|
3232
3367
|
onStreamAnimationComplete?: () => void;
|
|
@@ -3309,6 +3444,240 @@ export declare const IncomingMessageLayout: {
|
|
|
3309
3444
|
isFeedbackCommentEnabled?: boolean;
|
|
3310
3445
|
isSenderAvatarVisible?: boolean;
|
|
3311
3446
|
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
3447
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
3448
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
3449
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
3450
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
3451
|
+
onClickSuggestedReply?: (params: {
|
|
3452
|
+
reply: string;
|
|
3453
|
+
}) => void;
|
|
3454
|
+
onClickCTA?: (params: {
|
|
3455
|
+
url: string;
|
|
3456
|
+
}) => void;
|
|
3457
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
3458
|
+
onFeedbackUpdate?: (params: {
|
|
3459
|
+
rating: "good" | "bad";
|
|
3460
|
+
comment?: string;
|
|
3461
|
+
} | null) => void;
|
|
3462
|
+
onSubmitForm?: (params: {
|
|
3463
|
+
key: string;
|
|
3464
|
+
data: Record<string, FormFieldValue>;
|
|
3465
|
+
}) => Promise<void>;
|
|
3466
|
+
onCancelForm?: (params: {
|
|
3467
|
+
key: string;
|
|
3468
|
+
}) => Promise<void>;
|
|
3469
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
3470
|
+
onStreamAnimationStart?: () => void;
|
|
3471
|
+
onStreamAnimationProgress?: () => void;
|
|
3472
|
+
onStreamAnimationComplete?: () => void;
|
|
3473
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
3474
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
3475
|
+
} & {
|
|
3476
|
+
data?: string;
|
|
3477
|
+
createdAt?: number;
|
|
3478
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
3479
|
+
groupType?: MessageGroupType;
|
|
3480
|
+
maxBodyWidth?: number;
|
|
3481
|
+
onClickMedia?: (params: {
|
|
3482
|
+
url: string;
|
|
3483
|
+
type: string;
|
|
3484
|
+
}) => void;
|
|
3485
|
+
onClickMediaFiles?: (params: {
|
|
3486
|
+
files: Array<{
|
|
3487
|
+
url: string;
|
|
3488
|
+
type: string;
|
|
3489
|
+
name?: string;
|
|
3490
|
+
}>;
|
|
3491
|
+
index: number;
|
|
3492
|
+
}) => void;
|
|
3493
|
+
onClickFile?: (params: {
|
|
3494
|
+
url: string;
|
|
3495
|
+
type: string;
|
|
3496
|
+
}) => void;
|
|
3497
|
+
onClickLink?: (params: {
|
|
3498
|
+
url: string;
|
|
3499
|
+
}) => void;
|
|
3500
|
+
children?: ReactNode;
|
|
3501
|
+
}) | ({
|
|
3502
|
+
messageType: "file";
|
|
3503
|
+
message: string;
|
|
3504
|
+
file: {
|
|
3505
|
+
type: string;
|
|
3506
|
+
url: string;
|
|
3507
|
+
name: string;
|
|
3508
|
+
};
|
|
3509
|
+
} & {
|
|
3510
|
+
sender: {
|
|
3511
|
+
nickname: string;
|
|
3512
|
+
profileUrl?: string;
|
|
3513
|
+
};
|
|
3514
|
+
thinkingMessage?: string;
|
|
3515
|
+
suggestedRepliesVisible?: boolean;
|
|
3516
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
3517
|
+
isBotMessage?: boolean;
|
|
3518
|
+
isTyping?: boolean;
|
|
3519
|
+
isStreaming?: boolean;
|
|
3520
|
+
isHandedOff?: boolean;
|
|
3521
|
+
isConversationClosed?: boolean;
|
|
3522
|
+
isFeedbackEnabled?: boolean;
|
|
3523
|
+
isFeedbackCommentEnabled?: boolean;
|
|
3524
|
+
isSenderAvatarVisible?: boolean;
|
|
3525
|
+
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
3526
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
3527
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
3528
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
3529
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
3530
|
+
onClickSuggestedReply?: (params: {
|
|
3531
|
+
reply: string;
|
|
3532
|
+
}) => void;
|
|
3533
|
+
onClickCTA?: (params: {
|
|
3534
|
+
url: string;
|
|
3535
|
+
}) => void;
|
|
3536
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
3537
|
+
onFeedbackUpdate?: (params: {
|
|
3538
|
+
rating: "good" | "bad";
|
|
3539
|
+
comment?: string;
|
|
3540
|
+
} | null) => void;
|
|
3541
|
+
onSubmitForm?: (params: {
|
|
3542
|
+
key: string;
|
|
3543
|
+
data: Record<string, FormFieldValue>;
|
|
3544
|
+
}) => Promise<void>;
|
|
3545
|
+
onCancelForm?: (params: {
|
|
3546
|
+
key: string;
|
|
3547
|
+
}) => Promise<void>;
|
|
3548
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
3549
|
+
onStreamAnimationStart?: () => void;
|
|
3550
|
+
onStreamAnimationProgress?: () => void;
|
|
3551
|
+
onStreamAnimationComplete?: () => void;
|
|
3552
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
3553
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
3554
|
+
} & {
|
|
3555
|
+
data?: string;
|
|
3556
|
+
createdAt?: number;
|
|
3557
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
3558
|
+
groupType?: MessageGroupType;
|
|
3559
|
+
maxBodyWidth?: number;
|
|
3560
|
+
onClickMedia?: (params: {
|
|
3561
|
+
url: string;
|
|
3562
|
+
type: string;
|
|
3563
|
+
}) => void;
|
|
3564
|
+
onClickMediaFiles?: (params: {
|
|
3565
|
+
files: Array<{
|
|
3566
|
+
url: string;
|
|
3567
|
+
type: string;
|
|
3568
|
+
name?: string;
|
|
3569
|
+
}>;
|
|
3570
|
+
index: number;
|
|
3571
|
+
}) => void;
|
|
3572
|
+
onClickFile?: (params: {
|
|
3573
|
+
url: string;
|
|
3574
|
+
type: string;
|
|
3575
|
+
}) => void;
|
|
3576
|
+
onClickLink?: (params: {
|
|
3577
|
+
url: string;
|
|
3578
|
+
}) => void;
|
|
3579
|
+
children?: ReactNode;
|
|
3580
|
+
}) | ({
|
|
3581
|
+
messageType: "multipleFiles";
|
|
3582
|
+
message: string;
|
|
3583
|
+
files: {
|
|
3584
|
+
type: string;
|
|
3585
|
+
url: string;
|
|
3586
|
+
name: string;
|
|
3587
|
+
}[];
|
|
3588
|
+
} & {
|
|
3589
|
+
sender: {
|
|
3590
|
+
nickname: string;
|
|
3591
|
+
profileUrl?: string;
|
|
3592
|
+
};
|
|
3593
|
+
thinkingMessage?: string;
|
|
3594
|
+
suggestedRepliesVisible?: boolean;
|
|
3595
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
3596
|
+
isBotMessage?: boolean;
|
|
3597
|
+
isTyping?: boolean;
|
|
3598
|
+
isStreaming?: boolean;
|
|
3599
|
+
isHandedOff?: boolean;
|
|
3600
|
+
isConversationClosed?: boolean;
|
|
3601
|
+
isFeedbackEnabled?: boolean;
|
|
3602
|
+
isFeedbackCommentEnabled?: boolean;
|
|
3603
|
+
isSenderAvatarVisible?: boolean;
|
|
3604
|
+
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
3605
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
3606
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
3607
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
3608
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
3609
|
+
onClickSuggestedReply?: (params: {
|
|
3610
|
+
reply: string;
|
|
3611
|
+
}) => void;
|
|
3612
|
+
onClickCTA?: (params: {
|
|
3613
|
+
url: string;
|
|
3614
|
+
}) => void;
|
|
3615
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
3616
|
+
onFeedbackUpdate?: (params: {
|
|
3617
|
+
rating: "good" | "bad";
|
|
3618
|
+
comment?: string;
|
|
3619
|
+
} | null) => void;
|
|
3620
|
+
onSubmitForm?: (params: {
|
|
3621
|
+
key: string;
|
|
3622
|
+
data: Record<string, FormFieldValue>;
|
|
3623
|
+
}) => Promise<void>;
|
|
3624
|
+
onCancelForm?: (params: {
|
|
3625
|
+
key: string;
|
|
3626
|
+
}) => Promise<void>;
|
|
3627
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
3628
|
+
onStreamAnimationStart?: () => void;
|
|
3629
|
+
onStreamAnimationProgress?: () => void;
|
|
3630
|
+
onStreamAnimationComplete?: () => void;
|
|
3631
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
3632
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
3633
|
+
} & {
|
|
3634
|
+
data?: string;
|
|
3635
|
+
createdAt?: number;
|
|
3636
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
3637
|
+
groupType?: MessageGroupType;
|
|
3638
|
+
maxBodyWidth?: number;
|
|
3639
|
+
onClickMedia?: (params: {
|
|
3640
|
+
url: string;
|
|
3641
|
+
type: string;
|
|
3642
|
+
}) => void;
|
|
3643
|
+
onClickMediaFiles?: (params: {
|
|
3644
|
+
files: Array<{
|
|
3645
|
+
url: string;
|
|
3646
|
+
type: string;
|
|
3647
|
+
name?: string;
|
|
3648
|
+
}>;
|
|
3649
|
+
index: number;
|
|
3650
|
+
}) => void;
|
|
3651
|
+
onClickFile?: (params: {
|
|
3652
|
+
url: string;
|
|
3653
|
+
type: string;
|
|
3654
|
+
}) => void;
|
|
3655
|
+
onClickLink?: (params: {
|
|
3656
|
+
url: string;
|
|
3657
|
+
}) => void;
|
|
3658
|
+
children?: ReactNode;
|
|
3659
|
+
})) => ReactNode;
|
|
3660
|
+
Challenge: (_: ({
|
|
3661
|
+
messageType: "user";
|
|
3662
|
+
message: string;
|
|
3663
|
+
} & {
|
|
3664
|
+
sender: {
|
|
3665
|
+
nickname: string;
|
|
3666
|
+
profileUrl?: string;
|
|
3667
|
+
};
|
|
3668
|
+
thinkingMessage?: string;
|
|
3669
|
+
suggestedRepliesVisible?: boolean;
|
|
3670
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
3671
|
+
isBotMessage?: boolean;
|
|
3672
|
+
isTyping?: boolean;
|
|
3673
|
+
isStreaming?: boolean;
|
|
3674
|
+
isHandedOff?: boolean;
|
|
3675
|
+
isConversationClosed?: boolean;
|
|
3676
|
+
isFeedbackEnabled?: boolean;
|
|
3677
|
+
isFeedbackCommentEnabled?: boolean;
|
|
3678
|
+
isSenderAvatarVisible?: boolean;
|
|
3679
|
+
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
3680
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
3312
3681
|
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
3313
3682
|
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
3314
3683
|
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
@@ -3330,6 +3699,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3330
3699
|
onCancelForm?: (params: {
|
|
3331
3700
|
key: string;
|
|
3332
3701
|
}) => Promise<void>;
|
|
3702
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
3333
3703
|
onStreamAnimationStart?: () => void;
|
|
3334
3704
|
onStreamAnimationProgress?: () => void;
|
|
3335
3705
|
onStreamAnimationComplete?: () => void;
|
|
@@ -3386,6 +3756,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3386
3756
|
isFeedbackCommentEnabled?: boolean;
|
|
3387
3757
|
isSenderAvatarVisible?: boolean;
|
|
3388
3758
|
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
3759
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
3389
3760
|
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
3390
3761
|
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
3391
3762
|
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
@@ -3407,6 +3778,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3407
3778
|
onCancelForm?: (params: {
|
|
3408
3779
|
key: string;
|
|
3409
3780
|
}) => Promise<void>;
|
|
3781
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
3410
3782
|
onStreamAnimationStart?: () => void;
|
|
3411
3783
|
onStreamAnimationProgress?: () => void;
|
|
3412
3784
|
onStreamAnimationComplete?: () => void;
|
|
@@ -3463,6 +3835,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3463
3835
|
isFeedbackCommentEnabled?: boolean;
|
|
3464
3836
|
isSenderAvatarVisible?: boolean;
|
|
3465
3837
|
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
3838
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
3466
3839
|
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
3467
3840
|
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
3468
3841
|
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
@@ -3484,6 +3857,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3484
3857
|
onCancelForm?: (params: {
|
|
3485
3858
|
key: string;
|
|
3486
3859
|
}) => Promise<void>;
|
|
3860
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
3487
3861
|
onStreamAnimationStart?: () => void;
|
|
3488
3862
|
onStreamAnimationProgress?: () => void;
|
|
3489
3863
|
onStreamAnimationComplete?: () => void;
|
|
@@ -3589,6 +3963,242 @@ export declare const IncomingMessageLayout: {
|
|
|
3589
3963
|
isFeedbackCommentEnabled?: boolean;
|
|
3590
3964
|
isSenderAvatarVisible?: boolean;
|
|
3591
3965
|
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
3966
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
3967
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
3968
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
3969
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
3970
|
+
onClickSuggestedReply?: (params: {
|
|
3971
|
+
reply: string;
|
|
3972
|
+
}) => void;
|
|
3973
|
+
onClickCTA?: (params: {
|
|
3974
|
+
url: string;
|
|
3975
|
+
}) => void;
|
|
3976
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
3977
|
+
onFeedbackUpdate?: (params: {
|
|
3978
|
+
rating: "good" | "bad";
|
|
3979
|
+
comment?: string;
|
|
3980
|
+
} | null) => void;
|
|
3981
|
+
onSubmitForm?: (params: {
|
|
3982
|
+
key: string;
|
|
3983
|
+
data: Record<string, FormFieldValue>;
|
|
3984
|
+
}) => Promise<void>;
|
|
3985
|
+
onCancelForm?: (params: {
|
|
3986
|
+
key: string;
|
|
3987
|
+
}) => Promise<void>;
|
|
3988
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
3989
|
+
onStreamAnimationStart?: () => void;
|
|
3990
|
+
onStreamAnimationProgress?: () => void;
|
|
3991
|
+
onStreamAnimationComplete?: () => void;
|
|
3992
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
3993
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
3994
|
+
} & {
|
|
3995
|
+
data?: string;
|
|
3996
|
+
createdAt?: number;
|
|
3997
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
3998
|
+
groupType?: MessageGroupType;
|
|
3999
|
+
maxBodyWidth?: number;
|
|
4000
|
+
onClickMedia?: (params: {
|
|
4001
|
+
url: string;
|
|
4002
|
+
type: string;
|
|
4003
|
+
}) => void;
|
|
4004
|
+
onClickMediaFiles?: (params: {
|
|
4005
|
+
files: Array<{
|
|
4006
|
+
url: string;
|
|
4007
|
+
type: string;
|
|
4008
|
+
name?: string;
|
|
4009
|
+
}>;
|
|
4010
|
+
index: number;
|
|
4011
|
+
}) => void;
|
|
4012
|
+
onClickFile?: (params: {
|
|
4013
|
+
url: string;
|
|
4014
|
+
type: string;
|
|
4015
|
+
}) => void;
|
|
4016
|
+
onClickLink?: (params: {
|
|
4017
|
+
url: string;
|
|
4018
|
+
}) => void;
|
|
4019
|
+
children?: ReactNode;
|
|
4020
|
+
}) | ({
|
|
4021
|
+
messageType: "file";
|
|
4022
|
+
message: string;
|
|
4023
|
+
file: {
|
|
4024
|
+
type: string;
|
|
4025
|
+
url: string;
|
|
4026
|
+
name: string;
|
|
4027
|
+
};
|
|
4028
|
+
} & {
|
|
4029
|
+
sender: {
|
|
4030
|
+
nickname: string;
|
|
4031
|
+
profileUrl?: string;
|
|
4032
|
+
};
|
|
4033
|
+
thinkingMessage?: string;
|
|
4034
|
+
suggestedRepliesVisible?: boolean;
|
|
4035
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
4036
|
+
isBotMessage?: boolean;
|
|
4037
|
+
isTyping?: boolean;
|
|
4038
|
+
isStreaming?: boolean;
|
|
4039
|
+
isHandedOff?: boolean;
|
|
4040
|
+
isConversationClosed?: boolean;
|
|
4041
|
+
isFeedbackEnabled?: boolean;
|
|
4042
|
+
isFeedbackCommentEnabled?: boolean;
|
|
4043
|
+
isSenderAvatarVisible?: boolean;
|
|
4044
|
+
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
4045
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
4046
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
4047
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
4048
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
4049
|
+
onClickSuggestedReply?: (params: {
|
|
4050
|
+
reply: string;
|
|
4051
|
+
}) => void;
|
|
4052
|
+
onClickCTA?: (params: {
|
|
4053
|
+
url: string;
|
|
4054
|
+
}) => void;
|
|
4055
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
4056
|
+
onFeedbackUpdate?: (params: {
|
|
4057
|
+
rating: "good" | "bad";
|
|
4058
|
+
comment?: string;
|
|
4059
|
+
} | null) => void;
|
|
4060
|
+
onSubmitForm?: (params: {
|
|
4061
|
+
key: string;
|
|
4062
|
+
data: Record<string, FormFieldValue>;
|
|
4063
|
+
}) => Promise<void>;
|
|
4064
|
+
onCancelForm?: (params: {
|
|
4065
|
+
key: string;
|
|
4066
|
+
}) => Promise<void>;
|
|
4067
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
4068
|
+
onStreamAnimationStart?: () => void;
|
|
4069
|
+
onStreamAnimationProgress?: () => void;
|
|
4070
|
+
onStreamAnimationComplete?: () => void;
|
|
4071
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
4072
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
4073
|
+
} & {
|
|
4074
|
+
data?: string;
|
|
4075
|
+
createdAt?: number;
|
|
4076
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
4077
|
+
groupType?: MessageGroupType;
|
|
4078
|
+
maxBodyWidth?: number;
|
|
4079
|
+
onClickMedia?: (params: {
|
|
4080
|
+
url: string;
|
|
4081
|
+
type: string;
|
|
4082
|
+
}) => void;
|
|
4083
|
+
onClickMediaFiles?: (params: {
|
|
4084
|
+
files: Array<{
|
|
4085
|
+
url: string;
|
|
4086
|
+
type: string;
|
|
4087
|
+
name?: string;
|
|
4088
|
+
}>;
|
|
4089
|
+
index: number;
|
|
4090
|
+
}) => void;
|
|
4091
|
+
onClickFile?: (params: {
|
|
4092
|
+
url: string;
|
|
4093
|
+
type: string;
|
|
4094
|
+
}) => void;
|
|
4095
|
+
onClickLink?: (params: {
|
|
4096
|
+
url: string;
|
|
4097
|
+
}) => void;
|
|
4098
|
+
children?: ReactNode;
|
|
4099
|
+
}) | ({
|
|
4100
|
+
messageType: "multipleFiles";
|
|
4101
|
+
message: string;
|
|
4102
|
+
files: {
|
|
4103
|
+
type: string;
|
|
4104
|
+
url: string;
|
|
4105
|
+
name: string;
|
|
4106
|
+
}[];
|
|
4107
|
+
} & {
|
|
4108
|
+
sender: {
|
|
4109
|
+
nickname: string;
|
|
4110
|
+
profileUrl?: string;
|
|
4111
|
+
};
|
|
4112
|
+
thinkingMessage?: string;
|
|
4113
|
+
suggestedRepliesVisible?: boolean;
|
|
4114
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
4115
|
+
isBotMessage?: boolean;
|
|
4116
|
+
isTyping?: boolean;
|
|
4117
|
+
isStreaming?: boolean;
|
|
4118
|
+
isHandedOff?: boolean;
|
|
4119
|
+
isConversationClosed?: boolean;
|
|
4120
|
+
isFeedbackEnabled?: boolean;
|
|
4121
|
+
isFeedbackCommentEnabled?: boolean;
|
|
4122
|
+
isSenderAvatarVisible?: boolean;
|
|
4123
|
+
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
4124
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
4125
|
+
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
4126
|
+
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
4127
|
+
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
4128
|
+
onClickSuggestedReply?: (params: {
|
|
4129
|
+
reply: string;
|
|
4130
|
+
}) => void;
|
|
4131
|
+
onClickCTA?: (params: {
|
|
4132
|
+
url: string;
|
|
4133
|
+
}) => void;
|
|
4134
|
+
onClickCitation?: (citation: CitationInfo) => void;
|
|
4135
|
+
onFeedbackUpdate?: (params: {
|
|
4136
|
+
rating: "good" | "bad";
|
|
4137
|
+
comment?: string;
|
|
4138
|
+
} | null) => void;
|
|
4139
|
+
onSubmitForm?: (params: {
|
|
4140
|
+
key: string;
|
|
4141
|
+
data: Record<string, FormFieldValue>;
|
|
4142
|
+
}) => Promise<void>;
|
|
4143
|
+
onCancelForm?: (params: {
|
|
4144
|
+
key: string;
|
|
4145
|
+
}) => Promise<void>;
|
|
4146
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
4147
|
+
onStreamAnimationStart?: () => void;
|
|
4148
|
+
onStreamAnimationProgress?: () => void;
|
|
4149
|
+
onStreamAnimationComplete?: () => void;
|
|
4150
|
+
messageTemplateErrorFallback?: ReactNode;
|
|
4151
|
+
messageTemplateLoadingFallback?: ReactNode;
|
|
4152
|
+
} & {
|
|
4153
|
+
data?: string;
|
|
4154
|
+
createdAt?: number;
|
|
4155
|
+
extendedMessagePayload?: Partial<ExtendedMessagePayload>;
|
|
4156
|
+
groupType?: MessageGroupType;
|
|
4157
|
+
maxBodyWidth?: number;
|
|
4158
|
+
onClickMedia?: (params: {
|
|
4159
|
+
url: string;
|
|
4160
|
+
type: string;
|
|
4161
|
+
}) => void;
|
|
4162
|
+
onClickMediaFiles?: (params: {
|
|
4163
|
+
files: Array<{
|
|
4164
|
+
url: string;
|
|
4165
|
+
type: string;
|
|
4166
|
+
name?: string;
|
|
4167
|
+
}>;
|
|
4168
|
+
index: number;
|
|
4169
|
+
}) => void;
|
|
4170
|
+
onClickFile?: (params: {
|
|
4171
|
+
url: string;
|
|
4172
|
+
type: string;
|
|
4173
|
+
}) => void;
|
|
4174
|
+
onClickLink?: (params: {
|
|
4175
|
+
url: string;
|
|
4176
|
+
}) => void;
|
|
4177
|
+
children?: ReactNode;
|
|
4178
|
+
})) => ReactNode;
|
|
4179
|
+
}) => null;
|
|
4180
|
+
Challenge: (props: {
|
|
4181
|
+
component: (_: ({
|
|
4182
|
+
messageType: "user";
|
|
4183
|
+
message: string;
|
|
4184
|
+
} & {
|
|
4185
|
+
sender: {
|
|
4186
|
+
nickname: string;
|
|
4187
|
+
profileUrl?: string;
|
|
4188
|
+
};
|
|
4189
|
+
thinkingMessage?: string;
|
|
4190
|
+
suggestedRepliesVisible?: boolean;
|
|
4191
|
+
suggestedRepliesDirection?: "vertical" | "horizontal";
|
|
4192
|
+
isBotMessage?: boolean;
|
|
4193
|
+
isTyping?: boolean;
|
|
4194
|
+
isStreaming?: boolean;
|
|
4195
|
+
isHandedOff?: boolean;
|
|
4196
|
+
isConversationClosed?: boolean;
|
|
4197
|
+
isFeedbackEnabled?: boolean;
|
|
4198
|
+
isFeedbackCommentEnabled?: boolean;
|
|
4199
|
+
isSenderAvatarVisible?: boolean;
|
|
4200
|
+
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
4201
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
3592
4202
|
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
3593
4203
|
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
3594
4204
|
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
@@ -3610,6 +4220,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3610
4220
|
onCancelForm?: (params: {
|
|
3611
4221
|
key: string;
|
|
3612
4222
|
}) => Promise<void>;
|
|
4223
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
3613
4224
|
onStreamAnimationStart?: () => void;
|
|
3614
4225
|
onStreamAnimationProgress?: () => void;
|
|
3615
4226
|
onStreamAnimationComplete?: () => void;
|
|
@@ -3666,6 +4277,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3666
4277
|
isFeedbackCommentEnabled?: boolean;
|
|
3667
4278
|
isSenderAvatarVisible?: boolean;
|
|
3668
4279
|
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
4280
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
3669
4281
|
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
3670
4282
|
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
3671
4283
|
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
@@ -3687,6 +4299,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3687
4299
|
onCancelForm?: (params: {
|
|
3688
4300
|
key: string;
|
|
3689
4301
|
}) => Promise<void>;
|
|
4302
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
3690
4303
|
onStreamAnimationStart?: () => void;
|
|
3691
4304
|
onStreamAnimationProgress?: () => void;
|
|
3692
4305
|
onStreamAnimationComplete?: () => void;
|
|
@@ -3743,6 +4356,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3743
4356
|
isFeedbackCommentEnabled?: boolean;
|
|
3744
4357
|
isSenderAvatarVisible?: boolean;
|
|
3745
4358
|
markdownImageRenderMode?: MarkdownImageRenderMode;
|
|
4359
|
+
markdownLinkRenderMode?: MarkdownLinkRenderMode;
|
|
3746
4360
|
onGetCachedMessageTemplate?: (templateKey: string) => string | null;
|
|
3747
4361
|
onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
|
|
3748
4362
|
onHandleTemplateInternalAction?: (action: Action) => void;
|
|
@@ -3764,6 +4378,7 @@ export declare const IncomingMessageLayout: {
|
|
|
3764
4378
|
onCancelForm?: (params: {
|
|
3765
4379
|
key: string;
|
|
3766
4380
|
}) => Promise<void>;
|
|
4381
|
+
onSendChallengeAction?: <T = object>(params: ChallengeActionParams) => Promise<T>;
|
|
3767
4382
|
onStreamAnimationStart?: () => void;
|
|
3768
4383
|
onStreamAnimationProgress?: () => void;
|
|
3769
4384
|
onStreamAnimationComplete?: () => void;
|
|
@@ -3873,7 +4488,7 @@ declare interface LanguageSet extends Omit<AIAgentLanguageSet, 'strings'> {
|
|
|
3873
4488
|
stringSet: StringSet;
|
|
3874
4489
|
}
|
|
3875
4490
|
|
|
3876
|
-
export declare function LauncherBase({ className, children, isOpened, onClick, 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedBy, type, imageUrl, dir, animated, backgroundColor, size, }: LauncherProps): JSX.Element;
|
|
4491
|
+
export declare function LauncherBase({ className, children, isOpened, onClick, 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedBy, type, imageUrl, dir, animated, backgroundColor, size, hasUnread, }: LauncherProps): JSX.Element;
|
|
3877
4492
|
|
|
3878
4493
|
declare type LauncherImageType = 'default_icon' | 'custom_image';
|
|
3879
4494
|
|
|
@@ -3895,6 +4510,7 @@ declare type LauncherProps = {
|
|
|
3895
4510
|
animated?: boolean;
|
|
3896
4511
|
dir?: 'ltr' | 'rtl';
|
|
3897
4512
|
size?: number;
|
|
4513
|
+
hasUnread?: boolean;
|
|
3898
4514
|
};
|
|
3899
4515
|
|
|
3900
4516
|
declare interface LayoutContextValue<Props, Components extends Record<string, ComponentType<any>>> {
|
|
@@ -3946,6 +4562,8 @@ declare interface ManualSessionInfoParams {
|
|
|
3946
4562
|
|
|
3947
4563
|
declare type MarkdownImageRenderMode = 'default' | 'complete-only';
|
|
3948
4564
|
|
|
4565
|
+
declare type MarkdownLinkRenderMode = 'default' | 'complete-only';
|
|
4566
|
+
|
|
3949
4567
|
declare interface MemoryInfo {
|
|
3950
4568
|
enabled: boolean;
|
|
3951
4569
|
showIndicator: boolean;
|
|
@@ -3968,7 +4586,7 @@ export declare const MessageListUILayout: {
|
|
|
3968
4586
|
defaults: {
|
|
3969
4587
|
template: ComponentType<unknown>;
|
|
3970
4588
|
components: {
|
|
3971
|
-
DateSeparator: ({ className, date, style }: DateSeparatorProps) => ReactNode;
|
|
4589
|
+
DateSeparator: ({ className, date, role, style }: DateSeparatorProps) => ReactNode;
|
|
3972
4590
|
ScrollToBottomButton: ({ className, style, onClick }: ScrollToBottomButtonProps) => ReactNode;
|
|
3973
4591
|
};
|
|
3974
4592
|
};
|
|
@@ -3977,23 +4595,23 @@ export declare const MessageListUILayout: {
|
|
|
3977
4595
|
children?: ReactNode;
|
|
3978
4596
|
}) => JSX.Element;
|
|
3979
4597
|
Context: Context<LayoutContextValue<unknown, {
|
|
3980
|
-
DateSeparator: ({ className, date, style }: DateSeparatorProps) => ReactNode;
|
|
4598
|
+
DateSeparator: ({ className, date, role, style }: DateSeparatorProps) => ReactNode;
|
|
3981
4599
|
ScrollToBottomButton: ({ className, style, onClick }: ScrollToBottomButtonProps) => ReactNode;
|
|
3982
4600
|
}>>;
|
|
3983
4601
|
useContext: () => LayoutContextValue<unknown, {
|
|
3984
|
-
DateSeparator: ({ className, date, style }: DateSeparatorProps) => ReactNode;
|
|
4602
|
+
DateSeparator: ({ className, date, role, style }: DateSeparatorProps) => ReactNode;
|
|
3985
4603
|
ScrollToBottomButton: ({ className, style, onClick }: ScrollToBottomButtonProps) => ReactNode;
|
|
3986
4604
|
}>;
|
|
3987
4605
|
} & {
|
|
3988
4606
|
DateSeparator: (props: {
|
|
3989
|
-
component: ({ className, date, style }: DateSeparatorProps) => ReactNode;
|
|
4607
|
+
component: ({ className, date, role, style }: DateSeparatorProps) => ReactNode;
|
|
3990
4608
|
}) => null;
|
|
3991
4609
|
ScrollToBottomButton: (props: {
|
|
3992
4610
|
component: ({ className, style, onClick }: ScrollToBottomButtonProps) => ReactNode;
|
|
3993
4611
|
}) => null;
|
|
3994
4612
|
};
|
|
3995
4613
|
|
|
3996
|
-
export declare const MessageLogs: ({ actionbook, functionCalls, groundedness, agentMessageTemplates, onClickActionbook, onClickFunctionCall, onClickFunctionCallDetail, onClickGroundedness, onClickAgentMessageTemplate, bottomContent, renderCustomGroundednessIcon, style, }: Props_2) => JSX.Element;
|
|
4614
|
+
export declare const MessageLogs: ({ actionbook, functionCalls, groundedness, agentMessageTemplates, onClickActionbook, onClickFunctionCall, onClickFunctionCallDetail, onClickGroundedness, onClickAgentMessageTemplate, topContent, bottomContent, renderCustomGroundednessIcon, style, }: Props_2) => JSX.Element;
|
|
3997
4615
|
|
|
3998
4616
|
declare interface MessageTemplateCache {
|
|
3999
4617
|
set(key: string, value: string): void;
|
|
@@ -4505,6 +5123,7 @@ declare type Props_2 = {
|
|
|
4505
5123
|
barColor?: string;
|
|
4506
5124
|
highlightColor?: string;
|
|
4507
5125
|
};
|
|
5126
|
+
topContent?: ReactNode;
|
|
4508
5127
|
bottomContent?: ReactNode;
|
|
4509
5128
|
renderCustomGroundednessIcon?: (props: {
|
|
4510
5129
|
default: ReactNode;
|
|
@@ -4518,6 +5137,7 @@ declare type Props_3 = PropsWithChildren<{
|
|
|
4518
5137
|
onNavigateToConversationList?: () => void;
|
|
4519
5138
|
shouldMarkAsRead?: boolean;
|
|
4520
5139
|
announcementsEnabled?: boolean;
|
|
5140
|
+
initialFocusTarget?: ConversationInitialFocusTarget;
|
|
4521
5141
|
/** Custom styles for the conversation container. */
|
|
4522
5142
|
style?: CSSProperties;
|
|
4523
5143
|
/** @deprecated Please use `channelUrl` instead. **/
|
|
@@ -4529,7 +5149,7 @@ declare type Props_3 = PropsWithChildren<{
|
|
|
4529
5149
|
declare type Props_4 = PropsWithChildren<{
|
|
4530
5150
|
conversationListLimit?: number;
|
|
4531
5151
|
conversationListFilter?: Partial<AIAgentGroupChannelFilter>;
|
|
4532
|
-
onOpenConversationView?: (channelUrl: string, status: 'open' | 'closed') => void;
|
|
5152
|
+
onOpenConversationView?: (channelUrl: string, status: 'open' | 'closed', options?: ConversationListOpenOptions) => void;
|
|
4533
5153
|
announcementsEnabled?: boolean;
|
|
4534
5154
|
/** Custom styles for the conversation list container. */
|
|
4535
5155
|
style?: CSSProperties;
|
|
@@ -4746,6 +5366,7 @@ declare type StringSet = {
|
|
|
4746
5366
|
A11Y_CONVERSATION_CLOSED: string;
|
|
4747
5367
|
A11Y_FILE_IMAGE: (name: string) => string;
|
|
4748
5368
|
A11Y_FILE_VIDEO: (name: string) => string;
|
|
5369
|
+
A11Y_FILE_PDF: (name: string) => string;
|
|
4749
5370
|
A11Y_FILE_DOCUMENT: (name: string) => string;
|
|
4750
5371
|
A11Y_RECEIVED_FILE_IMAGE: string;
|
|
4751
5372
|
A11Y_RECEIVED_FILE_VIDEO: string;
|
|
@@ -4887,11 +5508,6 @@ declare type TextField = {
|
|
|
4887
5508
|
};
|
|
4888
5509
|
};
|
|
4889
5510
|
|
|
4890
|
-
declare interface ThrottledFunction<T extends (...args: any[]) => any> {
|
|
4891
|
-
(...args: Parameters<T>): void;
|
|
4892
|
-
cancel: () => void;
|
|
4893
|
-
}
|
|
4894
|
-
|
|
4895
5511
|
declare interface TimerData {
|
|
4896
5512
|
startTime: number | null;
|
|
4897
5513
|
endTime: number | null;
|