-
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
Edit: Use a tracked originalRange
when retrying a task
#1926
Conversation
originalRange
when retrying a task
b7cb7e4
to
0bd29b6
Compare
* Only handles edits that are outside of the range, as it is purely focused on shifting a fixed range in a document. | ||
* Does not expand or shrink the original rank. | ||
*/ | ||
export function updateFixedRange(range: vscode.Range, change: TextChange): vscode.Range { |
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.
Seems like a good candidate for a unit test.
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.
Agree, have added a test!
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.
Nice!
Description
RetryLogic.mov
Follow up on: #1892 (comment)
We were retrying fixup tasks with the
selectionRange
- this is not suitable as this range may shrink or expand depending on the code that the LLM produces.Instead we should use the
originalRange
- the range that is provided when the fixup task is created. We still need to track the positions of the range, as it could shift due to code being added above.Test plan