diff --git a/dev_config/python/.pre-commit-config.yaml b/dev_config/python/.pre-commit-config.yaml index e12f358fac..56053cba2f 100644 --- a/dev_config/python/.pre-commit-config.yaml +++ b/dev_config/python/.pre-commit-config.yaml @@ -3,9 +3,9 @@ repos: rev: v5.0.0 hooks: - id: trailing-whitespace - exclude: docs/modules/python + exclude: ^(docs/|modules/|python/|openhands-ui/) - id: end-of-file-fixer - exclude: docs/modules/python + exclude: ^(docs/|modules/|python/|openhands-ui/) - id: check-yaml args: ["--allow-multiple-documents"] - id: debug-statements diff --git a/openhands-ui/.gitignore b/openhands-ui/.gitignore new file mode 100644 index 0000000000..a14702c409 --- /dev/null +++ b/openhands-ui/.gitignore @@ -0,0 +1,34 @@ +# dependencies (bun install) +node_modules + +# output +out +dist +*.tgz + +# code coverage +coverage +*.lcov + +# logs +logs +_.log +report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# caches +.eslintcache +.cache +*.tsbuildinfo + +# IntelliJ based IDEs +.idea + +# Finder (MacOS) folder config +.DS_Store diff --git a/openhands-ui/README.md b/openhands-ui/README.md new file mode 100644 index 0000000000..fe17669335 --- /dev/null +++ b/openhands-ui/README.md @@ -0,0 +1,15 @@ +# openhands-ui + +To install dependencies: + +```bash +bun install +``` + +To run: + +```bash +bun run index.ts +``` + +This project was created using `bun init` in bun v1.2.16. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. diff --git a/openhands-ui/bun.lock b/openhands-ui/bun.lock new file mode 100644 index 0000000000..1d87c4af3a --- /dev/null +++ b/openhands-ui/bun.lock @@ -0,0 +1,25 @@ +{ + "lockfileVersion": 1, + "workspaces": { + "": { + "name": "openhands-ui", + "devDependencies": { + "@types/bun": "latest", + }, + "peerDependencies": { + "typescript": "^5", + }, + }, + }, + "packages": { + "@types/bun": ["@types/bun@1.2.16", "", { "dependencies": { "bun-types": "1.2.16" } }, "sha512-1aCZJ/6nSiViw339RsaNhkNoEloLaPzZhxMOYEa7OzRzO41IGg5n/7I43/ZIAW/c+Q6cT12Vf7fOZOoVIzb5BQ=="], + + "@types/node": ["@types/node@24.0.3", "", { "dependencies": { "undici-types": "~7.8.0" } }, "sha512-R4I/kzCYAdRLzfiCabn9hxWfbuHS573x+r0dJMkkzThEa7pbrcDWK+9zu3e7aBOouf+rQAciqPFMnxwr0aWgKg=="], + + "bun-types": ["bun-types@1.2.16", "", { "dependencies": { "@types/node": "*" } }, "sha512-ciXLrHV4PXax9vHvUrkvun9VPVGOVwbbbBF/Ev1cXz12lyEZMoJpIJABOfPcN9gDJRaiKF9MVbSygLg4NXu3/A=="], + + "typescript": ["typescript@5.8.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ=="], + + "undici-types": ["undici-types@7.8.0", "", {}, "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw=="], + } +} diff --git a/openhands-ui/index.ts b/openhands-ui/index.ts new file mode 100644 index 0000000000..f67b2c6454 --- /dev/null +++ b/openhands-ui/index.ts @@ -0,0 +1 @@ +console.log("Hello via Bun!"); \ No newline at end of file diff --git a/openhands-ui/package.json b/openhands-ui/package.json new file mode 100644 index 0000000000..170cabe7e8 --- /dev/null +++ b/openhands-ui/package.json @@ -0,0 +1,17 @@ +{ + "name": "@openhands/ui", + "version": "0.1.0", + "description": "OpenHands UI Components", + "keywords": [ + "openhands", + "ui", + "components" + ], + "type": "module", + "devDependencies": { + "@types/bun": "latest" + }, + "peerDependencies": { + "typescript": "^5.8.3" + } +} diff --git a/openhands-ui/tsconfig.json b/openhands-ui/tsconfig.json new file mode 100644 index 0000000000..bfa0fead54 --- /dev/null +++ b/openhands-ui/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + // Environment setup & latest features + "lib": ["ESNext"], + "target": "ESNext", + "module": "Preserve", + "moduleDetection": "force", + "jsx": "react-jsx", + "allowJs": true, + + // Bundler mode + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "noEmit": true, + + // Best practices + "strict": true, + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, + "noImplicitOverride": true, + + // Some stricter flags (disabled by default) + "noUnusedLocals": false, + "noUnusedParameters": false, + "noPropertyAccessFromIndexSignature": false + } +}