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

fix: fix the answer regenerate bug(#15060) #16611

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

Conversation

Jimmy0769
Copy link

@Jimmy0769 Jimmy0769 commented Mar 24, 2025

Summary

Fixes #15060

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

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🐞 bug Something isn't working labels Mar 24, 2025
@Jimmy0769 Jimmy0769 marked this pull request as draft March 24, 2025 06:53
@Jimmy0769
Copy link
Author

@weridolin

@Jimmy0769 Jimmy0769 marked this pull request as ready for review March 24, 2025 07:28
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Mar 24, 2025
@laipz8200
Copy link
Member

Could you please explain the reason for this change in more detail? I don't think we should be exposing the upload_file_id.

@Jimmy0769
Copy link
Author

Could you please explain the reason for this change in more detail? I don't think we should be exposing the upload_file_id.

Because regenerate answer need the upload_file_id, after refresh the chat page, the "message" api will expose the wrong file id, it cause the regenerate error
Before refresh the page:
image

After refresh the page:
image

However, I exposed the upload_file_id because I don't know what the id returned by the message api is useful, so I added another field upload_file_id. If the id can be modified to upload_file_id, then the front-end does not need to modify it.

@weridolin weridolin force-pushed the fix/answer-regenerate-error branch 2 times, most recently from b3a2017 to 4422544 Compare April 2, 2025 09:19
@weridolin weridolin force-pushed the fix/answer-regenerate-error branch from 4422544 to cbf4b78 Compare April 2, 2025 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regenerate bug(with image)
3 participants