SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.
JavaScript a2aagentic-aiai-agentsdevtoolsmcp-clientn8n-alternativeno-codeopen-sourceorchestrationsmythosvisual-builder
Refactor tooltip implementation across multiple components
Muhammad Hamza Khan406276c75066
diff --git a/packages/app/src/react/features/agent-settings/components/EmbodimentsWidget.tsx b/packages/app/src/react/features/agent-settings/components/EmbodimentsWidget.tsxindex adce0829..e0e6e3c4 100644--- a/packages/app/src/react/features/agent-settings/components/EmbodimentsWidget.tsx+++ b/packages/app/src/react/features/agent-settings/components/EmbodimentsWidget.tsx@@ -107,28 +107,31 @@ const EmbodimentsWidget = ({ agent, agentId, isWriteAccess }: IProps) => {<Spinner classes="w-5 h-5" />) : (<Tooltip- content={- isReadOnlyAccess ? "You don't have access to this feature" : 'Enable/Disable'- }- placement="top">- <label className="relative inline-flex items-center cursor-pointer">- <input- type="checkbox"- checked={itemSettings.enabled ?? false}- onChange={(e) => updateEmbodimentStatus(item, e.target.checked)}- className="sr-only peer"- disabled={isReadOnlyAccess}- />- <div className="w-9 h-5 bg-gray-200 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all dark:border-gray-600 peer-checked:bg-v2-blue"></div>- </label>+ <TooltipTrigger asChild>+ <label className="relative inline-flex items-center cursor-pointer">+ <input+ type="checkbox"+ checked={itemSettings.enabled ?? false}+ onChange={(e) => updateEmbodimentStatus(item, e.target.checked)}+ className="sr-only peer"+ disabled={isReadOnlyAccess}+ />+ <div className="w-9 h-5 bg-gray-200 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all dark:border-gray-600 peer-checked:bg-v2-blue"></div>+ </label>+ </TooltipTrigger>+ <TooltipContent>+ {isReadOnlyAccess ? 'You don\'t have access to this feature' : 'Enable/Disable'}+ </TooltipContent></Tooltip>)}</div>) : (<Tooltip><TooltipTrigger asChild>- <FaLock cursor={'pointer'} />+ <div>+ <FaLock cursor={'pointer'} />+ </div></TooltipTrigger><TooltipContent side="top"><p>Premium Embodiment. Upgrade your plan</p>@@ -195,11 +198,15 @@ const EmbodimentsWidget = ({ agent, agentId, isWriteAccess }: IProps) => {<div className="mb-6"><h3 className="flex items-center gap-2 text-gray-700 text-sm font-semibold mb-1">Deploy to Your Workflow- <Tooltip- className="w-52 text-center"- content="Choose how you want to deploy and integrate your agent."- >- <Info className="w-4 h-4" />+ <Tooltip>+ <TooltipTrigger asChild>+ <div>+ <Info className="w-4 h-4" />+ </div>+ </TooltipTrigger>+ <TooltipContent side="top">+ <p>Choose how you want to deploy and integrate your agent.</p>+ </TooltipContent></Tooltip></h3></div>diff --git a/packages/app/src/react/features/agent-settings/components/WidgetCard.tsx b/packages/app/src/react/features/agent-settings/components/WidgetCard.tsxindex 21b4ef5c..9d63ee81 100644--- a/packages/app/src/react/features/agent-settings/components/WidgetCard.tsx+++ b/packages/app/src/react/features/agent-settings/components/WidgetCard.tsx@@ -1,5 +1,5 @@-import classNames from 'classnames';import { Tooltip, TooltipContent, TooltipTrigger } from '@src/react/shared/components/ui/tooltip';+import classNames from 'classnames';import { isNil } from 'lodash-es';import React from 'react';diff --git a/packages/app/src/react/features/agents/components/agentCard/AgentCard.tsx b/packages/app/src/react/features/agents/components/agentCard/AgentCard.tsxindex 31da3f04..4ebf06bc 100644--- a/packages/app/src/react/features/agents/components/agentCard/AgentCard.tsx+++ b/packages/app/src/react/features/agents/components/agentCard/AgentCard.tsx@@ -207,175 +207,175 @@ export function AgentCard({ agent, loadAgents, updateAgentInPlace }: AgentCardPr{(agentData.permissions.canEdit ||agentData.permissions.canRead ||isStaffUser) && (- <Menu as="div" className="relative">- {({ open }) => {- // Track dropdown state for tooltip visibility- if (dropdownOpenRef.current !== open) {- dropdownOpenRef.current = open;- // Use setTimeout to avoid setState during render- setTimeout(() => {- cardState.setIsActionDropdownVisible(open);- }, 0);- }+ <Menu as="div" className="relative">+ {({ open }) => {+ // Track dropdown state for tooltip visibility+ if (dropdownOpenRef.current !== open) {+ dropdownOpenRef.current = open;+ // Use setTimeout to avoid setState during render+ setTimeout(() => {+ cardState.setIsActionDropdownVisible(open);+ }, 0);+ }- return (- <>- <Menu.Button- className="p-1 text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"- onClick={(e) => e.stopPropagation()}- data-qa="agent-card-ellipsis-button"- >- <FaEllipsisVertical className="w-4 h-4" />- </Menu.Button>+ return (+ <>+ <Menu.Button+ className="p-1 text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"+ onClick={(e) => e.stopPropagation()}+ data-qa="agent-card-ellipsis-button"+ >+ <FaEllipsisVertical className="w-4 h-4" />+ </Menu.Button>- <Menu.Items className="absolute right-0 top-6 mt-2 w-48 bg-white rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-10">- <div className="py-1">- {/* Pin/Unpin */}- {agentData.permissions.canDuplicate && (- <Menu.Item>- {({ active }) => (- <button- onClick={(e) => {- e.stopPropagation();- e.preventDefault();- handlePinAgent();- // Don't close menu immediately - let handlePinAgent control it- }}- disabled={cardState.isPinning}- className={classNames(- active ? 'bg-gray-100 text-gray-900' : 'text-gray-700',- 'group flex items-center px-4 py-2 text-sm w-full text-left',- { 'opacity-50 cursor-not-allowed': cardState.isPinning },- )}- >- {cardState.isPinning ? (- <FaCircleNotch className="mr-3 h-4 w-4 animate-spin" />- ) : (- <div className="relative mr-3 h-4 w-4">- {agent.isPinned ? (- <UnPinIcon className="h-4 w-4" />- ) : (- <PinIcon className="h-4 w-4" />- )}- </div>- )}- {cardState.isPinning- ? agent.isPinned- ? 'Unpinning...'- : 'Pinning...'- : agent.isPinned- ? 'Unpin Agent'- : 'Pin Agent'}- </button>- )}- </Menu.Item>- )}- {/* Duplicate */}- {agentData.permissions.canDuplicate && (- <Menu.Item>- {({ active }) => (- <button- onClick={(e) => {- e.stopPropagation();- e.preventDefault();- handleDuplicateAgent();- // Don't close menu immediately - let handleDuplicateAgent control it- }}- disabled={cardState.isDuplicating}- className={classNames(- active ? 'bg-gray-100 text-gray-900' : 'text-gray-700',- 'group flex items-center px-4 py-2 text-sm w-full text-left',- {- 'opacity-50 cursor-not-allowed': cardState.isDuplicating,- },- )}- >- {cardState.isDuplicating ? (- <FaCircleNotch className="mr-3 h-4 w-4 animate-spin" />- ) : (- <FaRegCopy className="mr-3 h-4 w-4" />- )}- {cardState.isDuplicating ? 'Duplicating...' : 'Duplicate'}- </button>- )}- </Menu.Item>- )}+ <Menu.Items className="absolute right-0 top-6 mt-2 w-48 bg-white rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-10">+ <div className="py-1">+ {/* Pin/Unpin */}+ {agentData.permissions.canDuplicate && (+ <Menu.Item>+ {({ active }) => (+ <button+ onClick={(e) => {+ e.stopPropagation();+ e.preventDefault();+ handlePinAgent();+ // Don't close menu immediately - let handlePinAgent control it+ }}+ disabled={cardState.isPinning}+ className={classNames(+ active ? 'bg-gray-100 text-gray-900' : 'text-gray-700',+ 'group flex items-center px-4 py-2 text-sm w-full text-left',+ { 'opacity-50 cursor-not-allowed': cardState.isPinning },+ )}+ >+ {cardState.isPinning ? (+ <FaCircleNotch className="mr-3 h-4 w-4 animate-spin" />+ ) : (+ <div className="relative mr-3 h-4 w-4">+ {agent.isPinned ? (+ <UnPinIcon className="h-4 w-4" />+ ) : (+ <PinIcon className="h-4 w-4" />+ )}+ </div>+ )}+ {cardState.isPinning+ ? agent.isPinned+ ? 'Unpinning...'+ : 'Pinning...'+ : agent.isPinned+ ? 'Unpin Agent'+ : 'Pin Agent'}+ </button>+ )}+ </Menu.Item>+ )}+ {/* Duplicate */}+ {agentData.permissions.canDuplicate && (+ <Menu.Item>+ {({ active }) => (+ <button+ onClick={(e) => {+ e.stopPropagation();+ e.preventDefault();+ handleDuplicateAgent();+ // Don't close menu immediately - let handleDuplicateAgent control it+ }}+ disabled={cardState.isDuplicating}+ className={classNames(+ active ? 'bg-gray-100 text-gray-900' : 'text-gray-700',+ 'group flex items-center px-4 py-2 text-sm w-full text-left',+ {+ 'opacity-50 cursor-not-allowed': cardState.isDuplicating,+ },+ )}+ >+ {cardState.isDuplicating ? (+ <FaCircleNotch className="mr-3 h-4 w-4 animate-spin" />+ ) : (+ <FaRegCopy className="mr-3 h-4 w-4" />+ )}+ {cardState.isDuplicating ? 'Duplicating...' : 'Duplicate'}+ </button>+ )}+ </Menu.Item>+ )}- {/* Contributors */}- {agent.contributors && agent.contributors.length > 0 && (- <Menu.Item>- {({ active }) => (- <button- onClick={(e) => {- e.stopPropagation();- setIsContributorsModalOpen(true);- }}- className={classNames(- active ? 'bg-gray-100 text-gray-900' : 'text-gray-700',- 'group flex items-center px-4 py-2 text-sm w-full text-left',- )}- >- <FaUsers className="mr-3 h-4 w-4" />- Contributors- </button>- )}- </Menu.Item>- )}+ {/* Contributors */}+ {agent.contributors && agent.contributors.length > 0 && (+ <Menu.Item>+ {({ active }) => (+ <button+ onClick={(e) => {+ e.stopPropagation();+ setIsContributorsModalOpen(true);+ }}+ className={classNames(+ active ? 'bg-gray-100 text-gray-900' : 'text-gray-700',+ 'group flex items-center px-4 py-2 text-sm w-full text-left',+ )}+ >+ <FaUsers className="mr-3 h-4 w-4" />+ Contributors+ </button>+ )}+ </Menu.Item>+ )}- {/* Activity */}- {(featureFlagPayload as { showActivity?: boolean })?.showActivity && (- <Menu.Item>- {({ active }) => (- <button- onClick={(e) => {- e.stopPropagation();- setIsActivityModalOpen(true);- }}- className={classNames(- active ? 'bg-gray-100 text-gray-900' : 'text-gray-700',- 'group flex items-center px-4 py-2 text-sm w-full text-left',- )}- >- <FaClockRotateLeft className="mr-3 h-4 w-4" />- Activity- </button>- )}- </Menu.Item>- )}+ {/* Activity */}+ {(featureFlagPayload as { showActivity?: boolean })?.showActivity && (+ <Menu.Item>+ {({ active }) => (+ <button+ onClick={(e) => {+ e.stopPropagation();+ setIsActivityModalOpen(true);+ }}+ className={classNames(+ active ? 'bg-gray-100 text-gray-900' : 'text-gray-700',+ 'group flex items-center px-4 py-2 text-sm w-full text-left',+ )}+ >+ <FaClockRotateLeft className="mr-3 h-4 w-4" />+ Activity+ </button>+ )}+ </Menu.Item>+ )}- {/* Delete */}- {agentData.permissions.canDelete && (- <Menu.Item>- {({ active }) => (- <button- onClick={(e) => {- e.stopPropagation();- setShowDeleteConfirmationModal(true);- }}- disabled={cardState.isDeleting}- className={classNames(- active ? 'bg-red-100 text-red-900' : 'text-red-700',- 'group flex items-center px-4 py-2 text-sm w-full text-left',- { 'opacity-50 cursor-not-allowed': cardState.isDeleting },- )}- >- {cardState.isDeleting ? (- <FaCircleNotch className="mr-3 h-4 w-4 animate-spin" />- ) : (- <FaTrash className="mr-3 h-4 w-4" />- )}- {cardState.isDeleting ? 'Deleting...' : 'Delete'}- </button>- )}- </Menu.Item>- )}- </div>- </Menu.Items>- </>- );- }}- </Menu>- )}+ {/* Delete */}+ {agentData.permissions.canDelete && (+ <Menu.Item>+ {({ active }) => (+ <button+ onClick={(e) => {+ e.stopPropagation();+ setShowDeleteConfirmationModal(true);+ }}+ disabled={cardState.isDeleting}+ className={classNames(+ active ? 'bg-red-100 text-red-900' : 'text-red-700',+ 'group flex items-center px-4 py-2 text-sm w-full text-left',+ { 'opacity-50 cursor-not-allowed': cardState.isDeleting },+ )}+ >+ {cardState.isDeleting ? (+ <FaCircleNotch className="mr-3 h-4 w-4 animate-spin" />+ ) : (+ <FaTrash className="mr-3 h-4 w-4" />+ )}+ {cardState.isDeleting ? 'Deleting...' : 'Delete'}+ </button>+ )}+ </Menu.Item>+ )}+ </div>+ </Menu.Items>+ </>+ );+ }}+ </Menu>+ )}</div>{/* Action Buttons */}@@ -412,42 +412,44 @@ export function AgentCard({ agent, loadAgents, updateAgentInPlace }: AgentCardPr{!agentData.isAvailable && (<Tooltip><TooltipTrigger asChild>- <Button- variant="secondary"- isLink={agentData.isAvailable}- linkTo={agentData.isAvailable ? `/chat/${agent.id}` : ''}- dataAttributes={{ 'data-test': 'chat-agent-button' }}- handleClick={(e) => e.stopPropagation()}- className={classNames(- 'relative h-8 w-20 overflow-hidden border border-solid rounded-lg transition duration-300 justify-center',- {- 'border-v2-blue bg-white hover:bg-v2-blue/10': agentData.isAvailable,- 'border-[#D1D1D1] bg-gray-100 cursor-not-allowed':- !agentData.isAvailable,- },- )}- Icon={- <div className="block">- <ChatIconWithTail- className="mr-1"- stroke={agentData.isAvailable ? '#3C89F9' : '#727272'}- fill={agentData.isAvailable ? '#3C89F9' : '#727272'}- />- </div>- }- addIcon- onMouseEnter={() => cardState.setIsButtonTooltipVisible(true)}- onMouseLeave={() => cardState.setIsButtonTooltipVisible(false)}- >- <span- className={classNames('text-sm font-normal font-body', {- 'text-v2-blue': agentData.isAvailable,- 'text-[#5a5a5a]': !agentData.isAvailable,- })}+ <div>+ <Button+ variant="secondary"+ isLink={agentData.isAvailable}+ linkTo={agentData.isAvailable ? `/chat/${agent.id}` : ''}+ dataAttributes={{ 'data-test': 'chat-agent-button' }}+ handleClick={(e) => e.stopPropagation()}+ className={classNames(+ 'relative h-8 w-20 overflow-hidden border border-solid rounded-lg transition duration-300 justify-center',+ {+ 'border-v2-blue bg-white hover:bg-v2-blue/10': agentData.isAvailable,+ 'border-[#D1D1D1] bg-gray-100 cursor-not-allowed':+ !agentData.isAvailable,+ },+ )}+ Icon={+ <div className="block">+ <ChatIconWithTail+ className="mr-1"+ stroke={agentData.isAvailable ? '#3C89F9' : '#727272'}+ fill={agentData.isAvailable ? '#3C89F9' : '#727272'}+ />+ </div>+ }+ addIcon+ onMouseEnter={() => cardState.setIsButtonTooltipVisible(true)}+ onMouseLeave={() => cardState.setIsButtonTooltipVisible(false)}>- Chat- </span>- </Button>+ <span+ className={classNames('text-sm font-normal font-body', {+ 'text-v2-blue': agentData.isAvailable,+ 'text-[#5a5a5a]': !agentData.isAvailable,+ })}+ >+ Chat+ </span>+ </Button>+ </div></TooltipTrigger><TooltipContentside={cardState.tooltipPosition === 'bottom' ? 'top' : 'bottom'}diff --git a/packages/app/src/react/features/builder/components/VariablesWidget.tsx b/packages/app/src/react/features/builder/components/VariablesWidget.tsxindex 5f765d77..831e04ce 100644--- a/packages/app/src/react/features/builder/components/VariablesWidget.tsx+++ b/packages/app/src/react/features/builder/components/VariablesWidget.tsx@@ -7,12 +7,17 @@ import { Input } from '@src/react/shared/components/ui/input';import { Button } from '@src/react/shared/components/ui/newDesign/button';import { TextArea } from '@src/react/shared/components/ui/newDesign/textarea';import { Spinner } from '@src/react/shared/components/ui/spinner';+import {+ Tooltip,+ TooltipContent,+ TooltipProvider,+ TooltipTrigger,+} from '@src/react/shared/components/ui/tooltip';import { errKeys } from '@src/react/shared/constants';import { useAuthCtx } from '@src/react/shared/contexts/auth.context';import { errorToast, successToast } from '@src/shared/components/toast';import { MANAGED_VAULT_SCOPES } from '@src/shared/constants/general';import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';-import { Tooltip, TooltipContent, TooltipTrigger } from '@src/react/shared/components/ui/tooltip';import { Component, useEffect, useRef, useState } from 'react';import { FiTrash2 } from 'react-icons/fi';import { IoKeyOutline } from 'react-icons/io5';@@ -314,7 +319,7 @@ const VariablesWidget = ({ agentId, workspace }: { agentId: string; workspace: WsetSavingAgentVars(true);try {const pairsToSave = pairs.filter((pair) => pair.key !== '' && pair.value !== '');- let variables = {};+ const variables = {};pairsToSave.forEach((pair) => {variables[pair.key] = pair.value;});@@ -451,7 +456,8 @@ const VariablesWidget = ({ agentId, workspace }: { agentId: string; workspace: W);return (- <WidgetCard title="" isWriteAccess={writeAccess} hasBorder={false} showOverflow={true}>+ <TooltipProvider delayDuration={300} skipDelayDuration={100}>+ <WidgetCard title="" isWriteAccess={writeAccess} hasBorder={false} showOverflow={true}><div className="bg-[#FFFF] text-[#5A5A5A] p-4 rounded-xl border border-solid border-gray-200"><div className="flex items-center justify-between mb-2"><h2 className="text-base font-semibold flex items-center">@@ -464,10 +470,12 @@ const VariablesWidget = ({ agentId, workspace }: { agentId: string; workspace: W><Tooltip><TooltipTrigger asChild>- <LuInfo size={20} />+ <div>+ <LuInfo size={20} />+ </div></TooltipTrigger><TooltipContent side="top">- <div style={{ minWidth: '300px' }}>+ <div style={{ maxWidth: '200px' }}>The Agent Variables you declare here can be accessed and used across allcomponents. These variables act like global variables throughout your AI agent.</div>@@ -501,11 +509,10 @@ const VariablesWidget = ({ agentId, workspace }: { agentId: string; workspace: Wplaceholder="Key"value={pair.key}onChange={(e) => handleInputChange(index, 'key', e.target.value)}- className={`w-full bg-white border text-gray-900 rounded block outline-none focus:outline-none focus:ring-0 focus:ring-offset-0 focus:ring-shadow-none text-sm font-normal placeholder:text-sm placeholder:font-normal ${- pair.error- ? '!border-smyth-red focus:border-smyth-red'- : 'border-gray-300 border-b-gray-500 focus:border-b-2 focus:border-b-blue-500 focus-visible:border-b-2 focus-visible:border-b-blue-500'- }`}+ className={`w-full bg-white border text-gray-900 rounded block outline-none focus:outline-none focus:ring-0 focus:ring-offset-0 focus:ring-shadow-none text-sm font-normal placeholder:text-sm placeholder:font-normal ${pair.error+ ? '!border-smyth-red focus:border-smyth-red'+ : 'border-gray-300 border-b-gray-500 focus:border-b-2 focus:border-b-blue-500 focus-visible:border-b-2 focus-visible:border-b-blue-500'+ }`}/>{index < pairs.length - 1 && (<button@@ -516,7 +523,9 @@ const VariablesWidget = ({ agentId, workspace }: { agentId: string; workspace: W><Tooltip><TooltipTrigger asChild>- <FiTrash2 className="text-red-500" />+ <div>+ <FiTrash2 className="text-red-500" />+ </div></TooltipTrigger><TooltipContent side="top"><div style={{ width: '120px' }}>Delete Variable</div>@@ -534,11 +543,10 @@ const VariablesWidget = ({ agentId, workspace }: { agentId: string; workspace: WonChange={(e) => handleInputChange(index, 'value', e.target.value)}onFocus={(e) => adjustTextareaHeight(e.target, true)}onBlur={(e) => adjustTextareaHeight(e.target, false)}- className={`w-full bg-white border text-gray-900 rounded block outline-none focus:outline-none focus:ring-0 focus:ring-offset-0 focus:ring-shadow-none text-sm font-normal placeholder:text-sm placeholder:font-normal py-2 px-3 ${- pair.error- ? '!border-smyth-red focus:border-smyth-red'- : 'border-gray-300 border-b-gray-500 focus:border-b-2 focus:border-b-blue-500 focus-visible:border-b-2 focus-visible:border-b-blue-500'- } pr-10`}+ className={`w-full bg-white border text-gray-900 rounded block outline-none focus:outline-none focus:ring-0 focus:ring-offset-0 focus:ring-shadow-none text-sm font-normal placeholder:text-sm placeholder:font-normal py-2 px-3 ${pair.error+ ? '!border-smyth-red focus:border-smyth-red'+ : 'border-gray-300 border-b-gray-500 focus:border-b-2 focus:border-b-blue-500 focus-visible:border-b-2 focus-visible:border-b-blue-500'+ } pr-10`}style={{minHeight: '36px',lineHeight: '1.25rem',@@ -679,6 +687,7 @@ const VariablesWidget = ({ agentId, workspace }: { agentId: string; workspace: W</div>)}</WidgetCard>+ </TooltipProvider>);};diff --git a/packages/app/src/react/features/vault/pages/VaultPage.tsx b/packages/app/src/react/features/vault/pages/VaultPage.tsxindex fbafabfa..c0dc1587 100644--- a/packages/app/src/react/features/vault/pages/VaultPage.tsx+++ b/packages/app/src/react/features/vault/pages/VaultPage.tsx@@ -1,7 +1,6 @@import { useAuthCtx } from '@react/shared/contexts/auth.context';import { ErrorBoundarySuspense } from '@src/react/features/error-pages/higher-order-components/ErrorBoundary';import { Button as CustomButton } from '@src/react/shared/components/ui/newDesign/button';-import { TooltipProvider } from '@src/react/shared/components/ui/tooltip';import { PluginComponents } from '@src/react/shared/plugins/PluginComponents';import { PluginTarget } from '@src/react/shared/plugins/Plugins';import { errorToast, successToast } from '@src/shared/components/toast';@@ -73,45 +72,43 @@ export default function VaultPage() {}return (- <TooltipProvider delayDuration={300} skipDelayDuration={100}>- <div className="container mx-auto py-6 space-y-6 pl-12 md:pl-0 pr-0">- <div className="flex items-center justify-between md:justify-end">- {pageAccess?.write && (- <CustomButton- handleClick={handleExportVault}- disabled={isExporting}- Icon={- isExporting ? (- <Loader2 className="mr-2 h-4 w-4 animate-spin" />- ) : (- <CiExport className="inline mr-1 w-4 h-4" strokeWidth={1} />- )- }- addIcon- label={isExporting ? 'Exporting...' : 'Export Vault Structure'}- />- )}- </div>-- {hasBuiltinModels && (- <PluginComponents targetId={PluginTarget.VaultPageSmythOSRecommendedModels} />+ <div className="container mx-auto py-6 space-y-6 pl-12 md:pl-0 pr-0">+ <div className="flex items-center justify-between md:justify-end">+ {pageAccess?.write && (+ <CustomButton+ handleClick={handleExportVault}+ disabled={isExporting}+ Icon={+ isExporting ? (+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />+ ) : (+ <CiExport className="inline mr-1 w-4 h-4" strokeWidth={1} />+ )+ }+ addIcon+ label={isExporting ? 'Exporting...' : 'Export Vault Structure'}+ />)}+ </div>- <UserModels pageAccess={pageAccess} />- <UserCustomModels pageAccess={pageAccess} />- <PluginComponents targetId={PluginTarget.VaultPageEnterpriseModels} />- <OAuthConnections />+ {hasBuiltinModels && (+ <PluginComponents targetId={PluginTarget.VaultPageSmythOSRecommendedModels} />+ )}- {window.location.hostname === 'localhost' && <VectorDatabases />}+ <UserModels pageAccess={pageAccess} />+ <UserCustomModels pageAccess={pageAccess} />+ <PluginComponents targetId={PluginTarget.VaultPageEnterpriseModels} />+ <OAuthConnections />- <ErrorBoundarySuspense- loadingFallback={<div>Loading...</div>}- errorFallback={() => <div>Error loading API keys</div>}- >- <ApiKeys pageAccess={pageAccess} />- </ErrorBoundarySuspense>- </div>- </TooltipProvider>+ {window.location.hostname === 'localhost' && <VectorDatabases />}++ <ErrorBoundarySuspense+ loadingFallback={<div>Loading...</div>}+ errorFallback={() => <div>Error loading API keys</div>}+ >+ <ApiKeys pageAccess={pageAccess} />+ </ErrorBoundarySuspense>+ </div>);}diff --git a/packages/app/src/react/shared/components/_legacy/ui/tooltip/tooltipV2.ts b/packages/app/src/react/shared/components/_legacy/ui/tooltip/tooltipV2.tsindex 4d6c4c76..9ec34637 100644--- a/packages/app/src/react/shared/components/_legacy/ui/tooltip/tooltipV2.ts+++ b/packages/app/src/react/shared/components/_legacy/ui/tooltip/tooltipV2.ts@@ -1,4 +1,7 @@//This tooltip does not uses flow-bite and has minimum calculations thus having a better performance++import { cn } from '@src/react/shared/utils/utils';+/*** Type definition for tooltip position options*/@@ -61,7 +64,7 @@ export class TooltipV2 {// Add CSS classesthis.element.classList.add('tooltip-trigger');if (this.options.tooltipClass) {- this.element.classList.add(this.options.tooltipClass);+ this.element.className = cn(this.element.className, this.options.tooltipClass);}// Add event listeners based on showWhen option