hunk.code_window:             | CONDENSE_QUESTION_PROMPT
               | ChatLiteLLM(temperature=0, model=self.model)
               | StrOutputParser(),
           }
           prompt_custom_user = self.prompt_to_use()
  
hunk.labels: keep keep add keep keep keep
hunk.after_edit:             "chat_history": itemgetter("chat_history"),
  
hunk.file_path: backend/modules/brain/rags/quivr_rag.py
hunk.type: add
file: "use client";
  
  import { CurrentBrain } from "@/lib/components/CurrentBrain/CurrentBrain";
  import Icon from "@/lib/components/ui/Icon/Icon";
  import { LoaderIcon } from "@/lib/components/ui/LoaderIcon/LoaderIcon";
  import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainContext";
  
  import { ChatEditor } from "./components/ChatEditor/ChatEditor";
  import { useChatInput } from "./hooks/useChatInput";
  import styles from "./index.module.scss";
  
  export const ChatInput = (): JSX.Element => {
    const { setMessage, submitQuestion, generatingAnswer, message } =
      useChatInput();
    const { currentBrain } = useBrainContext();
  
    const handleSubmitQuestion = () => {
      if (message.trim() !== "") {
        submitQuestion();
      }
    };
  
    return (
      <>
        <form
          data-testid="chat-input-form"
          onSubmit={(e) => {
            e.preventDefault();
            handleSubmitQuestion();
          }}
        >
          <div className={styles.chat_container}>
            <CurrentBrain allowingRemoveBrain={false} />
            <div
              className={`
              ${styles.chat_wrapper}
              ${currentBrain ? styles.with_brain : ""}
            `}
            >
              <ChatEditor
                message={message}
                setMessage={setMessage}
                onSubmit={handleSubmitQuestion}
              />
              {generatingAnswer ? (
                <LoaderIcon size="large" color="accent" />
              ) : (
                <Icon
                  name="followUp"
                  size="large"
                  color="accent"
                  disabled={!message}
                  handleHover={true}
                  onClick={handleSubmitQuestion}
                />
              )}
            </div>
          </div>
        </form>
      </>
    );
  };
  