entropy-research / Devon

Devon: An open-source pair programmer
GNU Affero General Public License v3.0
2.33k stars 169 forks source link

Maing websites (python http.server) prevents form continuation #46

Open w84death opened 1 month ago

w84death commented 1 month ago

Devon is waiting for the server to stop - but user can not do that. Perhaps there is an bug for killing the server.

I needed to kill devon, start again and continue each time. The old port was taken (so the server was still alive), devon was able to use next free port (8001, 8002).

Expected: devon should close the http server after user confirms that the page looks good. Or keep the server alive and do changes to the html/js files.

I can provide full log if needed.

akiradev0x commented 1 month ago

@w84death Hey this is awesome feedback! Yes please post a log, we will get to making a branch to fix it tomorrow or the day after

w84death commented 1 month ago

Correction: with simple websites devon creates needed files and "Devon has left the chat.".

Yesterday it created server few times. I think creating games or more interactive projects forces it to start the server that leads to the dead-end.

Unfortunately I ran out of my API credits to do more tests at the moment. My .bash_log only shows starting devon.

to reproduce try forcing it to start a local server.

EDIT: I got the files from that project and initial prompt:

User: Make a website about slugs. Why those are cool, what they like, how to keep one for yourself. Make it flashy, animated, use a lot of emojis. For european users and slug types

server.py

import http.server
import socketserver

PORT = 8007
DIRECTORY = "."

class Handler(http.server.SimpleHTTPRequestHandler):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, directory=DIRECTORY, **kwargs)

with socketserver.TCPServer(("", PORT), Handler) as httpd:
    print("Serving at port", PORT)
    httpd.serve_forever()

This is after many restart that's why it's 8007. It started at default 8000. Rest of the files are usual HTML/CSS files.

akiradev0x commented 2 weeks ago

@Mihir1003 should be taking care of this. should allow us to spawn off new processes. pinging to let him fill you in.