gpt-pilot
gpt-pilot copied to clipboard
[Howto]: Remove items from list of previously written apps
Version
VisualStudio Code extension
Operating System
Windows 11
Your question
How do I remove items from the list of previous projects? Load apps option brings up a long list which is difficult to navigate. Deleting the app folders from the workspace did not remove it from the list.
this is a bump
I'm guessing you'd need to delete them from the gpt-pilot sqllite database that stores project info.
Another useful ability would be to delete changes, layer by layer. I have seen the pilot make huge mistakes, like overwriting working app because of some misunderstanding of what the next change should do. I'd want to be able to clean out the last changes, i.e. undo like is possible to do in an editor.
Hi I was giving this a try, and it appears that the functionality was added, but when I tried it, I got an error...
# python main.py --delete-app app_id=17816236-fce0-4d98-a89a-a1beee4f3f32
------------------ LOADING PROJECT ----------------------
new-mahjong-trainer (app_id=17816236-fce0-4d98-a89a-a1beee4f3f32)
--------------------------------------------------------------
---------- GPT PILOT EXITING WITH ERROR ----------
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/peewee.py", line 3251, in execute_sql
cursor.execute(sql, params or ())
psycopg2.errors.UndefinedFunction: operator does not exist: uuid = boolean
LINE 1: ..."t1"."status" FROM "app" AS "t1" WHERE ("t1"."id" = true) LI...
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/app/pilot/main.py", line 97, in <module>
delete_app(app_id)
File "/usr/src/app/pilot/database/database.py", line 483, in delete_app
app = get_app(app_id, False)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/app/pilot/database/database.py", line 290, in get_app
app = App.get(App.id == app_id)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/peewee.py", line 6688, in get
return sq.get()
^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/peewee.py", line 7136, in get
return clone.execute(database)[0]
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/peewee.py", line 1971, in inner
return method(self, database, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/peewee.py", line 2042, in execute
return self._execute(database)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/peewee.py", line 2215, in _execute
cursor = database.execute(self)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/peewee.py", line 3259, in execute
return self.execute_sql(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/peewee.py", line 3249, in execute_sql
with __exception_wrapper__:
File "/usr/local/lib/python3.11/site-packages/peewee.py", line 3019, in __exit__
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "/usr/local/lib/python3.11/site-packages/peewee.py", line 192, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.11/site-packages/peewee.py", line 3251, in execute_sql
cursor.execute(sql, params or ())
peewee.ProgrammingError: operator does not exist: uuid = boolean
LINE 1: ..."t1"."status" FROM "app" AS "t1" WHERE ("t1"."id" = true) LI...
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
gpt-pilot-postgres-1 | 2024-04-15 21:51:06.702 UTC [10123] ERROR: operator does not exist: uuid = boolean at character 153
gpt-pilot-postgres-1 | 2024-04-15 21:51:06.702 UTC [10123] HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
gpt-pilot-postgres-1 | 2024-04-15 21:51:06.702 UTC [10123] STATEMENT: SELECT "t1"."id", "t1"."created_at", "t1"."updated_at", "t1"."user_id", "t1"."app_type", "t1"."name", "t1"."status" FROM "app" AS "t1" WHERE ("t1"."id" = true) LIMIT 1 OFFSET 0
Cheers
Looks like the correct CLI command to delete your app should be:
# python main.py --delete-app=17816236-fce0-4d98-a89a-a1beee4f3f32
Ah yes, that does seem to work. I'm not sure where I was reading the other syntax I tried.
Cheers