From bd0d10ac5c00275ce705986e0aac0be1cb9cb557 Mon Sep 17 00:00:00 2001 From: yyh <92089059+lyzno1@users.noreply.github.com> Date: Mon, 11 May 2026 12:23:04 +0800 Subject: [PATCH] fix: use infotip for help glyphs (#36008) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- eslint-suppressions.json | 5 -- .../config-prompt/advanced-prompt-input.tsx | 25 ++----- .../config-prompt/simple-prompt-input.tsx | 25 ++----- .../__tests__/modal.spec.tsx | 4 +- .../conversation-opener/modal.tsx | 28 +++---- .../new-feature-panel/feature-card.tsx | 21 ++---- web/app/components/base/infotip/index.tsx | 7 +- .../components/general-chunking-options.tsx | 21 ++---- .../index-method/__tests__/index.spec.tsx | 4 +- .../__tests__/keyword-number.spec.tsx | 9 ++- .../settings/index-method/keyword-number.tsx | 18 ++--- .../model-load-balancing-configs.tsx | 21 +++--- .../multiple-tool-selector/index.tsx | 27 +++---- .../create/__tests__/index.spec.tsx | 22 +++--- .../subscription-list/create/index.tsx | 20 ++--- .../subscription-list/list-view.tsx | 21 ++---- .../subscription-list/selector-view.tsx | 21 ++---- .../components/tools/workflow-tool/index.tsx | 23 +++--- .../layout/__tests__/field-title.spec.tsx | 8 +- .../_base/components/layout/field-title.tsx | 17 +---- .../components/index-method.tsx | 17 ++--- .../json-schema-generator/prompt-editor.tsx | 21 ++---- .../components/monthly-days-selector.tsx | 75 ++++++++++--------- 23 files changed, 193 insertions(+), 267 deletions(-) diff --git a/eslint-suppressions.json b/eslint-suppressions.json index a7512f8c66..97d2f93a59 100644 --- a/eslint-suppressions.json +++ b/eslint-suppressions.json @@ -2527,11 +2527,6 @@ "count": 1 } }, - "web/app/components/plugins/plugin-detail-panel/multiple-tool-selector/index.tsx": { - "ts/no-explicit-any": { - "count": 1 - } - }, "web/app/components/plugins/plugin-detail-panel/strategy-detail.tsx": { "ts/no-explicit-any": { "count": 2 diff --git a/web/app/components/app/configuration/config-prompt/advanced-prompt-input.tsx b/web/app/components/app/configuration/config-prompt/advanced-prompt-input.tsx index 5fd394ad45..418982fcb6 100644 --- a/web/app/components/app/configuration/config-prompt/advanced-prompt-input.tsx +++ b/web/app/components/app/configuration/config-prompt/advanced-prompt-input.tsx @@ -5,11 +5,6 @@ import type { PromptRole, PromptVariable } from '@/models/debug' import { Button } from '@langgenius/dify-ui/button' import { cn } from '@langgenius/dify-ui/cn' import { toast } from '@langgenius/dify-ui/toast' -import { - Tooltip, - TooltipContent, - TooltipTrigger, -} from '@langgenius/dify-ui/tooltip' import { RiDeleteBinLine, RiErrorWarningFill, @@ -25,6 +20,7 @@ import { Copy, CopyCheck, } from '@/app/components/base/icons/src/vender/line/files' +import { Infotip } from '@/app/components/base/infotip' import PromptEditor from '@/app/components/base/prompt-editor' import { INSERT_VARIABLE_VALUE_BLOCK_COMMAND } from '@/app/components/base/prompt-editor/plugins/variable-block' import ConfigContext from '@/context/debug-configuration' @@ -183,18 +179,13 @@ const AdvancedPromptInput: FC = ({
{t('pageTitle.line1', { ns: 'appDebug' })}
- - - )} - /> - -
- {t('promptTip', { ns: 'appDebug' })} -
-
-
+ + {t('promptTip', { ns: 'appDebug' })} + )}
diff --git a/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx b/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx index 2935504f15..63cb16083e 100644 --- a/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx +++ b/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx @@ -5,11 +5,6 @@ import type { PromptVariable } from '@/models/debug' import type { GenRes } from '@/service/debug' import { cn } from '@langgenius/dify-ui/cn' import { toast } from '@langgenius/dify-ui/toast' -import { - Tooltip, - TooltipContent, - TooltipTrigger, -} from '@langgenius/dify-ui/tooltip' import { useBoolean } from 'ahooks' import { noop } from 'es-toolkit/function' import { produce } from 'immer' @@ -21,6 +16,7 @@ import { ADD_EXTERNAL_DATA_TOOL } from '@/app/components/app/configuration/confi import AutomaticBtn from '@/app/components/app/configuration/config/automatic/automatic-btn' import GetAutomaticResModal from '@/app/components/app/configuration/config/automatic/get-automatic-res' import { useFeaturesStore } from '@/app/components/base/features/hooks' +import { Infotip } from '@/app/components/base/infotip' import PromptEditor from '@/app/components/base/prompt-editor' import { PROMPT_EDITOR_UPDATE_VALUE_BY_EVENT_EMITTER } from '@/app/components/base/prompt-editor/plugins/update-block' import { INSERT_VARIABLE_VALUE_BLOCK_COMMAND } from '@/app/components/base/prompt-editor/plugins/variable-block' @@ -183,18 +179,13 @@ const Prompt: FC = ({
{mode !== AppModeEnum.COMPLETION ? t('chatSubTitle', { ns: 'appDebug' }) : t('completionSubTitle', { ns: 'appDebug' })}
{!readonly && ( - - - )} - /> - -
- {t('promptTip', { ns: 'appDebug' })} -
-
-
+ + {t('promptTip', { ns: 'appDebug' })} + )}
diff --git a/web/app/components/base/features/new-feature-panel/conversation-opener/__tests__/modal.spec.tsx b/web/app/components/base/features/new-feature-panel/conversation-opener/__tests__/modal.spec.tsx index 56551be922..e41079e66a 100644 --- a/web/app/components/base/features/new-feature-panel/conversation-opener/__tests__/modal.spec.tsx +++ b/web/app/components/base/features/new-feature-panel/conversation-opener/__tests__/modal.spec.tsx @@ -369,7 +369,7 @@ describe('OpeningSettingModal', () => { expect(screen.getByTestId('opener-input-section')).toBeInTheDocument() expect(screen.getByTestId('opener-questions-section')).toBeInTheDocument() expect(screen.getByText(/openingStatement\.editorTitle/)).toBeInTheDocument() - expect(screen.getByTestId('opening-questions-tooltip')).toBeInTheDocument() + expect(screen.getByRole('button', { name: /openingStatement\.openingQuestionDescription/ })).toBeInTheDocument() expect(screen.queryByText(/openingStatement\.openingQuestionDescription/)).not.toBeInTheDocument() }) @@ -383,7 +383,7 @@ describe('OpeningSettingModal', () => { ) act(() => { - fireEvent.mouseEnter(screen.getByTestId('opening-questions-tooltip')) + fireEvent.mouseEnter(screen.getByRole('button', { name: /openingStatement\.openingQuestionDescription/ })) }) expect(screen.getByText(/openingStatement\.openingQuestionDescription/)).toBeInTheDocument() diff --git a/web/app/components/base/features/new-feature-panel/conversation-opener/modal.tsx b/web/app/components/base/features/new-feature-panel/conversation-opener/modal.tsx index 78798d27cf..fb2f341e64 100644 --- a/web/app/components/base/features/new-feature-panel/conversation-opener/modal.tsx +++ b/web/app/components/base/features/new-feature-panel/conversation-opener/modal.tsx @@ -4,7 +4,6 @@ import type { PromptVariable } from '@/models/debug' import { Button } from '@langgenius/dify-ui/button' import { cn } from '@langgenius/dify-ui/cn' import { Dialog, DialogContent } from '@langgenius/dify-ui/dialog' -import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip' import { useBoolean } from 'ahooks' import { produce } from 'immer' import * as React from 'react' @@ -14,6 +13,7 @@ import { ReactSortable } from 'react-sortablejs' import ConfirmAddVar from '@/app/components/app/configuration/config-prompt/confirm-add-var' import { getInputKeys } from '@/app/components/base/block-input' import Divider from '@/app/components/base/divider' +import { Infotip } from '@/app/components/base/infotip' import PromptEditor from '@/app/components/base/prompt-editor' import { checkKeys, getNewVar } from '@/utils/var' @@ -117,24 +117,14 @@ const OpeningSettingModal = ({
{t('openingStatement.openingQuestion', { ns: 'appDebug' })}
- - - - - )} - /> - - {t('openingStatement.openingQuestionDescription', { ns: 'appDebug' })} - - + + {t('openingStatement.openingQuestionDescription', { ns: 'appDebug' })} +
{tempSuggestedQuestions.length} diff --git a/web/app/components/base/features/new-feature-panel/feature-card.tsx b/web/app/components/base/features/new-feature-panel/feature-card.tsx index 0c25a514fe..953487352c 100644 --- a/web/app/components/base/features/new-feature-panel/feature-card.tsx +++ b/web/app/components/base/features/new-feature-panel/feature-card.tsx @@ -1,9 +1,6 @@ import { Switch } from '@langgenius/dify-ui/switch' -import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip' -import { - RiQuestionLine, -} from '@remixicon/react' import * as React from 'react' +import { Infotip } from '@/app/components/base/infotip' type Props = { icon: any @@ -41,16 +38,12 @@ const FeatureCard = ({
{title} {tooltip && ( - -
- )} - /> - - {tooltip} - - + + {tooltip} + )}
onChange?.(state)} checked={value} /> diff --git a/web/app/components/base/infotip/index.tsx b/web/app/components/base/infotip/index.tsx index 0927e6ac27..94c35a101d 100644 --- a/web/app/components/base/infotip/index.tsx +++ b/web/app/components/base/infotip/index.tsx @@ -1,7 +1,7 @@ 'use client' import type { Placement } from '@langgenius/dify-ui/popover' -import type { ReactNode } from 'react' +import type { MouseEvent, ReactNode } from 'react' import { cn } from '@langgenius/dify-ui/cn' import { Popover, PopoverContent, PopoverTrigger } from '@langgenius/dify-ui/popover' @@ -58,6 +58,10 @@ export function Infotip({ delay = 300, closeDelay = 200, }: InfotipProps) { + const handleClick = (event: MouseEvent) => { + event.stopPropagation() + } + return ( = ({ onSelect={onDocLanguageChange} disabled={currentDocForm !== ChunkingMode.qa} /> - - - - - )} - /> - - {t('stepTwo.QATip', { ns: 'datasetCreation' })} - - + + {t('stepTwo.QATip', { ns: 'datasetCreation' })} +
{currentDocForm === ChunkingMode.qa && (
{ vi.clearAllMocks() }) - const getKeywordSlider = () => screen.getByLabelText('datasetSettings.form.numberOfKeywords') + const getKeywordSlider = () => screen.getByLabelText('datasetSettings.form.numberOfKeywords', { + selector: 'input[type="range"]', + }) describe('Rendering', () => { it('should render without crashing', () => { diff --git a/web/app/components/datasets/settings/index-method/__tests__/keyword-number.spec.tsx b/web/app/components/datasets/settings/index-method/__tests__/keyword-number.spec.tsx index cd0d56bbeb..92516f00a4 100644 --- a/web/app/components/datasets/settings/index-method/__tests__/keyword-number.spec.tsx +++ b/web/app/components/datasets/settings/index-method/__tests__/keyword-number.spec.tsx @@ -11,7 +11,9 @@ describe('KeyWordNumber', () => { vi.clearAllMocks() }) - const getSlider = () => screen.getByLabelText('datasetSettings.form.numberOfKeywords') + const getSlider = () => screen.getByLabelText('datasetSettings.form.numberOfKeywords', { + selector: 'input[type="range"]', + }) describe('Rendering', () => { it('should render without crashing', () => { @@ -24,9 +26,10 @@ describe('KeyWordNumber', () => { expect(screen.getByText(/form\.numberOfKeywords/)).toBeInTheDocument() }) - it('should render tooltip with question icon', () => { + it('should render infotip with question icon', () => { render() - const container = screen.getByText(/form\.numberOfKeywords/).closest('div')?.parentElement + const trigger = screen.getByRole('button', { name: 'datasetSettings.form.numberOfKeywords' }) + const container = trigger.parentElement const questionIcon = container?.querySelector('.i-ri-question-line') expect(questionIcon).toBeInTheDocument() }) diff --git a/web/app/components/datasets/settings/index-method/keyword-number.tsx b/web/app/components/datasets/settings/index-method/keyword-number.tsx index a31ab07160..b6a90155f0 100644 --- a/web/app/components/datasets/settings/index-method/keyword-number.tsx +++ b/web/app/components/datasets/settings/index-method/keyword-number.tsx @@ -7,10 +7,10 @@ import { NumberFieldInput, } from '@langgenius/dify-ui/number-field' import { Slider } from '@langgenius/dify-ui/slider' -import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip' import * as React from 'react' import { useCallback } from 'react' import { useTranslation } from 'react-i18next' +import { Infotip } from '@/app/components/base/infotip' const MIN_KEYWORD_NUMBER = 0 const MAX_KEYWORD_NUMBER = 50 @@ -36,16 +36,12 @@ const KeyWordNumber = ({
{t('form.numberOfKeywords', { ns: 'datasetSettings' })}
- - - )} - /> - - {t('form.numberOfKeywords', { ns: 'datasetSettings' })} - - + + {t('form.numberOfKeywords', { ns: 'datasetSettings' })} +
{t('modelProvider.loadBalancing', { ns: 'common' })} - - - - - )} - /> - - {t('modelProvider.loadBalancingInfo', { ns: 'common' })} - - + + {t('modelProvider.loadBalancingInfo', { ns: 'common' })} +
{t('modelProvider.loadBalancingDescription', { ns: 'common' })}
diff --git a/web/app/components/plugins/plugin-detail-panel/multiple-tool-selector/index.tsx b/web/app/components/plugins/plugin-detail-panel/multiple-tool-selector/index.tsx index 7972ea5f89..f2779772b6 100644 --- a/web/app/components/plugins/plugin-detail-panel/multiple-tool-selector/index.tsx +++ b/web/app/components/plugins/plugin-detail-panel/multiple-tool-selector/index.tsx @@ -2,16 +2,15 @@ import type { Node } from 'reactflow' import type { ToolValue } from '@/app/components/workflow/block-selector/types' import type { NodeOutPutVar } from '@/app/components/workflow/types' import { cn } from '@langgenius/dify-ui/cn' -import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip' import { RiAddLine, - RiQuestionLine, } from '@remixicon/react' import * as React from 'react' import { useTranslation } from 'react-i18next' import ActionButton from '@/app/components/base/action-button' import Divider from '@/app/components/base/divider' import { ArrowDownRoundFill } from '@/app/components/base/icons/src/vender/solid/general' +import { Infotip } from '@/app/components/base/infotip' import ToolSelector from '@/app/components/plugins/plugin-detail-panel/tool-selector' import { useMCPToolAvailability } from '@/app/components/workflow/nodes/_base/components/mcp-tool-availability' import { useAllMCPTools } from '@/service/use-tools' @@ -21,7 +20,7 @@ type Props = { value: ToolValue[] label: string required?: boolean - tooltip?: any + tooltip?: React.ReactNode supportCollapse?: boolean scope?: string onChange: (value: ToolValue[]) => void @@ -111,18 +110,16 @@ const MultipleToolSelector = ({ >
{label}
{required &&
*
} - {tooltip && ( - - - )} - /> - - {tooltip} - - - )} + {tooltip + ? ( + + {tooltip} + + ) + : null} {supportCollapse && ( screen.getByRole('button', { + name: /pluginTrigger\.subscription\.(createButton|empty\.button)/, +}) + const setupMocks = (config: { providerInfo?: TriggerProviderApiEntity oauthConfig?: TriggerOAuthConfig @@ -353,7 +357,7 @@ describe('CreateSubscriptionButton', () => { // Assert // Assert - expect(screen.getByRole('button'))!.toBeInTheDocument() + expect(getCreateButton()).toBeInTheDocument() }) it('should render icon button when buttonType is ICON_BUTTON', () => { @@ -387,7 +391,7 @@ describe('CreateSubscriptionButton', () => { // Assert // Assert - expect(screen.getByRole('button'))!.toBeInTheDocument() + expect(getCreateButton()).toBeInTheDocument() }) it('should apply shape prop correctly', () => { @@ -592,7 +596,7 @@ describe('CreateSubscriptionButton', () => { // Assert // Assert - expect(screen.getByRole('button'))!.toHaveTextContent('pluginTrigger.subscription.createButton.apiKey') + expect(getCreateButton()).toHaveTextContent('pluginTrigger.subscription.createButton.apiKey') }) it('should display correct button text for MANUAL method', () => { @@ -610,7 +614,7 @@ describe('CreateSubscriptionButton', () => { // Assert // Assert - expect(screen.getByRole('button'))!.toHaveTextContent('pluginTrigger.subscription.createButton.manual') + expect(getCreateButton()).toHaveTextContent('pluginTrigger.subscription.createButton.manual') }) it('should display default button text when multiple methods are supported', () => { @@ -628,7 +632,7 @@ describe('CreateSubscriptionButton', () => { // Assert // Assert - expect(screen.getByRole('button'))!.toHaveTextContent('pluginTrigger.subscription.empty.button') + expect(getCreateButton()).toHaveTextContent('pluginTrigger.subscription.empty.button') }) }) @@ -780,7 +784,7 @@ describe('CreateSubscriptionButton', () => { // Act render() - const button = screen.getByRole('button') + const button = getCreateButton() fireEvent.click(button) // Assert - modal should not open @@ -830,7 +834,7 @@ describe('CreateSubscriptionButton', () => { // Act render() - const button = screen.getByRole('button') + const button = getCreateButton() fireEvent.click(button) // Assert - modal should open @@ -1328,7 +1332,7 @@ describe('CreateSubscriptionButton', () => { render() // Assert - should not have settings divider - const button = screen.getByRole('button') + const button = getCreateButton() const divider = button.querySelector('.bg-text-primary-on-surface') expect(divider).not.toBeInTheDocument() }) @@ -1447,7 +1451,7 @@ describe('CreateSubscriptionButton', () => { render() // Assert - const button = screen.getByRole('button') + const button = getCreateButton() expect(button)!.toHaveClass('w-full') }) diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/index.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/index.tsx index 9c9a95a37b..7060b39dcf 100644 --- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/index.tsx +++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/index.tsx @@ -9,6 +9,7 @@ import { useCallback, useMemo, useState } from 'react' import { useTranslation } from 'react-i18next' import { ActionButton, ActionButtonState } from '@/app/components/base/action-button' import Badge from '@/app/components/base/badge' +import { Infotip } from '@/app/components/base/infotip' import { openOAuthPopup } from '@/hooks/use-oauth' import { useInitiateTriggerOAuth, useTriggerOAuthConfig, useTriggerProviderInfo } from '@/service/use-triggers' import { SupportedCreationMethods } from '../../../types' @@ -124,18 +125,13 @@ export const CreateSubscriptionButton = ({ buttonType = CreateButtonType.FULL_BU value: SupportedCreationMethods.MANUAL, label: t('subscription.addType.options.manual.description', { ns: 'pluginTrigger' }), extra: ( - - - - - )} - /> - - {t('subscription.addType.options.manual.tip', { ns: 'pluginTrigger' })} - - + + {t('subscription.addType.options.manual.tip', { ns: 'pluginTrigger' })} + ), show: supportedMethods.includes(SupportedCreationMethods.MANUAL), }, diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/list-view.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/list-view.tsx index 66dfabb4db..76c5a02065 100644 --- a/web/app/components/plugins/plugin-detail-panel/subscription-list/list-view.tsx +++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/list-view.tsx @@ -1,9 +1,9 @@ 'use client' import type { PluginDetail } from '@/app/components/plugins/types' import { cn } from '@langgenius/dify-ui/cn' -import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip' import * as React from 'react' import { useTranslation } from 'react-i18next' +import { Infotip } from '@/app/components/base/infotip' import { CreateSubscriptionButton } from './create' import { CreateButtonType } from './create/types' import SubscriptionCard from './subscription-card' @@ -31,18 +31,13 @@ export const SubscriptionListView: React.FC = ({ {t('subscription.listNum', { ns: 'pluginTrigger', num: subscriptionCount })} - - - - - )} - /> - - {t('subscription.list.tip', { ns: 'pluginTrigger' })} - - + + {t('subscription.list.tip', { ns: 'pluginTrigger' })} + )} = ({ {t('subscription.listNum', { ns: 'pluginTrigger', num: subscriptionCount })} - - - - - )} - /> - - {t('subscription.list.tip', { ns: 'pluginTrigger' })} - - + + {t('subscription.list.tip', { ns: 'pluginTrigger' })} + { +const InfoTooltip = ({ children }: { children: string }) => { return ( - - - )} - /> - -
- {children} -
-
-
+ + {children} + ) } diff --git a/web/app/components/workflow/nodes/_base/components/layout/__tests__/field-title.spec.tsx b/web/app/components/workflow/nodes/_base/components/layout/__tests__/field-title.spec.tsx index c11b5ecfc8..371a68fe49 100644 --- a/web/app/components/workflow/nodes/_base/components/layout/__tests__/field-title.spec.tsx +++ b/web/app/components/workflow/nodes/_base/components/layout/__tests__/field-title.spec.tsx @@ -1,12 +1,6 @@ import { fireEvent, render, screen } from '@testing-library/react' import { FieldTitle } from '../field-title' -vi.mock('@langgenius/dify-ui/tooltip', () => ({ - Tooltip: ({ children }: { children: React.ReactNode }) =>
{children}
, - TooltipTrigger: ({ render }: { render: React.ReactNode }) => <>{render}, - TooltipContent: ({ children }: { children: React.ReactNode }) =>
{children}
, -})) - describe('FieldTitle', () => { it('should render title, subtitle, operation, tooltip and warning dot', () => { render( @@ -21,7 +15,7 @@ describe('FieldTitle', () => { expect(screen.getByText('Embedding')).toBeInTheDocument() expect(screen.getByText('subtitle')).toBeInTheDocument() - expect(screen.getByText('Tooltip copy')).toBeInTheDocument() + expect(screen.getByRole('button', { name: 'Tooltip copy' })).toBeInTheDocument() expect(screen.getByRole('button', { name: 'action' })).toBeInTheDocument() expect(document.querySelector('.bg-text-warning-secondary')).not.toBeNull() }) diff --git a/web/app/components/workflow/nodes/_base/components/layout/field-title.tsx b/web/app/components/workflow/nodes/_base/components/layout/field-title.tsx index ce080fb6dd..070b932605 100644 --- a/web/app/components/workflow/nodes/_base/components/layout/field-title.tsx +++ b/web/app/components/workflow/nodes/_base/components/layout/field-title.tsx @@ -1,10 +1,10 @@ import type { ReactNode } from 'react' import { cn } from '@langgenius/dify-ui/cn' -import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip' import { memo, useState, } from 'react' +import { Infotip } from '@/app/components/base/infotip' export type FieldTitleProps = { title?: string @@ -62,18 +62,9 @@ export const FieldTitle = memo(({ } { tooltip && ( - - - - - )} - /> - - {tooltip} - - + + {tooltip} + ) } diff --git a/web/app/components/workflow/nodes/knowledge-base/components/index-method.tsx b/web/app/components/workflow/nodes/knowledge-base/components/index-method.tsx index 82ccf265ba..0597d621f6 100644 --- a/web/app/components/workflow/nodes/knowledge-base/components/index-method.tsx +++ b/web/app/components/workflow/nodes/knowledge-base/components/index-method.tsx @@ -1,7 +1,5 @@ import { cn } from '@langgenius/dify-ui/cn' import { Slider } from '@langgenius/dify-ui/slider' -import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip' -import { RiQuestionLine } from '@remixicon/react' import { memo, useCallback, @@ -11,6 +9,7 @@ import { Economic, HighQuality, } from '@/app/components/base/icons/src/vender/knowledge' +import { Infotip } from '@/app/components/base/infotip' import Input from '@/app/components/base/input' import { Field } from '@/app/components/workflow/nodes/_base/components/layout' import { @@ -97,14 +96,12 @@ const IndexMethod = ({
{t('form.numberOfKeywords', { ns: 'datasetSettings' })}
- - } - /> - - number of keywords - - + + {t('form.numberOfKeywords', { ns: 'datasetSettings' })} + = ({
{t('nodes.llm.jsonSchema.instruction', { ns: 'workflow' })} - - - - - )} - /> - - {t('nodes.llm.jsonSchema.promptTooltip', { ns: 'workflow' })} - - + + {t('nodes.llm.jsonSchema.promptTooltip', { ns: 'workflow' })} +