mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-19 12:40:09 +01:00
Merge branch 'master' into dark-mode
This commit is contained in:
commit
79898610cc
@ -8,8 +8,10 @@ import Admin from "@/models/admin";
|
|||||||
import * as Skeleton from "react-loading-skeleton";
|
import * as Skeleton from "react-loading-skeleton";
|
||||||
import "react-loading-skeleton/dist/skeleton.css";
|
import "react-loading-skeleton/dist/skeleton.css";
|
||||||
import paths from "@/utils/paths";
|
import paths from "@/utils/paths";
|
||||||
|
import useUser from "@/hooks/useUser";
|
||||||
|
|
||||||
export default function WorkspaceAgentConfiguration({ workspace }) {
|
export default function WorkspaceAgentConfiguration({ workspace }) {
|
||||||
|
const { user } = useUser();
|
||||||
const [settings, setSettings] = useState({});
|
const [settings, setSettings] = useState({});
|
||||||
const [hasChanges, setHasChanges] = useState(false);
|
const [hasChanges, setHasChanges] = useState(false);
|
||||||
const [saving, setSaving] = useState(false);
|
const [saving, setSaving] = useState(false);
|
||||||
@ -84,6 +86,8 @@ export default function WorkspaceAgentConfiguration({ workspace }) {
|
|||||||
workspace={workspace}
|
workspace={workspace}
|
||||||
setHasChanges={setHasChanges}
|
setHasChanges={setHasChanges}
|
||||||
/>
|
/>
|
||||||
|
{(!user || user?.role === "admin") && (
|
||||||
|
<>
|
||||||
{!hasChanges && (
|
{!hasChanges && (
|
||||||
<div className="flex flex-col gap-y-4">
|
<div className="flex flex-col gap-y-4">
|
||||||
<a
|
<a
|
||||||
@ -93,12 +97,15 @@ export default function WorkspaceAgentConfiguration({ workspace }) {
|
|||||||
Configure Agent Skills
|
Configure Agent Skills
|
||||||
</a>
|
</a>
|
||||||
<p className="text-white text-opacity-60 text-xs font-medium">
|
<p className="text-white text-opacity-60 text-xs font-medium">
|
||||||
Customize and enhance the default agent's capabilities by enabling
|
Customize and enhance the default agent's capabilities by
|
||||||
or disabling specific skills. These settings will be applied
|
enabling or disabling specific skills. These settings will be
|
||||||
across all workspaces.
|
applied across all workspaces.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
{hasChanges && (
|
{hasChanges && (
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
|
Loading…
Reference in New Issue
Block a user