Remove the `@spfx /code` Chat Participant command
Currently we expose a few of the GitHub Copilot Chat commands and two of them are considered still beta: /code and /manage.
I suggest we should get rid of the /code command and replace it with a set of LLM Tools for the GitHub Copilot Edit and Agent mode. Mainly due to te fact that:
- this chat command results is quite bad and we have very little space to improve it as we are already locked by the token limit for providing context
- this only works in
askmode so it will not modify your code in the SPFx app but just provide you an answer what may you do and then you need to copy/paste it manually. That was like the way to go last year but now this is replaced with Edit and Agent mode which really gives you te ability to create new files or modify existing files of your project. This is a lot better - we could replace this with a few code related tools that would dynamically grab the context from the site. Like docs of PnPjs to provide best answer or modifications for your project.
- Agent mode is full context aware about your project, so already knows what libraries you have in package.json file. in ask mode we need to drag and drop it manually every time which is a pain
Looks good to me! Wondering if we can also grab dynamically the context of learn.microsoft? 🤔
Looks good to me! Wondering if we can also grab dynamically the context of learn.microsoft? 🤔
Not really an easy thing to do. We would need to have it somehow indexed on our side with a service like Azure Search which is not free
Let's research a bit and do a follow up issue what we want to replace the /code command with. What LLM tools we could provide and how would they work and then let's open this issue up to remove the current code chat command
I wonder will there be that many SPFx related coding patterns. What we could do is just store this as dynamically retrieved context (similar like we do for the samples for the sample gallery) Since for the current moment we don't have anything better lets remove this chat command and explore better possibilities for it as LM tools for agent mode
Actually, I noticed that docs of SP dev docs was indexed using Context7 https://context7.com/sharepoint/sp-dev-docs They expose an MCP server and this allows to use SPFx docs as part of any prompt and I say it provides quite good results. Maybe we could just add guidance around it 🤔 Or create a blog post how to use it. For now I have few plans for LM tools that will support project related operations
ok lets remove the spfx chat command to do a clean up of this functionality for now. I'll take it