import { Button } from '@/components/ui/button' import { PromptForm } from '@/components/prompt-form' import { ButtonScrollToBottom } from '@/components/button-scroll-to-bottom' import { IconRefresh, IconSpinner, IconStop } from '@/components/ui/icons' import { functionSchemas } from '@/lib/functions/schemas' import { cn } from '@/lib/utils' import { FadeIn } from './landing/fade-in' import { useTranslation } from 'react-i18next' import { UseChatHelpers } from '@aigxion/isdk/react' export interface ChatPanelProps extends Pick< UseChatHelpers, | 'append' | 'isLoading' | 'reload' | 'messages' | 'stop' | 'input' | 'setInput' > { id?: string } export function ChatPanel({ id, isLoading, stop, append, reload, input, setInput, messages }: ChatPanelProps) { const { t } = useTranslation(); console.log("messages : ", messages) return (
1 ? 'fixed bottom-0 bg-[#f6f6f6] z-[999]' : "absolute bg-[#fff]" )} // style={{ // top: messages.length > 1 ? 'auto' : "180px", // // backgroundColor: messages.length > 1 ? '#fff' : "", // }} > {/* */}
{/*
{isLoading ? ( ) : ( messages?.length > 1 && ( ) )}
*/} {/*
*/}
{ await new Promise(r => setTimeout(r, 300)); await append( { id, content: value, role: 'user' }, { functions: functionSchemas } ) }} input={input} setInput={setInput} isLoading={isLoading} />
) }