diff --git a/uikit/src/tooltip/index.tsx b/uikit/src/tooltip/index.tsx
index 73c0e1e0b..53e61d175 100644
--- a/uikit/src/tooltip/index.tsx
+++ b/uikit/src/tooltip/index.tsx
@@ -8,6 +8,8 @@ const TooltipProvider = TooltipPrimitive.Provider
const Tooltip = TooltipPrimitive.Root
+const TooltipPortal = TooltipPrimitive.Portal
+
const TooltipTrigger = TooltipPrimitive.Trigger
const TooltipContent = React.forwardRef<
@@ -37,4 +39,5 @@ export {
TooltipContent,
TooltipProvider,
TooltipArrow,
+ TooltipPortal,
}
diff --git a/web/containers/CardSidebar/index.tsx b/web/containers/CardSidebar/index.tsx
index de0a409ae..5de285569 100644
--- a/web/containers/CardSidebar/index.tsx
+++ b/web/containers/CardSidebar/index.tsx
@@ -13,14 +13,16 @@ import { useClickOutside } from '@/hooks/useClickOutside'
interface Props {
children: ReactNode
title: string
- onRevealInFinderClick: (type: string) => void
- onViewJsonClick: (type: string) => void
+ onRevealInFinderClick?: (type: string) => void
+ onViewJsonClick?: (type: string) => void
+ asChild?: boolean
}
export default function CardSidebar({
children,
title,
onRevealInFinderClick,
onViewJsonClick,
+ asChild,
}: Props) {
const [show, setShow] = useState(true)
const [more, setMore] = useState(false)
@@ -39,7 +41,8 @@ export default function CardSidebar({
return (
{title}
-
setMore(!more)}
- >
-
-
+ {!asChild && (
+
setMore(!more)}
+ >
+
+
+ )}
)}
{show && (
-
+
{children}
)}
diff --git a/web/containers/Checkbox/index.tsx b/web/containers/Checkbox/index.tsx
index de18ca052..074ed0e82 100644
--- a/web/containers/Checkbox/index.tsx
+++ b/web/containers/Checkbox/index.tsx
@@ -1,9 +1,18 @@
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'
import { getActiveThreadIdAtom } from '@/helpers/atoms/Thread.atom'
@@ -11,10 +20,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)
@@ -26,7 +36,21 @@ const Checkbox: React.FC = ({ name, title, checked }) => {
return (
-
{title}
+
+
{title}
+
+
+
+
+
+
+ {description}
+
+
+
+
+
+
)
diff --git a/web/containers/Layout/TopBar/index.tsx b/web/containers/Layout/TopBar/index.tsx
index 78e858c6a..dd5358d82 100644
--- a/web/containers/Layout/TopBar/index.tsx
+++ b/web/containers/Layout/TopBar/index.tsx
@@ -177,7 +177,7 @@ const TopBar = () => {
>
diff --git a/web/containers/ModelConfigInput/index.tsx b/web/containers/ModelConfigInput/index.tsx
index caa4f7fa3..52808569c 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,
+ TooltipPortal,
+ TooltipArrow,
+ TooltipContent,
+ 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,20 @@ const ModelConfigInput: React.FC = ({
return (
-
{title}
+
+
{title}
+
+
+
+
+
+
+ {description}
+
+
+
+
+