Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimization of Chat component, other bug fixes. Resolves #11848 #11849 #11850

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

Woo0ood
Copy link

@Woo0ood Woo0ood commented Dec 19, 2024

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

…ponent.

Previously, the Chat component was limited to displaying the most recent 40 messages, with no option to load older messages. This commit addresses this limitation by adding a scroll-up feature that allows users to load more messages as they scroll to the top of the chat window.
…tching conversations.

Fixed an issue where, after regenerating a reply, switching to another conversation and then switching back would display the old reply. The correct new reply would only show after refreshing the page.
Fixed an issue where sending a message while in the Responding state would clear the input box content. Now, it checks if the state isResponding, and if true, it shows a prompt and does not clear the input box.
…aticRes` component failing to sync between states.
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. 🐞 bug Something isn't working 💪 enhancement New feature or request labels Dec 19, 2024
@crazywoola crazywoola requested review from zxhlyh and iamjoel December 19, 2024 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 💪 enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
2 participants