This commit is contained in:
Saxon Fletcher committed 2025-03-06 11:03:58 +10:00
1 parent 9167366649
commit 0f8341aaa4
1 file changed
+3 -12
+3 -12
View File
@@ -218,14 +218,7 @@ export function useAssistant(options?: UseAssistantOptions) {
}
}
},
[
chats,
activeChatId,
currentChatBelongsToProject,
projectRef,
projectChatsRecord,
setAiAssistantPanel,
]
[activeChatId, projectChatsRecord]
)
const openAssistant = useCallback(
@@ -258,7 +251,7 @@ export function useAssistant(options?: UseAssistantOptions) {
handleNewChat()
}
},
[projectRef, setAiAssistantPanel, handleNewChat]
[projectRef]
)
const closeAssistant = useCallback(() => {
@@ -287,9 +280,7 @@ export function useAssistant(options?: UseAssistantOptions) {
activeChat:
currentChatBelongsToProject && activeChatId ? projectChatsRecord[activeChatId] : undefined,
isOpen: open,
messages: (currentChatBelongsToProject && activeChatId
? projectChatsRecord[activeChatId]?.messages || []
: chats?.[activeChatId || 'default']?.messages || []) as Message[],
messages: projectChatsRecord[activeChatId || 'default']?.messages as Message[],
// Actions
newChat: handleNewChat,