-
Notifications
You must be signed in to change notification settings - Fork 93
fix(DATAGO-124287): Enhance styling of 'Follow Up' action message quotes #978
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
base: main
Are you sure you want to change the base?
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
a3cc96c to
6bc8b8f
Compare
- Add contextQuote and contextQuoteSourceId to message serialization/deserialization - Update handleSubmit to accept contextQuote parameters - Backend preserves frontend-only fields when saving tasks - Keep main's save-inside-setMessages approach with quote field additions
6bc8b8f to
8ab6619
Compare
…mir/DATAGO-124269/include-quote-in-followup-clean
|
| selectionRange: Range | null; | ||
| menuPosition: { x: number; y: number } | null; | ||
| sourceMessageId: string | null; | ||
| sourceTaskId: string | null; // Task ID for scroll-to-source functionality |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may not need these repeated comments?
| } | ||
| }, | ||
| [ | ||
| addNotification, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we could add this? It continues to pop up on ever PR, unless there is a reason not to?
| } | ||
|
|
||
| /* Context quote badge styles (for follow-up questions) */ | ||
| .context-quote-badge { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double check this feature when it hits enterprise - may need to update the css file there.




This pull request enhances the chat UI by improving how context quotes (selected text or referenced message snippets) are handled and displayed in user messages, and by adding robust support for highlighting quoted text in AI messages. The changes streamline context quote passing, ensure better separation of quoted content from user input, and introduce automatic, transient highlighting of referenced text in chat messages for improved user experience.
Context Quote Handling and UI Improvements:
sourceTaskIdto the text selection context and passed it toSelectionContextMenuandChatInputArea, enabling the system to track the origin of quoted text selections. [1] [2] [3]ChatInputAreato capture and store thesourceMessageIdwhen quoting text, and ensure it is cleared after submission. [1] [2] [3]MessageSquarePlustoQuotefor clearer visual indication. [1] [2] [3]Message Rendering and Highlighting Enhancements:
ChatMessage.tsx, added logic to highlight quoted text in AI messages when referenced, using a robust, multi-strategy DOM search and highlight mechanism that works across line breaks and multiple nodes. Highlights fade out after a few seconds for a smooth user experience.displayHtmlfor backward compatibility. [1] [2]Component and Prop Updates:
SelectableMessageContentto receivetaskIdfor improved traceability of AI messages.These changes collectively improve the clarity, usability, and maintainability of context quoting and referencing in the chat interface.