You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### TL;DR
Replaced custom Benchify implementation with the official Benchify npm package.
### What changed?
- Removed the custom `lib/benchify.ts` file that contained a manual implementation for interacting with the Benchify API
- Added the official `benchify` npm package (version 0.1.0-alpha.3) as a dependency
- Updated the code in `app/api/generate/route.ts` to use the Benchify client from the package
- Simplified the code flow for repairing generated files using Benchify's fixer API
- Maintained the same functionality of applying patches to the generated code
### How to test?
1. Run `npm install` to install the new Benchify package
2. Ensure the `BENCHIFY_API_KEY` environment variable is set
3. Test the `/api/generate` endpoint with a component description
4. Verify that code generation and repair works as expected
5. Check that the sandbox creation still functions properly with the repaired files
### Why make this change?
Using the official Benchify package provides several advantages:
- Reduces maintenance burden by eliminating custom API integration code
- Ensures compatibility with the latest Benchify API changes
- Simplifies error handling and request formatting
- Makes future updates easier as the package will be maintained by the Benchify team
0 commit comments