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
5a00c065
authored
May 22, 2026
by
Archer
Committed by
GitHub
May 22, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: chatitem animation (#6965)
* fix: chatitem animation * fix: chatitem animation
parent
fb38d14f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
projects/app/src/components/core/chat/ChatContainer/ChatBox/components/ChatItem.tsx
+3
-3
projects/app/src/components/core/chat/components/AIResponseBox/index.tsx
+7
-5
No files found.
projects/app/src/components/core/chat/ChatContainer/ChatBox/components/ChatItem.tsx
View file @
5a00c065
...
@@ -126,8 +126,8 @@ const AIContentCard = React.memo(function AIContentCard({
...
@@ -126,8 +126,8 @@ const AIContentCard = React.memo(function AIContentCard({
onOpenCiteModal
:
(
e
?:
OnOpenCiteModalProps
)
=>
void
;
onOpenCiteModal
:
(
e
?:
OnOpenCiteModalProps
)
=>
void
;
})
{
})
{
const
lastValue
=
chatValue
[
chatValue
.
length
-
1
];
const
lastValue
=
chatValue
[
chatValue
.
length
-
1
];
const
last
IsText
=
lastValue
?.
text
;
const
last
HasText
=
!!
lastValue
?.
text
?.
content
?.
trim
()
;
const
last
IsReasoning
=
lastValue
?.
reasoning
;
const
last
HasReasoning
=
!!
lastValue
?.
reasoning
?.
content
?.
trim
()
;
return
(
return
(
<
Flex
flexDirection=
{
'column'
}
>
<
Flex
flexDirection=
{
'column'
}
>
{
chatValue
.
map
((
value
,
i
)
=>
{
{
chatValue
.
map
((
value
,
i
)
=>
{
...
@@ -154,7 +154,7 @@ const AIContentCard = React.memo(function AIContentCard({
...
@@ -154,7 +154,7 @@ const AIContentCard = React.memo(function AIContentCard({
})
}
})
}
{
/* 生成中占位动画(含断线续传拉流期间最后一条非文本时的 shimmer) */
}
{
/* 生成中占位动画(含断线续传拉流期间最后一条非文本时的 shimmer) */
}
{
isLastChild
&&
!
last
IsText
&&
!
lastI
sReasoning
&&
isChatting
&&
(
{
isLastChild
&&
!
last
HasText
&&
!
lastHa
sReasoning
&&
isChatting
&&
(
<
Box
className=
{
markdownStyles
.
animation
}
></
Box
>
<
Box
className=
{
markdownStyles
.
animation
}
></
Box
>
)
}
)
}
...
...
projects/app/src/components/core/chat/components/AIResponseBox/index.tsx
View file @
5a00c065
...
@@ -38,30 +38,32 @@ const AIResponseBox = ({
...
@@ -38,30 +38,32 @@ const AIResponseBox = ({
const
tools
=
value
.
tools
||
(
value
.
tool
?
[
value
.
tool
]
:
undefined
);
const
tools
=
value
.
tools
||
(
value
.
tool
?
[
value
.
tool
]
:
undefined
);
const
disableStreamingInteraction
=
isChatting
&&
isLastChild
;
const
disableStreamingInteraction
=
isChatting
&&
isLastChild
;
const
skills
=
value
.
skills
;
const
skills
=
value
.
skills
;
const
reasoningContent
=
value
.
reasoning
?.
content
||
''
;
const
textContent
=
value
.
text
?.
content
||
''
;
if
(
value
.
hideInUI
)
return
null
;
if
(
value
.
hideInUI
)
return
null
;
const
responseBlocks
:
React
.
ReactNode
[]
=
[];
const
responseBlocks
:
React
.
ReactNode
[]
=
[];
if
(
'reasoning'
in
value
&&
value
.
reasoning
&&
!
value
.
hideReason
)
{
if
(
reasoningContent
&&
!
value
.
hideReason
)
{
responseBlocks
.
push
(
responseBlocks
.
push
(
<
RenderReasoningContent
<
RenderReasoningContent
key=
"reasoning"
key=
"reasoning"
isChatting=
{
isChatting
}
isChatting=
{
isChatting
}
isLastResponseValue=
{
isLastResponseValue
}
isLastResponseValue=
{
isLastResponseValue
&&
!
textContent
&&
!
tools
}
content=
{
value
.
reasoning
.
c
ontent
}
content=
{
reasoningC
ontent
}
isDisabled=
{
disableStreamingInteraction
}
isDisabled=
{
disableStreamingInteraction
}
/>
/>
);
);
}
}
if
(
'text'
in
value
&&
value
.
tex
t
)
{
if
(
value
.
text
&&
textConten
t
)
{
responseBlocks
.
push
(
responseBlocks
.
push
(
<
RenderText
<
RenderText
key=
"text"
key=
"text"
chatItemDataId=
{
chatItemDataId
}
chatItemDataId=
{
chatItemDataId
}
showAnimation=
{
isChatting
&&
isLastResponseValue
}
showAnimation=
{
isChatting
&&
isLastResponseValue
}
text=
{
value
.
text
.
c
ontent
}
text=
{
textC
ontent
}
onOpenCiteModal=
{
onOpenCiteModal
}
onOpenCiteModal=
{
onOpenCiteModal
}
isDisabled=
{
disableStreamingInteraction
}
isDisabled=
{
disableStreamingInteraction
}
/>
/>
...
...
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