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

Remove "run_id" and "delete_existing" options: instead move old memory/workspace folder to "archive" by default

Open AntonOsika opened this issue 1 year ago • 9 comments

The first step in the main file would be to check for memory folder and workspace, if they exist create a new folder in "archive" e.g. with the name "currentdate_currenttime", and move everything there.

This would make main.py much nicer, and make it clearly defined that all files, apart from archive folder, in the project directory are from the most recent run.

(It is also a prerequisite to later add handling of logging to separate files when there are "multiple of the same steps")

AntonOsika avatar Jun 25 '23 07:06 AntonOsika

I realize the better workflow is probably this:

Copy the entire project's folder to the new archive folder. Delete memory folder. Let the to_files function delete the workspace right before it writes new files.

AntonOsika avatar Jun 25 '23 07:06 AntonOsika

Can I work on this ?

AmanSal1 avatar Jun 25 '23 08:06 AmanSal1

@AmanSal1 it's yours!

Let's go 🏃

AntonOsika avatar Jun 25 '23 10:06 AntonOsika

That's what I imagine tree to look like. @AntonOsika Please confirm We'd need to store a timestamp when generating code to then put it as a folder's name Is logs a right place for it?

- projects/snake
  - archive/
    - 20230625_134611/
      - memory/
      - workspace/
      - prompt
    - 20230625_124807/
      - memory/
      - workspace/
      - prompt
   - memory/
   - workspace/
   - prompt

azrv avatar Jun 25 '23 10:06 azrv

@azrv Are you working on this ?

AmanSal1 avatar Jun 25 '23 11:06 AmanSal1

@AmanSal1 I can leave this one for you :)

azrv avatar Jun 25 '23 11:06 azrv

@azrv no no if you are doing it you can go ahead no issue :)

AmanSal1 avatar Jun 25 '23 11:06 AmanSal1

Looks good @azrv!

EDIT: Your format for files looks better

AntonOsika avatar Jun 25 '23 12:06 AntonOsika

I'm assuming this is no longer an open issue since changes have been merged, but just wanted to check if I'm missing something since this issue is still open?

piyushnags avatar Jul 15 '23 17:07 piyushnags

Yup solved! Good job.

AntonOsika avatar Aug 15 '23 19:08 AntonOsika