55 *--------------------------------------------------------------------------------------------*/
66
77import './style.css' ;
8- import { useDispatch , useShapeContext } from '@/components/DefaultRoot.jsx' ;
8+ import { useDispatch } from '@/components/DefaultRoot.jsx' ;
99import React from 'react' ;
1010import PropTypes from 'prop-types' ;
1111import { Trans , useTranslation } from 'react-i18next' ;
1212import { getConfigValue } from '@/components/util/JadeConfigUtils.js' ;
1313import { JadeInputForm } from '@/components/common/JadeInputForm.jsx' ;
1414import { InvokeOutput } from '@/components/common/InvokeOutput.jsx' ;
1515import { FROM_TYPE } from '@/common/Consts.js' ;
16- import { AiPromptPanel } from '@/components/common/AiPromptPanel.jsx' ;
1716
1817/**
1918 * 输入参数国际化描述
@@ -37,8 +36,6 @@ const _FileExtractionWrapper = ({data, shapeStatus}) => {
3736 const dispatch = useDispatch ( ) ;
3837 const { t} = useTranslation ( ) ;
3938 const fileExtraction = data . inputParams . find ( item => item . name === 'fileExtractionParam' ) ;
40- const prompt = getConfigValue ( fileExtraction , [ 'prompt' ] , '' ) ;
41- const shapeId = useShapeContext ( ) . id ;
4239
4340 /**
4441 * 更新入参变量属性名或者类型
@@ -90,13 +87,6 @@ const _FileExtractionWrapper = ({data, shapeStatus}) => {
9087 editable = { false }
9188 maxInputLength = { 1000 }
9289 content = { inputDescription } />
93- < AiPromptPanel
94- name = { `fileExtractionPromptDrawer-${ shapeId } -${ prompt . id } ` }
95- popoverContent = { content }
96- prompt = { prompt }
97- header = { t ( 'fileExtractionConfig' ) }
98- drawerTitle = { t ( 'fileExtractionPrompt' ) }
99- disabled = { shapeStatus . disabled } />
10090 < InvokeOutput outputData = { data . outputParams } getDescription = { getOutputDescription } />
10191 </ > ) ;
10292} ;
0 commit comments