fix: the change assistant didn't take effect immediately #45 (#46)

* fix the change assistant didn't take effect immediately #45

* Update src/store/conversation.ts

Co-authored-by: boojack <stevenlgtm@gmail.com>

* change method name

* change method name

* fix the call method

---------

Co-authored-by: boojack <stevenlgtm@gmail.com>
This commit is contained in:
CorrectRoadH
2023-04-20 21:08:00 +08:00
committed by GitHub
parent c28c18b77a
commit 473abb857c
6 changed files with 17 additions and 18 deletions

View File

@ -13,8 +13,8 @@ const Header = (props: Props) => {
const layoutStore = useLayoutStore();
const conversationStore = useConversationStore();
const isDarkMode = useDarkMode();
const currentConversation = conversationStore.currentConversation;
const title = currentConversation?.title || "SQL Chat";
const currentConversationId = conversationStore.currentConversationId;
const title = conversationStore.getConversationById(currentConversationId)?.title || "SQL Chat";
useEffect(() => {
document.title = `${title}`;