/* eslint-disable @typescript-eslint/no-explicit-any */ import React from 'react' import { Slider, Input, TooltipPortal } from '@janhq/uikit' import { Tooltip, TooltipContent, TooltipTrigger, TooltipArrow, } from '@janhq/uikit' // import { useAtomValue } from 'jotai' import { InfoIcon } from 'lucide-react' // import useUpdateModelParameters from '@/hooks/useUpdateModelParameters' // import { getActiveThreadIdAtom } from '@/helpers/atoms/Thread.atom' type Props = { name: string description: string title: string min: number max: number step: number value: number[] onChange: (e: any) => void onBlur: (e: any) => void } const SliderRightPanel: React.FC = ({ name, title, min, max, description, onChange, onBlur, step, value, }) => { // const { updateModelParameter } = useUpdateModelParameters() // const threadId = useAtomValue(getActiveThreadIdAtom) // const onValueChanged = (e: number[]) => { // if (!threadId) return // updateModelParameter(threadId, name, e[0]) // } return (

{title}

{description}
onChange(e[0])} onChange={(e) => onChange(e)} onBlur={onBlur} name={name} min={min} max={max} step={step} />

{min}

{max / 2}

{max}

onChange([e.target.value])} onBlur={onBlur} />
) } export default SliderRightPanel