'use client'; import { ResizablePanel } from "@/components/ui/resizable"; import { ChatBox } from "@/features/chat/components/chatBox"; import { ChatBoxToolbar } from "@/features/chat/components/chatBox/chatBoxToolbar"; import { CustomSlateEditor } from "@/features/chat/customSlateEditor"; import { useCreateNewChatThread } from "@/features/chat/useCreateNewChatThread"; import { LanguageModelInfo } from "@/features/chat/types"; import { RepositoryQuery, SearchContextQuery } from "@/lib/types"; import { useCallback, useState } from "react"; import { Descendant } from "slate"; import { useLocalStorage } from "usehooks-ts"; import { ContextItem } from "@/features/chat/components/chatBox/contextSelector"; interface NewChatPanelProps { languageModels: LanguageModelInfo[]; repos: RepositoryQuery[]; searchContexts: SearchContextQuery[]; order: number; } export const NewChatPanel = ({ languageModels, repos, searchContexts, order, }: NewChatPanelProps) => { const [selectedItems, setSelectedItems] = useLocalStorage("selectedContextItems", [], { initializeWithValue: false }); const { createNewChatThread, isLoading } = useCreateNewChatThread(); const [isContextSelectorOpen, setIsContextSelectorOpen] = useState(false); const onSubmit = useCallback((children: Descendant[]) => { createNewChatThread(children, selectedItems); }, [createNewChatThread, selectedItems]); return (

What can I help you understand?

) }