mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-26 02:13:29 +08:00
fix(web): show completed label for think block after streaming ends (#17149)
This commit is contained in:
@@ -75,12 +75,15 @@ const MarkdownContent = ({
|
||||
text = t('chat.searching');
|
||||
}
|
||||
const nextText = replaceTextByOldReg(text);
|
||||
const thinkSummary = loading
|
||||
? `${t('chat.thinking')}...`
|
||||
: t('chat.thought');
|
||||
return pipe(
|
||||
replaceThinkToSection,
|
||||
(value: string) => replaceThinkToSection(value, thinkSummary),
|
||||
replaceRetrievingToSection,
|
||||
preprocessLaTeX,
|
||||
)(nextText);
|
||||
}, [content, t]);
|
||||
}, [content, loading, t]);
|
||||
|
||||
useEffect(() => {
|
||||
const docAggs = reference?.doc_aggs;
|
||||
|
||||
@@ -181,12 +181,15 @@ function MarkdownContent({
|
||||
text = t('chat.searching');
|
||||
}
|
||||
const nextText = replaceTextByOldReg(text);
|
||||
const thinkSummary = loading
|
||||
? `${t('chat.thinking')}...`
|
||||
: t('chat.thought');
|
||||
return pipe(
|
||||
replaceThinkToSection,
|
||||
(value: string) => replaceThinkToSection(value, thinkSummary),
|
||||
replaceRetrievingToSection,
|
||||
preprocessLaTeX,
|
||||
)(nextText);
|
||||
}, [content, t]);
|
||||
}, [content, loading, t]);
|
||||
|
||||
useEffect(() => {
|
||||
const docAggs = reference?.doc_aggs;
|
||||
|
||||
Reference in New Issue
Block a user