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

Enhancement-ready ReactJS application producing an optimized web interface with real-time Socket.IO support #860

Merged
merged 7 commits into from
Nov 24, 2023

Conversation

zdanl
Copy link

@zdanl zdanl commented Nov 22, 2023

Summary

⚡ The prospect of pushing GPT-Engineer forward, enhancing accessibility and comfort, lead to the task of forking an intuitive web interface (graphical user interface) running locally [0], which is also necessarily needed to load blazingly fast across web browsers, be optimized for mobile (as the best ideas to hand to an AI might come afk!) and to instantly update visible state in the browser. This includes code generation responses or clarifiying AI questions; as well the rendering of filesystem structure updates (soon to be handled in-memory instead of on-disk by the Python3 side, btw @ATheorell) in a tree structure, and to display all other events and changes, relevant data, which might be transmitted to the user, not only in real-time but in an intuitive, nice, fashion.

Architecture

  • Socket.IO : We decided for efficient push-not-pull interactions/messaging with the original (now modified for websockets) Python3 project and the Web application. We chose this over Agent Protocol or a REST API for true real-time updates.

  • ReactJS/Preact: We are aiming for highest quality of UI/UX and performance/efficiency in web development, not just a proof-of-concept. We might switch to Preact from ReactJS for further minification and loading speed enhancements, as it offers full compatbility with ReactJS; and to use Vite for fast builds. The application is now ready for WebSocket integration. This is probably best done in a ReactJS Context and Hook for Global State Sharing between Components. [1]

  • Original UI designers (so far!): The GUI was forked off this open source template [2] originally meant for ChatGPT.

  • Live Project Progress: https://github.com/users/zdanl/projects/10/views/1?layout=board

TODO

If you would like to enhance/fix web sockets in GPT-Engineer (Python3) or work on a great web application / integrate unfortunately https://socket.io (as it is incompatible with basic web sockets and sort of implements its own protocol, we need to update the Python code base a bit again), or help to transform the GUI into even better looking, please use this GUI Branch.

Screenshot 2023-11-22 at 20 09 29

Copy link
Contributor

sweep-ai bot commented Nov 22, 2023

Apply Sweep Rules to your PR?

  • Apply: Ensure all new functions and classes have very clear, concise and up-to-date docstrings. Take gpt_engineer/ai.py as a good example.

@zdanl
Copy link
Author

zdanl commented Nov 23, 2023

Screenshot_2023-11-23_at_22.19.31.png

@ATheorell React App is more than ready. Will try to port your websockets to socket.io-server tonight

@zdanl
Copy link
Author

zdanl commented Nov 24, 2023

Now it is fully functional on the Python3 GPT-Engineer Agent Socket.IO side, running uvicorn, as well, perfectly implemented socket.io-client in the ReactJS application.

There are 2 Typescript rather than Javascript specific bugs in the Frontend. I hope they will go away soon, but you can merge when ready with refactor. Python works.

zdanl@10cbea3

@ATheorell @AntonOsika

Screenshot 2023-11-24 at 01 40 54

@ATheorell ATheorell merged commit d104f01 into gpt-engineer-org:GUI Nov 24, 2023
1 check passed
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.

2 participants