summaryrefslogtreecommitdiff
path: root/extension
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-06-01 20:59:10 -0400
committerNate Sesti <sestinj@gmail.com>2023-06-01 20:59:10 -0400
commitef0fcedffc53b5ba455b230b112306a46ee0235f (patch)
treef430946200daa92e00682b27526653d564a8e512 /extension
parent5ce90853586fcfaa7d795e2593aaaecce4bbed49 (diff)
downloadsncontinue-ef0fcedffc53b5ba455b230b112306a46ee0235f.tar.gz
sncontinue-ef0fcedffc53b5ba455b230b112306a46ee0235f.tar.bz2
sncontinue-ef0fcedffc53b5ba455b230b112306a46ee0235f.zip
enter secrets directly into .env file
Diffstat (limited to 'extension')
-rw-r--r--extension/react-app/src/components/StepContainer.tsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/extension/react-app/src/components/StepContainer.tsx b/extension/react-app/src/components/StepContainer.tsx
index ec601ea7..5e979b34 100644
--- a/extension/react-app/src/components/StepContainer.tsx
+++ b/extension/react-app/src/components/StepContainer.tsx
@@ -80,6 +80,13 @@ function StepContainer(props: StepContainerProps) {
const [open, setOpen] = useState(false);
const [isHovered, setIsHovered] = useState(false);
const naturalLanguageInputRef = useRef<HTMLTextAreaElement>(null);
+ const userInputRef = useRef<HTMLInputElement>(null);
+
+ useEffect(() => {
+ if (userInputRef?.current) {
+ userInputRef.current.focus();
+ }
+ }, [userInputRef]);
useEffect(() => {
if (isHovered) {
@@ -136,6 +143,7 @@ function StepContainer(props: StepContainerProps) {
{props.historyNode.step.name === "Waiting for user input" && (
<input
+ ref={userInputRef}
className="m-auto p-2 rounded-md border-1 border-solid text-white w-3/4 border-gray-200 bg-vsc-background"
onKeyDown={(e) => {
if (e.key === "Enter") {