Skip to content

feat: Add regenrate response functionality#360

Draft
chloebyun-wd wants to merge 2 commits intomainfrom
faet/regenrate-response-functionality
Draft

feat: Add regenrate response functionality#360
chloebyun-wd wants to merge 2 commits intomainfrom
faet/regenrate-response-functionality

Conversation

@chloebyun-wd
Copy link
Contributor

Add a regenerate control to feedback actions. This will allow reruns of the latest prompt without duplicating the user message, while keeping config-driven enablement from Flowise chat feedback settings.

@chloebyun-wd chloebyun-wd changed the title feat/regenrate response functionality feat: Add regenrate response functionality Mar 25, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant enhancement to the chatbot's user experience by enabling the regeneration of bot responses. This feature allows users to easily request a new answer to their last prompt, streamlining interactions and providing more control over the conversation flow, all while maintaining existing configuration-driven feedback settings.

Highlights

  • Regenerate Response Functionality: Introduced a new feature allowing users to regenerate the latest bot response without re-entering the prompt. This functionality is integrated into the feedback actions and is configurable via Flowise chat settings.
  • Type Definition Updates: Added a new MessageResponseVersion type and extended the MessageType with responseVersions and responseVersionIndex fields to support multiple versions of a bot's response.
  • Core Logic for Regeneration: Implemented functions to determine if a response can be regenerated, identify the last API message, and handle the regeneration process by re-submitting the previous user message while skipping its re-addition to the chat history.
  • Configurable Enablement: The regenerate response feature's visibility and functionality are now controlled by a new regenerateResponse setting within the chatbot configuration, defaulting to enabled if general chat feedback is active.
  • UI Integration: A new 'Regenerate Response' button has been added to the bot's message bubble, appearing conditionally based on the new configuration and regeneration logic.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new "Regenerate Response" feature to the chatbot. Key changes include defining new message version types, implementing regeneration logic within Bot.tsx (including parseConfigBoolean, getLastApiMessageIndex, canRegenerateResponse, and handleRegenerateResponse), and integrating a new RegenerateResponseButton into the BotBubble component. The handleSubmit function was updated to support skipping user message addition during regeneration. Review feedback points out a redundancy in the handleRegenerateResponse logic and suggests renaming the DeleteIcon component and its file to RefreshIcon for improved clarity, as it is used for the regenerate functionality.

@chloebyun-wd chloebyun-wd force-pushed the faet/regenrate-response-functionality branch 2 times, most recently from e4c0e0d to 6e51cf1 Compare March 25, 2026 22:31
add a regenerate control to feedback actions andrerun the latest prompt without duplicating the user message - coupled with chatflow config
@chloebyun-wd chloebyun-wd force-pushed the faet/regenrate-response-functionality branch from 4469e7a to a4d9e6f Compare March 25, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant