feat: tooltip (#7634)
This commit is contained in:
@@ -3,13 +3,12 @@ import type { FC } from 'react'
|
||||
import React, { useCallback, useEffect, useState } from 'react'
|
||||
import { uniqueId } from 'lodash-es'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { RiQuestionLine } from '@remixicon/react'
|
||||
import type { ModelConfig, PromptItem, Variable } from '../../../types'
|
||||
import { EditionType } from '../../../types'
|
||||
import { useWorkflowStore } from '../../../store'
|
||||
import Editor from '@/app/components/workflow/nodes/_base/components/prompt/editor'
|
||||
import TypeSelector from '@/app/components/workflow/nodes/_base/components/selector'
|
||||
import TooltipPlus from '@/app/components/base/tooltip-plus'
|
||||
import Tooltip from '@/app/components/base/tooltip'
|
||||
import { PromptRole } from '@/models/debug'
|
||||
|
||||
const i18nPrefix = 'workflow.nodes.llm'
|
||||
@@ -118,13 +117,12 @@ const ConfigPromptItem: FC<Props> = ({
|
||||
/>
|
||||
)}
|
||||
|
||||
<TooltipPlus
|
||||
<Tooltip
|
||||
popupContent={
|
||||
<div className='max-w-[180px]'>{t(`${i18nPrefix}.roleDescription.${payload.role}`)}</div>
|
||||
}
|
||||
>
|
||||
<RiQuestionLine className='w-3.5 h-3.5 text-gray-400' />
|
||||
</TooltipPlus>
|
||||
triggerClassName='w-4 h-4'
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
value={payload.edition_type === EditionType.jinja2 ? (payload.jinja2_text || '') : payload.text}
|
||||
|
Reference in New Issue
Block a user