-
Notifications
You must be signed in to change notification settings - Fork 929
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
Overwrites Previous Function when use continue in option #991
Comments
Bumping this, as I've had this issue as well with Ctrl+I:
|
I was able to replicate this - I'll add that the issue only occurs if you don't accept or reject the suggested diff, and only within the same file. It does seem to generate a new docstring for the newly highlighted function, but it annotates the previously targeted function.
I'll look into this! |
Looks like verticalDiffs are not being updated when lines are added/removed from the file. I think the best approach will be to create a listener for changes to the document (onDidChangeTextDocument) and if the change includes a line addition or deletion, make the appropriate changes to the diffhandler instance. @sestinj Hey Nate - Two questions:
|
@justinmilner1 thanks for looking into this. 1:1 is intended for now. There's a of offsetting to keep track of if there are multiple diffs being generated in a single file, and especially if the user tries to generate over top of an existing one there's really not a great UI solution. So unless it turns out to be a majorly requested feature the plan was to keep up a guide rail. I agree with your take about deleting the old one |
Before submitting your bug report
Relevant environment info
Description
When I use
continue
to edit likewrite a docstring for this code
it works. but when finished I try to select the new function and use the same feature towrite a docstring for this code
again, it writes on the oldfunction
again.To reproduce
I try to use continue and it work
![Screenshot 2024-03-19 at 17 02 16](https://private-user-images.githubusercontent.com/47348453/313971937-6e5aae42-5b84-4ab8-afb1-13dd2423b8c7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA3MTQ0ODUsIm5iZiI6MTcyMDcxNDE4NSwicGF0aCI6Ii80NzM0ODQ1My8zMTM5NzE5MzctNmU1YWFlNDItNWI4NC00YWI4LWFmYjEtMTNkZDI0MjNiOGM3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzExVDE2MDk0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUyMzdkNzZkNjNkNWE0N2VmMzQxNDNiMjRlNDMwNTI5NTE1YTJmMWFjYzc0YmVlYTYyOGQzNmYxMTE2ZjdmYzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.pyy-vmA73hNFnNn_ZUZeOA0K2igkgoFdNi4JpO_0_YY)
After that, I try on new function but it back to old function
![Screenshot 2024-03-19 at 17 07 31](https://private-user-images.githubusercontent.com/47348453/313971983-ba4ddda2-d707-481a-9bc8-c1a1165f3ef8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA3MTQ0ODUsIm5iZiI6MTcyMDcxNDE4NSwicGF0aCI6Ii80NzM0ODQ1My8zMTM5NzE5ODMtYmE0ZGRkYTItZDcwNy00ODFhLTliYzgtYzFhMTE2NWYzZWY4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzExVDE2MDk0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU1ZjQ5ZjlmYWM2ZWU0NDllNGEwMzgwMTg1MjEwYmRlNzU3NGIwMGMzMmM2ZjI0NTQ0MDg5M2RkNzYyY2Y3MmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.WUT0s6fEjEfqfujjroALdLNzqqATcTiuSuP_ghLoALA)
Log output
No response
The text was updated successfully, but these errors were encountered: