dependabot[bot] 4533c47595 chore(deps-dev): bump @types/node from 22.7.2 to 22.7.3 in /frontend (#4081) 1 жил өмнө
..
.husky 8bfa61f3e4 Run package commands directly (#3013) 1 жил өмнө
public 243cb492aa Run pre-commit on all files (#3884) 1 жил өмнө
scripts e32d95cb1a lint: simplify hooks already covered by Ruff (#1204) 1 жил өмнө
src 29c34e0b6a (fix) actions.ts: restored handleAssistantMessage handling order (#4074) 1 жил өмнө
.env e32d95cb1a lint: simplify hooks already covered by Ruff (#1204) 1 жил өмнө
.eslintrc 63a3285b23 Disable eslint rule that throws useeffect warning (#2600) 1 жил өмнө
.gitignore 0534c14279 feat: i18n (#723) 1 жил өмнө
.npmrc 0534c14279 feat: i18n (#723) 1 жил өмнө
.prettierrc.json e32d95cb1a lint: simplify hooks already covered by Ruff (#1204) 1 жил өмнө
README.md 01ae22ef57 Rename OpenDevin to OpenHands (#3472) 1 жил өмнө
index.html 01ae22ef57 Rename OpenDevin to OpenHands (#3472) 1 жил өмнө
package-lock.json 4533c47595 chore(deps-dev): bump @types/node from 22.7.2 to 22.7.3 in /frontend (#4081) 1 жил өмнө
package.json 4533c47595 chore(deps-dev): bump @types/node from 22.7.2 to 22.7.3 in /frontend (#4081) 1 жил өмнө
postcss.config.js 658b860d04 feat: support tailwind and daisyUI (#266) 1 жил өмнө
tailwind.config.js 93d8ee1400 Render messages in markdown (#1391) 1 жил өмнө
test-utils.tsx 426f387123 setup env for controlled integration tests with redux (#1180) 1 жил өмнө
tsconfig.json b0c3bca915 refactor(frontend): Refactor imports to use absolute path (#1288) 1 жил өмнө
vite-env.d.ts cac687508f cra -> vite (#47) 1 жил өмнө
vite.config.ts 9b0ff117ab CI: Support uploading frontend unit test coverage. (#2772) 1 жил өмнө
vitest.setup.ts 88ef414e3a fix warnings during test runs (#1638) 1 жил өмнө

README.md

Getting Started with the OpenHands Frontend

The frontend code can be run against the docker image defined in the Main README as a backend

Prerequisites

A recent version of NodeJS / NPM (brew install node)

Available Scripts

In the project directory, you can run:

npm run start -- --port 3001

Runs the app in development mode.\ Open http://localhost:3001 to view it in the browser.

The page will reload if you make edits.\ You will also see any lint errors in the console.

npm run make-i18n

Generates the i18n declaration file.\ Run this when first setting up the repository or when updating translations.

npm run test

Runs the available test suites for the application.\ It launches the test runner in interactive watch mode, allowing you to see the results of your tests in real time.

In order to skip all but one specific test file, like the one for the ChatInterface, the following command might be used: npm run test -- -t "ChatInterface"

npm run build

Builds the app for production to the dist folder.\ It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\ Your app is ready to be deployed!

Environment Variables

You can set the environment variables in frontend/.env to configure the frontend. The following variables are available:

VITE_BACKEND_HOST="127.0.0.1:3000" // The host of the backend
VITE_USE_TLS="false"               // Whether to use TLS for the backend (includes HTTPS and WSS)
VITE_INSECURE_SKIP_VERIFY="false"  // Whether to skip verifying the backend's certificate. Only takes effect if `VITE_USE_TLS` is true. Don't use this in production!
VITE_FRONTEND_PORT="3001"          // The port of the frontend

You can also set the environment variables from outside the project, like export VITE_BACKEND_HOST="127.0.0.1:3000".

The outside environment variables will override the ones in the .env file.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

For more information on tests, you can refer to the official documentation of Vitest and React Testing Library.