Skip to content

Commit 0b02f66

Browse files
authored
fix: form input default value (#6088)
* rename * fix: form input default value * remove log
1 parent 8ad9e15 commit 0b02f66

File tree

11 files changed

+134
-139
lines changed

11 files changed

+134
-139
lines changed

document/content/docs/upgrading/4-14/4144.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ curl --location --request POST 'https://{{host}}/api/admin/initv4144' \
6363
14. Checkbox 在禁用状态时,hover 样式错误。
6464
15. 模型头像缺失情况下,默认 huggingface.svg 图标显示错误。
6565
16. 日志导出时,结束时间会多出一天。
66+
17. 表单输入,前端默认值未传递到实体值。
6667

6768
## 插件
6869

document/data/doc-last-modified.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
"document/content/docs/upgrading/4-14/4141.mdx": "2025-11-19T10:15:27+08:00",
120120
"document/content/docs/upgrading/4-14/4142.mdx": "2025-11-18T19:27:14+08:00",
121121
"document/content/docs/upgrading/4-14/4143.mdx": "2025-11-26T20:52:05+08:00",
122-
"document/content/docs/upgrading/4-14/4144.mdx": "2025-12-10T20:07:05+08:00",
122+
"document/content/docs/upgrading/4-14/4144.mdx": "2025-12-12T15:28:03+08:00",
123123
"document/content/docs/upgrading/4-8/40.mdx": "2025-08-02T19:38:37+08:00",
124124
"document/content/docs/upgrading/4-8/41.mdx": "2025-08-02T19:38:37+08:00",
125125
"document/content/docs/upgrading/4-8/42.mdx": "2025-08-02T19:38:37+08:00",

packages/global/core/workflow/template/system/interactive/type.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { FlowNodeOutputItemType } from '../../../type/io';
33
import type { FlowNodeInputTypeEnum } from '../../../node/constant';
44
import type { WorkflowIOValueTypeEnum } from '../../../constants';
55
import type { ChatCompletionMessageParam } from '../../../../ai/type';
6+
import type { AppFileSelectConfigType } from '../../../../app/type';
67

78
type InteractiveBasicType = {
89
entryNodeIds: string[];
@@ -80,7 +81,11 @@ export type UserInputFormItemType = {
8081
min?: number;
8182
// select
8283
list?: { label: string; value: string }[];
83-
};
84+
85+
// File
86+
canLocalUpload?: boolean;
87+
canUrlUpload?: boolean;
88+
} & AppFileSelectConfigType;
8489
type UserInputInteractive = InteractiveNodeType & {
8590
type: 'userInput';
8691
params: {

packages/web/components/core/app/FileTypeSelector/index.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,7 @@ export const FileTypeSelectorPanel = ({
186186
borderColor="myGray.200"
187187
pb={3}
188188
cursor="pointer"
189-
isChecked={
190-
value[type as FileExtensionKeyType] ??
191-
(type === 'canSelectFile' || type === 'canSelectImg')
192-
}
189+
isChecked={value[type as FileExtensionKeyType]}
193190
onChange={(e) => handleTypeChange(type as FileExtensionKeyType, e.target.checked)}
194191
>
195192
<Box color={'myGray.900'} lineHeight={1}>

packages/web/i18n/en/common.json

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
"add_new": "add_new",
102102
"add_new_param": "Add new param",
103103
"add_success": "Added Successfully",
104+
"aipoint_desc": "Each time the AI model is called, a certain amount of AI points (similar to tokens) will be consumed. Click to view detailed calculation rules.",
104105
"all_quotes": "All quotes",
105106
"all_result": "Full Results",
106107
"app_evaluation": "App Evaluation(Beta)",
@@ -209,6 +210,7 @@
209210
"comfirm_leave_page": "Confirm to Leave This Page?",
210211
"comfirn_create": "Confirm Creation",
211212
"commercial_function_tip": "Please Upgrade to the Commercial Version to Use This Feature: https://doc.fastgpt.cn/docs/introduction/commercial/",
213+
"community_support": "Community free support",
212214
"comon.Continue_Adding": "Continue Adding",
213215
"compliance.chat": "The content is generated by third-party AI and cannot be guaranteed to be true and accurate. It is for reference only.",
214216
"compliance.dataset": "Please ensure that your content strictly complies with relevant laws and regulations and avoid containing any illegal or infringing content. \nPlease be careful when uploading materials that may contain sensitive information.",
@@ -941,6 +943,14 @@
941943
"move.confirm": "Confirm move",
942944
"move_success": "Moved Successfully",
943945
"move_to": "Move to",
946+
"n_agent_amount": "{{amount}} Agent limit",
947+
"n_ai_points": "{{amount}} points",
948+
"n_chat_records_retain": "{{amount}} Days of Chat History Retention",
949+
"n_dataset_amount": "{{amount}} Dataset limit",
950+
"n_dataset_size": "{{amount}} Dataset Indexes",
951+
"n_team_audit_day": "{{amount}} days team operation log records",
952+
"n_team_members": "{{amount}} Member",
953+
"n_team_qpm": "{{amount}} QPM",
944954
"name": "name",
945955
"name_is_empty": "Name Cannot Be Empty",
946956
"navbar.Account": "Account",
@@ -1041,6 +1051,7 @@
10411051
"price_over_wx_limit": "Exceed payment provider limit: WeChat Pay only supports less than 6,000 yuan",
10421052
"prompt_input_placeholder": "Please enter the prompt word",
10431053
"psw_inconsistency": "Passwords Do Not Match",
1054+
"qpm_desc": "It mainly refers to the maximum number of times the team requests Agent per minute, and has nothing to do with the complexity of a single Agent. \nOther OpenAPI interfaces are also affected by this, each interface is calculated separately",
10441055
"question_feedback": "Work order",
10451056
"read_course": "Read Course",
10461057
"read_doc": "Read Document",
@@ -1187,7 +1198,6 @@
11871198
"support.wallet.noBill": "No Bill Records",
11881199
"support.wallet.no_invoice": "No Invoice Records",
11891200
"support.wallet.subscription.AI points": "AI Points",
1190-
"support.wallet.subscription.AI points click to read tip": "Each time the AI model is called, a certain amount of AI points (similar to tokens) will be consumed. Click to view detailed calculation rules.",
11911201
"support.wallet.subscription.AI points usage": "AI Points Usage",
11921202
"support.wallet.subscription.AI points usage tip": "Each time the AI model is called, a certain amount of AI points will be consumed. For specific calculation standards, please refer to the 'Pricing' above.",
11931203
"support.wallet.subscription.Ai points": "AI Points Calculation Standards",
@@ -1216,20 +1226,10 @@
12161226
"support.wallet.subscription.Update extra price": "Price",
12171227
"support.wallet.subscription.Upgrade plan": "Upgrade Package",
12181228
"support.wallet.subscription.ai_model": "AI Language Model",
1219-
"support.wallet.subscription.function.Audit log store duration": "{{amount}} days team operation log records",
1220-
"support.wallet.subscription.function.Custom domain": "{{amount}} Custom domains",
1221-
"support.wallet.subscription.function.History store": "{{amount}} Days of Chat History Retention",
1222-
"support.wallet.subscription.function.Max app": "{{amount}} Agent limit",
1223-
"support.wallet.subscription.function.Max dataset": "{{amount}} Dataset limit",
1224-
"support.wallet.subscription.function.Max dataset size": "{{amount}} Dataset Indexes",
1225-
"support.wallet.subscription.function.Max members": "{{amount}} Member",
1226-
"support.wallet.subscription.function.Points": "{{amount}} points",
1227-
"support.wallet.subscription.function.Requests per minute": "{{amount}} QPM",
1228-
"support.wallet.subscription.function.Ticket response time": "{{amount}} hours ticket support response",
1229-
"support.wallet.subscription.function.Community free support": "Community free support",
12301229
"support.wallet.subscription.function.Community support tip": "Visit the FastGPT community for free help and technical support",
1231-
"support.wallet.subscription.function.Website sync per dataset": "Single knowledge base {{amount}} web pages synchronized",
1232-
"support.wallet.subscription.function.custom domain tip": "The number of custom domain names that the team can configure, which can currently be used to access Wecom intelligent robots",
1230+
"n_custom_domain_amount": "{{amount}} Custom domains",
1231+
"n_website_sync_max_pages": "Single knowledge base {{amount}} web pages synchronized",
1232+
"n_custom_domain_amount tip": "The number of custom domain names that the team can configure, which can currently be used to access Wecom intelligent robots",
12331233
"support.wallet.subscription.mode.Month": "Month",
12341234
"support.wallet.subscription.mode.Period": "Subscription Period",
12351235
"support.wallet.subscription.mode.Year": "Year",
@@ -1386,6 +1386,7 @@
13861386
"user_leaved": "Leaved",
13871387
"value": "Value",
13881388
"verification": "Verification",
1389+
"worker_order_support_time": "{{amount}} hours ticket support response",
13891390
"xx_search_result": "{{key}} Search Results",
13901391
"yes": "Yes",
13911392
"yesterday": "yesterday",

packages/web/i18n/zh-CN/common.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,7 @@
11941194
"support.wallet.noBill": "无账单记录~",
11951195
"support.wallet.no_invoice": "暂无开票记录",
11961196
"support.wallet.subscription.AI points": "AI 积分",
1197-
"support.wallet.subscription.AI points click to read tip": "每次调用 AI 模型时,都会消耗一定的 AI 积分(类似于 token)。点击可查看详细计算规则。",
1197+
"aipoint_desc": "每次调用 AI 模型时,都会消耗一定的 AI 积分(类似于 token)。点击可查看详细计算规则。",
11981198
"support.wallet.subscription.AI points usage": "AI 积分使用量",
11991199
"support.wallet.subscription.AI points usage tip": "每次调用 AI 模型时,都会消耗一定的 AI 积分。具体的计算标准可参考上方的“计费标准”",
12001200
"support.wallet.subscription.Ai points": "AI 积分计算标准",
@@ -1224,22 +1224,22 @@
12241224
"support.wallet.subscription.Upgrade plan": "升级套餐",
12251225
"support.wallet.subscription.ai_model": "AI语言模型",
12261226
"support.wallet.subscription.eval_items_count": "单次评测数据条数: {{count}} 条",
1227-
"support.wallet.subscription.function.App registration count": "{{amount}} 个应用备案",
1228-
"support.wallet.subscription.function.Audit log store duration": "{{amount}} 天团队操作日志记录",
1229-
"support.wallet.subscription.function.Custom domain": "{{amount}} 个自定义域名",
1230-
"support.wallet.subscription.function.History store": "{{amount}} 天对话记录保留",
1231-
"support.wallet.subscription.function.Max app": "{{amount}} 个 Agent",
1232-
"support.wallet.subscription.function.Max dataset": "{{amount}} 个知识库",
1233-
"support.wallet.subscription.function.Max dataset size": "{{amount}} 组知识库索引",
1234-
"support.wallet.subscription.function.Max members": "{{amount}} 个团队成员",
1235-
"support.wallet.subscription.function.Points": "{{amount}} 积分",
1236-
"support.wallet.subscription.function.Requests per minute": "{{amount}} QPM",
1237-
"support.wallet.subscription.function.Ticket response time": "{{amount}} 小时工单支持响应",
1238-
"support.wallet.subscription.function.Community free support": "社区免费支持",
1227+
"n_app_registration_amount": "{{amount}} 个应用备案",
1228+
"n_team_audit_day": "{{amount}} 天团队操作日志记录",
1229+
"n_custom_domain_amount": "{{amount}} 个自定义域名",
1230+
"n_chat_records_retain": "{{amount}} 天对话记录保留",
1231+
"n_agent_amount": "{{amount}} 个 Agent",
1232+
"n_dataset_amount": "{{amount}} 个知识库",
1233+
"n_dataset_size": "{{amount}} 组知识库索引",
1234+
"n_team_members": "{{amount}} 个团队成员",
1235+
"n_ai_points": "{{amount}} 积分",
1236+
"n_team_qpm": "{{amount}} QPM",
1237+
"worker_order_support_time": "{{amount}} 小时工单支持响应",
1238+
"community_support": "社区免费支持",
12391239
"support.wallet.subscription.function.Community support tip": "可前往 FastGPT 社区免费获取帮助和技术支持",
1240-
"support.wallet.subscription.function.Website sync per dataset": "站点同步最大 {{amount}} 页",
1241-
"support.wallet.subscription.function.custom domain tip": "团队可以配置的自定义域名数量,目前可用于接入企微智能机器人",
1242-
"support.wallet.subscription.function.qpm tip": "主要指团队每分钟请求 Agent 的最大次数,与单个 Agent 复杂度无关。其他 OpenAPI 接口也受此影响,每个接口单独计算",
1240+
"n_website_sync_max_pages": "站点同步最大 {{amount}} 页",
1241+
"n_custom_domain_amount tip": "团队可以配置的自定义域名数量,目前可用于接入企微智能机器人",
1242+
"qpm_desc": "主要指团队每分钟请求 Agent 的最大次数,与单个 Agent 复杂度无关。其他 OpenAPI 接口也受此影响,每个接口单独计算",
12431243
"support.wallet.subscription.mode.Month": "按月",
12441244
"support.wallet.subscription.mode.Period": "订阅周期",
12451245
"support.wallet.subscription.mode.Year": "按年",

packages/web/i18n/zh-Hant/common.json

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
"add_new": "新增",
102102
"add_new_param": "新增參數",
103103
"add_success": "新增成功",
104+
"aipoint_desc": "每次呼叫 AI 模型時,都會消耗一定的 AI 點數(類似於 Token)。點選可檢視詳細計算規則。",
104105
"all_quotes": "全部引用",
105106
"all_result": "完整結果",
106107
"app_evaluation": "應用評測(Beta)",
@@ -209,6 +210,7 @@
209210
"comfirm_leave_page": "確認離開此頁面?",
210211
"comfirn_create": "確認建立",
211212
"commercial_function_tip": "請升級為商業版後使用此功能:https://doc.fastgpt.cn/docs/introduction/commercial/",
213+
"community_support": "社群免費支持",
212214
"comon.Continue_Adding": "繼續新增",
213215
"compliance.chat": "內容由第三方 AI 產生,無法保證其真實性與準確性,僅供參考。",
214216
"compliance.dataset": "請確保您的內容嚴格遵守相關法律法規,避免包含任何違法或侵權的內容。\n在上傳可能涉及敏感資訊的資料時請務必謹慎。",
@@ -939,6 +941,14 @@
939941
"move.confirm": "確認移動",
940942
"move_success": "移動成功",
941943
"move_to": "移動至",
944+
"n_agent_amount": "{{amount}} 個 Agent",
945+
"n_ai_points": "{{amount}} 積分",
946+
"n_chat_records_retain": "{{amount}} 天對話紀錄保留",
947+
"n_dataset_amount": "{{amount}} 個知識庫",
948+
"n_dataset_size": "{{amount}} 組知識庫索引",
949+
"n_team_audit_day": "{{amount}} 天團隊操作日誌記錄",
950+
"n_team_members": "{{amount}} 個團隊成員",
951+
"n_team_qpm": "{{amount}} QPM",
942952
"name": "名稱",
943953
"name_is_empty": "名稱不能為空",
944954
"navbar.Account": "帳戶",
@@ -1038,6 +1048,7 @@
10381048
"price_over_wx_limit": "超出支付提供商限額:微信支付僅支持 6000 元以下",
10391049
"prompt_input_placeholder": "請輸入提示詞",
10401050
"psw_inconsistency": "兩次密碼不一致",
1051+
"qpm_desc": "主要指團隊每分鐘請求 Agent 的最大次數,與單個 Agent 複雜度無關。\n其他 OpenAPI 接口也受此影響,每個接口單獨計算",
10411052
"question_feedback": "工單諮詢",
10421053
"read_course": "閱讀教學",
10431054
"read_doc": "閱讀文件",
@@ -1184,7 +1195,6 @@
11841195
"support.wallet.noBill": "無帳單紀錄",
11851196
"support.wallet.no_invoice": "無發票紀錄",
11861197
"support.wallet.subscription.AI points": "AI 點數",
1187-
"support.wallet.subscription.AI points click to read tip": "每次呼叫 AI 模型時,都會消耗一定的 AI 點數(類似於 Token)。點選可檢視詳細計算規則。",
11881198
"support.wallet.subscription.AI points usage": "AI 點數使用量",
11891199
"support.wallet.subscription.AI points usage tip": "每次呼叫 AI 模型時,都會消耗一定的 AI 點數。具體的計算標準可參考上方的「計費標準」",
11901200
"support.wallet.subscription.Ai points": "AI 點數計算標準",
@@ -1213,20 +1223,10 @@
12131223
"support.wallet.subscription.Update extra price": "價格",
12141224
"support.wallet.subscription.Upgrade plan": "升級方案",
12151225
"support.wallet.subscription.ai_model": "AI 語言模型",
1216-
"support.wallet.subscription.function.Audit log store duration": "{{amount}} 天團隊操作日誌記錄",
1217-
"support.wallet.subscription.function.Custom domain": "{{amount}} 個自定義域名",
1218-
"support.wallet.subscription.function.History store": "{{amount}} 天對話紀錄保留",
1219-
"support.wallet.subscription.function.Max app": "{{amount}} 個 Agent",
1220-
"support.wallet.subscription.function.Max dataset": "{{amount}} 個知識庫",
1221-
"support.wallet.subscription.function.Max dataset size": "{{amount}} 組知識庫索引",
1222-
"support.wallet.subscription.function.Max members": "{{amount}} 個團隊成員",
1223-
"support.wallet.subscription.function.Points": "{{amount}} 積分",
1224-
"support.wallet.subscription.function.Requests per minute": "{{amount}} QPM",
1225-
"support.wallet.subscription.function.Ticket response time": "{{amount}} 小時工單支持響應",
1226-
"support.wallet.subscription.function.Community free support": "社群免費支持",
12271226
"support.wallet.subscription.function.Community support tip": "可前往 FastGPT 社群免費獲取幫助和技術支持",
1228-
"support.wallet.subscription.function.Website sync per dataset": "單知識庫 {{amount}} 個網頁同步",
1229-
"support.wallet.subscription.function.custom domain tip": "團隊可以配置的自定義域名數量,目前可用於接入企微智能機器人",
1227+
"n_custom_domain_amount": "{{amount}} 個自定義域名",
1228+
"n_website_sync_max_pages": "單知識庫 {{amount}} 個網頁同步",
1229+
"n_custom_domain_amount tip": "團隊可以配置的自定義域名數量,目前可用於接入企微智能機器人",
12301230
"support.wallet.subscription.mode.Month": "按月",
12311231
"support.wallet.subscription.mode.Period": "訂閱週期",
12321232
"support.wallet.subscription.mode.Year": "按年",
@@ -1383,6 +1383,7 @@
13831383
"user_leaved": "已離開",
13841384
"value": "",
13851385
"verification": "驗證",
1386+
"worker_order_support_time": "{{amount}} 小時工單支持響應",
13861387
"xx_search_result": "{{key}} 的搜尋結果",
13871388
"yes": "",
13881389
"yesterday": "昨天",

projects/app/src/components/core/chat/components/Interactive/InteractiveComponents.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export const FormInputComponent = React.memo(function FormInputComponent({
163163
}, [submitted, inputForm, savedFormData, appId, outLinkAuthData, setValue]);
164164

165165
const formValues = watch();
166-
React.useEffect(() => {
166+
useEffect(() => {
167167
if (typeof window !== 'undefined' && chatItemDataId && !submitted) {
168168
sessionStorage.setItem(`interactiveForm_${chatItemDataId}`, JSON.stringify(formValues));
169169
}
@@ -227,13 +227,7 @@ export const FormInputComponent = React.memo(function FormInputComponent({
227227
onChange={onChange}
228228
isDisabled={submitted}
229229
isInvalid={!!error}
230-
maxLength={input.maxLength}
231-
min={input.min}
232-
max={input.max}
233-
list={input.list}
234230
isRichText={false}
235-
canLocalUpload={true}
236-
canSelectFile={true}
237231
/>
238232
{error && <FormErrorMessage>{error.message}</FormErrorMessage>}
239233
</FormControl>

0 commit comments

Comments
 (0)