Skip to content

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.

Add tooltips to model and OAuth action buttons

samme-abdul7577601b459f
diff --git a/packages/app/src/react/features/vault/components/oauth-connections.tsx b/packages/app/src/react/features/vault/components/oauth-connections.tsx
index 49da6870..88762cbb 100644
--- a/packages/app/src/react/features/vault/components/oauth-connections.tsx
+++ b/packages/app/src/react/features/vault/components/oauth-connections.tsx
@@ -8,7 +8,8 @@ import {
mapOAuthTypeDisplay,
} from '@src/shared/helpers/oauth/oauth.utils';
import { useQueryClient } from '@tanstack/react-query'; // Import useQueryClient
-import { Circle, CopyPlus, Pencil, PlusCircle, Trash2 } from 'lucide-react';
+import { Tooltip } from 'flowbite-react';
+import { Circle, CopyPlus, Info, Pencil, PlusCircle, Trash2 } from 'lucide-react';
import React, { useCallback, useEffect, useState } from 'react';
import {
OAUTH_QUERY_KEY, // Import the query key
@@ -343,7 +344,15 @@ export function OAuthConnections() {
<div className="rounded-lg bg-card text-card-foreground border border-solid border-gray-200 shadow-sm">
<div className="p-6">
<div className="flex items-center justify-between mb-4 pr-2 flex-wrap">
- <h2 className="text-lg font-semibold">OAuth Connections</h2>
+ <h2 className="flex items-center gap-2 text-lg font-semibold">
+ OAuth Connections
+ <Tooltip
+ className="w-72 text-center"
+ content="Manage OAuth connections to authenticate and integrate with external services and APIs"
+ >
+ <Info className="w-4 h-4" />
+ </Tooltip>
+ </h2>
</div>
<div className="overflow-x-auto">
{/* Table */}
@@ -451,37 +460,40 @@ export function OAuthConnections() {
))}
{/* Duplicate Button */}
- <Button
- variant="ghost"
- size="sm"
- onClick={() => handleDuplicateClick(conn)}
- title="Duplicate"
- disabled={isDisabled}
- >
- <CopyPlus className="h-4 w-4" />
- </Button>
+ <Tooltip content="Duplicate">
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => handleDuplicateClick(conn)}
+ disabled={isDisabled}
+ >
+ <CopyPlus className="h-4 w-4" />
+ </Button>
+ </Tooltip>
{/* Edit Button */}
- <Button
- variant="ghost"
- size="sm"
- onClick={() => handleEditClick(conn)}
- title="Edit"
- disabled={isDisabled}
- >
- <Pencil className="h-4 w-4" />
- </Button>
+ <Tooltip content="Edit">
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => handleEditClick(conn)}
+ disabled={isDisabled}
+ >
+ <Pencil className="h-4 w-4" />
+ </Button>
+ </Tooltip>
{/* Delete Button */}
- <Button
- variant="ghost"
- size="sm"
- onClick={() => handleDeleteClick(conn)}
- title="Delete"
- disabled={isDisabled}
- >
- <Trash2 className="h-4 w-4 hover:text-red-500" />
- </Button>
+ <Tooltip content="Delete">
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => handleDeleteClick(conn)}
+ disabled={isDisabled}
+ >
+ <Trash2 className="h-4 w-4 hover:text-red-500" />
+ </Button>
+ </Tooltip>
</div>
</td>
</tr>
diff --git a/packages/app/src/react/features/vault/components/user-custom-models.tsx b/packages/app/src/react/features/vault/components/user-custom-models.tsx
index 28a92877..e8b9f239 100644
--- a/packages/app/src/react/features/vault/components/user-custom-models.tsx
+++ b/packages/app/src/react/features/vault/components/user-custom-models.tsx
@@ -160,7 +160,7 @@ export function UserCustomModels({ pageAccess }: { pageAccess: { write: boolean
</div>
</div>
- <div className="w-full space-y-4">
+ <div className="w-full space-y-4 pb-2">
{isLoading ? (
<div className="py-4 text-center text-gray-500">Loading models...</div>
) : (
@@ -168,8 +168,8 @@ export function UserCustomModels({ pageAccess }: { pageAccess: { write: boolean
{models.length === 0 ? (
<div className="py-4 text-center text-gray-500">No custom models found</div>
) : (
- <div className="overflow-x-auto">
- <div className="min-w-[500px]">
+ <div className="overflow-x-auto overflow-y-visible">
+ <div className="min-w-[500px] space-y-4">
{models.map((model) => (
<div key={model.id} className="flex items-center justify-between">
<div className="flex items-center gap-2">
@@ -189,22 +189,26 @@ export function UserCustomModels({ pageAccess }: { pageAccess: { write: boolean
<div className="flex items-center gap-2 ml-2">
{pageAccess.write && (
<>
- <Button
- variant="ghost"
- size="sm"
- onClick={() => handleEditModel(model)}
- className="h-8 w-8 p-0"
- >
- <Pencil className="h-4 w-4" />
- </Button>
- <Button
- variant="ghost"
- size="sm"
- onClick={() => handleDeleteClick(model)}
- className="h-8 w-8 p-0"
- >
- <Trash2 className="h-4 w-4 hover:text-red-500" />
- </Button>
+ <Tooltip content="Edit">
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => handleEditModel(model)}
+ className="h-8 w-8 p-0"
+ >
+ <Pencil className="h-4 w-4" />
+ </Button>
+ </Tooltip>
+ <Tooltip content="Delete">
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => handleDeleteClick(model)}
+ className="h-8 w-8 p-0"
+ >
+ <Trash2 className="h-4 w-4 hover:text-red-500" />
+ </Button>
+ </Tooltip>
</>
)}
</div>
diff --git a/packages/app/src/react/features/vault/components/user-models.tsx b/packages/app/src/react/features/vault/components/user-models.tsx
index 398a50d1..c5ec30a7 100644
--- a/packages/app/src/react/features/vault/components/user-models.tsx
+++ b/packages/app/src/react/features/vault/components/user-models.tsx
@@ -13,7 +13,8 @@ import { Button as CustomButton } from '@src/react/shared/components/ui/newDesig
import { TextArea } from '@src/react/shared/components/ui/newDesign/textarea';
import { errorToast, successToast } from '@src/shared/components/toast';
import { GLOBAL_VAULT_KEYS, SMYTHOS_DOCS_URL } from '@src/shared/constants/general';
-import { Check, Copy, Pencil, Trash2 } from 'lucide-react';
+import { Tooltip } from 'flowbite-react';
+import { Check, Copy, Info, Pencil, Trash2 } from 'lucide-react';
import { useState } from 'react';
import { useVault } from '../hooks/use-vault';
import { UpgradeModal } from './upgrade-modal';
@@ -228,7 +229,15 @@ export function UserModels({ pageAccess }: { pageAccess: { write: boolean } }) {
return (
<div className="rounded-lg bg-card text-card-foreground border border-solid border-gray-200 shadow-sm">
<div className="p-6">
- <h2 className="text-lg font-semibold mb-4">Your Own AI Models</h2>
+ <h2 className="flex items-center gap-2 text-lg font-semibold mb-4">
+ Your Own AI Models
+ <Tooltip
+ className="w-72 text-center"
+ content="Bring and maintain your own AI models by adding API keys for OpenAI, Google, Anthropic, and other providers"
+ >
+ <Info className="w-4 h-4" />
+ </Tooltip>
+ </h2>
<p className="text-sm text-muted-foreground mb-4">
Bring and maintain your own AI models. See{' '}
<a
@@ -261,45 +270,55 @@ export function UserModels({ pageAccess }: { pageAccess: { write: boolean } }) {
</div>
{hasKey ? (
<div className="flex items-center gap-1">
- <Button variant="ghost" size="sm" onClick={() => handleCopy(model?.id || '')}>
- {copiedKeyId === model?.id ? (
- <Check className="h-4 w-4 text-green-500" />
- ) : (
- <Copy className="h-4 w-4" />
- )}
- </Button>
- {pageAccess?.write && (
+ <Tooltip content={copiedKeyId === model?.id ? 'Copied!' : 'Copy'}>
<Button
variant="ghost"
size="sm"
- onClick={() =>
- setModalState({
- type: 'edit',
- model: {
- id: key,
- apiKey: model?.apiKey || '',
- icon: key.toLowerCase(),
- name: value?.['name'],
- },
- })
- }
+ onClick={() => handleCopy(model?.id || '')}
>
- <Pencil className="h-4 w-4" />
+ {copiedKeyId === model?.id ? (
+ <Check className="h-4 w-4 text-green-500" />
+ ) : (
+ <Copy className="h-4 w-4" />
+ )}
</Button>
+ </Tooltip>
+ {pageAccess?.write && (
+ <Tooltip content="Edit">
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() =>
+ setModalState({
+ type: 'edit',
+ model: {
+ id: key,
+ apiKey: model?.apiKey || '',
+ icon: key.toLowerCase(),
+ name: value?.['name'],
+ },
+ })
+ }
+ >
+ <Pencil className="h-4 w-4" />
+ </Button>
+ </Tooltip>
)}
{pageAccess?.write && (
- <Button
- variant="ghost"
- size="sm"
- onClick={() =>
- setModalState({
- type: 'delete',
- model,
- })
- }
- >
- <Trash2 className="h-4 w-4 hover:text-red-500" />
- </Button>
+ <Tooltip content="Delete">
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() =>
+ setModalState({
+ type: 'delete',
+ model,
+ })
+ }
+ >
+ <Trash2 className="h-4 w-4 hover:text-red-500" />
+ </Button>
+ </Tooltip>
)}
</div>
) : (