Skip to content

Add toggle to control buggy code and fixer usage #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 06-16-fixed_a_few_errors
Choose a base branch
from

Conversation

juancastano
Copy link
Contributor

@juancastano juancastano commented Jun 16, 2025

TL;DR

Added debugging options to enable buggy code generation and code fixing capabilities.

What changed?

  • Removed the hardcoded debug flag and replaced it with user-configurable options
  • Added two new parameters to the component schema: useBuggyCode and useFixer
  • Implemented the Benchify fixer functionality that was previously commented out
  • Added UI toggles in the prompt form for users to enable/disable these features
  • Added session storage to persist these settings across page navigation
  • Passed these settings through all API calls (new generation and edits)
  • Added detailed logging for the fixer process
  • Removed the "Common Solutions" section from the error display component
  • Auto-populates the description field with sample text when buggy code is enabled

How to test?

  1. Navigate to the prompt form and toggle "Use Buggy Code" on
  2. Notice how the description field auto-populates with sample text
  3. Toggle "Use Fixer" on to test the code repair functionality
  4. Submit the form and observe the generated code
  5. Check the console logs to verify the fixer is being called when enabled
  6. Verify that these settings persist when navigating between pages

Why make this change?

This change provides developers with better debugging tools to test the application's error handling and code fixing capabilities. The toggles make it easy to generate intentionally buggy code for testing purposes and to evaluate the effectiveness of the Benchify fixer. This will help in development, testing, and demonstrating the application's resilience to code errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant