@fonixtree/magic-design 0.1.73 → 0.1.74

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.
Files changed (33) hide show
  1. package/es/common/ImagePicker/index.js +43 -2
  2. package/es/common/ImagePicker/index.less +1 -0
  3. package/es/constants/index.js +2 -1
  4. package/es/core/Designer/AiImageGenerator/GenerateSize/index.js +6 -6
  5. package/es/core/Designer/AiImageGenerator/History/index.js +141 -0
  6. package/es/core/Designer/AiImageGenerator/History/index.less +69 -0
  7. package/es/core/Designer/AiImageGenerator/index.js +314 -54
  8. package/es/core/Designer/AiImageGenerator/index.less +62 -34
  9. package/es/core/Designer/ChatRobot/index.js +24 -9
  10. package/es/core/Designer/ChatRobot/index.less +3 -0
  11. package/es/core/Designer/FonixtreeGpt/index.js +32 -171
  12. package/es/core/Designer/index.js +1 -3
  13. package/es/utils/androidUtil.js +2 -1
  14. package/es/utils/commonUtil.js +13 -2
  15. package/es/utils/coreUtil.js +1 -1
  16. package/lib/common/ImagePicker/index.js +43 -2
  17. package/lib/common/ImagePicker/index.less +1 -0
  18. package/lib/constants/index.js +2 -1
  19. package/lib/core/Designer/AiImageGenerator/GenerateSize/index.js +6 -6
  20. package/lib/core/Designer/AiImageGenerator/History/index.js +141 -0
  21. package/lib/core/Designer/AiImageGenerator/History/index.less +69 -0
  22. package/lib/core/Designer/AiImageGenerator/index.js +314 -54
  23. package/lib/core/Designer/AiImageGenerator/index.less +62 -34
  24. package/lib/core/Designer/ChatRobot/index.js +24 -9
  25. package/lib/core/Designer/ChatRobot/index.less +3 -0
  26. package/lib/core/Designer/FonixtreeGpt/index.js +32 -171
  27. package/lib/core/Designer/index.js +1 -3
  28. package/lib/utils/androidUtil.js +2 -1
  29. package/lib/utils/commonUtil.js +13 -2
  30. package/lib/utils/coreUtil.js +1 -1
  31. package/package.json +1 -1
  32. package/es/assets/fonts/.DS_Store +0 -0
  33. package/lib/assets/fonts/.DS_Store +0 -0
@@ -17,14 +17,18 @@ var _GenerateArtist = _interopRequireDefault(require("./GenerateArtist"));
17
17
 
18
18
  var _UploadReference = _interopRequireDefault(require("./UploadReference"));
19
19
 
20
+ var _History = _interopRequireDefault(require("./History"));
21
+
20
22
  var _nodata = _interopRequireDefault(require("./images/nodata.png"));
21
23
 
22
24
  var _common = require("../../../common");
23
25
 
24
- var _mobx = require("../../../mobx");
25
-
26
26
  var _commonUtil = require("../../../utils/commonUtil");
27
27
 
28
+ var _storeUtil = require("../../../utils/storeUtil");
29
+
30
+ var _constants = require("../../../constants");
31
+
28
32
  require("./index.less");
29
33
 
30
34
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -59,6 +63,22 @@ var __extends = void 0 && (void 0).__extends || function () {
59
63
  };
60
64
  }();
61
65
 
66
+ var __assign = void 0 && (void 0).__assign || function () {
67
+ __assign = Object.assign || function (t) {
68
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
69
+ s = arguments[i];
70
+
71
+ for (var p in s) {
72
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
73
+ }
74
+ }
75
+
76
+ return t;
77
+ };
78
+
79
+ return __assign.apply(this, arguments);
80
+ };
81
+
62
82
  var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
63
83
  function adopt(value) {
64
84
  return value instanceof P ? value : new P(function (resolve) {
@@ -214,13 +234,25 @@ function (_super) {
214
234
 
215
235
  _this.state = {
216
236
  loading: false,
217
- visible: false,
218
- images: []
237
+ selected: [],
238
+ prompt: '',
239
+ history: [],
240
+ hisCursor: 0
219
241
  };
220
242
  _this.formRef = /*#__PURE__*/_react["default"].createRef();
221
243
 
244
+ _this.onHisConfigClick = function () {};
245
+
246
+ _this.historyChange = function (newHis) {
247
+ (0, _storeUtil.setSessionStore)(_constants.STORAGE_KEY.FONIXTREE_AI_IMG_HIS, newHis);
248
+
249
+ _this.setState({
250
+ history: newHis
251
+ });
252
+ };
253
+
222
254
  _this.getColumnNum = function (num) {
223
- if (num === 1) {
255
+ if (num <= 1) {
224
256
  return 1;
225
257
  } else if (num > 1 && num <= 4) {
226
258
  return 2;
@@ -230,42 +262,89 @@ function (_super) {
230
262
  };
231
263
 
232
264
  _this.onCloseDrawer = function () {
233
- _mobx.store.setState({
234
- imgGenVisible: false
235
- });
265
+ _this.props.onClose();
236
266
  };
237
267
 
238
- _this.onHisConfigClick = function () {};
268
+ _this.onConfirm = function () {
269
+ return __awaiter(_this, void 0, void 0, function () {
270
+ var _a, history, hisCursor, selected, images, imageList, result;
271
+
272
+ return __generator(this, function (_b) {
273
+ switch (_b.label) {
274
+ case 0:
275
+ _a = this.state, history = _a.history, hisCursor = _a.hisCursor, selected = _a.selected;
276
+
277
+ if (!selected.length) {
278
+ return [2
279
+ /*return*/
280
+ ];
281
+ }
282
+
283
+ images = history[hisCursor].images;
284
+ imageList = selected.map(function (sel) {
285
+ return images[sel];
286
+ });
287
+ return [4
288
+ /*yield*/
289
+ , (0, _commonUtil.commonFetch)('/designer/v1/uploadImage', {
290
+ base64Images: imageList
291
+ }, 'POST')];
292
+
293
+ case 1:
294
+ result = _b.sent();
295
+ this.props.onConfirm(result[0]);
296
+ return [2
297
+ /*return*/
298
+ ];
299
+ }
300
+ });
301
+ });
302
+ };
239
303
 
240
304
  _this.onGenarate = function (prompt) {
241
305
  return __awaiter(_this, void 0, void 0, function () {
242
- var formVal, result, e_1;
306
+ var history, formVal, params, result, e_1;
243
307
  return __generator(this, function (_a) {
244
308
  switch (_a.label) {
245
309
  case 0:
310
+ history = this.state.history;
311
+
312
+ if (!prompt) {
313
+ return [2
314
+ /*return*/
315
+ ];
316
+ }
317
+
246
318
  formVal = this.formRef.current.getFieldsValue(true);
247
- this.setState({
248
- loading: true
249
- });
319
+ params = {
320
+ prompt: prompt,
321
+ n: formVal.number || 1,
322
+ height: 256,
323
+ width: 256
324
+ };
250
325
  _a.label = 1;
251
326
 
252
327
  case 1:
253
328
  _a.trys.push([1, 3,, 4]);
254
329
 
330
+ this.setState({
331
+ prompt: prompt,
332
+ loading: true
333
+ });
255
334
  return [4
256
335
  /*yield*/
257
- , (0, _commonUtil.commonFetch)('/designer/v1/ai/create-image', {
258
- prompt: prompt,
259
- n: formVal.number || 4,
260
- height: 256,
261
- width: 256
262
- }, 'POST')];
336
+ , (0, _commonUtil.commonFetch)('/designer/v1/ai/create-image', params, 'POST')];
263
337
 
264
338
  case 2:
265
339
  result = _a.sent();
340
+ history.push({
341
+ images: result.imageList,
342
+ params: params
343
+ });
344
+ this.historyChange(history);
266
345
  this.setState({
267
346
  loading: false,
268
- images: result.imageList
347
+ hisCursor: history.length - 1
269
348
  });
270
349
  return [3
271
350
  /*break*/
@@ -289,29 +368,207 @@ function (_super) {
289
368
  });
290
369
  };
291
370
 
292
- _this.getImageList = function (images) {
293
- var columnNum = _this.getColumnNum(images.length);
371
+ _this.onRegenerate = function () {
372
+ return __awaiter(_this, void 0, void 0, function () {
373
+ var _a, history, hisCursor, params, result, e_2;
374
+
375
+ return __generator(this, function (_b) {
376
+ switch (_b.label) {
377
+ case 0:
378
+ _a = this.state, history = _a.history, hisCursor = _a.hisCursor;
379
+ params = history[hisCursor].params;
380
+ _b.label = 1;
381
+
382
+ case 1:
383
+ _b.trys.push([1, 3,, 4]);
384
+
385
+ this.setState({
386
+ loading: true
387
+ });
388
+ return [4
389
+ /*yield*/
390
+ , (0, _commonUtil.commonFetch)('/designer/v1/ai/create-image', params, 'POST')];
391
+
392
+ case 2:
393
+ result = _b.sent();
394
+ history[hisCursor] = {
395
+ images: result.imageList,
396
+ params: params
397
+ };
398
+ this.historyChange(history);
399
+ this.setState({
400
+ loading: false
401
+ });
402
+ return [3
403
+ /*break*/
404
+ , 4];
405
+
406
+ case 3:
407
+ e_2 = _b.sent();
408
+ this.setState({
409
+ loading: false
410
+ });
411
+ return [3
412
+ /*break*/
413
+ , 4];
414
+
415
+ case 4:
416
+ return [2
417
+ /*return*/
418
+ ];
419
+ }
420
+ });
421
+ });
422
+ };
294
423
 
295
- return images.map(function (img) {
424
+ _this.getImageList = function (images) {
425
+ var selected = _this.state.selected;
426
+ return images.map(function (img, index) {
296
427
  return /*#__PURE__*/_react["default"].createElement("div", {
297
- className: "aiImageWrap" + columnNum
428
+ className: "aiImageItem"
298
429
  }, /*#__PURE__*/_react["default"].createElement("img", {
299
430
  alt: "",
300
431
  src: img
301
- }));
432
+ }), /*#__PURE__*/_react["default"].createElement("div", {
433
+ className: "imgHandleBtnWrap"
434
+ }, /*#__PURE__*/_react["default"].createElement("div", {
435
+ className: "refreshBtnWrap"
436
+ }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
437
+ color: "#232F46",
438
+ onClick: function onClick() {
439
+ return _this.onRefresh(index);
440
+ },
441
+ size: 16,
442
+ type: "icon-refresh"
443
+ })), /*#__PURE__*/_react["default"].createElement("div", {
444
+ className: "downloadBtnWrap"
445
+ }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
446
+ color: "#232F46",
447
+ onClick: function onClick() {
448
+ return _this.onDownload(index);
449
+ },
450
+ size: 16,
451
+ type: "icon-download1"
452
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
453
+ className: "imgSelectBtnWrap"
454
+ }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
455
+ color: "#2F54EB",
456
+ onClick: function onClick() {
457
+ return _this.onSelectClick(index);
458
+ },
459
+ size: 22,
460
+ style: {
461
+ cursor: 'pointer'
462
+ },
463
+ type: selected.includes(index) ? 'icon-select1' : 'icon-uncheck'
464
+ })));
302
465
  });
303
466
  };
304
467
 
305
- return _this;
306
- }
468
+ _this.onRefresh = function (index) {
469
+ return __awaiter(_this, void 0, void 0, function () {
470
+ var _a, history, hisCursor, _b, images, params, result, e_3;
307
471
 
308
- AiImageGenerator.prototype.componentDidMount = function () {
309
- var _this = this;
472
+ return __generator(this, function (_c) {
473
+ switch (_c.label) {
474
+ case 0:
475
+ _a = this.state, history = _a.history, hisCursor = _a.hisCursor;
476
+ _b = history[hisCursor], images = _b.images, params = _b.params;
477
+ _c.label = 1;
478
+
479
+ case 1:
480
+ _c.trys.push([1, 3,, 4]);
481
+
482
+ this.setState({
483
+ loading: true
484
+ });
485
+ return [4
486
+ /*yield*/
487
+ , (0, _commonUtil.commonFetch)('/designer/v1/ai/create-image', __assign(__assign({}, params), {
488
+ n: 1
489
+ }), 'POST')];
490
+
491
+ case 2:
492
+ result = _c.sent();
493
+ images[index] = result.imageList[0];
494
+ this.historyChange(history);
495
+ this.setState({
496
+ loading: false
497
+ });
498
+ return [3
499
+ /*break*/
500
+ , 4];
501
+
502
+ case 3:
503
+ e_3 = _c.sent();
504
+ this.setState({
505
+ loading: false
506
+ });
507
+ return [3
508
+ /*break*/
509
+ , 4];
510
+
511
+ case 4:
512
+ return [2
513
+ /*return*/
514
+ ];
515
+ }
516
+ });
517
+ });
518
+ };
519
+
520
+ _this.onDownload = function (index) {
521
+ var _a = _this.state,
522
+ prompt = _a.prompt,
523
+ history = _a.history,
524
+ hisCursor = _a.hisCursor;
525
+ var images = history[hisCursor].images;
526
+ (0, _commonUtil.downloadBase64Image)(images[index], prompt + ".png");
527
+ };
528
+
529
+ _this.onSelectClick = function (index) {
530
+ var selected = _this.state.selected;
531
+ var single = _this.props.single; // 单选模式下,智能选中一个
532
+
533
+ if (single) {
534
+ _this.setState({
535
+ selected: [index]
536
+ });
537
+
538
+ return;
539
+ } // 多选模式,可以选择多个
540
+
541
+
542
+ if (selected.includes(index)) {
543
+ var newSelected = selected.filter(function (sel) {
544
+ return sel !== index;
545
+ });
546
+
547
+ _this.setState({
548
+ selected: newSelected
549
+ });
550
+ } else {
551
+ selected.push(index);
552
+
553
+ _this.setState({
554
+ selected: selected
555
+ });
556
+ }
557
+ };
310
558
 
311
- this.destory = (0, _mobx.autorun)(function () {
559
+ _this.onHistoryClick = function (index) {
312
560
  _this.setState({
313
- visible: _mobx.store.imgGenVisible
561
+ hisCursor: index
314
562
  });
563
+ };
564
+
565
+ return _this;
566
+ }
567
+
568
+ AiImageGenerator.prototype.componentDidMount = function () {
569
+ var history = (0, _storeUtil.getSessionStore)(_constants.STORAGE_KEY.FONIXTREE_AI_IMG_HIS) || [];
570
+ this.setState({
571
+ history: history
315
572
  });
316
573
  };
317
574
 
@@ -320,10 +577,15 @@ function (_super) {
320
577
  };
321
578
 
322
579
  AiImageGenerator.prototype.render = function () {
323
- var _a = this.state,
324
- visible = _a.visible,
325
- images = _a.images,
326
- loading = _a.loading;
580
+ var _a;
581
+
582
+ var _b = this.state,
583
+ loading = _b.loading,
584
+ history = _b.history,
585
+ hisCursor = _b.hisCursor;
586
+ var visible = this.props.visible;
587
+ var images = ((_a = history[hisCursor]) === null || _a === void 0 ? void 0 : _a.images) || [];
588
+ var columnNum = this.getColumnNum(images.length || []);
327
589
  return /*#__PURE__*/_react["default"].createElement(_antd.Drawer, {
328
590
  bodyStyle: {
329
591
  padding: 16,
@@ -349,6 +611,7 @@ function (_super) {
349
611
  type: "light"
350
612
  }, "Cancel"), /*#__PURE__*/_react["default"].createElement(_common.Button, {
351
613
  className: "ml8",
614
+ onClick: this.onConfirm,
352
615
  size: "small",
353
616
  type: "primary"
354
617
  }, "Confirm"))),
@@ -404,19 +667,24 @@ function (_super) {
404
667
  })))), /*#__PURE__*/_react["default"].createElement("div", {
405
668
  className: "middle_wrap"
406
669
  }, /*#__PURE__*/_react["default"].createElement("div", {
407
- className: "img_wrap"
408
- }, images.length > 0 ? this.getImageList(images) : /*#__PURE__*/_react["default"].createElement("img", {
670
+ className: "img_wrap",
671
+ style: {
672
+ gridTemplateColumns: "repeat(" + columnNum + ", 1fr)",
673
+ gridTemplateRows: "repeat(" + columnNum + ", 1fr)"
674
+ }
675
+ }, images.length > 0 ? this.getImageList(images) : /*#__PURE__*/_react["default"].createElement("div", {
676
+ className: "noDataWrap"
677
+ }, /*#__PURE__*/_react["default"].createElement("img", {
409
678
  alt: "",
410
679
  className: "no_data",
411
680
  src: _nodata["default"]
412
- }), /*#__PURE__*/_react["default"].createElement("div", null)), /*#__PURE__*/_react["default"].createElement("div", {
681
+ })), /*#__PURE__*/_react["default"].createElement("div", null)), /*#__PURE__*/_react["default"].createElement("div", {
413
682
  className: "btn_wrap"
414
683
  }, /*#__PURE__*/_react["default"].createElement("div", {
415
684
  className: "regenerate_btn",
416
- onClick: this.onRegenarate
685
+ onClick: this.onRegenerate
417
686
  }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
418
687
  color: "#232F46",
419
- onClick: this.onCloseDrawer,
420
688
  size: 16,
421
689
  style: {
422
690
  marginRight: 5
@@ -428,20 +696,12 @@ function (_super) {
428
696
  enterButton: "Generate",
429
697
  onSearch: this.onGenarate,
430
698
  size: "large"
431
- }))), /*#__PURE__*/_react["default"].createElement("div", {
432
- className: "right_wrap"
433
- }, /*#__PURE__*/_react["default"].createElement("div", {
434
- className: "right_header"
435
- }, /*#__PURE__*/_react["default"].createElement("div", {
436
- className: "title"
437
- }, "History"), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
438
- onClick: this.onHisConfigClick,
439
- size: 20,
440
- style: {
441
- cursor: 'pointer'
442
- },
443
- type: "icon-setting1"
444
- }))))));
699
+ }))), /*#__PURE__*/_react["default"].createElement(_History["default"], {
700
+ onChange: this.historyChange,
701
+ onClick: this.onHistoryClick,
702
+ selectIndex: hisCursor,
703
+ source: history
704
+ }))));
445
705
  };
446
706
 
447
707
  return AiImageGenerator;
@@ -27,46 +27,74 @@
27
27
  position: relative;
28
28
  .img_wrap {
29
29
  width: 492px;
30
- height: 100%;
31
- display: flex;
32
- flex-wrap: wrap;
33
- align-items: center;
34
- justify-content: center;
35
- .aiImageWrap1 {
36
- height: 492px;
37
- width: 492px;
38
- }
39
- .aiImageWrap2 {
40
- height: 240px;
41
- width: 240px;
42
- margin-bottom: 12px;
43
- margin-left: 12px;
44
- &:nth-child(2n - 1) {
45
- margin-left: 0;
46
- }
30
+ height: 492px;
31
+ display: grid;
32
+ grid-template-columns: repeat(2, 1fr);
33
+ grid-template-rows: repeat(2, 1fr);
34
+ grid-gap: 12px;
35
+ margin: 0 auto;
36
+
37
+ .aiImageItem {
38
+ position: relative;
39
+ background-color: #ccc;
40
+ display: flex;
41
+ align-items: center;
42
+ justify-content: center;
43
+ font-size: 24px;
47
44
  img {
48
- max-width: 100%;
45
+ width: 100%;
49
46
  }
50
- }
51
-
52
- .aiImageWrap3 {
53
- height: 156px;
54
- width: 156px;
55
- margin-bottom: 12px;
56
- margin-bottom: 12px;
57
- margin-left: 12px;
58
- &:nth-child(3n + 1) {
59
- margin-left: 0;
47
+ .imgHandleBtnWrap {
48
+ display: flex;
49
+ position: absolute;
50
+ bottom: 12px;
51
+ right: 12px;
52
+ .refreshBtnWrap {
53
+ background-color: #FFF;
54
+ cursor: pointer;
55
+ height: 28px;
56
+ width: 28px;
57
+ display: flex;
58
+ align-items: center;
59
+ justify-content: center;
60
+ border-radius: 50%;
61
+ border: 1px solid #D2D9E5;
62
+ }
63
+ .downloadBtnWrap {
64
+ background-color: #FFF;
65
+ cursor: pointer;
66
+ height: 28px;
67
+ width: 28px;
68
+ display: flex;
69
+ align-items: center;
70
+ justify-content: center;
71
+ margin-left: 12px;
72
+ border-radius: 50%;
73
+ border: 1px solid #D2D9E5;
74
+ }
60
75
  }
61
- img {
62
- max-width: 100%;
76
+ .imgSelectBtnWrap {
77
+ position: absolute;
78
+ top: 12px;
79
+ right: 12px;
80
+ border-radius: 50%;
81
+ height: 22px;
82
+ display: flex;
83
+ background: #FFF;
63
84
  }
64
85
  }
65
-
66
- .no_data {
67
- height: 183px;
68
- width: 212px;
86
+ .noDataWrap {
87
+ width: 100%;
88
+ height: 100%;
89
+ display: flex;
90
+ align-items: center;
91
+ justify-content: center;
92
+ .no_data {
93
+ height: 183px;
94
+ width: 212px;
95
+ }
69
96
  }
97
+
70
98
  }
71
99
  .btn_wrap {
72
100
  margin-top: 40px;
@@ -19,10 +19,10 @@ var _CopyBtn = _interopRequireDefault(require("./components/CopyBtn"));
19
19
 
20
20
  var _common = require("../../../common");
21
21
 
22
- var _mobx = require("../../../mobx");
23
-
24
22
  var _FonixtreeGpt = _interopRequireDefault(require("../FonixtreeGpt"));
25
23
 
24
+ var _AiImageGenerator = _interopRequireDefault(require("../AiImageGenerator"));
25
+
26
26
  require("./index.less");
27
27
 
28
28
  require("./markdown.less");
@@ -71,12 +71,13 @@ function (_super) {
71
71
  open: false,
72
72
  message: '',
73
73
  context: [],
74
- isGenerating: false
74
+ isGenerating: false,
75
+ aiImageVisible: false
75
76
  };
76
77
 
77
78
  _this.scrollBottom = function () {
78
79
  var container = document.getElementById('content_wrap');
79
- container.scrollTop = container.scrollHeight;
80
+ container.scrollTop = container.scrollHeight + 50;
80
81
  };
81
82
 
82
83
  _this.onMessageChage = function (e) {
@@ -105,6 +106,8 @@ function (_super) {
105
106
  isGenerating: true,
106
107
  context: context,
107
108
  message: ''
109
+ }, function () {
110
+ _this.scrollBottom();
108
111
  });
109
112
  };
110
113
 
@@ -139,8 +142,8 @@ function (_super) {
139
142
  open: false
140
143
  });
141
144
 
142
- _mobx.store.setState({
143
- imgGenVisible: true
145
+ _this.setState({
146
+ aiImageVisible: true
144
147
  });
145
148
  };
146
149
 
@@ -169,7 +172,6 @@ function (_super) {
169
172
  }
170
173
 
171
174
  ChatRobot.prototype.componentDidMount = function () {
172
- this.chatGpt.initChatGpt();
173
175
  var context = this.chatGpt.getContext();
174
176
  this.setState({
175
177
  context: context
@@ -183,7 +185,8 @@ function (_super) {
183
185
  context = _a.context,
184
186
  message = _a.message,
185
187
  open = _a.open,
186
- isGenerating = _a.isGenerating;
188
+ isGenerating = _a.isGenerating,
189
+ aiImageVisible = _a.aiImageVisible;
187
190
  return /*#__PURE__*/_react["default"].createElement("div", {
188
191
  className: "chat_wrap"
189
192
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -296,7 +299,19 @@ function (_super) {
296
299
  marginRight: 5
297
300
  },
298
301
  type: "icon-refresh"
299
- }), "Regenerate Response"))));
302
+ }), "Regenerate Response"))), /*#__PURE__*/_react["default"].createElement(_AiImageGenerator["default"], {
303
+ onClose: function onClose() {
304
+ return _this.setState({
305
+ aiImageVisible: false
306
+ });
307
+ },
308
+ onConfirm: function onConfirm() {
309
+ return _this.setState({
310
+ aiImageVisible: false
311
+ });
312
+ },
313
+ visible: aiImageVisible
314
+ }));
300
315
  };
301
316
 
302
317
  return ChatRobot;
@@ -89,6 +89,9 @@
89
89
  padding: 7px 14px;
90
90
  background: #F5F6F7;
91
91
  color: #232F46;
92
+ p {
93
+ margin-bottom: 0;
94
+ }
92
95
  }
93
96
  }
94
97
  .regenerate_btn {