klawdyoss's picture
upload limpo
20ec4ad
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useLocalStorage } from "react-use";
import agentsJson from "../../../agents.json";
export default function AgentConfig() {
const [cfg, setCfg] = useLocalStorage("agentsConfig", agentsJson);
const updateModel = (id, model) => {
setCfg(cfg.map((a) => a.id === id
? {
...a,
model,
}
: a));
};
return (_jsxs("div", { className: "h-full overflow-auto bg-gray-900 text-gray-200 p-4", children: [_jsx("h2", { className: "text-lg font-semibold mb-4", children: "Configura\u00E7\u00E3o de Agentes" }), cfg.map((a) => (_jsxs("div", { className: "mb-6", children: [_jsx("h3", { className: "font-medium", children: a.name }), _jsxs("label", { className: "block mt-2", children: [_jsx("span", { children: "Modelo" }), _jsxs("select", { value: a.model, onChange: (e) => updateModel(a.id, e.target.value), className: "mt-1 block w-full bg-gray-800 p-2 rounded text-white", children: [_jsx("option", { value: "deepsite", children: "DeepSeek (gr\u00E1tis)" }), _jsx("option", { value: "gpt-4o-mini", children: "ChatGPT 4O" }), _jsx("option", { value: "text-bison-001", children: "Gemini" }), _jsx("option", { value: "claude-3.7", children: "Claude 3.7" })] })] })] }, a.id)))] }));
}