Files
supabase/apps/studio/components/layouts/AppLayout/AssistantButton.tsx
T
58272034b1 Multiple assistant chats (#34011)
* 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>
2025-03-28 16:36:41 +08:00

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