Aias00 opened a new issue, #817:
URL: https://github.com/apache/rocketmq-dashboard/issues/817
### Bug Description
The home page exposes four AI modes (`query`, `diagnose`, `manage`, `chat`)
and updates the active mode UI, but the selected mode is not passed to the AI
page. The AI page always sends `mode: "chat"` to `/api/ai/chat`.
Evidence:
- `web/src/pages/home/index.tsx` maintains `activeMode` and renders mode
buttons.
- `handlePromptSubmit` navigates to `/ai` with only `{ prompt, model }`.
- `web/src/pages/ai/chatDraft.ts` only accepts `prompt` and `model` from
navigation state.
- `web/src/pages/ai/index.tsx` calls `chatStream` with hard-coded `mode:
"chat"`.
### Expected Behavior
When a user selects a mode on the home page and submits a prompt, the
selected mode should be preserved in navigation state and sent by the AI page
to the backend chat API.
### Actual Behavior
The selected home mode only affects UI state. Backend receives `chat` for
every prompt started from the home page.
### Minimal Fix Direction
- Include `mode: activeMode` in home page navigation state.
- Teach `getChatDraft` to normalize supported mode values.
- Store the draft mode in the AI page and send it in `chatStream`.
- Add tests for draft mode normalization.
### Contest Scope
Track 3 / AI Native: the Console embedded LLM entry point should pass the
user-selected intent mode into the AI chat request contract.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]