mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 08:20:14 +01:00
wip: params
This commit is contained in:
parent
2c6874013a
commit
f8067e91d4
2 changed files with 24 additions and 13 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import React, { useEffect } from 'react';
|
||||
import { useForm, FormProvider } from 'react-hook-form';
|
||||
import { ComponentTypes } from 'librechat-data-provider';
|
||||
import type { DynamicSettingProps, SettingsConfiguration } from 'librechat-data-provider';
|
||||
|
|
@ -166,6 +166,17 @@ export default function Parameters() {
|
|||
}, {} as Record<string, any>),
|
||||
});
|
||||
|
||||
const {
|
||||
formState: { isDirty },
|
||||
} = methods;
|
||||
|
||||
useEffect(() => {
|
||||
if (isDirty) {
|
||||
console.log('The form has been edited');
|
||||
// You can perform any action here when the form becomes dirty
|
||||
}
|
||||
}, [isDirty]);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const onSubmit = (data: Record<string, any>) => {
|
||||
console.log('Form data:', data);
|
||||
|
|
|
|||
|
|
@ -76,18 +76,18 @@ export default function useSideNavLinks({
|
|||
});
|
||||
}
|
||||
|
||||
// if (
|
||||
// isAgentsEndpoint(endpoint) ||
|
||||
// (endpoint === EModelEndpoint.bedrock && interfaceConfig.parameters === true && keyProvided)
|
||||
// ) {
|
||||
// links.push({
|
||||
// title: 'com_sidepanel_parameters',
|
||||
// label: '',
|
||||
// icon: Settings2,
|
||||
// id: 'parameters',
|
||||
// Component: Parameters,
|
||||
// });
|
||||
// }
|
||||
if (
|
||||
isAgentsEndpoint(endpoint) ||
|
||||
(endpoint === EModelEndpoint.bedrock && interfaceConfig.parameters === true && keyProvided)
|
||||
) {
|
||||
links.push({
|
||||
title: 'com_sidepanel_parameters',
|
||||
label: '',
|
||||
icon: Settings2,
|
||||
id: 'parameters',
|
||||
Component: Parameters,
|
||||
});
|
||||
}
|
||||
|
||||
if (hasAccessToPrompts) {
|
||||
links.push({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue