Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

var-picker not update when edges change in node panel #8258

Closed
5 tasks done
HiChen404 opened this issue Sep 11, 2024 · 2 comments
Closed
5 tasks done

var-picker not update when edges change in node panel #8258

HiChen404 opened this issue Sep 11, 2024 · 2 comments
Assignees
Labels
🐞 bug Something isn't working

Comments

@HiChen404
Copy link
Contributor

Self Checks

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

Dify version

0.8.0

Cloud or Self Hosted

Cloud

Steps to reproduce

When focusing on a node and changing the connection, the variables in the var-picker will not be updated to the latest.

dify.workflow.var.not.update.mp4

✔️ Expected Behavior

var list updated to the latest when connected edges change.

❌ Actual Behavior

Refresh only when switching node panel.

@dosubot dosubot bot added the 🐞 bug Something isn't working label Sep 11, 2024
Copy link

dosubot bot commented Sep 11, 2024

Hey @HiChen404! 👋 I'm here to help you with bug fixes, questions, and more while you wait for a human maintainer. Let's squash those bugs together!

The var-picker does not update when edges change in the node panel in Dify version 0.8.0 because the current implementation lacks logic to update the var-picker when edges are modified. The existing code handles various node interactions but does not include functionality to update the var-picker based on edge changes [1].

To resolve this issue, you need to add logic to update the var-picker whenever edges are changed. This could involve adding a function that specifically updates the var-picker and calling it within the relevant edge-handling functions. The useEdgesInteractions hook includes functions like handleEdgesChange that manage edge interactions and could be extended to trigger updates to the var-picker [2].

Additionally, leveraging the event emitter context (useEventEmitterContextContext) could help trigger updates to the var-picker by subscribing to relevant events and dispatching commands accordingly [3].

To continue talking to Dosu, mention @dosu.

@iamjoel
Copy link
Collaborator

iamjoel commented Sep 13, 2024

Fixed: #8259

@iamjoel iamjoel closed this as completed Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants