[PR #7661] feat: regenerate in Chat, agent and Chatflow app #25787

Closed
opened 2026-02-21 20:25:42 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/7661

State: closed
Merged: Yes


Description

Fixes #7161

Support mode: Chatbot, Agent and Chatflow mode

  1. The regenerate button can be accessed via

    • In explore page, i.e. installed App
    • Single debug view
    • Web app
    • Embedded app
  2. The regenerate button won't be displayed in

    • Multiple debug view
    • Log view
    • Chatflow's chat record view
  3. Completion and Workflow mode should not be affected by this PR.

  4. All sent messages in Chatbot, Agent and Chatflow have parent_message_id field now for future considerations (important for implementing branched chat history tree).

Demonstration

  1. Agent mode, accessed via Explore page:

https://github.com/user-attachments/assets/b505fe7e-a2d1-4fa0-9ed8-d9f7ea550b1e

  1. Chatflow mode, accessed via embedding app:

https://github.com/user-attachments/assets/cee3dc66-2bcd-462d-9eac-c41850dec92a

Known issue

The Chatflow run history and log detail view are designed to display all historical messages. However, for now, it is flattened and displays all messages simultaneously, rather than offering an interactive UI to toggle between different threads.

I've already implemented this fix in a separated PR https://github.com/xuzuodong/dify/pull/1, so we can look into this later.

Database migration caveat

A new field, parent_message_id, will be added to the messages table. All existing messages will be set to a special value for future compatibility: 00000000-0000-0000-0000-000000000000.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update, included: Dify Document
  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
  • Dependency upgrade

Testing Instructions

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B
**Original Pull Request:** https://github.com/langgenius/dify/pull/7661 **State:** closed **Merged:** Yes --- # Description Fixes #7161 Support mode: Chatbot, Agent and Chatflow mode 1. The regenerate button can be accessed via - ✅ In explore page, i.e. installed App - ✅ Single debug view - ✅ Web app - ✅ Embedded app 1. The regenerate button won't be displayed in - ❌ Multiple debug view - ❌ Log view - ❌ Chatflow's chat record view 1. Completion and Workflow mode should not be affected by this PR. 1. All sent messages in Chatbot, Agent and Chatflow have `parent_message_id` field now for future considerations (important for implementing branched chat history tree). ## Demonstration 1. Agent mode, accessed via Explore page: https://github.com/user-attachments/assets/b505fe7e-a2d1-4fa0-9ed8-d9f7ea550b1e 2. Chatflow mode, accessed via embedding app: https://github.com/user-attachments/assets/cee3dc66-2bcd-462d-9eac-c41850dec92a ## Known issue The Chatflow run history and log detail view are designed to display all historical messages. However, for now, it is flattened and displays all messages simultaneously, rather than offering an interactive UI to toggle between different threads. I've already implemented this fix in a separated PR https://github.com/xuzuodong/dify/pull/1, so we can look into this later. ## Database migration caveat A new field, `parent_message_id`, will be added to the `messages` table. All existing messages will be set to a special value for future compatibility: `00000000-0000-0000-0000-000000000000`. ## Type of Change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [x] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [ ] Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement - [ ] Dependency upgrade # Testing Instructions Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - [ ] Test A - [ ] Test B
yindo added the pull-request label 2026-02-21 20:25:42 -05:00
yindo closed this issue 2026-02-21 20:25:42 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#25787