Skip to content

Commit 833a2a1

Browse files
Merge remote-tracking branch 'upstream/dev' into layouts and resolve minor conflict.
2 parents d45d948 + 5f7ab83 commit 833a2a1

171 files changed

Lines changed: 7817 additions & 2776 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/guidelines-check.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

.github/workflows/duplicate-issues.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,7 @@ jobs:
5555
5656
Feel free to ignore if none of these address your specific case.'
5757
58+
Additionally, if the issue mentions keybinds, keyboard shortcuts, or key bindings, please add a comment mentioning the pinned keybinds issue #4997:
59+
'For keybind-related issues, please also check our pinned keybinds documentation: #4997'
60+
5861
If no clear duplicates are found, do not comment."

.github/workflows/review.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Guidelines Check
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
jobs:
8+
check-guidelines:
9+
if: |
10+
github.event.issue.pull_request &&
11+
startsWith(github.event.comment.body, '/review') &&
12+
contains(fromJson('["OWNER","MEMBER"]'), github.event.comment.author_association)
13+
runs-on: blacksmith-4vcpu-ubuntu-2404
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
steps:
18+
- name: Get PR number
19+
id: pr-number
20+
run: |
21+
if [ "${{ github.event_name }}" = "pull_request_target" ]; then
22+
echo "number=${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT
23+
else
24+
echo "number=${{ github.event.issue.number }}" >> $GITHUB_OUTPUT
25+
fi
26+
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 1
31+
32+
- name: Install opencode
33+
run: curl -fsSL https://opencode.ai/install | bash
34+
35+
- name: Get PR details
36+
id: pr-details
37+
run: |
38+
gh api /repos/${{ github.repository }}/pulls/${{ steps.pr-number.outputs.number }} > pr_data.json
39+
echo "title=$(jq -r .title pr_data.json)" >> $GITHUB_OUTPUT
40+
echo "sha=$(jq -r .head.sha pr_data.json)" >> $GITHUB_OUTPUT
41+
env:
42+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
44+
- name: Check PR guidelines compliance
45+
env:
46+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
OPENCODE_PERMISSION: '{ "bash": { "gh*": "allow", "gh pr review*": "deny", "*": "deny" } }'
49+
run: |
50+
PR_BODY=$(jq -r .body pr_data.json)
51+
opencode run -m anthropic/claude-opus-4-5 "A new pull request has been created: '${{ steps.pr-details.outputs.title }}'
52+
53+
<pr-number>
54+
${{ steps.pr-number.outputs.number }}
55+
</pr-number>
56+
57+
<pr-description>
58+
$PR_BODY
59+
</pr-description>
60+
61+
Please check all the code changes in this pull request against the style guide, also look for any bugs if they exist. Diffs are important but make sure you read the entire file to get proper context. Make it clear the suggestions are merely suggestions and the human can decide what to do
62+
63+
When critiquing code against the style guide, be sure that the code is ACTUALLY in violation, don't complain about else statements if they already use early returns there. You may complain about excessive nesting though, regardless of else statement usage.
64+
When critiquing code style don't be a zealot, we don't like "let" statements but sometimes they are the simpliest option, if someone does a bunch of nesting with let, they should consider using iife (see packages/opencode/src/util.iife.ts)
65+
66+
Use the gh cli to create comments on the files for the violations. Try to leave the comment on the exact line number. If you have a suggested fix include it in a suggestion code block.
67+
68+
Command MUST be like this.
69+
\`\`\`
70+
gh api \
71+
--method POST \
72+
-H \"Accept: application/vnd.github+json\" \
73+
-H \"X-GitHub-Api-Version: 2022-11-28\" \
74+
/repos/${{ github.repository }}/pulls/${{ steps.pr-number.outputs.number }}/comments \
75+
-f 'body=[summary of issue]' -f 'commit_id=${{ steps.pr-details.outputs.sha }}' -f 'path=[path-to-file]' -F \"line=[line]\" -f 'side=RIGHT'
76+
\`\`\`
77+
78+
Only create comments for actual violations. If the code follows all guidelines, comment on the issue using gh cli: 'lgtm' AND NOTHING ELSE!!!!."

.opencode/command/commit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Git commit and push
2+
description: git commit and push
33
---
44

55
commit and push

.opencode/command/hello.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

.opencode/command/issues.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: "Find issue(s) on github"
2+
description: "find issue(s) on github"
33
model: opencode/claude-haiku-4-5
44
---
55

.opencode/command/rmslop.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
description: Remove AI code slop
3+
---
4+
5+
Check the diff against dev, and remove all AI generated slop introduced in this branch.
6+
7+
This includes:
8+
9+
- Extra comments that a human wouldn't add or is inconsistent with the rest of the file
10+
- Extra defensive checks or try/catch blocks that are abnormal for that area of the codebase (especially if called by trusted / validated codepaths)
11+
- Casts to any to get around type issues
12+
- Any other style that is inconsistent with the file
13+
- Unnecessary emoji usage
14+
15+
Report at the end with only a 1-3 sentence summary of what you changed

.opencode/command/spellcheck.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Spellcheck all markdown file changes
2+
description: spellcheck all markdown file changes
33
---
44

55
Look at all the unstaged changes to markdown (.md, .mdx) files, pull out the lines that have changed, and check for spelling and grammar errors.

.opencode/opencode.jsonc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"$schema": "https://opencode.ai/config.json",
33
"plugin": ["opencode-openai-codex-auth"],
4-
"enterprise": {
5-
"url": "https://enterprise.dev.opencode.ai",
6-
},
4+
// "enterprise": {
5+
// "url": "https://enterprise.dev.opencode.ai",
6+
// },
7+
"instructions": ["STYLE_GUIDE.md"],
78
"provider": {
89
"opencode": {
910
"options": {

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sst-env.d.ts

0 commit comments

Comments
 (0)