add react grab for development#11567
add react grab for development#11567joshuali925 wants to merge 2 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: Joshua Li <joshuali925@gmail.com>
❌ Empty Changelog SectionThe Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section. |
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit 08f73ac.
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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #11567 +/- ##
=============================
=============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
✅ All unit and integration tests passing
|
i disabled its UI because i don't want to modify OSD UI for developers who won't need react-grab |
| import { CoreSystem } from './core_system'; | ||
| import { ApmSystem } from './apm_system'; | ||
|
|
||
| if (process.env.NODE_ENV === 'development') { |
There was a problem hiding this comment.
can we add comment here about its purpose ?
Signed-off-by: Joshua Li <joshuali925@gmail.com>
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit e14a2d8.
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. |
Description
This PR adds https://github.com/aidenybai/react-grab to opensearch dashboards. This helps for AI agent based development to easily target specific page elements in the prompt.
The library is added to devdependencies, and will only be enabled in development mode.
An alternative is agentation, but i found it to break some css styling in OSD.
React grab UI is hidden by default, so there won't be any difference in OSD visually. To trigger it, press and hold Cmd + C.
Issues Resolved
Screenshot
(The blur effect comes from a chrome extension, it is not relevant to this PR.)
after clicking, it copies the following prompt
You can also do other actions like add comment before copying
Testing the changes
Changelog
Check List
yarn test:jestyarn test:jest_integration