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
0759b04e
Commit
0759b04e
authored
Dec 16, 2025
by
Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 增加recordType
parent
f103a48c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
1 deletions
+35
-1
src/pages/ChatTactics/TacticsChat.tsx
+35
-1
No files found.
src/pages/ChatTactics/TacticsChat.tsx
View file @
0759b04e
...
...
@@ -743,6 +743,40 @@ export const TacticsChat: React.FC = () => {
}
},
[
shouldSendQuestion
,
isLoading
,
dispatch
,
userMeta
,
handleSubmitQuestion
,
getNumberTypeWithUserMeta
])
// 提供给 ChatAnswerBox/推荐问题的提交方法,保持与手动提问一致的 recordType 逻辑
const
handleAnswerBoxSubmit
=
useCallback
(
(
question
:
string
,
productCode
?:
string
)
=>
{
const
hasUserMeta
=
!!
userMeta
if
(
hasUserMeta
)
{
const
mappedNumberType
=
getNumberTypeWithUserMeta
(
'A02'
,
false
)
return
handleSubmitQuestion
(
question
,
productCode
,
undefined
,
{
busiType
:
'02'
,
recordType
:
mappedNumberType
,
includeQuestion
:
true
,
includeTacticsMeta
:
false
,
includeUserMeta
:
true
,
},
)
}
return
handleSubmitQuestion
(
question
,
productCode
,
undefined
,
{
busiType
:
'02'
,
recordType
:
'A02'
,
includeQuestion
:
true
,
includeTacticsMeta
:
false
,
},
)
},
[
userMeta
,
getNumberTypeWithUserMeta
,
handleSubmitQuestion
],
)
return
(
<
div
className=
{
styles
.
scrollView
}
...
...
@@ -838,7 +872,7 @@ export const TacticsChat: React.FC = () => {
{
record
.
role
===
'user'
&&
<
ChatItemUser
record=
{
record
}
/>
}
{
record
.
role
===
'ai'
&&
(
<
ChatAnswerBox
onSubmitQuestion=
{
handle
SubmitQuestion
}
onSubmitQuestion=
{
handle
AnswerBoxSubmit
}
isLastAnswer=
{
index
===
allItems
.
length
-
1
}
showIndex=
{
0
}
record=
{
record
}
...
...
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