mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
- Implement automatic detection and installation of Chrome dependencies - Add optional Docker-based browser isolation with configurable settings - Create comprehensive devcontainer configuration for GitHub Codespaces - Add environment detection for Codespaces, containers, and Linux systems - Implement fallback mechanisms: system Chrome -> Docker -> downloaded Chrome - Add new VS Code settings for Docker browser configuration - Include post-create and post-start scripts for Codespaces setup - Add comprehensive tests for browser environment functionality Fixes #7990
4.2 KiB
4.2 KiB
Roo Code GitHub Codespaces Configuration
This directory contains the configuration for running Roo Code in GitHub Codespaces, providing a fully configured development environment with automatic Chrome/Puppeteer dependency installation.
Features
Automatic Dependency Installation
- Chrome Browser: Google Chrome Stable is automatically installed with all required dependencies
- Docker Support: Docker-in-Docker feature enables containerized browser option
- Node.js Environment: Pre-configured TypeScript/Node.js development container
- VS Code Extensions: Essential extensions are pre-installed
Browser Tool Support
The configuration ensures the browser tool works seamlessly in Codespaces by:
- Automatic Chrome Installation: Chrome and all its dependencies are installed during container creation
- Dependency Detection: The extension automatically detects and installs missing dependencies
- Docker Fallback: If Chrome fails, Docker browser container can be used as fallback
- Environment Variables: Proper configuration for Puppeteer to use system Chrome
Configuration Options
Docker Browser (Optional)
You can enable Docker-based browser isolation in VS Code settings:
{
"roo-cline.browserDocker.enabled": true,
"roo-cline.browserDocker.image": "browserless/chrome:latest",
"roo-cline.browserDocker.autoStart": true
}
Benefits of Docker Browser
- Isolation: Browser runs in a separate container
- Consistency: Same browser environment across all systems
- No Dependencies: No need to install Chrome dependencies on host
- Security: Enhanced security through containerization
Troubleshooting
Browser Tool Not Working?
-
Check Chrome Installation:
google-chrome --version # or google-chrome-stable --version -
Test Chrome Headless:
google-chrome --headless --no-sandbox --disable-gpu --dump-dom https://example.com -
Check Missing Dependencies:
ldd $(which google-chrome) | grep "not found" -
Install Missing Dependencies Manually:
sudo apt-get update sudo apt-get install -y \ libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 \ libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 \ libxrandr2 libgbm1 libasound2 -
Use Docker Browser as Fallback:
- Enable Docker browser in settings (see Configuration Options above)
- Ensure Docker is running:
docker info - The extension will automatically use Docker if Chrome fails
Docker Issues?
-
Check Docker Status:
docker info -
Pull Browser Image Manually:
docker pull browserless/chrome:latest -
Test Docker Browser:
docker run -d --name test-browser -p 3000:3000 browserless/chrome:latest # Visit http://localhost:3000 to verify docker stop test-browser && docker rm test-browser
Files in This Directory
- devcontainer.json: Main configuration file for the dev container
- post-create.sh: Script that runs after container creation (installs dependencies)
- post-start.sh: Script that runs each time the container starts (verifies setup)
- README.md: This documentation file
How It Works
- Container Creation: When you create a Codespace, it uses the TypeScript/Node.js base image
- Feature Installation: Docker-in-Docker and Chrome features are installed
- Post-Create Script: Installs Chrome dependencies and builds the project
- Post-Start Script: Verifies the environment on each container start
- Automatic Detection: The extension detects the Codespace environment and adapts accordingly
Environment Variables
The following environment variables are set automatically:
CODESPACES=true: Indicates running in GitHub CodespacesPUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true: Prevents Puppeteer from downloading ChromiumPUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome-stable: Points Puppeteer to system Chrome
Support
If you encounter issues with the browser tool in Codespaces:
- Check the troubleshooting section above
- Review the post-start script output for warnings
- Report issues at: https://github.com/RooCodeInc/Roo-Code/issues