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:
Cats Juice
2025-07-11 11:36:56 +08:00
committed by GitHub
parent 8b579e3a92
commit aba0a3d485

View File

@@ -125,7 +125,10 @@ export const Component = () => {
.getSession(workspaceId, sessionId)
.then(session => {
setCurrentSession(session);
chatContent?.reloadSession();
if (chatContent) {
chatContent.session = session;
chatContent.reloadSession();
}
chatTool?.closeHistoryMenu();
})
.catch(console.error)