Frontend: Implement real terminal with xterm.js (#39)

* Add xterm terminal

* Remove unused code blocks

* Update README.md with terminal documentation

* Update frontend/README.md

Co-authored-by: Graham Neubig <neubig@gmail.com>

---------

Co-authored-by: Graham Neubig <neubig@gmail.com>
This commit is contained in:
Jim Su
2024-03-17 23:33:48 -04:00
committed by GitHub
parent 346e992276
commit cf97b66ff9
5 changed files with 74 additions and 23 deletions

View File

@@ -42,3 +42,11 @@ You dont have to ever use `eject`. The curated feature set is suitable for sm
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
## Terminal
The OpenDevin terminal is powered by [Xterm.js](https://github.com/xtermjs/xterm.js).
The terminal listens for events over a WebSocket connection. The WebSocket URL is specified by the environment variable `REACT_APP_TERMINAL_WS_URL` (prepending `REACT_APP_` to environment variable names is necessary to expose them).
A simple websocket server can be found in the `/server` directory.