mirror of
https://github.com/supabase/supabase.git
synced 2026-10-15 22:29:11 +03:00
ts
This commit is contained in:
1 parent
9167366649
commit
0f8341aaa4
1 file changed
+3
-12
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user