diff --git a/gui/src/components/mainInput/ComboBox.tsx b/gui/src/components/mainInput/ComboBox.tsx
index 65672ca86..f6b2e8646 100644
--- a/gui/src/components/mainInput/ComboBox.tsx
+++ b/gui/src/components/mainInput/ComboBox.tsx
@@ -243,21 +243,6 @@ const EnterButton = styled.div<{ offFocus: boolean }>`
cursor: pointer;
`;
-const StopButton = styled.div`
- width: fit-content;
- margin-right: auto;
- margin-left: auto;
-
- font-size: 12px;
-
- border: 0.5px solid ${lightGray};
- border-radius: ${defaultBorderRadius};
- padding: 4px 8px;
- color: ${lightGray};
-
- cursor: pointer;
-`;
-
const NewSessionButton = styled.div`
width: fit-content;
margin-right: auto;
@@ -938,16 +923,6 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => {
backgroundColor: vscBackground,
}}
>
- {active && props.isMainInput && (
- {
- client?.stopSession();
- dispatch(setActive(false));
- }}
- >
- ⌘ ⌫ Cancel
-
- )}
{selectedContextItems.length === 0 && props.isMainInput && (
{
- const handleKeyDown = (event: any) => {
- if (event.metaKey && event.altKey && event.code === "KeyN") {
- client?.stopSession();
- persistSession();
- dispatch(newSession());
- mainTextInputRef.current?.focus?.();
- }
- };
-
- window.addEventListener("keydown", handleKeyDown);
-
- return () => {
- window.removeEventListener("keydown", handleKeyDown);
- };
- }, [client, persistSession, mainTextInputRef]);
-
useEffect(() => {
const handler = (event: any) => {
if (event.data.type === "newSession") {
@@ -824,19 +784,30 @@ function GUI(props: GUIProps) {
-
{
- onMainTextInput(e);
- e?.stopPropagation();
- e?.preventDefault();
- }}
- onInputValueChange={() => {}}
- onToggleAddContext={() => {
- client?.toggleAddingHighlightedCode();
- }}
- />
+ {active ? (
+ {
+ client?.stopSession();
+ dispatch(setActive(false));
+ }}
+ >
+ ⌘ ⌫ Cancel
+
+ ) : (
+ {
+ onMainTextInput(e);
+ e?.stopPropagation();
+ e?.preventDefault();
+ }}
+ onInputValueChange={() => {}}
+ onToggleAddContext={() => {
+ client?.toggleAddingHighlightedCode();
+ }}
+ />
+ )}
);