Skip to content

Commit 955d859

Browse files
authored
Merge branch 'dev' into feat/canceled-prompts-in-history
2 parents 33b3388 + a697816 commit 955d859

846 files changed

Lines changed: 43265 additions & 12092 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/workflows/docs-locale-sync.yml

Lines changed: 11 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -47,60 +47,26 @@ jobs:
4747
echo "EOF"
4848
} >> "$GITHUB_OUTPUT"
4949
50+
- name: Install OpenCode
51+
if: steps.changes.outputs.has_changes == 'true'
52+
run: curl -fsSL https://opencode.ai/install | bash
53+
5054
- name: Sync locale docs with OpenCode
5155
if: steps.changes.outputs.has_changes == 'true'
52-
uses: sst/opencode/github@latest
5356
env:
5457
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
55-
GITHUB_TOKEN: ${{ steps.committer.outputs.token }}
5658
OPENCODE_CONFIG_CONTENT: |
5759
{
5860
"permission": {
5961
"*": "deny",
60-
"read": {
61-
"*": "deny",
62-
"packages/web/src/content/docs": "allow",
63-
"packages/web/src/content/docs/*": "allow",
64-
"packages/web/src/content/docs/*.mdx": "allow",
65-
"packages/web/src/content/docs/*/*.mdx": "allow",
66-
".opencode": "allow",
67-
".opencode/agent": "allow",
68-
".opencode/glossary": "allow",
69-
".opencode/agent/translator.md": "allow",
70-
".opencode/glossary/*.md": "allow"
71-
},
72-
"edit": {
73-
"*": "deny",
74-
"packages/web/src/content/docs/*/*.mdx": "allow"
75-
},
76-
"glob": {
77-
"*": "deny",
78-
"packages/web/src/content/docs*": "allow",
79-
".opencode/glossary*": "allow"
80-
},
81-
"task": {
82-
"*": "deny",
83-
"translator": "allow"
84-
}
85-
},
86-
"agent": {
87-
"translator": {
88-
"permission": {
89-
"*": "deny",
90-
"read": {
91-
"*": "deny",
92-
".opencode/agent/translator.md": "allow",
93-
".opencode/glossary/*.md": "allow"
94-
}
95-
}
96-
}
62+
"read": "allow",
63+
"edit": "allow",
64+
"glob": "allow",
65+
"task": "allow"
9766
}
9867
}
99-
with:
100-
model: opencode/gpt-5.3-codex
101-
agent: docs
102-
use_github_token: true
103-
prompt: |
68+
run: |
69+
opencode run --agent docs --model opencode/gpt-5.3-codex <<'EOF'
10470
Update localized docs to match the latest English docs changes.
10571
10672
Changed English doc files:
@@ -118,6 +84,7 @@ jobs:
11884
7. Keep locale docs structure aligned with their corresponding English pages.
11985
8. Do not modify English source docs in packages/web/src/content/docs/*.mdx.
12086
9. If no locale updates are needed, make no changes.
87+
EOF
12188
12289
- name: Commit and push locale docs updates
12390
if: steps.changes.outputs.has_changes == 'true'

.github/workflows/publish.yml

Lines changed: 127 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ jobs:
9999
with:
100100
name: opencode-cli
101101
path: packages/opencode/dist
102-
103102
outputs:
104103
version: ${{ needs.version.outputs.version }}
105104

@@ -240,11 +239,131 @@ jobs:
240239
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
241240
APPLE_API_KEY_PATH: ${{ runner.temp }}/apple-api-key.p8
242241

242+
build-electron:
243+
needs:
244+
- build-cli
245+
- version
246+
continue-on-error: false
247+
strategy:
248+
fail-fast: false
249+
matrix:
250+
settings:
251+
- host: macos-latest
252+
target: x86_64-apple-darwin
253+
platform_flag: --mac --x64
254+
- host: macos-latest
255+
target: aarch64-apple-darwin
256+
platform_flag: --mac --arm64
257+
- host: "blacksmith-4vcpu-windows-2025"
258+
target: x86_64-pc-windows-msvc
259+
platform_flag: --win
260+
- host: "blacksmith-4vcpu-ubuntu-2404"
261+
target: x86_64-unknown-linux-gnu
262+
platform_flag: --linux
263+
- host: "blacksmith-4vcpu-ubuntu-2404"
264+
target: aarch64-unknown-linux-gnu
265+
platform_flag: --linux
266+
runs-on: ${{ matrix.settings.host }}
267+
# if: github.ref_name == 'beta'
268+
steps:
269+
- uses: actions/checkout@v3
270+
271+
- uses: apple-actions/import-codesign-certs@v2
272+
if: runner.os == 'macOS'
273+
with:
274+
keychain: build
275+
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }}
276+
p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
277+
278+
- name: Setup Apple API Key
279+
if: runner.os == 'macOS'
280+
run: echo "${{ secrets.APPLE_API_KEY_PATH }}" > $RUNNER_TEMP/apple-api-key.p8
281+
282+
- uses: ./.github/actions/setup-bun
283+
284+
- uses: actions/setup-node@v4
285+
with:
286+
node-version: "24"
287+
288+
- name: Cache apt packages
289+
if: contains(matrix.settings.host, 'ubuntu')
290+
uses: actions/cache@v4
291+
with:
292+
path: ~/apt-cache
293+
key: ${{ runner.os }}-${{ matrix.settings.target }}-apt-electron-${{ hashFiles('.github/workflows/publish.yml') }}
294+
restore-keys: |
295+
${{ runner.os }}-${{ matrix.settings.target }}-apt-electron-
296+
297+
- name: Install dependencies (ubuntu only)
298+
if: contains(matrix.settings.host, 'ubuntu')
299+
run: |
300+
mkdir -p ~/apt-cache && chmod -R a+rw ~/apt-cache
301+
sudo apt-get update
302+
sudo apt-get install -y --no-install-recommends -o dir::cache::archives="$HOME/apt-cache" rpm
303+
sudo chmod -R a+rw ~/apt-cache
304+
305+
- name: Setup git committer
306+
id: committer
307+
uses: ./.github/actions/setup-git-committer
308+
with:
309+
opencode-app-id: ${{ vars.OPENCODE_APP_ID }}
310+
opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }}
311+
312+
- name: Prepare
313+
run: bun ./scripts/prepare.ts
314+
working-directory: packages/desktop-electron
315+
env:
316+
OPENCODE_VERSION: ${{ needs.version.outputs.version }}
317+
OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }}
318+
RUST_TARGET: ${{ matrix.settings.target }}
319+
GH_TOKEN: ${{ github.token }}
320+
GITHUB_RUN_ID: ${{ github.run_id }}
321+
322+
- name: Build
323+
run: bun run build
324+
working-directory: packages/desktop-electron
325+
env:
326+
OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }}
327+
328+
- name: Package and publish
329+
if: needs.version.outputs.release
330+
run: npx electron-builder ${{ matrix.settings.platform_flag }} --publish always --config electron-builder.config.ts
331+
working-directory: packages/desktop-electron
332+
timeout-minutes: 60
333+
env:
334+
OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }}
335+
GH_TOKEN: ${{ steps.committer.outputs.token }}
336+
CSC_LINK: ${{ secrets.APPLE_CERTIFICATE }}
337+
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
338+
APPLE_API_KEY: ${{ runner.temp }}/apple-api-key.p8
339+
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY }}
340+
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
341+
342+
- name: Package (no publish)
343+
if: ${{ !needs.version.outputs.release }}
344+
run: npx electron-builder ${{ matrix.settings.platform_flag }} --publish never --config electron-builder.config.ts
345+
working-directory: packages/desktop-electron
346+
timeout-minutes: 60
347+
env:
348+
OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }}
349+
350+
- uses: actions/upload-artifact@v4
351+
with:
352+
name: opencode-electron-${{ matrix.settings.target }}
353+
path: packages/desktop-electron/dist/*
354+
355+
- uses: actions/upload-artifact@v4
356+
if: needs.version.outputs.release
357+
with:
358+
name: latest-yml-${{ matrix.settings.target }}
359+
path: packages/desktop-electron/dist/latest*.yml
360+
243361
publish:
244362
needs:
245363
- version
246364
- build-cli
247365
- build-tauri
366+
- build-electron
248367
runs-on: blacksmith-4vcpu-ubuntu-2404
249368
steps:
250369
- uses: actions/checkout@v3
@@ -281,6 +400,12 @@ jobs:
281400
name: opencode-cli
282401
path: packages/opencode/dist
283402

403+
- uses: actions/download-artifact@v4
404+
if: needs.version.outputs.release
405+
with:
406+
pattern: latest-yml-*
407+
path: /tmp/latest-yml
408+
284409
- name: Cache apt packages (AUR)
285410
uses: actions/cache@v4
286411
with:
@@ -308,3 +433,4 @@ jobs:
308433
GITHUB_TOKEN: ${{ steps.committer.outputs.token }}
309434
GH_REPO: ${{ needs.version.outputs.repo }}
310435
NPM_CONFIG_PROVENANCE: false
436+
LATEST_YML_DIR: /tmp/latest-yml

.opencode/agent/translator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Translate content for a specified locale while preserving technical terms
33
mode: subagent
4-
model: opencode/gemini-3.1-pro
4+
model: opencode/gemini-3-pro
55
---
66

77
You are a professional translator and localization specialist.

.opencode/glossary/tr.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# tr Glossary
2+
3+
## Sources
4+
5+
- PR #15835: https://github.com/anomalyco/opencode/pull/15835
6+
7+
## Do Not Translate (Locale Additions)
8+
9+
- `OpenCode` (preserve casing in prose, docs, and UI copy)
10+
- Keep lowercase `opencode` in commands, package names, paths, URLs, and other exact identifiers
11+
- `<TAB>` stays the literal key token in code blocks; use `Tab` for the nearby explanatory label in prose
12+
- Commands, flags, file paths, and code literals (keep exactly as written)
13+
14+
## Preferred Terms
15+
16+
These are PR-backed wording preferences and may evolve.
17+
18+
| English / Context | Preferred | Notes |
19+
| ------------------------- | --------------------------------------- | ------------------------------------------------------------- |
20+
| available in beta | `beta olarak mevcut` | Prefer this over `beta olarak kullanılabilir` |
21+
| privacy-first | `Gizlilik öncelikli tasarlandı` | Prefer this over `Önce gizlilik için tasarlandı` |
22+
| connect your local models | `yerel modellerinizi bağlayabilirsiniz` | Use the fuller, more direct action phrase |
23+
| `<TAB>` key label | `Tab` | Use `Tab` in prose; keep `<TAB>` in literal UI or code blocks |
24+
| cross-platform | `cross-platform (tüm platformlarda)` | Keep the English term, add a short clarification when helpful |
25+
26+
## Guidance
27+
28+
- Prefer natural Turkish phrasing over literal translation
29+
- Merge broken sentence fragments into one clear sentence when the source is a single thought
30+
- Keep product naming consistent: `OpenCode` in prose, `opencode` only for exact technical identifiers
31+
- When an English technical term is intentionally kept, add a short Turkish clarification only if it improves readability
32+
33+
## Avoid
34+
35+
- Avoid `beta olarak kullanılabilir` when `beta olarak mevcut` fits
36+
- Avoid `Önce gizlilik için tasarlandı`; use the more natural reviewed wording instead
37+
- Avoid `Sekme` for the translated key label in prose when referring to `<TAB>`
38+
- Avoid changing `opencode` to `OpenCode` inside commands, URLs, package names, or code literals

AGENTS.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@
2020

2121
Prefer single word names for variables and functions. Only use multiple words if necessary.
2222

23+
### Naming Enforcement (Read This)
24+
25+
THIS RULE IS MANDATORY FOR AGENT WRITTEN CODE.
26+
27+
- Use single word names by default for new locals, params, and helper functions.
28+
- Multi-word names are allowed only when a single word would be unclear or ambiguous.
29+
- Do not introduce new camelCase compounds when a short single-word alternative is clear.
30+
- Before finishing edits, review touched lines and shorten newly introduced identifiers where possible.
31+
- Good short names to prefer: `pid`, `cfg`, `err`, `opts`, `dir`, `root`, `child`, `state`, `timeout`.
32+
- Examples to avoid unless truly required: `inputPID`, `existingClient`, `connectTimeout`, `workerPath`.
33+
2334
```ts
2435
// Good
2536
const foo = 1

README.ar.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@
2727
<a href="README.ja.md">日本語</a> |
2828
<a href="README.pl.md">Polski</a> |
2929
<a href="README.ru.md">Русский</a> |
30+
<a href="README.bs.md">Bosanski</a> |
3031
<a href="README.ar.md">العربية</a> |
3132
<a href="README.no.md">Norsk</a> |
3233
<a href="README.br.md">Português (Brasil)</a> |
3334
<a href="README.th.md">ไทย</a> |
3435
<a href="README.tr.md">Türkçe</a> |
3536
<a href="README.uk.md">Українська</a> |
36-
<a href="README.bn.md">বাংলা</a>
37+
<a href="README.bn.md">বাংলা</a> |
38+
<a href="README.gr.md">Ελληνικά</a>
3739
</p>
3840

3941
[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai)

README.bn.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
<a href="README.th.md">ไทย</a> |
3535
<a href="README.tr.md">Türkçe</a> |
3636
<a href="README.uk.md">Українська</a> |
37-
<a href="README.bn.md">বাংলা</a>
37+
<a href="README.bn.md">বাংলা</a> |
38+
<a href="README.gr.md">Ελληνικά</a>
3839
</p>
3940

4041
[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai)

README.br.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
<a href="README.th.md">ไทย</a> |
3434
<a href="README.tr.md">Türkçe</a> |
3535
<a href="README.uk.md">Українська</a> |
36-
<a href="README.bn.md">বাংলা</a>
36+
<a href="README.bn.md">বাংলা</a> |
37+
<a href="README.gr.md">Ελληνικά</a>
3738
</p>
3839

3940
[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai)

README.bs.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
<a href="README.th.md">ไทย</a> |
3535
<a href="README.tr.md">Türkçe</a> |
3636
<a href="README.uk.md">Українська</a> |
37-
<a href="README.bn.md">বাংলা</a>
37+
<a href="README.bn.md">বাংলা</a> |
38+
<a href="README.gr.md">Ελληνικά</a>
3839
</p>
3940

4041
[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai)

README.da.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
<a href="README.th.md">ไทย</a> |
3434
<a href="README.tr.md">Türkçe</a> |
3535
<a href="README.uk.md">Українська</a> |
36-
<a href="README.bn.md">বাংলা</a>
36+
<a href="README.bn.md">বাংলা</a> |
37+
<a href="README.gr.md">Ελληνικά</a>
3738
</p>
3839

3940
[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai)

0 commit comments

Comments
 (0)