Commit 0b02f662 by Archer Committed by GitHub

fix: form input default value (#6088)

* rename

* fix: form input default value

* remove log
parent 8ad9e155
...@@ -63,6 +63,7 @@ curl --location --request POST 'https://{{host}}/api/admin/initv4144' \ ...@@ -63,6 +63,7 @@ curl --location --request POST 'https://{{host}}/api/admin/initv4144' \
14. Checkbox 在禁用状态时,hover 样式错误。 14. Checkbox 在禁用状态时,hover 样式错误。
15. 模型头像缺失情况下,默认 huggingface.svg 图标显示错误。 15. 模型头像缺失情况下,默认 huggingface.svg 图标显示错误。
16. 日志导出时,结束时间会多出一天。 16. 日志导出时,结束时间会多出一天。
17. 表单输入,前端默认值未传递到实体值。
## 插件 ## 插件
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
"document/content/docs/upgrading/4-14/4141.mdx": "2025-11-19T10:15:27+08:00", "document/content/docs/upgrading/4-14/4141.mdx": "2025-11-19T10:15:27+08:00",
"document/content/docs/upgrading/4-14/4142.mdx": "2025-11-18T19:27:14+08:00", "document/content/docs/upgrading/4-14/4142.mdx": "2025-11-18T19:27:14+08:00",
"document/content/docs/upgrading/4-14/4143.mdx": "2025-11-26T20:52:05+08:00", "document/content/docs/upgrading/4-14/4143.mdx": "2025-11-26T20:52:05+08:00",
"document/content/docs/upgrading/4-14/4144.mdx": "2025-12-10T20:07:05+08:00", "document/content/docs/upgrading/4-14/4144.mdx": "2025-12-12T15:28:03+08:00",
"document/content/docs/upgrading/4-8/40.mdx": "2025-08-02T19:38:37+08:00", "document/content/docs/upgrading/4-8/40.mdx": "2025-08-02T19:38:37+08:00",
"document/content/docs/upgrading/4-8/41.mdx": "2025-08-02T19:38:37+08:00", "document/content/docs/upgrading/4-8/41.mdx": "2025-08-02T19:38:37+08:00",
"document/content/docs/upgrading/4-8/42.mdx": "2025-08-02T19:38:37+08:00", "document/content/docs/upgrading/4-8/42.mdx": "2025-08-02T19:38:37+08:00",
......
...@@ -3,6 +3,7 @@ import type { FlowNodeOutputItemType } from '../../../type/io'; ...@@ -3,6 +3,7 @@ import type { FlowNodeOutputItemType } from '../../../type/io';
import type { FlowNodeInputTypeEnum } from '../../../node/constant'; import type { FlowNodeInputTypeEnum } from '../../../node/constant';
import type { WorkflowIOValueTypeEnum } from '../../../constants'; import type { WorkflowIOValueTypeEnum } from '../../../constants';
import type { ChatCompletionMessageParam } from '../../../../ai/type'; import type { ChatCompletionMessageParam } from '../../../../ai/type';
import type { AppFileSelectConfigType } from '../../../../app/type';
type InteractiveBasicType = { type InteractiveBasicType = {
entryNodeIds: string[]; entryNodeIds: string[];
...@@ -80,7 +81,11 @@ export type UserInputFormItemType = { ...@@ -80,7 +81,11 @@ export type UserInputFormItemType = {
min?: number; min?: number;
// select // select
list?: { label: string; value: string }[]; list?: { label: string; value: string }[];
};
// File
canLocalUpload?: boolean;
canUrlUpload?: boolean;
} & AppFileSelectConfigType;
type UserInputInteractive = InteractiveNodeType & { type UserInputInteractive = InteractiveNodeType & {
type: 'userInput'; type: 'userInput';
params: { params: {
......
...@@ -186,10 +186,7 @@ export const FileTypeSelectorPanel = ({ ...@@ -186,10 +186,7 @@ export const FileTypeSelectorPanel = ({
borderColor="myGray.200" borderColor="myGray.200"
pb={3} pb={3}
cursor="pointer" cursor="pointer"
isChecked={ isChecked={value[type as FileExtensionKeyType]}
value[type as FileExtensionKeyType] ??
(type === 'canSelectFile' || type === 'canSelectImg')
}
onChange={(e) => handleTypeChange(type as FileExtensionKeyType, e.target.checked)} onChange={(e) => handleTypeChange(type as FileExtensionKeyType, e.target.checked)}
> >
<Box color={'myGray.900'} lineHeight={1}> <Box color={'myGray.900'} lineHeight={1}>
......
...@@ -101,6 +101,7 @@ ...@@ -101,6 +101,7 @@
"add_new": "add_new", "add_new": "add_new",
"add_new_param": "Add new param", "add_new_param": "Add new param",
"add_success": "Added Successfully", "add_success": "Added Successfully",
"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.",
"all_quotes": "All quotes", "all_quotes": "All quotes",
"all_result": "Full Results", "all_result": "Full Results",
"app_evaluation": "App Evaluation(Beta)", "app_evaluation": "App Evaluation(Beta)",
...@@ -209,6 +210,7 @@ ...@@ -209,6 +210,7 @@
"comfirm_leave_page": "Confirm to Leave This Page?", "comfirm_leave_page": "Confirm to Leave This Page?",
"comfirn_create": "Confirm Creation", "comfirn_create": "Confirm Creation",
"commercial_function_tip": "Please Upgrade to the Commercial Version to Use This Feature: https://doc.fastgpt.cn/docs/introduction/commercial/", "commercial_function_tip": "Please Upgrade to the Commercial Version to Use This Feature: https://doc.fastgpt.cn/docs/introduction/commercial/",
"community_support": "Community free support",
"comon.Continue_Adding": "Continue Adding", "comon.Continue_Adding": "Continue Adding",
"compliance.chat": "The content is generated by third-party AI and cannot be guaranteed to be true and accurate. It is for reference only.", "compliance.chat": "The content is generated by third-party AI and cannot be guaranteed to be true and accurate. It is for reference only.",
"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.", "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 @@ ...@@ -941,6 +943,14 @@
"move.confirm": "Confirm move", "move.confirm": "Confirm move",
"move_success": "Moved Successfully", "move_success": "Moved Successfully",
"move_to": "Move to", "move_to": "Move to",
"n_agent_amount": "{{amount}} Agent limit",
"n_ai_points": "{{amount}} points",
"n_chat_records_retain": "{{amount}} Days of Chat History Retention",
"n_dataset_amount": "{{amount}} Dataset limit",
"n_dataset_size": "{{amount}} Dataset Indexes",
"n_team_audit_day": "{{amount}} days team operation log records",
"n_team_members": "{{amount}} Member",
"n_team_qpm": "{{amount}} QPM",
"name": "name", "name": "name",
"name_is_empty": "Name Cannot Be Empty", "name_is_empty": "Name Cannot Be Empty",
"navbar.Account": "Account", "navbar.Account": "Account",
...@@ -1041,6 +1051,7 @@ ...@@ -1041,6 +1051,7 @@
"price_over_wx_limit": "Exceed payment provider limit: WeChat Pay only supports less than 6,000 yuan", "price_over_wx_limit": "Exceed payment provider limit: WeChat Pay only supports less than 6,000 yuan",
"prompt_input_placeholder": "Please enter the prompt word", "prompt_input_placeholder": "Please enter the prompt word",
"psw_inconsistency": "Passwords Do Not Match", "psw_inconsistency": "Passwords Do Not Match",
"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",
"question_feedback": "Work order", "question_feedback": "Work order",
"read_course": "Read Course", "read_course": "Read Course",
"read_doc": "Read Document", "read_doc": "Read Document",
...@@ -1187,7 +1198,6 @@ ...@@ -1187,7 +1198,6 @@
"support.wallet.noBill": "No Bill Records", "support.wallet.noBill": "No Bill Records",
"support.wallet.no_invoice": "No Invoice Records", "support.wallet.no_invoice": "No Invoice Records",
"support.wallet.subscription.AI points": "AI Points", "support.wallet.subscription.AI points": "AI Points",
"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.",
"support.wallet.subscription.AI points usage": "AI Points Usage", "support.wallet.subscription.AI points usage": "AI Points Usage",
"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.", "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.",
"support.wallet.subscription.Ai points": "AI Points Calculation Standards", "support.wallet.subscription.Ai points": "AI Points Calculation Standards",
...@@ -1216,20 +1226,10 @@ ...@@ -1216,20 +1226,10 @@
"support.wallet.subscription.Update extra price": "Price", "support.wallet.subscription.Update extra price": "Price",
"support.wallet.subscription.Upgrade plan": "Upgrade Package", "support.wallet.subscription.Upgrade plan": "Upgrade Package",
"support.wallet.subscription.ai_model": "AI Language Model", "support.wallet.subscription.ai_model": "AI Language Model",
"support.wallet.subscription.function.Audit log store duration": "{{amount}} days team operation log records",
"support.wallet.subscription.function.Custom domain": "{{amount}} Custom domains",
"support.wallet.subscription.function.History store": "{{amount}} Days of Chat History Retention",
"support.wallet.subscription.function.Max app": "{{amount}} Agent limit",
"support.wallet.subscription.function.Max dataset": "{{amount}} Dataset limit",
"support.wallet.subscription.function.Max dataset size": "{{amount}} Dataset Indexes",
"support.wallet.subscription.function.Max members": "{{amount}} Member",
"support.wallet.subscription.function.Points": "{{amount}} points",
"support.wallet.subscription.function.Requests per minute": "{{amount}} QPM",
"support.wallet.subscription.function.Ticket response time": "{{amount}} hours ticket support response",
"support.wallet.subscription.function.Community free support": "Community free support",
"support.wallet.subscription.function.Community support tip": "Visit the FastGPT community for free help and technical support", "support.wallet.subscription.function.Community support tip": "Visit the FastGPT community for free help and technical support",
"support.wallet.subscription.function.Website sync per dataset": "Single knowledge base {{amount}} web pages synchronized", "n_custom_domain_amount": "{{amount}} Custom domains",
"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", "n_website_sync_max_pages": "Single knowledge base {{amount}} web pages synchronized",
"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",
"support.wallet.subscription.mode.Month": "Month", "support.wallet.subscription.mode.Month": "Month",
"support.wallet.subscription.mode.Period": "Subscription Period", "support.wallet.subscription.mode.Period": "Subscription Period",
"support.wallet.subscription.mode.Year": "Year", "support.wallet.subscription.mode.Year": "Year",
...@@ -1386,6 +1386,7 @@ ...@@ -1386,6 +1386,7 @@
"user_leaved": "Leaved", "user_leaved": "Leaved",
"value": "Value", "value": "Value",
"verification": "Verification", "verification": "Verification",
"worker_order_support_time": "{{amount}} hours ticket support response",
"xx_search_result": "{{key}} Search Results", "xx_search_result": "{{key}} Search Results",
"yes": "Yes", "yes": "Yes",
"yesterday": "yesterday", "yesterday": "yesterday",
......
...@@ -1194,7 +1194,7 @@ ...@@ -1194,7 +1194,7 @@
"support.wallet.noBill": "无账单记录~", "support.wallet.noBill": "无账单记录~",
"support.wallet.no_invoice": "暂无开票记录", "support.wallet.no_invoice": "暂无开票记录",
"support.wallet.subscription.AI points": "AI 积分", "support.wallet.subscription.AI points": "AI 积分",
"support.wallet.subscription.AI points click to read tip": "每次调用 AI 模型时,都会消耗一定的 AI 积分(类似于 token)。点击可查看详细计算规则。", "aipoint_desc": "每次调用 AI 模型时,都会消耗一定的 AI 积分(类似于 token)。点击可查看详细计算规则。",
"support.wallet.subscription.AI points usage": "AI 积分使用量", "support.wallet.subscription.AI points usage": "AI 积分使用量",
"support.wallet.subscription.AI points usage tip": "每次调用 AI 模型时,都会消耗一定的 AI 积分。具体的计算标准可参考上方的“计费标准”", "support.wallet.subscription.AI points usage tip": "每次调用 AI 模型时,都会消耗一定的 AI 积分。具体的计算标准可参考上方的“计费标准”",
"support.wallet.subscription.Ai points": "AI 积分计算标准", "support.wallet.subscription.Ai points": "AI 积分计算标准",
...@@ -1224,22 +1224,22 @@ ...@@ -1224,22 +1224,22 @@
"support.wallet.subscription.Upgrade plan": "升级套餐", "support.wallet.subscription.Upgrade plan": "升级套餐",
"support.wallet.subscription.ai_model": "AI语言模型", "support.wallet.subscription.ai_model": "AI语言模型",
"support.wallet.subscription.eval_items_count": "单次评测数据条数: {{count}} 条", "support.wallet.subscription.eval_items_count": "单次评测数据条数: {{count}} 条",
"support.wallet.subscription.function.App registration count": "{{amount}} 个应用备案", "n_app_registration_amount": "{{amount}} 个应用备案",
"support.wallet.subscription.function.Audit log store duration": "{{amount}} 天团队操作日志记录", "n_team_audit_day": "{{amount}} 天团队操作日志记录",
"support.wallet.subscription.function.Custom domain": "{{amount}} 个自定义域名", "n_custom_domain_amount": "{{amount}} 个自定义域名",
"support.wallet.subscription.function.History store": "{{amount}} 天对话记录保留", "n_chat_records_retain": "{{amount}} 天对话记录保留",
"support.wallet.subscription.function.Max app": "{{amount}} 个 Agent", "n_agent_amount": "{{amount}} 个 Agent",
"support.wallet.subscription.function.Max dataset": "{{amount}} 个知识库", "n_dataset_amount": "{{amount}} 个知识库",
"support.wallet.subscription.function.Max dataset size": "{{amount}} 组知识库索引", "n_dataset_size": "{{amount}} 组知识库索引",
"support.wallet.subscription.function.Max members": "{{amount}} 个团队成员", "n_team_members": "{{amount}} 个团队成员",
"support.wallet.subscription.function.Points": "{{amount}} 积分", "n_ai_points": "{{amount}} 积分",
"support.wallet.subscription.function.Requests per minute": "{{amount}} QPM", "n_team_qpm": "{{amount}} QPM",
"support.wallet.subscription.function.Ticket response time": "{{amount}} 小时工单支持响应", "worker_order_support_time": "{{amount}} 小时工单支持响应",
"support.wallet.subscription.function.Community free support": "社区免费支持", "community_support": "社区免费支持",
"support.wallet.subscription.function.Community support tip": "可前往 FastGPT 社区免费获取帮助和技术支持", "support.wallet.subscription.function.Community support tip": "可前往 FastGPT 社区免费获取帮助和技术支持",
"support.wallet.subscription.function.Website sync per dataset": "站点同步最大 {{amount}} 页", "n_website_sync_max_pages": "站点同步最大 {{amount}} 页",
"support.wallet.subscription.function.custom domain tip": "团队可以配置的自定义域名数量,目前可用于接入企微智能机器人", "n_custom_domain_amount tip": "团队可以配置的自定义域名数量,目前可用于接入企微智能机器人",
"support.wallet.subscription.function.qpm tip": "主要指团队每分钟请求 Agent 的最大次数,与单个 Agent 复杂度无关。其他 OpenAPI 接口也受此影响,每个接口单独计算", "qpm_desc": "主要指团队每分钟请求 Agent 的最大次数,与单个 Agent 复杂度无关。其他 OpenAPI 接口也受此影响,每个接口单独计算",
"support.wallet.subscription.mode.Month": "按月", "support.wallet.subscription.mode.Month": "按月",
"support.wallet.subscription.mode.Period": "订阅周期", "support.wallet.subscription.mode.Period": "订阅周期",
"support.wallet.subscription.mode.Year": "按年", "support.wallet.subscription.mode.Year": "按年",
......
...@@ -101,6 +101,7 @@ ...@@ -101,6 +101,7 @@
"add_new": "新增", "add_new": "新增",
"add_new_param": "新增參數", "add_new_param": "新增參數",
"add_success": "新增成功", "add_success": "新增成功",
"aipoint_desc": "每次呼叫 AI 模型時,都會消耗一定的 AI 點數(類似於 Token)。點選可檢視詳細計算規則。",
"all_quotes": "全部引用", "all_quotes": "全部引用",
"all_result": "完整結果", "all_result": "完整結果",
"app_evaluation": "應用評測(Beta)", "app_evaluation": "應用評測(Beta)",
...@@ -209,6 +210,7 @@ ...@@ -209,6 +210,7 @@
"comfirm_leave_page": "確認離開此頁面?", "comfirm_leave_page": "確認離開此頁面?",
"comfirn_create": "確認建立", "comfirn_create": "確認建立",
"commercial_function_tip": "請升級為商業版後使用此功能:https://doc.fastgpt.cn/docs/introduction/commercial/", "commercial_function_tip": "請升級為商業版後使用此功能:https://doc.fastgpt.cn/docs/introduction/commercial/",
"community_support": "社群免費支持",
"comon.Continue_Adding": "繼續新增", "comon.Continue_Adding": "繼續新增",
"compliance.chat": "內容由第三方 AI 產生,無法保證其真實性與準確性,僅供參考。", "compliance.chat": "內容由第三方 AI 產生,無法保證其真實性與準確性,僅供參考。",
"compliance.dataset": "請確保您的內容嚴格遵守相關法律法規,避免包含任何違法或侵權的內容。\n在上傳可能涉及敏感資訊的資料時請務必謹慎。", "compliance.dataset": "請確保您的內容嚴格遵守相關法律法規,避免包含任何違法或侵權的內容。\n在上傳可能涉及敏感資訊的資料時請務必謹慎。",
...@@ -939,6 +941,14 @@ ...@@ -939,6 +941,14 @@
"move.confirm": "確認移動", "move.confirm": "確認移動",
"move_success": "移動成功", "move_success": "移動成功",
"move_to": "移動至", "move_to": "移動至",
"n_agent_amount": "{{amount}} 個 Agent",
"n_ai_points": "{{amount}} 積分",
"n_chat_records_retain": "{{amount}} 天對話紀錄保留",
"n_dataset_amount": "{{amount}} 個知識庫",
"n_dataset_size": "{{amount}} 組知識庫索引",
"n_team_audit_day": "{{amount}} 天團隊操作日誌記錄",
"n_team_members": "{{amount}} 個團隊成員",
"n_team_qpm": "{{amount}} QPM",
"name": "名稱", "name": "名稱",
"name_is_empty": "名稱不能為空", "name_is_empty": "名稱不能為空",
"navbar.Account": "帳戶", "navbar.Account": "帳戶",
...@@ -1038,6 +1048,7 @@ ...@@ -1038,6 +1048,7 @@
"price_over_wx_limit": "超出支付提供商限額:微信支付僅支持 6000 元以下", "price_over_wx_limit": "超出支付提供商限額:微信支付僅支持 6000 元以下",
"prompt_input_placeholder": "請輸入提示詞", "prompt_input_placeholder": "請輸入提示詞",
"psw_inconsistency": "兩次密碼不一致", "psw_inconsistency": "兩次密碼不一致",
"qpm_desc": "主要指團隊每分鐘請求 Agent 的最大次數,與單個 Agent 複雜度無關。\n其他 OpenAPI 接口也受此影響,每個接口單獨計算",
"question_feedback": "工單諮詢", "question_feedback": "工單諮詢",
"read_course": "閱讀教學", "read_course": "閱讀教學",
"read_doc": "閱讀文件", "read_doc": "閱讀文件",
...@@ -1184,7 +1195,6 @@ ...@@ -1184,7 +1195,6 @@
"support.wallet.noBill": "無帳單紀錄", "support.wallet.noBill": "無帳單紀錄",
"support.wallet.no_invoice": "無發票紀錄", "support.wallet.no_invoice": "無發票紀錄",
"support.wallet.subscription.AI points": "AI 點數", "support.wallet.subscription.AI points": "AI 點數",
"support.wallet.subscription.AI points click to read tip": "每次呼叫 AI 模型時,都會消耗一定的 AI 點數(類似於 Token)。點選可檢視詳細計算規則。",
"support.wallet.subscription.AI points usage": "AI 點數使用量", "support.wallet.subscription.AI points usage": "AI 點數使用量",
"support.wallet.subscription.AI points usage tip": "每次呼叫 AI 模型時,都會消耗一定的 AI 點數。具體的計算標準可參考上方的「計費標準」", "support.wallet.subscription.AI points usage tip": "每次呼叫 AI 模型時,都會消耗一定的 AI 點數。具體的計算標準可參考上方的「計費標準」",
"support.wallet.subscription.Ai points": "AI 點數計算標準", "support.wallet.subscription.Ai points": "AI 點數計算標準",
...@@ -1213,20 +1223,10 @@ ...@@ -1213,20 +1223,10 @@
"support.wallet.subscription.Update extra price": "價格", "support.wallet.subscription.Update extra price": "價格",
"support.wallet.subscription.Upgrade plan": "升級方案", "support.wallet.subscription.Upgrade plan": "升級方案",
"support.wallet.subscription.ai_model": "AI 語言模型", "support.wallet.subscription.ai_model": "AI 語言模型",
"support.wallet.subscription.function.Audit log store duration": "{{amount}} 天團隊操作日誌記錄",
"support.wallet.subscription.function.Custom domain": "{{amount}} 個自定義域名",
"support.wallet.subscription.function.History store": "{{amount}} 天對話紀錄保留",
"support.wallet.subscription.function.Max app": "{{amount}} 個 Agent",
"support.wallet.subscription.function.Max dataset": "{{amount}} 個知識庫",
"support.wallet.subscription.function.Max dataset size": "{{amount}} 組知識庫索引",
"support.wallet.subscription.function.Max members": "{{amount}} 個團隊成員",
"support.wallet.subscription.function.Points": "{{amount}} 積分",
"support.wallet.subscription.function.Requests per minute": "{{amount}} QPM",
"support.wallet.subscription.function.Ticket response time": "{{amount}} 小時工單支持響應",
"support.wallet.subscription.function.Community free support": "社群免費支持",
"support.wallet.subscription.function.Community support tip": "可前往 FastGPT 社群免費獲取幫助和技術支持", "support.wallet.subscription.function.Community support tip": "可前往 FastGPT 社群免費獲取幫助和技術支持",
"support.wallet.subscription.function.Website sync per dataset": "單知識庫 {{amount}} 個網頁同步", "n_custom_domain_amount": "{{amount}} 個自定義域名",
"support.wallet.subscription.function.custom domain tip": "團隊可以配置的自定義域名數量,目前可用於接入企微智能機器人", "n_website_sync_max_pages": "單知識庫 {{amount}} 個網頁同步",
"n_custom_domain_amount tip": "團隊可以配置的自定義域名數量,目前可用於接入企微智能機器人",
"support.wallet.subscription.mode.Month": "按月", "support.wallet.subscription.mode.Month": "按月",
"support.wallet.subscription.mode.Period": "訂閱週期", "support.wallet.subscription.mode.Period": "訂閱週期",
"support.wallet.subscription.mode.Year": "按年", "support.wallet.subscription.mode.Year": "按年",
...@@ -1383,6 +1383,7 @@ ...@@ -1383,6 +1383,7 @@
"user_leaved": "已離開", "user_leaved": "已離開",
"value": "值", "value": "值",
"verification": "驗證", "verification": "驗證",
"worker_order_support_time": "{{amount}} 小時工單支持響應",
"xx_search_result": "{{key}} 的搜尋結果", "xx_search_result": "{{key}} 的搜尋結果",
"yes": "是", "yes": "是",
"yesterday": "昨天", "yesterday": "昨天",
......
...@@ -163,7 +163,7 @@ export const FormInputComponent = React.memo(function FormInputComponent({ ...@@ -163,7 +163,7 @@ export const FormInputComponent = React.memo(function FormInputComponent({
}, [submitted, inputForm, savedFormData, appId, outLinkAuthData, setValue]); }, [submitted, inputForm, savedFormData, appId, outLinkAuthData, setValue]);
const formValues = watch(); const formValues = watch();
React.useEffect(() => { useEffect(() => {
if (typeof window !== 'undefined' && chatItemDataId && !submitted) { if (typeof window !== 'undefined' && chatItemDataId && !submitted) {
sessionStorage.setItem(`interactiveForm_${chatItemDataId}`, JSON.stringify(formValues)); sessionStorage.setItem(`interactiveForm_${chatItemDataId}`, JSON.stringify(formValues));
} }
...@@ -227,13 +227,7 @@ export const FormInputComponent = React.memo(function FormInputComponent({ ...@@ -227,13 +227,7 @@ export const FormInputComponent = React.memo(function FormInputComponent({
onChange={onChange} onChange={onChange}
isDisabled={submitted} isDisabled={submitted}
isInvalid={!!error} isInvalid={!!error}
maxLength={input.maxLength}
min={input.min}
max={input.max}
list={input.list}
isRichText={false} isRichText={false}
canLocalUpload={true}
canSelectFile={true}
/> />
{error && <FormErrorMessage>{error.message}</FormErrorMessage>} {error && <FormErrorMessage>{error.message}</FormErrorMessage>}
</FormControl> </FormControl>
......
...@@ -10,6 +10,7 @@ import QuestionTip from '@fastgpt/web/components/common/MyTooltip/QuestionTip'; ...@@ -10,6 +10,7 @@ import QuestionTip from '@fastgpt/web/components/common/MyTooltip/QuestionTip';
import dynamic from 'next/dynamic'; import dynamic from 'next/dynamic';
import type { TeamSubSchema } from '@fastgpt/global/support/wallet/sub/type'; import type { TeamSubSchema } from '@fastgpt/global/support/wallet/sub/type';
import Markdown from '@/components/Markdown'; import Markdown from '@/components/Markdown';
import MyPopover from '@fastgpt/web/components/common/MyPopover';
const ModelPriceModal = dynamic(() => const ModelPriceModal = dynamic(() =>
import('@/components/core/ai/ModelTable').then((mod) => mod.ModelPriceModal) import('@/components/core/ai/ModelTable').then((mod) => mod.ModelPriceModal)
...@@ -74,17 +75,13 @@ const StandardPlanContentList = ({ ...@@ -74,17 +75,13 @@ const StandardPlanContentList = ({
<MyIcon name={'price/right'} w={'16px'} mr={3} /> <MyIcon name={'price/right'} w={'16px'} mr={3} />
<Flex alignItems={'center'}> <Flex alignItems={'center'}>
<Box fontWeight={'bold'} color={'myGray.600'}> <Box fontWeight={'bold'} color={'myGray.600'}>
{t('common:support.wallet.subscription.function.Points', { {t('common:n_ai_points', {
amount: planContent.totalPoints amount: planContent.totalPoints
})} })}
</Box> </Box>
<ModelPriceModal> <ModelPriceModal>
{({ onOpen }) => ( {({ onOpen }) => (
<QuestionTip <QuestionTip ml={1} label={t('common:aipoint_desc')} onClick={onOpen} />
ml={1}
label={t('common:support.wallet.subscription.AI points click to read tip')}
onClick={onOpen}
/>
)} )}
</ModelPriceModal> </ModelPriceModal>
</Flex> </Flex>
...@@ -92,7 +89,7 @@ const StandardPlanContentList = ({ ...@@ -92,7 +89,7 @@ const StandardPlanContentList = ({
<Flex alignItems={'center'}> <Flex alignItems={'center'}>
<MyIcon name={'price/right'} w={'16px'} mr={3} /> <MyIcon name={'price/right'} w={'16px'} mr={3} />
<Box fontWeight={'bold'} color={'myGray.600'}> <Box fontWeight={'bold'} color={'myGray.600'}>
{t('common:support.wallet.subscription.function.Max dataset size', { {t('common:n_dataset_size', {
amount: planContent.maxDatasetSize amount: planContent.maxDatasetSize
})} })}
</Box> </Box>
...@@ -100,7 +97,7 @@ const StandardPlanContentList = ({ ...@@ -100,7 +97,7 @@ const StandardPlanContentList = ({
<Flex alignItems={'center'}> <Flex alignItems={'center'}>
<MyIcon name={'price/right'} w={'16px'} mr={3} /> <MyIcon name={'price/right'} w={'16px'} mr={3} />
<Box color={'myGray.600'}> <Box color={'myGray.600'}>
{t('common:support.wallet.subscription.function.Max members', { {t('common:n_team_members', {
amount: planContent.maxTeamMember amount: planContent.maxTeamMember
})} })}
</Box> </Box>
...@@ -108,7 +105,7 @@ const StandardPlanContentList = ({ ...@@ -108,7 +105,7 @@ const StandardPlanContentList = ({
<Flex alignItems={'center'}> <Flex alignItems={'center'}>
<MyIcon name={'price/right'} w={'16px'} mr={3} /> <MyIcon name={'price/right'} w={'16px'} mr={3} />
<Box color={'myGray.600'}> <Box color={'myGray.600'}>
{t('common:support.wallet.subscription.function.Max app', { {t('common:n_agent_amount', {
amount: planContent.maxAppAmount amount: planContent.maxAppAmount
})} })}
</Box> </Box>
...@@ -116,7 +113,7 @@ const StandardPlanContentList = ({ ...@@ -116,7 +113,7 @@ const StandardPlanContentList = ({
<Flex alignItems={'center'}> <Flex alignItems={'center'}>
<MyIcon name={'price/right'} w={'16px'} mr={3} /> <MyIcon name={'price/right'} w={'16px'} mr={3} />
<Box color={'myGray.600'}> <Box color={'myGray.600'}>
{t('common:support.wallet.subscription.function.Max dataset', { {t('common:n_dataset_amount', {
amount: planContent.maxDatasetAmount amount: planContent.maxDatasetAmount
})} })}
</Box> </Box>
...@@ -124,7 +121,7 @@ const StandardPlanContentList = ({ ...@@ -124,7 +121,7 @@ const StandardPlanContentList = ({
<Flex alignItems={'center'}> <Flex alignItems={'center'}>
<MyIcon name={'price/right'} w={'16px'} mr={3} /> <MyIcon name={'price/right'} w={'16px'} mr={3} />
<Box color={'myGray.600'}> <Box color={'myGray.600'}>
{t('common:support.wallet.subscription.function.History store', { {t('common:n_chat_records_retain', {
amount: planContent.chatHistoryStoreDuration amount: planContent.chatHistoryStoreDuration
})} })}
</Box> </Box>
...@@ -133,7 +130,7 @@ const StandardPlanContentList = ({ ...@@ -133,7 +130,7 @@ const StandardPlanContentList = ({
<Flex alignItems={'center'}> <Flex alignItems={'center'}>
<MyIcon name={'price/right'} w={'16px'} mr={3} /> <MyIcon name={'price/right'} w={'16px'} mr={3} />
<Box color={'myGray.600'}> <Box color={'myGray.600'}>
{t('common:support.wallet.subscription.function.Audit log store duration', { {t('common:n_team_audit_day', {
amount: planContent.auditLogStoreDuration amount: planContent.auditLogStoreDuration
})} })}
</Box> </Box>
...@@ -142,17 +139,17 @@ const StandardPlanContentList = ({ ...@@ -142,17 +139,17 @@ const StandardPlanContentList = ({
<Flex alignItems={'center'}> <Flex alignItems={'center'}>
<MyIcon name={'price/right'} w={'16px'} mr={3} /> <MyIcon name={'price/right'} w={'16px'} mr={3} />
<Box color={'myGray.600'}> <Box color={'myGray.600'}>
{t('common:support.wallet.subscription.function.Requests per minute', { {t('common:n_team_qpm', {
amount: planContent.requestsPerMinute amount: planContent.requestsPerMinute
})} })}
</Box> </Box>
<QuestionTip ml={1} label={t('common:support.wallet.subscription.function.qpm tip')} /> <QuestionTip ml={1} label={t('common:qpm_desc')} />
</Flex> </Flex>
{!!planContent.websiteSyncPerDataset && ( {!!planContent.websiteSyncPerDataset && (
<Flex alignItems={'center'}> <Flex alignItems={'center'}>
<MyIcon name={'price/right'} w={'16px'} mr={3} /> <MyIcon name={'price/right'} w={'16px'} mr={3} />
<Box fontWeight={'bold'} color={'myGray.600'}> <Box fontWeight={'bold'} color={'myGray.600'}>
{t('common:support.wallet.subscription.function.Website sync per dataset', { {t('common:n_website_sync_max_pages', {
amount: planContent.websiteSyncPerDataset amount: planContent.websiteSyncPerDataset
})} })}
</Box> </Box>
...@@ -162,27 +159,35 @@ const StandardPlanContentList = ({ ...@@ -162,27 +159,35 @@ const StandardPlanContentList = ({
<MyIcon name={'price/right'} w={'16px'} mr={3} /> <MyIcon name={'price/right'} w={'16px'} mr={3} />
<Box color={'myGray.600'}> <Box color={'myGray.600'}>
{planContent.ticketResponseTime {planContent.ticketResponseTime
? t('common:support.wallet.subscription.function.Ticket response time', { ? t('common:worker_order_support_time', {
amount: planContent.ticketResponseTime amount: planContent.ticketResponseTime
}) })
: t('common:support.wallet.subscription.function.Community free support')} : t('common:community_support')}
</Box> </Box>
{!planContent.ticketResponseTime && subPlans?.communitySupportTip && ( {subPlans?.communitySupportTip && (
<QuestionTip <MyPopover
ml={1} trigger="hover"
label={ placement="bottom"
<Box maxW="300px"> offset={[0, 10]}
Trigger={
<Flex alignItems={'center'}>
<MyIcon name={'help' as any} w={'16px'} color={'myGray.500'} ml={1} />
</Flex>
}
>
{({ onClose }) => (
<Box maxW="300px" p={3}>
<Markdown source={subPlans.communitySupportTip} /> <Markdown source={subPlans.communitySupportTip} />
</Box> </Box>
} )}
/> </MyPopover>
)} )}
</Flex> </Flex>
{!!planContent.appRegistrationCount && ( {!!planContent.appRegistrationCount && (
<Flex alignItems={'center'}> <Flex alignItems={'center'}>
<MyIcon name={'price/right'} w={'16px'} mr={3} /> <MyIcon name={'price/right'} w={'16px'} mr={3} />
<Box color={'myGray.600'}> <Box color={'myGray.600'}>
{t('common:support.wallet.subscription.function.App registration count', { {t('common:n_app_registration_amount', {
amount: planContent.appRegistrationCount amount: planContent.appRegistrationCount
})} })}
</Box> </Box>
...@@ -192,14 +197,11 @@ const StandardPlanContentList = ({ ...@@ -192,14 +197,11 @@ const StandardPlanContentList = ({
<Flex alignItems={'center'}> <Flex alignItems={'center'}>
<MyIcon name={'price/right'} w={'16px'} mr={3} /> <MyIcon name={'price/right'} w={'16px'} mr={3} />
<Box color={'myGray.600'}> <Box color={'myGray.600'}>
{t('common:support.wallet.subscription.function.Custom domain', { {t('common:n_custom_domain_amount', {
amount: planContent.customDomain amount: planContent.customDomain
})} })}
</Box> </Box>
<QuestionTip <QuestionTip ml={1} label={t('common:n_custom_domain_amount tip')} />
ml={1}
label={t('common:support.wallet.subscription.function.custom domain tip')}
/>
</Flex> </Flex>
)} )}
</Grid> </Grid>
......
...@@ -47,6 +47,7 @@ import { useMemoEnhance } from '@fastgpt/web/hooks/useMemoEnhance'; ...@@ -47,6 +47,7 @@ import { useMemoEnhance } from '@fastgpt/web/hooks/useMemoEnhance';
import { formatTime2YMDHMS } from '@fastgpt/global/common/string/time'; import { formatTime2YMDHMS } from '@fastgpt/global/common/string/time';
import type { SelectedDatasetType } from '@fastgpt/global/core/workflow/type/io'; import type { SelectedDatasetType } from '@fastgpt/global/core/workflow/type/io';
import { FileTypeSelectorPanel } from '@fastgpt/web/components/core/app/FileTypeSelector'; import { FileTypeSelectorPanel } from '@fastgpt/web/components/core/app/FileTypeSelector';
import InputSlider from '@fastgpt/web/components/common/MySlider/InputSlider';
const InputTypeConfig = ({ const InputTypeConfig = ({
form, form,
...@@ -118,15 +119,15 @@ const InputTypeConfig = ({ ...@@ -118,15 +119,15 @@ const InputTypeConfig = ({
? defaultValue?.[1] ? defaultValue?.[1]
: undefined; : undefined;
const maxFiles = watch('maxFiles'); const maxFiles = watch('maxFiles') ?? 5;
const maxSelectFiles = Math.min(feConfigs?.uploadFileMaxAmount ?? 20, 50); const maxSelectFiles = Math.min(feConfigs?.uploadFileMaxAmount ?? 20, 50);
const canSelectFile = watch('canSelectFile'); const canSelectFile = watch('canSelectFile') ?? true;
const canSelectImg = watch('canSelectImg'); const canSelectImg = watch('canSelectImg');
const canSelectVideo = watch('canSelectVideo'); const canSelectVideo = watch('canSelectVideo');
const canSelectAudio = watch('canSelectAudio'); const canSelectAudio = watch('canSelectAudio');
const canSelectCustomFileExtension = watch('canSelectCustomFileExtension'); const canSelectCustomFileExtension = watch('canSelectCustomFileExtension');
const customFileExtensionList = watch('customFileExtensionList'); const customFileExtensionList = watch('customFileExtensionList');
const canLocalUpload = watch('canLocalUpload'); const canLocalUpload = watch('canLocalUpload') ?? true;
const canUrlUpload = watch('canUrlUpload'); const canUrlUpload = watch('canUrlUpload');
const { const {
...@@ -265,15 +266,15 @@ const InputTypeConfig = ({ ...@@ -265,15 +266,15 @@ const InputTypeConfig = ({
commonData.customInputConfig = data.customInputConfig; commonData.customInputConfig = data.customInputConfig;
break; break;
case FlowNodeInputTypeEnum.fileSelect: case FlowNodeInputTypeEnum.fileSelect:
commonData.canSelectFile = data.canSelectFile; commonData.canLocalUpload = data.canLocalUpload ?? true;
commonData.canUrlUpload = data.canUrlUpload;
commonData.canSelectFile = data.canSelectFile ?? true;
commonData.canSelectImg = data.canSelectImg; commonData.canSelectImg = data.canSelectImg;
commonData.canSelectVideo = data.canSelectVideo; commonData.canSelectVideo = data.canSelectVideo;
commonData.canSelectAudio = data.canSelectAudio; commonData.canSelectAudio = data.canSelectAudio;
commonData.canSelectCustomFileExtension = data.canSelectCustomFileExtension; commonData.canSelectCustomFileExtension = data.canSelectCustomFileExtension;
commonData.customFileExtensionList = data.customFileExtensionList; commonData.customFileExtensionList = data.customFileExtensionList;
commonData.canLocalUpload = data.canLocalUpload; commonData.maxFiles = data.maxFiles ?? 5;
commonData.canUrlUpload = data.canUrlUpload;
commonData.maxFiles = data.maxFiles;
break; break;
case FlowNodeInputTypeEnum.timePointSelect: case FlowNodeInputTypeEnum.timePointSelect:
case FlowNodeInputTypeEnum.timeRangeSelect: case FlowNodeInputTypeEnum.timeRangeSelect:
...@@ -886,36 +887,7 @@ const InputTypeConfig = ({ ...@@ -886,36 +887,7 @@ const InputTypeConfig = ({
{(inputType === FlowNodeInputTypeEnum.fileSelect || {(inputType === FlowNodeInputTypeEnum.fileSelect ||
inputType === VariableInputEnum.file) && ( inputType === VariableInputEnum.file) && (
<> <>
<Box alignItems={'flex-start'}> <Flex alignItems={'center'}>
<FormLabel fontWeight={'medium'}>{t('app:upload_file_extension_types')}</FormLabel>
<Stack
w="full"
spacing={3}
alignItems={'flex-start'}
border="1px solid"
borderColor="myGray.200"
borderRadius="md"
p={4}
mt={2}
>
<FileTypeSelectorPanel
value={{
canSelectFile: canSelectFile,
canSelectImg: canSelectImg,
canSelectVideo: canSelectVideo,
canSelectAudio: canSelectAudio,
canSelectCustomFileExtension: canSelectCustomFileExtension,
customFileExtensionList: customFileExtensionList
}}
onChange={(newValue) => {
Object.entries(newValue).forEach(([key, val]) => {
setValue(key as any, val);
});
}}
/>
</Stack>
</Box>
<Flex alignItems={'flex-start'} minH={'40px'}>
<FormLabel flex={'0 0 132px'} fontWeight={'medium'}> <FormLabel flex={'0 0 132px'} fontWeight={'medium'}>
{t('app:upload_method')} {t('app:upload_method')}
</FormLabel> </FormLabel>
...@@ -927,7 +899,7 @@ const InputTypeConfig = ({ ...@@ -927,7 +899,7 @@ const InputTypeConfig = ({
border={'1px solid'} border={'1px solid'}
borderColor={'myGray.200'} borderColor={'myGray.200'}
borderRadius={'md'} borderRadius={'md'}
isChecked={canLocalUpload ?? true} isChecked={canLocalUpload}
onChange={(e) => setValue('canLocalUpload', e.target.checked)} onChange={(e) => setValue('canLocalUpload', e.target.checked)}
> >
<Box fontSize={'sm'}>{t('app:local_upload')}</Box> <Box fontSize={'sm'}>{t('app:local_upload')}</Box>
...@@ -946,28 +918,52 @@ const InputTypeConfig = ({ ...@@ -946,28 +918,52 @@ const InputTypeConfig = ({
</Checkbox> </Checkbox>
</Grid> </Grid>
</Flex> </Flex>
<Box> <Flex alignItems={'center'}>
<HStack> <HStack flex={'0 0 132px'} gap={1}>
<FormLabel fontWeight={'medium'}>{t('app:upload_file_max_amount')}</FormLabel> <FormLabel fontWeight={'medium'}>{t('app:upload_file_max_amount')}</FormLabel>
<QuestionTip label={t('app:upload_file_max_amount_tip')} /> <QuestionTip label={t('app:upload_file_max_amount_tip')} />
</HStack> </HStack>
<Box mt={5}> <Box flex={'1 0 0'}>
<MySlider <InputSlider
markList={[
{ label: '1', value: 1 },
{ label: `${maxSelectFiles}`, value: maxSelectFiles }
]}
width={'100%'}
min={1} min={1}
max={maxSelectFiles} max={maxSelectFiles}
step={1} step={1}
value={maxFiles ?? 5} value={maxFiles}
onChange={(e) => { onChange={(val) => {
setValue('maxFiles', e); setValue('maxFiles', val);
}} }}
/> />
</Box> </Box>
</Flex>
<Box alignItems={'flex-start'}>
<FormLabel fontWeight={'medium'}>{t('app:upload_file_extension_types')}</FormLabel>
<Stack
w="full"
spacing={3}
alignItems={'flex-start'}
border="1px solid"
borderColor="myGray.200"
borderRadius="md"
p={4}
mt={2}
>
<FileTypeSelectorPanel
value={{
canSelectFile: canSelectFile,
canSelectImg: canSelectImg,
canSelectVideo: canSelectVideo,
canSelectAudio: canSelectAudio,
canSelectCustomFileExtension: canSelectCustomFileExtension,
customFileExtensionList: customFileExtensionList
}}
onChange={(newValue) => {
Object.entries(newValue).forEach(([key, val]) => {
setValue(key as any, val);
});
}}
/>
</Stack>
</Box> </Box>
</> </>
)} )}
......
...@@ -135,8 +135,6 @@ const RenderInput = ({ flowInputList, nodeId, CustomComponent, mb = 5 }: Props) ...@@ -135,8 +135,6 @@ const RenderInput = ({ flowInputList, nodeId, CustomComponent, mb = 5 }: Props)
if (!RenderItem) return null; if (!RenderItem) return null;
console.log(renderType, input);
return { return {
Component: ( Component: (
<RenderItem.Component inputs={filterProInputs} item={input} nodeId={nodeId} /> <RenderItem.Component inputs={filterProInputs} item={input} nodeId={nodeId} />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment