Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardise file names path #684

Merged
merged 3 commits into from
Sep 7, 2023
Merged

Standardise file names path #684

merged 3 commits into from
Sep 7, 2023

Conversation

AntonOsika
Copy link
Collaborator

No description provided.

…iable in `gpt_engineer/file_selector.py`.

# Aider chat conversation:

USER: replace the file_list.txt string with the FILE_LIST_NAME variable in file_sele

ASSISTANT: I'm sorry, but your request is not clear. Could you please provide more details? Specifically, I need to know the exact file where the change should be made and the context of the `file_list.txt` string and `FILE_LIST_NAME` variable.

USER: replace the 'file_list.txt' string that exists in many places with the FILE_LIST_NAME variable in `gpt_engineer/file_selector.py` by importing it

ASSISTANT: To replace the 'file_list.txt' string with the FILE_LIST_NAME variable in `gpt_engineer/file_selector.py`, we need to modify the `gpt_engineer/file_selector.py` file. Here are the changes:

```python
gpt_engineer/file_selector.py
<<<<<<< ORIGINAL
if "file_list.txt" in db_input:
    use_last_string = (
        "3. Use previous file list (available at "
        + f"{os.path.join(db_input.path, 'file_list.txt')})\n"
    )
    selection_number = 3
else:
    selection_number = 1
=======
if FILE_LIST_NAME in db_input:
    use_last_string = (
        "3. Use previous file list (available at "
        + f"{os.path.join(db_input.path, FILE_LIST_NAME)})\n"
    )
    selection_number = 3
else:
    selection_number = 1
>>>>>>> UPDATED
```

```python
gpt_engineer/file_selector.py
<<<<<<< ORIGINAL
if not selection_number == 3:
    db_input["file_list.txt"] = "\n".join(file_path_list)
=======
if not selection_number == 3:
    db_input[FILE_LIST_NAME] = "\n".join(file_path_list)
>>>>>>> UPDATED
```

Please confirm these changes.
…e in `gpt_engineer/chat_to_files.py`.

# Aider chat conversation:

USER: abort

ASSISTANT: Alright, the operation has been aborted. If you have any other requests or need further assistance, feel free to ask.

USER: add `gpt_engineer/chat_to_files.py` and do the same as above

ASSISTANT: To replace the 'file_list.txt' string with the FILE_LIST_NAME variable in `gpt_engineer/chat_to_files.py`, we need to modify the `gpt_engineer/chat_to_files.py` file. Here are the changes:

```python
gpt_engineer/chat_to_files.py
<<<<<<< ORIGINAL
files_paths = input["file_list.txt"].strip().split("\n")
=======
files_paths = input[FILE_LIST_NAME].strip().split("\n")
>>>>>>> UPDATED
```

Please confirm these changes.
@AntonOsika AntonOsika merged commit 18840ec into main Sep 7, 2023
4 checks passed
@AntonOsika AntonOsika deleted the ao/standardise-path branch September 7, 2023 20:19
70ziko pushed a commit to 70ziko/gpt-engineer that referenced this pull request Oct 25, 2023
* aider: Replace the 'file_list.txt' string with the FILE_LIST_NAME variable in `gpt_engineer/file_selector.py`.

# Aider chat conversation:

USER: replace the file_list.txt string with the FILE_LIST_NAME variable in file_sele

ASSISTANT: I'm sorry, but your request is not clear. Could you please provide more details? Specifically, I need to know the exact file where the change should be made and the context of the `file_list.txt` string and `FILE_LIST_NAME` variable.

USER: replace the 'file_list.txt' string that exists in many places with the FILE_LIST_NAME variable in `gpt_engineer/file_selector.py` by importing it

ASSISTANT: To replace the 'file_list.txt' string with the FILE_LIST_NAME variable in `gpt_engineer/file_selector.py`, we need to modify the `gpt_engineer/file_selector.py` file. Here are the changes:

```python
gpt_engineer/file_selector.py
<<<<<<< ORIGINAL
if "file_list.txt" in db_input:
    use_last_string = (
        "3. Use previous file list (available at "
        + f"{os.path.join(db_input.path, 'file_list.txt')})\n"
    )
    selection_number = 3
else:
    selection_number = 1
=======
if FILE_LIST_NAME in db_input:
    use_last_string = (
        "3. Use previous file list (available at "
        + f"{os.path.join(db_input.path, FILE_LIST_NAME)})\n"
    )
    selection_number = 3
else:
    selection_number = 1
>>>>>>> UPDATED
```

```python
gpt_engineer/file_selector.py
<<<<<<< ORIGINAL
if not selection_number == 3:
    db_input["file_list.txt"] = "\n".join(file_path_list)
=======
if not selection_number == 3:
    db_input[FILE_LIST_NAME] = "\n".join(file_path_list)
>>>>>>> UPDATED
```

Please confirm these changes.

* aider: Replace 'file_list.txt' string with the FILE_LIST_NAME variable in `gpt_engineer/chat_to_files.py`.

# Aider chat conversation:

USER: abort

ASSISTANT: Alright, the operation has been aborted. If you have any other requests or need further assistance, feel free to ask.

USER: add `gpt_engineer/chat_to_files.py` and do the same as above

ASSISTANT: To replace the 'file_list.txt' string with the FILE_LIST_NAME variable in `gpt_engineer/chat_to_files.py`, we need to modify the `gpt_engineer/chat_to_files.py` file. Here are the changes:

```python
gpt_engineer/chat_to_files.py
<<<<<<< ORIGINAL
files_paths = input["file_list.txt"].strip().split("\n")
=======
files_paths = input[FILE_LIST_NAME].strip().split("\n")
>>>>>>> UPDATED
```

Please confirm these changes.

* Fix import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant