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

Feature Improve CLI App #1154

Draft
wants to merge 42 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
bec7cff
ensure we have latest gpt-4-turbo model costs
TheoMcCabe Apr 18, 2024
cf689e7
hmm
TheoMcCabe Apr 18, 2024
d5d6104
get started
TheoMcCabe May 6, 2024
9d02097
Merge branch 'main' into lite
TheoMcCabe May 6, 2024
34b2f21
WIP
TheoMcCabe May 6, 2024
e9d00e4
Merge branch 'lite' of https://github.com/mynt-ai/gpt-engineer into lite
TheoMcCabe May 6, 2024
6e3bbdc
guess so
TheoMcCabe May 8, 2024
4c7a9b9
wip
TheoMcCabe May 9, 2024
ca15c7a
ye
TheoMcCabe May 9, 2024
3b5a782
rename files
TheoMcCabe May 12, 2024
6c8e9d8
add steps
TheoMcCabe May 12, 2024
8d9850c
improve runs
TheoMcCabe May 12, 2024
6470e30
linting pre commit
TheoMcCabe May 13, 2024
f43e288
wip
TheoMcCabe May 13, 2024
689a0c2
works with a task given
TheoMcCabe May 14, 2024
d91b373
update sub project
TheoMcCabe May 14, 2024
1693257
ignore feature
TheoMcCabe May 14, 2024
fe31d62
push tings
TheoMcCabe May 14, 2024
1398726
fix main cli app
TheoMcCabe May 14, 2024
eda60e0
basics
TheoMcCabe May 14, 2024
a5aea1a
remove prints
TheoMcCabe May 14, 2024
8643214
running to end
TheoMcCabe May 14, 2024
8977e8e
running in little loop
TheoMcCabe May 15, 2024
4ead7b1
Merge branch 'main' into lite
TheoMcCabe May 16, 2024
dd6daf6
wip
TheoMcCabe May 20, 2024
6b5ac55
Merge branch 'lite' of https://github.com/mynt-ai/gpt-engineer into lite
TheoMcCabe May 20, 2024
d20c786
wip -bad fuzzy matching
TheoMcCabe May 20, 2024
646a5bd
working to the end of first task
TheoMcCabe May 21, 2024
d9e2a40
basically working
TheoMcCabe May 21, 2024
f5e38fe
WIP
TheoMcCabe May 22, 2024
6525194
chat working
TheoMcCabe May 23, 2024
2704496
cool
TheoMcCabe May 23, 2024
802ec8a
wip
TheoMcCabe May 26, 2024
2142be4
roughly working
TheoMcCabe Jun 6, 2024
7ffc87e
WIP
TheoMcCabe Jun 6, 2024
319990a
working nicely
TheoMcCabe Jun 10, 2024
320588c
delete old one
TheoMcCabe Jun 10, 2024
e2da9c7
feature cli
TheoMcCabe Jun 11, 2024
d93ca36
hmmm
TheoMcCabe Jun 11, 2024
ddb5a1b
Merge branch 'main' into lite
TheoMcCabe Jun 11, 2024
59e4943
chat agent working
TheoMcCabe Jun 11, 2024
c216e6d
Merge branch 'lite' of https://github.com/mynt-ai/gpt-engineer into lite
TheoMcCabe Jun 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
253 changes: 253 additions & 0 deletions .feature/files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,253 @@
# Uncomment any files you would like to use for this feature
# Note that (./) is a special key which represents files at the root of the parent directory

.feature:
#- files.yml
.github:
ISSUE_TEMPLATE:
#- bug-report.md
#- documentation-clarification.md
#- feature-request.md
PULL_REQUEST_TEMPLATE:
#- PULL_REQUEST_TEMPLATE.md
workflows:
#- automation.yml
#- ci.yaml
#- pre-commit.yaml
#- release.yaml
(./):
#- CODEOWNERS
#- CODE_OF_CONDUCT.md
#- CONTRIBUTING.md
#- FUNDING.yml
docker:
#- Dockerfile
#- README.md
#- entrypoint.sh
docs:
examples:
open_llms:
#- README.md
#- langchain_interface.py
#- openai_api_interface.py
(./):
#- Makefile
#- api_reference.rst
#- code_conduct_link.rst
#- conf.py
#- contributing_link.rst
#- create_api_rst.py
#- disclaimer_link.rst
#- docs_building.md
#- index.rst
#- installation.rst
#- introduction.md
#- make.bat
#- open_models.md
#- quickstart.rst
#- roadmap_link.rst
#- terms_link.rst
#- tracing_debugging.md
#- windows_readme_link.rst
gpt_engineer:
applications:
cli:
#- __init__.py
#- cli_agent.py
#- collect.py
#- file_selector.py
#- learning.py
#- main.py
feature_cli:
agents:
- __init__.py
- agent_steps.py
- chat_agent.py
- feature_agent.py
prompts:
- __init__.py
- fuzzy_file_parser
(./):
- __init__.py
- domain.py
- feature.py
- file_selection.py
- files.py
- generation_tools.py
- main.py
- repository.py
(./):
#- __init__.py
benchmark:
benchmarks:
apps:
#- load.py
#- problem.py
#- problems.py
gptme:
#- load.py
mbpp:
#- load.py
#- problem.py
#- problems.py
(./):
#- load.py
(./):
#- __init__.py
#- __main__.py
#- bench_config.py
#- default_bench_config.toml
#- run.py
#- types.py
core:
default:
#- __init__.py
#- constants.py
#- disk_execution_env.py
#- disk_memory.py
#- file_store.py
#- paths.py
#- simple_agent.py
#- steps.py
(./):
#- __init__.py
#- ai.py
#- base_agent.py
#- base_execution_env.py
#- base_memory.py
#- chat_to_files.py
#- diff.py
#- files_dict.py
#- git.py
#- linting.py
#- preprompts_holder.py
#- project_config.py
#- prompt.py
#- token_usage.py
#- version_manager.py
preprompts:
#- clarify
#- entrypoint
#- file_format
#- file_format_diff
#- file_format_fix
#- generate
#- improve
#- philosophy
#- roadmap
tools:
#- __init__.py
#- custom_steps.py
#- supported_languages.py
(./):
#- __init__.py
projects:
example:
#- prompt
example-improve:
#- README.md
#- controller.py
#- main.py
#- model.py
#- prompt
#- requirements.txt
#- run.sh
#- view.py
example-vision:
images:
#- ux_diagram.png
(./):
#- navigation.html
#- prompt
scripts:
#- clean_benchmarks.py
#- legacy_benchmark.py
#- print_chat.py
#- test_api.py
tests:
applications:
cli:
#- __init__.py
#- test_cli_agent.py
#- test_collect.py
#- test_collection_consent.py
#- test_learning.py
#- test_main.py
feature_cli:
#- __init__.py
#- test_file_selection.py
(./):
#- __init__.py
benchmark:
#- test_BenchConfig.py
core:
default:
#- __init__.py
#- test_disk_execution_env.py
#- test_disk_file_repository.py
#- test_simple_agent.py
#- test_steps.py
improve_function_test_cases:
#- apps_benchmark_6_chat
#- apps_benchmark_6_code
#- apps_benchmark_6_v2_chat
#- apps_benchmark_6_v2_code
#- controller_chat
#- controller_code
#- corrected_diff_from_missing_lines
#- create_two_new_files_chat
#- create_two_new_files_code
#- simple_calculator_chat
#- simple_calculator_code
#- task_master_chat
#- task_master_code
#- temperature_converter_chat
#- temperature_converter_code
#- theo_case_chat
#- theo_case_code
#- vgvishesh_example_2_chat
#- vgvishesh_example_2_code
#- vgvishesh_example_chat
#- vgvishesh_example_code
#- wheaties_example_chat
#- wheaties_example_code
(./):
#- __init__.py
#- test_ai.py
#- test_chat_to_files.py
#- test_git.py
#- test_salvage_correct_hunks.py
#- test_token_usage.py
test_data:
#- mona_lisa.jpg
tools:
#- example_snake_files.py
(./):
#- __init__.py
#- ai_cache.json
#- mock_ai.py
#- test_install.py
#- test_project_config.py
(./):
#- .dockerignore
#- .env.template
#- .gitignore
#- .pre-commit-config.yaml
#- .readthedocs.yaml
#- Acknowledgements.md
#- DISCLAIMER.md
#- GOVERNANCE.md
#- LICENSE
#- MANIFEST.in
#- Makefile
#- README.md
#- ROADMAP.md
#- TERMS_OF_USE.md
#- WINDOWS_README.md
#- citation.cff
#- docker-compose.yml
#- poetry.lock
#- pyproject.toml
#- quicktest.py
#- sweep.yaml
#- tox.ini
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ webapp/.next/
gpt_engineer/benchmark/benchmarks/apps/dataset
gpt_engineer/benchmark/benchmarks/mbpp/dataset

prompt

.feature
.task

gpt_engineer/benchmark/minimal_bench_config.toml

test.json
26 changes: 9 additions & 17 deletions gpt_engineer/applications/cli/file_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import fnmatch
import os
import platform
import subprocess

from pathlib import Path
Expand Down Expand Up @@ -218,32 +219,23 @@ def open_with_default_editor(self, file_path: Union[str, Path]):
The path to the file to be opened in the text editor.
"""

editors = [
"gedit",
"notepad",
"nvim",
"write",
"nano",
"vim",
"emacs",
] # Putting the beginner-friendly text editor forward
chosen_editor = os.environ.get("EDITOR")

# Try the preferred editor first, then fallback to common editors
if chosen_editor:
try:
subprocess.run([chosen_editor, file_path])
subprocess.run([chosen_editor, str(file_path)], check=True)
return
except Exception:
pass

for editor in editors:
try:
subprocess.run([editor, file_path])
return
except Exception:
continue
print("No suitable text editor found. Please edit the file manually.")
# Platform-specific methods to open the file
if platform.system() == "Windows":
os.startfile(file_path)
elif platform.system() == "Darwin":
subprocess.run(["open", file_path])
else: # Linux and other Unix-like systems
subprocess.run(["xdg-open", file_path])

def is_utf8(self, file_path: Union[str, Path]) -> bool:
"""
Expand Down
2 changes: 0 additions & 2 deletions gpt_engineer/applications/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,6 @@ def main(
files = FileStore(project_path)
if not no_execution:
if improve_mode:
files_dict_before, is_linting = FileSelector(project_path).ask_for_files()

# lint the code
if is_linting:
files_dict_before = files.linting(files_dict_before)
Expand Down
Empty file.
Empty file.
Loading
Loading