diff --git a/frontend/src/components/ContextualSaveBar/index.jsx b/frontend/src/components/ContextualSaveBar/index.jsx index 056bf739..aab0b36f 100644 --- a/frontend/src/components/ContextualSaveBar/index.jsx +++ b/frontend/src/components/ContextualSaveBar/index.jsx @@ -8,8 +8,8 @@ export default function ContextualSaveBar({ if (!showing) return null; return ( -
-
+
+

Unsaved Changes

diff --git a/frontend/src/pages/Admin/Agents/SQLConnectorSelection/NewConnectionModal.jsx b/frontend/src/pages/Admin/Agents/SQLConnectorSelection/NewConnectionModal.jsx index 62f4722c..62235fed 100644 --- a/frontend/src/pages/Admin/Agents/SQLConnectorSelection/NewConnectionModal.jsx +++ b/frontend/src/pages/Admin/Agents/SQLConnectorSelection/NewConnectionModal.jsx @@ -74,7 +74,7 @@ export default function NewSQLConnection({ isOpen, closeModal, onSubmit }) { // to the parent container form so we don't have nested forms. return createPortal( -
+

@@ -114,7 +114,7 @@ export default function NewSQLConnection({ isOpen, closeModal, onSubmit }) { -
+
-
-
+
+
@@ -163,7 +163,7 @@ export default function NewSQLConnection({ isOpen, closeModal, onSubmit }) { spellCheck={false} />
-
+
@@ -179,8 +179,8 @@ export default function NewSQLConnection({ isOpen, closeModal, onSubmit }) {
-
-
+
+
@@ -194,7 +194,7 @@ export default function NewSQLConnection({ isOpen, closeModal, onSubmit }) { spellCheck={false} />
-
+
@@ -210,7 +210,7 @@ export default function NewSQLConnection({ isOpen, closeModal, onSubmit }) {
-
+
@@ -264,7 +264,7 @@ function DBEngine({ provider, active, onClick }) { PostgreSQL ); diff --git a/frontend/src/pages/Admin/Agents/index.jsx b/frontend/src/pages/Admin/Agents/index.jsx index d22bba82..9cb1a93a 100644 --- a/frontend/src/pages/Admin/Agents/index.jsx +++ b/frontend/src/pages/Admin/Agents/index.jsx @@ -4,7 +4,7 @@ import { isMobile } from "react-device-detect"; import Admin from "@/models/admin"; import System from "@/models/system"; import showToast from "@/utils/toast"; -import { CaretRight, Robot } from "@phosphor-icons/react"; +import { CaretLeft, CaretRight, Robot } from "@phosphor-icons/react"; import ContextualSaveBar from "@/components/ContextualSaveBar"; import { castToType } from "@/utils/types"; import { FullScreenLoader } from "@/components/Preloader"; @@ -17,6 +17,7 @@ export default function AdminAgents() { const [selectedSkill, setSelectedSkill] = useState(""); const [agentSkills, setAgentSkills] = useState([]); const [loading, setLoading] = useState(true); + const [showSkillModal, setShowSkillModal] = useState(false); const formEl = useRef(null); // Alert user if they try to leave the page with unsaved changes @@ -110,21 +111,19 @@ export default function AdminAgents() {
); } - return ( -
- -
setHasChanges(false)} + handleSubmit={handleSubmit} >
setHasChanges(true)} ref={formEl} - className="flex-1 flex gap-x-6 p-4 mt-10" + className="flex flex-col w-full p-4 mt-10" > {/* Skill settings nav */} -
+ - {/* Selected agent skill setting panel */} -
-
- {SelectedSkillComponent ? ( - - ) : ( -
- -

Select an agent skill

+ {/* Selected agent skill modal */} + {showSkillModal && ( +
+
+
+
- )} +
+
+ {SelectedSkillComponent ? ( + + ) : ( +
+ +

Select an agent skill

+
+ )} +
+
+
-
+ )} + + ); + } + + return ( + setHasChanges(false)} + handleSubmit={handleSubmit} + > +
setHasChanges(true)} + ref={formEl} + className="flex-1 flex gap-x-6 p-4 mt-10" + > + + + {/* Skill settings nav */} +
+
+ +

Agent Skills

+
+ + {/* Default skills list */} + + {/* Configurable skills */} + +
+ + {/* Selected agent skill setting panel */} +
+
+ {SelectedSkillComponent ? ( + + ) : ( +
+ +

Select an agent skill

+
+ )} +
+
+
+
+ ); +} + +function SkillLayout({ children, hasChanges, handleSubmit, handleCancel }) { + return ( +
+ +
+ {children} setHasChanges(false)} + onCancel={handleCancel} />
@@ -199,7 +309,11 @@ function SkillList({ if (skills.length === 0) return null; return ( -
+
{Object.entries(skills).map(([skill, settings], index) => (