Closed Tracker647 closed 8 months ago
When you run the “CodeSwing: New Swing” command, you’re creating an entirely new swing, based on the template you selected. So if you select a directory that already includes a swing, it would override the existing files. Based on the video you linked, that’s what is happening.
If you want to open an existing swing, you can run the “CodeSwing: Open Swing” command, which lets you select a directory, and opens the swing editor for the respective files. Alternatively, if you open a swing directory directly in VS Code, then the swing will automatically open, since CodeSwing can recognize that the workspace is a swing. Could you try this command and see if it works as expected for you?
To prevent confusion, we could probably update the “CodeSwing: New Swing” command to check for an existing swing in the selected directory, and ask the user to confirm that they want to overwrite it. I’ll try to make that change this afternoon 👍
Closing this as not planned, since I never heard any other feedback about this behavior.
my operation step: 1.ctrl+shift+p: code swing: create a new swing 2.select the demo folder(rock-paper-scissors-master) 3.select basic:html/css/javascript then I find all my file contents is gone,why?