diff --git a/admin/inertia/components/InfoTooltip.tsx b/admin/inertia/components/InfoTooltip.tsx index f41a90d..172ee5a 100644 --- a/admin/inertia/components/InfoTooltip.tsx +++ b/admin/inertia/components/InfoTooltip.tsx @@ -4,9 +4,21 @@ import { useState } from 'react' interface InfoTooltipProps { text: string className?: string + // Which side of the icon the tooltip pops toward. Defaults to 'top' (existing behavior); + // use 'bottom' when the icon sits near the top of the viewport so it isn't clipped. + position?: 'top' | 'bottom' + // Horizontal anchoring. 'center' (default) centers the bubble on the icon. Use 'right' when + // the icon sits near the right edge so the bubble expands leftward into open space instead of + // being squeezed against the viewport edge (which forces one-word-per-line wrapping). + align?: 'center' | 'right' } -export default function InfoTooltip({ text, className = '' }: InfoTooltipProps) { +export default function InfoTooltip({ + text, + className = '', + position = 'top', + align = 'center', +}: InfoTooltipProps) { const [isVisible, setIsVisible] = useState(false) return ( @@ -23,10 +35,24 @@ export default function InfoTooltip({ text, className = '' }: InfoTooltipProps) {isVisible && ( -
-
+
+
{text} -
+
)} diff --git a/admin/inertia/components/chat/index.tsx b/admin/inertia/components/chat/index.tsx index 7536be3..c8c9f39 100644 --- a/admin/inertia/components/chat/index.tsx +++ b/admin/inertia/components/chat/index.tsx @@ -12,6 +12,8 @@ import classNames from '~/lib/classNames' import { IconX } from '@tabler/icons-react' import { DEFAULT_QUERY_REWRITE_MODEL } from '../../../constants/ollama' import { useSystemSetting } from '~/hooks/useSystemSetting' +import Switch from '~/components/inputs/Switch' +import InfoTooltip from '~/components/InfoTooltip' interface ChatProps { enabled: boolean @@ -534,18 +536,19 @@ export default function Chat({ )}
{selectedModelSupportsThinking && ( -