diff --git a/ui/desktop/package-lock.json b/ui/desktop/package-lock.json index 4392ad14..c72dee99 100644 --- a/ui/desktop/package-lock.json +++ b/ui/desktop/package-lock.json @@ -37,7 +37,7 @@ "express": "^4.21.1", "framer-motion": "^11.11.11", "lodash": "^4.17.21", - "lucide-react": "^0.454.0", + "lucide-react": "^0.475.0", "react": "^18.3.1", "react-dom": "^18.3.1", "react-icons": "^5.3.0", @@ -11454,12 +11454,12 @@ } }, "node_modules/lucide-react": { - "version": "0.454.0", - "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.454.0.tgz", - "integrity": "sha512-hw7zMDwykCLnEzgncEEjHeA6+45aeEzRYuKHuyRSOPkhko+J3ySGjGIzu+mmMfDFG1vazHepMaYFYHbTFAZAAQ==", + "version": "0.475.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.475.0.tgz", + "integrity": "sha512-NJzvVu1HwFVeZ+Gwq2q00KygM1aBhy/ZrhY9FsAgJtpB+E4R7uxRk9M2iKvHa6/vNxZydIB59htha4c2vvwvVg==", "license": "ISC", "peerDependencies": { - "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc" + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "node_modules/magic-string": { diff --git a/ui/desktop/package.json b/ui/desktop/package.json index cffe67cd..4eb409e1 100644 --- a/ui/desktop/package.json +++ b/ui/desktop/package.json @@ -109,7 +109,7 @@ "express": "^4.21.1", "framer-motion": "^11.11.11", "lodash": "^4.17.21", - "lucide-react": "^0.454.0", + "lucide-react": "^0.475.0", "react": "^18.3.1", "react-dom": "^18.3.1", "react-icons": "^5.3.0", diff --git a/ui/desktop/src/components/Input.tsx b/ui/desktop/src/components/ChatInput.tsx similarity index 68% rename from ui/desktop/src/components/Input.tsx rename to ui/desktop/src/components/ChatInput.tsx index 6127d0bb..669eaef3 100644 --- a/ui/desktop/src/components/Input.tsx +++ b/ui/desktop/src/components/ChatInput.tsx @@ -1,8 +1,10 @@ import React, { useRef, useState, useEffect, useCallback } from 'react'; import { Button } from './ui/button'; +import type { View } from '../App'; import Stop from './ui/Stop'; import { Attach, Send } from './icons'; import { debounce } from 'lodash'; +import BottomMenu from './bottom_menu/BottomMenu'; interface InputProps { handleSubmit: (e: React.FormEvent) => void; @@ -11,6 +13,8 @@ interface InputProps { commandHistory?: string[]; initialValue?: string; droppedFiles?: string[]; + setView: (view: View) => void; + numTokens?: number; } export default function Input({ @@ -19,10 +23,13 @@ export default function Input({ onStop, commandHistory = [], initialValue = '', + setView, + numTokens, droppedFiles = [], }: InputProps) { const [_value, setValue] = useState(initialValue); const [displayValue, setDisplayValue] = useState(initialValue); // For immediate visual feedback + const [isFocused, setIsFocused] = useState(false); // Update internal value when initialValue changes useEffect(() => { @@ -205,65 +212,82 @@ export default function Input({ }; return ( -
-