fix(core): load chat history content correctly (#13149)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved session handling in chat to prevent potential errors when reloading sessions. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -125,7 +125,10 @@ export const Component = () => {
|
|||||||
.getSession(workspaceId, sessionId)
|
.getSession(workspaceId, sessionId)
|
||||||
.then(session => {
|
.then(session => {
|
||||||
setCurrentSession(session);
|
setCurrentSession(session);
|
||||||
chatContent?.reloadSession();
|
if (chatContent) {
|
||||||
|
chatContent.session = session;
|
||||||
|
chatContent.reloadSession();
|
||||||
|
}
|
||||||
chatTool?.closeHistoryMenu();
|
chatTool?.closeHistoryMenu();
|
||||||
})
|
})
|
||||||
.catch(console.error)
|
.catch(console.error)
|
||||||
|
|||||||
Reference in New Issue
Block a user