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
4a148bc8
Commit
4a148bc8
authored
Dec 16, 2025
by
Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:创建会话时修改传参
parent
e2690a46
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
10 deletions
+22
-10
src/pages/ChatTactics/TacticsChat.tsx
+4
-4
src/pages/ChatTactics/TacticsHome.tsx
+16
-4
src/routes/RouteChangeHandler.tsx
+2
-2
No files found.
src/pages/ChatTactics/TacticsChat.tsx
View file @
4a148bc8
...
...
@@ -125,13 +125,13 @@ export const TacticsChat: React.FC = () => {
const
getConversationExtra
=
useCallback
(()
=>
{
if
(
userMeta
?.
place
===
'user'
)
{
return
{
description
:
'02'
,
busiType
:
'02'
,
busiId
:
userMeta
.
userId
,
}
}
if
(
tacticsMeta
)
{
return
{
description
:
'02'
,
busiType
:
'02'
,
busiId
:
tacticsMeta
.
taskId
,
}
}
...
...
@@ -418,11 +418,11 @@ export const TacticsChat: React.FC = () => {
}
// from=tactics 场景下补充业务识别参数
if
(
userMeta
?.
place
===
'user'
)
{
requestBody
.
description
??
=
'02'
requestBody
.
busiType
??
=
'02'
requestBody
.
busiId
??
=
userMeta
.
userId
}
else
if
(
tacticsMeta
)
{
requestBody
.
description
??
=
'02'
requestBody
.
busiType
??
=
'02'
requestBody
.
busiId
??
=
tacticsMeta
.
taskId
}
// 如果 includeQuestion 为 false,不展示问题但接口参数中仍要传递 question
...
...
src/pages/ChatTactics/TacticsHome.tsx
View file @
4a148bc8
...
...
@@ -40,7 +40,7 @@ export const TacticsHome: React.FC = () => {
partOrAll
:
searchParams
.
get
(
'partOrAll'
)
||
undefined
,
channel
:
searchParams
.
get
(
'channel'
)
||
undefined
,
channelName
:
searchParams
.
get
(
'channelName'
)
||
undefined
,
description
:
'02'
,
busiType
:
'02'
,
busiId
:
searchParams
.
get
(
'taskId'
)
||
undefined
,
}
},
[
searchParams
])
...
...
@@ -73,7 +73,7 @@ export const TacticsHome: React.FC = () => {
cstId
:
searchParams
.
get
(
'cstId'
)
||
undefined
,
userId
:
searchParams
.
get
(
'userId'
)
||
undefined
,
numberType
:
searchParams
.
get
(
'numberType'
)
||
undefined
,
description
:
'02'
,
busiType
:
'02'
,
busiId
:
searchParams
.
get
(
'userId'
)
||
undefined
,
}
},
[
searchParams
])
...
...
@@ -99,13 +99,13 @@ export const TacticsHome: React.FC = () => {
const
getConversationExtra
=
useCallback
(()
=>
{
if
(
userMeta
?.
place
===
'user'
)
{
return
{
description
:
'02'
,
busiType
:
'02'
,
busiId
:
userMeta
.
userId
,
}
}
if
(
tacticsMeta
)
{
return
{
description
:
'02'
,
busiType
:
'02'
,
busiId
:
tacticsMeta
.
taskId
,
}
}
...
...
@@ -137,6 +137,18 @@ export const TacticsHome: React.FC = () => {
shouldSendQuestion
:
''
,
}),
)
.
unwrap
()
.
then
((
res
)
=>
{
const
conversationId
=
res
?.
conversation
?.
id
const
from
=
searchParams
.
get
(
'from'
)
const
place
=
searchParams
.
get
(
'place'
)
if
(
conversationId
&&
from
===
'tactics'
)
{
const
storageKey
=
place
===
'user'
?
'tactics_user_conversation_id'
:
'tactics_conversation_id'
window
.
localStorage
.
setItem
(
storageKey
,
conversationId
)
}
// eslint-disable-next-line no-console
console
.
log
(
'[TacticsHome] created conversationId'
,
conversationId
)
})
}
// 清除状态以避免下次影响
if
(
location
.
state
?.
fromCollect
)
{
...
...
src/routes/RouteChangeHandler.tsx
View file @
4a148bc8
...
...
@@ -33,7 +33,7 @@ export function withRouteChangeHandler(WrappedComponent: React.ComponentType) {
userId
:
searchParams
.
get
(
'userId'
)
||
undefined
,
numberType
:
searchParams
.
get
(
'numberType'
)
||
undefined
,
place
,
description
:
'02'
,
busiType
:
'02'
,
busiId
:
searchParams
.
get
(
'userId'
)
||
undefined
,
}
sessionStorage
.
setItem
(
'userMeta'
,
JSON
.
stringify
(
userMeta
))
...
...
@@ -48,7 +48,7 @@ export function withRouteChangeHandler(WrappedComponent: React.ComponentType) {
channel
:
searchParams
.
get
(
'channel'
)
||
undefined
,
channelName
:
searchParams
.
get
(
'channelName'
)
||
undefined
,
from
,
description
:
'02'
,
busiType
:
'02'
,
busiId
:
searchParams
.
get
(
'taskId'
)
||
undefined
,
}
sessionStorage
.
setItem
(
'tacticsMeta'
,
JSON
.
stringify
(
meta
))
...
...
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