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
5b082fd7
Commit
5b082fd7
authored
Jan 23, 2026
by
weiyudumei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 历史记录中如果 firstQaFlag 为 true 则不展示该条 chatItem
parent
eb862599
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
src/pages/Chat/Chat.tsx
+5
-0
src/pages/ChatTactics/TacticsChat.tsx
+6
-3
No files found.
src/pages/Chat/Chat.tsx
View file @
5b082fd7
...
...
@@ -949,6 +949,11 @@ export const Chat: React.FC = () => {
>
<
div
className=
{
styles
.
inter
}
>
{
allItems
.
map
((
record
,
index
)
=>
{
// 如果历史记录中 firstQaFlag 为 true,则不展示该条 chatItem
if
(
record
.
role
===
'ai'
&&
record
.
answerList
?.[
0
]?.
firstQaFlag
===
true
)
{
return
null
}
const
recordId
=
record
.
answerList
?.[
0
]?.
recordId
||
record
.
groupId
const
uniqueKey
=
recordId
?
`${record.role}-${recordId}`
...
...
src/pages/ChatTactics/TacticsChat.tsx
View file @
5b082fd7
...
...
@@ -505,7 +505,7 @@ export const TacticsChat: React.FC = () => {
// 1. 如果是重新分析(isReanalyze === true),不传递 workFlowSessionId
// 2. 优先使用 extra 中的值
// 3. 如果都没有,从会话历史中找到最后一个有 workFlowSessionId 的答案
const
isReanalyze
=
extra
?.
isReanalyze
===
true
// 注意:isReanalyze 已在上面声明(第 366 行),这里直接使用
if
(
!
isReanalyze
)
{
if
(
extra
?.
workFlowSessionId
)
{
requestBody
.
workFlowSessionId
=
extra
.
workFlowSessionId
...
...
@@ -1139,8 +1139,7 @@ export const TacticsChat: React.FC = () => {
type=
"button"
onClick=
{
handleReanalyze
}
disabled=
{
!
currentIdRef
.
current
||
isLoading
||
isAsking
||
isRecommendLoading
}
className=
{
`flex items-center gap-[4px] text-[14px] transition-opacity bg-transparent border-none outline-none ${
!currentIdRef.current || isLoading || isAsking || isRecommendLoading
className=
{
`flex items-center gap-[4px] text-[14px] transition-opacity bg-transparent border-none outline-none ${!currentIdRef.current || isLoading || isAsking || isRecommendLoading
? 'text-[#B2B8C1] cursor-not-allowed opacity-60'
: 'text-[#4A90E2] hover:opacity-80 cursor-pointer'
}`
}
...
...
@@ -1196,6 +1195,10 @@ export const TacticsChat: React.FC = () => {
if
(
record
.
role
===
'user'
&&
!
record
.
question
)
{
return
null
}
// 如果历史记录中 firstQaFlag 为 true,则不展示该条 chatItem
if
(
record
.
role
===
'ai'
&&
record
.
answerList
?.[
0
]?.
firstQaFlag
===
true
)
{
return
null
}
const
matchedDivider
=
historyDividers
.
find
(
divider
=>
divider
.
index
===
index
+
1
)
const
recordId
=
record
.
answerList
?.[
0
]?.
recordId
||
record
.
groupId
const
uniqueKey
=
recordId
...
...
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