@icos-react/largemodel 1.0.22 → 1.0.24
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.js +19 -15
- package/dist/index.mjs +19 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3473,16 +3473,15 @@ var createChatStyles = (width, height, padding = 0) => {
|
|
|
3473
3473
|
padding-left: 8px;
|
|
3474
3474
|
margin: 16px 0px 8px 0px;
|
|
3475
3475
|
|
|
3476
|
-
|
|
3476
|
+
p {
|
|
3477
3477
|
margin: 0;
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3478
|
+
font-size: inherit;
|
|
3479
|
+
line-height: inherit;
|
|
3480
|
+
color: inherit;
|
|
3481
3481
|
}
|
|
3482
3482
|
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
color: #ffffffad;
|
|
3483
|
+
* {
|
|
3484
|
+
color: inherit;
|
|
3486
3485
|
}
|
|
3487
3486
|
`,
|
|
3488
3487
|
LeftContainer: css`
|
|
@@ -4529,16 +4528,20 @@ var ThinkingContent = ({
|
|
|
4529
4528
|
}) => {
|
|
4530
4529
|
const useStyles5 = createChatStyles();
|
|
4531
4530
|
const { styles } = useStyles5();
|
|
4532
|
-
const [isExpanded, setIsExpanded] = (0, import_react20.useState)(
|
|
4531
|
+
const [isExpanded, setIsExpanded] = (0, import_react20.useState)(!!isAccumulatingThinking);
|
|
4533
4532
|
const prevAccumulatingRef = (0, import_react20.useRef)(isAccumulatingThinking);
|
|
4534
4533
|
(0, import_react20.useEffect)(() => {
|
|
4535
|
-
if (prevAccumulatingRef.current
|
|
4536
|
-
if (
|
|
4537
|
-
|
|
4534
|
+
if (prevAccumulatingRef.current !== isAccumulatingThinking) {
|
|
4535
|
+
if (isAccumulatingThinking) {
|
|
4536
|
+
setIsExpanded(true);
|
|
4537
|
+
} else if (prevAccumulatingRef.current === true) {
|
|
4538
|
+
if (temporarilyDisableScroll) {
|
|
4539
|
+
temporarilyDisableScroll(500, "thinking-auto-collapse");
|
|
4540
|
+
}
|
|
4541
|
+
setIsExpanded(false);
|
|
4538
4542
|
}
|
|
4539
|
-
|
|
4543
|
+
prevAccumulatingRef.current = isAccumulatingThinking;
|
|
4540
4544
|
}
|
|
4541
|
-
prevAccumulatingRef.current = isAccumulatingThinking;
|
|
4542
4545
|
}, [isAccumulatingThinking, temporarilyDisableScroll]);
|
|
4543
4546
|
const formatTime = (ms) => {
|
|
4544
4547
|
if (ms < 1e3) {
|
|
@@ -4592,8 +4595,9 @@ var ThinkingContent = ({
|
|
|
4592
4595
|
), isExpanded && /* @__PURE__ */ import_react20.default.createElement(
|
|
4593
4596
|
"div",
|
|
4594
4597
|
{
|
|
4595
|
-
className: styles.thinkingContent
|
|
4596
|
-
style: customStyle?.thinkingContent
|
|
4598
|
+
className: `${styles.thinkingContent} thinking-content-area`,
|
|
4599
|
+
style: customStyle?.thinkingContent,
|
|
4600
|
+
"data-custom-color": ""
|
|
4597
4601
|
},
|
|
4598
4602
|
/* @__PURE__ */ import_react20.default.createElement(import_react_markdown2.default, { components: markdownComponents, rehypePlugins: [import_rehype_raw.default] }, content)
|
|
4599
4603
|
));
|
package/dist/index.mjs
CHANGED
|
@@ -3424,16 +3424,15 @@ var createChatStyles = (width, height, padding = 0) => {
|
|
|
3424
3424
|
padding-left: 8px;
|
|
3425
3425
|
margin: 16px 0px 8px 0px;
|
|
3426
3426
|
|
|
3427
|
-
|
|
3427
|
+
p {
|
|
3428
3428
|
margin: 0;
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3429
|
+
font-size: inherit;
|
|
3430
|
+
line-height: inherit;
|
|
3431
|
+
color: inherit;
|
|
3432
3432
|
}
|
|
3433
3433
|
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
color: #ffffffad;
|
|
3434
|
+
* {
|
|
3435
|
+
color: inherit;
|
|
3437
3436
|
}
|
|
3438
3437
|
`,
|
|
3439
3438
|
LeftContainer: css`
|
|
@@ -4480,16 +4479,20 @@ var ThinkingContent = ({
|
|
|
4480
4479
|
}) => {
|
|
4481
4480
|
const useStyles5 = createChatStyles();
|
|
4482
4481
|
const { styles } = useStyles5();
|
|
4483
|
-
const [isExpanded, setIsExpanded] = useState8(
|
|
4482
|
+
const [isExpanded, setIsExpanded] = useState8(!!isAccumulatingThinking);
|
|
4484
4483
|
const prevAccumulatingRef = useRef9(isAccumulatingThinking);
|
|
4485
4484
|
useEffect8(() => {
|
|
4486
|
-
if (prevAccumulatingRef.current
|
|
4487
|
-
if (
|
|
4488
|
-
|
|
4485
|
+
if (prevAccumulatingRef.current !== isAccumulatingThinking) {
|
|
4486
|
+
if (isAccumulatingThinking) {
|
|
4487
|
+
setIsExpanded(true);
|
|
4488
|
+
} else if (prevAccumulatingRef.current === true) {
|
|
4489
|
+
if (temporarilyDisableScroll) {
|
|
4490
|
+
temporarilyDisableScroll(500, "thinking-auto-collapse");
|
|
4491
|
+
}
|
|
4492
|
+
setIsExpanded(false);
|
|
4489
4493
|
}
|
|
4490
|
-
|
|
4494
|
+
prevAccumulatingRef.current = isAccumulatingThinking;
|
|
4491
4495
|
}
|
|
4492
|
-
prevAccumulatingRef.current = isAccumulatingThinking;
|
|
4493
4496
|
}, [isAccumulatingThinking, temporarilyDisableScroll]);
|
|
4494
4497
|
const formatTime = (ms) => {
|
|
4495
4498
|
if (ms < 1e3) {
|
|
@@ -4543,8 +4546,9 @@ var ThinkingContent = ({
|
|
|
4543
4546
|
), isExpanded && /* @__PURE__ */ React10.createElement(
|
|
4544
4547
|
"div",
|
|
4545
4548
|
{
|
|
4546
|
-
className: styles.thinkingContent
|
|
4547
|
-
style: customStyle?.thinkingContent
|
|
4549
|
+
className: `${styles.thinkingContent} thinking-content-area`,
|
|
4550
|
+
style: customStyle?.thinkingContent,
|
|
4551
|
+
"data-custom-color": ""
|
|
4548
4552
|
},
|
|
4549
4553
|
/* @__PURE__ */ React10.createElement(ReactMarkdown2, { components: markdownComponents, rehypePlugins: [rehypeRaw] }, content)
|
|
4550
4554
|
));
|