dify icon indicating copy to clipboard operation
dify copied to clipboard

Preview with show PROMPT LOG at the same time

Open lingfengchencn opened this issue 10 months ago • 1 comments

Self Checks

  • [X] This is only for bug report, if you would like to ask a quesion, 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] Pleas do not modify this template :) and fill in all the required fields.

Dify version

0.6.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

1、goto a appllication history and the it's Prompt log: image

2、just go to studio (need click twice) 3、goto a workflow application, 4. click preview image

✔️ Expected Behavior

close "PROMPT LOG" after leave history log

❌ Actual Behavior

No response

lingfengchencn avatar Apr 10 '24 07:04 lingfengchencn

Hey there @lingfengchencn! Great to see you around here again. Hope you're doing well.

It seems like the issue with the "PROMPT LOG" not closing as expected in Dify version 0.6.0 might be related to how the onCancel function is implemented or called in the parent component. The PromptLogModal relies on this function to manage its visibility. If the onCancel function isn't correctly changing the state or if there's a state management issue, the modal might not close as expected.

To address this, you should check:

  • The definition and actions performed by the onCancel prop. It should alter a state or context that controls the modal's visibility.
  • The correct re-rendering or removal of the modal from the DOM upon state or context change triggered by onCancel.
  • Any conditional renderings or CSS styles that could affect the modal's visibility.

For a more detailed investigation, reviewing the PromptLogModal usage within the application, especially how the onCancel function is defined and the state management around the modal's visibility, is crucial.

If the problem persists, providing more details about how the onCancel function is implemented and any specific error messages or console logs when the issue occurs would be very helpful for further assistance.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

dosubot[bot] avatar Apr 10 '24 07:04 dosubot[bot]

It should be fixed in latest version.

crazywoola avatar Apr 24 '24 08:04 crazywoola