瀏覽代碼

fix missing agent node help link (#16841)

tags/1.2.0
非法操作 7 月之前
父節點
當前提交
d87d66ab88
No account linked to committer's email address
共有 1 個文件被更改,包括 9 次插入1 次删除
  1. 9
    1
      web/app/components/workflow/nodes/_base/components/agent-strategy.tsx

+ 9
- 1
web/app/components/workflow/nodes/_base/components/agent-strategy.tsx 查看文件

import { useRenderI18nObject } from '@/hooks/use-i18n' import { useRenderI18nObject } from '@/hooks/use-i18n'
import type { NodeOutPutVar } from '../../../types' import type { NodeOutPutVar } from '../../../types'
import type { Node } from 'reactflow' import type { Node } from 'reactflow'
import { useContext } from 'use-context-selector'
import I18n from '@/context/i18n'
import { LanguagesSupported } from '@/i18n/language'


export type Strategy = { export type Strategy = {
agent_strategy_provider_name: string agent_strategy_provider_name: string
export const AgentStrategy = memo((props: AgentStrategyProps) => { export const AgentStrategy = memo((props: AgentStrategyProps) => {
const { strategy, onStrategyChange, formSchema, formValue, onFormValueChange, nodeOutputVars, availableNodes, nodeId } = props const { strategy, onStrategyChange, formSchema, formValue, onFormValueChange, nodeOutputVars, availableNodes, nodeId } = props
const { t } = useTranslation() const { t } = useTranslation()
const { locale } = useContext(I18n)
const defaultModel = useDefaultModel(ModelTypeEnum.textGeneration) const defaultModel = useDefaultModel(ModelTypeEnum.textGeneration)
const renderI18nObject = useRenderI18nObject() const renderI18nObject = useRenderI18nObject()
const workflowStore = useWorkflowStore() const workflowStore = useWorkflowStore()
title={t('workflow.nodes.agent.strategy.configureTip')} title={t('workflow.nodes.agent.strategy.configureTip')}
description={<div className='text-xs text-text-tertiary'> description={<div className='text-xs text-text-tertiary'>
{t('workflow.nodes.agent.strategy.configureTipDesc')} <br /> {t('workflow.nodes.agent.strategy.configureTipDesc')} <br />
<Link href={'/'} className='text-text-accent-secondary'>
<Link href={
locale === LanguagesSupported[1]
? 'https://docs.dify.ai/zh-hans/guides/workflow/node/agent#xuan-ze-agent-ce-le'
: 'https://docs.dify.ai/guides/workflow/node/agent#select-an-agent-strategy'
} className='text-text-accent-secondary' target='_blank'>
{t('workflow.nodes.agent.learnMore')} {t('workflow.nodes.agent.learnMore')}
</Link> </Link>
</div>} </div>}

Loading…
取消
儲存