diff --git a/web/containers/Checkbox/index.tsx b/web/containers/Checkbox/index.tsx index 4c124021e..12eed7199 100644 --- a/web/containers/Checkbox/index.tsx +++ b/web/containers/Checkbox/index.tsx @@ -1,8 +1,16 @@ import React from 'react' -import { Switch } from '@janhq/uikit' +import { + Switch, + Tooltip, + TooltipArrow, + TooltipContent, + TooltipPortal, + TooltipTrigger, +} from '@janhq/uikit' import { useAtomValue } from 'jotai' +import { InfoIcon } from 'lucide-react' import useUpdateModelParameters from '@/hooks/useUpdateModelParameters' @@ -11,10 +19,11 @@ import { getActiveThreadIdAtom } from '@/helpers/atoms/Thread.atom' type Props = { name: string title: string + description: string checked: boolean } -const Checkbox: React.FC = ({ name, title, checked }) => { +const Checkbox: React.FC = ({ name, title, checked, description }) => { const { updateModelParameter } = useUpdateModelParameters() const threadId = useAtomValue(getActiveThreadIdAtom) @@ -25,7 +34,22 @@ const Checkbox: React.FC = ({ name, title, checked }) => { return (
-

{title}

+
+

+ {title} +

+ + + + + + + {description} + + + + +
) diff --git a/web/containers/ModelConfigInput/index.tsx b/web/containers/ModelConfigInput/index.tsx index caa4f7fa3..ac66011bc 100644 --- a/web/containers/ModelConfigInput/index.tsx +++ b/web/containers/ModelConfigInput/index.tsx @@ -1,7 +1,16 @@ -import { Textarea } from '@janhq/uikit' +import { + Textarea, + Tooltip, + TooltipArrow, + TooltipContent, + TooltipPortal, + TooltipTrigger, +} from '@janhq/uikit' import { useAtomValue } from 'jotai' +import { InfoIcon } from 'lucide-react' + import useUpdateModelParameters from '@/hooks/useUpdateModelParameters' import { getActiveThreadIdAtom } from '@/helpers/atoms/Thread.atom' @@ -9,6 +18,7 @@ import { getActiveThreadIdAtom } from '@/helpers/atoms/Thread.atom' type Props = { title: string name: string + description: string placeholder: string value: string } @@ -17,6 +27,7 @@ const ModelConfigInput: React.FC = ({ title, name, value, + description, placeholder, }) => { const { updateModelParameter } = useUpdateModelParameters() @@ -30,7 +41,22 @@ const ModelConfigInput: React.FC = ({ return (
-

{title}

+
+

+ {title} +

+ + + + + + + {description} + + + + +