Skip to content

task: Add versioning to regenerating response#361

Open
chloebyun-wd wants to merge 6 commits intomainfrom
task/add-versionining-when-regenerating-response
Open

task: Add versioning to regenerating response#361
chloebyun-wd wants to merge 6 commits intomainfrom
task/add-versionining-when-regenerating-response

Conversation

@chloebyun-wd
Copy link
Copy Markdown
Contributor

@chloebyun-wd chloebyun-wd commented Apr 2, 2026

Add support for versioning of regenerated response (ie, i can see the history of the regenerated responses)
Each response has unique messageId and feedback capabilities.

Screen.Recording.2026-04-07.at.11.39.03.AM.mov

Copy link
Copy Markdown

@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 support for multiple response versions, enabling users to regenerate bot responses and navigate through a history of versions for a single message. The changes include new data structures for response versions, updated state management to track ratings per version, and UI enhancements in the bot bubble for version navigation. Review feedback highlights the need for defensive checks in the regeneration logic, more robust error handling when parsing stored chat history, and better cleanup in callback refs.

@chloebyun-wd chloebyun-wd force-pushed the faet/regenrate-response-functionality branch from 6fb52a4 to 0ecad59 Compare April 6, 2026 15:11
…ated outputs on each assistant message and add previous/next navigation so users can compare alternate regenerated responses in place.
@chloebyun-wd chloebyun-wd force-pushed the task/add-versionining-when-regenerating-response branch from d385ea3 to 4fc71b5 Compare April 6, 2026 16:07
@chloebyun-wd chloebyun-wd changed the base branch from faet/regenrate-response-functionality to main April 6, 2026 16:07
const cleanedMessage = errorMessage.replace(/^Error:\s*\S+\s*-\s*/, '');
setMessages((prevMessages) => {
const allMessages = [...prevMessages, { message: props.errorMessage || cleanedMessage, type: 'apiMessage' as messageType }];
const lastMsg = prevMessages[prevMessages.length - 1];
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Logic below differentiates the different scenarios of when errors are happening and treats them differently.

Mostly noticeably, when a successful response follows an error, the user would see both messages which is confusing ux. Going on the route of silencing the error if there is a valid message, to suppress the error, but down the line we should explore designs of exposing this error, maybe as a toast or notif somewhow.

break;
case 'error':
updateErrorMessage(payload.data);
closeResponse();
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ensure feedback buttons always appear after bot messages, even when errors occur.

@chloebyun-wd chloebyun-wd marked this pull request as ready for review April 7, 2026 20:11
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