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
67a904c3
Commit
67a904c3
authored
Jun 18, 2026
by
Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 历史会话记录增加toolID
parent
bc0509b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
src/components/ChatEditor/index.tsx
+2
-1
src/store/conversationSlice.ts
+7
-4
No files found.
src/components/ChatEditor/index.tsx
View file @
67a904c3
...
...
@@ -8,7 +8,7 @@ import type { RootState } from '@/store'
import
SendIcon
from
'@/assets/svg/send.svg?react'
import
{
type
WithAuthProps
,
withAuth
}
from
'@/auth/withAuth'
import
{
useAppDispatch
,
useAppSelector
}
from
'@/store/hook'
import
{
clearBusinessInsightWorkflow
,
clearCurrentToolId
,
setCurrentToolId
}
from
'@/store/conversationSlice'
import
{
clearBusinessInsightWorkflow
,
clearCurrentToolId
,
fetchConversations
,
setCurrentToolId
}
from
'@/store/conversationSlice'
import
{
setIsAsking
}
from
'@/store/chatSlice'
import
{
fetchToolList
}
from
'@/api/home'
import
{
safeSessionStorageGetItem
,
safeSessionStorageRemoveItem
,
safeSessionStorageSetItem
}
from
'@/lib/utils'
...
...
@@ -434,6 +434,7 @@ const ChatEditorBase: React.FC<ChatEditorProps & WithAuthProps> = ({ checkAuth,
}
}
}
dispatch
(
fetchConversations
(
normalizedToolId
))
sessionStorage
.
removeItem
(
'toolHistoryLoading'
)
}
}
...
...
src/store/conversationSlice.ts
View file @
67a904c3
...
...
@@ -25,14 +25,17 @@ const initialState: ConversationState = {
export
const
fetchConversations
=
createAsyncThunk
(
'conversation/fetchConversations'
,
async
(
_
,
{
rejectWithValue
})
=>
{
async
(
toolId
?:
string
,
{
rejectWithValue
})
=>
{
try
{
await
waitForToken
()
// 调用真实接口获取会话列表
const
response
=
await
fetchQueryUserConversationPage
({
const
requestData
:
Record
<
string
,
any
>
=
{
pageNum
:
1
,
pageSize
:
100
,
})
}
if
(
toolId
)
{
requestData
.
toolId
=
toolId
}
const
response
=
await
fetchQueryUserConversationPage
(
requestData
)
const
records
=
response
.
data
?.
records
||
[]
return
processConversationData
(
records
)
}
...
...
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