At a worst it provides a great starting point to jump off from, at best it writes it for me just like I would have (matching style/variable naming/etc).
At a worst it provides a great starting point to jump off from, at best it writes it for me just like I would have (matching style/variable naming/etc).
/*
<http request here>
The well-type class representation of this is:
*/
And then it spits out a totally sane and reasonable class. In this file I already have 10+ classes already defined and manually touched up by me to rename some things, remove some fields, etc. So every time I add a new one, Copilot takes into account the previous examples and each addition requires less or no manual tweaking.It's not like it's a ton of work to do that myself but normally the way I would accomplish it is to copy an existing function, change the return type, change the url, change the Vuex store it puts the data into but with CoPilot it handles that perfectly for me the vast majority of the time. And if I'm doing CRUD endpoint I don't even have to write the other function names, it will autocomplete the "RUD" part after I write the "C" (and by write I mean I put `createItem(payload: ICreateItemDTO)` or similar and it writes the body of the first function as well).
For me it's the perfect blend of "generated code" and "human tending" to get exactly what I need without having to do the repetitive/boring parts. It's been a joy to work with.
If I were to switch from Vuex to Pinia it would be the same amount of work with/without copilot. I don’t let copilot generate code without me reading/reviewing it and sometimes making tweaks. CoPilot literally (and I mean that) generates exactly what I was planning to write, if it doesn’t I start typing it my preferred way and often CoPilot then offers a completion in that style.
Without CoPilot the code would be virtually the same, so refactoring isn’t impacted one way or the other.