mirror of
https://github.com/supabase/supabase.git
synced 2026-10-16 14:49:10 +03:00
* add assistant chats * refactoring * refactor * refactor to use onfinish * fix ts * dependencies removal * Update useAssistant.ts * ts * refactor useAssistant hook to valtio store * Minor tweaks * Add name param to newChat, and add names to each call of newChat --------- Co-authored-by: Alaister Young <a@alaisteryoung.com> Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
23 lines
502 B
TypeScript
23 lines
502 B
TypeScript
import { useAiAssistantStateSnapshot } from 'state/ai-assistant-state'
|
|
import { AiIconAnimation, Button } from 'ui'
|
|
|
|
const AssistantButton = () => {
|
|
const snap = useAiAssistantStateSnapshot()
|
|
|
|
return (
|
|
<Button
|
|
type="text"
|
|
size="tiny"
|
|
id="assistant-trigger"
|
|
className="h-full w-full rounded-none"
|
|
onClick={() => {
|
|
snap.toggleAssistant()
|
|
}}
|
|
>
|
|
<AiIconAnimation allowHoverEffect size={20} />
|
|
</Button>
|
|
)
|
|
}
|
|
|
|
export default AssistantButton
|