[Chat]Add dashboard context-aware and enable auto-vis - #12424
Conversation
688e716 to
4da9a01
Compare
PR Reviewer Guide 🔍(Review updated until commit 8f9fe80)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 8f9fe80 Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 67b702e
Suggestions up to commit 98fce72
Suggestions up to commit 4da9a01
|
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit 8f9fe80.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
|
Persistent review updated to latest commit 98fce72 |
98fce72 to
67b702e
Compare
|
Persistent review updated to latest commit 67b702e |
67b702e to
e58bef4
Compare
Signed-off-by: Qxisylolo <qianxisy@amazon.com>
|
Persistent review updated to latest commit 8f9fe80 |
✅ All unit and integration tests passing
|
| export interface TextInputContent { | ||
| type: 'text'; | ||
| text: string; | ||
| hiddenInConversation?: boolean; |
There was a problem hiding this comment.
Will this property be correctly persisted in ML's agentic memory?
There was a problem hiding this comment.
yes, only if hiddenInConversation is true
There was a problem hiding this comment.
https://docs.ag-ui.com/concepts/messages#user-messages
I'd recommend using name.
There was a problem hiding this comment.
Do you mean giving the content that needs to be hidden a name and then filtering it out in the chat input? The main reason I added hiddenInConversation is to pass visualization context to the chatbot without displaying that context in the chat input.
| ? { | ||
| id: chatService.generateMessageId(), | ||
| role: 'user', | ||
| content: [...additionalContent, { type: 'text' as const, text: messageContent.trim() }], |
There was a problem hiding this comment.
{ type: 'text' as const, text: messageContent.trim() }, shall we use chatService.getUserMessage(messageContent)?
Description
This PR adds an AI-driven visualization capability to the chat assistant. Users can describe what they want in natural language (e.g. "show the average ticket price per airport"), and the assistant generates a PPL query, picks a suitable chart type, renders a live chart preview inside the chat window, and offers an "Open in Editor" link that deep-links into the full visualization editor.
The core new tool is auto_create_visualization. And it relies on opensearch-project/opensearch-mcp-server-py#257.
The intended tool-call workflow (encoded in the tool description) is:
Index mapping tool → look up timeFieldName
ppl_execute → run the query, return the result column schema
auto_create_visualization → resolve chart config from columns, render preview, provide editor link
Besides, this pr adds:
fetch_panel_data tool, access panel explore embeddable dataScreenshot
2026-07-21.09.17.38.mov
2026-07-21.13.51.13.mov
Testing the changes
Check List
yarn test:jestyarn test:jest_integration