mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +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 { useForm, FormProvider } from 'react-hook-form';
|
||||||
import { ComponentTypes } from 'librechat-data-provider';
|
import { ComponentTypes } from 'librechat-data-provider';
|
||||||
import type { DynamicSettingProps, SettingsConfiguration } from 'librechat-data-provider';
|
import type { DynamicSettingProps, SettingsConfiguration } from 'librechat-data-provider';
|
||||||
|
|
@ -166,6 +166,17 @@ export default function Parameters() {
|
||||||
}, {} as Record<string, any>),
|
}, {} 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
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
const onSubmit = (data: Record<string, any>) => {
|
const onSubmit = (data: Record<string, any>) => {
|
||||||
console.log('Form data:', data);
|
console.log('Form data:', data);
|
||||||
|
|
|
||||||
|
|
@ -76,18 +76,18 @@ export default function useSideNavLinks({
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (
|
if (
|
||||||
// isAgentsEndpoint(endpoint) ||
|
isAgentsEndpoint(endpoint) ||
|
||||||
// (endpoint === EModelEndpoint.bedrock && interfaceConfig.parameters === true && keyProvided)
|
(endpoint === EModelEndpoint.bedrock && interfaceConfig.parameters === true && keyProvided)
|
||||||
// ) {
|
) {
|
||||||
// links.push({
|
links.push({
|
||||||
// title: 'com_sidepanel_parameters',
|
title: 'com_sidepanel_parameters',
|
||||||
// label: '',
|
label: '',
|
||||||
// icon: Settings2,
|
icon: Settings2,
|
||||||
// id: 'parameters',
|
id: 'parameters',
|
||||||
// Component: Parameters,
|
Component: Parameters,
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
if (hasAccessToPrompts) {
|
if (hasAccessToPrompts) {
|
||||||
links.push({
|
links.push({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue