gpt-pilot icon indicating copy to clipboard operation
gpt-pilot copied to clipboard

[Bug]: When initializing GPT Pilot, the VSCode extension overwrites/clears existing GPT Pilot project database

Open senko opened this issue 1 year ago • 0 comments

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.)

senko avatar Dec 26 '23 17:12 senko