GeezerVison is showing github.com — ignore: docs & style · bufanliu/opencode@5b34636
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .opencode/opencode.jsonc +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
4 | 4 | // "enterprise": { |
5 | 5 | // "url": "https://enterprise.dev.opencode.ai", |
6 | 6 | // }, |
| 7 | + "instructions": ["STYLE_GUIDE.md"], |
7 | 8 | "provider": { |
8 | 9 | "opencode": { |
9 | 10 | "options": { |
|
Collapse file
Copy file name to clipboardExpand all lines: AGENTS.md -13Lines changed: 0 additions & 13 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -## IMPORTANT |
2 | | - |
3 | | -- Try to keep things in one function unless composable or reusable |
4 | | -- DO NOT do unnecessary destructuring of variables |
5 | | -- DO NOT use `else` statements unless necessary |
6 | | -- DO NOT use `try`/`catch` if it can be avoided |
7 | | -- AVOID `try`/`catch` where possible |
8 | | -- AVOID `else` statements |
9 | | -- AVOID using `any` type |
10 | | -- AVOID `let` statements |
11 | | -- PREFER single word variable names where possible |
12 | | -- Use as many bun apis as possible like Bun.file() |
13 | | - |
14 | 1 | ## Debugging |
15 | 2 |
|
16 | 3 | - To test opencode in the `packages/opencode` directory you can run `bun dev` |
|
Collapse file
Copy file name to clipboardExpand all lines: CONTRIBUTING.md +2Lines changed: 2 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -42,6 +42,8 @@ Want to take on an issue? Leave a comment and a maintainer may assign it to you |
42 | 42 | > [!NOTE] |
43 | 43 | > After touching `packages/opencode/src/server/server.ts`, run "./packages/sdk/js/script/build.ts" to regenerate the JS sdk. |
44 | 44 |
|
| 45 | +Please try to follow the [style guide](./STYLE_GUIDE.md) |
| 46 | + |
45 | 47 | ### Setting up a Debugger |
46 | 48 |
|
47 | 49 | Bun debugging is currently rough around the edges. We hope this guide helps you get set up and avoid some pain points. |
|
Collapse file
Copy file name to clipboard +12Lines changed: 12 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +## Style Guide |
| 2 | + |
| 3 | +- Try to keep things in one function unless composable or reusable |
| 4 | +- DO NOT do unnecessary destructuring of variables |
| 5 | +- DO NOT use `else` statements unless necessary |
| 6 | +- DO NOT use `try`/`catch` if it can be avoided |
| 7 | +- AVOID `try`/`catch` where possible |
| 8 | +- AVOID `else` statements |
| 9 | +- AVOID using `any` type |
| 10 | +- AVOID `let` statements |
| 11 | +- PREFER single word variable names where possible |
| 12 | +- Use as many bun apis as possible like Bun.file() |