The "Reset Conversation" button under "Embedding in Websites" causes the input values to become invalid. #8363

Closed
opened 2026-02-21 18:25:15 -05:00 by yindo · 5 comments
Owner

Originally created by @suntao2015005848 on GitHub (Feb 18, 2025).

Originally assigned to: @crazywoola on GitHub.

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.15.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When I pass the user name through the inputs tag:

javascript

window.difyChatbotConfig = {
  token: "xxx",
  dynamicScript: true,
  // draggable: true,
  inputs: {
    "你好": "${userName}"
  }
};

After passing the name parameter, the user name is successfully displayed in the input field when the chat bubble button is opened for the first time. However, after interacting in the chat window and clicking the "Reset Chat" button, the passed user name ("你好": "${userName}") no longer works and is not displayed.
Step 1: Open the chat bubble.

Image

Step 2: Engage in conversation.

Image

Step 3: Click the reset button in the top right corner.

Image

✔️ Expected Behavior

Image

Actual Behavior

Image

Originally created by @suntao2015005848 on GitHub (Feb 18, 2025). Originally assigned to: @crazywoola on GitHub. ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.15.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When I pass the user name through the inputs tag: javascript ``` window.difyChatbotConfig = { token: "xxx", dynamicScript: true, // draggable: true, inputs: { "你好": "${userName}" } }; ``` After passing the name parameter, the user name is successfully displayed in the input field when the chat bubble button is opened for the first time. However, after interacting in the chat window and clicking the "Reset Chat" button, the passed user name ("你好": "${userName}") no longer works and is not displayed. Step 1: Open the chat bubble. ![Image](https://github.com/user-attachments/assets/a78ee514-2c88-4833-9168-07e2bef3f4c0) Step 2: Engage in conversation. ![Image](https://github.com/user-attachments/assets/bb1a0c8a-2425-475f-9949-edf7ef5d9fb3) Step 3: Click the reset button in the top right corner. ![Image](https://github.com/user-attachments/assets/ea90fd1e-2b48-4784-a57c-71a0a56bc367) ### ✔️ Expected Behavior ![Image](https://github.com/user-attachments/assets/a78ee514-2c88-4833-9168-07e2bef3f4c0) ### ❌ Actual Behavior ![Image](https://github.com/user-attachments/assets/ea90fd1e-2b48-4784-a57c-71a0a56bc367)
yindo added the 🐞 buggood first issue labels 2026-02-21 18:25:15 -05:00
yindo closed this issue 2026-02-21 18:25:15 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 18, 2025):

Hello @suntao2015005848! 👋 I'm here to help you with any bugs, questions, or contributions you have for Dify. Let's squash those bugs together!

I found a similar open issue regarding input parameters being lost after clicking "Reset Conversation" in the Dify chatbot. The suggested solution is to modify the handleRestart function or related logic to ensure that the input parameters are reapplied when the conversation is reset. This could involve storing the initial input parameters in a persistent state or variable that is not cleared during the reset process and then reapplying them when initializing the new session [1].

Additionally, the current implementation of the handleRestart function resets various states, which might be causing the input parameters to be lost. You might need to adjust this function to preserve and reapply the input parameters after a reset [2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Feb 18, 2025): <!-- Greeting --> Hello @suntao2015005848! 👋 I'm here to help you with any bugs, questions, or contributions you have for Dify. Let's squash those bugs together! <!-- Answer --> I found a similar open issue regarding input parameters being lost after clicking "Reset Conversation" in the Dify chatbot. The suggested solution is to modify the `handleRestart` function or related logic to ensure that the input parameters are reapplied when the conversation is reset. This could involve storing the initial input parameters in a persistent state or variable that is not cleared during the reset process and then reapplying them when initializing the new session <sup>[[1]](https://github.com/langgenius/dify/issues/11366)</sup>. Additionally, the current implementation of the `handleRestart` function resets various states, which might be causing the input parameters to be lost. You might need to adjust this function to preserve and reapply the input parameters after a reset <sup>[[2]](https://github.com/langgenius/dify/blob/main/web/app/components/base/chat/chat/hooks.ts)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/e7c7f47c-a5a9-40d6-b441-3bd6cafd80f0?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/e7c7f47c-a5a9-40d6-b441-3bd6cafd80f0?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/e7c7f47c-a5a9-40d6-b441-3bd6cafd80f0?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/e7c7f47c-a5a9-40d6-b441-3bd6cafd80f0?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/e7c7f47c-a5a9-40d6-b441-3bd6cafd80f0?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/e7c7f47c-a5a9-40d6-b441-3bd6cafd80f0?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/e7c7f47c-a5a9-40d6-b441-3bd6cafd80f0?feedback_type=other)</sup>
Author
Owner

@shubham88fru commented on GitHub (Feb 18, 2025):

@crazywoola - are you working on this issue? If not, I can look into it. Thanks.

@shubham88fru commented on GitHub (Feb 18, 2025): @crazywoola - are you working on this issue? If not, I can look into it. Thanks.
Author
Owner

@crazywoola commented on GitHub (Feb 19, 2025):

@crazywoola - are you working on this issue? If not, I can look into it. Thanks.

Not yet, haven't got time to working on it, just had a rough glance at it.

@crazywoola commented on GitHub (Feb 19, 2025): > [@crazywoola](https://github.com/crazywoola) - are you working on this issue? If not, I can look into it. Thanks. Not yet, haven't got time to working on it, just had a rough glance at it.
Author
Owner

@suntao2015005848 commented on GitHub (Feb 21, 2025):

@crazywoola so has this problem been solved or it has a workaround? thanks。

@suntao2015005848 commented on GitHub (Feb 21, 2025): @crazywoola so has this problem been solved or it has a workaround? thanks。
Author
Owner

@suntao2015005848 commented on GitHub (Mar 7, 2025):

May I ask when will this bug be fixed?

@suntao2015005848 commented on GitHub (Mar 7, 2025): May I ask when will this bug be fixed?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8363