summaryrefslogtreecommitdiff
path: root/extension/react-app/src/tabs
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-07-06 20:07:45 -0700
committerNate Sesti <sestinj@gmail.com>2023-07-06 20:07:45 -0700
commit58317604298800ccea238dd34d5ac6537ede4529 (patch)
tree701343ce7479668c73e582f2cc94bc6f21565ba1 /extension/react-app/src/tabs
parentee37fd0c5582bbe4b2163faa19846d980b5aa6ef (diff)
downloadsncontinue-58317604298800ccea238dd34d5ac6537ede4529.tar.gz
sncontinue-58317604298800ccea238dd34d5ac6537ede4529.tar.bz2
sncontinue-58317604298800ccea238dd34d5ac6537ede4529.zip
details
Diffstat (limited to 'extension/react-app/src/tabs')
-rw-r--r--extension/react-app/src/tabs/gui.tsx26
1 files changed, 2 insertions, 24 deletions
diff --git a/extension/react-app/src/tabs/gui.tsx b/extension/react-app/src/tabs/gui.tsx
index c8a42d9a..1ea70dd2 100644
--- a/extension/react-app/src/tabs/gui.tsx
+++ b/extension/react-app/src/tabs/gui.tsx
@@ -217,25 +217,10 @@ function GUI(props: GUIProps) {
[client]
);
- useEffect(() => {
- if (mainTextInputRef.current) {
- mainTextInputRef.current.focus();
- let handler = (event: any) => {
- if (event.data.type === "focusContinueInput") {
- mainTextInputRef.current?.focus();
- }
- };
- window.addEventListener("message", handler);
- return () => {
- window.removeEventListener("message", handler);
- };
- }
- }, [mainTextInputRef]);
-
const onMainTextInput = () => {
if (mainTextInputRef.current) {
- let input = mainTextInputRef.current.value;
- mainTextInputRef.current.value = "";
+ const input = (mainTextInputRef.current as any).inputValue;
+ (mainTextInputRef.current as any).setInputValue("");
if (!client) return;
setWaitingForSteps(true);
@@ -266,13 +251,6 @@ function GUI(props: GUIProps) {
setUserInputQueue((queue) => {
return [...queue, input];
});
-
- // Delete all context items unless locked
- if (!pinned) {
- client?.deleteContextAtIndices(
- highlightedRanges.map((_, index) => index)
- );
- }
}
};