diff --git a/frontend/src/pages/WorkspaceSettings/AgentConfig/index.jsx b/frontend/src/pages/WorkspaceSettings/AgentConfig/index.jsx index b6994a14dc..d0db3a6843 100644 --- a/frontend/src/pages/WorkspaceSettings/AgentConfig/index.jsx +++ b/frontend/src/pages/WorkspaceSettings/AgentConfig/index.jsx @@ -8,8 +8,10 @@ import Admin from "@/models/admin"; import * as Skeleton from "react-loading-skeleton"; import "react-loading-skeleton/dist/skeleton.css"; import paths from "@/utils/paths"; +import useUser from "@/hooks/useUser"; export default function WorkspaceAgentConfiguration({ workspace }) { + const { user } = useUser(); const [settings, setSettings] = useState({}); const [hasChanges, setHasChanges] = useState(false); const [saving, setSaving] = useState(false); @@ -84,21 +86,26 @@ export default function WorkspaceAgentConfiguration({ workspace }) { workspace={workspace} setHasChanges={setHasChanges} /> - {!hasChanges && ( -
- - Configure Agent Skills - -

- Customize and enhance the default agent's capabilities by enabling - or disabling specific skills. These settings will be applied - across all workspaces. -

-
+ {(!user || user?.role === "admin") && ( + <> + {!hasChanges && ( +
+ + Configure Agent Skills + +

+ Customize and enhance the default agent's capabilities by + enabling or disabling specific skills. These settings will be + applied across all workspaces. +

+
+ )} + )} + {hasChanges && (