Skip to content

Commit ee76114

Browse files
nulmindadamdotdevinkommanderactions-userthdxr
authored
Merge remote master to local (#1)
* chore: cleanup * upgrade opentui to v0.1.73, fixing CJK word wrapping and thai text rendering (non-tmux) * Update Nix flake.lock and x86_64-linux hash * Update aarch64-darwin hash * use native text truncation for sidebar diff paths * fix: honor per-server MCP timeouts (anomalyco#8706) * chore: generate * docs: fix typos in documentation (anomalyco#8703) * fix: handle broken symlinks gracefully in grep tool (anomalyco#8612) Co-authored-by: Alex Johnson <[email protected]> * Prettify retry duration display in TUI (anomalyco#8608) Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: rekram1-node <[email protected]> * fix: show toast error message on ConfigMarkdown parse error (anomalyco#8049) Co-authored-by: Aiden Cline <[email protected]> * fix: downgrade bun to fix avx issue * Update Nix flake.lock and x86_64-linux hash * Update aarch64-darwin hash * fix: ensure frontmatter can process same content as other agents (anomalyco#8719) * fix: search bar in header * fix: tooltips cleanup * fix: recent sessions hover gutter * fix: archive icon replaces diff count on hover * fix: tooltip gutter spacing on session items and archive buttons * fix: increase delay on session list tooltips * fix: show project options on hover of row * fix: avatar background * fix: move left panel toggle over - not sure how this impacts on the titlebar when the traffic lights are there * fix: project dropdown labels and order * fix: recent sessions title color * fix: load more button font size * fix: avatar button states * fix: hide view all sessions on active project * fix: workspace name color * fix: remove more options tooltip * fix: new session tooltip position and add shortcut * fix: remove the active state from load more button after press * fix: current session background color * bun/package.json updates this may not be required * chore(desktop): Question Tools Updates * chore(desktop): Stop Killing opencode-cli on dev * fix(core): loading models.dev in dev * fix(core): filter dead worktrees * fix(app): show session busy even for active session * chore: cleanup * fix(core): more defensive project list * feat(console): Update /black plan selection, light rays effect. mobile styles (anomalyco#8731) Co-authored-by: Github Action <[email protected]> * Update aarch64-darwin hash * fix: session icon and name alignment * fix: thinking animation opacity and design * docs: add /thinking command documentation (anomalyco#8722) * feat(console): Style improvements for /black, View Transition fixes (anomalyco#8739) Co-authored-by: Github Action <[email protected]> * fix(session): ensure agent exists before processing title in session summary (anomalyco#8662) * fix: update hix hashes for all systems (anomalyco#8732) Co-authored-by: Github Action <[email protected]> Co-authored-by: Aiden Cline <[email protected]> * fix(app): persist workspace order and collapsed state * feat(app): persist workspace branch * fix(app): sidebar toggle on desktop * release: v1.1.23 * feat: add litellmProxy provider option for explicit LiteLLM compatibility (anomalyco#8658) Co-authored-by: Mark Henderson <[email protected]> Co-authored-by: Aiden Cline <[email protected]> * feat: add Carbonfox theme (anomalyco#8723) * chore: generate * fix:subagent reasoningEffort not being applied (anomalyco#8646) Co-authored-by: Bot <[email protected]> * Revert "fix:subagent reasoningEffort not being applied (anomalyco#8646)" This reverts commit f4086ac. * fix: project avatar border radius * feat(console): Fix /black page View Transition Safari issue (anomalyco#8755) * fix(agent): default agent selection in acp and headless mode (anomalyco#8678) Signed-off-by: assagman <[email protected]> * fix: stop changing main model/agent from subtasks invocation (anomalyco#7681) Co-authored-by: Aiden Cline <[email protected]> * chore: generate * zen: black admin * wip: zen * fix: nix desktop workflow (anomalyco#8747) Co-authored-by: Github Action <[email protected]> * fix(app): persist workspace order and collapsed state * feat(app): skeleton loader for sessions * feat(app): unified search for commands and files * strip itemIds in more cases * chore: cleanup * fix(mcp): show auth URL when browser cannot open in remote sessions (anomalyco#7884) * chore: generate * tweak: set opencode as user agent for most interefence requests * test: fix transform test * docs: clarify question tool guidance (anomalyco#8778) * fix(tui): add tab navigation in questions (anomalyco#8777) * fix(tui): dim question option prefixes (anomalyco#8776) * fix(tui): correct theme count tip (anomalyco#8779) * stop select dialog event propagation * fix: adjust websearch tool to emphasize that it ISNT 2024, give more info as to current date * feat: add version to session header and /status dialog (anomalyco#8802) * chore: update GitHub stars and commits statistics (anomalyco#8793) * feat(mcp): add OAuth redirect URI configuration for MCP servers (anomalyco#7379) * chore: generate * fix: rm user message when dealing w/ image attachments, use proper tool attachment instead * wip: zen * Update node_modules hash (aarch64-linux) * Update node_modules hash (x86_64-linux) * test: fix test now that image fix went in * Update node_modules hash (x86_64-darwin) * update gpt models prompt * fix(app): persist workspace order and collapsed state * fix: avatar radius and current project * fix: search bar size and padding, and shortcut style * fix: add default icon to sessions * fix: view all sessions state styles * fix: updated project/sessions list width this was originally 280px and included the 64px project avatar rail on the left, so the sessions list portion was actually 280 - 64 = 216px wide (as seen in line 1362: Math.max(layout.sidebar.width() - 64, 0)px). i kept the logic the same in case it broke anything, i just updated the new width to account for new projects avatar panel * bug: moved createMemo down * chore: generate * ignore: update download stats 2026-01-16 * fix: responsive menu desktop * feat(console): /black shader improvements, performance, details (anomalyco#8871) * fix: web mobile menu there is a small shift/misalignment in the side panel on web, not investigating too much as this whole area is in development and may change to make the projects avatar list always in view. * fix: make hamburger centred with project avatars * fix: desktop hamburger shift * fix: session icon and label alignment * fix: expand workspaces by default when enabled * Revert "fix: expand workspaces by default when enabled" This reverts commit 1fd496a. * fix: updating panel min size and button max-width * fix: load more label alignment * fix: truncate the workspace name on hover * Revert "stop select dialog event propagation" This reverts commit 46be47d. * Revert "fix: rm user message when dealing w/ image attachments, use proper tool attachment instead" This reverts commit de2de09. * Revert "test: fix test now that image fix went in" This reverts commit fffa718. * wip: zen * feat(desktop): Terminal Splits (anomalyco#8767) * chore(sdk): update @hey-api/openapi-ts to 0.90.4 (anomalyco#8921) * Revert "chore(sdk): update @hey-api/openapi-ts to 0.90.4" (anomalyco#8927) * Update node_modules hash (aarch64-darwin) * fix: fix the itemId stripping logic, this time it should fix that id issue w/ gpt models fr * Reapply "chore(sdk): update @hey-api/openapi-ts to 0.90.4" (anomalyco#8927) This reverts commit 91b8ba2. * Update node_modules hash (x86_64-linux) * fix(docs): Broken URL (anomalyco#8918) * fix: use dynamic import for session event in config.ts to avoid circular dep * Update node_modules hash (x86_64-darwin) * fix: ensure that tool attachments arent sent as user messages (anomalyco#8944) * upgrade opentui to v0.1.74, fix tmux kitty keyboard regression * Update node_modules hash (aarch64-linux) * Update node_modules hash (x86_64-darwin) * fix(app): scroll jumping when expanding workspaces * fix(app): can't expand workspaces * fix(app): open workspace if navigating to session in workspace * feat(app): edit project and session titles * Revert "feat(desktop): Terminal Splits (anomalyco#8767)" This reverts commit 88fd6a2. * release: v1.1.24 * fix(bun): reinstall plugins when cache module missing (anomalyco#8815) * chore: generate * fix(app): center dialog on page instead of session * fix(app): handle new session correctly * chore: cleanup server routes (anomalyco#8965) Co-authored-by: Leka74 <[email protected]> Co-authored-by: Leka74 <[email protected]> * chore: generate * fix(app): support anthropic models on azure cognitive services (anomalyco#8335) * Revert "fix(app): support anthropic models on azure cognitive services" (anomalyco#8966) * fix(app): truncate workspace title * fix(app): remember last opened project * Revert "fix: ensure that tool attachments arent sent as user messages (anomalyco#8944)" This reverts commit 8fd1b92. * tweak: wording * test: fix * release: v1.1.25 * fix: make home/end keys work in menu list modal windows (resolves anomalyco#7190) (anomalyco#8347) * chore: cleanup transform code a tad * chore: generate * fix: keep primary model after subagent runs (anomalyco#8951) * fix: open help dialog with tui/open-help route (anomalyco#8596) * wip: black * wip: black * chore: generate * fix: centralize OSC 52 clipboard support for SSH sessions (anomalyco#8974) * fix(nix): add desktop application entry (anomalyco#8972) * chore: cleanup nix (anomalyco#8964) * fix(desktop): Stream bash output + strip-asni (anomalyco#8961) * Update flake.lock * Update node_modules hash (x86_64-linux) * Update node_modules hash (x86_64-darwin) * Update node_modules hash (aarch64-darwin) * fix(opencode): add oauth polling safety margin in copilot device authentication (anomalyco#8986) * chore: generate * zen: fix opus unicode characters closes anomalyco#8967 * fix: recent sessions gutter * fix: (desktop) command palette width * feat: add Keybind component for displaying keyboard shortcuts * refactor: use Keybind component in titlebar search button * refactor: use Keybind component in search modal list * fix: display arrow keys as symbols in keybind formatting * fix: increase keybind border-radius in search modal * fix: add left padding to command items in search modal * fix: adjust command item left padding in search modal * feat: add hideIcon and class options to List search, customize search modal input * fix: reduce command item left padding in search modal * fix: refine search modal styling and list component * fix: limit search modal max-height to 480px * fix: remove the secondary text from commands * fix: remove smooth scroll behavior from list component * fix: truncate long search queries in empty state * fix: prevent text clipping on search button descenders * fix(nix): resolve hash race condition in parallel matrix jobs (anomalyco#8995) * Update node_modules hashes * fix: gpt id stuff fr fr this time :/ (anomalyco#9006) * docs: Add OpenWork to ecosystem (anomalyco#8741) * chore: generate * Revert "feat(mcp): add OAuth redirect URI configuration for MCP servers (anomalyco#7379)" This reverts commit 40b275d. * chore: generate * test: add azure test case * fix(app): archive session sometimes flaky * fix(desktop): Added a Windows-only guard that makes window.getComputedStyle fall back to document.documentElement (anomalyco#9054) * fix: mdns discover hostname (anomalyco#9039) * chore: generate * fix: escape CSS selector keys to handle special characters (anomalyco#9030) * ignore: update download stats 2026-01-17 * docs: add firmware provider to providers docs (anomalyco#8993) * docs(config): explain that `autoupdate` doesn't work when installed with a package manager (anomalyco#9092) * fix: don't try to open command palette if a dialog is already open (anomalyco#9116) * docs: document the plural forms * docs: add use_github_token to example (anomalyco#9120) Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: rekram1-node <[email protected]> * tui: fix model state persistence when model store is not ready * fix: align project avatar notification dot * fix: update desktop initializing splash logo * fix: shrink project notification dot and mask * fix: command pallete file list item spacing * fix: remove loading text after splash * fix: show project name in avatar hover * fix: reduce prompt dock bottom spacing * fix: adjust recent sessions popover padding * fix: keep project avatar hover styles while popover open * fix: adjust session list tooltip trigger and delay * fix: remove max width on sidebar new buttons * fix: adjust project path tooltip placement Move the desktop project path tooltip above the header and tune spacing/offset; add content style hooks to Tooltip for max-width and horizontal shift. * fix: increase max-width of session name tooltip * Revert "fix: increase max-width of session name tooltip" This reverts commit c3ab76c. * fix: remove max-width of session name tooltip * Hide variants hint when list empty (anomalyco#9179) Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: rekram1-node <[email protected]> * refactor(tui): unify command registry and derive slash commands (anomalyco#9115) * core: prevent env variables in config from being replaced with actual values When opencode.json was missing a $schema, the config loader would add it and write the file back - but with env variables like {env:API_KEY} replaced with their actual secret values. This made it impossible to safely commit opencode.json to version control. Now the original config text is preserved when adding $schema, keeping variable placeholders intact. * feat: bind vim-style line-by-line scrolling (anomalyco#8980) Co-authored-by: Aiden Cline <[email protected]> * chore: generate * fix(windows): fix jdtls download on Windows (anomalyco#9195) * feat: apply_patch tool for openai models (anomalyco#9127) * chore: generate * feat(tool): increase question header and label limits (anomalyco#9201) * chore: generate * fix(acp): use single global event subscription and route by sessionID (anomalyco#5628) Co-authored-by: noamzbr <[email protected]> Co-authored-by: noam-v <[email protected]> * fix: restore persisted model/agent when loading ACP session (anomalyco#7809) Co-authored-by: noam-v <[email protected]> * feat(cli): uninstall opencode installed via windows package managers (anomalyco#8571) * feat(desktop): implement session unshare button (anomalyco#8660) * ignore: update download stats 2026-01-18 * fix(app): remove redundant toast for thinking effort changes (anomalyco#9181) * refactor(desktop): improve layout and styling of session search button (anomalyco#9251) * fix: import issue in patch module * refactor(installation): update scoop installation method (anomalyco#9243) Signed-off-by: Chawye Hsu <[email protected]> * fix(acp): preserve file attachment metadata during session replay (anomalyco#6342) Co-authored-by: Aiden Cline <[email protected]> * chore: generate * feat(nix): overhaul nix flake and packages (anomalyco#9032) * feat(hook): command execute before hook (anomalyco#9267) * fix: update gitlab-ai-provider to 1.3.2 (anomalyco#9279) * fix(tool): treat .fbs files as text instead of images (anomalyco#9276) Co-authored-by: Claude <[email protected]> * docs: note untracked files in review * Update node_modules hashes --------- Signed-off-by: assagman <[email protected]> Signed-off-by: Chawye Hsu <[email protected]> Co-authored-by: Adam <[email protected]> Co-authored-by: Sebastian Herrlinger <[email protected]> Co-authored-by: Github Action <[email protected]> Co-authored-by: Dax <[email protected]> Co-authored-by: Aryan "LAG" Gupta <[email protected]> Co-authored-by: andrew-kramer-inno <[email protected]> Co-authored-by: Alex Johnson <[email protected]> Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: rekram1-node <[email protected]> Co-authored-by: Maciek Szczesniak <[email protected]> Co-authored-by: Aiden Cline <[email protected]> Co-authored-by: Aiden Cline <[email protected]> Co-authored-by: David Hill <[email protected]> Co-authored-by: dbpolito <[email protected]> Co-authored-by: Aaron Iker <[email protected]> Co-authored-by: Nhan Nguyen <[email protected]> Co-authored-by: Qunhong Zeng <[email protected]> Co-authored-by: Ricardo Valero de la Rosa <[email protected]> Co-authored-by: opencode <[email protected]> Co-authored-by: seilk <[email protected]> Co-authored-by: Mark Henderson <[email protected]> Co-authored-by: outside.observer <[email protected]> Co-authored-by: Jeong Juahn <[email protected]> Co-authored-by: Bot <[email protected]> Co-authored-by: Sercan Sagman <[email protected]> Co-authored-by: Frank <[email protected]> Co-authored-by: Dan Lapid <[email protected]> Co-authored-by: Kit Langton <[email protected]> Co-authored-by: Akshar Patel <[email protected]> Co-authored-by: Hyeonjong <[email protected]> Co-authored-by: Christopher Tso <[email protected]> Co-authored-by: Cole Leavitt <[email protected]> Co-authored-by: Bernat Pericàs <[email protected]> Co-authored-by: kenryu42 <[email protected]> Co-authored-by: Leka74 <[email protected]> Co-authored-by: Leka74 <[email protected]> Co-authored-by: Unies Ananda Raja <[email protected]> Co-authored-by: Ariane Emory <[email protected]> Co-authored-by: Seth Carlton <[email protected]> Co-authored-by: b3nw <[email protected]> Co-authored-by: Caleb Norton <[email protected]> Co-authored-by: Amir Hasanbasic <[email protected]> Co-authored-by: Jérôme Benoit <[email protected]> Co-authored-by: ben <[email protected]> Co-authored-by: Eric Guo <[email protected]> Co-authored-by: Javier Aceña <[email protected]> Co-authored-by: Slone <[email protected]> Co-authored-by: Colby Gilbert <[email protected]> Co-authored-by: Rahul Mishra <[email protected]> Co-authored-by: Nathan Flurry <[email protected]> Co-authored-by: Patrick Schiel <[email protected]> Co-authored-by: Bowen Dwelle <[email protected]> Co-authored-by: Noam Bressler <[email protected]> Co-authored-by: noamzbr <[email protected]> Co-authored-by: noam-v <[email protected]> Co-authored-by: Mani Sundararajan <[email protected]> Co-authored-by: OpeOginni <[email protected]> Co-authored-by: Chawye Hsu <[email protected]> Co-authored-by: Lior <[email protected]> Co-authored-by: Spoon <[email protected]> Co-authored-by: Vladimir Glafirov <[email protected]> Co-authored-by: zerone0x <[email protected]> Co-authored-by: Claude <[email protected]>
1 parent c37d9a7 commit ee76114

2,752 files changed

Lines changed: 188106 additions & 60234 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/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# web + desktop packages
2+
packages/app/ @adamdotdevin
3+
packages/tauri/ @adamdotdevin
4+
packages/desktop/ @adamdotdevin

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ body:
1111
validations:
1212
required: true
1313

14+
- type: input
15+
id: plugins
16+
attributes:
17+
label: Plugins
18+
description: What plugins are you using?
19+
validations:
20+
required: false
21+
1422
- type: input
1523
id: opencode-version
1624
attributes:

.github/pull_request_template.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### What does this PR do?
2+
3+
### How did you verify your code works?

.github/workflows/auto-label-tui.yml

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

.github/workflows/deploy.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}
1111

1212
jobs:
1313
deploy:
14-
runs-on: ubuntu-latest
14+
runs-on: blacksmith-4vcpu-ubuntu-2404
1515
steps:
1616
- uses: actions/checkout@v3
1717

1818
- uses: ./.github/actions/setup-bun
1919

20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: "24"
23+
2024
- run: bun sst deploy --stage=${{ github.ref_name }}
2125
env:
2226
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}

.github/workflows/docs-update.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Docs Update
2+
3+
on:
4+
schedule:
5+
- cron: "0 */12 * * *"
6+
workflow_dispatch:
7+
8+
env:
9+
LOOKBACK_HOURS: 4
10+
11+
jobs:
12+
update-docs:
13+
if: github.repository == 'sst/opencode'
14+
runs-on: blacksmith-4vcpu-ubuntu-2404
15+
permissions:
16+
id-token: write
17+
contents: write
18+
pull-requests: write
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0 # Fetch full history to access commits
24+
25+
- name: Setup Bun
26+
uses: ./.github/actions/setup-bun
27+
28+
- name: Get recent commits
29+
id: commits
30+
run: |
31+
COMMITS=$(git log --since="${{ env.LOOKBACK_HOURS }} hours ago" --pretty=format:"- %h %s" 2>/dev/null || echo "")
32+
if [ -z "$COMMITS" ]; then
33+
echo "No commits in the last ${{ env.LOOKBACK_HOURS }} hours"
34+
echo "has_commits=false" >> $GITHUB_OUTPUT
35+
else
36+
echo "has_commits=true" >> $GITHUB_OUTPUT
37+
{
38+
echo "list<<EOF"
39+
echo "$COMMITS"
40+
echo "EOF"
41+
} >> $GITHUB_OUTPUT
42+
fi
43+
44+
- name: Run opencode
45+
if: steps.commits.outputs.has_commits == 'true'
46+
uses: sst/opencode/github@latest
47+
env:
48+
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
49+
with:
50+
model: opencode/gpt-5.2
51+
agent: docs
52+
prompt: |
53+
Review the following commits from the last ${{ env.LOOKBACK_HOURS }} hours and identify any new features that may need documentation.
54+
55+
<recent_commits>
56+
${{ steps.commits.outputs.list }}
57+
</recent_commits>
58+
59+
Steps:
60+
1. For each commit that looks like a new feature or significant change:
61+
- Read the changed files to understand what was added
62+
- Check if the feature is already documented in packages/web/src/content/docs/*
63+
2. If you find undocumented features:
64+
- Update the relevant documentation files in packages/web/src/content/docs/*
65+
- Follow the existing documentation style and structure
66+
- Make sure to document the feature clearly with examples where appropriate
67+
3. If all new features are already documented, report that no updates are needed
68+
4. If you are creating a new documentation file be sure to update packages/web/astro.config.mjs too.
69+
70+
Focus on user-facing features and API changes. Skip internal refactors, bug fixes, and test updates unless they affect user-facing behavior.
71+
Don't feel the need to document every little thing. It is perfectly okay to make 0 changes at all.
72+
Try to keep documentation only for large features or changes that already have a good spot to be documented.

.github/workflows/duplicate-issues.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
check-duplicates:
9-
runs-on: ubuntu-latest
9+
runs-on: blacksmith-4vcpu-ubuntu-2404
1010
permissions:
1111
contents: read
1212
issues: write
@@ -16,23 +16,25 @@ jobs:
1616
with:
1717
fetch-depth: 1
1818

19+
- uses: ./.github/actions/setup-bun
20+
1921
- name: Install opencode
2022
run: curl -fsSL https://opencode.ai/install | bash
2123

2224
- name: Check for duplicate issues
2325
env:
24-
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
26+
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
2527
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2628
OPENCODE_PERMISSION: |
2729
{
2830
"bash": {
29-
"gh issue*": "allow",
30-
"*": "deny"
31-
},
31+
"*": "deny",
32+
"gh issue*": "allow"
33+
},
3234
"webfetch": "deny"
3335
}
3436
run: |
35-
opencode run -m anthropic/claude-sonnet-4-20250514 "A new issue has been created:'
37+
opencode run -m opencode/claude-haiku-4-5 "A new issue has been created:'
3638
3739
Issue number:
3840
${{ github.event.issue.number }}
@@ -55,4 +57,7 @@ jobs:
5557
5658
Feel free to ignore if none of these address your specific case.'
5759
60+
Additionally, if the issue mentions keybinds, keyboard shortcuts, or key bindings, please add a comment mentioning the pinned keybinds issue #4997:
61+
'For keybind-related issues, please also check our pinned keybinds documentation: #4997'
62+
5863
If no clear duplicates are found, do not comment."
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Duplicate PR Check
2+
3+
on:
4+
pull_request_target:
5+
types: [opened]
6+
7+
jobs:
8+
check-duplicates:
9+
if: |
10+
github.event.pull_request.user.login != 'actions-user' &&
11+
github.event.pull_request.user.login != 'opencode' &&
12+
github.event.pull_request.user.login != 'rekram1-node' &&
13+
github.event.pull_request.user.login != 'thdxr' &&
14+
github.event.pull_request.user.login != 'kommander' &&
15+
github.event.pull_request.user.login != 'jayair' &&
16+
github.event.pull_request.user.login != 'fwang' &&
17+
github.event.pull_request.user.login != 'adamdotdevin' &&
18+
github.event.pull_request.user.login != 'iamdavidhill' &&
19+
github.event.pull_request.user.login != 'opencode-agent[bot]'
20+
runs-on: blacksmith-4vcpu-ubuntu-2404
21+
permissions:
22+
contents: read
23+
pull-requests: write
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 1
29+
30+
- name: Setup Bun
31+
uses: ./.github/actions/setup-bun
32+
33+
- name: Install dependencies
34+
run: bun install
35+
36+
- name: Install opencode
37+
run: curl -fsSL https://opencode.ai/install | bash
38+
39+
- name: Build prompt
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
PR_NUMBER: ${{ github.event.pull_request.number }}
43+
run: |
44+
{
45+
echo "Check for duplicate PRs related to this new PR:"
46+
echo ""
47+
echo "CURRENT_PR_NUMBER: $PR_NUMBER"
48+
echo ""
49+
echo "Title: $(gh pr view "$PR_NUMBER" --json title --jq .title)"
50+
echo ""
51+
echo "Description:"
52+
gh pr view "$PR_NUMBER" --json body --jq .body
53+
} > pr_info.txt
54+
55+
- name: Check for duplicate PRs
56+
env:
57+
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
PR_NUMBER: ${{ github.event.pull_request.number }}
60+
run: |
61+
COMMENT=$(bun script/duplicate-pr.ts -f pr_info.txt "Check the attached file for PR details and search for duplicates")
62+
63+
gh pr comment "$PR_NUMBER" --body "_The following comment was made by an LLM, it may be inaccurate:_
64+
65+
$COMMENT"

.github/workflows/format.yml

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

.github/workflows/generate.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: generate
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
workflow_dispatch:
8+
9+
jobs:
10+
generate:
11+
runs-on: blacksmith-4vcpu-ubuntu-2404
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
with:
19+
token: ${{ secrets.GITHUB_TOKEN }}
20+
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
21+
ref: ${{ github.event.pull_request.head.ref || github.ref_name }}
22+
23+
- name: Setup Bun
24+
uses: ./.github/actions/setup-bun
25+
26+
- name: Generate
27+
run: ./script/generate.ts
28+
29+
- name: Commit and push
30+
run: |
31+
if [ -z "$(git status --porcelain)" ]; then
32+
echo "No changes to commit"
33+
exit 0
34+
fi
35+
git config --local user.email "[email protected]"
36+
git config --local user.name "GitHub Action"
37+
git add -A
38+
git commit -m "chore: generate"
39+
git push origin HEAD:${{ github.ref_name }} --no-verify
40+
# if ! git push origin HEAD:${{ github.event.pull_request.head.ref || github.ref_name }} --no-verify; then
41+
# echo ""
42+
# echo "============================================"
43+
# echo "Failed to push generated code."
44+
# echo "Please run locally and push:"
45+
# echo ""
46+
# echo " ./script/generate.ts"
47+
# echo " git add -A && git commit -m \"chore: generate\" && git push"
48+
# echo ""
49+
# echo "============================================"
50+
# exit 1
51+
# fi

0 commit comments

Comments
 (0)