diff --git a/web/src/views/Workflow/components/Properties/ToolConfig/index.tsx b/web/src/views/Workflow/components/Properties/ToolConfig/index.tsx
index 8ae3cd4d..7857eb23 100644
--- a/web/src/views/Workflow/components/Properties/ToolConfig/index.tsx
+++ b/web/src/views/Workflow/components/Properties/ToolConfig/index.tsx
@@ -1,4 +1,4 @@
-import { type FC, useEffect, useState } from "react";
+import { type FC, useEffect, useState, useMemo } from "react";
import { useTranslation } from 'react-i18next'
import { Form, Select, InputNumber, Switch, Cascader, type CascaderProps, Tooltip } from 'antd'
import type { Suggestion } from '../../Editor/plugin/AutocompletePlugin'
@@ -163,6 +163,24 @@ const ToolConfig: FC<{ options: Suggestion[]; }> = ({
form.setFieldsValue(inititalValue)
}
+ const getNumberOptions = useMemo(() => {
+ const list: Suggestion[] = []
+
+ options.forEach(vo => {
+ if (vo.children && vo?.children?.length > 0) {
+ const filterChild = vo.children.filter(child => child.dataType === 'number')
+
+ if (filterChild.length > 0) {
+ list.push({ ...vo, children: filterChild })
+ } else {
+ list.push({ ...vo, children: [] })
+ }
+ } else {
+ list.push({ ...vo })
+ }
+ })
+ return list
+ }, [options])
return (
<>
@@ -202,15 +220,14 @@ const ToolConfig: FC<{ options: Suggestion[]; }> = ({
: parameter.type === 'boolean'
?
: parameter.type === 'integer' || parameter.type === 'number'
- ? form.setFieldValue(['tool_parameters', parameter.name], value)}
- />
+ ?
: