diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx
index 5abb4c0b..67e2bcd8 100644
--- a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx
+++ b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx
@@ -8,7 +8,7 @@ import { isMobile } from "react-device-detect";
import debounce from "lodash.debounce";
export default function PromptInput({
- className,
+ className = "bottom-0",
workspace,
message,
submit,
diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/index.jsx
index 34095d82..6e846e7a 100644
--- a/frontend/src/components/WorkspaceChat/ChatContainer/index.jsx
+++ b/frontend/src/components/WorkspaceChat/ChatContainer/index.jsx
@@ -1,7 +1,6 @@
import Workspace from "@/models/workspace";
import handleChat from "@/utils/chat";
import { extractMetaData } from "@/utils/chat/extractMetaData";
-import { CursorClick, Keyboard } from "@phosphor-icons/react";
import { useEffect, useState } from "react";
import { isMobile } from "react-device-detect";
import { useParams } from "react-router-dom";
@@ -21,16 +20,14 @@ export default function ChatContainer({
const [message, setMessage] = useState("");
const [loadingResponse, setLoadingResponse] = useState(false);
const [chatHistory, setChatHistory] = useState(knownHistory);
- const [finalizedChatHistory, setFinalizedChatHistory] =
- useState(knownHistory);
- const [isForcedTextInput, setIsForcedTextInput] = useState(false);
+ const [finalizedChatHistory, setFinalizedChatHistory] = useState(knownHistory);
const handleMessageChange = (event) => {
setMessage(event.target.value);
};
const handleSubmit = async (event) => {
- event.preventDefault();
+ event?.preventDefault();
if (!message || message === "") return false;
const prevChatHistory = [
@@ -122,7 +119,6 @@ export default function ChatContainer({
_chatHistory[_chatHistory.length - 1].content = remainingText;
setFinalizedChatHistory(_chatHistory);
setCurrentInputMeta(metaData);
- console.log("metaData", metaData);
}
return;
@@ -130,32 +126,6 @@ export default function ChatContainer({
loadingResponse === true && fetchReply();
}, [loadingResponse, chatHistory, workspace]);
- const renderInputComponent = () => {
- if (
- !isDynamicInput ||
- currentInputMeta?.inputs?.type === "text" ||
- currentInputMeta?.inputs === undefined ||
- isForcedTextInput
- ) {
- return (
-
- );
- }
-
- if (currentInputMeta?.inputs?.type !== "text") {
- return
;
- }
- };
-
return (
- {renderInputComponent()}
- {isDynamicInput && currentInputMeta?.inputs != undefined && (
-
-
-
+ {isDynamicInput && currentInputMeta?.inputs?.type !== undefined ? (
+
+ ) : (
+
)}