How to fold the thinking process of difyintelligent assistant #12366

Closed
opened 2026-02-21 19:07:05 -05:00 by yindo · 3 comments
Owner

Originally created by @Tu1231 on GitHub (Mar 30, 2025).

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

1.1.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When I was chatting with the intelligent assistant, I encountered [ENDTHINKWING] which folds up the thinking content and can also open the folded content to display the thinking process. I don't know how to operate it[ENDTHINKFLAG]

✔️ Expected Behavior

Display that folding can fold the thinking process

Actual Behavior

no Display that folding can fold the thinking process

Originally created by @Tu1231 on GitHub (Mar 30, 2025). ### 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 1.1.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When I was chatting with the intelligent assistant, I encountered [ENDTHINKWING] which folds up the thinking content and can also open the folded content to display the thinking process. I don't know how to operate it[ENDTHINKFLAG] ### ✔️ Expected Behavior Display that folding can fold the thinking process ### ❌ Actual Behavior no Display that folding can fold the thinking process
yindo closed this issue 2026-02-21 19:07:05 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 30, 2025):

I found some relevant information regarding the folding and unfolding of the thinking process in the Dify intelligent assistant. The ThinkBlock component is responsible for rendering the folded and unfolded thinking process in the chat interface. It uses a <details> HTML element to manage this behavior, and it checks for a specific flag ([ENDTHINKFLAG]) to determine when the thinking process is complete and updates the display accordingly [1].

However, there is no specific mention of the [ENDTHINKWING] marker in the available documentation, so its purpose cannot be determined from the given context [1].

If you are experiencing issues with the folding behavior not displaying as expected, it might be related to a known issue in version 1.1.2 where multiple 'thinking...' responses persist, indicating that a verified fix is not yet available [2]. You might want to check if this issue persists in version 1.1.3 or if there are any updates or patches available.

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 (Mar 30, 2025): <!-- Answer --> I found some relevant information regarding the folding and unfolding of the thinking process in the Dify intelligent assistant. The `ThinkBlock` component is responsible for rendering the folded and unfolded thinking process in the chat interface. It uses a `<details>` HTML element to manage this behavior, and it checks for a specific flag (`[ENDTHINKFLAG]`) to determine when the thinking process is complete and updates the display accordingly <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/app/components/base/markdown-blocks/think-block.tsx)</sup>. However, there is no specific mention of the `[ENDTHINKWING]` marker in the available documentation, so its purpose cannot be determined from the given context <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/app/components/base/markdown-blocks/think-block.tsx)</sup>. If you are experiencing issues with the folding behavior not displaying as expected, it might be related to a known issue in version 1.1.2 where multiple 'thinking...' responses persist, indicating that a verified fix is not yet available <sup>[[2]](https://github.com/langgenius/dify/issues/17000)</sup>. You might want to check if this issue persists in version 1.1.3 or if there are any updates or patches available. <!-- 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/ff076eed-262b-4b88-b18b-71ace58524da?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/ff076eed-262b-4b88-b18b-71ace58524da?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/ff076eed-262b-4b88-b18b-71ace58524da?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/ff076eed-262b-4b88-b18b-71ace58524da?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ff076eed-262b-4b88-b18b-71ace58524da?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/ff076eed-262b-4b88-b18b-71ace58524da?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/ff076eed-262b-4b88-b18b-71ace58524da?feedback_type=other)</sup>
Author
Owner
@crazywoola commented on GitHub (Mar 31, 2025): https://github.com/langgenius/dify/blob/41dff175b3f9a98c5bf795315b5937de074a41ed/CONTRIBUTING.md#L23-L33
Author
Owner

@sunisstar commented on GitHub (Apr 10, 2025):

sometimes, when using qwq-32b as the model, dify will output the thought content as a part of answer. I've checked the output content and found it has the closing tag </think> without the opening tag <think>. then dify regards it as answer.
my dify version is 1.1.3, self-hosted.
@crazywoola

@sunisstar commented on GitHub (Apr 10, 2025): sometimes, when using qwq-32b as the model, dify will output the thought content as a part of answer. I've checked the output content and found it has the closing tag `</think>` without the opening tag `<think>`. then dify regards it as answer. my dify version is 1.1.3, self-hosted. @crazywoola
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12366