@lobehub/ui 1.6.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/Chat/const.d.ts +1 -0
- package/es/Chat/const.js +1 -0
- package/es/Chat/index.d.ts +2 -0
- package/es/Chat/index.js +2 -0
- package/es/Chat/store/index.d.ts +20 -0
- package/es/Chat/store/index.js +16 -0
- package/es/Chat/store/initialState.d.ts +28 -0
- package/es/Chat/store/initialState.js +9 -0
- package/es/Chat/store/messageReducer.d.ts +37 -0
- package/es/Chat/store/messageReducer.js +67 -0
- package/es/Chat/store/selectors.d.ts +9 -0
- package/es/Chat/store/selectors.js +44 -0
- package/es/Chat/store/store.d.ts +34 -0
- package/es/Chat/store/store.js +240 -0
- package/es/Chat/types.d.ts +77 -0
- package/es/Chat/types.js +1 -0
- package/es/Chat/utils/fetch.d.ts +11 -0
- package/es/Chat/utils/fetch.js +100 -0
- package/es/Conversation/App.d.ts +13 -0
- package/es/Conversation/App.js +43 -0
- package/es/Conversation/ChatList/MessageItem/Content.d.ts +8 -0
- package/es/Conversation/ChatList/MessageItem/Content.js +103 -0
- package/es/Conversation/ChatList/MessageItem/Toolbar.d.ts +10 -0
- package/es/Conversation/ChatList/MessageItem/Toolbar.js +94 -0
- package/es/Conversation/ChatList/MessageItem/index.d.ts +9 -0
- package/es/Conversation/ChatList/MessageItem/index.js +126 -0
- package/es/Conversation/ChatList/index.d.ts +14 -0
- package/es/Conversation/ChatList/index.js +62 -0
- package/es/Conversation/InputArea/ActionBar.d.ts +4 -0
- package/es/Conversation/InputArea/ActionBar.js +71 -0
- package/es/Conversation/InputArea/index.d.ts +4 -0
- package/es/Conversation/InputArea/index.js +101 -0
- package/es/Conversation/StoreUpdater.d.ts +7 -0
- package/es/Conversation/StoreUpdater.js +27 -0
- package/es/Conversation/index.d.ts +8 -0
- package/es/Conversation/index.js +28 -0
- package/es/EditableMessageList/index.d.ts +9 -0
- package/es/EditableMessageList/index.js +101 -0
- package/es/EditableText/index.d.ts +1 -1
- package/es/EditableText/index.js +1 -1
- package/es/Snippet/style.js +1 -1
- package/es/index.d.ts +3 -0
- package/es/index.js +2 -0
- package/lib/Chat/const.d.ts +1 -0
- package/lib/Chat/const.js +29 -0
- package/lib/Chat/index.d.ts +2 -0
- package/lib/Chat/index.js +31 -0
- package/lib/Chat/store/index.d.ts +20 -0
- package/lib/Chat/store/index.js +44 -0
- package/lib/Chat/store/initialState.d.ts +28 -0
- package/lib/Chat/store/initialState.js +37 -0
- package/lib/Chat/store/messageReducer.d.ts +37 -0
- package/lib/Chat/store/messageReducer.js +82 -0
- package/lib/Chat/store/selectors.d.ts +9 -0
- package/lib/Chat/store/selectors.js +53 -0
- package/lib/Chat/store/store.d.ts +34 -0
- package/lib/Chat/store/store.js +119 -0
- package/lib/Chat/types.d.ts +77 -0
- package/lib/Chat/types.js +17 -0
- package/lib/Chat/utils/fetch.d.ts +11 -0
- package/lib/Chat/utils/fetch.js +72 -0
- package/lib/Conversation/App.d.ts +13 -0
- package/lib/Conversation/App.js +53 -0
- package/lib/Conversation/ChatList/MessageItem/Content.d.ts +8 -0
- package/lib/Conversation/ChatList/MessageItem/Content.js +104 -0
- package/lib/Conversation/ChatList/MessageItem/Toolbar.d.ts +10 -0
- package/lib/Conversation/ChatList/MessageItem/Toolbar.js +110 -0
- package/lib/Conversation/ChatList/MessageItem/index.d.ts +9 -0
- package/lib/Conversation/ChatList/MessageItem/index.js +164 -0
- package/lib/Conversation/ChatList/index.d.ts +14 -0
- package/lib/Conversation/ChatList/index.js +61 -0
- package/lib/Conversation/InputArea/ActionBar.d.ts +4 -0
- package/lib/Conversation/InputArea/ActionBar.js +97 -0
- package/lib/Conversation/InputArea/index.d.ts +4 -0
- package/lib/Conversation/InputArea/index.js +149 -0
- package/lib/Conversation/StoreUpdater.d.ts +7 -0
- package/lib/Conversation/StoreUpdater.js +54 -0
- package/lib/Conversation/index.d.ts +8 -0
- package/lib/Conversation/index.js +45 -0
- package/lib/EditableMessageList/index.d.ts +9 -0
- package/lib/EditableMessageList/index.js +124 -0
- package/lib/EditableText/index.d.ts +1 -1
- package/lib/EditableText/index.js +1 -1
- package/lib/Snippet/style.js +1 -1
- package/lib/{EditableText → components}/ControlInput.js +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.js +6 -0
- package/package.json +7 -2
- /package/es/{EditableText → components}/ControlInput.d.ts +0 -0
- /package/es/{EditableText → components}/ControlInput.js +0 -0
- /package/lib/{EditableText → components}/ControlInput.d.ts +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CSSProperties, FC } from 'react';
|
|
2
|
+
interface ChatListProps {
|
|
3
|
+
/**
|
|
4
|
+
* @title 是否只读
|
|
5
|
+
*/
|
|
6
|
+
readonly?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* @title 是否包含系统消息
|
|
9
|
+
*/
|
|
10
|
+
includeSystem?: boolean;
|
|
11
|
+
style?: CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
declare const ChatList: FC<ChatListProps>;
|
|
14
|
+
export default ChatList;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
4
|
+
var _templateObject, _templateObject2;
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
|
+
import { createStyles } from 'antd-style';
|
|
8
|
+
import isEqual from 'fast-deep-equal';
|
|
9
|
+
import { memo } from 'react';
|
|
10
|
+
import { Center, Flexbox } from 'react-layout-kit';
|
|
11
|
+
import { useStore } from "../../Chat/store";
|
|
12
|
+
import MessageItem from "./MessageItem";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
+
var useStyles = createStyles(function (_ref) {
|
|
16
|
+
var css = _ref.css,
|
|
17
|
+
token = _ref.token;
|
|
18
|
+
return {
|
|
19
|
+
loading: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 12px;\n background: ", ";\n border-radius: 8px;\n "])), token.colorFillQuaternary),
|
|
20
|
+
btn: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: 12px;\n color: ", ";\n background: transparent;\n border: 2px solid ", " !important;\n "])), token.colorTextSecondary, token.colorBorderSecondary)
|
|
21
|
+
};
|
|
22
|
+
});
|
|
23
|
+
var ChatList = /*#__PURE__*/memo(function (_ref2) {
|
|
24
|
+
var readonly = _ref2.readonly,
|
|
25
|
+
_ref2$includeSystem = _ref2.includeSystem,
|
|
26
|
+
includeSystem = _ref2$includeSystem === void 0 ? false : _ref2$includeSystem,
|
|
27
|
+
style = _ref2.style;
|
|
28
|
+
// const [messages, loading] = useStore((s) => [s.messages, s.loading], isEqual);
|
|
29
|
+
var _useStyles = useStyles(),
|
|
30
|
+
styles = _useStyles.styles;
|
|
31
|
+
var _useStore = useStore(function (s) {
|
|
32
|
+
return [s.messages, s.loading];
|
|
33
|
+
}, isEqual),
|
|
34
|
+
_useStore2 = _slicedToArray(_useStore, 2),
|
|
35
|
+
messages = _useStore2[0],
|
|
36
|
+
loading = _useStore2[1];
|
|
37
|
+
return !messages || messages.length === 0 ? null : /*#__PURE__*/_jsxs(Flexbox, {
|
|
38
|
+
gap: 8,
|
|
39
|
+
style: style,
|
|
40
|
+
children: [messages
|
|
41
|
+
// 根据情况确认是否包含系统
|
|
42
|
+
.filter(function (s) {
|
|
43
|
+
return !includeSystem ? s.role !== 'system' : !!s;
|
|
44
|
+
}).map(function (item, index) {
|
|
45
|
+
return /*#__PURE__*/_jsx(MessageItem, _objectSpread({
|
|
46
|
+
readonly: readonly,
|
|
47
|
+
index: index
|
|
48
|
+
}, item), index);
|
|
49
|
+
}), loading ? /*#__PURE__*/_jsx(Center, {
|
|
50
|
+
id: 'for-loading',
|
|
51
|
+
className: styles.loading,
|
|
52
|
+
children: /*#__PURE__*/_jsxs(Flexbox, {
|
|
53
|
+
horizontal: true,
|
|
54
|
+
distribution: 'space-between',
|
|
55
|
+
align: 'center',
|
|
56
|
+
gap: 24,
|
|
57
|
+
children: [/*#__PURE__*/_jsx("div", {}), "\u6B63\u5728\u751F\u6210...", /*#__PURE__*/_jsx("div", {})]
|
|
58
|
+
})
|
|
59
|
+
}) : null]
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
export default ChatList;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
3
|
+
var _templateObject;
|
|
4
|
+
import { createStyles } from 'antd-style';
|
|
5
|
+
import { memo } from 'react';
|
|
6
|
+
import { Flexbox } from 'react-layout-kit';
|
|
7
|
+
import { shallow } from 'zustand/shallow';
|
|
8
|
+
import IconAction from "../../ActionIcon";
|
|
9
|
+
import { ConfigProvider, Popconfirm, Tooltip } from 'antd';
|
|
10
|
+
import { EraserIcon } from 'lucide-react';
|
|
11
|
+
import { chatSelectors, useStore } from "../../Chat/store";
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
var useStyles = createStyles(function (_ref) {
|
|
15
|
+
var css = _ref.css,
|
|
16
|
+
token = _ref.token;
|
|
17
|
+
return {
|
|
18
|
+
extra: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorTextTertiary)
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
export var ActionBar = function ActionBar() {
|
|
22
|
+
var _useStore = useStore(function (s) {
|
|
23
|
+
return [chatSelectors.totalTokenCount(s), chatSelectors.agentTokenCount(s), chatSelectors.messagesTokenCount(s), s.dispatchMessage];
|
|
24
|
+
}, shallow),
|
|
25
|
+
_useStore2 = _slicedToArray(_useStore, 4),
|
|
26
|
+
totalToken = _useStore2[0],
|
|
27
|
+
agentToken = _useStore2[1],
|
|
28
|
+
messagesToken = _useStore2[2],
|
|
29
|
+
dispatchMessage = _useStore2[3];
|
|
30
|
+
var _useStyles = useStyles(),
|
|
31
|
+
styles = _useStyles.styles,
|
|
32
|
+
theme = _useStyles.theme;
|
|
33
|
+
return totalToken > 0 ? /*#__PURE__*/_jsx(ConfigProvider, {
|
|
34
|
+
theme: {
|
|
35
|
+
token: {
|
|
36
|
+
colorText: theme.colorTextSecondary
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
children: /*#__PURE__*/_jsxs(Flexbox, {
|
|
40
|
+
align: 'center',
|
|
41
|
+
direction: 'horizontal-reverse',
|
|
42
|
+
paddingInline: 12,
|
|
43
|
+
className: styles.extra,
|
|
44
|
+
gap: 8,
|
|
45
|
+
children: [/*#__PURE__*/_jsx(Popconfirm, {
|
|
46
|
+
title: '你即将要清空会话,清空后将无法找回。是否清空当前会话?',
|
|
47
|
+
okButtonProps: {
|
|
48
|
+
danger: true
|
|
49
|
+
},
|
|
50
|
+
okText: '清空会话',
|
|
51
|
+
onConfirm: function onConfirm() {
|
|
52
|
+
dispatchMessage({
|
|
53
|
+
type: 'resetMessages'
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
children: /*#__PURE__*/_jsx(IconAction, {
|
|
57
|
+
title: '清空当前会话',
|
|
58
|
+
size: 'small',
|
|
59
|
+
icon: EraserIcon
|
|
60
|
+
})
|
|
61
|
+
}), /*#__PURE__*/_jsx(Tooltip, {
|
|
62
|
+
title: [agentToken > 0 ? "\u89D2\u8272\u5B9A\u4E49: ".concat(agentToken) : null, messagesToken > 0 ? "\u4F1A\u8BDD: ".concat(messagesToken) : null].filter(Boolean).join(' | '),
|
|
63
|
+
children: /*#__PURE__*/_jsxs(Flexbox, {
|
|
64
|
+
gap: 4,
|
|
65
|
+
children: [" Tokens: ", totalToken]
|
|
66
|
+
})
|
|
67
|
+
})]
|
|
68
|
+
})
|
|
69
|
+
}) : null;
|
|
70
|
+
};
|
|
71
|
+
export default /*#__PURE__*/memo(ActionBar);
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import _objectDestructuringEmpty from "@babel/runtime/helpers/esm/objectDestructuringEmpty";
|
|
3
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
4
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
5
|
+
import { SendOutlined } from '@ant-design/icons';
|
|
6
|
+
import { Button, ConfigProvider, Input } from 'antd';
|
|
7
|
+
import { createStyles, useResponsive } from 'antd-style';
|
|
8
|
+
import { memo, useRef } from 'react';
|
|
9
|
+
import { Flexbox } from 'react-layout-kit';
|
|
10
|
+
import { shallow } from 'zustand/shallow';
|
|
11
|
+
import { chatSelectors, useStore, useStoreApi } from "../../Chat/store";
|
|
12
|
+
import ActionBar from "./ActionBar";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
+
var useStyles = createStyles(function (_ref) {
|
|
16
|
+
var css = _ref.css,
|
|
17
|
+
responsive = _ref.responsive,
|
|
18
|
+
token = _ref.token;
|
|
19
|
+
return {
|
|
20
|
+
container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: sticky;\n z-index: ", ";\n bottom: 0;\n\n width: ", "px;\n padding-top: 12px;\n padding-bottom: 24px;\n\n background-image: linear-gradient(to top, ", " 88%, transparent 100%);\n\n ", " {\n width: 100%;\n }\n "])), token.zIndexPopupBase, token.contentWidth, token.colorBgLayout, responsive.mobile),
|
|
21
|
+
boxShadow: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n border-radius: 8px;\n box-shadow: ", ";\n "])), token.boxShadowSecondary),
|
|
22
|
+
input: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 100%;\n border-radius: 8px;\n "]))),
|
|
23
|
+
btn: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 10;\n right: 8px;\n bottom: 8px;\n\n color: ", ";\n &:hover {\n color: ", ";\n }\n "])), token.colorTextTertiary, token.colorTextSecondary),
|
|
24
|
+
extra: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorTextTertiary)
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
export var InputArea = function InputArea(_ref2) {
|
|
28
|
+
_objectDestructuringEmpty(_ref2);
|
|
29
|
+
var _useStore = useStore(function (s) {
|
|
30
|
+
return [s.message, s.sendMessage, s.loading, chatSelectors.disableInput(s)];
|
|
31
|
+
}, shallow),
|
|
32
|
+
_useStore2 = _slicedToArray(_useStore, 4),
|
|
33
|
+
message = _useStore2[0],
|
|
34
|
+
sendMessage = _useStore2[1],
|
|
35
|
+
isLoading = _useStore2[2],
|
|
36
|
+
disabled = _useStore2[3];
|
|
37
|
+
var isChineseInput = useRef(false);
|
|
38
|
+
var _useStyles = useStyles(),
|
|
39
|
+
styles = _useStyles.styles,
|
|
40
|
+
theme = _useStyles.theme;
|
|
41
|
+
var _useResponsive = useResponsive(),
|
|
42
|
+
mobile = _useResponsive.mobile;
|
|
43
|
+
var storeApi = useStoreApi();
|
|
44
|
+
return /*#__PURE__*/_jsx(ConfigProvider, {
|
|
45
|
+
theme: {
|
|
46
|
+
token: {
|
|
47
|
+
borderRadius: 4,
|
|
48
|
+
fontSize: 16,
|
|
49
|
+
colorBgContainer: theme.colorBgElevated,
|
|
50
|
+
controlHeightLG: 48,
|
|
51
|
+
colorBorder: 'transparent',
|
|
52
|
+
colorPrimaryHover: 'transparent'
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
children: /*#__PURE__*/_jsxs(Flexbox, {
|
|
56
|
+
gap: 8,
|
|
57
|
+
className: styles.container,
|
|
58
|
+
children: [/*#__PURE__*/_jsx(ActionBar, {}), /*#__PURE__*/_jsxs(Flexbox, {
|
|
59
|
+
horizontal: true,
|
|
60
|
+
gap: 8,
|
|
61
|
+
align: 'center',
|
|
62
|
+
className: styles.boxShadow,
|
|
63
|
+
children: [/*#__PURE__*/_jsx(Input.TextArea, {
|
|
64
|
+
size: 'large',
|
|
65
|
+
value: message,
|
|
66
|
+
placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9...",
|
|
67
|
+
onChange: function onChange(e) {
|
|
68
|
+
storeApi.setState({
|
|
69
|
+
message: e.target.value
|
|
70
|
+
});
|
|
71
|
+
},
|
|
72
|
+
disabled: disabled,
|
|
73
|
+
autoSize: {
|
|
74
|
+
maxRows: 8
|
|
75
|
+
},
|
|
76
|
+
onCompositionStart: function onCompositionStart() {
|
|
77
|
+
isChineseInput.current = true;
|
|
78
|
+
},
|
|
79
|
+
onCompositionEnd: function onCompositionEnd() {
|
|
80
|
+
isChineseInput.current = false;
|
|
81
|
+
},
|
|
82
|
+
className: styles.input,
|
|
83
|
+
onPressEnter: function onPressEnter(e) {
|
|
84
|
+
if (!isLoading && !e.shiftKey && !isChineseInput.current) {
|
|
85
|
+
e.preventDefault();
|
|
86
|
+
sendMessage();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}), mobile ? null : /*#__PURE__*/_jsx(Button, {
|
|
90
|
+
disabled: disabled,
|
|
91
|
+
loading: isLoading,
|
|
92
|
+
type: "text",
|
|
93
|
+
className: styles.btn,
|
|
94
|
+
onClick: sendMessage,
|
|
95
|
+
icon: /*#__PURE__*/_jsx(SendOutlined, {})
|
|
96
|
+
})]
|
|
97
|
+
})]
|
|
98
|
+
})
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
export default /*#__PURE__*/memo(InputArea);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { InternalChatContext } from '../Chat/types';
|
|
3
|
+
import { ChatStore } from '../Chat/store';
|
|
4
|
+
export interface StoreUpdaterProps extends Partial<InternalChatContext>, Pick<ChatStore, 'onMessagesChange' | 'onAgentChange' | 'onResponseFinished' | 'onResponseStart'> {
|
|
5
|
+
}
|
|
6
|
+
declare const StoreUpdater: FC<StoreUpdaterProps>;
|
|
7
|
+
export default StoreUpdater;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createStoreUpdater } from 'zustand-utils';
|
|
2
|
+
import { useStoreApi } from "../Chat/store";
|
|
3
|
+
var StoreUpdater = function StoreUpdater(_ref) {
|
|
4
|
+
var updateAt = _ref.updateAt,
|
|
5
|
+
createAt = _ref.createAt,
|
|
6
|
+
title = _ref.title,
|
|
7
|
+
description = _ref.description,
|
|
8
|
+
agent = _ref.agent,
|
|
9
|
+
messages = _ref.messages,
|
|
10
|
+
onAgentChange = _ref.onAgentChange,
|
|
11
|
+
onMessagesChange = _ref.onMessagesChange,
|
|
12
|
+
onResponseFinished = _ref.onResponseFinished,
|
|
13
|
+
onResponseStart = _ref.onResponseStart;
|
|
14
|
+
var useStoreUpdater = createStoreUpdater(useStoreApi());
|
|
15
|
+
useStoreUpdater('agent', agent);
|
|
16
|
+
useStoreUpdater('onAgentChange', onAgentChange);
|
|
17
|
+
useStoreUpdater('messages', messages);
|
|
18
|
+
useStoreUpdater('onMessagesChange', onMessagesChange);
|
|
19
|
+
useStoreUpdater('onResponseFinished', onResponseFinished);
|
|
20
|
+
useStoreUpdater('onResponseStart', onResponseStart);
|
|
21
|
+
useStoreUpdater('title', title);
|
|
22
|
+
useStoreUpdater('description', description);
|
|
23
|
+
useStoreUpdater('createAt', createAt);
|
|
24
|
+
useStoreUpdater('updateAt', updateAt);
|
|
25
|
+
return null;
|
|
26
|
+
};
|
|
27
|
+
export default StoreUpdater;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AppProps } from './App';
|
|
3
|
+
import { StoreUpdaterProps } from './StoreUpdater';
|
|
4
|
+
export interface ConversationProps extends StoreUpdaterProps, AppProps {
|
|
5
|
+
devtools?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const Conversation: import("react").NamedExoticComponent<ConversationProps>;
|
|
8
|
+
export default Conversation;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["readonly", "devtools", "includeSystem"];
|
|
4
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
+
import { memo, useRef } from 'react';
|
|
7
|
+
import { Provider, createChatStore } from "../Chat/store";
|
|
8
|
+
import ChatContainer from "./App";
|
|
9
|
+
import StoreUpdater from "./StoreUpdater";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
var Conversation = /*#__PURE__*/memo(function (_ref) {
|
|
13
|
+
var readonly = _ref.readonly,
|
|
14
|
+
devtools = _ref.devtools,
|
|
15
|
+
includeSystem = _ref.includeSystem,
|
|
16
|
+
res = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
var ref = useRef(function () {
|
|
18
|
+
return createChatStore(devtools);
|
|
19
|
+
});
|
|
20
|
+
return /*#__PURE__*/_jsxs(Provider, {
|
|
21
|
+
createStore: ref.current,
|
|
22
|
+
children: [/*#__PURE__*/_jsx(ChatContainer, {
|
|
23
|
+
includeSystem: includeSystem,
|
|
24
|
+
readonly: readonly
|
|
25
|
+
}), /*#__PURE__*/_jsx(StoreUpdater, _objectSpread({}, res))]
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
export default Conversation;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ChatMessage } from "../Chat";
|
|
3
|
+
export interface EditableMessageListProps {
|
|
4
|
+
dataSources: ChatMessage[];
|
|
5
|
+
onChange?: (chatMessages: ChatMessage[]) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const EditableMessageList: import("react").NamedExoticComponent<EditableMessageListProps>;
|
|
9
|
+
export default EditableMessageList;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import { PlusOutlined } from '@ant-design/icons';
|
|
3
|
+
import { Button, Select } from 'antd';
|
|
4
|
+
import isEqual from 'fast-deep-equal';
|
|
5
|
+
import { memo, useEffect, useReducer } from 'react';
|
|
6
|
+
import { Flexbox } from 'react-layout-kit';
|
|
7
|
+
import IconAction from "../ActionIcon";
|
|
8
|
+
import { messagesReducer } from "../Chat";
|
|
9
|
+
import { ControlInput } from "../components/ControlInput";
|
|
10
|
+
import { TrashIcon } from 'lucide-react';
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
export var EditableMessageList = /*#__PURE__*/memo(function (_ref) {
|
|
14
|
+
var disabled = _ref.disabled,
|
|
15
|
+
dataSources = _ref.dataSources,
|
|
16
|
+
onChange = _ref.onChange;
|
|
17
|
+
var _useReducer = useReducer(messagesReducer, dataSources),
|
|
18
|
+
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
19
|
+
chatMessages = _useReducer2[0],
|
|
20
|
+
dispatch = _useReducer2[1];
|
|
21
|
+
useEffect(function () {
|
|
22
|
+
if (!isEqual(dataSources, chatMessages)) {
|
|
23
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(chatMessages);
|
|
24
|
+
}
|
|
25
|
+
}, [chatMessages]);
|
|
26
|
+
return !dataSources ? null : /*#__PURE__*/_jsxs(Flexbox, {
|
|
27
|
+
gap: 12,
|
|
28
|
+
children: [chatMessages.map(function (item, index) {
|
|
29
|
+
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
30
|
+
horizontal: true,
|
|
31
|
+
gap: 8,
|
|
32
|
+
width: '100%',
|
|
33
|
+
align: 'center',
|
|
34
|
+
children: [/*#__PURE__*/_jsx(Select, {
|
|
35
|
+
value: item.role,
|
|
36
|
+
style: {
|
|
37
|
+
width: 120
|
|
38
|
+
},
|
|
39
|
+
dropdownStyle: {
|
|
40
|
+
zIndex: 100
|
|
41
|
+
},
|
|
42
|
+
disabled: disabled,
|
|
43
|
+
onChange: function onChange(value) {
|
|
44
|
+
dispatch({
|
|
45
|
+
type: 'updateMessageRole',
|
|
46
|
+
index: index,
|
|
47
|
+
role: value
|
|
48
|
+
});
|
|
49
|
+
},
|
|
50
|
+
options: [{
|
|
51
|
+
value: 'system',
|
|
52
|
+
label: '系统'
|
|
53
|
+
}, {
|
|
54
|
+
value: 'user',
|
|
55
|
+
label: '输入'
|
|
56
|
+
}, {
|
|
57
|
+
value: 'assistant',
|
|
58
|
+
label: '输出'
|
|
59
|
+
}]
|
|
60
|
+
}), /*#__PURE__*/_jsx(ControlInput, {
|
|
61
|
+
disabled: disabled,
|
|
62
|
+
value: item.content,
|
|
63
|
+
onChange: function onChange(e) {
|
|
64
|
+
dispatch({
|
|
65
|
+
type: 'updateMessage',
|
|
66
|
+
index: index,
|
|
67
|
+
message: e
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
placeholder: item.role === 'user' ? '请填入输入的样例内容' : '请填入输出的样例'
|
|
71
|
+
}), /*#__PURE__*/_jsx(IconAction, {
|
|
72
|
+
icon: TrashIcon,
|
|
73
|
+
title: '删除',
|
|
74
|
+
size: 'small',
|
|
75
|
+
onClick: function onClick() {
|
|
76
|
+
dispatch({
|
|
77
|
+
type: 'deleteMessage',
|
|
78
|
+
index: index
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
})]
|
|
82
|
+
}, "".concat(index, "-").concat(item.content));
|
|
83
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
84
|
+
block: true,
|
|
85
|
+
disabled: disabled,
|
|
86
|
+
icon: /*#__PURE__*/_jsx(PlusOutlined, {}),
|
|
87
|
+
onClick: function onClick() {
|
|
88
|
+
var lastMeg = chatMessages.at(-1);
|
|
89
|
+
dispatch({
|
|
90
|
+
type: 'addMessage',
|
|
91
|
+
message: {
|
|
92
|
+
role: (lastMeg === null || lastMeg === void 0 ? void 0 : lastMeg.role) === 'user' ? 'assistant' : 'user',
|
|
93
|
+
content: ''
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
},
|
|
97
|
+
children: "\u6DFB\u52A0\u4E00\u9879"
|
|
98
|
+
})]
|
|
99
|
+
});
|
|
100
|
+
}, isEqual);
|
|
101
|
+
export default EditableMessageList;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ControlInputProps } from
|
|
2
|
+
import { ControlInputProps } from "../components/ControlInput";
|
|
3
3
|
export declare type EditableTextProps = ControlInputProps;
|
|
4
4
|
declare const EditableText: import("react").NamedExoticComponent<ControlInputProps>;
|
|
5
5
|
export default EditableText;
|
package/es/EditableText/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { EditOutlined } from '@ant-design/icons';
|
|
|
3
3
|
import { Tooltip } from 'antd';
|
|
4
4
|
import { memo, useState } from 'react';
|
|
5
5
|
import { Flexbox } from 'react-layout-kit';
|
|
6
|
-
import { ControlInput } from "
|
|
6
|
+
import { ControlInput } from "../components/ControlInput";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
var EditableText = /*#__PURE__*/memo(function (_ref) {
|
package/es/Snippet/style.js
CHANGED
|
@@ -5,5 +5,5 @@ import { rgba } from 'polished';
|
|
|
5
5
|
export var useStyles = createStyles(function (_ref, type) {
|
|
6
6
|
var css = _ref.css,
|
|
7
7
|
token = _ref.token;
|
|
8
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n max-width: 100%;\n position: relative;\n align-items: center;\n border-radius: ", "px;\n gap: 8px;\n padding: 0 8px;\n height: 36px;\n transition: background-color 100ms ", ";\n\n ", "\n\n &:hover {\n background-color: ", ";\n }\n\n .ant-highlighter-shiki {\n overflow: auto;\n flex: 1;\n }\n .prism-code {\n background: none !important;\n }\n\n pre {\n background: none !important;\n padding-top: 6px; !important;\n margin: 0 !important;\n line-height: 1;\n }\n code[class*='language-'] {\n background: none !important;\n }\n "])), token.borderRadius, token.motionEaseOut, type === 'block' ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), rgba(token.colorBgElevated, 0.6)) : css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n "])), token.colorBorder), token.colorFillTertiary);
|
|
8
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n max-width: 100%;\n position: relative;\n align-items: center;\n border-radius: ", "px;\n gap: 8px;\n padding: 0 8px 0 12px;\n height: 36px;\n transition: background-color 100ms ", ";\n\n ", "\n\n &:hover {\n background-color: ", ";\n }\n\n .ant-highlighter-shiki {\n overflow: auto;\n flex: 1;\n }\n .prism-code {\n background: none !important;\n }\n\n pre {\n background: none !important;\n padding-top: 6px; !important;\n margin: 0 !important;\n line-height: 1;\n }\n code[class*='language-'] {\n background: none !important;\n }\n "])), token.borderRadius, token.motionEaseOut, type === 'block' ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), rgba(token.colorBgElevated, 0.6)) : css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n "])), token.colorBorder), token.colorFillTertiary);
|
|
9
9
|
});
|
package/es/index.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export { default as ActionIcon, type ActionIconProps, type ActionIconSize } from './ActionIcon';
|
|
2
2
|
export { default as Avatar, type AvatarProps } from './Avatar';
|
|
3
|
+
export type { ChatMessage } from './Chat';
|
|
3
4
|
export { default as ContextMenu, type ContextMenuProps } from './ContextMenu';
|
|
5
|
+
export { default as Conversation, type ConversationProps } from './Conversation';
|
|
4
6
|
export { default as CopyButton, type CopyButtonProps } from './CopyButton';
|
|
5
7
|
export { default as DraggablePanel, type DraggablePanelProps } from './DraggablePanel';
|
|
6
8
|
export { default as EditableMessage, type EditableMessageProps } from './EditableMessage';
|
|
9
|
+
export { default as EditableMessageList, type EditableMessageListProps, } from './EditableMessageList';
|
|
7
10
|
export { default as EditableText, type EditableTextProps } from './EditableText';
|
|
8
11
|
export { default as Highlighter, SyntaxHighlighter, type HighlighterProps, type SyntaxHighlighterProps, } from './Highlighter';
|
|
9
12
|
export { default as Icon, type IconProps, type IconSize } from './Icon';
|
package/es/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export { default as ActionIcon } from "./ActionIcon";
|
|
2
2
|
export { default as Avatar } from "./Avatar";
|
|
3
3
|
export { default as ContextMenu } from "./ContextMenu";
|
|
4
|
+
export { default as Conversation } from "./Conversation";
|
|
4
5
|
export { default as CopyButton } from "./CopyButton";
|
|
5
6
|
export { default as DraggablePanel } from "./DraggablePanel";
|
|
6
7
|
export { default as EditableMessage } from "./EditableMessage";
|
|
8
|
+
export { default as EditableMessageList } from "./EditableMessageList";
|
|
7
9
|
export { default as EditableText } from "./EditableText";
|
|
8
10
|
export { default as Highlighter, SyntaxHighlighter } from "./Highlighter";
|
|
9
11
|
export { default as Icon } from "./Icon";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LOADING_FLAT = "...";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/Chat/const.ts
|
|
20
|
+
var const_exports = {};
|
|
21
|
+
__export(const_exports, {
|
|
22
|
+
LOADING_FLAT: () => LOADING_FLAT
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(const_exports);
|
|
25
|
+
var LOADING_FLAT = "...";
|
|
26
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
+
0 && (module.exports = {
|
|
28
|
+
LOADING_FLAT
|
|
29
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/Chat/index.ts
|
|
21
|
+
var Chat_exports = {};
|
|
22
|
+
__export(Chat_exports, {
|
|
23
|
+
messagesReducer: () => import_store.messagesReducer
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(Chat_exports);
|
|
26
|
+
var import_store = require("./store");
|
|
27
|
+
__reExport(Chat_exports, require("./types"), module.exports);
|
|
28
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
+
0 && (module.exports = {
|
|
30
|
+
messagesReducer
|
|
31
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StoreApi } from 'zustand';
|
|
3
|
+
import { ChatStore } from './store';
|
|
4
|
+
export declare const createChatStore: (showDevtools?: boolean) => import("zustand").UseBoundStore<Omit<StoreApi<ChatStore>, "setState"> & {
|
|
5
|
+
setState<A extends string | {
|
|
6
|
+
type: unknown;
|
|
7
|
+
}>(partial: ChatStore | Partial<ChatStore> | ((state: ChatStore) => ChatStore | Partial<ChatStore>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const Provider: ({ createStore, children }: {
|
|
10
|
+
createStore: () => StoreApi<ChatStore>;
|
|
11
|
+
children: any;
|
|
12
|
+
}) => import("react").FunctionComponentElement<import("react").ProviderProps<StoreApi<ChatStore> | undefined>>, useStore: import("zustand-utils").UseContextStore<StoreApi<ChatStore>>, useStoreApi: () => {
|
|
13
|
+
setState: (partial: ChatStore | Partial<ChatStore> | ((state: ChatStore) => ChatStore | Partial<ChatStore>), replace?: boolean | undefined) => void;
|
|
14
|
+
getState: () => ChatStore;
|
|
15
|
+
subscribe: (listener: (state: ChatStore, prevState: ChatStore) => void) => () => void;
|
|
16
|
+
destroy: () => void;
|
|
17
|
+
};
|
|
18
|
+
export { messagesReducer, type MessageDispatch } from './messageReducer';
|
|
19
|
+
export * from './selectors';
|
|
20
|
+
export type { ChatStore } from './store';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/Chat/store/index.ts
|
|
21
|
+
var store_exports = {};
|
|
22
|
+
__export(store_exports, {
|
|
23
|
+
Provider: () => Provider,
|
|
24
|
+
createChatStore: () => createChatStore,
|
|
25
|
+
messagesReducer: () => import_messageReducer.messagesReducer,
|
|
26
|
+
useStore: () => useStore,
|
|
27
|
+
useStoreApi: () => useStoreApi
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(store_exports);
|
|
30
|
+
var import_zustand = require("zustand");
|
|
31
|
+
var import_zustand_utils = require("zustand-utils");
|
|
32
|
+
var import_store = require("./store");
|
|
33
|
+
var import_messageReducer = require("./messageReducer");
|
|
34
|
+
__reExport(store_exports, require("./selectors"), module.exports);
|
|
35
|
+
var createChatStore = (showDevtools = false) => (0, import_zustand.create)()((0, import_zustand_utils.optionalDevtools)(showDevtools)(import_store.createStore, { name: "CHAT_COMPONENT" }));
|
|
36
|
+
var { Provider, useStore, useStoreApi } = (0, import_zustand_utils.createContext)();
|
|
37
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
+
0 && (module.exports = {
|
|
39
|
+
Provider,
|
|
40
|
+
createChatStore,
|
|
41
|
+
messagesReducer,
|
|
42
|
+
useStore,
|
|
43
|
+
useStoreApi
|
|
44
|
+
});
|