mirror of
https://github.com/supabase/supabase.git
synced 2026-10-15 22:29:11 +03:00
Small fixes
This commit is contained in:
1 parent
abaf6be7d1
commit
be5976fcd1
3 files changed
+9
-2
No files matched your search
@@ -1,8 +1,10 @@
|
||||
import { useAiAssistantStateSnapshot } from 'state/ai-assistant-state'
|
||||
import { useAppStateSnapshot } from 'state/app-state'
|
||||
import { AiIconAnimation, Button } from 'ui'
|
||||
|
||||
const AssistantButton = () => {
|
||||
const snap = useAiAssistantStateSnapshot()
|
||||
const { setEditorPanel } = useAppStateSnapshot()
|
||||
|
||||
return (
|
||||
<Button
|
||||
@@ -12,6 +14,7 @@ const AssistantButton = () => {
|
||||
className="h-full w-full rounded-none"
|
||||
onClick={() => {
|
||||
snap.toggleAssistant()
|
||||
setEditorPanel({ open: false })
|
||||
}}
|
||||
>
|
||||
<AiIconAnimation allowHoverEffect size={20} />
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { SqlEditor } from 'icons'
|
||||
import { useAiAssistantStateSnapshot } from 'state/ai-assistant-state'
|
||||
import { useAppStateSnapshot } from 'state/app-state'
|
||||
import { Button } from 'ui'
|
||||
import { SqlEditor } from 'icons'
|
||||
|
||||
const InlineEditorButton = () => {
|
||||
const { closeAssistant } = useAiAssistantStateSnapshot()
|
||||
const { setEditorPanel, editorPanel } = useAppStateSnapshot()
|
||||
|
||||
return (
|
||||
@@ -12,6 +14,7 @@ const InlineEditorButton = () => {
|
||||
id="editor-trigger"
|
||||
className="h-full w-full rounded-none text-foreground-light"
|
||||
onClick={() => {
|
||||
closeAssistant()
|
||||
setEditorPanel({ open: !editorPanel.open })
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -32,6 +32,7 @@ export const AIAssistantChatSelector = ({ className }: AIAssistantChatSelectorPr
|
||||
const [editingChatName, setEditingChatName] = useState('')
|
||||
|
||||
const chats = Object.entries(snap.chats)
|
||||
console.log(snap.chats)
|
||||
|
||||
const handleSelectChat = (id: string) => {
|
||||
snap.selectChat(id)
|
||||
@@ -109,7 +110,7 @@ export const AIAssistantChatSelector = ({ className }: AIAssistantChatSelectorPr
|
||||
value={id}
|
||||
onSelect={() => handleSelectChat(id)}
|
||||
className="flex items-center justify-between gap-2 py-1 w-full overflow-hidden group"
|
||||
keywords={[chat.name]}
|
||||
keywords={[chat.name ?? '']}
|
||||
>
|
||||
<div className="flex items-center w-full flex-1 min-w-0">
|
||||
{editingChatId === id ? (
|
||||
|
||||
Reference in new issue
Block a user