Repository navigation
Conversation
|
just noticed when doing different stuf that we should also remove vscode-viva/src/panels/CommandPanel.ts Line 365 in 62b5666 and vscode-viva/src/panels/CommandPanel.ts Line 376 in 62b5666 and with this change |
done ✅ |
e94ff50 to
223104a
Compare
| await Scaffolder.createProjectCopilot(yoCommand); | ||
|
|
||
| const response = `Created and executed the following SPFx command:\n\n\`\`\`\n${yoCommand}\n\`\`\``; | ||
|
|
||
| return new LanguageModelToolResult([new LanguageModelTextPart(response)]); |
There was a problem hiding this comment.
This works great, but not when you are in a workspace root on an existing SPFx solution where you already have a package.json. Then it produces a target folder containing only .yo-rc.json& project.pnp
So... The generator logs No change to package.json was detected. No package manager install will be executed. and exits 0, because createProjectCopilot always runs yo with workspace.workspaceFolders[0] as current working directory, and the generator picks up that ambient package.json and treats the call as "nothing to do" instead of scaffolding a fresh, independent solution in the target subfolder.
Scaffolding into a workspace root that is not itself an existing SPFx project works fine every time.
There was a problem hiding this comment.
right. So you mean for a scenario in which you already have an SPFx project and would like to extend it with additional SPFx component right?
There was a problem hiding this comment.
Yes, either it adds the right SPFx component, or it creates a new project in the existing project. But I would suggest the first 😄
| const yoCommand = commandParts.join(' '); | ||
|
|
||
| await Scaffolder.createProjectCopilot(yoCommand); | ||
|
|
There was a problem hiding this comment.
this is actually by design. We should scaffold a new project as fast as possible with skip install and reopen VS code in it and only then run npm install once VS Code is reopened in the newly created project.
Do you think this follow is correct? or what do you think we should correct?
There was a problem hiding this comment.
You're right. Ok to scaffold a new project as fast as possible. But then again, if the user adds the skip install parameter, it will still install the packages when VS reopens. Doesn't that feels contradictory?
|
Great work so far @Adam-it 👏; Can you take a look at the comments i left? Thank you! |
|
hey we just had a new minor release which means we aligned out main branch with dev. Please perform a rebase so we may proceed with a PR. You Rock 🤩 |
f88b65d to
4c99474
Compare
|
Hi @Adam-it 👋 We just released v4.23.0 and the |
4c99474 to
67d0dca
Compare


🎯 Aim
The aim of this PR is to depreacte the chat participant and remove the
/newchat command and refactor it to a dedicated language model tool that will execute the bestyocommand to create and SPFx project for user prompt📷 Result
✅ What was done
🔗 Related issue
Closes #707, #705