-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Copilot-based TS refactors #192602
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
Copilot-based TS refactors #192602
Conversation
Not done switching quick fix code to use CompositeCommand instead of passing a followup to ApplyCodeActionCommand.
Initial hacky versions only
Results are not pretty good yet. They are still below average.
Except for a couple that still rely only on navtree-based expansion. Lots of cleanup and standardisation.
Remove unused, abandoned ideas.
@sandersn There are some eslint failures. You can see them when running I wonder if we should grow the |
Ah, that's right. I completely messed up the setup of vscode's formatter, so I skipped the precommit hook. I'll go back and figure that out so the machine can fix the formatting for me. Edit: I didn't know about |
OK, I added a more complex options object. If you just create the top-level object as I don't know if this is the usual way to do it, so please let me know if there's a standard I should follow. |
I realised that the config still effectively defaulted to true, and that the altered descriptions weren't working. |
Linux smoke test case failed: But I don't see how that could be related to my change. |
Merging caused a build failure down the line (when doing the product build...) A revert PR is up (#193810) and this needs to be reopened and looked at again |
How can I see the build failure? |
Copilot-based TS refactors
This PR adds copilot suggestions to various Typescript refactors and quickfixes. It also adds a separate quickfix for implicit any that lets Copilot infer types from the body of a function, which is less context than the TS codefix. However, it creates new interfaces with reasonable names and uses them where appropriate, which the TS codefix cannot.
The existing refactor/quickfixes are followed by Copilot's inline chat now:
throw new Error("Not implemented")
.I think the the UX and performance are both good enough for insider use at this point, so I think it's worth merging behind the
typescript.experimental.aiQuickFix
flag.Some future work:
Extends #190690
Question and work from that PR that are now resolved: