[PR #11850] Optimization of Chat component, other bug fixes. Resolves #11848 #11849 #27378

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

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

State: closed
Merged: No


Summary

We have resolved the issues and improvements mentioned in issues #11848 and #11849.

Resolves #11848
Resolves #11849

New Features

  1. Add upward scrolling to load more messages in the Chat component
    • Previously, the Chat component could only display the most recent 40 messages, making it impossible to view earlier messages. This update introduces an upward scrolling feature that allows users to load more historical messages when they scroll to the top of the chat window.

Fixes

  1. Fix the issue where the opening statement generated by the AutomaticRes component were not synchronized between states

    • Before the fix, the opening statement generated by the AutomaticRes component would not automatically apply to the current orchestration state and needed to be saved to take effect. Now, the opening statement will automatically sync with the current orchestration state.
  2. Fix the style issue with the WeightedScore component

    • Corrected the issue where the WeightedScore component slightly overlapped with other elements.
  3. Fix the issue of Echarts charts and Markdown tables being too wide in conversations

    • Resolved the problem where Echarts charts and Markdown tables appeared too wide in conversations, ensuring they display correctly within the message window.
  4. Add missing i18n items

    • Added the missing i18n item for the copy image button in the image preview component.
  5. Fix the issue where the chat-input-area was cleared in response state

    • Fixed the issue where the input box content was cleared after sending a message in response state. Now, it will check if the state is in response mode, and if so, it will display a prompt and retain the input box content.
  6. Fix the issue where old replies were displayed after regenerating a reply and switching conversations

    • Fixed the issue where old replies were displayed when switching conversations after regenerating a reply and then switching back. Now, the new reply will be displayed immediately without needing to refresh the page.
  7. Fix the issue where TextGeneration component does not correctly clear input data

    • Fixed the issue in the text generation application where the TextGeneration component did not properly reset references when clearing the form. This issue caused old form values to be automatically filled in upon re-entering data. Now, the form references are correctly reset after clearing, ensuring that new input data is not affected by previous values.

Tip

Close issue syntax: Fixes #<issue number> or Resolves #<issue number>, see documentation for more details.

Screenshots

Before After
... ...

Checklist

Important

Please review the checklist below before submitting your pull request.

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/11850 **State:** closed **Merged:** No --- # Summary We have resolved the issues and improvements mentioned in issues #11848 and #11849. Resolves #11848 Resolves #11849 ### New Features 1. **Add upward scrolling to load more messages in the `Chat` component** - Previously, the `Chat` component could only display the most recent 40 messages, making it impossible to view earlier messages. This update introduces an upward scrolling feature that allows users to load more historical messages when they scroll to the top of the chat window. ### Fixes 1. **Fix the issue where the opening statement generated by the `AutomaticRes` component were not synchronized between states** - Before the fix, the opening statement generated by the `AutomaticRes` component would not automatically apply to the current orchestration state and needed to be saved to take effect. Now, the opening statement will automatically sync with the current orchestration state. 2. **Fix the style issue with the `WeightedScore` component** - Corrected the issue where the `WeightedScore` component slightly overlapped with other elements. 3. **Fix the issue of Echarts charts and Markdown tables being too wide in conversations** - Resolved the problem where Echarts charts and Markdown tables appeared too wide in conversations, ensuring they display correctly within the message window. 4. **Add missing i18n items** - Added the missing i18n item for the copy image button in the image preview component. 5. **Fix the issue where the `chat-input-area` was cleared in response state** - Fixed the issue where the input box content was cleared after sending a message in response state. Now, it will check if the state is in response mode, and if so, it will display a prompt and retain the input box content. 6. **Fix the issue where old replies were displayed after regenerating a reply and switching conversations** - Fixed the issue where old replies were displayed when switching conversations after regenerating a reply and then switching back. Now, the new reply will be displayed immediately without needing to refresh the page. 7. **Fix the issue where `TextGeneration` component does not correctly clear input data** - Fixed the issue in the text generation application where the `TextGeneration` component did not properly reset references when clearing the form. This issue caused old form values to be automatically filled in upon re-entering data. Now, the form references are correctly reset after clearing, ensuring that new input data is not affected by previous values. > [!Tip] > Close issue syntax: `Fixes #<issue number>` or `Resolves #<issue number>`, see [documentation](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) for more details. # Screenshots | Before | After | |--------|-------| | ... | ... | # Checklist > [!IMPORTANT] > Please review the checklist below before submitting your pull request. - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:41:24 -05:00
yindo closed this issue 2026-02-21 20:41:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#27378