diff --git a/web/app/components/apps/list.tsx b/web/app/components/apps/list.tsx index 14dd4fcc72..9295a3050f 100644 --- a/web/app/components/apps/list.tsx +++ b/web/app/components/apps/list.tsx @@ -12,7 +12,7 @@ import Input from '@/app/components/base/input' import TabSliderNew from '@/app/components/base/tab-slider-new' import TagFilter from '@/app/components/base/tag-management/filter' import { useStore as useTagStore } from '@/app/components/base/tag-management/store' -import Tooltip from '@/app/components/base/tooltip-plus' +import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip' import { NEED_REFRESH_APP_LIST_KEY } from '@/config' import { useAppContext } from '@/context/app-context' import { useGlobalPublicStore } from '@/context/global-public-context' @@ -261,13 +261,16 @@ const List: FC = ({ onChange={e => handleKeywordsChange(e.target.value)} onClear={() => handleKeywordsChange('')} /> - - + + + + {t('skills.title', { ns: 'app' })} + + )} + /> + {t('skills.comingSoon', { ns: 'app' })} diff --git a/web/app/components/base/tooltip-plus/index.tsx b/web/app/components/base/tooltip-plus/index.tsx deleted file mode 100644 index af4c7f5e32..0000000000 --- a/web/app/components/base/tooltip-plus/index.tsx +++ /dev/null @@ -1,8 +0,0 @@ -'use client' - -/** - * Re-exports the legacy default Tooltip API (popupContent, etc.) without using - * the restricted `@/app/components/base/tooltip` import path at call sites. - * Prefer migrating to `@/app/components/base/ui/tooltip` when touching UI. - */ -export { default } from '../tooltip' diff --git a/web/app/components/header/account-setting/model-provider-page/model-selector/deprecated-model-trigger.tsx b/web/app/components/header/account-setting/model-provider-page/model-selector/deprecated-model-trigger.tsx index fce4c8794d..609d858379 100644 --- a/web/app/components/header/account-setting/model-provider-page/model-selector/deprecated-model-trigger.tsx +++ b/web/app/components/header/account-setting/model-provider-page/model-selector/deprecated-model-trigger.tsx @@ -1,8 +1,7 @@ import type { FC } from 'react' import { useTranslation } from 'react-i18next' import { AlertTriangle } from '@/app/components/base/icons/src/vender/line/alertsAndFeedback' - -import Tooltip from '@/app/components/base/tooltip-plus' +import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip' import { useProviderContext } from '@/context/provider-context' import { cn } from '@/utils/classnames' import ModelIcon from '../model-icon' @@ -42,8 +41,11 @@ const ModelTrigger: FC = ({
{showWarnIcon && ( - - + + + + + {t('modelProvider.deprecated', { ns: 'common' })} )}
diff --git a/web/app/components/plugins/plugin-detail-panel/tool-selector/reasoning-config-form.tsx b/web/app/components/plugins/plugin-detail-panel/tool-selector/reasoning-config-form.tsx index 8a9cb4706f..89e160a5cd 100644 --- a/web/app/components/plugins/plugin-detail-panel/tool-selector/reasoning-config-form.tsx +++ b/web/app/components/plugins/plugin-detail-panel/tool-selector/reasoning-config-form.tsx @@ -16,7 +16,6 @@ import { useCallback, useState } from 'react' import { useTranslation } from 'react-i18next' import Input from '@/app/components/base/input' import Switch from '@/app/components/base/switch' -import Tooltip from '@/app/components/base/tooltip-plus' import { Select, SelectContent, @@ -24,6 +23,7 @@ import { SelectTrigger, SelectValue, } from '@/app/components/base/ui/select' +import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip' import { FormTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations' import { useLanguage } from '@/app/components/header/account-setting/model-provider-page/hooks' import AppSelector from '@/app/components/plugins/plugin-detail-panel/app-selector' @@ -163,15 +163,19 @@ const ReasoningConfigForm: React.FC = ({ const canUseAuto = ![FormTypeEnum.modelSelector, FormTypeEnum.appSelector].includes(type) const auto = canUseAuto ? value[variable]?.auto : 0 const tooltipContent = (tooltip && ( - + + + +
{tooltip[language] || tooltip.en_US}
- )} - triggerClassName="ml-0.5 w-4 h-4" - asChild={false} - /> +
+
)) const varInput = value[variable].value const isString = type === FormTypeEnum.textInput || type === FormTypeEnum.secretInput @@ -233,20 +237,18 @@ const ReasoningConfigForm: React.FC = ({ ยท {targetVarType()} {isShowJSONEditor && ( - - {t('nodes.agent.clickToViewParameterSchema', { ns: 'workflow' })} - - )} - asChild={false} - > -
+ showSchema(input_schema as SchemaRoot, label[language] || label.en_US)} > -
+ + +
+ {t('nodes.agent.clickToViewParameterSchema', { ns: 'workflow' })} +
+
)} @@ -323,7 +325,7 @@ const ReasoningConfigForm: React.FC = ({ {isShowJSONEditor && isConstant && (
= ({ className="h-7 p-[2px] pr-2" onClick={() => { copy(result) - toast.success('copied') + toast.success(t('actionMsg.copySuccessfully', { ns: 'common' })) }} > <> @@ -42,70 +41,66 @@ const Header: FC = ({ {showFeedback && feedback.rating && feedback.rating === 'like' && ( - -
+ { onFeedback({ rating: null, }) }} - className="flex h-7 w-7 cursor-pointer items-center justify-center rounded-md border border-primary-200 bg-primary-100 !text-primary-600 hover:border-primary-300 hover:bg-primary-200" > -
+ + {t('generation.feedback.undoLike', { ns: 'share' })}
)} {showFeedback && feedback.rating && feedback.rating === 'dislike' && ( - -
+ { onFeedback({ rating: null, }) }} - className="flex h-7 w-7 cursor-pointer items-center justify-center rounded-md border border-red-200 bg-red-100 !text-red-600 hover:border-red-300 hover:bg-red-200" > -
+ + {t('generation.feedback.undoDislike', { ns: 'share' })}
)} {showFeedback && !feedback.rating && (
- -
+ { onFeedback({ rating: 'like', }) }} - className="flex h-6 w-6 cursor-pointer items-center justify-center rounded-md hover:bg-gray-100" > -
+ + {t('generation.feedback.like', { ns: 'share' })}
- -
+ { onFeedback({ rating: 'dislike', }) }} - className="flex h-6 w-6 cursor-pointer items-center justify-center rounded-md hover:bg-gray-100" > -
+ + {t('generation.feedback.dislike', { ns: 'share' })}
)} diff --git a/web/app/components/workflow/comment/thread.tsx b/web/app/components/workflow/comment/thread.tsx index 9daac87b9e..63189f16b4 100644 --- a/web/app/components/workflow/comment/thread.tsx +++ b/web/app/components/workflow/comment/thread.tsx @@ -10,8 +10,7 @@ import { Avatar } from '@/app/components/base/avatar' import Divider from '@/app/components/base/divider' import InlineDeleteConfirm from '@/app/components/base/inline-delete-confirm' import { PortalToFollowElem, PortalToFollowElemContent, PortalToFollowElemTrigger } from '@/app/components/base/portal-to-follow-elem' - -import Tooltip from '@/app/components/base/tooltip-plus' +import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip' import { getUserColor } from '@/app/components/workflow/collaboration/utils/user-color' import { useAppContext } from '@/context/app-context' import { useFormatTimeFromNow } from '@/hooks/use-format-time-from-now' @@ -375,66 +374,86 @@ export const CommentThread: FC = memo(({ {t('comments.panelTitle', { ns: 'workflow' })}
- - + + + + + )} + /> + + {t('comments.aria.deleteComment', { ns: 'workflow' })} + - - + + + + + )} + /> + + {t('comments.aria.resolveComment', { ns: 'workflow' })} + - - + + + + + )} + /> + + {t('comments.aria.previousComment', { ns: 'workflow' })} + - - + + + + + )} + /> + + {t('comments.aria.nextComment', { ns: 'workflow' })} +
+ )} + /> + {disabledTip && ( + {disabledTip} + )}
) diff --git a/web/app/components/workflow/nodes/llm/components/tools/max-iterations.tsx b/web/app/components/workflow/nodes/llm/components/tools/max-iterations.tsx index fb423a0309..51a02f1d40 100644 --- a/web/app/components/workflow/nodes/llm/components/tools/max-iterations.tsx +++ b/web/app/components/workflow/nodes/llm/components/tools/max-iterations.tsx @@ -1,6 +1,5 @@ import { memo } from 'react' - -import Tooltip from '@/app/components/base/tooltip-plus' +import { useTranslation } from 'react-i18next' import { NumberField, NumberFieldControls, @@ -9,6 +8,7 @@ import { NumberFieldIncrement, NumberFieldInput, } from '@/app/components/base/ui/number-field' +import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip' import { cn } from '@/utils/classnames' @@ -19,14 +19,23 @@ type MaxIterationsProps = { disabled?: boolean } const MaxIterations = ({ value = 10, onChange, className, disabled }: MaxIterationsProps) => { + const { t } = useTranslation() + return (
-
Max Iterations
- +
+ {t('nodes.agent.maxIterations', { ns: 'workflow' })} +
+ + + + + {t('nodes.llm.tools.maxIterationsTooltip', { ns: 'workflow' })} +
) => { showTitle ? 'gap-1.5 px-2' : 'w-11', )} > - -
+ + +
)} - > - -
+ /> + {tooltip} {showTitle && ( diff --git a/web/app/components/workflow/panel/workflow-preview.tsx b/web/app/components/workflow/panel/workflow-preview.tsx index aac32286bf..90a7780c74 100644 --- a/web/app/components/workflow/panel/workflow-preview.tsx +++ b/web/app/components/workflow/panel/workflow-preview.tsx @@ -10,8 +10,8 @@ import ActionButton from '@/app/components/base/action-button' import Button from '@/app/components/base/button' import { RefreshCcw01 } from '@/app/components/base/icons/src/vender/line/arrows' import Loading from '@/app/components/base/loading' -import Tooltip from '@/app/components/base/tooltip-plus' import { toast } from '@/app/components/base/ui/toast' +import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip' import { submitHumanInputForm } from '@/service/workflow' import { cn } from '@/utils/classnames' import { @@ -126,14 +126,19 @@ const WorkflowPreview = () => {
{`${t('singleRun.testRun', { ns: 'workflow' })}${workflowRunningData ? formatWorkflowRunIdentifier(workflowRunningData.result.finished_at, t('common.running', { ns: 'workflow' })) : ''}`}
- - { - setUserSelectedTab(null) - handleClearWorkflowRunHistory() - }} - > - - + + { + setUserSelectedTab(null) + handleClearWorkflowRunHistory() + }} + > + + + )} + /> + {t('operation.refresh', { ns: 'common' })}
handleCancelDebugAndPreviewPanel()}> diff --git a/web/app/components/workflow/selection-contextmenu.tsx b/web/app/components/workflow/selection-contextmenu.tsx index a260f9dd30..70e4de0973 100644 --- a/web/app/components/workflow/selection-contextmenu.tsx +++ b/web/app/components/workflow/selection-contextmenu.tsx @@ -20,7 +20,7 @@ import { import { useTranslation } from 'react-i18next' import { useStore as useReactFlowStore } from 'reactflow' import { shallow } from 'zustand/shallow' -import Tooltip from '@/app/components/base/tooltip-plus' +import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip' import { useCollaborativeWorkflow } from '@/app/components/workflow/hooks/use-collaborative-workflow' import { useNodesInteractions, useNodesReadOnly, useNodesSyncDraft } from './hooks' import { useSelectionInteractions } from './hooks/use-selection-interactions' @@ -54,13 +54,14 @@ type AlignButtonProps = { const AlignButton: FC = ({ config, label, onClick, position = 'bottom' }) => { return ( - -
+ onClick(config.type)} > {config.icon} -
+ + {label}
) } diff --git a/web/app/components/workflow/skill/editor/skill-editor/plugins/file-reference-block/component.tsx b/web/app/components/workflow/skill/editor/skill-editor/plugins/file-reference-block/component.tsx index ad2c511982..e175a541ae 100644 --- a/web/app/components/workflow/skill/editor/skill-editor/plugins/file-reference-block/component.tsx +++ b/web/app/components/workflow/skill/editor/skill-editor/plugins/file-reference-block/component.tsx @@ -15,7 +15,7 @@ import { PortalToFollowElemTrigger, } from '@/app/components/base/portal-to-follow-elem' import { useSelectOrDelete } from '@/app/components/base/prompt-editor/hooks' -import Tooltip from '@/app/components/base/tooltip-plus' +import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip' import { START_TAB_ID } from '@/app/components/workflow/skill/constants' import { useSkillAssetNodeMap } from '@/app/components/workflow/skill/hooks/file-tree/data/use-skill-asset-tree' import { getFileIconType } from '@/app/components/workflow/skill/utils/file-utils' @@ -169,40 +169,48 @@ const FileReferenceBlock = ({ nodeKey, resourceId }: FileReferenceBlockProps) => offset={4} > - - + { + if (!isInteractive) + return + setOpen(prev => !prev) + }} + > + + {isFolder + ? + + {displayName} + + { + isMissing && ( + + ) + } + )} - onMouseDown={() => { - if (!isInteractive) - return - setOpen(prev => !prev) - }} - > - - {isFolder - ? - - {displayName} - - { - isMissing && ( - - ) - } - + /> + {tooltipContent && ( + {tooltipContent} + )} diff --git a/web/app/components/workflow/skill/editor/skill-editor/plugins/file-reference-block/file-preview-panel.tsx b/web/app/components/workflow/skill/editor/skill-editor/plugins/file-reference-block/file-preview-panel.tsx index 4af7f46175..61e8bda45c 100644 --- a/web/app/components/workflow/skill/editor/skill-editor/plugins/file-reference-block/file-preview-panel.tsx +++ b/web/app/components/workflow/skill/editor/skill-editor/plugins/file-reference-block/file-preview-panel.tsx @@ -7,7 +7,7 @@ import { useTranslation } from 'react-i18next' import { useStore as useAppStore } from '@/app/components/app/store' import FileTypeIcon from '@/app/components/base/file-uploader/file-type-icon' import Loading from '@/app/components/base/loading' -import Tooltip from '@/app/components/base/tooltip-plus' +import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip' import SkillEditor from '@/app/components/workflow/skill/editor/skill-editor' import { useFileTypeInfo } from '@/app/components/workflow/skill/hooks/use-file-type-info' import { getFileIconType } from '@/app/components/workflow/skill/utils/file-utils' @@ -121,22 +121,29 @@ const FilePreviewPanel = ({ resourceId, currentNode, className, style, onClose }
)}
- - + )} - aria-label={t('skillEditor.openInSkillEditor', { ns: 'workflow' })} - > - - + /> + {canOpenInEditor && ( + {t('skillEditor.openInSkillEditor', { ns: 'workflow' })} + )}
+ )} + /> + {tooltip} {showTitle && ( diff --git a/web/i18n/en-US/app.json b/web/i18n/en-US/app.json index 21aa400761..33f0295918 100644 --- a/web/i18n/en-US/app.json +++ b/web/i18n/en-US/app.json @@ -223,6 +223,7 @@ "roadmap": "See our roadmap", "showMyCreatedAppsOnly": "Created by me", "skills.comingSoon": "Workspace skills coming soon. Stay tuned.", + "skills.title": "Skills", "structOutput.LLMResponse": "LLM Response", "structOutput.configure": "Configure", "structOutput.disabledByComputerUse": "Structured Output is disabled when Agent Mode is enabled.", diff --git a/web/i18n/en-US/share.json b/web/i18n/en-US/share.json index adb75ce181..610a1233ad 100644 --- a/web/i18n/en-US/share.json +++ b/web/i18n/en-US/share.json @@ -44,6 +44,10 @@ "generation.errorMsg.moreThanMaxLengthLine": "Row {{rowIndex}}: {{varName}} value can not be more than {{maxLength}} characters", "generation.execution": "Run", "generation.executions": "{{num}} runs", + "generation.feedback.dislike": "Undesirable Response", + "generation.feedback.like": "Great Rating", + "generation.feedback.undoDislike": "Undo Undesirable Response", + "generation.feedback.undoLike": "Undo Great Rating", "generation.field": "Field", "generation.noData": "AI will give you what you want here.", "generation.queryPlaceholder": "Write your query content...", diff --git a/web/i18n/en-US/workflow.json b/web/i18n/en-US/workflow.json index e95a033d0f..fa100f3cca 100644 --- a/web/i18n/en-US/workflow.json +++ b/web/i18n/en-US/workflow.json @@ -195,6 +195,7 @@ "common.input": "Input", "common.insertVarTip": "Press the '/' key to insert quickly", "common.jinjaEditorPlaceholder": "Type '/' or '{' to insert variable", + "common.json": "JSON", "common.jumpToNode": "Jump to this node", "common.latestPublished": "Latest Published", "common.learnMore": "Learn More", @@ -867,6 +868,7 @@ "nodes.llm.singleRun.variable": "Variable", "nodes.llm.sysQueryInUser": "sys.query in user message is required", "nodes.llm.tools.disabledByStructuredOutput": "Tools are disabled when Structured Output is enabled.", + "nodes.llm.tools.maxIterationsTooltip": "Max Iterations is the maximum number of iterations to run the tool.", "nodes.llm.tools.title": "Tools", "nodes.llm.tools.tooltip": "Enable the LLM to call external tools during execution. The model autonomously decides when and which tools to invoke based on context, and may iterate multiple times to refine results.", "nodes.llm.variables": "variables",