BuilderIO / BuilderIO/micro-agent

MicroAgent should check for required library before generating code

Open
#66 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.3k
Forks
380
PR merge metrics
No merged PRs in 30d

Description

Description:
MicroAgent currently generates and attempts to execute code without verifying if the necessary libraries (e.g., @testing-library/user-event) are installed. This can result in errors when executing the code if the library is missing.

To improve the user experience, MicroAgent should:

Check if the required library (such as @testing-library/user-event) is installed before generating any code that depends on it.
If the library is not installed, prompt the user to install the required package.
Only proceed with code generation and execution once the necessary library is confirmed to be installed.
Example:
If a user asks MicroAgent to generate code using @testing-library/user-event, the agent should first check if the library is installed. If not, MicroAgent could respond with something like:

"It looks like @testing-library/user-event is not installed. Please install it by running npm install @testing-library/user-event and try again."

MicroAgent should only generate and run the code after the user confirms that the library is installed.

Additional Context:
This feature will help avoid unnecessary errors caused by missing libraries and improve overall reliability when using MicroAgent to generate code.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.