File size: 804 Bytes
f0743f4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | import Settings from '../Plugins';
import AgentSettings from '../AgentSettings';
import { useSetIndexOptions } from '~/hooks';
import { useChatContext } from '~/Providers';
export default function PluginsView({ conversation, models, isPreset = false }) {
const { showAgentSettings } = useChatContext();
const { setOption, setTools, setAgentOption, checkPluginSelection } = useSetIndexOptions(
isPreset ? conversation : null,
);
if (!conversation) {
return null;
}
return showAgentSettings ? (
<AgentSettings conversation={conversation} setOption={setAgentOption} models={models} />
) : (
<Settings
conversation={conversation}
setOption={setOption}
setTools={setTools}
checkPluginSelection={checkPluginSelection}
models={models}
/>
);
}
|