dify icon indicating copy to clipboard operation
dify copied to clipboard

When the tool input of the custom workflow tool is of select type and this tool is referenced in other workflows, the selected parameter is abnormal.

Open kkjinping opened this issue 1 year ago • 1 comments

Self Checks

  • [X] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [X] I have searched for existing issues search for existing issues, including closed ones.
  • [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [X] Please do not modify this template :) and fill in all the required fields.

Dify version

0.10.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When the tool input of the custom workflow tool is of select type and this tool is referenced in other workflows, the selected parameter is abnormal.

1.When the tool input is Parameter method, the selected parameter cannot be remembered. 2.When the tool input is Setting method filled in and the first one is selected, the input seen in tracking is inconsistent with the actual situation.

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

kkjinping avatar Oct 20 '24 11:10 kkjinping

The issue you're experiencing with the custom workflow tool's select type input parameter seems to involve two main problems:

  1. Parameter Method: The selected parameter is not being remembered when the tool is referenced in other workflows. This could be related to how the tool handles parameter selection and memory. The tool uses functions like handleExactParamsChange to manage parameter changes, which might not be updating the state correctly when referenced in other workflows [1].

  2. Setting Method: When the first option is selected, the second one is actually being chosen. This might be related to the mechanism that ensures the correct option is selected, which involves displaying a checkmark icon next to the selected option. There might be an issue with how the selection index is managed, possibly involving the onClick event handler that manages the index of selected options [2][3].

To address these issues, you might want to check the implementation of the handleExactParamsChange function and the onClick event handler to ensure they are correctly updating and managing the selected parameters and indices.

To continue talking to Dosu, mention @dosu.

dosubot[bot] avatar Oct 20 '24 11:10 dosubot[bot]