Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
861b344
web startup fixes
jasonkneen Oct 9, 2025
552be30
Tauri desktop with basic settings ready dialog and movable chat
jasonkneen Oct 9, 2025
36d412b
Speed improvements and layout fixes
jasonkneen Oct 9, 2025
9974ecd
drag and drop files
jasonkneen Oct 9, 2025
05afd55
Draggable chat snap and unsnap to timeline
jasonkneen Oct 9, 2025
72dbae0
Suggestion chips, based on agents.md and conversations
jasonkneen Oct 9, 2025
7d753ae
dockable prompt fixes, suggestion chips and status bar
jasonkneen Oct 9, 2025
a0c0b7e
Autocomplete / and @ commands and more font size choices
jasonkneen Oct 9, 2025
7c6de46
Lazy loading chats and prompt dock persistence
jasonkneen Oct 9, 2025
a81759b
chore: format code
actions-user Oct 9, 2025
e26c188
Smooth scrolling
jasonkneen Oct 9, 2025
a2b4333
Setting up iOS
jasonkneen Oct 10, 2025
e0c92c4
Merge branch 'web-desktop-fixes' of https://github.com/jasonkneen/ope…
jasonkneen Oct 10, 2025
588e74b
ignore: update download stats 2025-10-11
actions-user Oct 11, 2025
eb2a391
Update .gitignore
jasonkneen Oct 12, 2025
7511049
Tauri config
jasonkneen Oct 12, 2025
2b109e5
ignore: update download stats 2025-10-12
actions-user Oct 12, 2025
b1a45de
ignore: update download stats 2025-10-13
actions-user Oct 13, 2025
50b1c80
themes
jasonkneen Oct 14, 2025
b2d671c
Merge branch 'web-desktop-fixes' of https://github.com/jasonkneen/ope…
jasonkneen Oct 14, 2025
f62a287
Merge branch 'opentui' into web-desktop-fixes
jasonkneen Oct 14, 2025
2d13812
ignore: update download stats 2025-10-14
actions-user Oct 14, 2025
e34f0bc
ignore: update download stats 2025-10-15
actions-user Oct 15, 2025
6e5c4cb
Merge branch 'web-desktop-fixes' of https://github.com/jasonkneen/ope…
jasonkneen Oct 15, 2025
ab0a587
ignore: update download stats 2025-10-16
actions-user Oct 16, 2025
81969d5
ignore: update download stats 2025-10-17
actions-user Oct 17, 2025
cdfe899
Merge branch 'web-desktop-fixes' of https://github.com/jasonkneen/ope…
jasonkneen Oct 18, 2025
9e776f1
Merge branch 'opentui' into web-desktop-fixes
jasonkneen Oct 18, 2025
30a0e81
Merge branch 'web-desktop-fixes' of https://github.com/jasonkneen/ope…
jasonkneen Oct 18, 2025
749bb4b
chore: format code
actions-user Oct 18, 2025
f23df83
WIP
jasonkneen Oct 19, 2025
9d5c57e
Refactor desktop dev scripts and improve SDK context
jasonkneen Oct 19, 2025
4b4c470
Merge branch 'web-desktop-fixes' of https://github.com/jasonkneen/ope…
jasonkneen Oct 19, 2025
5bbc88e
chore: format code
actions-user Oct 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"permissions": {
"allow": [
"Bash(rm:*)"
],
"deny": [],
"ask": []
}
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ playground
tmp
dist
.turbo
/packages/app/release
/packages/app
/packages/desktop/src-tauri/gen/apple/build
206 changes: 167 additions & 39 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,175 @@
## IMPORTANT
# AGENTS.md

- Try to keep things in one function unless composable or reusable
- DO NOT do unnecessary destructuring of variables
- DO NOT use `else` statements unless necessary
- DO NOT use `try`/`catch` if it can be avoided
- AVOID `try`/`catch` where possible
- AVOID `else` statements
- AVOID using `any` type
- AVOID `let` statements
- PREFER single word variable names where possible
- Use as many bun apis as possible like Bun.file()
## Development Commands

## Debugging
### Build & Development

- To test opencode in the `packages/opencode` directory you can run `bun dev`
- `bun dev` - Start development server for opencode package
- `bun run build` - Build the entire project
- `bun run build:dev` - Build for development
- `bun run test` - Run all tests
- `bun run typecheck` - Type checking
- `bun run lint` - Lint code
- `bun run format` - Check formatting
- `bun run format:fix` - Fix formatting issues

## Tool Calling
### Testing

- ALWAYS USE PARALLEL TOOLS WHEN APPLICABLE. Here is an example illustrating how to execute 3 parallel file reads in this chat environnement:
- `bun test` - Run all tests
- `npx vitest run tests/file-name.test.ts` - Run specific test file

json
## Project Structure

This is a monorepo with the following structure:

### Core Packages

- `packages/opencode/` - Main opencode CLI tool
- `packages/console/` - Web console interface
- `packages/core/` - Core functionality
- `packages/function/` - Serverless functions
- `packages/mail/` - Email templates and functionality
- `packages/resource/` - Shared resources
- `packages/scripts/` - Build and utility scripts

### SDKs

- `packages/sdk/go/` - Go SDK
- `packages/sdk/js/` - JavaScript SDK

### Applications

- `packages/desktop/` - Desktop application (Tauri-based)
- `packages/web/` - Web application (Astro-based)
- `packages/tui/` - Terminal user interface (Go-based)

### Extensions

- `packages/plugin/` - Plugin system
- `packages/vscode/` - VS Code extension

## Code Style Guidelines

### Core Principles

- **Single Function**: Keep things in one function unless composable or reusable
- **No Destructuring**: Avoid unnecessary destructuring of variables
- **No Else**: Avoid `else` statements unless absolutely necessary
- **No Try/Catch**: Avoid `try`/`catch` where possible
- **No Any**: Avoid using `any` type
- **No Let**: Prefer `const` over `let`
- **Single Words**: Prefer single word variable names where possible
- **Bun APIs**: Use as many bun apis as possible like Bun.file()

### TypeScript Standards

- **Strict typing**: Use explicit function return types
- **Organized imports**: Group by type (external, internal, relative)
- **Naming conventions**: PascalCase for types/components, camelCase for variables/functions
- **Error handling**: Explicit error types, avoid `any` suppression

## Development Guidelines

### When Adding New Features

1. Use existing patterns and conventions
2. Follow the established file structure
3. Add appropriate tests
4. Run linting and type checking
5. Update documentation if needed

### File Organization

- Keep related files together
- Use index.ts for exports when appropriate
- Follow existing directory naming conventions
- Use descriptive file names that indicate purpose

### Testing

- Use vitest for testing
- Mock external dependencies with vi.mock/vi.spyOn
- Test both success and error cases
- Keep tests focused and isolated

## Environment Setup

1. Install dependencies: `bun install`
2. Copy environment variables if needed
3. Run development server: `bun dev`
4. Run tests: `bun test`

## Common Tasks

### Adding a New Package

1. Create directory in appropriate location
2. Add package.json with proper dependencies
3. Add to workspace configuration
4. Follow existing patterns for structure

### Adding a New Component

1. Check existing components for patterns
2. Use TypeScript with proper typing
3. Add to appropriate index file for exports
4. Add tests if component has business logic

### Debugging

- Use console.log with component prefixes for debugging
- Check browser console for errors
- Use development mode for better error messages
- Run tests to verify functionality

## Tool Calling Best Practices

### Parallel Tool Usage

Always use parallel tools when applicable. Example:

```json
{
"recipient_name": "multi_tool_use.parallel",
"parameters": {
"tool_uses": [
{
"recipient_name": "functions.read",
"parameters": {
"filePath": "path/to/file.tsx"
}
},
{
"recipient_name": "functions.read",
"parameters": {
"filePath": "path/to/file.ts"
}
},
{
"recipient_name": "functions.read",
"parameters": {
"filePath": "path/to/file.md"
}
}
]
}
"recipient_name": "multi_tool_use.parallel",
"parameters": {
"tool_uses": [
{
"recipient_name": "functions.read",
"parameters": {
"filePath": "path/to/file.tsx"
}
},
{
"recipient_name": "functions.read",
"parameters": {
"filePath": "path/to/file.ts"
}
},
{
"recipient_name": "functions.read",
"parameters": {
"filePath": "path/to/file.md"
}
}
]
}
}
```

## Build System

The project uses:

- **Bun** as package manager and runtime
- **Turbo** for monorepo builds
- **Vite** for bundling
- **TypeScript** for type checking
- **ESLint** for linting
- **Prettier** for formatting

## Deployment

- GitHub Actions for CI/CD
- Automatic deployment on merge to main
- Staging deployments for feature branches
- Build artifacts are generated in dist/ directories
14 changes: 7 additions & 7 deletions STATS.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@
| 2025-10-06 | 460,927 (+5,368) | 379,489 (+4,744) | 840,416 (+10,112) |
| 2025-10-07 | 467,336 (+6,409) | 385,438 (+5,949) | 852,774 (+12,358) |
| 2025-10-08 | 474,643 (+7,307) | 394,139 (+8,701) | 868,782 (+16,008) |
| 2025-10-09 | 479,203 (+4,560) | 400,526 (+6,387) | 879,729 (+10,947) |
| 2025-10-10 | 484,374 (+5,171) | 406,015 (+5,489) | 890,389 (+10,660) |
| 2025-10-11 | 488,427 (+4,053) | 414,699 (+8,684) | 903,126 (+12,737) |
| 2025-10-12 | 492,125 (+3,698) | 418,745 (+4,046) | 910,870 (+7,744) |
| 2025-10-14 | 505,130 (+13,005) | 429,286 (+10,541) | 934,416 (+23,546) |
| 2025-10-15 | 512,717 (+7,587) | 439,290 (+10,004) | 952,007 (+17,591) |
| 2025-10-16 | 517,719 (+5,002) | 447,137 (+7,847) | 964,856 (+12,849) |
| 2025-10-11 | 488,430 (+13,787) | 414,699 (+20,560) | 903,129 (+34,347) |
| 2025-10-12 | 492,126 (+3,696) | 418,745 (+4,046) | 910,871 (+7,742) |
| 2025-10-13 | 497,573 (+5,447) | 423,531 (+4,786) | 921,104 (+10,233) |
| 2025-10-14 | 505,190 (+7,617) | 429,286 (+5,755) | 934,476 (+13,372) |
| 2025-10-15 | 512,767 (+7,577) | 439,290 (+10,004) | 952,057 (+17,581) |
| 2025-10-16 | 517,739 (+4,972) | 447,137 (+7,847) | 964,876 (+12,819) |
| 2025-10-17 | 526,294 (+8,555) | 457,467 (+10,330) | 983,761 (+18,885) |
Loading