diff --git a/embed/src/components/ChatWindow/ChatContainer/PromptInput/index.jsx b/embed/src/components/ChatWindow/ChatContainer/PromptInput/index.jsx index 5231b0f5..feddbc0d 100644 --- a/embed/src/components/ChatWindow/ChatContainer/PromptInput/index.jsx +++ b/embed/src/components/ChatWindow/ChatContainer/PromptInput/index.jsx @@ -2,7 +2,6 @@ import { CircleNotch, PaperPlaneRight } from "@phosphor-icons/react"; import React, { useState, useRef } from "react"; export default function PromptInput({ - setttings, message, submit, onChange, diff --git a/embed/src/components/ChatWindow/ChatContainer/index.jsx b/embed/src/components/ChatWindow/ChatContainer/index.jsx index 9c1ffa36..505142de 100644 --- a/embed/src/components/ChatWindow/ChatContainer/index.jsx +++ b/embed/src/components/ChatWindow/ChatContainer/index.jsx @@ -79,7 +79,6 @@ export default function ChatContainer({
{ + const input = e.target.value; + if (input === "/") setShowSlashCommand(true); + if (showSlashCommand) setShowSlashCommand(false); + return; + }; + const captureEnter = (event) => { if (event.keyCode == 13) { if (!event.shiftKey) { @@ -42,6 +50,7 @@ export default function PromptInput({ : "1px"; }; + const watchForSlash = debounce(checkForSlash, 300); return (
{ + onChange(e); + watchForSlash(e); + }} required={true} disabled={inputDisabled} onFocus={() => setFocused(true)}