gpt-pilot
gpt-pilot copied to clipboard
[Bug]: When initializing GPT Pilot, the VSCode extension overwrites/clears existing GPT Pilot project database
Version
VisualStudio Code extension
Operating System
Linux (other)
What happened?
This happens on any OS.
The VSCode extension calls database init, which overwrites/clears the database. This is okay in 99% of the cases, but if the developer was previously using GPT Pilot from the command line, or set up VSCode in that directory previously (and then switched away from it), the init process will happily overwrite the database, destroying data.
Ideally, we'd want to check if the database exists before overwriting it. (This may cause problems down the line with schema migrations.)