File size: 698 Bytes
9705b6c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import Settings from '../Plugins';
import AgentSettings from '../AgentSettings';
import { useSetOptions } from '~/hooks';
import { useRecoilValue } from 'recoil';
import store from '~/store';
export default function PluginsView({ conversation, models, isPreset = false }) {
const showAgentSettings = useRecoilValue(store.showAgentSettings);
const { setOption, setAgentOption } = useSetOptions(isPreset ? conversation : null);
if (!conversation) {
return null;
}
return showAgentSettings ? (
<AgentSettings conversation={conversation} setOption={setAgentOption} models={models} />
) : (
<Settings conversation={conversation} setOption={setOption} models={models} />
);
}
|