Skip to content
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

Add auto-fix diagnostics with AI feature #171

Merged
merged 3 commits into from
Aug 9, 2024
Merged

Conversation

nichochar
Copy link
Contributor

@nichochar nichochar commented Aug 9, 2024

Ability to one click get a diff with a fix for Diagnostics.

I did not have designs for this.
Happy to iterate if you have suggestions, but I think we can merge for a couple of reasons:

  • good to get the feature out to start testing it and using it
  • it's hidden in the diagnostics tab

I reused the purple color which Justin suggested we use for the AI features. I think this is a good idea, although it needs some improvements in dark mode.

I have QA'd the feature a little but it's hard to know what accuracy the prompt has without more rigorous eval testing.

Video of the experience

CleanShot.2024-08-08.at.17.05.18.mp4

Notes

  • The state on the code cell is getting intense. Refactoring leads to bugs, which is a smell
  • I reused a websocket message for the diff mechanism. Did not add a new message because it felt that it's the same mechanism of the AI suggesting a diff. Had to add a tiny bit of state since the behavior on revert is slightly different for a diagnostics fix vs an 'ai edit'.
  • Renamed some of the state vars in code.tsx, which I think is an improvement

@nichochar nichochar requested a review from benjreinhart August 9, 2024 00:10
@nichochar nichochar merged commit 7fd2c18 into main Aug 9, 2024
1 check passed
@nichochar nichochar deleted the ai-errors-autofix branch August 9, 2024 19:33
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