diff --git a/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/tool-picker-block.tsx b/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/tool-picker-block.tsx index ae05afd742..c85aded6b2 100644 --- a/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/tool-picker-block.tsx +++ b/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/tool-picker-block.tsx @@ -46,7 +46,7 @@ const ToolPickerBlock: FC = ({ scope = 'all' }) => { tools.forEach((tool, index) => { nodes.push( $createToolBlockNode({ - provider: tool.provider_name, + provider: tool.provider_id, // TODO: not sure use which tool.plugin_id ask tool: tool.tool_name, configId: uuid(), label: tool.tool_label, @@ -104,8 +104,8 @@ const ToolPickerBlock: FC = ({ scope = 'all' }) => { return ( {}} - onQueryChange={() => {}} + onSelectOption={() => { }} + onQueryChange={() => { }} menuRenderFn={renderMenu} triggerFn={checkForTriggerMatch} anchorClassName="z-[999999] translate-y-[calc(-100%-3px)]" diff --git a/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/utils.ts b/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/utils.ts index bca36d0a18..6c00ce42f5 100644 --- a/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/utils.ts +++ b/web/app/components/workflow/skill/editor/skill-editor/plugins/tool-block/utils.ts @@ -1,9 +1,9 @@ export const getToolTokenRegexString = (): string => { - return '§tool\\.[a-zA-Z0-9_-]+\\.[a-zA-Z0-9_-]+\\.[a-fA-F0-9-]{36}§' + return '§tool\\.[a-zA-Z0-9_-]+(?:\\/[a-zA-Z0-9_-]+)*\\.[a-zA-Z0-9_-]+\\.[a-fA-F0-9-]{36}§' } export const parseToolToken = (text: string) => { - const match = /^§tool\.([\w-]+)\.([\w-]+)\.([a-fA-F0-9-]{36})§$/.exec(text) + const match = /^§tool\.([\w-]+(?:\/[\w-]+)*)\.([\w-]+)\.([a-fA-F0-9-]{36})§$/.exec(text) if (!match) return null return {