Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
df6bc232
authored
Jul 14, 2026
by
Archer
Committed by
GitHub
Jul 14, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(markdown): strengthen streaming tail fade (#7303)
parent
f13db210
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
projects/app/src/components/Markdown/index.module.scss
+15
-1
projects/app/src/components/Markdown/index.tsx
+7
-5
No files found.
projects/app/src/components/Markdown/index.module.scss
View file @
df6bc232
.waitingAnimation
{
.waitingAnimation
{
:global
(
.stream-tail
)
{
:global
(
.stream-tail
)
{
display
:
inline
;
display
:
inline
;
will-change
:
opacity
,
filter
,
transform
;
opacity
:
0
;
will-change
:
opacity
,
transform
;
animation
:
streamTailFadeIn
280ms
cubic-bezier
(
0
.33
,
0
,
0
.67
,
1
)
both
;
}
}
@keyframes
streamTailFadeIn
{
from
{
opacity
:
0
;
transform
:
translateY
(
1px
);
}
to
{
opacity
:
1
;
transform
:
translateY
(
0
);
}
}
}
}
...
...
projects/app/src/components/Markdown/index.tsx
View file @
df6bc232
...
@@ -26,6 +26,8 @@ const IframeHtmlCodeBlock = dynamic(() => import('./codeBlock/iframe-html'), { s
...
@@ -26,6 +26,8 @@ const IframeHtmlCodeBlock = dynamic(() => import('./codeBlock/iframe-html'), { s
const
VideoBlock
=
dynamic
(()
=>
import
(
'./codeBlock/Video'
),
{
ssr
:
false
});
const
VideoBlock
=
dynamic
(()
=>
import
(
'./codeBlock/Video'
),
{
ssr
:
false
});
const
AudioBlock
=
dynamic
(()
=>
import
(
'./codeBlock/Audio'
),
{
ssr
:
false
});
const
AudioBlock
=
dynamic
(()
=>
import
(
'./codeBlock/Audio'
),
{
ssr
:
false
});
const
useBrowserLayoutEffect
=
typeof
window
===
'undefined'
?
useEffect
:
useLayoutEffect
;
const
useBrowserLayoutEffect
=
typeof
window
===
'undefined'
?
useEffect
:
useLayoutEffect
;
const
STREAM_TAIL_FADE_DURATION_MS
=
280
;
const
STREAM_TAIL_FADE_EASING
=
'cubic-bezier(0.33, 0, 0.67, 1)'
;
const
ChatGuide
=
dynamic
(()
=>
import
(
'./chat/Guide'
),
{
ssr
:
false
});
const
ChatGuide
=
dynamic
(()
=>
import
(
'./chat/Guide'
),
{
ssr
:
false
});
const
QuestionGuide
=
dynamic
(()
=>
import
(
'./chat/QuestionGuide'
),
{
ssr
:
false
});
const
QuestionGuide
=
dynamic
(()
=>
import
(
'./chat/QuestionGuide'
),
{
ssr
:
false
});
...
@@ -68,7 +70,7 @@ function MarkdownLinkRenderer(props: any) {
...
@@ -68,7 +70,7 @@ function MarkdownLinkRenderer(props: any) {
);
);
}
}
/** 仅让最新流式文本批次执行淡入;
不支持 Web Animations API 时直接展示内容
。 */
/** 仅让最新流式文本批次执行淡入;
CSS 会为不支持 Web Animations API 的浏览器兜底
。 */
function
MarkdownStreamTailRenderer
({
children
}:
any
)
{
function
MarkdownStreamTailRenderer
({
children
}:
any
)
{
const
ref
=
useRef
<
HTMLSpanElement
>
(
null
);
const
ref
=
useRef
<
HTMLSpanElement
>
(
null
);
...
@@ -78,12 +80,12 @@ function MarkdownStreamTailRenderer({ children }: any) {
...
@@ -78,12 +80,12 @@ function MarkdownStreamTailRenderer({ children }: any) {
const
animation
=
element
.
animate
(
const
animation
=
element
.
animate
(
[
[
{
opacity
:
0
.25
,
filter
:
'blur(1px)'
,
transform
:
'translateY(1px)'
},
{
opacity
:
0
,
transform
:
'translateY(1px)'
},
{
opacity
:
1
,
filter
:
'blur(0)'
,
transform
:
'translateY(0)'
}
{
opacity
:
1
,
transform
:
'translateY(0)'
}
],
],
{
{
duration
:
120
,
duration
:
STREAM_TAIL_FADE_DURATION_MS
,
easing
:
'cubic-bezier(0.16, 1, 0.3, 1)'
,
easing
:
STREAM_TAIL_FADE_EASING
,
fill
:
'both'
fill
:
'both'
}
}
);
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment