Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sdream-ai-fe
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
侯明涛
sdream-ai-fe
Commits
5c59a5d0
Commit
5c59a5d0
authored
Jan 23, 2026
by
weiyudumei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 当 firstQaFlag 为 true 且存在 workflow 卡片时,隐藏整个流式返回结果(表单会自动提交,用户不需要看到这次的结果)
parent
b23d7f44
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
src/pages/Chat/components/ChatItem/CardWorkflowForm.tsx
+5
-0
src/pages/Chat/components/ChatItem/ChatAnswerParser.tsx
+6
-0
src/pages/Chat/components/ChatItem/ChatAnswerShower.tsx
+7
-0
No files found.
src/pages/Chat/components/ChatItem/CardWorkflowForm.tsx
View file @
5c59a5d0
...
@@ -125,6 +125,11 @@ export const CardWorkflowForm: React.FC<CardWorkflowFormProps> = ({
...
@@ -125,6 +125,11 @@ export const CardWorkflowForm: React.FC<CardWorkflowFormProps> = ({
return
null
return
null
}
}
// 如果 firstQaFlag 为 true 且已经自动提交,隐藏表单
if
(
answer
.
firstQaFlag
===
true
&&
hasAutoSubmittedRef
.
current
)
{
return
null
}
return
(
return
(
<
div
className=
"card-workflow-form"
>
<
div
className=
"card-workflow-form"
>
<
div
className=
"flex flex-col gap-[12px]"
>
<
div
className=
"flex flex-col gap-[12px]"
>
...
...
src/pages/Chat/components/ChatItem/ChatAnswerParser.tsx
View file @
5c59a5d0
...
@@ -178,6 +178,12 @@ export const ChatAnswerParser: React.FC<ChatAnswerParserProps> = ({ isLastAnswer
...
@@ -178,6 +178,12 @@ export const ChatAnswerParser: React.FC<ChatAnswerParserProps> = ({ isLastAnswer
const
shouldHideOperate
=
hideOperateByCard
||
hideOperate
const
shouldHideOperate
=
hideOperateByCard
||
hideOperate
// 如果 firstQaFlag 为 true 且存在 workflow 卡片,隐藏整个答案内容(表单会自动提交,用户不需要看到这次的结果)
const
hasWorkflowCard
=
(
answer
.
cardList
||
[]).
some
(
attachment
=>
attachment
.
type
===
'card-workflow'
)
if
(
answer
.
firstQaFlag
===
true
&&
hasWorkflowCard
)
{
return
null
}
return
(
return
(
<
div
className=
"answerParser"
>
<
div
className=
"answerParser"
>
...
...
src/pages/Chat/components/ChatItem/ChatAnswerShower.tsx
View file @
5c59a5d0
...
@@ -18,6 +18,13 @@ interface ChatAnswerShowerProps {
...
@@ -18,6 +18,13 @@ interface ChatAnswerShowerProps {
export
const
ChatAnswerShower
:
React
.
FC
<
ChatAnswerShowerProps
>
=
({
answer
,
isLastAnswer
,
onSubmitQuestion
,
hideOperate
:
hideOperateProp
,
onWorkflowSubmit
,
isWorkflowSubmitting
,
isAsking
=
false
})
=>
{
export
const
ChatAnswerShower
:
React
.
FC
<
ChatAnswerShowerProps
>
=
({
answer
,
isLastAnswer
,
onSubmitQuestion
,
hideOperate
:
hideOperateProp
,
onWorkflowSubmit
,
isWorkflowSubmitting
,
isAsking
=
false
})
=>
{
const
hideOperateByCard
=
(
answer
.
cardList
||
[]).
some
(
attachment
=>
attachment
.
type
===
'box'
||
attachment
?.
type
?.
includes
(
'card-'
))
const
hideOperateByCard
=
(
answer
.
cardList
||
[]).
some
(
attachment
=>
attachment
.
type
===
'box'
||
attachment
?.
type
?.
includes
(
'card-'
))
const
hideOperate
=
hideOperateByCard
||
hideOperateProp
const
hideOperate
=
hideOperateByCard
||
hideOperateProp
// 如果 firstQaFlag 为 true 且存在 workflow 卡片,隐藏整个答案内容(表单会自动提交,用户不需要看到这次的结果)
const
hasWorkflowCard
=
(
answer
.
cardList
||
[]).
some
(
attachment
=>
attachment
.
type
===
'card-workflow'
)
if
(
answer
.
firstQaFlag
===
true
&&
hasWorkflowCard
)
{
return
null
}
return
(
return
(
<
div
className=
"answerShower"
>
<
div
className=
"answerShower"
>
{
answer
.
answer
&&
(
{
answer
.
answer
&&
(
...
...
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