The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore(studio): refine Explorer toolbar, chat, and home actions (#49748)
Saxon Fletcher516ef0320fe4
diff --git a/apps/studio/.claude/skills/explorer/SKILL.md b/apps/studio/.claude/skills/explorer/SKILL.mdindex 3a086025fe8..96af375105e 100644--- a/apps/studio/.claude/skills/explorer/SKILL.md+++ b/apps/studio/.claude/skills/explorer/SKILL.md@@ -31,13 +31,13 @@ Compose the toolbar from slots rather than adding resource-specific props:<ExplorerToolbarTitle>{/* static or editable title */}</ExplorerToolbarTitle><ExplorerToolbarActions>{/* badges, source controls, display controls, and direct actions */}- <ExplorerToolbarAction aria-label="Run query" icon={<Play />} />+ <ExplorerToolbarAction aria-label="Run query" icon={<Play size={16} strokeWidth={2} />} /></ExplorerToolbarActions></ExplorerToolbar>```- The row defaults to 40px and follows `--header-height` at the `md` breakpoint.-- Use `ExplorerToolbarAction` for compact direct actions. Icon-only actions are 28px wide automatically.+- Use `ExplorerToolbarAction` for compact direct actions. Icon-only actions are 28px wide automatically. It defaults to `text-tertiary-foreground` and `hover:text-foreground`. Pass `size={16} strokeWidth={2}` on Lucide icons.- Keep execution, persistence, source selection, and other resource state in the consuming Explorer surface.- Extend layouts with children and `className`; avoid boolean props for resource-specific variants.diff --git a/apps/studio/components/interfaces/Explorer/ExplorerChatToolbar.tsx b/apps/studio/components/interfaces/Explorer/ExplorerChatToolbar.tsxindex 14edcaf9f6d..0c2511aa07f 100644--- a/apps/studio/components/interfaces/Explorer/ExplorerChatToolbar.tsx+++ b/apps/studio/components/interfaces/Explorer/ExplorerChatToolbar.tsx@@ -69,7 +69,7 @@ export const ExplorerChatToolbar = ({<div className="z-30 sticky top-0"><ExplorerToolbar aria-label="Chat toolbar"><ExplorerToolbarIcon>- <MessageSquare />+ <MessageSquare size={16} strokeWidth={2} /></ExplorerToolbarIcon><ExplorerToolbarTitle onSaveTitle={handleSaveName}>{chat?.name ?? ''}</ExplorerToolbarTitle><ExplorerToolbarActions>@@ -77,7 +77,7 @@ export const ExplorerChatToolbar = ({<DropdownMenuTrigger asChild><ExplorerToolbarActionaria-label="More options"- icon={<MoreVertical />}+ icon={<MoreVertical size={16} strokeWidth={2} />}disabled={isChatLoading}/></DropdownMenuTrigger>diff --git a/apps/studio/components/interfaces/Explorer/ExplorerHomeTab.tsx b/apps/studio/components/interfaces/Explorer/ExplorerHomeTab.tsxindex 54e97c0e193..a5c530116d4 100644--- a/apps/studio/components/interfaces/Explorer/ExplorerHomeTab.tsx+++ b/apps/studio/components/interfaces/Explorer/ExplorerHomeTab.tsx@@ -38,13 +38,6 @@ export const ExplorerHomeTab = () => {<section className="mt-6"><div className="grid grid-cols-1 gap-4 sm:grid-cols-2">- <ActionCard- icon={<NotebookText className="h-4 w-4 text-foreground" strokeWidth={1.5} />}- title="Create a notebook"- description="Combine notes, queries, and results"- bgColor="bg-blue-500"- onClick={() => createNotebook()}- /><ActionCardicon={<SquareCode className="h-4 w-4 text-foreground" strokeWidth={1.5} />}title="Run SQL"@@ -52,6 +45,13 @@ export const ExplorerHomeTab = () => {bgColor="bg-blue-500"onClick={createQuery}/>+ <ActionCard+ icon={<NotebookText className="h-4 w-4 text-foreground" strokeWidth={1.5} />}+ title="Create a notebook"+ description="Combine notes, queries, and results"+ bgColor="bg-blue-500"+ onClick={() => createNotebook()}+ /></div></section>diff --git a/apps/studio/components/interfaces/Explorer/ExplorerNotebookTab.tsx b/apps/studio/components/interfaces/Explorer/ExplorerNotebookTab.tsxindex d34f51cd77c..4ad4e4159ce 100644--- a/apps/studio/components/interfaces/Explorer/ExplorerNotebookTab.tsx+++ b/apps/studio/components/interfaces/Explorer/ExplorerNotebookTab.tsx@@ -359,12 +359,18 @@ export const ExplorerNotebookTab = () => {<div className="flex flex-col h-full bg-surface-100"><ExplorerToolbar className="px-4"><ExplorerToolbarIcon>- <NotebookText size={14} className="text-foreground-light" />+ <NotebookText size={16} strokeWidth={2} /></ExplorerToolbarIcon><ExplorerToolbarTitle onSaveTitle={handleSaveTitle}>{name ?? ''}</ExplorerToolbarTitle><ExplorerToolbarActions><ExplorerToolbarAction- icon={<AiIconAnimation size={16} />}+ className="group"+ icon={+ <AiIconAnimation+ size={16}+ className="text-tertiary-foreground group-hover:text-brand"+ />+ }loading={isCreating}disabled={cells.length === 0}tooltip={cells.length === 0 ? 'Add a cell to the notebook to analyze it' : undefined}@@ -374,7 +380,7 @@ export const ExplorerNotebookTab = () => {</ExplorerToolbarAction><ExplorerToolbarActionaria-label="Save changes"- icon={<Save />}+ icon={<Save size={16} strokeWidth={2} />}tooltip="Save changes"loading={isUpdating}onClick={handleSaveNotebook}@@ -382,7 +388,10 @@ export const ExplorerNotebookTab = () => {<ExplorerToolbarActions><DropdownMenu><DropdownMenuTrigger asChild>- <ExplorerToolbarAction aria-label="More options" icon={<MoreVertical />} />+ <ExplorerToolbarAction+ aria-label="More options"+ icon={<MoreVertical size={16} strokeWidth={2} />}+ /></DropdownMenuTrigger><DropdownMenuContent align="end" className="w-48"><DropdownMenuItem@@ -405,7 +414,7 @@ export const ExplorerNotebookTab = () => {</ExplorerToolbarActions><ExplorerToolbarActionaria-label="Run notebook"- icon={<Play />}+ icon={<Play size={16} strokeWidth={2} />}tooltip="Run notebook"loading={isRunningNotebook}disabled={queryCellIds.length === 0}diff --git a/apps/studio/components/interfaces/Explorer/ExplorerQueryTab.tsx b/apps/studio/components/interfaces/Explorer/ExplorerQueryTab.tsxindex 8dec7a680b5..5cc0ad4a3bd 100644--- a/apps/studio/components/interfaces/Explorer/ExplorerQueryTab.tsx+++ b/apps/studio/components/interfaces/Explorer/ExplorerQueryTab.tsx@@ -202,7 +202,10 @@ export const ExplorerQueryTab = () => {<><DropdownMenu><DropdownMenuTrigger asChild>- <ExplorerToolbarAction icon={<Save />} tooltip="Save query" />+ <ExplorerToolbarAction+ icon={<Save size={16} strokeWidth={2} />}+ tooltip="Save query"+ /></DropdownMenuTrigger><DropdownMenuContent className="w-52" align="end"><DropdownMenuSub>@@ -250,7 +253,7 @@ export const ExplorerQueryTab = () => {</DropdownMenu><DropdownMenu><DropdownMenuTrigger asChild>- <ExplorerToolbarAction icon={<MoreVertical />} />+ <ExplorerToolbarAction icon={<MoreVertical size={16} strokeWidth={2} />} /></DropdownMenuTrigger><DropdownMenuContent><DropdownMenuItemdiff --git a/apps/studio/components/interfaces/Explorer/ExplorerToolbar.tsx b/apps/studio/components/interfaces/Explorer/ExplorerToolbar.tsxindex 0c99f82e52d..ce1d9467803 100644--- a/apps/studio/components/interfaces/Explorer/ExplorerToolbar.tsx+++ b/apps/studio/components/interfaces/Explorer/ExplorerToolbar.tsx@@ -38,7 +38,7 @@ const ExplorerToolbarIcon = ({<spandata-slot="explorer-toolbar-icon"aria-hidden={ariaHidden}- className={cn('shrink-0 text-foreground-muted [&_svg]:size-3.5', className)}+ className={cn('shrink-0 text-tertiary-foreground', className)}{...props}/>)@@ -98,14 +98,19 @@ const ExplorerToolbarTitle = ({}}/>) : onSaveTitle ? (- <Button- variant="text"+ <ExplorerToolbarActionclassName="group/title"onClick={handleStartEditing}- iconRight={<Edit className="opacity-0 group-hover/title:opacity-100 transition" />}+ iconRight={+ <Edit+ size={16}+ strokeWidth={2}+ className="opacity-0 transition group-hover/title:opacity-100 group-focus-visible/title:opacity-100"+ />+ }>{title}- </Button>+ </ExplorerToolbarAction>) : (title)}@@ -139,6 +144,7 @@ export type ExplorerToolbarActionProps = Omit</*** The standard tiny, text-style button used for a direct toolbar action.* Icon-only actions receive the prototype's compact 28px width automatically.+ * `!h-auto !w-auto` lets Lucide's `size` prop win over Button `tiny`'s 14px icon box.*/const ExplorerToolbarAction = ({children,@@ -152,7 +158,12 @@ const ExplorerToolbarAction = ({data-slot="explorer-toolbar-action"variant="text"size="tiny"- className={cn(children == null && 'w-7 px-0', className)}+ className={cn(+ 'text-tertiary-foreground hover:text-foreground data-[state=open]:text-foreground',+ '[&>[aria-hidden]]:text-current [&_svg]:!h-auto [&_svg]:!w-auto',+ children == null && 'w-7 px-0',+ className+ )}tooltip={{ content: { side: 'bottom', text: tooltip } }}{...props}>diff --git a/apps/studio/components/interfaces/Explorer/QueryEditor/DisplaySettingsButton.tsx b/apps/studio/components/interfaces/Explorer/QueryEditor/DisplaySettingsButton.tsxindex 5534a2a633d..58967a2cd0f 100644--- a/apps/studio/components/interfaces/Explorer/QueryEditor/DisplaySettingsButton.tsx+++ b/apps/studio/components/interfaces/Explorer/QueryEditor/DisplaySettingsButton.tsx@@ -104,7 +104,11 @@ export const DisplaySettingsButton = ({return (<Popover><PopoverTrigger asChild>- <ExplorerToolbarAction disabled={disabled} icon={<Settings2 />} tooltip="Result settings" />+ <ExplorerToolbarAction+ disabled={disabled}+ icon={<Settings2 size={16} strokeWidth={2} />}+ tooltip="Result settings"+ /></PopoverTrigger><PopoverContentside="bottom"diff --git a/apps/studio/components/interfaces/Explorer/QueryEditor/QuerySourceMenu.tsx b/apps/studio/components/interfaces/Explorer/QueryEditor/QuerySourceMenu.tsxindex 61f6ffb8b6a..4cad8b12da4 100644--- a/apps/studio/components/interfaces/Explorer/QueryEditor/QuerySourceMenu.tsx+++ b/apps/studio/components/interfaces/Explorer/QueryEditor/QuerySourceMenu.tsx@@ -1,7 +1,6 @@import { useFlag, useParams } from 'common'import { Check, ChevronDown } from 'lucide-react'import {- Button,DropdownMenu,DropdownMenuContent,DropdownMenuItem,@@ -11,6 +10,7 @@ import {import { RowLimitSubMenu } from '../../SQLEditor/UtilityPanel/QuerySourceMenu/RowLimitSubMenu'import { RunAsSubMenu } from '../../SQLEditor/UtilityPanel/QuerySourceMenu/RunAsSubMenu'+import { ExplorerToolbarAction } from '../ExplorerToolbar'import { DatabaseParametersSubMenu } from '@/components/interfaces/QuerySources/DatabaseParametersSubMenu'import { LogsCustomRangeDialog } from '@/components/interfaces/QuerySources/LogsCustomRangeDialog'import { LogsTimeRangeSubMenu } from '@/components/interfaces/QuerySources/LogsTimeRangeSubMenu'@@ -75,16 +75,14 @@ export const QuerySourceMenu = ({<><DropdownMenu><DropdownMenuTrigger asChild>- <Button+ <ExplorerToolbarActiondisabled={disabled}- variant="text"- size="tiny"aria-label={`Query source: ${QUERY_SOURCE_LABELS[source._tag]}`}- icon={<QuerySourceIcon source={source._tag} className="text-foreground-light" />}- iconRight={<ChevronDown className="text-foreground-light" />}+ icon={<QuerySourceIcon source={source._tag} />}+ iconRight={<ChevronDown size={16} strokeWidth={2} />}>{QUERY_SOURCE_LABELS[source._tag]}- </Button>+ </ExplorerToolbarAction></DropdownMenuTrigger><DropdownMenuContent align="end" className="w-60">{availableSources.map((candidate) => (diff --git a/apps/studio/components/interfaces/Explorer/QueryEditor/index.tsx b/apps/studio/components/interfaces/Explorer/QueryEditor/index.tsxindex 8974a780ee0..96fd8e4a7c9 100644--- a/apps/studio/components/interfaces/Explorer/QueryEditor/index.tsx+++ b/apps/studio/components/interfaces/Explorer/QueryEditor/index.tsx@@ -368,7 +368,7 @@ export const QueryEditor = forwardRef<QueryEditorHandle, QueryEditorProps>(funct<Shell className={cn(variant === 'embedded' && 'mx-auto max-w-6xl', className)}><ExplorerToolbar className={cn(variant === 'viewport' && 'px-4')}><ExplorerToolbarIcon>- <CodeSquare size={14} />+ <CodeSquare size={16} strokeWidth={2} /></ExplorerToolbarIcon><ExplorerToolbarTitle onSaveTitle={onTitleChange}>{title}</ExplorerToolbarTitle><ExplorerToolbarActions>@@ -396,7 +396,9 @@ export const QueryEditor = forwardRef<QueryEditorHandle, QueryEditorProps>(funct/>)}<ExplorerToolbarAction- icon={showQuery ? <EyeOff /> : <Eye />}+ icon={+ showQuery ? <EyeOff size={16} strokeWidth={2} /> : <Eye size={16} strokeWidth={2} />+ }disabled={pendingProposal !== null}tooltip={showQuery ? 'Hide query' : 'Show query'}onClick={() => onShowQueryChange(!showQuery)}@@ -405,7 +407,7 @@ export const QueryEditor = forwardRef<QueryEditorHandle, QueryEditorProps>(funct{toolbarActions}<ExplorerToolbarAction- icon={<Play />}+ icon={<Play size={16} strokeWidth={2} />}loading={isExecuting}tooltip={hasSelection ? 'Run selected query' : 'Run query'}disabled={diff --git a/apps/studio/components/interfaces/Explorer/__tests__/ExplorerToolbar.test.tsx b/apps/studio/components/interfaces/Explorer/__tests__/ExplorerToolbar.test.tsxindex 6b748059c21..ff889ca523a 100644--- a/apps/studio/components/interfaces/Explorer/__tests__/ExplorerToolbar.test.tsx+++ b/apps/studio/components/interfaces/Explorer/__tests__/ExplorerToolbar.test.tsx@@ -35,7 +35,6 @@ describe('ExplorerToolbar', () => {const runAction = within(toolbar).getByRole('button', { name: 'Run cell' })expect(runAction).toHaveAttribute('data-slot', 'explorer-toolbar-action')expect(runAction).toHaveAttribute('data-size', 'tiny')- expect(runAction).toHaveClass('w-7', 'px-0')})it('supports labeled actions and forwards refs and native props', () => {@@ -64,6 +63,7 @@ describe('ExplorerToolbar', () => {expect(toolbar.querySelector('[data-slot="explorer-toolbar-actions"]')).toHaveClass('gap-px')expect(action).toHaveAttribute('data-command', 'analyze')expect(action).not.toHaveClass('w-7')+ expect(action).toHaveClass('text-tertiary-foreground', 'hover:text-foreground')expect(actionRef.current).toBe(action)})})diff --git a/apps/studio/components/layouts/ExplorerLayout/ExplorerLayout.tsx b/apps/studio/components/layouts/ExplorerLayout/ExplorerLayout.tsxindex 293ec7d6fde..fac0c33c638 100644--- a/apps/studio/components/layouts/ExplorerLayout/ExplorerLayout.tsx+++ b/apps/studio/components/layouts/ExplorerLayout/ExplorerLayout.tsx@@ -153,7 +153,7 @@ const NewTabButton = () => {<DropdownMenuContent className="w-40" align="end"><DropdownMenuItem className="gap-x-2" onClick={() => createQuery()}><SquareCode size={14} />- <span>New query</span>+ <span>Run SQL</span></DropdownMenuItem><DropdownMenuItem className="gap-x-2" onClick={() => createNotebook()}><NotebookText size={14} />diff --git a/apps/studio/components/ui/AIAssistantPanel/AssistantChat.tsx b/apps/studio/components/ui/AIAssistantPanel/AssistantChat.tsxindex 0b94d8cdb68..1a9aa92f849 100644--- a/apps/studio/components/ui/AIAssistantPanel/AssistantChat.tsx+++ b/apps/studio/components/ui/AIAssistantPanel/AssistantChat.tsx@@ -462,6 +462,19 @@ export const AssistantChat = ({}}, [composerContext?.initialInput])+ let placeholder: string+ if (hasMessages && isSupportChat) {+ placeholder = 'Share details so the assistant can help with your support request...'+ } else if (hasMessages) {+ placeholder = 'Ask a follow up question...'+ } else if ((composerContext?.sqlSnippets ?? []).length > 0) {+ placeholder = 'Ask a question or make a change...'+ } else if (isSupportChat) {+ placeholder = 'Describe your support issue...'+ } else {+ placeholder = 'Chat to Postgres...'+ }+return (<ErrorBoundarymessage="Something went wrong with the AI Assistant"@@ -614,102 +627,89 @@ export const AssistantChat = ({)}</AnimatePresence>- <div className="px-3 pb-3 z-20 relative w-full max-w-3xl mx-auto flex flex-col gap-y-3">- {isSupportChat && !isSupportChatClosed && (- <div>- <div className="mb-3 border-t" />- <div className="flex items-center gap-2">- <Button- variant="outline"- size="tiny"- disabled={!supportConversationId}- onClick={() => state.setSupportLifecycleStatus(chatId, 'escalated')}- >- Escalate to human- </Button>- <Button- variant="outline"- size="tiny"- disabled={!supportConversationId}- onClick={() => state.setSupportLifecycleStatus(chatId, 'user_resolved')}- >- Resolve- </Button>+ <div className="relative z-20 w-full px-7 pb-3">+ <div className="mx-auto flex w-full max-w-3xl flex-col gap-y-3">+ {isSupportChat && !isSupportChatClosed && (+ <div>+ <div className="mb-3 border-t" />+ <div className="flex items-center gap-2">+ <Button+ variant="outline"+ size="tiny"+ disabled={!supportConversationId}+ onClick={() => state.setSupportLifecycleStatus(chatId, 'escalated')}+ >+ Escalate to human+ </Button>+ <Button+ variant="outline"+ size="tiny"+ disabled={!supportConversationId}+ onClick={() => state.setSupportLifecycleStatus(chatId, 'user_resolved')}+ >+ Resolve+ </Button>+ </div></div>- </div>- )}-- {disablePrompts && (- <Admonition- showIcon={false}- type="default"- title="Assistant has been temporarily disabled"- description="We're currently looking into getting it back online"- />- )}+ )}- {isSuccess && !isApiKeySet && (- <Admonition- type="default"- title="OpenAI API key not set"- description={- <Markdown- content={- 'Add your `OPENAI_API_KEY` to your environment variables to use the AI Assistant.'- }- />- }- />- )}+ {disablePrompts && (+ <Admonition+ showIcon={false}+ type="default"+ title="Assistant has been temporarily disabled"+ description="We're currently looking into getting it back online"+ />+ )}- <AssistantChatForm- textAreaRef={inputRef}- className={cn(- 'z-20',- '[&>form>textarea]:text-base [&>form>textarea]:md:text-sm [&>form>textarea]:border',- '[&>form>textarea]:rounded-md [&>form>textarea]:outline-hidden!',- '[&>form>textarea]:ring-offset-0! [&>form>textarea]:ring-0!'+ {isSuccess && !isApiKeySet && (+ <Admonition+ type="default"+ title="OpenAI API key not set"+ description={+ <Markdown+ content={+ 'Add your `OPENAI_API_KEY` to your environment variables to use the AI Assistant.'+ }+ />+ }+ />)}- loading={isChatLoading}- isEditing={!!editingMessageId}- disabled={isChatInputDisabled}- placeholder={- hasMessages- ? isSupportChat- ? 'Share details so the assistant can help with your support request...'- : 'Ask a follow up question...'- : (composerContext?.sqlSnippets ?? []).length > 0- ? 'Ask a question or make a change...'- : isSupportChat- ? 'Describe your support issue...'- : 'Chat to Postgres...'- }- value={value}- onValueChange={(e) => {- setValue(e.target.value)- onInputChange?.(e.target.value)- }}- onSubmit={(finalMessage) => {- sendMessageToAssistant(finalMessage)- }}- onStop={() => {- stop()- // to save partial responses from the AI- const lastMessage = chatMessages[chatMessages.length - 1]- if (lastMessage && lastMessage.role === 'assistant') {- state.updateMessage(lastMessage, chatId)- }- }}- sqlSnippets={composerContext?.sqlSnippets}- onRemoveSnippet={(index) => {- const newSnippets = [...(composerContext?.sqlSnippets ?? [])]- newSnippets.splice(index, 1)- composerContext?.onSetSqlSnippets?.(newSnippets)- }}- includeSnippetsInMessage={includeSnippetsInMessage}- selectedModel={selectedModel}- onSelectModel={(model) => snap.setModel(model)}- />++ <AssistantChatForm+ textAreaRef={inputRef}+ className="z-20"+ loading={isChatLoading}+ isEditing={!!editingMessageId}+ disabled={isChatInputDisabled}+ placeholder={placeholder}+ value={value}+ onValueChange={(e) => {+ setValue(e.target.value)+ onInputChange?.(e.target.value)+ }}+ onSubmit={(finalMessage) => {+ sendMessageToAssistant(finalMessage)+ }}+ onStop={() => {+ stop()+ // to save partial responses from the AI+ const lastMessage = chatMessages[chatMessages.length - 1]+ if (lastMessage && lastMessage.role === 'assistant') {+ state.updateMessage(lastMessage, chatId)+ }+ }}+ sqlSnippets={composerContext?.sqlSnippets}+ onRemoveSnippet={(index) => {+ const newSnippets = [...(composerContext?.sqlSnippets ?? [])]+ newSnippets.splice(index, 1)+ composerContext?.onSetSqlSnippets?.(newSnippets)+ }}+ includeSnippetsInMessage={includeSnippetsInMessage}+ selectedModel={selectedModel}+ onSelectModel={(model) => snap.setModel(model)}+ />+ </div></div></div></ErrorBoundary>diff --git a/apps/studio/components/ui/AIAssistantPanel/AssistantNotebookPreview.tsx b/apps/studio/components/ui/AIAssistantPanel/AssistantNotebookPreview.tsxindex 4b273f3dd74..75c793a11c4 100644--- a/apps/studio/components/ui/AIAssistantPanel/AssistantNotebookPreview.tsx+++ b/apps/studio/components/ui/AIAssistantPanel/AssistantNotebookPreview.tsx@@ -86,7 +86,7 @@ export const AssistantNotebookPreview = ({<div className={cn('flex w-full min-w-0 max-w-6xl mx-auto flex-col', className)}><ExplorerToolbar aria-label="Notebook toolbar"><ExplorerToolbarIcon>- <NotebookText />+ <NotebookText size={16} strokeWidth={2} /></ExplorerToolbarIcon><ExplorerToolbarTitle>{title ?? FALLBACK_TITLE[mode]}</ExplorerToolbarTitle><ExplorerToolbarActions>diff --git a/apps/studio/components/ui/AIAssistantPanel/elements/Conversation.tsx b/apps/studio/components/ui/AIAssistantPanel/elements/Conversation.tsxindex 47144332cc3..dd0b6acc89c 100644--- a/apps/studio/components/ui/AIAssistantPanel/elements/Conversation.tsx+++ b/apps/studio/components/ui/AIAssistantPanel/elements/Conversation.tsx@@ -1,21 +1,33 @@import { ArrowDownIcon } from 'lucide-react'-import type { ComponentProps } from 'react'+import type { ComponentProps, ReactNode } from 'react'import { useCallback } from 'react'import { Button, cn } from 'ui'import { StickToBottom, useStickToBottomContext } from 'use-stick-to-bottom'-type ConversationProps = ComponentProps<typeof StickToBottom>+type ConversationProps = Omit<ComponentProps<typeof StickToBottom>, 'children'> & {+ children?: ReactNode+}type ConversationContentProps = ComponentProps<typeof StickToBottom.Content>type ConversationScrollButtonProps = ComponentProps<typeof Button>-export const Conversation = ({ className, ...props }: ConversationProps) => (+export const Conversation = ({ className, children, ...props }: ConversationProps) => (<StickToBottomclassName={cn('relative flex-1 overflow-y-auto', className)}initial="smooth"resize="smooth"role="log"{...props}- />+ >+ <div+ aria-hidden+ className="pointer-events-none absolute inset-x-0 top-0 z-10 h-8 bg-linear-to-b from-card to-transparent"+ />+ <div+ aria-hidden+ className="pointer-events-none absolute inset-x-0 bottom-0 z-10 h-8 bg-linear-to-t from-card to-transparent"+ />+ {children}+ </StickToBottom>)export const ConversationContent = ({ className, ...props }: ConversationContentProps) => (