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
6992b396
Commit
6992b396
authored
Jun 02, 2026
by
Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:提问自动进入子工作流
parent
e9c54c3a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
2 deletions
+12
-2
package-lock.json
+0
-0
src/pages/Chat/Chat.tsx
+0
-0
src/pages/Chat/components/ChatItem/ChatAnswerParser.tsx
+10
-1
src/pages/Chat/components/ChatItem/ChatAnswerShower.tsx
+2
-1
src/pages/Chat/helper.ts
+0
-0
No files found.
package-lock.json
View file @
6992b396
This diff is collapsed.
Click to expand it.
src/pages/Chat/Chat.tsx
View file @
6992b396
This diff is collapsed.
Click to expand it.
src/pages/Chat/components/ChatItem/ChatAnswerParser.tsx
View file @
6992b396
...
...
@@ -43,7 +43,8 @@ function CheckIcon({ ...props }) {
}
export
const
ChatAnswerParser
:
React
.
FC
<
ChatAnswerParserProps
>
=
({
isLastAnswer
,
onTyping
,
onComplate
,
answer
,
isStopTyping
,
onSubmitQuestion
,
hideOperate
,
onWorkflowSubmit
,
isWorkflowSubmitting
,
isAsking
=
false
})
=>
{
const
displayAnswerText
=
resolveDisplayAnswerText
(
answer
.
answer
||
''
)
const
answerSourceText
=
(
answer
as
{
workflowParseText
?:
string
}).
workflowParseText
??
answer
.
answer
??
''
const
displayAnswerText
=
resolveDisplayAnswerText
(
answerSourceText
)
const
formatAnswer
=
formatMarkdown
(
displayAnswerText
)
const
hasCards
=
Array
.
isArray
(
answer
.
cardList
)
&&
answer
.
cardList
.
length
>
0
const
[
displayedText
,
setDisplayedText
]
=
useState
(
''
)
...
...
@@ -123,6 +124,14 @@ export const ChatAnswerParser: React.FC<ChatAnswerParserProps> = ({ isLastAnswer
}
useEffect
(()
=>
{
if
(
answer
.
endAnswerFlag
)
{
setDisplayedText
(
formatAnswer
)
setCurrentIndex
(
formatAnswer
.
length
)
setIsTyping
(
false
)
}
},
[
answer
.
endAnswerFlag
,
formatAnswer
])
useEffect
(()
=>
{
if
(
isStopTyping
)
{
return
}
...
...
src/pages/Chat/components/ChatItem/ChatAnswerShower.tsx
View file @
6992b396
...
...
@@ -20,7 +20,8 @@ interface ChatAnswerShowerProps {
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
hideOperate
=
hideOperateByCard
||
hideOperateProp
const
displayAnswerText
=
resolveDisplayAnswerText
(
answer
.
answer
||
''
)
const
answerSourceText
=
(
answer
as
{
workflowParseText
?:
string
}).
workflowParseText
??
answer
.
answer
??
''
const
displayAnswerText
=
resolveDisplayAnswerText
(
answerSourceText
)
const
hasCards
=
Array
.
isArray
(
answer
.
cardList
)
&&
answer
.
cardList
.
length
>
0
// 历史首包静默记录隐藏卡片;流式/含工作流表单卡片需正常展示
const
shouldRenderCards
=
hasCards
&&
!
(
...
...
src/pages/Chat/helper.ts
View file @
6992b396
This diff is collapsed.
Click to expand it.
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