bugfix: restore会话历史
This commit is contained in:
@@ -49,7 +49,9 @@
|
||||
const handleRestore = () => {
|
||||
// agentRef.value?.inputRef?.addReportTag('Restore')
|
||||
clearNodeChat({ projectId: projectStore.state.id, id: projectStore.state.nodeId }).then(
|
||||
(res) => {}
|
||||
(res) => {
|
||||
agentRef.value.setChatInfo(res)
|
||||
}
|
||||
)
|
||||
}
|
||||
const handleSelectNode = () => {
|
||||
@@ -64,11 +66,11 @@
|
||||
|
||||
const handleGetProjectInfoAndHistory = () => {
|
||||
getProjectInfo({ id: route.params.id }).then((res) => {
|
||||
if(res?.conversation)agentRef.value.setChatInfo(res.conversation)
|
||||
if (res?.conversation) agentRef.value.setChatInfo(res.conversation)
|
||||
let data = res?.project || res
|
||||
if(data?.latestNodeId)data.nodeId = data.latestNodeId
|
||||
if (data?.latestNodeId) data.nodeId = data.latestNodeId
|
||||
projectStore.setProject({
|
||||
...data,
|
||||
...data
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user