@blocklet/aigne-hub 0.4.18 → 0.4.20

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.
@@ -24,7 +24,7 @@ function Conversation({ ref, messages, onSubmit, customActions = () => [], rende
24
24
  flexDirection: 'column',
25
25
  overflow: 'auto',
26
26
  ...props.sx,
27
- }, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { mt: 2, mx: 2, flexGrow: 1, display: 'flex', flexDirection: 'column' }, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { flexGrow: 1, width: '100%', mx: 'auto', maxWidth }, children: [messages.map((msg) => {
27
+ }, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { mt: 2, mx: 2, flexGrow: 1, display: 'flex', flexDirection: 'column' }, className: "conversation-container", children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { flexGrow: 1, width: '100%', mx: 'auto', maxWidth }, children: [messages.map((msg) => {
28
28
  var _a, _b;
29
29
  const actions = customActions === null || customActions === void 0 ? void 0 : customActions(msg);
30
30
  return ((0, jsx_runtime_1.jsxs)(material_1.Box, { id: `conversation-${msg.id}`, children: [!(0, isNil_1.default)(msg.prompt) && ((0, jsx_runtime_1.jsx)(message_1.default, { avatar: (_a = renderAvatar === null || renderAvatar === void 0 ? void 0 : renderAvatar(msg, false)) !== null && _a !== void 0 ? _a : (0, jsx_runtime_1.jsx)(material_1.Avatar, { sx: { bgcolor: 'secondary.main' }, children: "\uD83E\uDDD1" }), message: msg.prompt, actions: actions === null || actions === void 0 ? void 0 : actions[0] })), (!(0, isNil_1.default)(msg.response) || !(0, isNil_1.default)(msg.loading) || !(0, isNil_1.default)(msg.error)) && ((0, jsx_runtime_1.jsxs)(message_1.default, { my: 1, id: `response-${msg.id}`, loading: msg.loading && !!msg.response, message: typeof msg.response === 'string' ? msg.response : undefined, avatar: (_b = renderAvatar === null || renderAvatar === void 0 ? void 0 : renderAvatar(msg, true)) !== null && _b !== void 0 ? _b : (0, jsx_runtime_1.jsx)(material_1.Avatar, { sx: { bgcolor: 'primary.main' }, children: "\uD83E\uDD16\uFE0F" }), actions: actions === null || actions === void 0 ? void 0 : actions[1], children: [Array.isArray(msg.response) && ((0, jsx_runtime_1.jsx)(image_preview_1.default, { itemWidth: 100, dataSource: msg.response.map(({ url }) => {
@@ -18,7 +18,7 @@ export default function Conversation({ ref, messages, onSubmit, customActions =
18
18
  flexDirection: 'column',
19
19
  overflow: 'auto',
20
20
  ...props.sx,
21
- }, children: _jsxs(Box, { sx: { mt: 2, mx: 2, flexGrow: 1, display: 'flex', flexDirection: 'column' }, children: [_jsxs(Box, { sx: { flexGrow: 1, width: '100%', mx: 'auto', maxWidth }, children: [messages.map((msg) => {
21
+ }, children: _jsxs(Box, { sx: { mt: 2, mx: 2, flexGrow: 1, display: 'flex', flexDirection: 'column' }, className: "conversation-container", children: [_jsxs(Box, { sx: { flexGrow: 1, width: '100%', mx: 'auto', maxWidth }, children: [messages.map((msg) => {
22
22
  var _a, _b;
23
23
  const actions = customActions === null || customActions === void 0 ? void 0 : customActions(msg);
24
24
  return (_jsxs(Box, { id: `conversation-${msg.id}`, children: [!isNil(msg.prompt) && (_jsx(Message, { avatar: (_a = renderAvatar === null || renderAvatar === void 0 ? void 0 : renderAvatar(msg, false)) !== null && _a !== void 0 ? _a : _jsx(Avatar, { sx: { bgcolor: 'secondary.main' }, children: "\uD83E\uDDD1" }), message: msg.prompt, actions: actions === null || actions === void 0 ? void 0 : actions[0] })), (!isNil(msg.response) || !isNil(msg.loading) || !isNil(msg.error)) && (_jsxs(Message, { my: 1, id: `response-${msg.id}`, loading: msg.loading && !!msg.response, message: typeof msg.response === 'string' ? msg.response : undefined, avatar: (_b = renderAvatar === null || renderAvatar === void 0 ? void 0 : renderAvatar(msg, true)) !== null && _b !== void 0 ? _b : _jsx(Avatar, { sx: { bgcolor: 'primary.main' }, children: "\uD83E\uDD16\uFE0F" }), actions: actions === null || actions === void 0 ? void 0 : actions[1], children: [Array.isArray(msg.response) && (_jsx(ImagePreview, { itemWidth: 100, dataSource: msg.response.map(({ url }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/aigne-hub",
3
- "version": "0.4.18",
3
+ "version": "0.4.20",
4
4
  "description": "The react.js component library for AIGNE Hub",
5
5
  "publishConfig": {
6
6
  "access": "public"