diff --git a/uikit/src/button/styles.scss b/uikit/src/button/styles.scss index 17df7381f..69d8e522e 100644 --- a/uikit/src/button/styles.scss +++ b/uikit/src/button/styles.scss @@ -12,7 +12,7 @@ } &-outline { - @apply border-input hover:bg-primary hover:text-primary-foreground border bg-transparent; + @apply border-input border bg-transparent; } &-secondary { diff --git a/web/components/BasicPromptAccessories/index.tsx b/web/components/BasicPromptAccessories/index.tsx deleted file mode 100644 index 2f082ef44..000000000 --- a/web/components/BasicPromptAccessories/index.tsx +++ /dev/null @@ -1,26 +0,0 @@ -'use client' - -import SendButton from '../SendButton' - -const BasicPromptAccessories: React.FC = () => { - return ( -
- {/* Add future accessories here, e.g upload a file */} -
-
- {/* */} -
-
-
- -
-
- ) -} - -export default BasicPromptAccessories diff --git a/web/components/BasicPromptInput/index.tsx b/web/components/BasicPromptInput/index.tsx deleted file mode 100644 index df03e45d1..000000000 --- a/web/components/BasicPromptInput/index.tsx +++ /dev/null @@ -1,95 +0,0 @@ -'use client' - -import { ChangeEvent, useEffect, useRef } from 'react' - -import { useAtom, useAtomValue } from 'jotai' - -import { currentPromptAtom } from '@/containers/Providers/Jotai' - -import { useCreateConversation } from '@/hooks/useCreateConversation' - -import useSendChatMessage from '@/hooks/useSendChatMessage' - -import { getActiveConvoIdAtom } from '@/helpers/atoms/Conversation.atom' -import { selectedModelAtom } from '@/helpers/atoms/Model.atom' - -const BasicPromptInput: React.FC = () => { - const activeConversationId = useAtomValue(getActiveConvoIdAtom) - const selectedModel = useAtomValue(selectedModelAtom) - const [currentPrompt, setCurrentPrompt] = useAtom(currentPromptAtom) - const { sendChatMessage } = useSendChatMessage() - const { requestCreateConvo } = useCreateConversation() - - const textareaRef = useRef(null) - - const handleKeyDown = async ( - event: React.KeyboardEvent - ) => { - if (event.key === 'Enter') { - if (!event.shiftKey) { - if (activeConversationId) { - event.preventDefault() - sendChatMessage() - } else { - if (!selectedModel) { - console.log('No model selected') - return - } - await requestCreateConvo(selectedModel) - sendChatMessage() - } - } - } - } - - useEffect(() => { - adjustTextareaHeight() - }, [currentPrompt]) - - const handleMessageChange = (event: ChangeEvent) => { - setCurrentPrompt(event.target.value) - } - - // Auto adjust textarea height based on content - const MAX_ROWS = 30 - - const adjustTextareaHeight = () => { - if (textareaRef.current) { - textareaRef.current.style.height = 'auto' // 1 row - const scrollHeight = textareaRef.current.scrollHeight - const maxScrollHeight = - parseInt(window.getComputedStyle(textareaRef.current).lineHeight, 10) * - MAX_ROWS - textareaRef.current.style.height = `${Math.min( - scrollHeight, - maxScrollHeight - )}px` - } - } - - return ( -
-