Skip to content

Commit 8511761

Browse files
wuayeewuayee
andauthored
[fronted] 修改提示词大小限制 (#529)
Co-authored-by: wuayee <[email protected]>
1 parent a4ea5d2 commit 8511761

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

agent-flow/src/components/common/prompt/Prompt.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export const Prompt = (
105105
>
106106
<TextArea
107107
disabled={disabled}
108-
maxLength={2000}
108+
maxLength={5000}
109109
className='jade-textarea-input jade-font-size'
110110
onBlur={(e) => changeOnBlur(e)}
111111
placeholder={placeHolder}

agent-flow/src/components/common/prompt/PromptDrawer.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const _PromptDrawer = (
4646
onConfirm,
4747
allowAIGenerate,
4848
onAIGenerate,
49-
maxLength = 2000,
49+
maxLength = 5000,
5050
labelName
5151
}) => {
5252
const {t} = useTranslation();

frontend/src/pages/configForm/configUi/components/llm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ const LLM = (props) => {
192192
placeholder={t('promptHolder')}
193193
rows={16}
194194
showCount
195-
maxLength={2000}
195+
maxLength={5000}
196196
onChange={() => isPromptChange.current = true}
197197
onBlur={(e) => updatePrompt(e.target.value)}
198198
/>

frontend/src/pages/configForm/configUi/components/prompt-template.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const PromptTemplate = ({ promptTemplateRef, promptValue, openGeneratePrompt, up
8484
</div>
8585
<Input.TextArea
8686
value={currentPrompt}
87-
showCount maxLength={2000}
87+
showCount maxLength={5000}
8888
style={{ height: '100%' }}
8989
onChange={(e) => setCurrentPrompt(e.target.value)}
9090
/>

frontend/src/pages/configForm/configUi/components/prompt-word.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const PromptWord = ({ promptWordRef, updatePromptValue, currentModelInfo }) => {
6161
);
6262
if (res?.code === 0 && res?.data) {
6363
if (isGenerating.current) {
64-
setPrompt(res.data.substring(0, 2000));
64+
setPrompt(res.data.substring(0, 5000));
6565
setGenerateStatus(generateStatusMap.GENEATED);
6666
}
6767
} else {
@@ -102,7 +102,7 @@ const PromptWord = ({ promptWordRef, updatePromptValue, currentModelInfo }) => {
102102
case generateStatusMap.GENEATED:
103103
return <Input.TextArea
104104
value={prompt}
105-
maxLength={2000}
105+
maxLength={5000}
106106
showCount
107107
style={{ height: '100%', width: '100%' }}
108108
onChange={promptChange}

0 commit comments

Comments
 (0)