Skip to content

Commit fe1ffed

Browse files
authored
Merge pull request #325 from Latitudes-Dev/merge-v1.1.39
sync: merge upstream v1.1.39
2 parents 239b75d + 64e239f commit fe1ffed

File tree

254 files changed

+12018
-3549
lines changed

Some content is hidden

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

254 files changed

+12018
-3549
lines changed

.github/last-synced-tag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.1.36
1+
v1.1.39
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Close stale PRs
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
dryRun:
7+
description: "Log actions without closing PRs"
8+
type: boolean
9+
default: false
10+
schedule:
11+
- cron: "0 6 * * *"
12+
13+
permissions:
14+
contents: read
15+
issues: write
16+
pull-requests: write
17+
18+
jobs:
19+
close-stale-prs:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Close inactive PRs
23+
uses: actions/github-script@v8
24+
with:
25+
github-token: ${{ secrets.GITHUB_TOKEN }}
26+
script: |
27+
const DAYS_INACTIVE = 60
28+
const cutoff = new Date(Date.now() - DAYS_INACTIVE * 24 * 60 * 60 * 1000)
29+
const { owner, repo } = context.repo
30+
const dryRun = context.payload.inputs?.dryRun === "true"
31+
const stalePrs = []
32+
33+
core.info(`Dry run mode: ${dryRun}`)
34+
35+
const prs = await github.paginate(github.rest.pulls.list, {
36+
owner,
37+
repo,
38+
state: "open",
39+
per_page: 100,
40+
sort: "updated",
41+
direction: "asc",
42+
})
43+
44+
for (const pr of prs) {
45+
const lastUpdated = new Date(pr.updated_at)
46+
if (lastUpdated > cutoff) {
47+
core.info(`PR ${pr.number} is fresh`)
48+
continue
49+
}
50+
51+
stalePrs.push(pr)
52+
}
53+
54+
if (!stalePrs.length) {
55+
core.info("No stale pull requests found.")
56+
return
57+
}
58+
59+
for (const pr of stalePrs) {
60+
const issue_number = pr.number
61+
const closeComment = `Closing this pull request because it has had no updates for more than ${DAYS_INACTIVE} days. If you plan to continue working on it, feel free to reopen or open a new PR.`
62+
63+
if (dryRun) {
64+
core.info(`[dry-run] Would close PR #${issue_number} from ${pr.user.login}`)
65+
continue
66+
}
67+
68+
await github.rest.issues.createComment({
69+
owner,
70+
repo,
71+
issue_number,
72+
body: closeComment,
73+
})
74+
75+
await github.rest.pulls.update({
76+
owner,
77+
repo,
78+
pull_number: issue_number,
79+
state: "closed",
80+
})
81+
82+
core.info(`Closed PR #${issue_number} from ${pr.user.login}`)
83+
}

.opencode/command/ai-deps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Please read @package.json and @packages/opencode/package.json.
77
Your job is to look into AI SDK dependencies, figure out if they have versions that can be upgraded (minor or patch versions ONLY no major ignore major changes).
88

99
I want a report of every dependency and the version that can be upgraded to.
10-
What would be even better is if you can give me links to the changelog for each dependency, or at least some reference info so I can see what bugs were fixed or new features were added.
10+
What would be even better is if you can give me brief summary of the changes for each dep and a link to the changelog for each dependency, or at least some reference info so I can see what bugs were fixed or new features were added.
1111

1212
Consider using subagents for each dep to save your context window.
1313

.opencode/command/learn.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
description: Extract non-obvious learnings from session to AGENTS.md files to build codebase understanding
3+
---
4+
5+
Analyze this session and extract non-obvious learnings to add to AGENTS.md files.
6+
7+
AGENTS.md files can exist at any directory level, not just the project root. When an agent reads a file, any AGENTS.md in parent directories are automatically loaded into the context of the tool read. Place learnings as close to the relevant code as possible:
8+
9+
- Project-wide learnings → root AGENTS.md
10+
- Package/module-specific → packages/foo/AGENTS.md
11+
- Feature-specific → src/auth/AGENTS.md
12+
13+
What counts as a learning (non-obvious discoveries only):
14+
15+
- Hidden relationships between files or modules
16+
- Execution paths that differ from how code appears
17+
- Non-obvious configuration, env vars, or flags
18+
- Debugging breakthroughs when error messages were misleading
19+
- API/tool quirks and workarounds
20+
- Build/test commands not in README
21+
- Architectural decisions and constraints
22+
- Files that must change together
23+
24+
What NOT to include:
25+
26+
- Obvious facts from documentation
27+
- Standard language/framework behavior
28+
- Things already in an AGENTS.md
29+
- Verbose explanations
30+
- Session-specific details
31+
32+
Process:
33+
34+
1. Review session for discoveries, errors that took multiple attempts, unexpected connections
35+
2. Determine scope - what directory does each learning apply to?
36+
3. Read existing AGENTS.md files at relevant levels
37+
4. Create or update AGENTS.md at the appropriate level
38+
5. Keep entries to 1-3 lines per insight
39+
40+
After updating, summarize which AGENTS.md files were created/updated and how many learnings per file.
41+
42+
$ARGUMENTS

AGENTS.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ When merging upstream tags (e.g., v1.1.1):
3535
- Avoid using the `any` type
3636
- Prefer single word variable names where possible
3737
- Use Bun APIs when possible, like `Bun.file()`
38+
- Rely on type inference when possible; avoid explicit type annotations or interfaces unless necessary for exports or clarity
3839

39-
# Avoid let statements
40+
### Avoid let statements
4041

4142
We don't like `let` statements, especially combined with if/else statements.
4243
Prefer `const`.
@@ -56,7 +57,7 @@ if (condition) foo = 1
5657
else foo = 2
5758
```
5859

59-
# Avoid else statements
60+
### Avoid else statements
6061

6162
Prefer early returns or using an `iife` to avoid else statements.
6263

@@ -78,7 +79,7 @@ function foo() {
7879
}
7980
```
8081

81-
# Prefer single word naming
82+
### Prefer single word naming
8283

8384
Try your best to find a single word name for your variables, functions, etc.
8485
Only use multiple words if you cannot.
@@ -98,3 +99,8 @@ const fooBar = 1
9899
const barBaz = 2
99100
const bazFoo = 3
100101
```
102+
103+
## Testing
104+
105+
You MUST avoid using `mocks` as much as possible.
106+
Tests MUST test actual implementation, do not duplicate logic into a test.

README.ar.md

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
<p align="center">
2+
<a href="https://opencode.ai">
3+
<picture>
4+
<source srcset="packages/console/app/src/asset/logo-ornate-dark.svg" media="(prefers-color-scheme: dark)">
5+
<source srcset="packages/console/app/src/asset/logo-ornate-light.svg" media="(prefers-color-scheme: light)">
6+
<img src="packages/console/app/src/asset/logo-ornate-light.svg" alt="شعار OpenCode">
7+
</picture>
8+
</a>
9+
</p>
10+
<p align="center">وكيل برمجة بالذكاء الاصطناعي مفتوح المصدر.</p>
11+
<p align="center">
12+
<a href="https://opencode.ai/discord"><img alt="Discord" src="https://img.shields.io/discord/1391832426048651334?style=flat-square&label=discord" /></a>
13+
<a href="https://www.npmjs.com/package/opencode-ai"><img alt="npm" src="https://img.shields.io/npm/v/opencode-ai?style=flat-square" /></a>
14+
<a href="https://github.com/anomalyco/opencode/actions/workflows/publish.yml"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/anomalyco/opencode/publish.yml?style=flat-square&branch=dev" /></a>
15+
</p>
16+
17+
<p align="center">
18+
<a href="README.md">English</a> |
19+
<a href="README.zh.md">简体中文</a> |
20+
<a href="README.zht.md">繁體中文</a> |
21+
<a href="README.ko.md">한국어</a> |
22+
<a href="README.de.md">Deutsch</a> |
23+
<a href="README.es.md">Español</a> |
24+
<a href="README.fr.md">Français</a> |
25+
<a href="README.it.md">Italiano</a> |
26+
<a href="README.da.md">Dansk</a> |
27+
<a href="README.ja.md">日本語</a> |
28+
<a href="README.pl.md">Polski</a> |
29+
<a href="README.ru.md">Русский</a> |
30+
<a href="README.ar.md">العربية</a> |
31+
<a href="README.no.md">Norsk</a> |
32+
<a href="README.br.md">Português (Brasil)</a>
33+
</p>
34+
35+
[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai)
36+
37+
---
38+
39+
### التثبيت
40+
41+
```bash
42+
# YOLO
43+
curl -fsSL https://opencode.ai/install | bash
44+
45+
# مديري الحزم
46+
npm i -g opencode-ai@latest # او bun/pnpm/yarn
47+
scoop install opencode # Windows
48+
choco install opencode # Windows
49+
brew install anomalyco/tap/opencode # macOS و Linux (موصى به، دائما محدث)
50+
brew install opencode # macOS و Linux (صيغة brew الرسمية، تحديث اقل)
51+
paru -S opencode-bin # Arch Linux
52+
mise use -g opencode # اي نظام
53+
nix run nixpkgs#opencode # او github:anomalyco/opencode لاحدث فرع dev
54+
```
55+
56+
> [!TIP]
57+
> احذف الاصدارات الاقدم من 0.1.x قبل التثبيت.
58+
59+
### تطبيق سطح المكتب (BETA)
60+
61+
يتوفر OpenCode ايضا كتطبيق سطح مكتب. قم بالتنزيل مباشرة من [صفحة الاصدارات](https://github.com/anomalyco/opencode/releases) او من [opencode.ai/download](https://opencode.ai/download).
62+
63+
| المنصة | التنزيل |
64+
| --------------------- | ------------------------------------- |
65+
| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
66+
| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
67+
| Windows | `opencode-desktop-windows-x64.exe` |
68+
| Linux | `.deb` او `.rpm` او AppImage |
69+
70+
```bash
71+
# macOS (Homebrew)
72+
brew install --cask opencode-desktop
73+
# Windows (Scoop)
74+
scoop bucket add extras; scoop install extras/opencode-desktop
75+
```
76+
77+
#### مجلد التثبيت
78+
79+
يحترم سكربت التثبيت ترتيب الاولوية التالي لمسار التثبيت:
80+
81+
1. `$OPENCODE_INSTALL_DIR` - مجلد تثبيت مخصص
82+
2. `$XDG_BIN_DIR` - مسار متوافق مع مواصفات XDG Base Directory
83+
3. `$HOME/bin` - مجلد الثنائيات القياسي للمستخدم (ان وجد او امكن انشاؤه)
84+
4. `$HOME/.opencode/bin` - المسار الافتراضي الاحتياطي
85+
86+
```bash
87+
# امثلة
88+
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash
89+
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash
90+
```
91+
92+
### Agents
93+
94+
يتضمن OpenCode وكيليْن (Agents) مدمجين يمكنك التبديل بينهما باستخدام زر `Tab`.
95+
96+
- **build** - الافتراضي، وكيل بصلاحيات كاملة لاعمال التطوير
97+
- **plan** - وكيل للقراءة فقط للتحليل واستكشاف الكود
98+
- يرفض تعديل الملفات افتراضيا
99+
- يطلب الاذن قبل تشغيل اوامر bash
100+
- مثالي لاستكشاف قواعد كود غير مألوفة او لتخطيط التغييرات
101+
102+
بالاضافة الى ذلك يوجد وكيل فرعي **general** للبحث المعقد والمهام متعددة الخطوات.
103+
يستخدم داخليا ويمكن استدعاؤه بكتابة `@general` في الرسائل.
104+
105+
تعرف على المزيد حول [agents](https://opencode.ai/docs/agents).
106+
107+
### التوثيق
108+
109+
لمزيد من المعلومات حول كيفية ضبط OpenCode، [**راجع التوثيق**](https://opencode.ai/docs).
110+
111+
### المساهمة
112+
113+
اذا كنت مهتما بالمساهمة في OpenCode، يرجى قراءة [contributing docs](./CONTRIBUTING.md) قبل ارسال pull request.
114+
115+
### البناء فوق OpenCode
116+
117+
اذا كنت تعمل على مشروع مرتبط بـ OpenCode ويستخدم "opencode" كجزء من اسمه (مثل "opencode-dashboard" او "opencode-mobile")، يرجى اضافة ملاحظة في README توضح انه ليس مبنيا بواسطة فريق OpenCode ولا يرتبط بنا بأي شكل.
118+
119+
### FAQ
120+
121+
#### ما الفرق عن Claude Code؟
122+
123+
هو مشابه جدا لـ Claude Code من حيث القدرات. هذه هي الفروقات الاساسية:
124+
125+
- 100% مفتوح المصدر
126+
- غير مقترن بمزود معين. نوصي بالنماذج التي نوفرها عبر [OpenCode Zen](https://opencode.ai/zen)؛ لكن يمكن استخدام OpenCode مع Claude او OpenAI او Google او حتى نماذج محلية. مع تطور النماذج ستتقلص الفجوات وستنخفض الاسعار، لذا من المهم ان يكون مستقلا عن المزود.
127+
- دعم LSP جاهز للاستخدام
128+
- تركيز على TUI. تم بناء OpenCode بواسطة مستخدمي neovim ومنشئي [terminal.shop](https://terminal.shop)؛ وسندفع حدود ما هو ممكن داخل الطرفية.
129+
- معمارية عميل/خادم. على سبيل المثال، يمكن تشغيل OpenCode على جهازك بينما تقوده عن بعد من تطبيق جوال. هذا يعني ان واجهة TUI هي واحدة فقط من العملاء الممكنين.
130+
131+
---
132+
133+
**انضم الى مجتمعنا** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode)

0 commit comments

Comments
 (0)