eoss-ui 0.6.51 → 0.6.53
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/lib/button-group.js +58 -55
- package/lib/button.js +58 -55
- package/lib/checkbox-group.js +61 -58
- package/lib/data-table-form.js +58 -55
- package/lib/data-table.js +65 -62
- package/lib/date-picker.js +58 -55
- package/lib/dialog.js +58 -55
- package/lib/eoss-ui.common.js +422 -335
- package/lib/flow-group.js +58 -55
- package/lib/flow-list.js +87 -61
- package/lib/flow.js +187 -144
- package/lib/form.js +62 -59
- package/lib/handle-user.js +58 -55
- package/lib/handler.js +58 -55
- package/lib/icon.js +58 -55
- package/lib/index.js +1 -1
- package/lib/input-number.js +58 -55
- package/lib/input.js +59 -56
- package/lib/login.js +61 -58
- package/lib/main.js +126 -103
- package/lib/menu.js +1 -1
- package/lib/nav.js +61 -58
- package/lib/page.js +58 -55
- package/lib/pagination.js +58 -55
- package/lib/player.js +58 -55
- package/lib/qr-code.js +58 -55
- package/lib/radio-group.js +61 -58
- package/lib/retrial-auth.js +58 -55
- package/lib/select-ganged.js +59 -56
- package/lib/select.js +61 -57
- package/lib/selector-panel.js +61 -58
- package/lib/selector.js +58 -55
- package/lib/sizer.js +58 -55
- package/lib/steps.js +61 -58
- package/lib/switch.js +58 -55
- package/lib/table-form.js +58 -55
- package/lib/tabs.js +58 -55
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/upload.css +1 -1
- package/lib/tips.js +61 -58
- package/lib/tree-group.js +58 -55
- package/lib/tree.js +61 -58
- package/lib/upload.js +72 -69
- package/lib/utils/util.js +54 -51
- package/lib/wujie.js +58 -55
- package/lib/wxlogin.js +58 -55
- package/package.json +2 -2
- package/packages/checkbox-group/src/main.vue +2 -2
- package/packages/data-table/src/main.vue +3 -3
- package/packages/flow/src/reset.vue +4 -6
- package/packages/flow/src/startTaskRead.vue +180 -136
- package/packages/flow-list/src/main.vue +25 -2
- package/packages/form/src/main.vue +3 -3
- package/packages/input/src/main.vue +2 -2
- package/packages/login/src/main.vue +2 -2
- package/packages/main/src/default/index.vue +7 -1
- package/packages/main/src/main.vue +4 -1
- package/packages/main/src/public/search.vue +8 -3
- package/packages/main/src/simplicity/apps.vue +2 -2
- package/packages/main/src/simplicity/index.vue +3 -3
- package/packages/main/src/simplicity/user.vue +2 -2
- package/packages/menu/src/main.vue +2 -2
- package/packages/nav/src/main.vue +2 -2
- package/packages/radio-group/src/main.vue +2 -2
- package/packages/select/src/main.vue +4 -3
- package/packages/select-ganged/src/main.vue +2 -2
- package/packages/selector-panel/src/main.vue +2 -2
- package/packages/steps/src/main.vue +2 -2
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/upload.css +1 -1
- package/packages/theme-chalk/src/upload.scss +1 -0
- package/packages/tips/src/main.vue +2 -2
- package/packages/tree/src/main.vue +2 -2
- package/packages/upload/src/main.vue +18 -10
- package/src/index.js +1 -1
- package/src/utils/util.js +15 -12
package/lib/utils/util.js
CHANGED
|
@@ -509,61 +509,64 @@ var ajaxStream = function ajaxStream(_ref2) {
|
|
|
509
509
|
if (line === '') {
|
|
510
510
|
return;
|
|
511
511
|
}
|
|
512
|
-
if (line.startsWith('data:')) {
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
512
|
+
// if (line.startsWith('data:')) {
|
|
513
|
+
var data = line.startsWith('data:') ? line.replace('data:', '').trim() : line.trim();
|
|
514
|
+
if (data) {
|
|
515
|
+
try {
|
|
516
|
+
// 假设数据是 JSON 格式
|
|
517
|
+
var parsedData = JSON.parse(data);
|
|
518
|
+
info.time = parsedData.time;
|
|
519
|
+
info.conversationId = parsedData.conversationId;
|
|
520
|
+
var thinkRegex = /<think>([\s\S]*?)<\/think>([\s\S]*)?/;
|
|
521
|
+
var match = parsedData.message.match(thinkRegex);
|
|
522
|
+
if (match) {
|
|
523
|
+
var thinkContent = match[1] ? match[1].trim() : ''; // <think> 标签内的数据
|
|
524
|
+
var content = match[2] ? match[2].trim() : ''; // <think> 标签后的数据
|
|
525
|
+
// 更新 AI 消息内容
|
|
526
|
+
info.thinkContent += thinkContent;
|
|
527
|
+
info.content += content;
|
|
528
|
+
} else {
|
|
529
|
+
var startRegex = /<think>([\s\S]*)/;
|
|
530
|
+
var endRegex = /([\s\S]*?)<\/think>([\s\S]*)?/;
|
|
531
|
+
var start = parsedData.message.match(startRegex);
|
|
532
|
+
var end = parsedData.message.match(endRegex);
|
|
533
|
+
if (start) {
|
|
534
|
+
hasThink = true;
|
|
535
|
+
var _thinkContent = start[1] ? start[1].trim() : ''; // <think> 标签内的数据
|
|
536
|
+
info.thinkContent += _thinkContent;
|
|
537
|
+
} else if (hasThink === false) {
|
|
538
|
+
info.content += parsedData.message;
|
|
539
|
+
chunks += parsedData.message;
|
|
528
540
|
} else {
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
} else if (
|
|
541
|
+
if (end) {
|
|
542
|
+
finishThink = true;
|
|
543
|
+
var _thinkContent2 = end[1] ? end[1].trim() : ''; // <think> 标签后的数据
|
|
544
|
+
var _content = end[2] ? end[2].trim() : '';
|
|
545
|
+
// 更新 AI 消息内容
|
|
546
|
+
info.thinkContent += _thinkContent2;
|
|
547
|
+
info.content += _content;
|
|
548
|
+
chunks += _content;
|
|
549
|
+
} else if (finishThink) {
|
|
538
550
|
info.content += parsedData.message;
|
|
539
551
|
chunks += parsedData.message;
|
|
540
552
|
} else {
|
|
541
|
-
|
|
542
|
-
finishThink = true;
|
|
543
|
-
var _thinkContent2 = end[1] ? end[1].trim() : ''; // <think> 标签后的数据
|
|
544
|
-
var _content = end[2] ? end[2].trim() : '';
|
|
545
|
-
// 更新 AI 消息内容
|
|
546
|
-
info.thinkContent += _thinkContent2;
|
|
547
|
-
info.content += _content;
|
|
548
|
-
chunks += _content;
|
|
549
|
-
} else if (finishThink) {
|
|
550
|
-
info.content += parsedData.message;
|
|
551
|
-
chunks += parsedData.message;
|
|
552
|
-
} else {
|
|
553
|
-
info.thinkContent += parsedData.message;
|
|
554
|
-
}
|
|
553
|
+
info.thinkContent += parsedData.message;
|
|
555
554
|
}
|
|
556
555
|
}
|
|
557
|
-
primeval += parsedData.message;
|
|
558
|
-
done = parsedData.done;
|
|
559
|
-
} catch (parseError) {
|
|
560
|
-
console.error('解析数据出错:', parseError);
|
|
561
556
|
}
|
|
557
|
+
primeval += parsedData.message;
|
|
558
|
+
done = parsedData.done;
|
|
559
|
+
} catch (parseError) {
|
|
560
|
+
remainingData += line;
|
|
561
|
+
console.log('解析数据出错:', parseError);
|
|
562
562
|
}
|
|
563
|
-
} else {
|
|
564
|
-
// 保存未处理完的部分数据
|
|
565
|
-
remainingData += line + '\n';
|
|
566
563
|
}
|
|
564
|
+
// }
|
|
565
|
+
// else {
|
|
566
|
+
// console.log('未处理的数据:', line);
|
|
567
|
+
// // 保存未处理完的部分数据
|
|
568
|
+
// remainingData += line.replace('data:', '\ndata:');
|
|
569
|
+
// }
|
|
567
570
|
});
|
|
568
571
|
info.primeval = primeval;
|
|
569
572
|
info.chunk = chunks;
|
|
@@ -572,7 +575,7 @@ var ajaxStream = function ajaxStream(_ref2) {
|
|
|
572
575
|
partialData = remainingData;
|
|
573
576
|
progress && progress({ message: info, controller: controller, done: done });
|
|
574
577
|
}
|
|
575
|
-
})).then(function () {
|
|
578
|
+
})).then(function (results) {
|
|
576
579
|
// 处理请求完成后的信息
|
|
577
580
|
var originalText = info.content;
|
|
578
581
|
var regex = /<think>([\s\S]*?)<\/think>([\s\S]*)/;
|
|
@@ -581,8 +584,8 @@ var ajaxStream = function ajaxStream(_ref2) {
|
|
|
581
584
|
info.thinkContent = match ? match[1].trim() : '';
|
|
582
585
|
info.content = match ? match[2].trim() : '';
|
|
583
586
|
}
|
|
584
|
-
success && success({ message: info, controller: controller });
|
|
585
|
-
}).catch(function () {
|
|
587
|
+
success && success({ message: info, controller: controller, results: results });
|
|
588
|
+
}).catch(function (results) {
|
|
586
589
|
// 处理请求完成后的信息
|
|
587
590
|
var originalText = info.content || '';
|
|
588
591
|
var regex = /<think>([\s\S]*?)<\/think>([\s\S]*)/;
|
|
@@ -591,7 +594,7 @@ var ajaxStream = function ajaxStream(_ref2) {
|
|
|
591
594
|
info.thinkContent = match ? match[1].trim() : '';
|
|
592
595
|
info.content = match ? match[2].trim() : '';
|
|
593
596
|
}
|
|
594
|
-
fail && fail({ status: 1, message: info, controller: controller });
|
|
597
|
+
fail && fail({ status: 1, message: info, controller: controller, results: results });
|
|
595
598
|
});
|
|
596
599
|
} catch (error) {
|
|
597
600
|
console.error('聊天请求出错:', error);
|
|
@@ -688,7 +691,7 @@ var busEmit = function busEmit(that, _ref3) {
|
|
|
688
691
|
|
|
689
692
|
var bus = win.$wujie ? win.$wujie.bus : that ? that.bus || that.$root.Bus : null;
|
|
690
693
|
if (bus) {
|
|
691
|
-
bus.$emit(method, args);
|
|
694
|
+
Array.isArray(args) ? bus.$emit.apply(bus, [method].concat(args)) : bus.$emit(method, args);
|
|
692
695
|
} else {
|
|
693
696
|
win.parent.postMessage({ method: method, query: args }, '*');
|
|
694
697
|
}
|
package/lib/wujie.js
CHANGED
|
@@ -115,8 +115,8 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
|
|
|
115
115
|
**/
|
|
116
116
|
|
|
117
117
|
/* eslint-disable indent */
|
|
118
|
-
var sm2 = __webpack_require__(
|
|
119
|
-
var lodash = __webpack_require__(
|
|
118
|
+
var sm2 = __webpack_require__(11).sm2;
|
|
119
|
+
var lodash = __webpack_require__(10);
|
|
120
120
|
|
|
121
121
|
|
|
122
122
|
|
|
@@ -592,61 +592,64 @@ var ajaxStream = function ajaxStream(_ref2) {
|
|
|
592
592
|
if (line === '') {
|
|
593
593
|
return;
|
|
594
594
|
}
|
|
595
|
-
if (line.startsWith('data:')) {
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
595
|
+
// if (line.startsWith('data:')) {
|
|
596
|
+
var data = line.startsWith('data:') ? line.replace('data:', '').trim() : line.trim();
|
|
597
|
+
if (data) {
|
|
598
|
+
try {
|
|
599
|
+
// 假设数据是 JSON 格式
|
|
600
|
+
var parsedData = JSON.parse(data);
|
|
601
|
+
info.time = parsedData.time;
|
|
602
|
+
info.conversationId = parsedData.conversationId;
|
|
603
|
+
var thinkRegex = /<think>([\s\S]*?)<\/think>([\s\S]*)?/;
|
|
604
|
+
var match = parsedData.message.match(thinkRegex);
|
|
605
|
+
if (match) {
|
|
606
|
+
var thinkContent = match[1] ? match[1].trim() : ''; // <think> 标签内的数据
|
|
607
|
+
var content = match[2] ? match[2].trim() : ''; // <think> 标签后的数据
|
|
608
|
+
// 更新 AI 消息内容
|
|
609
|
+
info.thinkContent += thinkContent;
|
|
610
|
+
info.content += content;
|
|
611
|
+
} else {
|
|
612
|
+
var startRegex = /<think>([\s\S]*)/;
|
|
613
|
+
var endRegex = /([\s\S]*?)<\/think>([\s\S]*)?/;
|
|
614
|
+
var start = parsedData.message.match(startRegex);
|
|
615
|
+
var end = parsedData.message.match(endRegex);
|
|
616
|
+
if (start) {
|
|
617
|
+
hasThink = true;
|
|
618
|
+
var _thinkContent = start[1] ? start[1].trim() : ''; // <think> 标签内的数据
|
|
619
|
+
info.thinkContent += _thinkContent;
|
|
620
|
+
} else if (hasThink === false) {
|
|
621
|
+
info.content += parsedData.message;
|
|
622
|
+
chunks += parsedData.message;
|
|
611
623
|
} else {
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
} else if (
|
|
624
|
+
if (end) {
|
|
625
|
+
finishThink = true;
|
|
626
|
+
var _thinkContent2 = end[1] ? end[1].trim() : ''; // <think> 标签后的数据
|
|
627
|
+
var _content = end[2] ? end[2].trim() : '';
|
|
628
|
+
// 更新 AI 消息内容
|
|
629
|
+
info.thinkContent += _thinkContent2;
|
|
630
|
+
info.content += _content;
|
|
631
|
+
chunks += _content;
|
|
632
|
+
} else if (finishThink) {
|
|
621
633
|
info.content += parsedData.message;
|
|
622
634
|
chunks += parsedData.message;
|
|
623
635
|
} else {
|
|
624
|
-
|
|
625
|
-
finishThink = true;
|
|
626
|
-
var _thinkContent2 = end[1] ? end[1].trim() : ''; // <think> 标签后的数据
|
|
627
|
-
var _content = end[2] ? end[2].trim() : '';
|
|
628
|
-
// 更新 AI 消息内容
|
|
629
|
-
info.thinkContent += _thinkContent2;
|
|
630
|
-
info.content += _content;
|
|
631
|
-
chunks += _content;
|
|
632
|
-
} else if (finishThink) {
|
|
633
|
-
info.content += parsedData.message;
|
|
634
|
-
chunks += parsedData.message;
|
|
635
|
-
} else {
|
|
636
|
-
info.thinkContent += parsedData.message;
|
|
637
|
-
}
|
|
636
|
+
info.thinkContent += parsedData.message;
|
|
638
637
|
}
|
|
639
638
|
}
|
|
640
|
-
primeval += parsedData.message;
|
|
641
|
-
done = parsedData.done;
|
|
642
|
-
} catch (parseError) {
|
|
643
|
-
console.error('解析数据出错:', parseError);
|
|
644
639
|
}
|
|
640
|
+
primeval += parsedData.message;
|
|
641
|
+
done = parsedData.done;
|
|
642
|
+
} catch (parseError) {
|
|
643
|
+
remainingData += line;
|
|
644
|
+
console.log('解析数据出错:', parseError);
|
|
645
645
|
}
|
|
646
|
-
} else {
|
|
647
|
-
// 保存未处理完的部分数据
|
|
648
|
-
remainingData += line + '\n';
|
|
649
646
|
}
|
|
647
|
+
// }
|
|
648
|
+
// else {
|
|
649
|
+
// console.log('未处理的数据:', line);
|
|
650
|
+
// // 保存未处理完的部分数据
|
|
651
|
+
// remainingData += line.replace('data:', '\ndata:');
|
|
652
|
+
// }
|
|
650
653
|
});
|
|
651
654
|
info.primeval = primeval;
|
|
652
655
|
info.chunk = chunks;
|
|
@@ -655,7 +658,7 @@ var ajaxStream = function ajaxStream(_ref2) {
|
|
|
655
658
|
partialData = remainingData;
|
|
656
659
|
progress && progress({ message: info, controller: controller, done: done });
|
|
657
660
|
}
|
|
658
|
-
})).then(function () {
|
|
661
|
+
})).then(function (results) {
|
|
659
662
|
// 处理请求完成后的信息
|
|
660
663
|
var originalText = info.content;
|
|
661
664
|
var regex = /<think>([\s\S]*?)<\/think>([\s\S]*)/;
|
|
@@ -664,8 +667,8 @@ var ajaxStream = function ajaxStream(_ref2) {
|
|
|
664
667
|
info.thinkContent = match ? match[1].trim() : '';
|
|
665
668
|
info.content = match ? match[2].trim() : '';
|
|
666
669
|
}
|
|
667
|
-
success && success({ message: info, controller: controller });
|
|
668
|
-
}).catch(function () {
|
|
670
|
+
success && success({ message: info, controller: controller, results: results });
|
|
671
|
+
}).catch(function (results) {
|
|
669
672
|
// 处理请求完成后的信息
|
|
670
673
|
var originalText = info.content || '';
|
|
671
674
|
var regex = /<think>([\s\S]*?)<\/think>([\s\S]*)/;
|
|
@@ -674,7 +677,7 @@ var ajaxStream = function ajaxStream(_ref2) {
|
|
|
674
677
|
info.thinkContent = match ? match[1].trim() : '';
|
|
675
678
|
info.content = match ? match[2].trim() : '';
|
|
676
679
|
}
|
|
677
|
-
fail && fail({ status: 1, message: info, controller: controller });
|
|
680
|
+
fail && fail({ status: 1, message: info, controller: controller, results: results });
|
|
678
681
|
});
|
|
679
682
|
} catch (error) {
|
|
680
683
|
console.error('聊天请求出错:', error);
|
|
@@ -771,7 +774,7 @@ var busEmit = function busEmit(that, _ref3) {
|
|
|
771
774
|
|
|
772
775
|
var bus = win.$wujie ? win.$wujie.bus : that ? that.bus || that.$root.Bus : null;
|
|
773
776
|
if (bus) {
|
|
774
|
-
bus.$emit(method, args);
|
|
777
|
+
Array.isArray(args) ? bus.$emit.apply(bus, [method].concat(args)) : bus.$emit(method, args);
|
|
775
778
|
} else {
|
|
776
779
|
win.parent.postMessage({ method: method, query: args }, '*');
|
|
777
780
|
}
|
|
@@ -3876,14 +3879,14 @@ var formContents = '/lowcode/admin/online/onlineForm/getOnlineFormFromCache';
|
|
|
3876
3879
|
/***/ 10:
|
|
3877
3880
|
/***/ (function(module, exports) {
|
|
3878
3881
|
|
|
3879
|
-
module.exports = require("
|
|
3882
|
+
module.exports = require("lodash");
|
|
3880
3883
|
|
|
3881
3884
|
/***/ }),
|
|
3882
3885
|
|
|
3883
3886
|
/***/ 11:
|
|
3884
3887
|
/***/ (function(module, exports) {
|
|
3885
3888
|
|
|
3886
|
-
module.exports = require("
|
|
3889
|
+
module.exports = require("sm-crypto");
|
|
3887
3890
|
|
|
3888
3891
|
/***/ }),
|
|
3889
3892
|
|
package/lib/wxlogin.js
CHANGED
|
@@ -115,8 +115,8 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
|
|
|
115
115
|
**/
|
|
116
116
|
|
|
117
117
|
/* eslint-disable indent */
|
|
118
|
-
var sm2 = __webpack_require__(
|
|
119
|
-
var lodash = __webpack_require__(
|
|
118
|
+
var sm2 = __webpack_require__(11).sm2;
|
|
119
|
+
var lodash = __webpack_require__(10);
|
|
120
120
|
|
|
121
121
|
|
|
122
122
|
|
|
@@ -592,61 +592,64 @@ var ajaxStream = function ajaxStream(_ref2) {
|
|
|
592
592
|
if (line === '') {
|
|
593
593
|
return;
|
|
594
594
|
}
|
|
595
|
-
if (line.startsWith('data:')) {
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
595
|
+
// if (line.startsWith('data:')) {
|
|
596
|
+
var data = line.startsWith('data:') ? line.replace('data:', '').trim() : line.trim();
|
|
597
|
+
if (data) {
|
|
598
|
+
try {
|
|
599
|
+
// 假设数据是 JSON 格式
|
|
600
|
+
var parsedData = JSON.parse(data);
|
|
601
|
+
info.time = parsedData.time;
|
|
602
|
+
info.conversationId = parsedData.conversationId;
|
|
603
|
+
var thinkRegex = /<think>([\s\S]*?)<\/think>([\s\S]*)?/;
|
|
604
|
+
var match = parsedData.message.match(thinkRegex);
|
|
605
|
+
if (match) {
|
|
606
|
+
var thinkContent = match[1] ? match[1].trim() : ''; // <think> 标签内的数据
|
|
607
|
+
var content = match[2] ? match[2].trim() : ''; // <think> 标签后的数据
|
|
608
|
+
// 更新 AI 消息内容
|
|
609
|
+
info.thinkContent += thinkContent;
|
|
610
|
+
info.content += content;
|
|
611
|
+
} else {
|
|
612
|
+
var startRegex = /<think>([\s\S]*)/;
|
|
613
|
+
var endRegex = /([\s\S]*?)<\/think>([\s\S]*)?/;
|
|
614
|
+
var start = parsedData.message.match(startRegex);
|
|
615
|
+
var end = parsedData.message.match(endRegex);
|
|
616
|
+
if (start) {
|
|
617
|
+
hasThink = true;
|
|
618
|
+
var _thinkContent = start[1] ? start[1].trim() : ''; // <think> 标签内的数据
|
|
619
|
+
info.thinkContent += _thinkContent;
|
|
620
|
+
} else if (hasThink === false) {
|
|
621
|
+
info.content += parsedData.message;
|
|
622
|
+
chunks += parsedData.message;
|
|
611
623
|
} else {
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
} else if (
|
|
624
|
+
if (end) {
|
|
625
|
+
finishThink = true;
|
|
626
|
+
var _thinkContent2 = end[1] ? end[1].trim() : ''; // <think> 标签后的数据
|
|
627
|
+
var _content = end[2] ? end[2].trim() : '';
|
|
628
|
+
// 更新 AI 消息内容
|
|
629
|
+
info.thinkContent += _thinkContent2;
|
|
630
|
+
info.content += _content;
|
|
631
|
+
chunks += _content;
|
|
632
|
+
} else if (finishThink) {
|
|
621
633
|
info.content += parsedData.message;
|
|
622
634
|
chunks += parsedData.message;
|
|
623
635
|
} else {
|
|
624
|
-
|
|
625
|
-
finishThink = true;
|
|
626
|
-
var _thinkContent2 = end[1] ? end[1].trim() : ''; // <think> 标签后的数据
|
|
627
|
-
var _content = end[2] ? end[2].trim() : '';
|
|
628
|
-
// 更新 AI 消息内容
|
|
629
|
-
info.thinkContent += _thinkContent2;
|
|
630
|
-
info.content += _content;
|
|
631
|
-
chunks += _content;
|
|
632
|
-
} else if (finishThink) {
|
|
633
|
-
info.content += parsedData.message;
|
|
634
|
-
chunks += parsedData.message;
|
|
635
|
-
} else {
|
|
636
|
-
info.thinkContent += parsedData.message;
|
|
637
|
-
}
|
|
636
|
+
info.thinkContent += parsedData.message;
|
|
638
637
|
}
|
|
639
638
|
}
|
|
640
|
-
primeval += parsedData.message;
|
|
641
|
-
done = parsedData.done;
|
|
642
|
-
} catch (parseError) {
|
|
643
|
-
console.error('解析数据出错:', parseError);
|
|
644
639
|
}
|
|
640
|
+
primeval += parsedData.message;
|
|
641
|
+
done = parsedData.done;
|
|
642
|
+
} catch (parseError) {
|
|
643
|
+
remainingData += line;
|
|
644
|
+
console.log('解析数据出错:', parseError);
|
|
645
645
|
}
|
|
646
|
-
} else {
|
|
647
|
-
// 保存未处理完的部分数据
|
|
648
|
-
remainingData += line + '\n';
|
|
649
646
|
}
|
|
647
|
+
// }
|
|
648
|
+
// else {
|
|
649
|
+
// console.log('未处理的数据:', line);
|
|
650
|
+
// // 保存未处理完的部分数据
|
|
651
|
+
// remainingData += line.replace('data:', '\ndata:');
|
|
652
|
+
// }
|
|
650
653
|
});
|
|
651
654
|
info.primeval = primeval;
|
|
652
655
|
info.chunk = chunks;
|
|
@@ -655,7 +658,7 @@ var ajaxStream = function ajaxStream(_ref2) {
|
|
|
655
658
|
partialData = remainingData;
|
|
656
659
|
progress && progress({ message: info, controller: controller, done: done });
|
|
657
660
|
}
|
|
658
|
-
})).then(function () {
|
|
661
|
+
})).then(function (results) {
|
|
659
662
|
// 处理请求完成后的信息
|
|
660
663
|
var originalText = info.content;
|
|
661
664
|
var regex = /<think>([\s\S]*?)<\/think>([\s\S]*)/;
|
|
@@ -664,8 +667,8 @@ var ajaxStream = function ajaxStream(_ref2) {
|
|
|
664
667
|
info.thinkContent = match ? match[1].trim() : '';
|
|
665
668
|
info.content = match ? match[2].trim() : '';
|
|
666
669
|
}
|
|
667
|
-
success && success({ message: info, controller: controller });
|
|
668
|
-
}).catch(function () {
|
|
670
|
+
success && success({ message: info, controller: controller, results: results });
|
|
671
|
+
}).catch(function (results) {
|
|
669
672
|
// 处理请求完成后的信息
|
|
670
673
|
var originalText = info.content || '';
|
|
671
674
|
var regex = /<think>([\s\S]*?)<\/think>([\s\S]*)/;
|
|
@@ -674,7 +677,7 @@ var ajaxStream = function ajaxStream(_ref2) {
|
|
|
674
677
|
info.thinkContent = match ? match[1].trim() : '';
|
|
675
678
|
info.content = match ? match[2].trim() : '';
|
|
676
679
|
}
|
|
677
|
-
fail && fail({ status: 1, message: info, controller: controller });
|
|
680
|
+
fail && fail({ status: 1, message: info, controller: controller, results: results });
|
|
678
681
|
});
|
|
679
682
|
} catch (error) {
|
|
680
683
|
console.error('聊天请求出错:', error);
|
|
@@ -771,7 +774,7 @@ var busEmit = function busEmit(that, _ref3) {
|
|
|
771
774
|
|
|
772
775
|
var bus = win.$wujie ? win.$wujie.bus : that ? that.bus || that.$root.Bus : null;
|
|
773
776
|
if (bus) {
|
|
774
|
-
bus.$emit(method, args);
|
|
777
|
+
Array.isArray(args) ? bus.$emit.apply(bus, [method].concat(args)) : bus.$emit(method, args);
|
|
775
778
|
} else {
|
|
776
779
|
win.parent.postMessage({ method: method, query: args }, '*');
|
|
777
780
|
}
|
|
@@ -3876,14 +3879,14 @@ var formContents = '/lowcode/admin/online/onlineForm/getOnlineFormFromCache';
|
|
|
3876
3879
|
/***/ 10:
|
|
3877
3880
|
/***/ (function(module, exports) {
|
|
3878
3881
|
|
|
3879
|
-
module.exports = require("
|
|
3882
|
+
module.exports = require("lodash");
|
|
3880
3883
|
|
|
3881
3884
|
/***/ }),
|
|
3882
3885
|
|
|
3883
3886
|
/***/ 11:
|
|
3884
3887
|
/***/ (function(module, exports) {
|
|
3885
3888
|
|
|
3886
|
-
module.exports = require("
|
|
3889
|
+
module.exports = require("sm-crypto");
|
|
3887
3890
|
|
|
3888
3891
|
/***/ }),
|
|
3889
3892
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eoss-ui",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.53",
|
|
4
4
|
"description": "eoss内部业务组件",
|
|
5
5
|
"main": "lib/eoss-ui.common.js",
|
|
6
6
|
"files": [
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"cp-cli": "^1.0.2",
|
|
99
99
|
"cross-env": "^3.1.3",
|
|
100
100
|
"css-loader": "^2.1.0",
|
|
101
|
-
"eoss-element": "^0.3.
|
|
101
|
+
"eoss-element": "^0.3.39",
|
|
102
102
|
"es6-promise": "^4.0.5",
|
|
103
103
|
"eslint": "4.18.2",
|
|
104
104
|
"eslint-config-elemefe": "0.1.1",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
|
|
56
56
|
<script>
|
|
57
57
|
import { findSysCode, getDictList } from 'eoss-ui/src/config/api.js';
|
|
58
|
-
import {
|
|
58
|
+
import { throttle } from 'throttle-debounce';
|
|
59
59
|
import store from 'eoss-ui/src/utils/store';
|
|
60
60
|
import util from 'eoss-ui/src/utils/util';
|
|
61
61
|
export default {
|
|
@@ -240,7 +240,7 @@ export default {
|
|
|
240
240
|
}
|
|
241
241
|
},
|
|
242
242
|
beforeCreate() {
|
|
243
|
-
this.getData =
|
|
243
|
+
this.getData = throttle(500, (url, sysCode) => {
|
|
244
244
|
this.getDatas(url, sysCode);
|
|
245
245
|
});
|
|
246
246
|
},
|
|
@@ -213,7 +213,7 @@ import {
|
|
|
213
213
|
getDictList,
|
|
214
214
|
formContents
|
|
215
215
|
} from 'eoss-ui/src/config/api.js';
|
|
216
|
-
import {
|
|
216
|
+
import { throttle } from 'throttle-debounce';
|
|
217
217
|
import children from './children.vue';
|
|
218
218
|
import sizer from './sizer.vue';
|
|
219
219
|
import util from 'eoss-ui/src/utils/util';
|
|
@@ -873,7 +873,7 @@ export default {
|
|
|
873
873
|
}
|
|
874
874
|
},
|
|
875
875
|
beforeCreate() {
|
|
876
|
-
this.getTableData =
|
|
876
|
+
this.getTableData = throttle(500, (res) => {
|
|
877
877
|
this.getTableDatas(res);
|
|
878
878
|
});
|
|
879
879
|
},
|
|
@@ -892,7 +892,7 @@ export default {
|
|
|
892
892
|
this.list.length && this.checkSelect(this.checked);
|
|
893
893
|
this.resetHeight();
|
|
894
894
|
if (util.win.top != util.win.self) {
|
|
895
|
-
util.win.onresize =
|
|
895
|
+
util.win.onresize = throttle(500, this.resetHeight);
|
|
896
896
|
}
|
|
897
897
|
},
|
|
898
898
|
methods: {
|
|
@@ -288,14 +288,14 @@ export default {
|
|
|
288
288
|
tabs: {
|
|
289
289
|
employee: {
|
|
290
290
|
param: {
|
|
291
|
-
filid: JSON.parse(
|
|
291
|
+
filid: JSON.parse(util.getStorage('mainConfig')).userModel
|
|
292
292
|
.orgId,
|
|
293
293
|
name: '本单位用户'
|
|
294
294
|
}
|
|
295
295
|
},
|
|
296
296
|
department: {
|
|
297
297
|
param: {
|
|
298
|
-
filid: JSON.parse(
|
|
298
|
+
filid: JSON.parse(util.getStorage('mainConfig')).userModel
|
|
299
299
|
.orgId
|
|
300
300
|
}
|
|
301
301
|
}
|
|
@@ -391,8 +391,7 @@ export default {
|
|
|
391
391
|
this.nextUserTabs = {
|
|
392
392
|
department: {
|
|
393
393
|
param: {
|
|
394
|
-
filid: JSON.parse(
|
|
395
|
-
.userModel.orgId
|
|
394
|
+
filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId
|
|
396
395
|
}
|
|
397
396
|
}
|
|
398
397
|
};
|
|
@@ -407,8 +406,7 @@ export default {
|
|
|
407
406
|
enterprise: { param: { filid: 'other' } },
|
|
408
407
|
department: {
|
|
409
408
|
param: {
|
|
410
|
-
filid: JSON.parse(
|
|
411
|
-
.userModel.orgId
|
|
409
|
+
filid: JSON.parse(util.getStorage('mainConfig')).userModel.orgId
|
|
412
410
|
}
|
|
413
411
|
}
|
|
414
412
|
};
|