-
Notifications
You must be signed in to change notification settings - Fork 240
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
feat: add generated unit test to files automatically #2646
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels really nice! Left some comments.
Mainly just wary of how we link Commands and Edits... It'd be awesome if we can abstract this slightly more - and might mean we can reuse this code easier in the future for any non-Command requirements
Co-authored-by: Tom Ross <tom@umpox.com>
Thank you so much for your input @umpox! What you suggested makes sense and I've made some new changes in my local branch to reflect some of them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking really good, left some comments!
I noticed that it can duplicate some stuff when there's already an existing test file with tests in it. I wonder if there's a nice way to provide the precedingText
if the test file already exists 🤔 We use precedingText
for the add
intent and it works well to avoid duplication. Maybe one for a follow up PR though
@umpox it's now behind an experimental configuration. Regarding |
Co-authored-by: Tom Ross <tom@umpox.com>
Part of #1475
cody.internal.unstable
file
for inserting response to a different file (only used by /test currently)Note
This will not affect the /test command used by agent. In a follow up PR I will add a param that allows all commands to be run in chat mode only
Test plan
cody.internal.unstable
/unit
command in the selected code to generate unit testsIn addition, confirm the following works as expected:
Demo
demo_auto_test.mov
Follow-ups
To-dos in follow-up PRs: