Skip to content

Commit f2e6499

Browse files
committed
Update CONTRIBUTING.md
1 parent 5ddcec7 commit f2e6499

File tree

1 file changed

+62
-26
lines changed

1 file changed

+62
-26
lines changed

CONTRIBUTING.md

Lines changed: 62 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11

22
## Development
33

4+
### Getting Started
5+
6+
This project uses Yarn as the package manager. Make sure you have it installed before starting.
7+
8+
```bash
9+
# Install dependencies
10+
yarn install
11+
12+
# Start development build with hot reload
13+
yarn dev:watch
14+
```
15+
416
### Debugging with VS Code
517

6-
The project includes comprehensive VS Code debugging support for Chrome extensions:
18+
The project includes VS Code debugging support for Chrome extensions:
719

820
#### 🚀 One-Click Debugging
921

10-
1. **Set breakpoints** in any file under `src/` (background scripts, options page, etc.)
22+
1. **Set breakpoints** in any file under `src/` (background scripts, sidepanel, content scripts, etc.)
1123
2. **Press F5** or select **"🚀 Debug Extension (One-Click)"** from the debug dropdown
1224

1325
#### Debugging Different Contexts
1426

1527
After launching the main debug configuration, you can attach to specific contexts:
1628

1729
- **Background Script**: Use "Debug Background Script (Service Worker)"
18-
- **Options Pages**: Use "Debug Extension Pages (Options)"
30+
- **Side Panel**: Use "Debug Extension Pages (Side Panel)"
1931
- **Content Scripts**: Use "Debug Content Scripts (Web Pages)"
2032

2133
#### Setup Requirements
@@ -28,52 +40,76 @@ After launching the main debug configuration, you can attach to specific context
2840

2941
```bash
3042
# Production build
31-
npm run build
43+
yarn build
44+
45+
# Chrome-specific production build
46+
yarn build:chrome
3247

3348
# Development build (with source maps)
34-
npm run build:dev
49+
yarn build:dev
3550

3651
# Development build with file watching
37-
npm run build:watch
52+
yarn dev:watch
3853
```
3954

4055
### Project Structure
4156

4257
```
4358
src/
44-
├── background/ # Service worker (background script)
45-
├── options/ # Options page (main UI)
59+
├── background/ # Service worker (background script)
60+
├── sidepanel/ # Side panel UI (React app)
61+
│ ├── components/ # React components
62+
│ ├── hooks/ # Custom React hooks
63+
│ ├── pages/ # Page components
64+
│ ├── store/ # Zustand state management
65+
│ └── styles/ # SCSS modules
4666
├── content/ # Content scripts
47-
├── lib/ # Shared libraries
67+
├── config/ # Configuration files
68+
│ └── visionConfig.ts # Vision-related settings
69+
├── lib/ # Core libraries
70+
│ ├── agent/ # LangChain agents (Answer, Browse, etc.)
4871
│ ├── browser/ # Browser automation (puppeteer-core)
49-
│ ├── agent/ # LLM agents
72+
│ ├── core/ # Core Nxtscape functionality
73+
│ ├── events/ # Event bus and streaming
74+
│ ├── graph/ # Agent graph implementation
75+
│ ├── llm/ # LLM provider factories
76+
│ ├── orchestrators/ # Agent orchestration
77+
│ ├── prompts/ # Agent prompts
78+
│ ├── runtime/ # Execution context and errors
5079
│ ├── tools/ # Browser automation tools
51-
│ └── utilities/ # Utilities (LogUtility, etc.)
52-
└── config.ts # Global configuration (DEV_MODE, etc.)
80+
│ ├── types/ # TypeScript type definitions
81+
│ └── utils/ # Utility functions
82+
├── types/ # Global TypeScript declarations
83+
└── config.ts # Main configuration file
5384
```
5485

5586
### Configuration
5687

57-
Key settings in `src/config.ts`:
58-
59-
```typescript
60-
export const config = {
61-
DEV_MODE: true, // Shows logs in options page
62-
VERSION: '0.1.0',
63-
LOG_LEVEL: 'info'
64-
}
65-
```
88+
The main config file at `src/config.ts` controls global settings. You can also configure LLM providers and other settings through the extension's side panel.
6689

6790
## Usage
6891

69-
1. **Install Extension**: Load `dist/` directory in Chrome extensions
70-
2. **Open Control Panel**: Click extension icon to open options page
71-
3. **View Logs**: Development logs appear in real-time (when DEV_MODE: true)
92+
1. **Install Extension**: Load the `dist/` directory as an unpacked extension in Chrome
93+
2. **Open Side Panel**: Click the extension icon to open the side panel
94+
3. **Configure LLM**: Set up your preferred LLM provider (OpenAI, Anthropic, etc.)
95+
4. **Start Using**: The agent will help you browse and interact with web pages
7296

7397
## Architecture
7498

75-
- **Port Messaging**: Uses `OPTIONS_TO_BACKGROUND` for UI ↔ Background communication
76-
- **Centralized Logging**: `LogUtility` routes logs to options page when DEV_MODE enabled
99+
- **LangChain Integration**: Uses LangChain and LangGraph for agent orchestration
100+
- **Port Messaging**: Communication between background script, content scripts, and side panel
101+
- **Event Bus**: Streaming events and updates between components
102+
- **Modular Tools**: Each browser action is a separate tool that agents can use
103+
104+
## Testing
105+
106+
```bash
107+
# Run linting
108+
yarn lint
109+
110+
# Fix linting issues
111+
yarn lint:fix
112+
```
77113

78114
## License
79115

0 commit comments

Comments
 (0)