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

[Howto]: Remove items from list of previously written apps

Open unseensholar opened this issue 11 months ago • 6 comments

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.

unseensholar avatar Mar 17 '24 11:03 unseensholar

this is a bump

nikzart-temp avatar Mar 20 '24 09:03 nikzart-temp

I'm guessing you'd need to delete them from the gpt-pilot sqllite database that stores project info.

luyandadhlamini2 avatar Mar 22 '24 05:03 luyandadhlamini2

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.

phalexo avatar Mar 25 '24 00:03 phalexo

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

bunder2015 avatar Apr 15 '24 21:04 bunder2015

Looks like the correct CLI command to delete your app should be: # python main.py --delete-app=17816236-fce0-4d98-a89a-a1beee4f3f32

Broctune avatar Apr 24 '24 21:04 Broctune

Ah yes, that does seem to work. I'm not sure where I was reading the other syntax I tried.

Cheers

bunder2015 avatar Apr 25 '24 22:04 bunder2015