| 18 | const isDarkMode = useDarkMode(); |
| 19 | |
| 20 | const handleExampleClick = async (content: string) => { |
| 21 | let conversation = conversationStore.getConversationById(conversationStore.currentConversationId); |
| 22 | if (!conversation) { |
| 23 | const currentConnectionCtx = connectionStore.currentConnectionCtx; |
| 24 | if (!currentConnectionCtx) { |
| 25 | conversation = conversationStore.createConversation(); |
| 26 | } else { |
| 27 | conversation = conversationStore.createConversation(currentConnectionCtx.connection.id, currentConnectionCtx.database?.name); |
| 28 | } |
| 29 | } |
| 30 | await sendMessage(content); |
| 31 | }; |
| 32 | |
| 33 | return ( |
| 34 | <div className={`${className || ""} w-full h-full flex flex-col justify-start items-center`}> |