@@ -274,36 +301,26 @@ function ModelSelect() {
{!isConfigLoading && (
<>
-
-
{selectedProfile?.profileType === "local" && (
-
+
{getMetaKeyLabel()}' to toggle model
diff --git a/gui/src/components/modelSelection/Toggle.tsx b/gui/src/components/modelSelection/Toggle.tsx
deleted file mode 100644
index 02f99e974..000000000
--- a/gui/src/components/modelSelection/Toggle.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-import styled from "styled-components";
-import {
- defaultBorderRadius,
- lightGray,
- vscInputBackground,
- vscListActiveBackground,
- vscListActiveForeground,
-} from "..";
-
-const TopDiv = styled.div`
- display: flex;
- align-items: center;
- text-align: center;
- margin: auto;
- width: fit-content;
- cursor: pointer;
-
- border: 1px solid ${lightGray};
-
- background-color: ${vscInputBackground};
- border-radius: ${defaultBorderRadius};
-
- &:hover {
- background-color: ${lightGray}55;
- }
-`;
-
-const SubDiv = styled.div<{ selected: boolean }>`
- text-align: center;
- padding: 8px 12px;
- border-radius: ${defaultBorderRadius};
-
- transition: all 0.2s ease-in-out;
-
- ${(props) =>
- props.selected &&
- `
- background-color: ${vscListActiveBackground};
- color: ${vscListActiveForeground};
- `}
-`;
-
-function Toggle(props: {
- optionOne: string;
- optionTwo: string;
- selected: boolean;
- onClick: () => void;
-}) {
- return (
-
- {props.optionOne}
- {props.optionTwo}
-
- );
-}
-
-export default Toggle;
diff --git a/gui/src/pages/config/index.tsx b/gui/src/pages/config/index.tsx
index 4e654566f..953184d7d 100644
--- a/gui/src/pages/config/index.tsx
+++ b/gui/src/pages/config/index.tsx
@@ -1,5 +1,5 @@
import { isOnPremSession } from "core/control-plane/AuthTypes";
-import React, { useEffect, useState } from "react";
+import React, { useState } from "react";
import { useNavigate, useSearchParams } from "react-router-dom";
import { AssistantAndOrgListbox } from "../../components/AssistantAndOrgListbox";
import Alert from "../../components/gui/Alert";
@@ -14,17 +14,11 @@ function ConfigPage() {
useNavigationListener();
const navigate = useNavigate();
const [searchParams] = useSearchParams();
- const [activeTab, setActiveTab] = useState("settings");
+ const [activeTab, setActiveTab] = useState(() => {
+ return searchParams.get("tab") || "settings";
+ });
const { session, organizations } = useAuth();
- // Set initial tab from URL parameter
- useEffect(() => {
- const tab = searchParams.get("tab");
- if (tab) {
- setActiveTab(tab);
- }
- }, [searchParams]);
-
const allTabs = getAllTabs();
const shouldRenderOrgInfo =
session && organizations.length > 1 && !isOnPremSession(session);