Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For Feb ScoreCard Day, I played around with AI to change the TableViewDemos repo to use CollectionViews.
I used VSCode on Mac (and later VSCode Insiders).
Debugging
I had issues with Hot Reload in the past (1.5 months ago) so I turned it off. I enabled all the Hot Reload settings today and was very surprised how quickly the xaml hot reload fired. I didn't even have to save the changes and saw it updating text in real time which was fun to see.
Changing to CollectionViews
VSCode CoPilot
I started this task with VSCode copilot. I highlighted the mainpage.xaml and pasted in the mainpage.xaml.cs and instructed copilot to change this to a CollectionView. It gave me some changes for both files that did not compile. It successfully changed the TableView to a CollectionView, but the content of the new CollectionView was a TextCell and it was not successful in fixing this error after asking it more about it. After that, there were issues with the Binding for the command that copilot was not able to fix.
ChatGPT
Using GPT-4 Turbo, I pasted my mainpage.xaml and my mainpage.xaml.cs file and asked it to change the tableview to a collectionview. I loved the presentation of the changes with the colors and grouping and made it a lot easier to digest. I know that the vscode copilot has a significant less amount of real estate though but that was my initial reaction.
It gave me two solutions, the first was a solution that involved a SwipeView on the CollectionView and I have no idea why it tried to add that. The second solution was considered a 'simplified' version that was pretty much what copilot offered me but had a label inside instead of a TextCell.
However, with the code it gave me, the CollectionView did not show anything with either solution. After asking it a few times, it did not come up with an answer why. The Binding Context for the CollectionView's DataTemplate was not correct.
CoPilot Agentic Mode
I had not heard of the Agentic Mode before and my first impression of it is that it is spectacular. I did the same thing as the two previous chats where I gave it the mainpage.xaml and the mainpage.xaml.cs. It did the same thing that vscode copilot did where it created a CollectionView with a TextCell inside - incorrect. It makes sense though since I was pretty much doing the same exact thing. I did change the model from GPT-4o to Claude 3.7 Sonnet and that was a game changer. On the first try, it successfully changed the mainpage.xaml and the mainpage.xaml.cs to a CollectionView that worked on the first build. I was so blown away by this I just threw in the whole project and said to change every TableView to a CollectionView. This didn't work and created a bunch of errors.
It created some ViewModel files that were formatted very strangely. I was able to pass in the errors and told it fix them for about 5 passes and it didn't really solve any issues. I noticed that it was using Frames and it was not using Shadows on Borders correctly. It also seemed to be getting confused on Namespaces.
I undid all those changes and just went to another tableview with just the xaml and the xaml.cs file and it mostly was able to change that one without any issues.
Takeaways
Overall, this was a cool experiment and was a great introduction to Agentic Mode. As I type this out, I also see that I can use agentic mode inside the normal vscode that I have and can change the model which I had never tried. I will definitely play around more with other models like Claude going forward as well.