@zero-library/chat-agent 2.3.5 → 2.3.6
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.cjs.js +76 -122
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +0 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.esm.js +76 -122
- package/dist/index.esm.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -6,14 +6,14 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var valtio = require('valtio');
|
|
8
8
|
var icons = require('@ant-design/icons');
|
|
9
|
-
var
|
|
9
|
+
var classNames11 = require('classnames');
|
|
10
10
|
var x = require('@ant-design/x');
|
|
11
11
|
var dayjs = require('dayjs');
|
|
12
12
|
var InfiniteScroll = require('react-infinite-scroll-component');
|
|
13
13
|
|
|
14
14
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var classNames11__default = /*#__PURE__*/_interopDefault(classNames11);
|
|
17
17
|
var dayjs__default = /*#__PURE__*/_interopDefault(dayjs);
|
|
18
18
|
var InfiniteScroll__default = /*#__PURE__*/_interopDefault(InfiniteScroll);
|
|
19
19
|
|
|
@@ -311,7 +311,7 @@ var init_Charts = __esm({
|
|
|
311
311
|
);
|
|
312
312
|
Charts_default = ({ data, loading }) => {
|
|
313
313
|
const { type, config } = data;
|
|
314
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
314
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames11__default.default(styles_module_default.chart, "scroll-fade-in"), children: loading ? (
|
|
315
315
|
// Antd 骨架屏
|
|
316
316
|
/* @__PURE__ */ jsxRuntime.jsx(antd.Skeleton.Node, { active: true, className: styles_module_default.chartSkeleton, children: /* @__PURE__ */ jsxRuntime.jsx(icons.DotChartOutlined, { className: styles_module_default.chartSkeletonIcon }) })
|
|
317
317
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1316,7 +1316,7 @@ var MessageRender_default = ({ message: message2, placement, onFilePreview, cust
|
|
|
1316
1316
|
x.Bubble,
|
|
1317
1317
|
{
|
|
1318
1318
|
placement,
|
|
1319
|
-
className:
|
|
1319
|
+
className: classNames11__default.default({ [styles_module_default2.loadingMessage]: message2.type }),
|
|
1320
1320
|
content: /* @__PURE__ */ jsxRuntime.jsx(common.RenderMarkdown, { content: replaceMarkdownTags(msgContent), customComponents: mergedCustomComponents, message: message2 })
|
|
1321
1321
|
}
|
|
1322
1322
|
),
|
|
@@ -1399,10 +1399,6 @@ var styles_module_default3 = {
|
|
|
1399
1399
|
chatWelcomeWrap: "styles_module_chatWelcomeWrap",
|
|
1400
1400
|
chatWelcome: "styles_module_chatWelcome",
|
|
1401
1401
|
chatWelcomePrompts: "styles_module_chatWelcomePrompts",
|
|
1402
|
-
nsSenderListTitle: "styles_module_nsSenderListTitle",
|
|
1403
|
-
nsSenderList: "styles_module_nsSenderList",
|
|
1404
|
-
nsSenderListItem: "styles_module_nsSenderListItem",
|
|
1405
|
-
nsSenderListFooter: "styles_module_nsSenderListFooter",
|
|
1406
1402
|
nsChatUserName: "styles_module_nsChatUserName",
|
|
1407
1403
|
nsSenderReferenceHeaderTitle: "styles_module_nsSenderReferenceHeaderTitle",
|
|
1408
1404
|
nsSenderReferenceHeaderContent: "styles_module_nsSenderReferenceHeaderContent",
|
|
@@ -1423,7 +1419,7 @@ var WelcomeItem_default = ({ icon = true, title = true, description = true, prom
|
|
|
1423
1419
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1424
1420
|
x.Welcome,
|
|
1425
1421
|
{
|
|
1426
|
-
className:
|
|
1422
|
+
className: classNames11__default.default(styles_module_default3.chatWelcome, "p-t-32"),
|
|
1427
1423
|
variant: "borderless",
|
|
1428
1424
|
icon: /* @__PURE__ */ jsxRuntime.jsx(common.RenderWrapper, { control: icon, DefaultComponent: /* @__PURE__ */ jsxRuntime.jsx(antd.Avatar, { shape: "square", size: 58, src: receiverState.active.logo }) }),
|
|
1429
1425
|
title: /* @__PURE__ */ jsxRuntime.jsx(common.RenderWrapper, { control: title, DefaultComponent: `\u4F60\u597D\uFF0C\u6211\u662F${receiverState.active.name || ""}` }),
|
|
@@ -1452,7 +1448,7 @@ var WelcomeItem_default = ({ icon = true, title = true, description = true, prom
|
|
|
1452
1448
|
label: "\u{1F914} \u63A8\u8350\u95EE\u9898:",
|
|
1453
1449
|
children: receiverState?.recommendQuestions.map((question) => ({
|
|
1454
1450
|
key: question,
|
|
1455
|
-
description: /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
1451
|
+
description: /* @__PURE__ */ jsxRuntime.jsx("span", { className: classNames11__default.default(styles_module_default3.chatWelcomePrompts, "text-ellipsis"), children: question })
|
|
1456
1452
|
}))
|
|
1457
1453
|
}
|
|
1458
1454
|
]
|
|
@@ -1690,7 +1686,7 @@ var BubbleListItems_default = ({
|
|
|
1690
1686
|
autoScroll: false,
|
|
1691
1687
|
ref: listRef,
|
|
1692
1688
|
items: bubbleListItems,
|
|
1693
|
-
className:
|
|
1689
|
+
className: classNames11__default.default(styles_module_default3.nsBubbleList, "height-full", "scroll-fade-in", "zero-chat-bubbles"),
|
|
1694
1690
|
onScroll: handleScroll
|
|
1695
1691
|
},
|
|
1696
1692
|
conversationState.active.id
|
|
@@ -1725,7 +1721,7 @@ var CharacterList_default = () => {
|
|
|
1725
1721
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1726
1722
|
antd.Avatar,
|
|
1727
1723
|
{
|
|
1728
|
-
className:
|
|
1724
|
+
className: classNames11__default.default(styles_module_default3.nsAvatarListItemIcon, "cursor-pointer", {
|
|
1729
1725
|
[styles_module_default3.nsAvatarListItemIconActive]: activeCharacter.id === item.id
|
|
1730
1726
|
}),
|
|
1731
1727
|
size: 50,
|
|
@@ -1762,14 +1758,14 @@ var ConversationFavoritesList_default = () => {
|
|
|
1762
1758
|
chatStore.getConversationFavorite();
|
|
1763
1759
|
}, 300);
|
|
1764
1760
|
const renderFavoriteList = react.useMemo(() => {
|
|
1765
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1761
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames11__default.default("height-full", "scroll-fade-in"), children: favoriteState.list.items.length ? favoriteState.list.items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1766
1762
|
"div",
|
|
1767
1763
|
{
|
|
1768
|
-
className:
|
|
1764
|
+
className: classNames11__default.default(styles_module_default3.favoriteCard, { [styles_module_default3.favoriteCardActive]: conversationState.active.id === item.id }),
|
|
1769
1765
|
onClick: () => chatStore.switchConversation(item.id),
|
|
1770
1766
|
children: [
|
|
1771
1767
|
/* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { gap: 8, align: "center", children: [
|
|
1772
|
-
/* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { flex: 1, className:
|
|
1768
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { flex: 1, className: classNames11__default.default(styles_module_default3.favoriteCardTitle, "text-ellipsis"), children: item.title }),
|
|
1773
1769
|
/* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { gap: 8, align: "center", className: styles_module_default3.favoriteCardActions, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1774
1770
|
antd.Popconfirm,
|
|
1775
1771
|
{
|
|
@@ -1896,7 +1892,7 @@ var ChatHeader_default = ({
|
|
|
1896
1892
|
const chatStore = useChatStore();
|
|
1897
1893
|
const receiverState = valtio.useSnapshot(chatStore.receiver);
|
|
1898
1894
|
const configState = valtio.useSnapshot(chatStore.config);
|
|
1899
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { justify: "space-between", align: "center", className:
|
|
1895
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { justify: "space-between", align: "center", className: classNames11__default.default(styles_module_default3.nsChatHeader, "zero-chat-header"), children: [
|
|
1900
1896
|
/* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { gap: 4, align: "center", children: [
|
|
1901
1897
|
/* @__PURE__ */ jsxRuntime.jsx(common.RenderWrapper, { control: avatar, DefaultComponent: /* @__PURE__ */ jsxRuntime.jsx(antd.Avatar, { size: 22, src: receiverState.active.logo, alt: receiverState.active.name }) }),
|
|
1902
1898
|
/* @__PURE__ */ jsxRuntime.jsx(common.RenderWrapper, { control: title, DefaultComponent: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles_module_default3.nsChatTitle, children: receiverState.active.name }) }),
|
|
@@ -2391,7 +2387,7 @@ var QuickAskPanel_default = () => {
|
|
|
2391
2387
|
}
|
|
2392
2388
|
) : /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { icon: /* @__PURE__ */ jsxRuntime.jsx(icons.SearchOutlined, {}), onClick: () => setSearchExpanded(true) })
|
|
2393
2389
|
] }),
|
|
2394
|
-
/* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { align: "center", className:
|
|
2390
|
+
/* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { align: "center", className: classNames11__default.default("scroll-fade-in", "m-b-16", styles_module_default4.tagContainer), children: [
|
|
2395
2391
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2396
2392
|
antd.Tag,
|
|
2397
2393
|
{
|
|
@@ -2432,7 +2428,7 @@ var QuickAskPanel_default = () => {
|
|
|
2432
2428
|
},
|
|
2433
2429
|
children: [
|
|
2434
2430
|
/* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { gap: 8, justify: "space-between", align: "center", className: styles_module_default4.quickAskItemHeader, children: [
|
|
2435
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
2431
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames11__default.default("flex-1 text-ellipsis", styles_module_default4.quickAskItemTitle), children: item.title }),
|
|
2436
2432
|
/* @__PURE__ */ jsxRuntime.jsxs(antd.Space, { size: 4, className: styles_module_default4.quickAskItemHeaderActions, children: [
|
|
2437
2433
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2438
2434
|
antd.Button,
|
|
@@ -2499,7 +2495,7 @@ var QuickAskPanel_default = () => {
|
|
|
2499
2495
|
)
|
|
2500
2496
|
] })
|
|
2501
2497
|
] }),
|
|
2502
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
2498
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames11__default.default(styles_module_default4.quickAskItemBody), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-ellipsis-3", children: item.content }) })
|
|
2503
2499
|
]
|
|
2504
2500
|
},
|
|
2505
2501
|
item.id
|
|
@@ -2570,47 +2566,8 @@ var FeaturesRenderer_default = () => {
|
|
|
2570
2566
|
)
|
|
2571
2567
|
] });
|
|
2572
2568
|
};
|
|
2573
|
-
|
|
2574
|
-
// src/ui/common/SenderPromptsItems.tsx
|
|
2575
|
-
init_Context();
|
|
2576
|
-
var SenderPromptsItems_default = () => {
|
|
2577
|
-
const chatStore = useChatStore();
|
|
2578
|
-
const receiverState = valtio.useSnapshot(chatStore.receiver);
|
|
2579
|
-
const component = react.useMemo(
|
|
2580
|
-
() => receiverState.active.config?.labels?.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { gap: 4, wrap: true, children: [
|
|
2581
|
-
/* @__PURE__ */ jsxRuntime.jsx(antd.Button, { disabled: true, color: "default", variant: "text", children: "\u968F\u4FBF\u804A\u804A" }),
|
|
2582
|
-
receiverState.active.config.labels.slice(0, 6).map((question) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2583
|
-
antd.Popover,
|
|
2584
|
-
{
|
|
2585
|
-
content: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2586
|
-
antd.List,
|
|
2587
|
-
{
|
|
2588
|
-
itemLayout: "horizontal",
|
|
2589
|
-
split: false,
|
|
2590
|
-
className: styles_module_default3.nsSenderList,
|
|
2591
|
-
dataSource: question.items,
|
|
2592
|
-
renderItem: (item) => /* @__PURE__ */ jsxRuntime.jsx(antd.List.Item, { onClick: () => chatStore.sendMessage(item.question), className: styles_module_default3.nsSenderListItem, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-ellipsis", children: item.question }) }),
|
|
2593
|
-
footer: /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { justify: "end", className: styles_module_default3.nsSenderListFooter, children: "(\u60A8\u53EF\u70B9\u51FB\u4EE5\u4E0A\u95EE\u9898\u5F00\u542FAI\u4F53\u9A8C)" })
|
|
2594
|
-
}
|
|
2595
|
-
),
|
|
2596
|
-
title: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2597
|
-
"div",
|
|
2598
|
-
{
|
|
2599
|
-
className: classNames12__default.default(styles_module_default3.nsSenderListTitle, "text-ellipsis"),
|
|
2600
|
-
children: `${receiverState.active.name}\u5F00\u59CB\u5173\u6CE8${question.name}\u5185\u5BB9\uFF01`
|
|
2601
|
-
}
|
|
2602
|
-
),
|
|
2603
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { color: "default", variant: "filled", children: question.name })
|
|
2604
|
-
},
|
|
2605
|
-
question.id
|
|
2606
|
-
))
|
|
2607
|
-
] }),
|
|
2608
|
-
[receiverState.active.config?.labels]
|
|
2609
|
-
);
|
|
2610
|
-
return component;
|
|
2611
|
-
};
|
|
2612
2569
|
var ChatSender_default2 = react.forwardRef(
|
|
2613
|
-
({ placeholder, extraBtn = false, referencesBtn = false, sendBtnProps, footerBelow = false
|
|
2570
|
+
({ placeholder, extraBtn = false, referencesBtn = false, sendBtnProps, footerBelow = false }, ref) => {
|
|
2614
2571
|
const chatStore = useChatStore();
|
|
2615
2572
|
const configState = valtio.useSnapshot(chatStore.config);
|
|
2616
2573
|
const receiverState = valtio.useSnapshot(chatStore.receiver);
|
|
@@ -2630,61 +2587,58 @@ var ChatSender_default2 = react.forwardRef(
|
|
|
2630
2587
|
chatStore.setContent(con);
|
|
2631
2588
|
chatStore.sendMessage();
|
|
2632
2589
|
};
|
|
2633
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
{
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
}
|
|
2686
|
-
)
|
|
2687
|
-
] });
|
|
2590
|
+
return /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { vertical: true, gap: 8, className: "zero-chat-sender", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2591
|
+
ChatSender_default,
|
|
2592
|
+
{
|
|
2593
|
+
ref,
|
|
2594
|
+
placeholder,
|
|
2595
|
+
content: chatMessage.content,
|
|
2596
|
+
fileList: chatMessage.files,
|
|
2597
|
+
headerOpen: chatMessage.headerOpen,
|
|
2598
|
+
loading: chatMessage.loading,
|
|
2599
|
+
onContentChange: chatStore.setContent,
|
|
2600
|
+
onFileListChange: chatStore.setFileList,
|
|
2601
|
+
onHeaderOpenChange: chatStore.setHeaderOpen,
|
|
2602
|
+
onSend: () => chatStore.sendMessage(),
|
|
2603
|
+
onCancel: chatStore.cancelReceive,
|
|
2604
|
+
onFocus: chatStore.config.hooks?.onSenderFocus,
|
|
2605
|
+
fileUpload: {
|
|
2606
|
+
request: configState.services.request?.fileUpload,
|
|
2607
|
+
config: receiverState.active.config?.fileUpload
|
|
2608
|
+
},
|
|
2609
|
+
sendBtnProps: common.isFunction(sendBtnProps) ? sendBtnProps() : {},
|
|
2610
|
+
extraFooterBelow: /* @__PURE__ */ jsxRuntime.jsx(common.RenderWrapper, { control: footerBelow }),
|
|
2611
|
+
extraFooter: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2612
|
+
/* @__PURE__ */ jsxRuntime.jsx(FeaturesRenderer_default, {}),
|
|
2613
|
+
/* @__PURE__ */ jsxRuntime.jsx(common.RenderWrapper, { control: extraBtn })
|
|
2614
|
+
] }),
|
|
2615
|
+
extraHeader: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2616
|
+
x.Sender.Header,
|
|
2617
|
+
{
|
|
2618
|
+
title: /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { gap: 4, children: [
|
|
2619
|
+
/* @__PURE__ */ jsxRuntime.jsx(icons.EnterOutlined, {}),
|
|
2620
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Typography.Text, { type: "secondary", ellipsis: true, children: referenceContent })
|
|
2621
|
+
] }),
|
|
2622
|
+
open: !!referenceContent,
|
|
2623
|
+
onOpenChange: () => chatStore.setReferences(),
|
|
2624
|
+
classNames: {
|
|
2625
|
+
header: styles_module_default3.nsSenderReferenceHeaderTitle,
|
|
2626
|
+
content: common.shouldRender(referencesBtn) ? "" : styles_module_default3.nsSenderReferenceHeaderContent
|
|
2627
|
+
},
|
|
2628
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2629
|
+
common.RenderWrapper,
|
|
2630
|
+
{
|
|
2631
|
+
control: referencesBtn,
|
|
2632
|
+
DefaultComponent: /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { gap: 8, children: ["\u6DF1\u5EA6\u89E3\u8BFB", "\u6982\u8981\u89E3\u8BFB"].map((con) => /* @__PURE__ */ jsxRuntime.jsxs(antd.Button, { color: "primary", variant: "filled", onClick: () => referenceHandle(con), children: [
|
|
2633
|
+
con,
|
|
2634
|
+
" \u2192"
|
|
2635
|
+
] }, con)) })
|
|
2636
|
+
}
|
|
2637
|
+
)
|
|
2638
|
+
}
|
|
2639
|
+
)
|
|
2640
|
+
}
|
|
2641
|
+
) });
|
|
2688
2642
|
}
|
|
2689
2643
|
);
|
|
2690
2644
|
|
|
@@ -2700,7 +2654,7 @@ var ConversationListHeader_default = ({ title = true, avatar = true, newConversa
|
|
|
2700
2654
|
common.RenderWrapper,
|
|
2701
2655
|
{
|
|
2702
2656
|
control: title,
|
|
2703
|
-
DefaultComponent: /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
2657
|
+
DefaultComponent: /* @__PURE__ */ jsxRuntime.jsx("span", { className: classNames11__default.default(styles_module_default3.nsChatUserName, "flex-1 text-ellipsis"), children: receiverState.active.name })
|
|
2704
2658
|
}
|
|
2705
2659
|
),
|
|
2706
2660
|
/* @__PURE__ */ jsxRuntime.jsx(common.RenderWrapper, { control: conversationListFavoriteBtn, DefaultComponent: /* @__PURE__ */ jsxRuntime.jsx(ConversationFavoritesList_default, {}) })
|
|
@@ -2716,7 +2670,7 @@ var ConversationListHeader_default = ({ title = true, avatar = true, newConversa
|
|
|
2716
2670
|
type: "primary",
|
|
2717
2671
|
shape: "round",
|
|
2718
2672
|
onClick: () => chatStore.createConversation(),
|
|
2719
|
-
className:
|
|
2673
|
+
className: classNames11__default.default("m-t-16"),
|
|
2720
2674
|
icon: /* @__PURE__ */ jsxRuntime.jsx(icons.PlusOutlined, {}),
|
|
2721
2675
|
children: "\u65B0\u5EFA\u4F1A\u8BDD"
|
|
2722
2676
|
}
|
|
@@ -2726,7 +2680,7 @@ var ConversationListHeader_default = ({ title = true, avatar = true, newConversa
|
|
|
2726
2680
|
] });
|
|
2727
2681
|
};
|
|
2728
2682
|
var ConversationListPanel_default = ({ header }) => {
|
|
2729
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { vertical: true, className:
|
|
2683
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { vertical: true, className: classNames11__default.default("height-full", "zero-chat-conversations", styles_module_default3.nsConversationListPanel), children: [
|
|
2730
2684
|
/* @__PURE__ */ jsxRuntime.jsx(common.RenderWrapper, { control: header, DefaultComponent: ConversationListHeader_default }),
|
|
2731
2685
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "full-scroll", children: /* @__PURE__ */ jsxRuntime.jsx(ConversationList_default, {}) })
|
|
2732
2686
|
] });
|
|
@@ -2820,7 +2774,7 @@ var layouts_default = react.forwardRef(({ theme, params, userInfo, hooks, layout
|
|
|
2820
2774
|
react.useEffect(() => {
|
|
2821
2775
|
configState.hooks?.onBeforeInit?.();
|
|
2822
2776
|
}, []);
|
|
2823
|
-
return /* @__PURE__ */ jsxRuntime.jsx(x.XProvider, { theme: { cssVar: true, ...theme }, children: /* @__PURE__ */ jsxRuntime.jsx(ChatProvider, { store: chatStore, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Spin, { spinning: receiverState.loading, wrapperClassName: "full-spin", children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { vertical: true, className:
|
|
2777
|
+
return /* @__PURE__ */ jsxRuntime.jsx(x.XProvider, { theme: { cssVar: true, ...theme }, children: /* @__PURE__ */ jsxRuntime.jsx(ChatProvider, { store: chatStore, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Spin, { spinning: receiverState.loading, wrapperClassName: "full-spin", children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { vertical: true, className: classNames11__default.default(styles_module_default5.nsChatLayout, "zero-chat-layout", "height-full"), children: [
|
|
2824
2778
|
/* @__PURE__ */ jsxRuntime.jsx(common.RenderWrapper, { control: configState.layout.globalHeader, DefaultComponent: ChatHeader_default }),
|
|
2825
2779
|
/* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { className: "full-scroll", children: [
|
|
2826
2780
|
/* @__PURE__ */ jsxRuntime.jsx(common.RenderWrapper, { control: configState.layout.leftPanel }),
|
|
@@ -2829,7 +2783,7 @@ var layouts_default = react.forwardRef(({ theme, params, userInfo, hooks, layout
|
|
|
2829
2783
|
/* @__PURE__ */ jsxRuntime.jsx(antd.Splitter.Panel, { collapsible: false, min: 600, size: sizes[0], children: hasPreView && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2830
2784
|
configState.preview.file.fileUrl && /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { vertical: true, className: "height-full", children: [
|
|
2831
2785
|
/* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { justify: "space-between", align: "center", gap: 16, className: styles_module_default5.nsPreviewHeader, children: [
|
|
2832
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
2786
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames11__default.default(styles_module_default5.nsPreviewHeaderTitle, "text-ellipsis"), title: configState.preview.file.fileName, children: configState.preview.file.fileName }),
|
|
2833
2787
|
/* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { gap: 8, justify: "center", align: "center", children: [
|
|
2834
2788
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2835
2789
|
antd.Button,
|
|
@@ -2873,15 +2827,15 @@ var layouts_default = react.forwardRef(({ theme, params, userInfo, hooks, layout
|
|
|
2873
2827
|
}
|
|
2874
2828
|
)
|
|
2875
2829
|
] }) }),
|
|
2876
|
-
/* @__PURE__ */ jsxRuntime.jsx(antd.Splitter.Panel, { collapsible: false, max: 800, min: 400, size: sizes[1], children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { vertical: true, className:
|
|
2830
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Splitter.Panel, { collapsible: false, max: 800, min: 400, size: sizes[1], children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { vertical: true, className: classNames11__default.default("height-full"), children: [
|
|
2877
2831
|
/* @__PURE__ */ jsxRuntime.jsx(common.RenderWrapper, { control: configState.layout.chatHeader, DefaultComponent: ChatHeader_default }),
|
|
2878
|
-
/* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { vertical: true, className:
|
|
2832
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { vertical: true, className: classNames11__default.default("full-scroll"), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2879
2833
|
antd.Flex,
|
|
2880
2834
|
{
|
|
2881
2835
|
justify: "center",
|
|
2882
2836
|
vertical: true,
|
|
2883
2837
|
gap: 24,
|
|
2884
|
-
className:
|
|
2838
|
+
className: classNames11__default.default("height-full", styles_module_default5.nsChatBody, "zero-chat-body", styles_module_default5.nsBodyWidth),
|
|
2885
2839
|
children: [
|
|
2886
2840
|
common.shouldRender(configState.layout.messageList) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "full-scroll", children: /* @__PURE__ */ jsxRuntime.jsx(common.RenderWrapper, { control: configState.layout.messageList, DefaultComponent: BubbleListItems_default }) }),
|
|
2887
2841
|
/* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { vertical: true, gap: 8, children: [
|