fix(web): add tool_id required check list
This commit is contained in:
@@ -2564,6 +2564,7 @@ Memory Bear: After the rebellion, regional warlordism intensified for several re
|
||||
'jinja-render.template': 'Template',
|
||||
'document-extractor.file_selector': 'File variable',
|
||||
'list-operator.input_list': 'Input list',
|
||||
'tool.tool_id': 'Tool',
|
||||
},
|
||||
checkListHasErrors: 'Please resolve all issues in the checklist before publishing',
|
||||
variableSelect: {
|
||||
|
||||
@@ -2528,6 +2528,7 @@ export const zh = {
|
||||
'jinja-render.template': '模板',
|
||||
'document-extractor.file_selector': '文件变量',
|
||||
'list-operator.input_list': '输入变量',
|
||||
'tool.tool_id': '工具',
|
||||
},
|
||||
checkListHasErrors: '发布前确认检查清单中所有问题均已解决',
|
||||
variableSelect: {
|
||||
|
||||
@@ -147,6 +147,11 @@ const ToolConfig: FC<{ options: Suggestion[]; }> = ({
|
||||
};
|
||||
|
||||
const handleChange: CascaderProps<Option>['onChange'] = (value, selectedOptions) => {
|
||||
if (!value) {
|
||||
setParameters([])
|
||||
form.resetFields()
|
||||
return
|
||||
}
|
||||
const targetOption = selectedOptions[selectedOptions.length - 1];
|
||||
const curParameters = [...(targetOption.parameters ?? [])]
|
||||
setParameters([...curParameters])
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: ZhaoYing
|
||||
* @Date: 2026-02-03 15:06:18
|
||||
* @Last Modified by: ZhaoYing
|
||||
* @Last Modified time: 2026-04-20 11:39:40
|
||||
* @Last Modified time: 2026-04-20 14:36:41
|
||||
*/
|
||||
import LoopNode from './components/Nodes/LoopNode';
|
||||
import NormalNode from './components/Nodes/NormalNode';
|
||||
@@ -428,7 +428,8 @@ export const nodeLibrary: NodeLibrary[] = [
|
||||
{ type: "tool", icon: 'rb:bg-[url("@/assets/images/workflow/tools.svg")]',
|
||||
config: {
|
||||
tool_id: {
|
||||
type: 'cascader'
|
||||
type: 'cascader',
|
||||
required: true
|
||||
},
|
||||
tool_parameters: {
|
||||
type: 'define'
|
||||
|
||||
Reference in New Issue
Block a user