fix(DATAGO-124269): include original quote in follow-up action messages#978
Open
amir-ghasemi wants to merge 3 commits intomainfrom
Open
fix(DATAGO-124269): include original quote in follow-up action messages#978amir-ghasemi wants to merge 3 commits intomainfrom
amir-ghasemi wants to merge 3 commits intomainfrom
Conversation
WhiteSource Policy Violation Summary✅︎ No Blocking Whitesource Policy Violations found in solaceai/solace-agent-mesh-ui-pr-978! |
e6cab36 to
eb8d206
Compare
- Add contextQuote field to MessageFE and MessageBubble types for storing the original quoted text separately from the message content - Update ChatInputArea to pass contextQuote to handleSubmit - Update ChatProvider serialization/deserialization to persist contextQuote - Update ChatMessage to render context quote as styled badge above user message bubble (with Quote icon, border, background) - Strip 'Context: ...' prefix from displayed message text when contextQuote is present to avoid duplication - Update TaskLoggerService to preserve frontend-only fields (contextQuote, displayHtml) when backend saves background tasks, ensuring styling persists after page refresh - Change context badge icon from MessageSquarePlus to Quote
eb8d206 to
41be18d
Compare
|
JKaram
approved these changes
Feb 6, 2026
| // The context quote is now rendered separately above the message bubble | ||
| let htmlToRender = message.displayHtml; | ||
| // Remove context-quote-badge div and its contents | ||
| htmlToRender = htmlToRender.replace(/<div class="context-quote-badge">[\s\S]*?<\/div>/g, ""); |
Contributor
There was a problem hiding this comment.
This is pretty fragile. Can you ask Claude if we can do this more safely
Collaborator
Author
There was a problem hiding this comment.
Agreed. Already have an enhancement that will supersede this.
lgh-solace
reviewed
Feb 7, 2026
| {message.isUser && message.contextQuote && ( | ||
| <div className="flex justify-end pr-4"> | ||
| <div className="bg-muted/50 flex max-w-fit items-center gap-2 overflow-hidden rounded-md border px-3 py-2 text-sm"> | ||
| <Quote className="text-muted-foreground h-4 w-4 flex-shrink-0" /> |
Collaborator
There was a problem hiding this comment.
I don't see this image in the screenshot?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




What is the purpose of this change?
When users select text and use the 'Ask Followup' action, the original quoted text was not visible in the user's message bubble in the chat UI, even though it was being sent to the backend. This fix ensures the quoted context is displayed in the chat UI so users can see what their follow-up question is referring to.
How was this change implemented?
onSubmitfunction to include the context text in thedisplayHtmlwhen there's a context badge. Previously, only thefullMessage(sent to the backend) included the context, but thedisplayHtml(shown in the chat UI) did not..context-quoteclass to display the quoted text in italic with a muted gray color, matching the visual style of the context badge shown above the input.How was this change tested?
npm run buildpasses successfullyIs there anything the reviewers should focus on?
The HTML sanitization in ChatMessage.tsx already allows
spantags withclassattributes, so the newcontext-quoteclass is preserved when rendering.AFTER (context from follow up included):
