-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[Refactor] Decouple Tool-Specific Cancellation Logic from SchedulerStateManager
#23699
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -257,6 +257,13 @@ class WriteFileToolInvocation extends BaseToolInvocation< | |
| } | ||
| }, | ||
| ideConfirmation, | ||
| cancelResult: { | ||
| fileDiff, | ||
| fileName, | ||
| filePath: this.resolvedPath, | ||
| originalContent, | ||
| newContent: correctedContent, | ||
| }, | ||
|
Comment on lines
+260
to
+266
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This refactoring correctly moves the responsibility of creating the To fix this regression, please calculate and include the cancelResult: {
fileDiff,
fileName,
filePath: this.resolvedPath,
originalContent,
newContent: correctedContent,
diffStat: getDiffStat(
fileName,
originalContent,
correctedContent,
correctedContent,
),
}, |
||
| }; | ||
| return confirmationDetails; | ||
| } | ||
|
|
||
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.
This test is a great addition to verify that
cancelResultis populated. To make it more robust and ensure it covers the full data contract, please also assert thatcancelResult.diffStatis populated correctly. Thestate-manager.test.tsfile includes a similar check, which confirms thatdiffStatis an expected part of the result.