diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..ea24ab00 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,31 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Next.js: debug server-side", + "type": "node-terminal", + "request": "launch", + "cwd": "${workspaceFolder}/src", + "command": "npm run dev" + }, + { + "name": "Next.js: debug client-side", + "type": "chrome", + "request": "launch", + "cwd": "${workspaceFolder}/src", + "url": "http://localhost:3000" + }, + { + "name": "Next.js: debug full stack", + "type": "node-terminal", + "request": "launch", + "cwd": "${workspaceFolder}/src", + "command": "npm run dev", + "serverReadyAction": { + "pattern": "started server on .+, url: (https?://.+)", + "uriFormat": "%s", + "action": "debugWithChrome" + } + } + ] + } \ No newline at end of file diff --git a/src/features/chat/chat-ui/chat-empty-state.tsx b/src/features/chat/chat-ui/chat-empty-state.tsx index afa4e53a..627a6724 100644 --- a/src/features/chat/chat-ui/chat-empty-state.tsx +++ b/src/features/chat/chat-ui/chat-empty-state.tsx @@ -20,7 +20,9 @@ interface Prop { } export const EmptyState: FC = (props) => { + const [showFileUpload, setShowFileUpload] = useState("simple"); + const [isFileNull, setIsFileNull] = useState(true); const onSubmit = async (e: React.FormEvent) => { e.preventDefault(); @@ -31,6 +33,7 @@ export const EmptyState: FC = (props) => { const onChatTypeChange = (value: ChatType) => { setShowFileUpload(value); + setIsFileNull(true); props.onChatTypeChange(value); }; @@ -85,11 +88,12 @@ export const EmptyState: FC = (props) => { required disabled={props.isUploadingFile} placeholder="Describe the purpose of the document" + onChange={(e) => {setIsFileNull(e.currentTarget.value === null)}} />