langgenius / langgenius/dify

Add support for editing user messages and regenerating responses in Advanced Chat App API

Open
#36,395 6 comments 7 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
156k
Forks
24.6k
Avg merge
22h 9m
Merged PRs (30d)
610

Description

### Self Checks

- [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542).
- [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, otherwise it will be closed.
- [x] Please do not modify this template :) and fill in all the required fields.

### 1. Is this request related to a challenge you're experiencing? Tell me about your story.

I am developing a custom UI and API integration around Dify Advanced Chat Apps because I require additional customization and access control capabilities beyond the out-of-box UI.

During implementation, I identified a limitation in the Advanced Chat App API: there is currently no supported way to edit previously sent user messages and regenerate assistant responses based on the updated input.

In practical usage, users often:

- correct typos,
- refine prompts,
- add missing context,
- adjust requests after reviewing the generated response.

At the moment, the only available approach is to send additional follow-up messages or restart the conversation. This can make conversations harder to manage and may increase duplicated context and token usage.

For custom chat frontends and API integrations built on top of Dify APIs, support for message editing and response regeneration would help provide a smoother conversational experience and simplify client-side implementation logic.

The expected workflow would be:

1. Update an existing user message.
2. Regenerate assistant responses starting from the edited message.
3. Preserve the conversation structure while replacing outdated downstream responses.

This functionality would significantly improve usability for custom chat interfaces and API-based integrations.

### 2. Additional context or comments

_No response_

### 3. Can you help us with this feature?

- [ ] I am interested in contributing to this feature.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.