Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
41f9a58
ignore: update download stats 2026-01-01
actions-user Jan 1, 2026
dc85863
fix(server): add Content-Type headers for proxied static assets (#6587)
monotykamary Jan 1, 2026
35fff0c
chore: generate
actions-user Jan 1, 2026
3b03324
fix: display error if invalid agent is used in a command (#6578)
Leka74 Jan 1, 2026
7a3ff5b
fix(session): check for context overflow mid-turn in finish-step (#6480)
aryasaatvik Jan 1, 2026
8ebc601
core: use --no-cache when behind proxy to avoid hangs
rekram1-node Jan 1, 2026
e503654
core: make installdeps non blocking
rekram1-node Jan 1, 2026
5138f92
ignore: keep the process exit logic
rekram1-node Jan 1, 2026
9be944a
core: fix stats command day calculation and time filtering
rekram1-node Jan 1, 2026
8b35d56
fix: remove outdated Haiku filter for GitHub Copilot (#6593)
alcpereira Jan 1, 2026
5f2be55
docs: update zen processing fee
fwang Jan 1, 2026
dccb887
core: fix import command regex
rekram1-node Jan 1, 2026
351ddee
Permission rework (#6319)
thdxr Jan 1, 2026
99794c2
chore: generate
actions-user Jan 1, 2026
7760b33
ignore: comment out repo default for ask
rekram1-node Jan 1, 2026
76186d1
fix: ensure new permissions changes work for special case bash comman…
rekram1-node Jan 1, 2026
7aa1dbe
test: fix bash test
rekram1-node Jan 1, 2026
680db7b
Desktop: Improve Resize Handle (#6608)
dbpolito Jan 2, 2026
154c52c
fix: windows fallback for "less" cmd in `session list` (#6515)
itsrainingmani Jan 2, 2026
05eee67
feat: add assistant metadata to session export (#6611)
dmmulroy Jan 2, 2026
4f1ef93
ignore
thdxr Jan 2, 2026
963f407
tui: improve permission error handling and evaluation logic
thdxr Jan 2, 2026
db8d83b
tui: fix permission tests for new evaluate function signature
thdxr Jan 2, 2026
2aaea71
tui: add heap snapshot option to system menu for debugging memory usage
thdxr Jan 2, 2026
dad9c91
tui: fix memory leaks in session management and improve permission er…
thdxr Jan 2, 2026
07c008f
chore: generate
actions-user Jan 2, 2026
b84a1f7
tui: remove memory leak fixes documentation after implementation
thdxr Jan 2, 2026
78940d5
wip(app): file context
adamdotdevin Jan 1, 2026
b8872d9
wip(desktop): progress
adamdotdevin Jan 1, 2026
6647b1e
wip(desktop): progress
adamdotdevin Jan 1, 2026
6acd16d
wip(desktop): progress
adamdotdevin Jan 1, 2026
93f1e1a
wip(desktop): progress
adamdotdevin Jan 1, 2026
260eef2
wip(app): progress
adamdotdevin Jan 1, 2026
797d842
wip(app): progress
adamdotdevin Jan 2, 2026
6b4c433
wip(app): progress
adamdotdevin Jan 2, 2026
afc1825
wip(app): progress
adamdotdevin Jan 2, 2026
a5a569f
chore: cleanup
adamdotdevin Jan 2, 2026
0f34634
chore: cleanup
adamdotdevin Jan 2, 2026
cd2c160
fix(app): startup time
adamdotdevin Jan 2, 2026
e6ba241
wip(app): progress
adamdotdevin Jan 2, 2026
d603938
release: v1.0.224
Jan 2, 2026
389a5fc
tui: add reload functionality and improve lazy utility with reset cap…
thdxr Jan 2, 2026
38e5adc
chore: generate
actions-user Jan 2, 2026
741cb9c
ci
thdxr Jan 2, 2026
038cff4
core: improve plugin loading to handle builtin plugin failures gracef…
thdxr Jan 2, 2026
c600114
fix(share): handle NotFoundError for non-shared sessions in sync (#6634)
Hona Jan 2, 2026
814e513
ignore: update download stats 2026-01-02
actions-user Jan 2, 2026
fbd9677
fix(desktop): Properly decode session id for permission context (#6580)
OpeOginni Jan 2, 2026
ddb1ec2
fix(ui): fix slight vertical overflow in project selector (#6589)
albingroen Jan 2, 2026
2685de2
feat(theme): add Osaka Jade theme (#6609)
st-eez Jan 2, 2026
d8753cd
refactor: use Bun.sleep instead of Promise setTimeout (#6620)
edlsh Jan 2, 2026
70881b2
fix: cloudflare-ai-gateway sdk.chat undefined error (#6407)
englishm Jan 2, 2026
c996f3d
chore: ensure empty message isnt sent
rekram1-node Jan 2, 2026
49d7ccd
fix: variant for minimal
rekram1-node Jan 2, 2026
47ebb29
test: add message-v2 test
rekram1-node Jan 2, 2026
2fd9737
test: fix transform test
rekram1-node Jan 2, 2026
1d2d710
fix: relax request timeouts
adamdotdevin Jan 2, 2026
a4c6751
fix(desktop): tweak window drag region layout
adamdotdevin Jan 2, 2026
c51fa7c
feat: add /compact session command
adamdotdevin Jan 2, 2026
6e68ea0
fix: handle actions/checkout v6 credential storage change (#6667)
elithrar Jan 2, 2026
66bc046
fix: merge instructions arrays across config files (#6663)
elithrar Jan 2, 2026
3c41e4e
chore: rename repo references from sst/opencode to anomalyco/opencode…
thdxr Jan 2, 2026
0cf0294
anomalyco/opencode
thdxr Jan 2, 2026
131d8e5
docs: add subtask2 to ecosystem page (#6704)
spoons-and-mirrors Jan 2, 2026
a58dbb3
chore: add license field to package.json (#6693)
theavgjojo Jan 2, 2026
586207a
feat: Add kotlin lsp integration (#6601)
tjg184 Jan 2, 2026
681a257
chore: generate
actions-user Jan 2, 2026
a3f38e0
feat(plugin): add tui.session.select API endpoint for TUI navigation …
code-yeongyu Jan 2, 2026
1261b7d
chore: generate
actions-user Jan 2, 2026
4956ee3
tui: add escape key handling to permission dialogs for better keyboar…
thdxr Jan 2, 2026
49c5c2b
ci
thdxr Jan 2, 2026
b4af8a6
ci
thdxr Jan 2, 2026
ff0bd84
upgrade opentui to v0.1.68, using gpa
kommander Jan 3, 2026
f6fe709
Update Nix flake.lock and hashes
actions-user Jan 3, 2026
052de3c
feat: add managed git worktrees (#6674)
adamdotdevin Jan 3, 2026
a235aec
chore: generate
actions-user Jan 3, 2026
f2ec036
docs: rm incorrect -p alias from docs (#6721)
opencode-agent[bot] Jan 3, 2026
401b498
fix(tui): pass attach directory to sdk client (#6715)
shuv1337 Jan 3, 2026
f991fbb
core: ephemerally wrap queued user messages with reminder to stay on …
rekram1-node Jan 3, 2026
2b66b31
ignore: update bug report template
rekram1-node Jan 3, 2026
47c670a
tui: add reject message support to permission dialogs for better user…
thdxr Jan 3, 2026
77fcefc
chore: generate
actions-user Jan 3, 2026
b9b0e34
core: improve plugin loading to handle builtin plugin failures gracef…
rekram1-node Jan 3, 2026
da6df3d
fix(kotlin-ls): improve root detection for Gradle multi-project build…
JBou Jan 3, 2026
5c5e636
feat: add per-project MCP config overrides (#5406)
jknlsn Jan 3, 2026
527553a
chore: generate
actions-user Jan 3, 2026
5f93bee
feat(app): add image preview support in session viewer (#6678)
shuv1337 Jan 3, 2026
308e806
fix(server): update server URL normalization to retain path (#6647)
OpeOginni Jan 3, 2026
12eea69
fix(tui): make mcp status icon muted when no mcp servers are enabled …
itsrainingmani Jan 3, 2026
c7c1790
Desktop: Edit Project Fix (#6757)
dbpolito Jan 3, 2026
69d4ef0
docs: enhance MCP servers documentation with a tip (#6713)
sin4ch Jan 3, 2026
586e734
fix(mcp): add timeout to client.connect() calls (#6760)
RhysSullivan Jan 3, 2026
f6cc847
fix(tui): make lsp status icon muted when no lsps are active (#6773)
itsrainingmani Jan 3, 2026
0b4af95
core: add sandbox support for git worktrees to allow working in multi…
thdxr Jan 3, 2026
8b6cf70
chore: generate
actions-user Jan 3, 2026
81e8d29
oops
thdxr Jan 4, 2026
5944443
core: fix dependency installation and git worktree branch creation
thdxr Jan 4, 2026
dcf3700
tui: remove openrouter provider from priority list
thdxr Jan 4, 2026
235837d
fix(app): diff rendering performance
adamdotdevin Jan 4, 2026
74d0d2b
docs: update AGENTS.md (#6800)
aryasaatvik Jan 4, 2026
a5a1919
chore: generate
actions-user Jan 4, 2026
6b12a00
docs: Add Vercel AI Gateway to provider docs (#6790)
jerilynzheng Jan 4, 2026
d3fd6d1
zen: update models
fwang Jan 4, 2026
72cef0d
feat: add --variant flag to run command (#6805)
shuv1337 Jan 4, 2026
b934c22
ci: add duplicate PR detection bot
rekram1-node Jan 4, 2026
5aa4fd0
core: add variant to chat.message input
rekram1-node Jan 4, 2026
02540b2
ignore: update sst -> anomalyco
rekram1-node Jan 4, 2026
96a00ff
core: update github copilot model model priority list
rekram1-node Jan 4, 2026
4d7d28c
docs: Add opencode-scheduler plugin to ecosystem (#6804)
benjaminshafii Jan 4, 2026
c3fd3c8
fix(plugin): prevent duplicate plugin function initialization (#6787)
ShpetimA Jan 4, 2026
3611260
core: remove hardcoded .env read block and use new permissions model …
rekram1-node Jan 4, 2026
41cf45a
tui: fix system theme diff highlighting
rekram1-node Jan 4, 2026
4486174
github: handle duplicate PR creation when agent creates PR (#6777)
elithrar Jan 4, 2026
7ce0520
fix(app): auto-scroll behaviors
adamdotdevin Jan 4, 2026
c9f907c
fix(app): don't override ctrl+a on windows
adamdotdevin Jan 4, 2026
177b01a
fix(app): scroll position restoration
adamdotdevin Jan 4, 2026
5053822
fix(app): auto-scroll
adamdotdevin Jan 4, 2026
d72d7ab
tweak: prioritize free gpt-5-mini for small model in github copilot
rekram1-node Jan 4, 2026
8aa56dc
docs: add logging best practices for plugin authors (#6833)
elithrar Jan 4, 2026
4f3ac70
chore: generate
actions-user Jan 4, 2026
29672e7
ci: update duplicate pr action
rekram1-node Jan 4, 2026
1f8dab5
docs: typo in subtask documentation (#6821)
davejpeters Jan 4, 2026
f3cd3b8
Remove opencode-skills entry from ecosystem.mdx (#6817)
felipeorlando Jan 4, 2026
2d074f0
initialize config in worktree
thdxr Jan 4, 2026
e00621c
feat(nix): preliminary desktop app flake integration (#6135)
jerome-benoit Jan 4, 2026
21dc3c2
feat: mcp resources (#6542)
paoloricciuti Jan 4, 2026
24dedb4
fix(tui): add missing `theme_list` keybind (#6779)
aspiers Jan 4, 2026
555a5cc
chore: generate
actions-user Jan 4, 2026
97977f6
ensure @opencode-ai/plugin exists only on first run
thdxr Jan 4, 2026
a76570b
tui: add development scripts for better debugging workflow
thdxr Jan 4, 2026
0f9130b
Update Nix flake.lock and hashes
actions-user Jan 4, 2026
dc25669
release: v1.1.1
Jan 4, 2026
273a78a
Merge upstream v1.1.1 into shuvcode
shuv1337 Jan 5, 2026
feabef0
fix(app): restore missing mobileSidebar and view properties to layout…
shuv1337 Jan 5, 2026
2c670e5
fix(app): restore missing theme and font properties to layout context
shuv1337 Jan 5, 2026
90d5fc8
feat(app): adopt upstream header pattern and relocate theme/font sett…
shuv1337 Jan 5, 2026
d60c9a9
style(app): remove redundant status bar and fix sidebar menu alignment
shuv1337 Jan 5, 2026
5e374b1
fix: improve sidebar collapsed state UI
shuv1337 Jan 5, 2026
b38a14a
fix: resolve TypeScript errors for SDK type compatibility
shuv1337 Jan 5, 2026
bdf2646
Merge origin/integration into v1.1.1.1-integration-test
shuv1337 Jan 5, 2026
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
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ body:
validations:
required: true

- type: input
id: plugins
attributes:
label: Plugins
description: What plugins are you using?
validations:
required: false

- type: input
id: opencode-version
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/last-synced-tag
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.0.223
v1.1.1
60 changes: 60 additions & 0 deletions .github/workflows/duplicate-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Duplicate PR Check

on:
pull_request_target:
types: [opened]

jobs:
check-duplicates:
if: |
github.event.pull_request.user.login != 'actions-user' &&
github.event.pull_request.user.login != 'opencode' &&
github.event.pull_request.user.login != 'rekram1-node' &&
github.event.pull_request.user.login != 'thdxr' &&
github.event.pull_request.user.login != 'kommander' &&
github.event.pull_request.user.login != 'jayair' &&
github.event.pull_request.user.login != 'fwang' &&
github.event.pull_request.user.login != 'adamdotdevin' &&
github.event.pull_request.user.login != 'iamdavidhill' &&
github.event.pull_request.user.login != 'opencode-agent[bot]'
runs-on: blacksmith-4vcpu-ubuntu-2404
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup Bun
uses: ./.github/actions/setup-bun

- name: Install opencode
run: curl -fsSL https://opencode.ai/install | bash

- name: Build prompt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
{
echo "Check for duplicate PRs related to this new PR:"
echo ""
echo "Title: $(gh pr view "$PR_NUMBER" --json title --jq .title)"
echo ""
echo "Description:"
gh pr view "$PR_NUMBER" --json body --jq .body
} > pr_info.txt

- name: Check for duplicate PRs
env:
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
COMMENT=$(opencode run --agent duplicate-pr --print -f pr_info.txt "Check the attached file for PR details and search for duplicates")

gh pr comment "$PR_NUMBER" --body "_The following comment was made by an LLM, it may be inaccurate:_

$COMMENT"
29 changes: 29 additions & 0 deletions .github/workflows/nix-desktop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: nix desktop

on:
pull_request:
branches: [dev]
workflow_dispatch:

jobs:
build-desktop:
strategy:
fail-fast: false
matrix:
os:
- blacksmith-4vcpu-ubuntu-2404
- macos-latest
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Setup Nix
uses: DeterminateSystems/nix-installer-action@v21

- name: Build desktop via flake
run: |
set -euo pipefail
nix --version
nix build .#desktop -L
13 changes: 1 addition & 12 deletions .github/workflows/opencode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,7 @@ jobs:
if: ${{ !github.event.issue.pull_request && contains(github.event.issue.labels.*.name, 'upstream-sync') }}
run: git checkout integration

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.3

- name: Install dependencies
run: bun install
- uses: ./.github/actions/setup-bun

- name: Run shuvcode
uses: Latitudes-Dev/shuvcode/github@integration
Expand Down
58 changes: 29 additions & 29 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,6 @@ jobs:

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

- name: Setup SSH for AUR
if: inputs.bump || inputs.version
run: |
sudo apt-get update
sudo apt-get install -y pacman-package-manager
mkdir -p ~/.ssh
echo "${{ secrets.AUR_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
git config --global user.email "shuvcode@latitudes.dev"
git config --global user.name "shuvcode"
ssh-keyscan -H aur.archlinux.org >> ~/.ssh/known_hosts || true

- name: Install OpenCode
if: inputs.bump || inputs.version
run: bun i -g opencode-ai@1.0.169
Expand All @@ -84,18 +72,17 @@ jobs:

- name: Setup Git Identity
run: |
git config --global user.email "opencode@sst.dev"
git config --global user.name "opencode"
git config --global user.email "shuvcode@latitudes.dev"
git config --global user.name "shuvcode"
git remote set-url origin https://x-access-token:${{ secrets.SST_GITHUB_TOKEN }}@github.com/${{ github.repository }}

- name: Publish
id: publish
run: ./script/publish.ts
run: ./script/publish-start.ts
env:
OPENCODE_BUMP: ${{ inputs.bump }}
OPENCODE_VERSION: ${{ inputs.version }}
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
AUR_KEY: ${{ secrets.AUR_KEY }}
GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: false
Expand All @@ -106,8 +93,9 @@ jobs:
path: packages/opencode/dist

outputs:
releaseId: ${{ steps.publish.outputs.releaseId }}
tagName: ${{ steps.publish.outputs.tagName }}
release: ${{ steps.publish.outputs.release }}
tag: ${{ steps.publish.outputs.tag }}
version: ${{ steps.publish.outputs.version }}

publish-tauri:
needs: publish
Expand All @@ -131,7 +119,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ needs.publish.outputs.tagName }}
ref: ${{ needs.publish.outputs.tag }}

- uses: apple-actions/import-codesign-certs@v2
if: ${{ runner.os == 'macOS' }}
Expand Down Expand Up @@ -178,16 +166,13 @@ jobs:
cd packages/desktop
bun ./scripts/prepare.ts
env:
OPENCODE_BUMP: ${{ inputs.bump }}
OPENCODE_VERSION: ${{ inputs.version }}
OPENCODE_CHANNEL: latest
OPENCODE_VERSION: ${{ needs.publish.outputs.version }}
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }}
AUR_KEY: ${{ secrets.AUR_KEY }}
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
RUST_TARGET: ${{ matrix.settings.target }}
GH_TOKEN: ${{ github.token }}
OPENCODE_RELEASE_TAG: ${{ needs.publish.outputs.tagName }}
GITHUB_RUN_ID: ${{ github.run_id }}

# Fixes AppImage build issues, can be removed when https://github.com/tauri-apps/tauri/pull/12491 is released
Expand Down Expand Up @@ -218,23 +203,38 @@ jobs:
tauriScript: ${{ (contains(matrix.settings.host, 'ubuntu') && 'cargo tauri') || '' }}
args: --target ${{ matrix.settings.target }} --config ./src-tauri/tauri.prod.conf.json --verbose
updaterJsonPreferNsis: true
releaseId: ${{ needs.publish.outputs.releaseId }}
tagName: ${{ needs.publish.outputs.tagName }}
releaseId: ${{ needs.publish.outputs.release }}
tagName: ${{ needs.publish.outputs.tag }}
releaseAssetNamePattern: opencode-desktop-[platform]-[arch][ext]
releaseDraft: true

publish-release:
needs:
- publish
- publish-tauri
if: needs.publish.outputs.tagName
if: needs.publish.outputs.tag
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ needs.publish.outputs.tagName }}
ref: ${{ needs.publish.outputs.tag }}

- run: gh release edit ${{ needs.publish.outputs.tagName }} --draft=false
- uses: ./.github/actions/setup-bun

- name: Setup SSH for AUR
run: |
sudo apt-get update
sudo apt-get install -y pacman-package-manager
mkdir -p ~/.ssh
echo "${{ secrets.AUR_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
git config --global user.email "shuvcode@latitudes.dev"
git config --global user.name "shuvcode"
ssh-keyscan -H aur.archlinux.org >> ~/.ssh/known_hosts || true

- run: ./script/publish-complete.ts
env:
GH_TOKEN: ${{ github.token }}
OPENCODE_VERSION: ${{ needs.publish.outputs.version }}
AUR_KEY: ${{ secrets.AUR_KEY }}
GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }}
6 changes: 2 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ name: test

on:
push:
branches-ignore:
- production
branches:
- dev
pull_request:
branches-ignore:
- production
workflow_dispatch:
jobs:
test:
Expand Down
24 changes: 24 additions & 0 deletions .opencode/agent/duplicate-pr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
mode: primary
hidden: true
model: opencode/claude-haiku-4-5
color: "#E67E22"
tools:
"*": false
"github-pr-search": true
---

You are a duplicate PR detection agent. When a PR is opened, your job is to search for potentially duplicate or related open PRs.

Use the github-pr-search tool to search for PRs that might be addressing the same issue or feature.

Search using keywords from the PR title and description. Try multiple searches with different relevant terms.

If you find potential duplicates:

- List them with their titles and URLs
- Briefly explain why they might be related

If no duplicates are found, say so clearly.

Keep your response concise and actionable.
52 changes: 52 additions & 0 deletions .opencode/tool/github-pr-search.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/// <reference path="../env.d.ts" />
import { tool } from "@opencode-ai/plugin"
import DESCRIPTION from "./github-pr-search.txt"

async function githubFetch(endpoint: string, options: RequestInit = {}) {
const response = await fetch(`https://api.github.com${endpoint}`, {
...options,
headers: {
Authorization: `Bearer ${process.env.GITHUB_TOKEN}`,
Accept: "application/vnd.github+json",
"Content-Type": "application/json",
...options.headers,
},
})
if (!response.ok) {
throw new Error(`GitHub API error: ${response.status} ${response.statusText}`)
}
return response.json()
}

interface PR {
title: string
html_url: string
}

export default tool({
description: DESCRIPTION,
args: {
query: tool.schema.string().describe("Search query for PR titles and descriptions"),
limit: tool.schema.number().describe("Maximum number of results to return").default(10),
offset: tool.schema.number().describe("Number of results to skip for pagination").default(0),
},
async execute(args) {
const owner = "anomalyco"
const repo = "opencode"

const page = Math.floor(args.offset / args.limit) + 1
const searchQuery = encodeURIComponent(`${args.query} repo:${owner}/${repo} type:pr state:open`)
const result = await githubFetch(
`/search/issues?q=${searchQuery}&per_page=${args.limit}&page=${page}&sort=updated&order=desc`,
)

if (result.total_count === 0) {
return `No PRs found matching "${args.query}"`
}

const prs = result.items as PR[]
const formatted = prs.map((pr) => `${pr.title}\n${pr.html_url}`).join("\n\n")

return `Found ${result.total_count} PRs (showing ${prs.length}):\n\n${formatted}`
},
})
10 changes: 10 additions & 0 deletions .opencode/tool/github-pr-search.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Use this tool to search GitHub pull requests by title and description.

This tool searches PRs in the sst/opencode repository and returns LLM-friendly results including:
- PR number and title
- Author
- State (open/closed/merged)
- Labels
- Description snippet

Use the query parameter to search for keywords that might appear in PR titles or descriptions.
16 changes: 10 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@
## Debugging

- To test opencode in the `packages/opencode` directory you can run `bun dev`
- To regenerate the javascript SDK, run ./packages/sdk/js/script/build.ts
- ALWAYS USE PARALLEL TOOLS WHEN APPLICABLE.
- the default branch in this repo is `dev`

## SDK

To regenerate the javascript SDK, run ./packages/sdk/js/script/build.ts

## Tool Calling
## Upstream Merge Operations

- ALWAYS USE PARALLEL TOOLS WHEN APPLICABLE.
When merging upstream tags (e.g., v1.1.1):
1. Use `git merge <tag> --no-commit` to start merge without auto-commit
2. List conflicts: `git diff --name-only --diff-filter=U`
3. Cannot commit plan updates mid-merge - all conflict resolution must complete first
4. For files deleted in fork but modified upstream (delete/modify conflicts), decide per-file:
- `.opencode/*` files are upstream-specific, delete them: `git rm <file>`
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ However, any UI or core product feature must go through a design review with the

If you are unsure if a PR would be accepted, feel free to ask a maintainer or look for issues with any of the following labels:

- [`help wanted`](https://github.com/sst/opencode/issues?q=is%3Aissue%20state%3Aopen%20label%3Ahelp-wanted)
- [`good first issue`](https://github.com/sst/opencode/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22good%20first%20issue%22)
- [`bug`](https://github.com/sst/opencode/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug)
- [`perf`](https://github.com/sst/opencode/issues?q=is%3Aopen%20is%3Aissue%20label%3A%22perf%22)
- [`help wanted`](https://github.com/anomalyco/opencode/issues?q=is%3Aissue%20state%3Aopen%20label%3Ahelp-wanted)
- [`good first issue`](https://github.com/anomalyco/opencode/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22good%20first%20issue%22)
- [`bug`](https://github.com/anomalyco/opencode/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug)
- [`perf`](https://github.com/anomalyco/opencode/issues?q=is%3Aopen%20is%3Aissue%20label%3A%22perf%22)

> [!NOTE]
> PRs that ignore these guardrails will likely be closed.
Expand Down
Loading