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.

Update tooltip classes across multiple components for consistent styling and improved responsiveness. Adjusted widths to enhance user experience in tooltips throughout the application.

Muhammad Hamza Khana98959a65473
diff --git a/packages/app/src/builder-ui/components/APICall.class.ts b/packages/app/src/builder-ui/components/APICall.class.ts
index 9c58dd87..b9536916 100644
--- a/packages/app/src/builder-ui/components/APICall.class.ts
+++ b/packages/app/src/builder-ui/components/APICall.class.ts
@@ -138,7 +138,7 @@ export class APICall extends Component {
label: 'Headers',
readonly: true,
help: 'Add keys the service needs, like Authorization or Content-Type.<br /><a href="${SMYTHOS_DOCS_URL}/agent-studio/components/advanced/api-call/?utm_source=studio&utm_medium=tooltip&utm_campaign=api-call&utm_content=url#step-2-add-headers-and-body" target="_blank" class="text-blue-600 hover:text-blue-800">See header usage</a>',
- tooltipClasses: 'w-64',
+ tooltipClasses: 'w-52',
arrowClasses: '-ml-13',
validate: `custom=isValidJson`,
validateMessage: 'Provide a Valid JSON with non-empty keys',
@@ -183,7 +183,7 @@ export class APICall extends Component {
label: 'Body',
attributes: { 'data-template-vars': 'true', 'data-vault': `${COMP_NAMES.apiCall},All` },
help: 'Write what you want to send and use variables from earlier steps.',
- tooltipClasses: 'w-64',
+ tooltipClasses: 'w-60',
arrowClasses: '-ml-17',
actions: [
{
@@ -349,6 +349,7 @@ export class APICall extends Component {
label: 'Proxy URLs',
section: 'Advanced',
help: 'Send calls through a proxy if your network or vendor asks for it.',
+ tooltipClasses: 'w-56',
validateMessage: `Enter your proxy URLs in the following format:<br/>
[scheme]://[username]:[password]@[host]:[port]<br/><br/>
For multiple URLs, place each one in a new line.<br/><br/>
diff --git a/packages/app/src/builder-ui/components/Classifier.class.ts b/packages/app/src/builder-ui/components/Classifier.class.ts
index f5d4a60b..0c6a4cbf 100644
--- a/packages/app/src/builder-ui/components/Classifier.class.ts
+++ b/packages/app/src/builder-ui/components/Classifier.class.ts
@@ -79,6 +79,7 @@ export class Classifier extends Component {
'Classify the input content to one of the categories.\nSet the selected category to true and the others to empty value',
attributes: { 'data-template-vars': 'true' },
help: 'Explain how text should be classified and what labels to return. <a href="https://smythos.com/docs/agent-studio/components/base/classifier/?utm_source=studio&utm_medium=tooltip&utm_campaign=classifier&utm_content=prompt#step-2---write-or-update-the-prompt" target="_blank" class="text-blue-600 hover:text-blue-800">See prompt tips</a>',
+ tooltipClasses: 'w-56',
},
};
diff --git a/packages/app/src/builder-ui/components/DataSourceCleaner.class.ts b/packages/app/src/builder-ui/components/DataSourceCleaner.class.ts
index 8d7d0d08..3cad4eb1 100644
--- a/packages/app/src/builder-ui/components/DataSourceCleaner.class.ts
+++ b/packages/app/src/builder-ui/components/DataSourceCleaner.class.ts
@@ -49,6 +49,7 @@ export class DataSourceCleaner extends Component {
help: 'Select the data space that contains the source to remove.',
value: '',
options: this.namespaces,
+ tooltipClasses: 'w-56',
},
id: {
@@ -59,6 +60,7 @@ export class DataSourceCleaner extends Component {
validate: `custom=isValidId`,
validateMessage: `It should contain only 'a-z', 'A-Z', '0-9', '-', '_', '.', `,
attributes: { 'data-template-vars': 'true' },
+ tooltipClasses: 'w-56',
},
};
diff --git a/packages/app/src/builder-ui/components/DataSourceIndexer.class.ts b/packages/app/src/builder-ui/components/DataSourceIndexer.class.ts
index 38e23751..17e4316a 100644
--- a/packages/app/src/builder-ui/components/DataSourceIndexer.class.ts
+++ b/packages/app/src/builder-ui/components/DataSourceIndexer.class.ts
@@ -50,6 +50,7 @@ export class DataSourceIndexer extends Component {
label: 'data space',
help: 'Select the memory bucket where this source is stored; keep staging and production separate.',
options: this.namespaces,
+ tooltipClasses: 'w-56',
},
id: {
@@ -59,6 +60,7 @@ export class DataSourceIndexer extends Component {
attributes: { 'data-template-vars': 'true' },
validate: `custom=isValidId`,
validateMessage: `It should contain only 'a-z', 'A-Z', '0-9', '-', '_', '.' `,
+ tooltipClasses: 'w-56',
},
name: {
type: 'input',
@@ -67,6 +69,7 @@ export class DataSourceIndexer extends Component {
attributes: { 'data-template-vars': 'true' },
validate: `maxlength=50`,
validateMessage: 'Enter a non-empty label, not more than 50 characters.',
+ tooltipClasses: 'w-56',
},
metadata: {
type: 'textarea',
@@ -74,7 +77,7 @@ export class DataSourceIndexer extends Component {
code: { mode: 'json', theme: 'chrome' },
label: `Metadata`,
help: 'Optional JSON or text with author, tags, and timestamps to improve search and filtering.',
- tooltipClasses: 'w-44',
+ tooltipClasses: 'w-56',
arrowClasses: '-ml-11',
value: '',
validate: `maxlength=500000`,
diff --git a/packages/app/src/builder-ui/components/DataSourceLookup.class.ts b/packages/app/src/builder-ui/components/DataSourceLookup.class.ts
index 83c4bf9a..8ea0ff9b 100644
--- a/packages/app/src/builder-ui/components/DataSourceLookup.class.ts
+++ b/packages/app/src/builder-ui/components/DataSourceLookup.class.ts
@@ -48,6 +48,7 @@ export class DataSourceLookup extends Component {
type: 'select',
label: 'Data Space',
help: 'Select the memory bucket to search, matching the data space used when indexing. <a href="https://smythos.com/docs/agent-studio/components/rag-data/rag-search/?utm_source=studio&utm_medium=tooltip&utm_campaign=rag-search&utm_content=namespace#step-1-define-the-search-scope" target="_blank" class="text-blue-600 hover:text-blue-800">See namespace mapping</a>',
+ tooltipClasses: 'w-56',
options: this.namespaces,
},
topK: {
@@ -57,12 +58,14 @@ export class DataSourceLookup extends Component {
value: 3,
validate: `required min=0 custom=isValidInteger`,
validateMessage: `Please enter a positive number`,
+ tooltipClasses: 'w-56',
},
includeMetadata: {
type: 'checkbox',
label: 'Include metadata',
help: 'Return stored fields like title, URL, tags, and timestamps with each result.',
value: false,
+ tooltipClasses: 'w-56',
},
scoreThreshold: {
type: 'range',
@@ -72,12 +75,14 @@ export class DataSourceLookup extends Component {
max: 1,
step: 0.01,
help: 'Hide items below this 0–1 relevance score; higher keeps only strong matches. <a href="https://smythos.com/docs/agent-studio/components/rag-data/rag-search/?utm_source=studio&utm_medium=tooltip&utm_campaign=rag-search&utm_content=score-threshold#step-2-filter-and-format-the-output" target="_blank" class="text-blue-600 hover:text-blue-800">See threshold examples</a>',
+ tooltipClasses: 'w-56',
},
includeScore: {
type: 'checkbox',
label: 'Include score',
help: 'Add the similarity score to each item for sorting and debugging.',
value: false,
+ tooltipClasses: 'w-56',
},
};
diff --git a/packages/app/src/builder-ui/components/FEncDec.class.ts b/packages/app/src/builder-ui/components/FEncDec.class.ts
index 9a08b7c4..668e77d5 100644
--- a/packages/app/src/builder-ui/components/FEncDec.class.ts
+++ b/packages/app/src/builder-ui/components/FEncDec.class.ts
@@ -11,6 +11,7 @@ export class FEncDec extends FunctionComponent {
help: 'Select Encode to produce a formatted string, or Decode to read one.',
value: 'Encode',
options: ['Encode', 'Decode'],
+ tooltipClasses: 'w-56',
},
encoding: {
type: 'select',
@@ -18,6 +19,7 @@ export class FEncDec extends FunctionComponent {
value: 'hex',
options: encodings,
help: 'Choose the scheme: Base64 for binary, hex for hashes, UTF-8 for text. <a href="https://smythos.com/docs/agent-studio/components/crypto/encode-decode/?utm_source=studio&utm_medium=tooltip&utm_campaign=encode-decode&utm_content=encoding#step-1-select-an-action-and-encoding-method" target="_blank" class="text-blue-600 hover:text-blue-800">See common schemes</a>',
+ tooltipClasses: 'w-56',
},
};
diff --git a/packages/app/src/builder-ui/components/FHash.class.ts b/packages/app/src/builder-ui/components/FHash.class.ts
index 380532f4..8d14c11c 100644
--- a/packages/app/src/builder-ui/components/FHash.class.ts
+++ b/packages/app/src/builder-ui/components/FHash.class.ts
@@ -28,6 +28,7 @@ export class FHash extends FunctionComponent {
value: 'md5',
options: hashAlgos,
help: 'Choose the hash function, like SHA-256 for integrity; avoid MD5 for security. <a href="https://smythos.com/docs/agent-studio/components/crypto/hash/?utm_source=studio&utm_medium=tooltip&utm_campaign=hash&utm_content=hash-algorithm#step-1-select-an-algorithm-and-encoding" target="_blank" class="text-blue-600 hover:text-blue-800">See algorithm guidance</a>',
+ tooltipClasses: 'w-56',
},
encoding: {
type: 'select',
@@ -36,6 +37,7 @@ export class FHash extends FunctionComponent {
value: 'hex',
options: encodings,
help: 'Choose how the hash is returned: hex for readability or Base64 for compact size.',
+ tooltipClasses: 'w-56',
},
};
diff --git a/packages/app/src/builder-ui/components/FSign.class.ts b/packages/app/src/builder-ui/components/FSign.class.ts
index 33cb4964..2e99c463 100644
--- a/packages/app/src/builder-ui/components/FSign.class.ts
+++ b/packages/app/src/builder-ui/components/FSign.class.ts
@@ -13,6 +13,7 @@ export class FSign extends FunctionComponent {
help: 'Choose HMAC with a shared secret or RSA with a private key.',
value: 'HMAC',
options: ['HMAC', 'RSA'],
+ tooltipClasses: 'w-56',
},
dataTransform: {
type: 'select',
@@ -21,6 +22,7 @@ export class FSign extends FunctionComponent {
//hint: 'Action to perform',
value: 'Stringify',
options: ['Stringify', 'Querystring'],
+ tooltipClasses: 'w-56',
},
key: {
type: 'textarea',
@@ -29,6 +31,7 @@ export class FSign extends FunctionComponent {
attributes: { 'data-template-vars': 'true', 'data-vault': `APICall,ALL_NON_GLOBAL_KEYS` },
help: 'Provide the signing secret or private key; store in <a href="/vault" target="_blank" class="text-blue-600 hover:text-blue-800">Vault</a>, not in code.',
value: '',
+ tooltipClasses: 'w-56',
},
keyMessage: {
type: 'div',
@@ -41,6 +44,7 @@ export class FSign extends FunctionComponent {
value: 'md5',
options: ['md5', 'sha1', 'sha256', 'sha512'],
help: 'Select the digest used inside the method, for example SHA-256.',
+ tooltipClasses: 'w-56',
},
RSA_padding: {
type: 'select',
@@ -61,6 +65,7 @@ export class FSign extends FunctionComponent {
help: 'Choose how the signature is returned: hex, Base64, or Base64URL.',
value: 'hex',
options: ['hex', 'base64', 'base64url', 'latin1', 'utf8'],
+ tooltipClasses: 'w-60',
},
};
diff --git a/packages/app/src/builder-ui/components/FSleep.class.ts b/packages/app/src/builder-ui/components/FSleep.class.ts
index 4feb3b6d..03ee5062 100644
--- a/packages/app/src/builder-ui/components/FSleep.class.ts
+++ b/packages/app/src/builder-ui/components/FSleep.class.ts
@@ -9,6 +9,7 @@ export class FSleep extends FunctionComponent {
type: 'range',
label: 'Delay',
help: 'Pause for the set seconds, then continue; input passes through unchanged. <a href="https://smythos.com/docs/agent-studio/components/advanced/sleep/?utm_source=studio&utm_medium=tooltip&utm_campaign=sleep&utm_content=component-header#step-1-set-the-delay-duration" target="_blank" class="text-blue-600 hover:text-blue-800">See dynamic delays and limits</a>',
+ tooltipClasses: 'w-52',
min: 1,
max: 3600,
value: 1,
diff --git a/packages/app/src/builder-ui/components/FileStore.class.ts b/packages/app/src/builder-ui/components/FileStore.class.ts
index 4f398f1c..5c40fe3a 100644
--- a/packages/app/src/builder-ui/components/FileStore.class.ts
+++ b/packages/app/src/builder-ui/components/FileStore.class.ts
@@ -8,6 +8,7 @@ export class FileStore extends Component {
type: 'input',
label: 'File Name',
help: 'Name the download and include an extension like .json or .png for easy use. <a href="https://smythos.com/docs/agent-studio/components/base/filestore/?utm_source=studio&utm_medium=tooltip&utm_campaign=filestore&utm_content=file-name#step-1-define-inputs" target="_blank" class="text-blue-600 hover:text-blue-800">See naming tips</a>',
+ tooltipClasses: 'w-64',
validate: `maxlength=50 custom=isValidS3FileName`,
validateMessage: `Only alphanumeric characters, '-', '_' and '.' are allowed.`,
value: '',
diff --git a/packages/app/src/builder-ui/components/ForEach.class.ts b/packages/app/src/builder-ui/components/ForEach.class.ts
index 64cb0241..ff64b6b0 100644
--- a/packages/app/src/builder-ui/components/ForEach.class.ts
+++ b/packages/app/src/builder-ui/components/ForEach.class.ts
@@ -7,6 +7,7 @@ export class ForEach extends Component {
type: 'select',
label: 'Output Format',
help: 'Choose Full for item plus metadata, Minimal for the last step\'s output only, or Array of Results for a simple list. <a href="https://smythos.com/docs/agent-studio/components/advanced/for-each/?utm_source=studio&utm_medium=tooltip&utm_campaign=for-each&utm_content=output-format#step-3-select-an-output-format" target="_blank" class="text-blue-600 hover:text-blue-800">See format examples</a>',
+ tooltipClasses: 'w-64',
value: 'full',
options: [
{ text: 'Full', value: 'full' },
diff --git a/packages/app/src/builder-ui/components/GenAILLM.class.ts b/packages/app/src/builder-ui/components/GenAILLM.class.ts
index 0a5c2a8b..adaed57d 100644
--- a/packages/app/src/builder-ui/components/GenAILLM.class.ts
+++ b/packages/app/src/builder-ui/components/GenAILLM.class.ts
@@ -510,6 +510,7 @@ export class GenAILLM extends Component {
validateMessage: `Please provide a prompt. It's required!`,
value: defaultPromptValue,
help: 'Write clear instructions with placeholders (e.g., {{input}}) and state the expected format. <a href="https://smythos.com/docs/agent-studio/components/base/gen-ai-llm/?utm_source=studio&utm_medium=tooltip&utm_campaign=genai-llm&utm_content=prompt#step-2-write-your-prompt" target="_blank" class="text-blue-600 hover:text-blue-800">Go to Docs</a>',
+ tooltipClasses: 'w-56 ',
hintPosition: 'after_label',
attributes: {
'data-template-vars': 'true',
diff --git a/packages/app/src/builder-ui/components/ImageGenerator.class.ts b/packages/app/src/builder-ui/components/ImageGenerator.class.ts
index 5695cfd3..6414ea09 100644
--- a/packages/app/src/builder-ui/components/ImageGenerator.class.ts
+++ b/packages/app/src/builder-ui/components/ImageGenerator.class.ts
@@ -190,6 +190,7 @@ export class ImageGenerator extends Component {
class: 'mt-1',
value: '{{Prompt}}',
help: 'Describe what to generate by describing the subject, style, and constraints. <a href="https://smythos.com/docs/agent-studio/components/base/image-generator/?utm_source=studio&utm_medium=tooltip&utm_campaign=image-generator&utm_content=prompt#step-2-define-inputs" target="_blank" class="text-blue-600 hover:text-blue-800">See prompt tips</a>',
+ tooltipClasses: 'w-56',
attributes: {
'data-template-vars': 'true',
'data-template-excluded-vars': 'Attachment',
diff --git a/packages/app/src/builder-ui/components/JSONFilter.class.ts b/packages/app/src/builder-ui/components/JSONFilter.class.ts
index acab2e43..ea794b95 100644
--- a/packages/app/src/builder-ui/components/JSONFilter.class.ts
+++ b/packages/app/src/builder-ui/components/JSONFilter.class.ts
@@ -11,6 +11,7 @@ export class JSONFilter extends Component {
validate: `maxlength=1000`,
validateMessage: `Maximun 1000 characters`,
help: 'List the paths to keep, like user.email, id, or items[0].name; anything not listed is removed. <a href="https://smythos.com/docs/agent-studio/components/advanced/json-filter/?utm_source=studio&utm_medium=tooltip&utm_campaign=json-filter&utm_content=fields#step-1-define-filter-parameters" target="_blank" class="text-blue-600 hover:text-blue-800">See path rules and nested keys</a>',
+ tooltipClasses: 'w-64',
attributes: { 'data-template-vars': '' },
},
};
diff --git a/packages/app/src/builder-ui/components/MCPClient.class.ts b/packages/app/src/builder-ui/components/MCPClient.class.ts
index d5e90ff7..7697ba92 100644
--- a/packages/app/src/builder-ui/components/MCPClient.class.ts
+++ b/packages/app/src/builder-ui/components/MCPClient.class.ts
@@ -63,6 +63,7 @@ export class MCPClient extends Component {
validate: `required`,
validateMessage: 'Prompt is required',
help: 'Tell the tool what to do and what to return; name the tool and key parameters. <a href="https://smythos.com/docs/agent-studio/components/tools/mcp-client/?utm_source=studio&utm_medium=tooltip&utm_campaign=mcp-client&utm_content=prompt#step-3-provide-inputs" target="_blank" class="text-blue-600 hover:text-blue-800">See prompt patterns</a>',
+ tooltipClasses: 'w-64',
attributes: {
'data-template-vars': 'true',
'data-template-excluded-vars': 'Attachment',
@@ -82,6 +83,7 @@ export class MCPClient extends Component {
expandable: true,
label: 'System Prompt',
help: 'Set rules for all calls, like allowed tools, tone, and required output format.',
+ tooltipClasses: 'w-64',
section: 'Advanced',
value: this.descForModel,
validate: `maxlength=5000`,
diff --git a/packages/app/src/builder-ui/components/MemoryReadKeyVal.class.ts b/packages/app/src/builder-ui/components/MemoryReadKeyVal.class.ts
index 566828dd..0187ddeb 100644
--- a/packages/app/src/builder-ui/components/MemoryReadKeyVal.class.ts
+++ b/packages/app/src/builder-ui/components/MemoryReadKeyVal.class.ts
@@ -12,6 +12,7 @@ export class MemoryReadKeyVal extends Component {
validateMessage: 'Enter a non-empty name, not more than 100 characters.',
attributes: { 'data-template-vars': 'true' },
help: 'Tells the component which namespace to search so it finds the value you wrote.',
+ tooltipClasses: 'w-56',
},
key: {
type: 'input',
@@ -20,6 +21,7 @@ export class MemoryReadKeyVal extends Component {
validate: `maxlength=50`,
attributes: { 'data-template-vars': 'true' },
help: 'Targets the exact item to retrieve using its saved identifier.',
+ tooltipClasses: 'w-56',
},
// scope: {
// type: 'select',
diff --git a/packages/app/src/builder-ui/components/MemoryWriteKeyVal.class.ts b/packages/app/src/builder-ui/components/MemoryWriteKeyVal.class.ts
index c2da62a8..b9eeea19 100644
--- a/packages/app/src/builder-ui/components/MemoryWriteKeyVal.class.ts
+++ b/packages/app/src/builder-ui/components/MemoryWriteKeyVal.class.ts
@@ -69,6 +69,7 @@ export class MemoryWriteKeyVal extends Component {
{ value: '604800', text: '1 week' },
],
help: 'Sets how long a TTL value remains available before automatic deletion.',
+ tooltipClasses: 'w-56',
},
};
diff --git a/packages/app/src/builder-ui/components/MemoryWriteObject.class.ts b/packages/app/src/builder-ui/components/MemoryWriteObject.class.ts
index 5b141309..396abf63 100644
--- a/packages/app/src/builder-ui/components/MemoryWriteObject.class.ts
+++ b/packages/app/src/builder-ui/components/MemoryWriteObject.class.ts
@@ -41,6 +41,7 @@ export class MemoryWriteObject extends Component {
type: 'select',
label: 'TTL',
help: 'Sets how long a TTL value remains available before automatic deletion.',
+ tooltipClasses: 'w-56',
value: '300',
options: [
{ value: '300', text: '5 minutes' },
diff --git a/packages/app/src/builder-ui/ui/dialogs.ts b/packages/app/src/builder-ui/ui/dialogs.ts
index 9cf9b42d..9244fe08 100644
--- a/packages/app/src/builder-ui/ui/dialogs.ts
+++ b/packages/app/src/builder-ui/ui/dialogs.ts
@@ -143,35 +143,13 @@ export async function createRightSidebar(title?, content?, actions?, trActions?,
// Add data attributes directly to the button
if (btn === 'help') {
- button.setAttribute('data-tooltip-target', 'tooltip-help-sidebar');
- button.setAttribute('data-tooltip-placement', 'left');
-
- // Create and append tooltip
- const tooltip = document.createElement('div');
- tooltip.id = 'tooltip-help-sidebar';
- tooltip.setAttribute('role', 'tooltip');
- tooltip.className =
- 'tooltip absolute z-50 inline-block text-xs w-max bg-gray-900 shadow-lg text-white py-1.5 px-3 rounded-md opacity-0 invisible';
- tooltip.style.fontFamily = 'Inter, sans-serif';
- tooltip.style.transform = 'translate3d(-100%, 0px, 0px)';
- if (action.tooltip) {
- tooltip.style.maxWidth = '200px';
- }
- tooltip.textContent = action.tooltip || 'Help';
-
- // Add event listeners to the button
- button.addEventListener('mouseenter', () => {
- tooltip.classList.remove('invisible', 'opacity-0');
- tooltip.classList.add('visible', 'opacity-100');
- });
-
- button.addEventListener('mouseleave', () => {
- tooltip.classList.add('invisible', 'opacity-0');
- tooltip.classList.remove('visible', 'opacity-100');
+ attachTooltipV2(button, {
+ text: action.tooltip || 'Help',
+ position: action.tooltip ? 'bottom-left' : 'left',
+ delayDuration: 300,
});
titleLeftActions.appendChild(button);
- titleLeftActions.appendChild(tooltip);
} else {
if (action.click) button.addEventListener('click', action.click);
titleLeftActions.appendChild(button);
diff --git a/packages/app/src/builder-ui/ui/form/fields/index.ts b/packages/app/src/builder-ui/ui/form/fields/index.ts
index daa13a64..6000f286 100644
--- a/packages/app/src/builder-ui/ui/form/fields/index.ts
+++ b/packages/app/src/builder-ui/ui/form/fields/index.ts
@@ -1396,10 +1396,26 @@ export function createInfoButton(
// Render the Tooltip component wrapped in TooltipProvider
const root = createRoot(tooltipContainer);
+
+ // When tooltipClasses is provided (like 'w-56'), extract width and apply via inline style
+ const widthClassName = tooltipClasses || (hasLinks ? `min-w-52 max-w-96` : `w-${estimatedWidth}`);
+
+ let tooltipStyle: React.CSSProperties | undefined;
+ if (tooltipClasses && tooltipClasses.includes('w-')) {
+ const widthMatch = tooltipClasses.match(/w-(\d+)/);
+ if (widthMatch) {
+ tooltipStyle = {
+ width: `${parseInt(widthMatch[1], 10) * 0.25}rem`,
+ };
+ }
+ }
+
root.render(
React.createElement(
TooltipProvider,
- { delayDuration: 300, skipDelayDuration: 100 },
+ { delayDuration: 300, skipDelayDuration: 100 } as React.ComponentProps<
+ typeof TooltipProvider
+ >,
React.createElement(
Tooltip,
{},
@@ -1411,10 +1427,18 @@ export function createInfoButton(
className:
clsHint +
' whitespace-normal text-xs ' +
- (tooltipClasses || (hasLinks ? `min-w-52 max-w-96` : `w-${estimatedWidth}`)) +
+ widthClassName +
' [&_a]:whitespace-nowrap [&_a]:inline-block',
+ style: tooltipStyle,
+ ref: (element: HTMLElement | null) => {
+ // Override text-balance to ensure text fills width evenly
+ if (element) {
+ element.style.setProperty('text-wrap', 'wrap', 'important');
+ }
+ },
},
React.createElement('div', {
+ style: { width: '100%', display: 'block' },
dangerouslySetInnerHTML: { __html: sanitizedText },
}),
),
diff --git a/packages/app/src/react/features/agent-settings/components/Assignments/ChatWithAgentWidget.tsx b/packages/app/src/react/features/agent-settings/components/Assignments/ChatWithAgentWidget.tsx
index c38683f8..d8412105 100644
--- a/packages/app/src/react/features/agent-settings/components/Assignments/ChatWithAgentWidget.tsx
+++ b/packages/app/src/react/features/agent-settings/components/Assignments/ChatWithAgentWidget.tsx
@@ -1,7 +1,7 @@
import WidgetCard from '@react/features/agent-settings/components/WidgetCard';
import { useAgentSettingsCtx } from '@react/features/agent-settings/contexts/agent-settings.context';
-import { PRIMARY_BUTTON_STYLE, SECONDARY_BUTTON_STYLE } from '@react/shared/constants/style';
import { Tooltip, TooltipContent, TooltipTrigger } from '@react/shared/components/ui/tooltip';
+import { PRIMARY_BUTTON_STYLE, SECONDARY_BUTTON_STYLE } from '@react/shared/constants/style';
import { useAuthCtx } from '@react/shared/contexts/auth.context';
import { Observability } from '@src/shared/observability';
import { EVENTS } from '@src/shared/posthog/constants/events';
@@ -75,7 +75,7 @@ const ChatWithAgentWidget = ({ isWriteAccess, isAgentDeployed }: Props) => {
<TooltipTrigger asChild>
<Info className="w-4 h-4" />
</TooltipTrigger>
- <TooltipContent className="w-52 text-center">
+ <TooltipContent className="max-w-[240px] text-center text-wrap">
<p>Interact directly with your agent through a conversational interface.</p>
</TooltipContent>
</Tooltip>
@@ -95,9 +95,12 @@ const ChatWithAgentWidget = ({ isWriteAccess, isAgentDeployed }: Props) => {
`${isAgentDeployed ? PRIMARY_BUTTON_STYLE : SECONDARY_BUTTON_STYLE}`,
)}
onClick={(e) => {
- Observability.observeInteraction(EVENTS.AGENT_SETTINGS_EVENTS.app_chat_with_agent, {
- source: 'agent settings',
- });
+ Observability.observeInteraction(
+ EVENTS.AGENT_SETTINGS_EVENTS.app_chat_with_agent,
+ {
+ source: 'agent settings',
+ },
+ );
!isAgentDeployed && e.preventDefault();
}}
target="_blank"
@@ -107,8 +110,8 @@ const ChatWithAgentWidget = ({ isWriteAccess, isAgentDeployed }: Props) => {
</Link>
</div>
</TooltipTrigger>
- <TooltipContent side="top" className="min-w-[280px] text-center">
- <div>
+ <TooltipContent side="top" className="max-w-[240px] text-center text-wrap">
+ <div style={{ width: '100%' }}>
To chat with your agent, please deploy to production.{' '}
<Link
to={`/builder/${agentId}`}
diff --git a/packages/app/src/react/features/agent-settings/components/CapabilitiesWidget/index.tsx b/packages/app/src/react/features/agent-settings/components/CapabilitiesWidget/index.tsx
index c0d205ae..7504bb61 100644
--- a/packages/app/src/react/features/agent-settings/components/CapabilitiesWidget/index.tsx
+++ b/packages/app/src/react/features/agent-settings/components/CapabilitiesWidget/index.tsx
@@ -9,8 +9,8 @@ import { CloseIcon } from '@src/react/shared/components/svgs';
import { plugins, PluginTarget, PluginType } from '@src/react/shared/plugins/Plugins';
import { Observability } from '@src/shared/observability';
-import { Badge } from 'flowbite-react';
import { Tooltip, TooltipContent, TooltipTrigger } from '@src/react/shared/components/ui/tooltip';
+import { Badge } from 'flowbite-react';
import { Info } from 'lucide-react';
import { useMemo, useState } from 'react';
import { FaPlay } from 'react-icons/fa';
@@ -39,7 +39,7 @@ const CapabilitiesWidget = ({ isOnPaidPlan: isSubscribedToPlan, isWriteAccess }:
<TooltipTrigger asChild>
<Info className="w-4 h-4" />
</TooltipTrigger>
- <TooltipContent className="w-52 text-center">
+ <TooltipContent className="max-w-[240px] text-center text-wrap">
<p>Agent Skills in SmythOS define the capabilities of an agent. Each skill is added through the Agent Skill component</p>
</TooltipContent>
</Tooltip>
@@ -98,7 +98,7 @@ function Endpoint({ component }: { component: Component }) {
const [isTriggeringSkill, setIsTriggeringSkill] = useState(false);
const { agentId } = useAgentSettingsCtx();
- let pluginItems = (
+ const pluginItems = (
plugins.getPluginsByTarget(
PluginTarget.AgentSettingsSkillsWidgetSkillButton,
PluginType.Config,
diff --git a/packages/app/src/react/features/agent-settings/components/Deployments/EnvironmentWidget.tsx b/packages/app/src/react/features/agent-settings/components/Deployments/EnvironmentWidget.tsx
index 39493dc3..79ff1314 100644
--- a/packages/app/src/react/features/agent-settings/components/Deployments/EnvironmentWidget.tsx
+++ b/packages/app/src/react/features/agent-settings/components/Deployments/EnvironmentWidget.tsx
@@ -2,9 +2,9 @@ import WidgetCard from '@react/features/agent-settings/components/WidgetCard';
import { useAgentSettingsCtx } from '@react/features/agent-settings/contexts/agent-settings.context';
import { CopyKeyIcon } from '@react/shared/components/svgs';
import { Button } from '@react/shared/components/ui/newDesign/button';
+import { Tooltip, TooltipContent, TooltipTrigger } from '@src/react/shared/components/ui/tooltip';
import { builderStore } from '@src/shared/state_stores/builder/store';
import { useMutation, useQuery } from '@tanstack/react-query';
-import { Tooltip, TooltipContent, TooltipTrigger } from '@src/react/shared/components/ui/tooltip';
import { useEffect, useMemo, useRef, useState } from 'react';
import { FaCheck } from 'react-icons/fa';
import { FaUpRightFromSquare } from 'react-icons/fa6';
@@ -106,7 +106,7 @@ const DomainRow = ({
<span className="text-sm">API</span>
</button>
</TooltipTrigger>
- <TooltipContent side="top" className="min-w-max w-[223px]">
+ <TooltipContent side="top">
<p>API calls and endpoint testing</p>
</TooltipContent>
</Tooltip>
@@ -121,7 +121,7 @@ const DomainRow = ({
<FaUpRightFromSquare className="w-4 h-4" />
</button>
</TooltipTrigger>
- <TooltipContent side="top" className="min-w-max w-[145px]">
+ <TooltipContent side="top">
<p>Open in a new tab</p>
</TooltipContent>
</Tooltip>
@@ -207,7 +207,7 @@ const EnvironmentWidget = ({ isWriteAccess, isDeployed }: Props) => {
const filteredDomains = domainData
?.filter((d) => d.aiAgent == null || d.aiAgent.id === agentId)
?.map((item) => item.name);
- let prodDomain = `${agentId}.${
+ const prodDomain = `${agentId}.${
workspace?.serverData?.prod_agent_domain || serverData?.prod_agent_domain || ''
}`;
@@ -366,7 +366,7 @@ const EnvironmentWidget = ({ isWriteAccess, isDeployed }: Props) => {
{/* Test Domain */}
<DomainRow
- label={`Test Domain`}
+ label={'Test Domain'}
value={testDomainUrl}
onCopyClick={(domain) => {
navigator.clipboard.writeText(ensureHttps(domain));
diff --git a/packages/app/src/react/features/agent-settings/components/SettingsWidget.tsx b/packages/app/src/react/features/agent-settings/components/SettingsWidget.tsx
index 5a4d492c..2b105f2b 100644
--- a/packages/app/src/react/features/agent-settings/components/SettingsWidget.tsx
+++ b/packages/app/src/react/features/agent-settings/components/SettingsWidget.tsx
@@ -2,8 +2,8 @@ import { useWidgetsContext } from '@react/features/agent-settings/components/Ove
import WidgetCard from '@react/features/agent-settings/components/WidgetCard';
import { TextArea as CustomTextarea } from '@react/shared/components/ui/newDesign/textarea';
import { SkeletonLoader } from '@src/react/shared/components/ui/skeleton-loader';
-import { Modal } from 'flowbite-react';
import { Tooltip, TooltipContent, TooltipTrigger } from '@src/react/shared/components/ui/tooltip';
+import { Modal } from 'flowbite-react';
import { Info } from 'lucide-react';
import { useEffect, useState } from 'react';
@@ -83,7 +83,7 @@ const SettingsWidget = () => {
<TooltipTrigger asChild>
<Info className="w-4 h-4 mt-[-2px]" />
</TooltipTrigger>
- <TooltipContent className="w-52 text-center">
+ <TooltipContent className="max-w-[240px] text-center text-wrap">
<div>
Primary language model
<br />
diff --git a/packages/app/src/react/features/agent-settings/components/WidgetCard.tsx b/packages/app/src/react/features/agent-settings/components/WidgetCard.tsx
index 9d63ee81..181fdafe 100644
--- a/packages/app/src/react/features/agent-settings/components/WidgetCard.tsx
+++ b/packages/app/src/react/features/agent-settings/components/WidgetCard.tsx
@@ -36,7 +36,9 @@ const WidgetCard = ({ hasBorder = true, ...props }: Props) => {
props.isWriteAccess !== null ? (
<Tooltip>
<TooltipTrigger asChild>
- <WidgetCardChild hasBorder={hasBorder} {...props} />
+ <div>
+ <WidgetCardChild hasBorder={hasBorder} {...props} />
+ </div>
</TooltipTrigger>
<TooltipContent side="top">
<p>You do not have permission to make changes to this widget</p>
diff --git a/packages/app/src/react/features/agent-settings/dialogs/ChatBot.tsx b/packages/app/src/react/features/agent-settings/dialogs/ChatBot.tsx
index 6ff29d23..0df3944d 100644
--- a/packages/app/src/react/features/agent-settings/dialogs/ChatBot.tsx
+++ b/packages/app/src/react/features/agent-settings/dialogs/ChatBot.tsx
@@ -26,11 +26,11 @@ import { EMBODIMENT_TYPE } from '@react/shared/enums';
import { Agent } from '@react/shared/types/agent-data.types';
import { extractError } from '@react/shared/utils/errors';
import { cn, validateDomains, validateURL } from '@react/shared/utils/utils';
+import { Tooltip, TooltipContent, TooltipTrigger } from '@src/react/shared/components/ui/tooltip';
import { ChatbotEmbodimentData } from '@src/react/shared/types/api-results.types';
import { errorToast, successToast, warningToast } from '@src/shared/components/toast';
import { Observability } from '@src/shared/observability';
import classNames from 'classnames';
-import { Tooltip, TooltipContent, TooltipTrigger } from '@src/react/shared/components/ui/tooltip';
import { Info } from 'lucide-react';
// const CHATGPT_MODELS_V2 = LLMRegistry.getSortedModelsByFeatures('tools').map((model) => ({
@@ -429,12 +429,11 @@ const ChatBotDialog = ({
<TooltipTrigger asChild>
<Info className="w-5 h-5 ml-1" />
</TooltipTrigger>
- <TooltipContent className="w-52 text-center">
+ <TooltipContent className="max-w-[240px] text-center text-wrap">
<div>
Restrict chatbot to specific domains.
<br /> Use commas to separate multiple domains (e.g.,
example.com, mysite.org).
- <br /> Leave empty for no restrictions.
</div>
</TooltipContent>
</Tooltip>
diff --git a/packages/app/src/react/features/agent-settings/dialogs/FormPreview.tsx b/packages/app/src/react/features/agent-settings/dialogs/FormPreview.tsx
index d4690f67..8ecd01d7 100644
--- a/packages/app/src/react/features/agent-settings/dialogs/FormPreview.tsx
+++ b/packages/app/src/react/features/agent-settings/dialogs/FormPreview.tsx
@@ -212,12 +212,11 @@ const FormPreviewDialog = ({
<TooltipTrigger asChild>
<Info className="w-5 h-5 ml-1 cursor-pointer" />
</TooltipTrigger>
- <TooltipContent className="w-60 text-center">
+ <TooltipContent className="max-w-[240px] text-center text-wrap">
<div>
Restrict form preview to specific domains.
<br /> Use commas to separate multiple domains (e.g.,
example.com, mysite.org).
- <br /> Leave empty for no restrictions.
</div>
</TooltipContent>
</Tooltip>
@@ -291,7 +290,7 @@ const FormPreviewDialog = ({
<TooltipTrigger asChild>
<Info className="w-5 h-5 ml-1 cursor-pointer" />
</TooltipTrigger>
- <TooltipContent className="w-60 text-center">
+ <TooltipContent className="max-w-[240px] text-center text-wrap">
<div>
Enabling output preview will hide the download and copy
options for the output.
diff --git a/packages/app/src/react/features/agent-settings/dialogs/Voice.tsx b/packages/app/src/react/features/agent-settings/dialogs/Voice.tsx
index 210026ff..d33d7745 100644
--- a/packages/app/src/react/features/agent-settings/dialogs/Voice.tsx
+++ b/packages/app/src/react/features/agent-settings/dialogs/Voice.tsx
@@ -209,12 +209,11 @@ const VoiceDialog = ({
<TooltipTrigger asChild>
<Info className="w-5 h-5 ml-1 cursor-pointer" />
</TooltipTrigger>
- <TooltipContent className="w-60 text-center">
+ <TooltipContent className="max-w-[240px] text-center text-wrap">
<div>
Restrict voice to specific domains.
<br /> Use commas to separate multiple domains (e.g.,
example.com, mysite.org).
- <br /> Leave empty for no restrictions.
</div>
</TooltipContent>
</Tooltip>
diff --git a/packages/app/src/react/features/agents/components/agentCard/AgentCard.tsx b/packages/app/src/react/features/agents/components/agentCard/AgentCard.tsx
index 4ebf06bc..99008206 100644
--- a/packages/app/src/react/features/agents/components/agentCard/AgentCard.tsx
+++ b/packages/app/src/react/features/agents/components/agentCard/AgentCard.tsx
@@ -136,7 +136,7 @@ export function AgentCard({ agent, loadAgents, updateAgentInPlace }: AgentCardPr
}
const chatTooltipContent = (
- <>
+ <div style={{ width: '100%' }}>
To chat with your agent, please deploy to production.{' '}
<>
<Link to={`/builder/${agent.id}`} className="underline" reloadDocument>
@@ -144,7 +144,7 @@ export function AgentCard({ agent, loadAgents, updateAgentInPlace }: AgentCardPr
</Link>{' '}
your agent now.
</>
- </>
+ </div>
);
const userName = agentData?.userName?.split('@')[0];
@@ -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 */}
@@ -453,7 +453,7 @@ export function AgentCard({ agent, loadAgents, updateAgentInPlace }: AgentCardPr
</TooltipTrigger>
<TooltipContent
side={cardState.tooltipPosition === 'bottom' ? 'top' : 'bottom'}
- className="min-w-[280px] text-center"
+ className="max-w-[240px] text-center text-wrap"
>
{chatTooltipContent}
</TooltipContent>
@@ -502,7 +502,7 @@ export function AgentCard({ agent, loadAgents, updateAgentInPlace }: AgentCardPr
</TooltipTrigger>
<TooltipContent
side={cardState.tooltipPosition}
- className="opacity-100 text-center agent-card-tooltip"
+ className="opacity-100 text-center max-w-[240px] text-wrap"
>
<p>{agentData.description}</p>
</TooltipContent>
diff --git a/packages/app/src/react/features/agents/components/modals/deploy-agent-modal.tsx b/packages/app/src/react/features/agents/components/modals/deploy-agent-modal.tsx
index f091a371..0f479af6 100644
--- a/packages/app/src/react/features/agents/components/modals/deploy-agent-modal.tsx
+++ b/packages/app/src/react/features/agents/components/modals/deploy-agent-modal.tsx
@@ -571,7 +571,7 @@ function DeployAgentModal({ userInfo, deploymentSidebarCtx }) {
<Info className="w-4 h-4 text-gray-500 text-lg" />
</span>
</TooltipTrigger>
- <TooltipContent className="w-60">
+ <TooltipContent className="max-w-[240px] text-center text-wrap">
<div style={{ whiteSpace: 'normal' }}>
Deploy your agent to make it live and ready to integrate into your
workflow. Use SmythOS's default subdomain or configure a custom one.{' '}
diff --git a/packages/app/src/react/features/builder/components/VariablesWidget.tsx b/packages/app/src/react/features/builder/components/VariablesWidget.tsx
index 831e04ce..2b8a8487 100644
--- a/packages/app/src/react/features/builder/components/VariablesWidget.tsx
+++ b/packages/app/src/react/features/builder/components/VariablesWidget.tsx
@@ -474,8 +474,8 @@ const VariablesWidget = ({ agentId, workspace }: { agentId: string; workspace: W
<LuInfo size={20} />
</div>
</TooltipTrigger>
- <TooltipContent side="top">
- <div style={{ maxWidth: '200px' }}>
+ <TooltipContent side="top" className="max-w-[240px] text-center text-wrap">
+ <div>
The Agent Variables you declare here can be accessed and used across all
components. These variables act like global variables throughout your AI agent.
</div>
@@ -528,7 +528,7 @@ const VariablesWidget = ({ agentId, workspace }: { agentId: string; workspace: W
</div>
</TooltipTrigger>
<TooltipContent side="top">
- <div style={{ width: '120px' }}>Delete Variable</div>
+ <div>Delete Variable</div>
</TooltipContent>
</Tooltip>
</button>
diff --git a/packages/app/src/react/features/data-pool/components/CreateNamespaceModal.tsx b/packages/app/src/react/features/data-pool/components/CreateNamespaceModal.tsx
index cde37fb8..33ebdab9 100644
--- a/packages/app/src/react/features/data-pool/components/CreateNamespaceModal.tsx
+++ b/packages/app/src/react/features/data-pool/components/CreateNamespaceModal.tsx
@@ -25,9 +25,7 @@ import { errorToast, successToast } from '@src/shared/components/toast';
import { Info, PlusCircle, Settings } from 'lucide-react';
import { ChangeEvent, FC, useEffect, useState } from 'react';
import { useNavigate } from 'react-router-dom';
-import {
- CreateCredentialsModal
-} from '../../credentials/components/create-credentials.modal';
+import { CreateCredentialsModal } from '../../credentials/components/create-credentials.modal';
import credentialsSchema from '../../credentials/credentials-schema.json';
import { dataPoolClient } from '../client/datapool.client';
import { useDataPoolContext } from '../contexts/data-pool.context';
@@ -50,7 +48,8 @@ export const CreateNamespaceModal: FC<CreateNamespaceModalProps> = ({
onClose,
onSuccess,
}) => {
- const { credentials, credentialsLoading, getCredentialById, refetchCredentials } = useDataPoolContext();
+ const { credentials, credentialsLoading, getCredentialById, refetchCredentials } =
+ useDataPoolContext();
const navigate = useNavigate();
const [name, setName] = useState('');
const [selectedCredentialId, setSelectedCredentialId] = useState('');
@@ -159,14 +158,14 @@ export const CreateNamespaceModal: FC<CreateNamespaceModalProps> = ({
setIsCreateCredModalOpen(true);
return;
}
-
+
// If "manage_connections" is selected, navigate to vault page
if (value === '__manage_connections__') {
onClose();
navigate('/vault');
return;
}
-
+
setSelectedCredentialId(value);
handleDimentionDynamicChange('connection', value);
setError(null);
@@ -190,10 +189,7 @@ export const CreateNamespaceModal: FC<CreateNamespaceModalProps> = ({
setIsDimensionsReadOnly(true);
}
}
-
-
-
- };
+ };
/**
* Handle successful credential creation
@@ -207,10 +203,10 @@ export const CreateNamespaceModal: FC<CreateNamespaceModalProps> = ({
}) => {
// Close the create credentials modal
setIsCreateCredModalOpen(false);
-
+
// Refetch credentials to get the new one
refetchCredentials();
-
+
// Auto-select the newly created credential
if (data.id) {
setSelectedCredentialId(data.id);
@@ -226,227 +222,228 @@ export const CreateNamespaceModal: FC<CreateNamespaceModalProps> = ({
setError(null);
};
- const isFormValid = name.trim() !== '' && selectedCredentialId !== '' && selectedModelId !== '' && dimensions !== '';
+ const isFormValid =
+ name.trim() !== '' &&
+ selectedCredentialId !== '' &&
+ selectedModelId !== '' &&
+ dimensions !== '';
return (
<>
- <Dialog
- open={isOpen} onOpenChange={onClose}>
- <DialogContent className={'sm:max-w-[500px] max-h-[90vh] overflow-y-auto'}>
- <DialogHeader>
- <DialogTitle>Create Data Space</DialogTitle>
- <p className="text-sm text-gray-600 mt-1">
- Set up a Data Space to unlock your agents' ability to search, automate, and learn
- from your data — using RAG and other tools
- </p>
- </DialogHeader>
-
- <form
- onSubmit={(e) => {
- e.preventDefault();
- handleCreate();
- }}
- >
- <div className="grid gap-4 py-4">
- {/* Provider Selection */}
- <div className="space-y-2">
- <label className="text-gray-700 mb-1 text-sm font-normal flex items-center">
- Vector Database Provider <span className="text-red-500 ml-1">*</span>
- </label>
- <Select
- value={selectedCredentialId}
- onValueChange={handleCredentialChange}
- disabled={credentialsLoading || isCreating}
- >
- <SelectTrigger className="w-full" disabled={credentialsLoading || isCreating}>
- <SelectValue placeholder="Select a provider">
- {selectedCredentialId && (() => {
- const selectedCred = getCredentialById(selectedCredentialId);
- const logo = selectedCred ? getProviderLogo(selectedCred.provider) : undefined;
- return (
- <div className="flex items-center gap-2">
- {logo && (
- <img
- src={logo}
- alt={selectedCred?.name || 'Provider'}
- className="w-5 h-5 object-contain"
- />
- )}
- <span>{selectedCred?.name}</span>
- {selectedCred?.isManaged && (
- <span className="text-xs text-gray-500">Managed</span>
- )}
- </div>
- );
- })()}
- </SelectValue>
- </SelectTrigger>
- <SelectContent>
- {/* Create New Connection Option */}
- <SelectItem value="__create_new__">
- <div className="flex items-center gap-2 text-blue-600 font-medium">
- <PlusCircle className="w-4 h-4" />
- <span>Create New Connection</span>
- </div>
- </SelectItem>
-
- {/* Manage Connections Option */}
- <SelectItem value="__manage_connections__">
- <div className="flex items-center gap-2 text-gray-600 font-medium">
- <Settings className="w-4 h-4" />
- <span>Manage Connections</span>
- </div>
- </SelectItem>
-
- {/* Separator */}
- {credentials.length > 0 && (
- <div className="border-t border-gray-200 my-1" />
- )}
-
- {/* Existing Credentials */}
- {credentials.length === 0 ? (
- <div className="px-2 py-1.5 text-sm text-muted-foreground">
- No connections found
- </div>
- ) : (
- credentials.map((cred) => {
- const logo = getProviderLogo(cred.provider);
- return (
- <SelectItem key={cred.id} value={cred.id}>
- <div className="flex items-center gap-2">
- {logo && (
- <img
- src={logo}
- alt={cred.name}
- className="w-5 h-5 object-contain"
- />
- )}
- <span>{cred.name}</span>
- {cred.isManaged && (
- <span className="text-xs text-gray-500">Managed</span>
- )}
- </div>
- </SelectItem>
- );
- })
- )}
- </SelectContent>
- </Select>
- </div>
-
- {/* Name Input */}
- <div className="space-y-2">
- <Input
- label="Name"
- required
- fullWidth
- type="text"
- placeholder="Name your data space"
- value={name}
- onChange={handleNameChange}
- disabled={isCreating}
- error={!!error}
- errorMessage={error || undefined}
- />
- </div>
-
- {/* Embedding Model Selection and Dimensions - Side by Side */}
- <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
- {/* Embedding Model Selection */}
+ <Dialog open={isOpen} onOpenChange={onClose}>
+ <DialogContent className={'sm:max-w-[500px] max-h-[90vh] overflow-y-auto'}>
+ <DialogHeader>
+ <DialogTitle>Create Data Space</DialogTitle>
+ <p className="text-sm text-gray-600 mt-1">
+ Set up a Data Space to unlock your agents' ability to search, automate, and learn from
+ your data — using RAG and other tools
+ </p>
+ </DialogHeader>
+
+ <form
+ onSubmit={(e) => {
+ e.preventDefault();
+ handleCreate();
+ }}
+ >
+ <div className="grid gap-4 py-4">
+ {/* Provider Selection */}
<div className="space-y-2">
<label className="text-gray-700 mb-1 text-sm font-normal flex items-center">
- Embedding Model <span className="text-red-500 ml-1">*</span>
+ Vector Database Provider <span className="text-red-500 ml-1">*</span>
</label>
<Select
- value={selectedModelId}
- onValueChange={(value) => {
-
- setSelectedModelId(value);
- handleDimentionDynamicChange('embedding_model', value);
- }}
- disabled={isLoadingModels || isCreating}
+ value={selectedCredentialId}
+ onValueChange={handleCredentialChange}
+ disabled={credentialsLoading || isCreating}
>
- <SelectTrigger className="w-full" disabled={isLoadingModels || isCreating}>
- <SelectValue placeholder="Select an embedding model" />
+ <SelectTrigger className="w-full" disabled={credentialsLoading || isCreating}>
+ <SelectValue placeholder="Select a provider">
+ {selectedCredentialId &&
+ (() => {
+ const selectedCred = getCredentialById(selectedCredentialId);
+ const logo = selectedCred
+ ? getProviderLogo(selectedCred.provider)
+ : undefined;
+ return (
+ <div className="flex items-center gap-2">
+ {logo && (
+ <img
+ src={logo}
+ alt={selectedCred?.name || 'Provider'}
+ className="w-5 h-5 object-contain"
+ />
+ )}
+ <span>{selectedCred?.name}</span>
+ {selectedCred?.isManaged && (
+ <span className="text-xs text-gray-500">Managed</span>
+ )}
+ </div>
+ );
+ })()}
+ </SelectValue>
</SelectTrigger>
<SelectContent>
- {isLoadingModels ? (
- <div className="px-2 py-1.5 text-sm text-muted-foreground">
- Loading models...
+ {/* Create New Connection Option */}
+ <SelectItem value="__create_new__">
+ <div className="flex items-center gap-2 text-blue-600 font-medium">
+ <PlusCircle className="w-4 h-4" />
+ <span>Create New Connection</span>
+ </div>
+ </SelectItem>
+
+ {/* Manage Connections Option */}
+ <SelectItem value="__manage_connections__">
+ <div className="flex items-center gap-2 text-gray-600 font-medium">
+ <Settings className="w-4 h-4" />
+ <span>Manage Connections</span>
</div>
- ) : embeddingModels.length === 0 ? (
+ </SelectItem>
+
+ {/* Separator */}
+ {credentials.length > 0 && <div className="border-t border-gray-200 my-1" />}
+
+ {/* Existing Credentials */}
+ {credentials.length === 0 ? (
<div className="px-2 py-1.5 text-sm text-muted-foreground">
- No models available
+ No connections found
</div>
) : (
- embeddingModels.map((model) => (
- <SelectItem key={model.model} value={model.model}>
- {model.label}
- </SelectItem>
- ))
+ credentials.map((cred) => {
+ const logo = getProviderLogo(cred.provider);
+ return (
+ <SelectItem key={cred.id} value={cred.id}>
+ <div className="flex items-center gap-2">
+ {logo && (
+ <img
+ src={logo}
+ alt={cred.name}
+ className="w-5 h-5 object-contain"
+ />
+ )}
+ <span>{cred.name}</span>
+ {cred.isManaged && (
+ <span className="text-xs text-gray-500">Managed</span>
+ )}
+ </div>
+ </SelectItem>
+ );
+ })
)}
</SelectContent>
</Select>
</div>
- {/* Dimensions Input */}
+ {/* Name Input */}
<div className="space-y-2">
- <label className="text-gray-700 text-sm font-normal flex items-center">
- Vector Dimensions
- <Tooltip>
- <TooltipTrigger asChild>
- <Info className="w-4 h-4 cursor-help ml-1" />
- </TooltipTrigger>
- <TooltipContent side="right" className="w-[200px] text-center">
- <p>
- The dimension should match the one configured in your vector database provider.
- </p>
- </TooltipContent>
- </Tooltip>
- </label>
- <input
- type="number"
- placeholder="e.g., 1536"
- value={dimensions}
- onChange={(e: ChangeEvent<HTMLInputElement>) => setDimensions(e.target.value)}
+ <Input
+ label="Name"
+ required
+ fullWidth
+ type="text"
+ placeholder="Name your data space"
+ value={name}
+ onChange={handleNameChange}
disabled={isCreating}
- readOnly={isDimensionsReadOnly}
- className="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 disabled:bg-gray-100 disabled:cursor-not-allowed text-sm"
+ error={!!error}
+ errorMessage={error || undefined}
/>
</div>
+
+ {/* Embedding Model Selection and Dimensions - Side by Side */}
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
+ {/* Embedding Model Selection */}
+ <div className="space-y-2">
+ <label className="text-gray-700 mb-1 text-sm font-normal flex items-center">
+ Embedding Model <span className="text-red-500 ml-1">*</span>
+ </label>
+ <Select
+ value={selectedModelId}
+ onValueChange={(value) => {
+ setSelectedModelId(value);
+ handleDimentionDynamicChange('embedding_model', value);
+ }}
+ disabled={isLoadingModels || isCreating}
+ >
+ <SelectTrigger className="w-full" disabled={isLoadingModels || isCreating}>
+ <SelectValue placeholder="Select an embedding model" />
+ </SelectTrigger>
+ <SelectContent>
+ {isLoadingModels ? (
+ <div className="px-2 py-1.5 text-sm text-muted-foreground">
+ Loading models...
+ </div>
+ ) : embeddingModels.length === 0 ? (
+ <div className="px-2 py-1.5 text-sm text-muted-foreground">
+ No models available
+ </div>
+ ) : (
+ embeddingModels.map((model) => (
+ <SelectItem key={model.model} value={model.model}>
+ {model.label}
+ </SelectItem>
+ ))
+ )}
+ </SelectContent>
+ </Select>
+ </div>
+
+ {/* Dimensions Input */}
+ <div className="space-y-2">
+ <label className="text-gray-700 text-sm font-normal flex items-center">
+ Vector Dimensions
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Info className="w-4 h-4 cursor-help ml-1" />
+ </TooltipTrigger>
+ <TooltipContent side="right" className="max-w-[200px] text-center text-wrap">
+ <p>
+ The dimension should match the one configured in your vector database
+ provider.
+ </p>
+ </TooltipContent>
+ </Tooltip>
+ </label>
+ <input
+ type="number"
+ placeholder="e.g., 1536"
+ value={dimensions}
+ onChange={(e: ChangeEvent<HTMLInputElement>) => setDimensions(e.target.value)}
+ disabled={isCreating}
+ readOnly={isDimensionsReadOnly}
+ className="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 disabled:bg-gray-100 disabled:cursor-not-allowed text-sm"
+ />
+ </div>
+ </div>
</div>
- </div>
-
- <DialogFooter>
- <CustomButton
- variant="secondary"
- type="button"
- label="Cancel"
- handleClick={onClose}
- disabled={isCreating}
- />
- <CustomButton
- variant="primary"
- type="submit"
- label={isCreating ? 'Creating...' : 'Create'}
- disabled={!isFormValid || isCreating || credentialsLoading || isLoadingModels}
- loading={isCreating}
- />
- </DialogFooter>
- </form>
- </DialogContent>
-
-
- </Dialog>
-
- {/* Create Credentials Modal */}
- <CreateCredentialsModal
- isOpen={isCreateCredModalOpen}
- onClose={() => setIsCreateCredModalOpen(false)}
- onSuccess={handleCredentialCreated}
- group="vector_db_creds"
- />
- </>
+
+ <DialogFooter>
+ <CustomButton
+ variant="secondary"
+ type="button"
+ label="Cancel"
+ handleClick={onClose}
+ disabled={isCreating}
+ />
+ <CustomButton
+ variant="primary"
+ type="submit"
+ label={isCreating ? 'Creating...' : 'Create'}
+ disabled={!isFormValid || isCreating || credentialsLoading || isLoadingModels}
+ loading={isCreating}
+ />
+ </DialogFooter>
+ </form>
+ </DialogContent>
+ </Dialog>
+
+ {/* Create Credentials Modal */}
+ <CreateCredentialsModal
+ isOpen={isCreateCredModalOpen}
+ onClose={() => setIsCreateCredModalOpen(false)}
+ onSuccess={handleCredentialCreated}
+ group="vector_db_creds"
+ />
+ </>
);
};
-
diff --git a/packages/app/src/react/features/embodiments/post-deployment-modal.tsx b/packages/app/src/react/features/embodiments/post-deployment-modal.tsx
index 0380b1d3..5a317a23 100644
--- a/packages/app/src/react/features/embodiments/post-deployment-modal.tsx
+++ b/packages/app/src/react/features/embodiments/post-deployment-modal.tsx
@@ -499,7 +499,7 @@ function PostDeploymentModal({
<TooltipTrigger asChild>
<Info className="w-4 h-4 text-[#515151] cursor-pointer" />
</TooltipTrigger>
- <TooltipContent side="top" className="w-56 text-center">
+ <TooltipContent side="top" className="max-w-[240px] text-center text-wrap">
{setting.embDescription}
</TooltipContent>
</Tooltip>
@@ -517,7 +517,7 @@ function PostDeploymentModal({
<FaLock className="text-gray-400 cursor-pointer" />
</div>
</TooltipTrigger>
- <TooltipContent side="top">
+ <TooltipContent side="top" className="max-w-[240px] text-center text-wrap">
<p>Premium Embodiment. Upgrade your plan</p>
</TooltipContent>
</Tooltip>
diff --git a/packages/app/src/react/features/vault/components/api-keys.tsx b/packages/app/src/react/features/vault/components/api-keys.tsx
index cdc0871d..4692d505 100644
--- a/packages/app/src/react/features/vault/components/api-keys.tsx
+++ b/packages/app/src/react/features/vault/components/api-keys.tsx
@@ -406,7 +406,7 @@ export function ApiKeys({ pageAccess }: { pageAccess: { write: boolean } }) {
<TooltipTrigger asChild>
<Info className="w-4 h-4 cursor-help" />
</TooltipTrigger>
- <TooltipContent className="w-72 text-center">
+ <TooltipContent className="max-w-[240px] text-center text-wrap">
<p>
Add API keys by providing a token (up to 10,000 characters), a unique name, and
selecting a scope: All, API Call, Hugging Face, or Zapier Action.
diff --git a/packages/app/src/react/features/vault/components/create-user-custom-model-modal.tsx b/packages/app/src/react/features/vault/components/create-user-custom-model-modal.tsx
index ae54a2a0..a4fa2b9b 100644
--- a/packages/app/src/react/features/vault/components/create-user-custom-model-modal.tsx
+++ b/packages/app/src/react/features/vault/components/create-user-custom-model-modal.tsx
@@ -480,7 +480,7 @@ export function CreateUserCustomModelModal({
className="w-4 h-4 text-gray-400"
/>
</TooltipTrigger>
- <TooltipContent side="right" className="w-[182px] text-center">
+ <TooltipContent side="right" className="max-w-[200px] text-center text-wrap">
<p>The name that will appear in the model dropdown list</p>
</TooltipContent>
</Tooltip>
@@ -508,7 +508,7 @@ export function CreateUserCustomModelModal({
className="w-4 h-4 text-gray-400"
/>
</TooltipTrigger>
- <TooltipContent side="right" className="w-[220px] text-center">
+ <TooltipContent side="right" className="max-w-[240px] text-center text-wrap">
<p>
The exact model identifier used by your LLM provider (e.g.,
llama-3.1-8b-instant, qwen2.5-7b-instruct-1m)
@@ -539,7 +539,7 @@ export function CreateUserCustomModelModal({
className="w-4 h-4 text-gray-400"
/>
</TooltipTrigger>
- <TooltipContent side="right" className="w-[280px] text-center">
+ <TooltipContent side="right" className="max-w-[280px] text-center text-wrap">
<p>
The API endpoint URL for your LLM service. For OpenAI compatible APIs, include
`/v1` in the URL (e.g., http://127.0.0.1:1234/v1,
@@ -572,7 +572,7 @@ export function CreateUserCustomModelModal({
className="w-4 h-4 text-gray-400"
/>
</TooltipTrigger>
- <TooltipContent side="right" className="w-[220px] text-center">
+ <TooltipContent side="right" className="max-w-[240px] text-center text-wrap">
<p>
The SDK/API format your model uses. Select OpenAI for OpenAI-compatible APIs
or Ollama for Ollama-compatible APIs
@@ -606,7 +606,7 @@ export function CreateUserCustomModelModal({
className="w-4 h-4 text-gray-400"
/>
</TooltipTrigger>
- <TooltipContent side="right" className="w-[240px] text-center">
+ <TooltipContent side="right" className="max-w-[240px] text-center text-wrap">
<p>
Optional API key for your custom model. The key will be securely stored in
your team vault. Leave empty if your model does not require authentication.
@@ -725,7 +725,7 @@ export function CreateUserCustomModelModal({
className="w-4 h-4 text-gray-400"
/>
</TooltipTrigger>
- <TooltipContent side="right" className="w-[220px] text-center">
+ <TooltipContent side="right" className="max-w-[240px] text-center text-wrap">
<p>
Configure advanced settings like context window, output limits, fallback
models, and supported features
@@ -766,7 +766,7 @@ export function CreateUserCustomModelModal({
className="w-4 h-4 text-gray-400"
/>
</TooltipTrigger>
- <TooltipContent side="right" className="w-[200px] text-center">
+ <TooltipContent side="right" className="max-w-[200px] text-center text-wrap">
<p>
The total number of tokens the model can process, including input and
output
@@ -805,7 +805,7 @@ export function CreateUserCustomModelModal({
className="w-4 h-4 text-gray-400"
/>
</TooltipTrigger>
- <TooltipContent side="right" className="w-[200px] text-center">
+ <TooltipContent side="right" className="max-w-[200px] text-center text-wrap">
<p>
The maximum number of tokens the model can generate in a single response
</p>
@@ -842,7 +842,7 @@ export function CreateUserCustomModelModal({
className="w-4 h-4 text-gray-400"
/>
</TooltipTrigger>
- <TooltipContent side="right" className="w-[220px] text-center">
+ <TooltipContent side="right" className="max-w-[240px] text-center text-wrap">
<p>
Select a fallback model from your available models. This model will be
used automatically when your custom model is unavailable
@@ -877,7 +877,7 @@ export function CreateUserCustomModelModal({
className="w-4 h-4 text-gray-400"
/>
</TooltipTrigger>
- <TooltipContent side="right" className="w-[220px] text-center">
+ <TooltipContent side="right" className="max-w-[280px] text-center text-wrap">
<p>
Select the capabilities your model supports: Text Completion for
generating text, and Function calling/Tool Use for executing functions
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 f2fe7eb3..570bb679 100644
--- a/packages/app/src/react/features/vault/components/oauth-connections.tsx
+++ b/packages/app/src/react/features/vault/components/oauth-connections.tsx
@@ -350,7 +350,7 @@ export function OAuthConnections() {
<TooltipTrigger asChild>
<Info className="w-4 h-4 cursor-help" />
</TooltipTrigger>
- <TooltipContent className="w-72 text-center">
+ <TooltipContent className="max-w-[240px] text-center text-wrap">
<p>
Manage OAuth connections to authenticate and integrate with external services and
APIs
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 a15c258c..0002ae71 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
@@ -155,7 +155,7 @@ export function UserCustomModels({ pageAccess }: { pageAccess: { write: boolean
<TooltipTrigger asChild>
<Info className="w-4 h-4 cursor-help" />
</TooltipTrigger>
- <TooltipContent className="w-72 text-center">
+ <TooltipContent className="max-w-[240px] text-center text-wrap">
<p>
Custom models allow you to connect to your own LLM instances running locally or on
your infrastructure
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 e22b26e4..a1e1f95c 100644
--- a/packages/app/src/react/features/vault/components/user-models.tsx
+++ b/packages/app/src/react/features/vault/components/user-models.tsx
@@ -235,7 +235,7 @@ export function UserModels({ pageAccess }: { pageAccess: { write: boolean } }) {
<TooltipTrigger asChild>
<Info className="w-4 h-4 cursor-help" />
</TooltipTrigger>
- <TooltipContent className="w-72 text-center">
+ <TooltipContent className="max-w-[240px] text-center text-wrap">
<p>
Bring and maintain your own AI models by adding API keys for OpenAI, Google,
Anthropic, and other providers
diff --git a/packages/app/src/react/features/vault/components/vector-databases.tsx b/packages/app/src/react/features/vault/components/vector-databases.tsx
index 99ab0b3f..34f05478 100644
--- a/packages/app/src/react/features/vault/components/vector-databases.tsx
+++ b/packages/app/src/react/features/vault/components/vector-databases.tsx
@@ -1,6 +1,6 @@
/**
* VectorDatabases Component
- *
+ *
* Displays and manages vector database credential connections.
* Features:
* - List all vector database connections
@@ -9,14 +9,14 @@
* - Delete connections
* - Test connections
* - Duplicate connections
- *
+ *
* @component
*/
import { Button } from '@src/react/shared/components/ui/button';
import { Button as CustomButton } from '@src/react/shared/components/ui/newDesign/button';
+import { Tooltip, TooltipContent, TooltipTrigger } from '@src/react/shared/components/ui/tooltip';
import { successToast } from '@src/shared/components/toast';
-import { Tooltip } from 'flowbite-react';
import { Info, Pencil, PlusCircle, Trash2 } from 'lucide-react';
import { useState } from 'react';
import {
@@ -96,7 +96,7 @@ export function VectorDatabases() {
// Reset state
setEditingConnection(undefined);
-
+
// Refetch the credentials list
refetch();
};
@@ -131,7 +131,6 @@ export function VectorDatabases() {
setDeletingConnection(undefined);
};
-
/**
* Handle modal close
*/
@@ -142,18 +141,21 @@ export function VectorDatabases() {
return (
<div
- id="vector-databases"
- className="rounded-lg bg-card text-card-foreground border border-solid border-gray-200 shadow-sm">
+ id="vector-databases"
+ className="rounded-lg bg-card text-card-foreground border border-solid border-gray-200 shadow-sm"
+ >
<div className="p-6">
{/* Header */}
<div className="flex items-center justify-between mb-4 pr-2 flex-wrap">
<h2 className="flex items-center gap-2 text-lg font-semibold">
Vector Databases
- <Tooltip
- className="w-72 text-center"
- content="Manage connections to vector databases for storing and retrieving embeddings"
- >
- <Info className="w-4 h-4" />
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Info className="w-4 h-4" />
+ </TooltipTrigger>
+ <TooltipContent className="max-w-[240px] text-center text-wrap">
+ <p>Manage connections to vector databases for storing and retrieving embeddings</p>
+ </TooltipContent>
</Tooltip>
</h2>
</div>
@@ -165,9 +167,7 @@ export function VectorDatabases() {
) : credentials.length === 0 ? (
<div className="py-8 text-center">
<p className="text-muted-foreground mb-2">No vector database connections found</p>
- <p className="text-sm text-gray-500">
- Get started by adding your first connection
- </p>
+ <p className="text-sm text-gray-500">Get started by adding your first connection</p>
</div>
) : (
<table className="w-full min-w-[500px] text-sm text-left table-fixed">
@@ -219,34 +219,43 @@ export function VectorDatabases() {
</td>
{/* Actions */}
-
{!connection.isReadOnly && (
<td className="pl-4 py-3">
- <div className="flex items-center justify-end gap-1">
- {/* Edit Button */}
- <Tooltip content="Edit">
- <Button
- variant="ghost"
- size="sm"
- onClick={() => handleEditClick(connection)}
- >
- <Pencil className="h-4 w-4" />
- </Button>
- </Tooltip>
+ <div className="flex items-center justify-end gap-1">
+ {/* Edit Button */}
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => handleEditClick(connection)}
+ >
+ <Pencil className="h-4 w-4" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>
+ <p>Edit</p>
+ </TooltipContent>
+ </Tooltip>
- {/* Delete Button */}
- <Tooltip content="Delete">
- <Button
- variant="ghost"
- size="sm"
- onClick={() => handleDeleteClick(connection)}
- >
- <Trash2 className="h-4 w-4 hover:text-red-500" />
- </Button>
- </Tooltip>
- </div>
- </td>
+ {/* Delete Button */}
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => handleDeleteClick(connection)}
+ >
+ <Trash2 className="h-4 w-4 hover:text-red-500" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>
+ <p>Delete</p>
+ </TooltipContent>
+ </Tooltip>
+ </div>
+ </td>
)}
</tr>
))}
@@ -294,4 +303,3 @@ export function VectorDatabases() {
</div>
);
}
-
diff --git a/packages/app/src/react/shared/components/ui/newDesign/textarea.tsx b/packages/app/src/react/shared/components/ui/newDesign/textarea.tsx
index bef92b15..e9359023 100644
--- a/packages/app/src/react/shared/components/ui/newDesign/textarea.tsx
+++ b/packages/app/src/react/shared/components/ui/newDesign/textarea.tsx
@@ -173,7 +173,7 @@ export const TextArea = React.forwardRef<HTMLTextAreaElement, CustomTextAreaProp
<TooltipTrigger asChild>
<Info className="w-4 h-4 ml-2" />
</TooltipTrigger>
- <TooltipContent className="w-52 text-center">
+ <TooltipContent className="max-w-[240px] text-center text-wrap">
{infoTooltip}
</TooltipContent>
</Tooltip>
diff --git a/packages/app/static/css/smyth-builder-override.css b/packages/app/static/css/smyth-builder-override.css
index 34dd42cf..281f7045 100644
--- a/packages/app/static/css/smyth-builder-override.css
+++ b/packages/app/static/css/smyth-builder-override.css
@@ -1350,12 +1350,6 @@ body.locked nav #builder-button svg {
display: none;
}
-.agent-card-tooltip {
- max-width: 280px;
- overflow-wrap: break-word;
- hyphens: auto;
- word-break: normal;
-}
/* Test button icon hover state */
#btn-emb-chatbot-main-wrapper:hover svg path {
stroke: white !important;