HDDS-14818. Recon: Add AI Assistant chat UI for natural-language cluster queries. - #10441
Conversation
…ter queries. Generated-by: Cursor (Gemini 3.1 Pro / Claude 3.5 Sonnet)
276f484 to
814893f
Compare
…hat. Generated-by: Cursor Co-authored-by: Cursor <cursoragent@cursor.com>
devmadhuu
left a comment
There was a problem hiding this comment.
Thanks @ArafatKhan2198 for the patch. Had a high level view of patch. Some findings. Pls check.
…lback. Generated-by: Cursor Co-authored-by: Cursor <cursoragent@cursor.com>
|
@ArafatKhan2198 , changes largely looks good , but just a nit that as discussed yesterday, lets not give user the option to select ready made prompt for list keys or any pagination API. Also making all pagination APIs providing output in bounded limits can be done in follow up PRs. |
Replace Browse Keys with a cluster-wide volumes and buckets summary prompt and use the database icon on the welcome screen.
devmadhuu
left a comment
There was a problem hiding this comment.
Thanks @ArafatKhan2198 for improving the patch. Changes LGTM +1
|
Thanks @devmadhuu I have replaced Browse Keys with a cluster-wide volumes and buckets summary
|
Fix RAT check failures for Playwright and Vitest files added with the Recon AI chat UI.
Avoid duplicate React keys when messages are created within the same millisecond.
spacemonkd
left a comment
There was a problem hiding this comment.
Thanks for this patch @ArafatKhan2198.
I have a few review comments, apart from that it LGTM
- useChat.hook: Use isInFlightRef to avoid recreating sendMessage on flight toggle - assistant.tsx: Pass model and provider to sendMessage during handleRetry and handleRegenerate - Composer.tsx: Remove unused getProviderForModel import - assistant.less: Scope prefers-reduced-motion to .assistant-page-container - MessageList.tsx: Only pass onRegenerate handler to assistant messages
spacemonkd
left a comment
There was a problem hiding this comment.
Thanks for the changes @ArafatKhan2198.
This LGTM now, +1

What changes were proposed in this pull request?
This PR adds a new AI Assistant page to the Recon web UI. It lets an operator ask questions about the cluster in plain English (for example, "How many unhealthy containers are there?" or "List keys in /vol1/bucket1") and get back a readable answer, instead of clicking through screens or calling APIs by hand.
The backend for this (added separately) takes a question, calls the right Recon APIs, and returns a single Markdown answer. This PR is the frontend that talks to that backend and presents it as a modern chat experience.
What it does:
/Assistantpage and a nav entry, shown only when the feature is enabled./api/v1/chatbot/healthfirst and shows the right state:/api/v1/chatbot/chatand renders the Markdown reply (including tables, lists, code)./api/v1/chatbot/modelsand offers a provider + model picker.Why: Recon already exposes a lot of cluster data, but finding it takes effort. This gives operators a faster, friendlier way to get answers, while staying inside Recon's existing look and feel (teal/green theme, rounded panels, custom Recon AI mark).
Notes / current limits:
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14818
How was this patch tested?
UI Manual Testing Results Document - https://docs.google.com/document/d/1Ex3L9eY8oNm-73TwdDr6ZO2eDd2kQZ2WOo_8vsk45ic/edit?tab=t.0#heading=h.onx3qjujbc5t
video1352097730.mp4