yyqdbngt opened a new pull request, #3854: URL: https://github.com/apache/rocketmq-dashboard/pull/3854
### Motivation The existing `AiMessage` tests cover markdown rendering and malformed-marker normalisation only. The structured response branches — the tool-call tag, stat cards, the chain-of-thought details and the descriptions block — were untested. ### Changes - `renders a tool call tag for tool-backed responses`: the tool label appears for tool-backed messages. - `renders stat cards for numeric digests`: stat titles and values render for numeric digests. - `renders the chain-of-thought details when thinking is present`: the thinking toggle and its content render. - `renders descriptions as a definition block`: label/value pairs render. A `window.matchMedia` polyfill is installed before each render because the Ant Design grid/descriptions internals require it in jsdom. ### Verification ``` ./node_modules/.bin/vitest run src/pages/ai/__tests__/AiMessage.test.tsx # 6 passed ./node_modules/.bin/tsc --noEmit # clean ./node_modules/.bin/eslint src/pages/ai/__tests__/AiMessage.test.tsx # clean ``` -- 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]
