Skip to content
Snippets Groups Projects
Commit 81939fe2 authored by timothycarambat's avatar timothycarambat
Browse files

Patch gear showing on llms with no settings

parent 61920806
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ import System from "@/models/system";
import showToast from "@/utils/toast";
import { useEffect, useState } from "react";
const NO_SETTINGS_NEEDED = ["default", "none"];
export default function AgentLLMItem({
llm,
availableLLMs,
......@@ -73,18 +74,20 @@ export default function AgentLLMItem({
<div className="mt-1 text-xs text-white/60">{description}</div>
</div>
</div>
{checked && value !== "none" && (
<button
onClick={(e) => {
e.preventDefault();
openModal();
}}
className="p-2 text-white/60 hover:text-white hover:bg-theme-bg-hover rounded-md transition-all duration-300"
title="Edit Settings"
>
<Gear size={20} weight="bold" />
</button>
)}
{checked &&
value !== "none" &&
!NO_SETTINGS_NEEDED.includes(value) && (
<button
onClick={(e) => {
e.preventDefault();
openModal();
}}
className="border-none p-2 text-white/60 hover:text-white hover:bg-theme-bg-hover rounded-md transition-all duration-300"
title="Edit Settings"
>
<Gear size={20} weight="bold" />
</button>
)}
</div>
</div>
<SetupProvider
......
......@@ -48,11 +48,12 @@ const WARN_PERFORMANCE = [
];
const LLM_DEFAULT = {
name: "Please make a selection",
name: "System Default",
value: "none",
logo: AnythingLLMIcon,
options: () => <React.Fragment />,
description: "Agents will not work until a valid selection is made.",
description:
"Agents will use the workspace or system LLM unless otherwise specified.",
requiredConfig: [],
};
......
......@@ -9,6 +9,7 @@ import System from "@/models/system";
import showToast from "@/utils/toast";
import { useEffect, useState } from "react";
const NO_SETTINGS_NEEDED = ["default"];
export default function WorkspaceLLM({
llm,
availableLLMs,
......@@ -73,7 +74,7 @@ export default function WorkspaceLLM({
<div className="mt-1 text-xs text-white/60">{description}</div>
</div>
</div>
{checked && (
{checked && !NO_SETTINGS_NEEDED.includes(value) && (
<button
onClick={(e) => {
e.preventDefault();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment