mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-16 13:05:14 +03:00
chore: merge dev into beta
This commit is contained in:
@@ -132,7 +132,7 @@ opencode debug heap-dump
|
||||
|
||||
It discovers the already-running service (never starts or replaces one), calls `POST /api/debug/heap-dump`, waits until the file is complete, and prints its server-local path. Pass `--server <url>` (with `OPENCODE_PASSWORD`) for a server started with `serve`, and `--directory <dir>` to write somewhere other than the server's log directory (the server creates it; a server that predates the option ignores it and the CLI warns). A 404 means the running server predates the endpoint.
|
||||
|
||||
For desktop memory, run **Capture heap snapshots** from the desktop command palette (`packages/gui-extensions/src/debug/main.ts`). It writes `~/Downloads/opencode-heap-<time>/` with the desktop's own (local) server, which writes straight into the folder, every app window renderer, and the Electron main process, plus a `manifest.json` (PIDs and `app.getAppMetrics()`) written last. In a dev desktop build you can drive it over CDP (`OPENCODE_DESKTOP_REMOTE_DEBUGGING_PORT`, default 9222): press `Control+Shift+P`, type `heap snapshots`, press Enter.
|
||||
For desktop memory, run **Capture heap snapshots** from the desktop command palette (`packages/gui-extensions/src/debug/main.ts`). It writes `~/Downloads/opencode-heap-<time>/` with the desktop's own (local) server, which writes straight into the folder, every app window renderer, and the Electron main process. Heap snapshots only hold GC-managed objects, so it also records Chromium's memory-infra dump (`memory-infra.json`, open in Perfetto) and summarizes it per process and allocator in `memory.json` (MiB: `malloc`, `partition_alloc`, `cc/tile_memory`, `gpu`, `v8`, …), next to each window's DOM size and decoded images and the server's `process.memoryUsage()`. `manifest.json` (PIDs, `app.getAppMetrics()` before and after) is written last. Start with `memory.json` when a process is larger than its heap snapshot. In a dev desktop build you can drive it over CDP (`OPENCODE_DESKTOP_REMOTE_DEBUGGING_PORT`, default 9222): press `Control+Shift+P`, type `heap snapshots`, press Enter.
|
||||
|
||||
The Unix `SIGUSR1` listener in `packages/cli/src/heap.ts` shares the same writer (`packages/util/src/heap-snapshot.ts`) and is still useful for a process that is not an HTTP server, such as a TUI client:
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### مجلد التثبيت
|
||||
|
||||
يحترم سكربت التثبيت ترتيب الاولوية التالي لمسار التثبيت:
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - مجلد تثبيت مخصص
|
||||
2. `$XDG_BIN_DIR` - مسار متوافق مع مواصفات XDG Base Directory
|
||||
3. `$HOME/bin` - مجلد الثنائيات القياسي للمستخدم (ان وجد او امكن انشاؤه)
|
||||
4. `$HOME/.opencode/bin` - المسار الافتراضي الاحتياطي
|
||||
|
||||
```bash
|
||||
# امثلة
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
يثبت سكربت التثبيت OpenCode في `$HOME/.opencode/bin`.
|
||||
|
||||
### Agents
|
||||
|
||||
@@ -106,11 +95,11 @@ XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
بالاضافة الى ذلك يوجد وكيل فرعي **general** للبحث المعقد والمهام متعددة الخطوات.
|
||||
يستخدم داخليا ويمكن استدعاؤه بكتابة `@general` في الرسائل.
|
||||
|
||||
تعرف على المزيد حول [agents](https://opencode.ai/docs/agents).
|
||||
تعرف على المزيد حول [agents](https://opencode.ai/v2/docs/agents).
|
||||
|
||||
### التوثيق
|
||||
|
||||
لمزيد من المعلومات حول كيفية ضبط OpenCode، [**راجع التوثيق**](https://opencode.ai/docs).
|
||||
لمزيد من المعلومات حول كيفية ضبط OpenCode، [**راجع التوثيق**](https://opencode.ai/v2/docs).
|
||||
|
||||
### المساهمة
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### ইনস্টলেশন ডিরেক্টরি (Installation Directory)
|
||||
|
||||
ইনস্টল স্ক্রিপ্টটি ইনস্টলেশন পাতের জন্য নিম্নলিখিত অগ্রাধিকার ক্রম মেনে চলে:
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - কাস্টম ইনস্টলেশন ডিরেক্টরি
|
||||
2. `$XDG_BIN_DIR` - XDG বেস ডিরেক্টরি স্পেসিফিকেশন সমর্থিত পাথ
|
||||
3. `$HOME/bin` - সাধারণ ব্যবহারকারী বাইনারি ডিরেক্টরি (যদি বিদ্যমান থাকে বা তৈরি করা যায়)
|
||||
4. `$HOME/.opencode/bin` - ডিফল্ট ফলব্যাক
|
||||
|
||||
```bash
|
||||
# উদাহরণ
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
ইনস্টল স্ক্রিপ্টটি `$HOME/.opencode/bin`-এ OpenCode ইনস্টল করে।
|
||||
|
||||
### এজেন্টস (Agents)
|
||||
|
||||
@@ -106,11 +95,11 @@ OpenCode এ দুটি বিল্ট-ইন এজেন্ট রয়ে
|
||||
এছাড়াও জটিল অনুসন্ধান এবং মাল্টিস্টেপ টাস্কের জন্য একটি **general** সাবএজেন্ট অন্তর্ভুক্ত রয়েছে।
|
||||
এটি অভ্যন্তরীণভাবে ব্যবহৃত হয় এবং মেসেজে `@general` লিখে ব্যবহার করা যেতে পারে।
|
||||
|
||||
এজেন্টদের সম্পর্কে আরও জানুন: [docs](https://opencode.ai/docs/agents)।
|
||||
এজেন্টদের সম্পর্কে আরও জানুন: [docs](https://opencode.ai/v2/docs/agents)।
|
||||
|
||||
### ডকুমেন্টেশন (Documentation)
|
||||
|
||||
কিভাবে OpenCode কনফিগার করবেন সে সম্পর্কে আরও তথ্যের জন্য, [**আমাদের ডকস দেখুন**](https://opencode.ai/docs)।
|
||||
কিভাবে OpenCode কনফিগার করবেন সে সম্পর্কে আরও তথ্যের জন্য, [**আমাদের ডকস দেখুন**](https://opencode.ai/v2/docs)।
|
||||
|
||||
### অবদান (Contributing)
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### Diretório de instalação
|
||||
|
||||
O script de instalação respeita a seguinte ordem de prioridade para o caminho de instalação:
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - Diretório de instalação personalizado
|
||||
2. `$XDG_BIN_DIR` - Caminho compatível com a especificação XDG Base Directory
|
||||
3. `$HOME/bin` - Diretório binário padrão do usuário (se existir ou puder ser criado)
|
||||
4. `$HOME/.opencode/bin` - Fallback padrão
|
||||
|
||||
```bash
|
||||
# Exemplos
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
O script de instalação instala o OpenCode em `$HOME/.opencode/bin`.
|
||||
|
||||
### Agents
|
||||
|
||||
@@ -106,11 +95,11 @@ O OpenCode inclui dois agents integrados, que você pode alternar com a tecla `T
|
||||
Também há um subagent **general** para buscas complexas e tarefas em várias etapas.
|
||||
Ele é usado internamente e pode ser invocado com `@general` nas mensagens.
|
||||
|
||||
Saiba mais sobre [agents](https://opencode.ai/docs/agents).
|
||||
Saiba mais sobre [agents](https://opencode.ai/v2/docs/agents).
|
||||
|
||||
### Documentação
|
||||
|
||||
Para mais informações sobre como configurar o OpenCode, [**veja nossa documentação**](https://opencode.ai/docs).
|
||||
Para mais informações sobre como configurar o OpenCode, [**veja nossa documentação**](https://opencode.ai/v2/docs).
|
||||
|
||||
### Contribuir
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### Instalacijski direktorij
|
||||
|
||||
Instalacijska skripta koristi sljedeći redoslijed prioriteta za putanju instalacije:
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - Prilagođeni instalacijski direktorij
|
||||
2. `$XDG_BIN_DIR` - Putanja usklađena sa XDG Base Directory specifikacijom
|
||||
3. `$HOME/bin` - Standardni korisnički bin direktorij (ako postoji ili se može kreirati)
|
||||
4. `$HOME/.opencode/bin` - Podrazumijevana rezervna lokacija
|
||||
|
||||
```bash
|
||||
# Primjeri
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
Instalacijska skripta instalira OpenCode u `$HOME/.opencode/bin`.
|
||||
|
||||
### Agenti
|
||||
|
||||
@@ -106,11 +95,11 @@ OpenCode uključuje dva ugrađena agenta između kojih možeš prebacivati taste
|
||||
Uključen je i **general** pod-agent za složene pretrage i višekoračne zadatke.
|
||||
Koristi se interno i može se pozvati pomoću `@general` u porukama.
|
||||
|
||||
Saznaj više o [agentima](https://opencode.ai/docs/agents).
|
||||
Saznaj više o [agentima](https://opencode.ai/v2/docs/agents).
|
||||
|
||||
### Dokumentacija
|
||||
|
||||
Za više informacija o konfiguraciji OpenCode-a, [**pogledaj dokumentaciju**](https://opencode.ai/docs).
|
||||
Za više informacija o konfiguraciji OpenCode-a, [**pogledaj dokumentaciju**](https://opencode.ai/v2/docs).
|
||||
|
||||
### Doprinosi
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### Installationsmappe
|
||||
|
||||
Installationsscriptet bruger følgende prioriteringsrækkefølge for installationsstien:
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - Tilpasset installationsmappe
|
||||
2. `$XDG_BIN_DIR` - Sti der følger XDG Base Directory Specification
|
||||
3. `$HOME/bin` - Standard bruger-bin-mappe (hvis den findes eller kan oprettes)
|
||||
4. `$HOME/.opencode/bin` - Standard fallback
|
||||
|
||||
```bash
|
||||
# Eksempler
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
Installationsscriptet installerer OpenCode i `$HOME/.opencode/bin`.
|
||||
|
||||
### Agents
|
||||
|
||||
@@ -106,11 +95,11 @@ OpenCode har to indbyggede agents, som du kan skifte mellem med `Tab`-tasten.
|
||||
Derudover findes der en **general**-subagent til komplekse søgninger og flertrinsopgaver.
|
||||
Den bruges internt og kan kaldes via `@general` i beskeder.
|
||||
|
||||
Læs mere om [agents](https://opencode.ai/docs/agents).
|
||||
Læs mere om [agents](https://opencode.ai/v2/docs/agents).
|
||||
|
||||
### Dokumentation
|
||||
|
||||
For mere info om konfiguration af OpenCode, [**se vores docs**](https://opencode.ai/docs).
|
||||
For mere info om konfiguration af OpenCode, [**se vores docs**](https://opencode.ai/v2/docs).
|
||||
|
||||
### Bidrag
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### Installationsverzeichnis
|
||||
|
||||
Das Installationsskript beachtet die folgende Prioritätsreihenfolge für den Installationspfad:
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - Benutzerdefiniertes Installationsverzeichnis
|
||||
2. `$XDG_BIN_DIR` - XDG Base Directory Specification-konformer Pfad
|
||||
3. `$HOME/bin` - Standard-Binärverzeichnis des Users (falls vorhanden oder erstellbar)
|
||||
4. `$HOME/.opencode/bin` - Standard-Fallback
|
||||
|
||||
```bash
|
||||
# Beispiele
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
Das Installationsskript installiert OpenCode in `$HOME/.opencode/bin`.
|
||||
|
||||
### Agents
|
||||
|
||||
@@ -106,11 +95,11 @@ OpenCode enthält zwei eingebaute Agents, zwischen denen du mit der `Tab`-Taste
|
||||
Außerdem ist ein **general**-Subagent für komplexe Suchen und mehrstufige Aufgaben enthalten.
|
||||
Dieser wird intern genutzt und kann in Nachrichten mit `@general` aufgerufen werden.
|
||||
|
||||
Mehr dazu unter [Agents](https://opencode.ai/docs/agents).
|
||||
Mehr dazu unter [Agents](https://opencode.ai/v2/docs/agents).
|
||||
|
||||
### Dokumentation
|
||||
|
||||
Mehr Infos zur Konfiguration von OpenCode findest du in unseren [**Docs**](https://opencode.ai/docs).
|
||||
Mehr Infos zur Konfiguration von OpenCode findest du in unseren [**Docs**](https://opencode.ai/v2/docs).
|
||||
|
||||
### Beitragen
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### Directorio de instalación
|
||||
|
||||
El script de instalación respeta el siguiente orden de prioridad para la ruta de instalación:
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - Directorio de instalación personalizado
|
||||
2. `$XDG_BIN_DIR` - Ruta compatible con la especificación XDG Base Directory
|
||||
3. `$HOME/bin` - Directorio binario estándar del usuario (si existe o se puede crear)
|
||||
4. `$HOME/.opencode/bin` - Alternativa por defecto
|
||||
|
||||
```bash
|
||||
# Ejemplos
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
El script de instalación instala OpenCode en `$HOME/.opencode/bin`.
|
||||
|
||||
### Agentes
|
||||
|
||||
@@ -106,11 +95,11 @@ OpenCode incluye dos agentes integrados que puedes alternar con la tecla `Tab`.
|
||||
Además, incluye un subagente **general** para búsquedas complejas y tareas de varios pasos.
|
||||
Se usa internamente y se puede invocar con `@general` en los mensajes.
|
||||
|
||||
Más información sobre [agentes](https://opencode.ai/docs/agents).
|
||||
Más información sobre [agentes](https://opencode.ai/v2/docs/agents).
|
||||
|
||||
### Documentación
|
||||
|
||||
Para más información sobre cómo configurar OpenCode, [**ve a nuestra documentación**](https://opencode.ai/docs).
|
||||
Para más información sobre cómo configurar OpenCode, [**ve a nuestra documentación**](https://opencode.ai/v2/docs).
|
||||
|
||||
### Contribuir
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### Répertoire d'installation
|
||||
|
||||
Le script d'installation respecte l'ordre de priorité suivant pour le chemin d'installation :
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - Répertoire d'installation personnalisé
|
||||
2. `$XDG_BIN_DIR` - Chemin conforme à la spécification XDG Base Directory
|
||||
3. `$HOME/bin` - Répertoire binaire utilisateur standard (s'il existe ou peut être créé)
|
||||
4. `$HOME/.opencode/bin` - Repli par défaut
|
||||
|
||||
```bash
|
||||
# Exemples
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
Le script d'installation installe OpenCode dans `$HOME/.opencode/bin`.
|
||||
|
||||
### Agents
|
||||
|
||||
@@ -106,11 +95,11 @@ OpenCode inclut deux agents intégrés que vous pouvez basculer avec la touche `
|
||||
Un sous-agent **general** est aussi inclus pour les recherches complexes et les tâches en plusieurs étapes.
|
||||
Il est utilisé en interne et peut être invoqué via `@general` dans les messages.
|
||||
|
||||
En savoir plus sur les [agents](https://opencode.ai/docs/agents).
|
||||
En savoir plus sur les [agents](https://opencode.ai/v2/docs/agents).
|
||||
|
||||
### Documentation
|
||||
|
||||
Pour plus d'informations sur la configuration d'OpenCode, [**consultez notre documentation**](https://opencode.ai/docs).
|
||||
Pour plus d'informations sur la configuration d'OpenCode, [**consultez notre documentation**](https://opencode.ai/v2/docs).
|
||||
|
||||
### Contribuer
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### Κατάλογος Εγκατάστασης
|
||||
|
||||
Το script εγκατάστασης τηρεί την ακόλουθη σειρά προτεραιότητας για τη διαδρομή εγκατάστασης:
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - Προσαρμοσμένος κατάλογος εγκατάστασης
|
||||
2. `$XDG_BIN_DIR` - Διαδρομή συμβατή με τις προδιαγραφές XDG Base Directory
|
||||
3. `$HOME/bin` - Τυπικός κατάλογος εκτελέσιμων αρχείων χρήστη (εάν υπάρχει ή μπορεί να δημιουργηθεί)
|
||||
4. `$HOME/.opencode/bin` - Προεπιλεγμένη εφεδρική διαδρομή
|
||||
|
||||
```bash
|
||||
# Παραδείγματα
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
Το script εγκατάστασης εγκαθιστά το OpenCode στο `$HOME/.opencode/bin`.
|
||||
|
||||
### Πράκτορες
|
||||
|
||||
@@ -106,11 +95,11 @@ XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
Περιλαμβάνεται επίσης ένας **general** υποπράκτορας για σύνθετες αναζητήσεις και πολυβηματικές διεργασίες.
|
||||
Χρησιμοποιείται εσωτερικά και μπορεί να κληθεί χρησιμοποιώντας `@general` στα μηνύματα.
|
||||
|
||||
Μάθετε περισσότερα για τους [πράκτορες](https://opencode.ai/docs/agents).
|
||||
Μάθετε περισσότερα για τους [πράκτορες](https://opencode.ai/v2/docs/agents).
|
||||
|
||||
### Οδηγός Χρήσης
|
||||
|
||||
Για περισσότερες πληροφορίες σχετικά με τη ρύθμιση του OpenCode, [**πλοηγήσου στον οδηγό χρήσης μας**](https://opencode.ai/docs).
|
||||
Για περισσότερες πληροφορίες σχετικά με τη ρύθμιση του OpenCode, [**πλοηγήσου στον οδηγό χρήσης μας**](https://opencode.ai/v2/docs).
|
||||
|
||||
### Συνεισφορά
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### Directory di installazione
|
||||
|
||||
Lo script di installazione rispetta il seguente ordine di priorità per il percorso di installazione:
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` – Directory di installazione personalizzata
|
||||
2. `$XDG_BIN_DIR` – Percorso conforme alla XDG Base Directory Specification
|
||||
3. `$HOME/bin` – Directory binaria standard dell’utente (se esiste o può essere creata)
|
||||
4. `$HOME/.opencode/bin` – Fallback predefinito
|
||||
|
||||
```bash
|
||||
# Esempi
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
Lo script di installazione installa OpenCode in `$HOME/.opencode/bin`.
|
||||
|
||||
### Agenti
|
||||
|
||||
@@ -106,11 +95,11 @@ OpenCode include due agenti integrati tra cui puoi passare usando il tasto `Tab`
|
||||
È inoltre incluso un sotto-agente **general** per ricerche complesse e attività multi-step.
|
||||
Viene utilizzato internamente e può essere invocato usando `@general` nei messaggi.
|
||||
|
||||
Scopri di più sugli [agenti](https://opencode.ai/docs/agents).
|
||||
Scopri di più sugli [agenti](https://opencode.ai/v2/docs/agents).
|
||||
|
||||
### Documentazione
|
||||
|
||||
Per maggiori informazioni su come configurare OpenCode, [**consulta la nostra documentazione**](https://opencode.ai/docs).
|
||||
Per maggiori informazioni su come configurare OpenCode, [**consulta la nostra documentazione**](https://opencode.ai/v2/docs).
|
||||
|
||||
### Contribuire
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### インストールディレクトリ
|
||||
|
||||
インストールスクリプトは、インストール先パスを次の優先順位で決定します。
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - カスタムのインストールディレクトリ
|
||||
2. `$XDG_BIN_DIR` - XDG Base Directory Specification に準拠したパス
|
||||
3. `$HOME/bin` - 標準のユーザー用バイナリディレクトリ(存在する場合、または作成できる場合)
|
||||
4. `$HOME/.opencode/bin` - デフォルトのフォールバック
|
||||
|
||||
```bash
|
||||
# 例
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
インストールスクリプトは、OpenCode を `$HOME/.opencode/bin` にインストールします。
|
||||
|
||||
### Agents
|
||||
|
||||
@@ -106,11 +95,11 @@ OpenCode には組み込みの Agent が2つあり、`Tab` キーで切り替え
|
||||
また、複雑な検索やマルチステップのタスク向けに **general** サブ Agent も含まれています。
|
||||
内部的に使用されており、メッセージで `@general` と入力して呼び出せます。
|
||||
|
||||
[agents](https://opencode.ai/docs/agents) の詳細はこちら。
|
||||
[agents](https://opencode.ai/v2/docs/agents) の詳細はこちら。
|
||||
|
||||
### ドキュメント
|
||||
|
||||
OpenCode の設定については [**ドキュメント**](https://opencode.ai/docs) を参照してください。
|
||||
OpenCode の設定については [**ドキュメント**](https://opencode.ai/v2/docs) を参照してください。
|
||||
|
||||
### コントリビュート
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### 설치 디렉터리
|
||||
|
||||
설치 스크립트는 설치 경로를 다음 우선순위로 결정합니다.
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - 사용자 지정 설치 디렉터리
|
||||
2. `$XDG_BIN_DIR` - XDG Base Directory Specification 준수 경로
|
||||
3. `$HOME/bin` - 표준 사용자 바이너리 디렉터리 (존재하거나 생성 가능할 경우)
|
||||
4. `$HOME/.opencode/bin` - 기본 폴백
|
||||
|
||||
```bash
|
||||
# 예시
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
설치 스크립트는 OpenCode를 `$HOME/.opencode/bin`에 설치합니다.
|
||||
|
||||
### Agents
|
||||
|
||||
@@ -106,11 +95,11 @@ OpenCode 에는 내장 에이전트 2개가 있으며 `Tab` 키로 전환할 수
|
||||
또한 복잡한 검색과 여러 단계 작업을 위한 **general** 서브 에이전트가 포함되어 있습니다.
|
||||
내부적으로 사용되며, 메시지에서 `@general` 로 호출할 수 있습니다.
|
||||
|
||||
[agents](https://opencode.ai/docs/agents) 에 대해 더 알아보세요.
|
||||
[agents](https://opencode.ai/v2/docs/agents) 에 대해 더 알아보세요.
|
||||
|
||||
### 문서
|
||||
|
||||
OpenCode 설정에 대한 자세한 내용은 [**문서**](https://opencode.ai/docs) 를 참고하세요.
|
||||
OpenCode 설정에 대한 자세한 내용은 [**문서**](https://opencode.ai/v2/docs) 를 참고하세요.
|
||||
|
||||
### 기여하기
|
||||
|
||||
|
||||
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### Installation Directory
|
||||
|
||||
The install script respects the following priority order for the installation path:
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - Custom installation directory
|
||||
2. `$XDG_BIN_DIR` - XDG Base Directory Specification compliant path
|
||||
3. `$HOME/bin` - Standard user binary directory (if it exists or can be created)
|
||||
4. `$HOME/.opencode/bin` - Default fallback
|
||||
|
||||
```bash
|
||||
# Examples
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
The install script installs OpenCode to `$HOME/.opencode/bin`.
|
||||
|
||||
### Agents
|
||||
|
||||
@@ -106,11 +95,11 @@ OpenCode includes two built-in agents you can switch between with the `Tab` key.
|
||||
Also included is a **general** subagent for complex searches and multistep tasks.
|
||||
This is used internally and can be invoked using `@general` in messages.
|
||||
|
||||
Learn more about [agents](https://opencode.ai/docs/agents).
|
||||
Learn more about [agents](https://opencode.ai/v2/docs/agents).
|
||||
|
||||
### Documentation
|
||||
|
||||
For more info on how to configure OpenCode, [**head over to our docs**](https://opencode.ai/docs).
|
||||
For more info on how to configure OpenCode, [**head over to our docs**](https://opencode.ai/v2/docs).
|
||||
|
||||
### Contributing
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### Installasjonsmappe
|
||||
|
||||
Installasjonsskriptet bruker følgende prioritet for installasjonsstien:
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - Egendefinert installasjonsmappe
|
||||
2. `$XDG_BIN_DIR` - Sti som følger XDG Base Directory Specification
|
||||
3. `$HOME/bin` - Standard brukerbinar-mappe (hvis den finnes eller kan opprettes)
|
||||
4. `$HOME/.opencode/bin` - Standard fallback
|
||||
|
||||
```bash
|
||||
# Eksempler
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
Installasjonsskriptet installerer OpenCode i `$HOME/.opencode/bin`.
|
||||
|
||||
### Agents
|
||||
|
||||
@@ -106,11 +95,11 @@ OpenCode har to innebygde agents du kan bytte mellom med `Tab`-tasten.
|
||||
Det finnes også en **general**-subagent for komplekse søk og flertrinnsoppgaver.
|
||||
Den brukes internt og kan kalles via `@general` i meldinger.
|
||||
|
||||
Les mer om [agents](https://opencode.ai/docs/agents).
|
||||
Les mer om [agents](https://opencode.ai/v2/docs/agents).
|
||||
|
||||
### Dokumentasjon
|
||||
|
||||
For mer info om hvordan du konfigurerer OpenCode, [**se dokumentasjonen**](https://opencode.ai/docs).
|
||||
For mer info om hvordan du konfigurerer OpenCode, [**se dokumentasjonen**](https://opencode.ai/v2/docs).
|
||||
|
||||
### Bidra
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### Katalog instalacji
|
||||
|
||||
Skrypt instalacyjny stosuje następujący priorytet wyboru ścieżki instalacji:
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - Własny katalog instalacji
|
||||
2. `$XDG_BIN_DIR` - Ścieżka zgodna ze specyfikacją XDG Base Directory
|
||||
3. `$HOME/bin` - Standardowy katalog binarny użytkownika (jeśli istnieje lub można go utworzyć)
|
||||
4. `$HOME/.opencode/bin` - Domyślny fallback
|
||||
|
||||
```bash
|
||||
# Przykłady
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
Skrypt instalacyjny instaluje OpenCode w `$HOME/.opencode/bin`.
|
||||
|
||||
### Agents
|
||||
|
||||
@@ -106,11 +95,11 @@ OpenCode zawiera dwóch wbudowanych agentów, między którymi możesz przełąc
|
||||
Dodatkowo jest subagent **general** do złożonych wyszukiwań i wieloetapowych zadań.
|
||||
Jest używany wewnętrznie i można go wywołać w wiadomościach przez `@general`.
|
||||
|
||||
Dowiedz się więcej o [agents](https://opencode.ai/docs/agents).
|
||||
Dowiedz się więcej o [agents](https://opencode.ai/v2/docs/agents).
|
||||
|
||||
### Dokumentacja
|
||||
|
||||
Więcej informacji o konfiguracji OpenCode znajdziesz w [**dokumentacji**](https://opencode.ai/docs).
|
||||
Więcej informacji o konfiguracji OpenCode znajdziesz w [**dokumentacji**](https://opencode.ai/v2/docs).
|
||||
|
||||
### Współtworzenie
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### Каталог установки
|
||||
|
||||
Скрипт установки выбирает путь установки в следующем порядке приоритета:
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - Пользовательский каталог установки
|
||||
2. `$XDG_BIN_DIR` - Путь, совместимый со спецификацией XDG Base Directory
|
||||
3. `$HOME/bin` - Стандартный каталог пользовательских бинарников (если существует или можно создать)
|
||||
4. `$HOME/.opencode/bin` - Fallback по умолчанию
|
||||
|
||||
```bash
|
||||
# Примеры
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
Скрипт установки устанавливает OpenCode в `$HOME/.opencode/bin`.
|
||||
|
||||
### Agents
|
||||
|
||||
@@ -106,11 +95,11 @@ XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
Также включен сабагент **general** для сложных поисков и многошаговых задач.
|
||||
Он используется внутренне и может быть вызван в сообщениях через `@general`.
|
||||
|
||||
Подробнее об [agents](https://opencode.ai/docs/agents).
|
||||
Подробнее об [agents](https://opencode.ai/v2/docs/agents).
|
||||
|
||||
### Документация
|
||||
|
||||
Больше информации о том, как настроить OpenCode: [**наши docs**](https://opencode.ai/docs).
|
||||
Больше информации о том, как настроить OpenCode: [**наши docs**](https://opencode.ai/v2/docs).
|
||||
|
||||
### Вклад
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### ไดเรกทอรีการติดตั้ง
|
||||
|
||||
สคริปต์การติดตั้งจะใช้ลำดับความสำคัญตามเส้นทางการติดตั้ง:
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - ไดเรกทอรีการติดตั้งที่กำหนดเอง
|
||||
2. `$XDG_BIN_DIR` - เส้นทางที่สอดคล้องกับ XDG Base Directory Specification
|
||||
3. `$HOME/bin` - ไดเรกทอรีไบนารีผู้ใช้มาตรฐาน (หากมีอยู่หรือสามารถสร้างได้)
|
||||
4. `$HOME/.opencode/bin` - ค่าสำรองเริ่มต้น
|
||||
|
||||
```bash
|
||||
# ตัวอย่าง
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
สคริปต์การติดตั้งจะติดตั้ง OpenCode ไว้ที่ `$HOME/.opencode/bin`
|
||||
|
||||
### เอเจนต์
|
||||
|
||||
@@ -106,11 +95,11 @@ OpenCode รวมเอเจนต์ในตัวสองตัวที
|
||||
นอกจากนี้ยังมีเอเจนต์ย่อย **general** สำหรับการค้นหาที่ซับซ้อนและงานหลายขั้นตอน
|
||||
ใช้ภายในและสามารถเรียกใช้ได้โดยใช้ `@general` ในข้อความ
|
||||
|
||||
เรียนรู้เพิ่มเติมเกี่ยวกับ [เอเจนต์](https://opencode.ai/docs/agents)
|
||||
เรียนรู้เพิ่มเติมเกี่ยวกับ [เอเจนต์](https://opencode.ai/v2/docs/agents)
|
||||
|
||||
### เอกสารประกอบ
|
||||
|
||||
สำหรับข้อมูลเพิ่มเติมเกี่ยวกับวิธีกำหนดค่า OpenCode [**ไปที่เอกสารของเรา**](https://opencode.ai/docs)
|
||||
สำหรับข้อมูลเพิ่มเติมเกี่ยวกับวิธีกำหนดค่า OpenCode [**ไปที่เอกสารของเรา**](https://opencode.ai/v2/docs)
|
||||
|
||||
### การมีส่วนร่วม
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### Kurulum Dizini (Installation Directory)
|
||||
|
||||
Kurulum betiği (install script), kurulum yolu (installation path) için aşağıdaki öncelik sırasını takip eder:
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - Özel kurulum dizini
|
||||
2. `$XDG_BIN_DIR` - XDG Base Directory Specification uyumlu yol
|
||||
3. `$HOME/bin` - Standart kullanıcı binary dizini (varsa veya oluşturulabiliyorsa)
|
||||
4. `$HOME/.opencode/bin` - Varsayılan yedek konum
|
||||
|
||||
```bash
|
||||
# Örnekler
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
Kurulum betiği, OpenCode'u `$HOME/.opencode/bin` dizinine kurar.
|
||||
|
||||
### Ajanlar
|
||||
|
||||
@@ -106,11 +95,11 @@ OpenCode, `Tab` tuşuyla aralarında geçiş yapabileceğiniz iki yerleşik (bui
|
||||
Ayrıca, karmaşık aramalar ve çok adımlı görevler için bir **genel** alt ajan bulunmaktadır.
|
||||
Bu dahili olarak kullanılır ve mesajlarda `@general` ile çağrılabilir.
|
||||
|
||||
[Ajanlar](https://opencode.ai/docs/agents) hakkında daha fazla bilgi edinin.
|
||||
[Ajanlar](https://opencode.ai/v2/docs/agents) hakkında daha fazla bilgi edinin.
|
||||
|
||||
### Dokümantasyon
|
||||
|
||||
OpenCode'u nasıl yapılandıracağınız hakkında daha fazla bilgi için [**dokümantasyonumuza göz atın**](https://opencode.ai/docs).
|
||||
OpenCode'u nasıl yapılandıracağınız hakkında daha fazla bilgi için [**dokümantasyonumuza göz atın**](https://opencode.ai/v2/docs).
|
||||
|
||||
### Katkıda Bulunma
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### Каталог встановлення
|
||||
|
||||
Скрипт встановлення дотримується такого порядку пріоритету для шляху встановлення:
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - Користувацький каталог встановлення
|
||||
2. `$XDG_BIN_DIR` - Шлях, сумісний зі специфікацією XDG Base Directory
|
||||
3. `$HOME/bin` - Стандартний каталог користувацьких бінарників (якщо існує або його можна створити)
|
||||
4. `$HOME/.opencode/bin` - Резервний варіант за замовчуванням
|
||||
|
||||
```bash
|
||||
# Приклади
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
Скрипт встановлення встановлює OpenCode в `$HOME/.opencode/bin`.
|
||||
|
||||
### Агенти
|
||||
|
||||
@@ -106,11 +95,11 @@ OpenCode містить два вбудовані агенти, між яким
|
||||
Також доступний допоміжний агент **general** для складного пошуку та багатокрокових завдань.
|
||||
Він використовується всередині системи й може бути викликаний у повідомленнях через `@general`.
|
||||
|
||||
Дізнайтеся більше про [agents](https://opencode.ai/docs/agents).
|
||||
Дізнайтеся більше про [agents](https://opencode.ai/v2/docs/agents).
|
||||
|
||||
### Документація
|
||||
|
||||
Щоб дізнатися більше про налаштування OpenCode, [**перейдіть до нашої документації**](https://opencode.ai/docs).
|
||||
Щоб дізнатися більше про налаштування OpenCode, [**перейдіть до нашої документації**](https://opencode.ai/v2/docs).
|
||||
|
||||
### Внесок
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### Thư mục cài đặt
|
||||
|
||||
Tập lệnh cài đặt tuân theo thứ tự ưu tiên sau cho đường dẫn cài đặt:
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - Thư mục cài đặt tùy chỉnh
|
||||
2. `$XDG_BIN_DIR` - Đường dẫn tuân thủ XDG Base Directory Specification
|
||||
3. `$HOME/bin` - Thư mục nhị phân tiêu chuẩn của người dùng (nếu tồn tại hoặc có thể tạo)
|
||||
4. `$HOME/.opencode/bin` - Mặc định dự phòng
|
||||
|
||||
```bash
|
||||
# Ví dụ
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
Tập lệnh cài đặt sẽ cài OpenCode vào `$HOME/.opencode/bin`.
|
||||
|
||||
### Agents (Đại diện)
|
||||
|
||||
@@ -106,11 +95,11 @@ OpenCode bao gồm hai agent được tích hợp sẵn mà bạn có thể chuy
|
||||
Ngoài ra còn có một subagent **general** dùng cho các tìm kiếm phức tạp và tác vụ nhiều bước.
|
||||
Agent này được sử dụng nội bộ và có thể gọi bằng cách dùng `@general` trong tin nhắn.
|
||||
|
||||
Tìm hiểu thêm về [agents](https://opencode.ai/docs/agents).
|
||||
Tìm hiểu thêm về [agents](https://opencode.ai/v2/docs/agents).
|
||||
|
||||
### Tài liệu
|
||||
|
||||
Để biết thêm thông tin về cách cấu hình OpenCode, [**hãy truy cập tài liệu của chúng tôi**](https://opencode.ai/docs).
|
||||
Để biết thêm thông tin về cách cấu hình OpenCode, [**hãy truy cập tài liệu của chúng tôi**](https://opencode.ai/v2/docs).
|
||||
|
||||
### Đóng góp
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### 安装目录
|
||||
|
||||
安装脚本按照以下优先级决定安装路径:
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - 自定义安装目录
|
||||
2. `$XDG_BIN_DIR` - 符合 XDG 基础目录规范的路径
|
||||
3. `$HOME/bin` - 如果存在或可创建的用户二进制目录
|
||||
4. `$HOME/.opencode/bin` - 默认备用路径
|
||||
|
||||
```bash
|
||||
# 示例
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
安装脚本将 OpenCode 安装到 `$HOME/.opencode/bin`。
|
||||
|
||||
### Agents
|
||||
|
||||
@@ -105,11 +94,11 @@ OpenCode 内置两种 Agent,可用 `Tab` 键快速切换:
|
||||
|
||||
另外还包含一个 **general** 子 Agent,用于复杂搜索和多步任务,内部使用,也可在消息中输入 `@general` 调用。
|
||||
|
||||
了解更多 [Agents](https://opencode.ai/docs/agents) 相关信息。
|
||||
了解更多 [Agents](https://opencode.ai/v2/docs/agents) 相关信息。
|
||||
|
||||
### 文档
|
||||
|
||||
更多配置说明请查看我们的 [**官方文档**](https://opencode.ai/docs)。
|
||||
更多配置说明请查看我们的 [**官方文档**](https://opencode.ai/v2/docs)。
|
||||
|
||||
### 参与贡献
|
||||
|
||||
|
||||
+3
-14
@@ -80,18 +80,7 @@ brew install --cask opencode-desktop
|
||||
|
||||
#### 安裝目錄
|
||||
|
||||
安裝腳本會依據以下優先順序決定安裝路徑:
|
||||
|
||||
1. `$OPENCODE_INSTALL_DIR` - 自定義安裝目錄
|
||||
2. `$XDG_BIN_DIR` - 符合 XDG 基礎目錄規範的路徑
|
||||
3. `$HOME/bin` - 標準使用者執行檔目錄 (若存在或可建立)
|
||||
4. `$HOME/.opencode/bin` - 預設備用路徑
|
||||
|
||||
```bash
|
||||
# 範例
|
||||
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/v2/install | bash
|
||||
```
|
||||
安裝腳本將 OpenCode 安裝到 `$HOME/.opencode/bin`。
|
||||
|
||||
### Agents
|
||||
|
||||
@@ -105,11 +94,11 @@ OpenCode 內建了兩種 Agent,您可以使用 `Tab` 鍵快速切換。
|
||||
|
||||
此外,OpenCode 還包含一個 **general** 子 Agent,用於處理複雜搜尋與多步驟任務。此 Agent 供系統內部使用,亦可透過在訊息中輸入 `@general` 來呼叫。
|
||||
|
||||
了解更多關於 [Agents](https://opencode.ai/docs/agents) 的資訊。
|
||||
了解更多關於 [Agents](https://opencode.ai/v2/docs/agents) 的資訊。
|
||||
|
||||
### 線上文件
|
||||
|
||||
關於如何設定 OpenCode 的詳細資訊,請參閱我們的 [**官方文件**](https://opencode.ai/docs)。
|
||||
關於如何設定 OpenCode 的詳細資訊,請參閱我們的 [**官方文件**](https://opencode.ai/v2/docs)。
|
||||
|
||||
### 參與貢獻
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ export const SettingsAppearance: Component = () => {
|
||||
description={
|
||||
<>
|
||||
{language.t("settings.general.row.theme.description")}{" "}
|
||||
<ExternalLink class="settings-link" href="https://opencode.ai/docs/themes/">
|
||||
<ExternalLink class="settings-link" href="https://opencode.ai/v2/docs/themes">
|
||||
{language.t("common.learnMore")}
|
||||
</ExternalLink>
|
||||
</>
|
||||
|
||||
@@ -206,7 +206,7 @@ export const SettingsExtensions: Component<{
|
||||
<span class="settings-extension-heading text-13-medium">
|
||||
{language.t("settings.extensions.availableAll")}
|
||||
</span>
|
||||
<ExternalLink class="settings-extension-link text-13-regular" href="https://opencode.ai/docs/skills/">
|
||||
<ExternalLink class="settings-extension-link text-13-regular" href="https://opencode.ai/v2/docs/skills">
|
||||
{language.t("settings.extensions.addSkills")}
|
||||
</ExternalLink>
|
||||
</div>
|
||||
|
||||
@@ -379,7 +379,7 @@ export const ProjectSettingsExtensions: Component<{
|
||||
kind="skills"
|
||||
empty={projectSkills().length === 0}
|
||||
action={
|
||||
<ExternalLink class="settings-extension-link" href="https://opencode.ai/docs/skills/">
|
||||
<ExternalLink class="settings-extension-link" href="https://opencode.ai/v2/docs/skills">
|
||||
{language.t("settings.extensions.addSkills")}
|
||||
</ExternalLink>
|
||||
}
|
||||
|
||||
@@ -2289,7 +2289,17 @@ export interface VcsApi<E = never> {
|
||||
}
|
||||
|
||||
export type DebugHeapDumpInput = { readonly directory?: string | undefined }
|
||||
export type DebugHeapDumpOutput = { readonly path: string; readonly pid: number }
|
||||
export type DebugHeapDumpOutput = {
|
||||
readonly path: string
|
||||
readonly pid: number
|
||||
readonly memory: {
|
||||
readonly rss: number
|
||||
readonly heapTotal: number
|
||||
readonly heapUsed: number
|
||||
readonly external: number
|
||||
readonly arrayBuffers: number
|
||||
}
|
||||
}
|
||||
export type DebugHeapDumpOperation<E = never> = (input?: DebugHeapDumpInput) => Effect.Effect<DebugHeapDumpOutput, E>
|
||||
|
||||
export type DebugLocationListOutput = ReadonlyArray<Location.PublicRef>
|
||||
|
||||
@@ -2352,7 +2352,7 @@ export type ConfigEntry =
|
||||
experimental?: {
|
||||
portable_shell_scanner?: boolean
|
||||
todo?: boolean
|
||||
precompute_compaction?: boolean
|
||||
background_compaction?: boolean
|
||||
subagent_depth?: number
|
||||
location_idle_timeout?: string | false
|
||||
policies?: Array<{
|
||||
@@ -6052,7 +6052,11 @@ export type VcsDiffOutput = { location: LocationPublicRef; data: Array<FileDiffI
|
||||
|
||||
export type DebugHeapDumpInput = { readonly directory?: { readonly directory?: string | undefined }["directory"] }
|
||||
|
||||
export type DebugHeapDumpOutput = { path: string; pid: number }
|
||||
export type DebugHeapDumpOutput = {
|
||||
path: string
|
||||
pid: number
|
||||
memory: { rss: number; heapTotal: number; heapUsed: number; external: number; arrayBuffers: number }
|
||||
}
|
||||
|
||||
export type DebugLocationListOutput = Array<LocationPublicRef>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ export * as PtyHandoff from "./pty-handoff.js"
|
||||
import type { PersistentPty } from "@opencode/schema/persistent-pty"
|
||||
import { readFile, rename, rm, writeFile } from "node:fs/promises"
|
||||
import type { Info } from "./service.js"
|
||||
import { headers } from "./service-probe.js"
|
||||
|
||||
type Sidecar = {
|
||||
readonly source: Pick<Info, "id" | "pid" | "url">
|
||||
@@ -20,10 +21,10 @@ export async function prepare(file: string, info: Info, timeout: number) {
|
||||
const { OpenCode } = await import("./promise/index.js")
|
||||
const client = OpenCode.make({
|
||||
baseUrl: info.url,
|
||||
headers:
|
||||
info.password === undefined
|
||||
? undefined
|
||||
: { authorization: "Basic " + Buffer.from(`opencode:${info.password}`).toString("base64") },
|
||||
headers: headers({
|
||||
url: info.url,
|
||||
auth: info.password === undefined ? undefined : { type: "basic", username: "opencode", password: info.password },
|
||||
}),
|
||||
})
|
||||
const handoff = await client.experimental.persistentPty
|
||||
.handoff({ signal: AbortSignal.timeout(timeout) })
|
||||
|
||||
@@ -80,7 +80,6 @@ export type CreateDataInput = {
|
||||
readonly onError?: (error: unknown) => void
|
||||
}
|
||||
|
||||
const messageIDFromEvent = (eventID: string) => eventID.replace(/^evt_/, "msg_")
|
||||
const messagePageLimit = 20
|
||||
// Trailing window for event bursts that each ask for the same refetch.
|
||||
export const settleMs = 150
|
||||
@@ -694,7 +693,7 @@ export function createData(config: CreateDataInput) {
|
||||
if (store.session.info[event.data.sessionID])
|
||||
setStore("session", "info", event.data.sessionID, "agent", event.data.agent)
|
||||
message.insert(event.data.sessionID, {
|
||||
id: messageIDFromEvent(event.id),
|
||||
id: SessionMessage.ID.fromEvent(event.id),
|
||||
type: "agent-switched",
|
||||
agent: event.data.agent,
|
||||
previous,
|
||||
@@ -708,7 +707,7 @@ export function createData(config: CreateDataInput) {
|
||||
setStore("session", "info", event.data.sessionID, "model", event.data.model)
|
||||
if (!store.session.message[event.data.sessionID]) return
|
||||
message.insert(event.data.sessionID, {
|
||||
id: messageIDFromEvent(event.id),
|
||||
id: SessionMessage.ID.fromEvent(event.id),
|
||||
type: "model-switched",
|
||||
model: event.data.model,
|
||||
previous,
|
||||
@@ -716,7 +715,7 @@ export function createData(config: CreateDataInput) {
|
||||
})
|
||||
refresh(() =>
|
||||
api()
|
||||
.session.message.get({ sessionID: event.data.sessionID, messageID: messageIDFromEvent(event.id) })
|
||||
.session.message.get({ sessionID: event.data.sessionID, messageID: SessionMessage.ID.fromEvent(event.id) })
|
||||
.then((item) => {
|
||||
message.update(event.data.sessionID, (draft, index) => {
|
||||
const position = index.get(item.id)
|
||||
@@ -761,10 +760,10 @@ export function createData(config: CreateDataInput) {
|
||||
subpath: current.subpath,
|
||||
}
|
||||
setStore("session", "info", event.data.sessionID, "location", event.data.location)
|
||||
if (event.data.projectID) setStore("session", "info", event.data.sessionID, "projectID", event.data.projectID)
|
||||
setStore("session", "info", event.data.sessionID, "projectID", event.data.projectID)
|
||||
setStore("session", "info", event.data.sessionID, "subpath", event.data.subpath)
|
||||
message.insert(event.data.sessionID, {
|
||||
id: messageIDFromEvent(event.id),
|
||||
id: SessionMessage.ID.fromEvent(event.id),
|
||||
type: "location-switched",
|
||||
location: event.data.location,
|
||||
projectID: event.data.projectID,
|
||||
@@ -845,7 +844,7 @@ export function createData(config: CreateDataInput) {
|
||||
const updateText = event.data.text
|
||||
if (updateText === undefined) return
|
||||
message.insert(event.data.sessionID, {
|
||||
id: messageIDFromEvent(event.id),
|
||||
id: SessionMessage.ID.fromEvent(event.id),
|
||||
type: "system",
|
||||
text: updateText,
|
||||
description: `Instructions updated: ${Object.keys(event.data.delta).join(", ")}`,
|
||||
@@ -855,7 +854,7 @@ export function createData(config: CreateDataInput) {
|
||||
return
|
||||
case "session.synthetic":
|
||||
message.insert(event.data.sessionID, {
|
||||
id: messageIDFromEvent(event.id),
|
||||
id: SessionMessage.ID.fromEvent(event.id),
|
||||
type: "synthetic",
|
||||
text: event.data.text,
|
||||
description: event.data.description,
|
||||
@@ -865,7 +864,7 @@ export function createData(config: CreateDataInput) {
|
||||
return
|
||||
case "session.shell.started":
|
||||
message.insert(event.data.sessionID, {
|
||||
id: messageIDFromEvent(event.id),
|
||||
id: SessionMessage.ID.fromEvent(event.id),
|
||||
type: "shell",
|
||||
shellID: event.data.shell.id,
|
||||
command: event.data.shell.command,
|
||||
@@ -1063,7 +1062,7 @@ export function createData(config: CreateDataInput) {
|
||||
case "session.compaction.started":
|
||||
if (event.data.inputID) removePending(event.data.sessionID, event.data.inputID)
|
||||
message.insert(event.data.sessionID, {
|
||||
id: event.data.inputID ?? messageIDFromEvent(event.id),
|
||||
id: event.data.inputID ?? SessionMessage.ID.fromEvent(event.id),
|
||||
type: "compaction",
|
||||
status: "running",
|
||||
reason: event.data.reason,
|
||||
@@ -1083,7 +1082,7 @@ export function createData(config: CreateDataInput) {
|
||||
if (event.type === "session.execution.interrupted" && event.data.reason === "shutdown") return
|
||||
// Mirror the projected idle marker so turn boundaries match before the next message read.
|
||||
message.insert(event.data.sessionID, {
|
||||
id: messageIDFromEvent(event.id),
|
||||
id: SessionMessage.ID.fromEvent(event.id),
|
||||
type: "idle",
|
||||
outcome:
|
||||
event.type === "session.execution.succeeded"
|
||||
@@ -1165,7 +1164,7 @@ export function createData(config: CreateDataInput) {
|
||||
return
|
||||
}
|
||||
message.append(draft, index, {
|
||||
id: messageIDFromEvent(event.id),
|
||||
id: SessionMessage.ID.fromEvent(event.id),
|
||||
type: "compaction",
|
||||
status: "completed",
|
||||
reason: event.data.reason,
|
||||
@@ -1184,14 +1183,11 @@ export function createData(config: CreateDataInput) {
|
||||
const position = draft.findLastIndex((item) => item.type === "compaction" && item.status === "running")
|
||||
const current = draft[position]
|
||||
const failed: Extract<SessionMessageInfo, { type: "compaction"; status: "failed" }> = {
|
||||
id: current?.id ?? event.data.inputID ?? messageIDFromEvent(event.id),
|
||||
id: current?.id ?? event.data.inputID ?? SessionMessage.ID.fromEvent(event.id),
|
||||
type: "compaction",
|
||||
status: "failed",
|
||||
reason: event.data.reason ?? "manual",
|
||||
error: event.data.error ?? {
|
||||
type: "compaction.failed",
|
||||
message: "Compaction failed before recording an error",
|
||||
},
|
||||
reason: event.data.reason,
|
||||
error: event.data.error,
|
||||
metadata: current?.type === "compaction" ? current.metadata : event.metadata,
|
||||
cost: event.data.cost,
|
||||
tokens: event.data.tokens,
|
||||
|
||||
@@ -11,8 +11,8 @@ export const config = {
|
||||
github: {
|
||||
repoUrl: "https://github.com/anomalyco/opencode",
|
||||
starsFormatted: {
|
||||
compact: "215K",
|
||||
full: "215,000",
|
||||
compact: "220K",
|
||||
full: "220,000",
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -68,12 +68,8 @@ export const dict = {
|
||||
|
||||
"home.what.title": "ما هو OpenCode؟",
|
||||
"home.what.body": "OpenCode وكيل مفتوح المصدر يساعدك على كتابة الكود في الطرفية، IDE، أو سطح المكتب.",
|
||||
"home.what.lsp.title": "دعم LSP",
|
||||
"home.what.lsp.body": "يحمّل تلقائيًا موافقات LSP المناسبة للـ LLM",
|
||||
"home.what.multiSession.title": "جلسات متعددة",
|
||||
"home.what.multiSession.body": "ابدأ عدة وكلاء بالتوازي على نفس المشروع",
|
||||
"home.what.shareLinks.title": "روابط المشاركة",
|
||||
"home.what.shareLinks.body": "شارك رابطًا لأي جلسة للرجوع إليها أو لتصحيح الأخطاء",
|
||||
"home.what.copilot.title": "GitHub Copilot",
|
||||
"home.what.copilot.body": "سجّل الدخول بـ GitHub لاستخدام حسابك في Copilot",
|
||||
"home.what.chatgptPlus.title": "ChatGPT Plus/Pro",
|
||||
@@ -112,8 +108,7 @@ export const dict = {
|
||||
"home.faq.a3.p4.beforeLocal": "ويمكنك أيضًا ربط",
|
||||
"home.faq.a3.p4.localLink": "النماذج المحلية",
|
||||
"home.faq.q4": "هل يمكنني استخدام اشتراكاتي الحالية مع OpenCode؟",
|
||||
"home.faq.a4.p1":
|
||||
"نعم، يدعم OpenCode خطط الاشتراك من كل المزودين الرئيسيين. يمكنك استخدام اشتراكات Claude Pro/Max، ChatGPT Plus/Pro، أو GitHub Copilot.",
|
||||
"home.faq.a4.p1": "نعم، يمكنك استخدام اشتراكات ChatGPT Plus/Pro أو GitHub Copilot.",
|
||||
"home.faq.q5": "هل يمكنني استخدام OpenCode في الطرفية فقط؟",
|
||||
"home.faq.a5.beforeDesktop": "ليس بعد الآن! OpenCode متاح الآن كتطبيق لـ",
|
||||
"home.faq.a5.desktop": "سطح المكتب",
|
||||
@@ -162,7 +157,7 @@ export const dict = {
|
||||
"لتغطية التكاليف، يضيف OpenCode فقط رسومًا صغيرة لمعالجة الدفع قدرها 1.23 دولار لكل إعادة شحن رصيد بقيمة 20 دولارًا.",
|
||||
"zen.faq.q5": "ماذا عن البيانات والخصوصية؟",
|
||||
"zen.faq.a5.beforeExceptions":
|
||||
"تتم استضافة جميع نماذج Zen في الولايات المتحدة. يتبع المزودون سياسة عدم الاحتفاظ بالبيانات ولا يستخدمون بياناتك لتدريب النماذج، مع",
|
||||
"تتم استضافة جميع نماذج Zen في الولايات المتحدة والاتحاد الأوروبي. يتبع المزودون سياسة عدم الاحتفاظ بالبيانات ولا يستخدمون بياناتك لتدريب النماذج، مع",
|
||||
"zen.faq.a5.exceptionsLink": "الاستثناءات التالية",
|
||||
"zen.faq.q6": "هل يمكنني تعيين حدود للإنفاق؟",
|
||||
"zen.faq.a6": "نعم، يمكنك تعيين حدود إنفاق شهرية في حسابك.",
|
||||
@@ -195,10 +190,10 @@ export const dict = {
|
||||
"zen.how.step2.link": "ادفع لكل طلب",
|
||||
"zen.how.step2.afterLink": "بدون أي هوامش ربح",
|
||||
"zen.how.step3.title": "شحن تلقائي",
|
||||
"zen.how.step3.body": "عندما يصل رصيدك إلى 5 دولارات، سنضيف تلقائيًا 20 دولارًا",
|
||||
"zen.how.step3.body": "فعّل الشحن التلقائي الاختياري واختر حد الرصيد ومبلغ الشحن",
|
||||
"zen.privacy.title": "خصوصيتك مهمة بالنسبة لنا",
|
||||
"zen.privacy.beforeExceptions":
|
||||
"تتم استضافة جميع نماذج Zen في الولايات المتحدة. يتبع المزودون سياسة عدم الاحتفاظ بالبيانات ولا يستخدمون بياناتك لتدريب النماذج، مع",
|
||||
"تتم استضافة جميع نماذج Zen في الولايات المتحدة والاتحاد الأوروبي. يتبع المزودون سياسة عدم الاحتفاظ بالبيانات ولا يستخدمون بياناتك لتدريب النماذج، مع",
|
||||
"zen.privacy.exceptionsLink": "الاستثناءات التالية",
|
||||
|
||||
"go.title": "OpenCode Go | نماذج برمجة منخفضة التكلفة للجميع",
|
||||
@@ -369,7 +364,7 @@ export const dict = {
|
||||
"ابدأ ببساطة بتجربة داخلية مع فريقك. افتراضيًا، لا يقوم OpenCode بتخزين الكود أو بيانات السياق، مما يجعل البدء سهلاً. ثم اتصل بنا لمناقشة الأسعار وخيارات التنفيذ.",
|
||||
"enterprise.faq.q3": "كيف تعمل تسعيرة المؤسسات؟",
|
||||
"enterprise.faq.a3":
|
||||
"نقدم تسعيرًا للمؤسسات حسب المقعد. إذا كان لديك بوابة LLM خاصة بك، فلن نفرض رسومًا على التوكنات المستخدمة. لمزيد من التفاصيل، اتصل بنا للحصول على عرض سعر مخصص بناءً على احتياجات مؤسستك.",
|
||||
"إذا كان لديك بوابة LLM خاصة بك، فلن نفرض رسومًا على التوكنات المستخدمة. لمزيد من التفاصيل، اتصل بنا للحصول على عرض سعر مخصص بناءً على احتياجات مؤسستك.",
|
||||
"enterprise.faq.q4": "هل بياناتي آمنة مع OpenCode Enterprise؟",
|
||||
"enterprise.faq.a4":
|
||||
"نعم. لا يقوم OpenCode بتخزين الكود أو بيانات السياق. تتم جميع المعالجة محليًا أو عبر استدعاءات API مباشرة إلى مزود الذكاء الاصطناعي لديك. مع التكوين المركزي وتكامل SSO، تظل بياناتك آمنة داخل البنية التحتية لمؤسستك.",
|
||||
|
||||
@@ -70,12 +70,8 @@ export const dict = {
|
||||
"home.what.title": "O que é OpenCode?",
|
||||
"home.what.body":
|
||||
"OpenCode é um agente de código aberto que ajuda você a escrever código no seu terminal, IDE ou desktop.",
|
||||
"home.what.lsp.title": "LSP habilitado",
|
||||
"home.what.lsp.body": "Carrega automaticamente os LSPs certos para o LLM",
|
||||
"home.what.multiSession.title": "Multissessão",
|
||||
"home.what.multiSession.body": "Inicie vários agentes em paralelo no mesmo projeto",
|
||||
"home.what.shareLinks.title": "Links compartilháveis",
|
||||
"home.what.shareLinks.body": "Compartilhe um link para qualquer sessão para referência ou depuração",
|
||||
"home.what.copilot.title": "GitHub Copilot",
|
||||
"home.what.copilot.body": "Entre com o GitHub para usar sua conta do Copilot",
|
||||
"home.what.chatgptPlus.title": "ChatGPT Plus/Pro",
|
||||
@@ -116,8 +112,7 @@ export const dict = {
|
||||
"home.faq.a3.p4.beforeLocal": "Você pode até conectar seus",
|
||||
"home.faq.a3.p4.localLink": "modelos locais",
|
||||
"home.faq.q4": "Posso usar minhas assinaturas de IA existentes com o OpenCode?",
|
||||
"home.faq.a4.p1":
|
||||
"Sim, OpenCode suporta planos de assinatura de todos os principais provedores. Você pode usar suas assinaturas Claude Pro/Max, ChatGPT Plus/Pro ou GitHub Copilot.",
|
||||
"home.faq.a4.p1": "Sim, você pode usar suas assinaturas ChatGPT Plus/Pro ou GitHub Copilot.",
|
||||
"home.faq.q5": "Posso usar o OpenCode apenas no terminal?",
|
||||
"home.faq.a5.beforeDesktop": "Não mais! OpenCode agora está disponível como um app para o seu",
|
||||
"home.faq.a5.desktop": "desktop",
|
||||
@@ -166,7 +161,7 @@ export const dict = {
|
||||
"Para cobrir custos, a OpenCode adiciona apenas uma pequena taxa de processamento de pagamento de $1,23 por recarga de $20.",
|
||||
"zen.faq.q5": "E sobre dados e privacidade?",
|
||||
"zen.faq.a5.beforeExceptions":
|
||||
"Todos os modelos Zen são hospedados nos EUA. Os provedores seguem uma política de retenção zero e não usam seus dados para treinamento de modelos, com as",
|
||||
"Todos os modelos Zen são hospedados nos EUA e na UE. Os provedores seguem uma política de retenção zero e não usam seus dados para treinamento de modelos, com as",
|
||||
"zen.faq.a5.exceptionsLink": "seguintes exceções",
|
||||
"zen.faq.q6": "Posso definir limites de gastos?",
|
||||
"zen.faq.a6": "Sim, você pode definir limites de gastos mensais em sua conta.",
|
||||
@@ -199,10 +194,10 @@ export const dict = {
|
||||
"zen.how.step2.link": "pague por requisição",
|
||||
"zen.how.step2.afterLink": "sem margens de lucro",
|
||||
"zen.how.step3.title": "Recarga automática",
|
||||
"zen.how.step3.body": "quando seu saldo atingir $5, adicionaremos automaticamente $20",
|
||||
"zen.how.step3.body": "ative a recarga automática opcional e escolha o limite de saldo e o valor da recarga",
|
||||
"zen.privacy.title": "Sua privacidade é importante para nós",
|
||||
"zen.privacy.beforeExceptions":
|
||||
"Todos os modelos Zen são hospedados nos EUA. Os provedores seguem uma política de retenção zero e não usam seus dados para treinamento de modelo, com as",
|
||||
"Todos os modelos Zen são hospedados nos EUA e na UE. Os provedores seguem uma política de retenção zero e não usam seus dados para treinamento de modelo, com as",
|
||||
"zen.privacy.exceptionsLink": "seguintes exceções",
|
||||
|
||||
"go.title": "OpenCode Go | Modelos de codificação de baixo custo para todos",
|
||||
@@ -378,7 +373,7 @@ export const dict = {
|
||||
"Basta começar com um teste interno com sua equipe. O OpenCode por padrão não armazena seu código ou dados de contexto, facilitando o início. Em seguida, entre em contato conosco para discutir opções de preços e implementação.",
|
||||
"enterprise.faq.q3": "Como funciona o preço empresarial?",
|
||||
"enterprise.faq.a3":
|
||||
"Oferecemos preços empresariais por assento. Se você tiver seu próprio gateway de LLM, não cobramos pelos tokens usados. Para mais detalhes, entre em contato conosco para um orçamento personalizado com base nas necessidades da sua organização.",
|
||||
"Se você tiver seu próprio gateway de LLM, não cobramos pelos tokens usados. Para mais detalhes, entre em contato conosco para um orçamento personalizado com base nas necessidades da sua organização.",
|
||||
"enterprise.faq.q4": "Meus dados estão seguros com o OpenCode Enterprise?",
|
||||
"enterprise.faq.a4":
|
||||
"Sim. O OpenCode não armazena seu código ou dados de contexto. Todo o processamento acontece localmente ou por meio de chamadas de API diretas para seu provedor de IA. Com configuração centralizada e integração de SSO, seus dados permanecem seguros dentro da infraestrutura de sua organização.",
|
||||
|
||||
@@ -70,12 +70,8 @@ export const dict = {
|
||||
"home.what.title": "Hvad er OpenCode?",
|
||||
"home.what.body":
|
||||
"OpenCode er en open source agent, der hjælper dig med at skrive kode i din terminal, IDE eller desktop.",
|
||||
"home.what.lsp.title": "LSP aktiveret",
|
||||
"home.what.lsp.body": "Indlæser automatisk de rigtige LSP'er til LLM'en",
|
||||
"home.what.multiSession.title": "Multi-session",
|
||||
"home.what.multiSession.body": "Start flere agenter parallelt på det samme projekt",
|
||||
"home.what.shareLinks.title": "Del links",
|
||||
"home.what.shareLinks.body": "Del et link til enhver session til reference eller debugging",
|
||||
"home.what.copilot.title": "GitHub Copilot",
|
||||
"home.what.copilot.body": "Log ind med GitHub for at bruge din Copilot-konto",
|
||||
"home.what.chatgptPlus.title": "ChatGPT Plus/Pro",
|
||||
@@ -115,8 +111,7 @@ export const dict = {
|
||||
"home.faq.a3.p4.beforeLocal": "Du kan endda forbinde dine",
|
||||
"home.faq.a3.p4.localLink": "lokale modeller",
|
||||
"home.faq.q4": "Kan jeg bruge mine eksisterende AI-abonnementer med OpenCode?",
|
||||
"home.faq.a4.p1":
|
||||
"Ja. OpenCode understøtter abonnementer fra alle store udbydere. Du kan bruge Claude Pro/Max, ChatGPT Plus/Pro eller GitHub Copilot.",
|
||||
"home.faq.a4.p1": "Ja, du kan bruge dine ChatGPT Plus/Pro- eller GitHub Copilot-abonnementer.",
|
||||
"home.faq.q5": "Kan jeg kun bruge OpenCode i terminalen?",
|
||||
"home.faq.a5.beforeDesktop": "Ikke længere! OpenCode er nu tilgængelig som en app til",
|
||||
"home.faq.a5.desktop": "desktop",
|
||||
@@ -165,7 +160,7 @@ export const dict = {
|
||||
"For at dække omkostninger tilføjer OpenCode kun et lille betalingsgebyr på $1.23 per $20 saldo-opfyldning.",
|
||||
"zen.faq.q5": "Hvad med data og privatliv?",
|
||||
"zen.faq.a5.beforeExceptions":
|
||||
"Alle Zen-modeller hostes i USA. Udbydere følger en zero-retention-policy og bruger ikke dine data til modeltræning, med de",
|
||||
"Alle Zen-modeller hostes i USA og EU. Udbydere følger en zero-retention-policy og bruger ikke dine data til modeltræning, med de",
|
||||
"zen.faq.a5.exceptionsLink": "følgende undtagelser",
|
||||
"zen.faq.q6": "Kan jeg sætte udgiftsgrænser?",
|
||||
"zen.faq.a6": "Ja, du kan sætte månedlige udgiftsgrænser i din konto.",
|
||||
@@ -198,10 +193,10 @@ export const dict = {
|
||||
"zen.how.step2.link": "betal per request",
|
||||
"zen.how.step2.afterLink": "med nul markups",
|
||||
"zen.how.step3.title": "Auto-top op",
|
||||
"zen.how.step3.body": "når din saldo når $5, tilføjer vi automatisk $20",
|
||||
"zen.how.step3.body": "aktivér valgfri automatisk opfyldning, og vælg din saldogrænse og opfyldningsbeløbet",
|
||||
"zen.privacy.title": "Dit privatliv er vigtigt for os",
|
||||
"zen.privacy.beforeExceptions":
|
||||
"Alle Zen-modeller er hostet i USA. Udbydere følger en nulopbevaringspolitik og bruger ikke dine data til modeltræning med",
|
||||
"Alle Zen-modeller er hostet i USA og EU. Udbydere følger en nulopbevaringspolitik og bruger ikke dine data til modeltræning med",
|
||||
"zen.privacy.exceptionsLink": "følgende undtagelser",
|
||||
|
||||
"go.title": "OpenCode Go | Kodningsmodeller til lav pris for alle",
|
||||
@@ -375,7 +370,7 @@ export const dict = {
|
||||
"Start blot med en intern prøveperiode med dit team. OpenCode gemmer som standard ikke din kode eller kontekstdata, hvilket gør det nemt at komme i gang. Kontakt os derefter for at tale om priser og implementeringsmuligheder.",
|
||||
"enterprise.faq.q3": "Hvordan fungerer enterprise-priser?",
|
||||
"enterprise.faq.a3":
|
||||
"Vi tilbyder enterprise-priser pr. bruger. Hvis du har din egen LLM-gateway, opkræver vi ikke for brugte tokens. Kontakt os for flere detaljer og et tilbud tilpasset din organisations behov.",
|
||||
"Hvis du har din egen LLM-gateway, opkræver vi ikke for brugte tokens. Kontakt os for flere detaljer og et tilbud tilpasset din organisations behov.",
|
||||
"enterprise.faq.q4": "Er mine data sikre med OpenCode Enterprise?",
|
||||
"enterprise.faq.a4":
|
||||
"Ja. OpenCode gemmer ikke din kode eller kontekstdata. Al behandling sker lokalt eller via direkte API-kald til din AI-udbyder. Med central konfiguration og SSO-integration forbliver dine data sikre inden for din organisations infrastruktur.",
|
||||
|
||||
@@ -70,12 +70,8 @@ export const dict = {
|
||||
"home.what.title": "Was ist OpenCode?",
|
||||
"home.what.body":
|
||||
"OpenCode ist ein Open-Source-Agent, der dir hilft, Code in deinem Terminal, deiner IDE oder auf dem Desktop zu schreiben.",
|
||||
"home.what.lsp.title": "LSP-fähig",
|
||||
"home.what.lsp.body": "Lädt automatisch die richtigen LSPs für das LLM",
|
||||
"home.what.multiSession.title": "Multi-Session",
|
||||
"home.what.multiSession.body": "Starte mehrere Agenten parallel im selben Projekt",
|
||||
"home.what.shareLinks.title": "Links teilen",
|
||||
"home.what.shareLinks.body": "Teile einen Link zu jeder Sitzung als Referenz oder zum Debuggen",
|
||||
"home.what.copilot.title": "GitHub Copilot",
|
||||
"home.what.copilot.body": "Melde dich mit GitHub an, um deinen Copilot-Account zu nutzen",
|
||||
"home.what.chatgptPlus.title": "ChatGPT Plus/Pro",
|
||||
@@ -115,8 +111,7 @@ export const dict = {
|
||||
"home.faq.a3.p4.beforeLocal": "Du kannst sogar deine",
|
||||
"home.faq.a3.p4.localLink": "lokalen Modelle verbinden",
|
||||
"home.faq.q4": "Kann ich meine bestehenden AI-Abos mit OpenCode nutzen?",
|
||||
"home.faq.a4.p1":
|
||||
"Ja, OpenCode unterstützt Abos von allen großen Anbietern. Du kannst deine Claude Pro/Max, ChatGPT Plus/Pro oder GitHub Copilot Abos nutzen.",
|
||||
"home.faq.a4.p1": "Ja, du kannst deine ChatGPT Plus/Pro- oder GitHub Copilot-Abos nutzen.",
|
||||
"home.faq.q5": "Kann ich OpenCode nur im Terminal nutzen?",
|
||||
"home.faq.a5.beforeDesktop": "Nicht mehr! OpenCode ist jetzt als App für",
|
||||
"home.faq.a5.desktop": "Desktop",
|
||||
@@ -166,7 +161,7 @@ export const dict = {
|
||||
"Um die Kosten zu decken, fügt OpenCode nur eine kleine Bearbeitungsgebühr von $1.23 pro $20 Guthabenaufladung hinzu.",
|
||||
"zen.faq.q5": "Was ist mit Daten und Privatsphäre?",
|
||||
"zen.faq.a5.beforeExceptions":
|
||||
"Alle Zen-Modelle werden in den USA gehostet. Anbieter folgen einer Zero-Retention-Policy und nutzen deine Daten nicht zum Trainieren von Modellen, mit den",
|
||||
"Alle Zen-Modelle werden in den USA und der EU gehostet. Anbieter folgen einer Zero-Retention-Policy und nutzen deine Daten nicht zum Trainieren von Modellen, mit den",
|
||||
"zen.faq.a5.exceptionsLink": "folgenden Ausnahmen",
|
||||
"zen.faq.q6": "Kann ich Ausgabenlimits setzen?",
|
||||
"zen.faq.a6": "Ja, du kannst monatliche Ausgabenlimits in deinem Account setzen.",
|
||||
@@ -199,10 +194,11 @@ export const dict = {
|
||||
"zen.how.step2.link": "zahle pro Anfrage",
|
||||
"zen.how.step2.afterLink": "ohne Aufschläge",
|
||||
"zen.how.step3.title": "Auto-Top-up",
|
||||
"zen.how.step3.body": "wenn dein Guthaben $5 erreicht, fügen wir automatisch $20 hinzu",
|
||||
"zen.how.step3.body":
|
||||
"aktiviere die optionale automatische Aufladung und wähle deine Guthabenschwelle und den Aufladebetrag",
|
||||
"zen.privacy.title": "Deine Privatsphäre ist uns wichtig",
|
||||
"zen.privacy.beforeExceptions":
|
||||
"Alle Zen-Modelle werden in den USA gehostet. Anbieter folgen einer Zero-Retention-Policy und nutzen deine Daten nicht für Modelltraining, mit den",
|
||||
"Alle Zen-Modelle werden in den USA und der EU gehostet. Anbieter folgen einer Zero-Retention-Policy und nutzen deine Daten nicht für Modelltraining, mit den",
|
||||
"zen.privacy.exceptionsLink": "folgenden Ausnahmen",
|
||||
|
||||
"go.title": "OpenCode Go | Kostengünstige Coding-Modelle für alle",
|
||||
@@ -379,7 +375,7 @@ export const dict = {
|
||||
"Starten Sie einfach mit einem internen Testlauf mit Ihrem Team. OpenCode speichert standardmäßig weder Code noch Kontextdaten, was den Einstieg erleichtert. Kontaktieren Sie uns dann, um Preise und Implementierungsoptionen zu besprechen.",
|
||||
"enterprise.faq.q3": "Wie funktioniert das Enterprise-Pricing?",
|
||||
"enterprise.faq.a3":
|
||||
"Wir bieten eine Preisgestaltung pro Arbeitsplatz (Seat) an. Wenn Sie Ihr eigenes LLM-Gateway haben, berechnen wir keine Gebühren für genutzte Token. Für weitere Details kontaktieren Sie uns für ein individuelles Angebot basierend auf den Anforderungen Ihrer Organisation.",
|
||||
"Wenn Sie Ihr eigenes LLM-Gateway haben, berechnen wir keine Gebühren für genutzte Token. Für weitere Details kontaktieren Sie uns für ein individuelles Angebot basierend auf den Anforderungen Ihrer Organisation.",
|
||||
"enterprise.faq.q4": "Sind meine Daten mit OpenCode Enterprise sicher?",
|
||||
"enterprise.faq.a4":
|
||||
"Ja. OpenCode speichert weder Ihren Code noch Kontextdaten. Alle Verarbeitungen finden lokal oder über direkte API-Aufrufe an Ihren AI-Anbieter statt. Mit zentraler Konfiguration und SSO-Integration bleiben Ihre Daten sicher innerhalb der Infrastruktur Ihrer Organisation.",
|
||||
|
||||
@@ -70,12 +70,8 @@ export const dict = {
|
||||
|
||||
"home.what.title": "What is OpenCode?",
|
||||
"home.what.body": "OpenCode is an open source agent that helps you write code in your terminal, IDE, or desktop.",
|
||||
"home.what.lsp.title": "LSP enabled",
|
||||
"home.what.lsp.body": "Automatically loads the right LSPs for the LLM",
|
||||
"home.what.multiSession.title": "Multi-session",
|
||||
"home.what.multiSession.body": "Start multiple agents in parallel on the same project",
|
||||
"home.what.shareLinks.title": "Share links",
|
||||
"home.what.shareLinks.body": "Share a link to any session for reference or to debug",
|
||||
"home.what.copilot.title": "GitHub Copilot",
|
||||
"home.what.copilot.body": "Log in with GitHub to use your Copilot account",
|
||||
"home.what.chatgptPlus.title": "ChatGPT Plus/Pro",
|
||||
@@ -115,8 +111,7 @@ export const dict = {
|
||||
"home.faq.a3.p4.beforeLocal": "You can even connect your",
|
||||
"home.faq.a3.p4.localLink": "local models",
|
||||
"home.faq.q4": "Can I use my existing AI subscriptions with OpenCode?",
|
||||
"home.faq.a4.p1":
|
||||
"Yes, OpenCode supports subscription plans from all major providers. You can use your Claude Pro/Max, ChatGPT Plus/Pro, or GitHub Copilot subscriptions.",
|
||||
"home.faq.a4.p1": "Yes, you can use your ChatGPT Plus/Pro or GitHub Copilot subscriptions.",
|
||||
"home.faq.q5": "Can I only use OpenCode in the terminal?",
|
||||
"home.faq.a5.beforeDesktop": "Not anymore! OpenCode is now available as an app for your",
|
||||
"home.faq.a5.desktop": "desktop",
|
||||
@@ -164,7 +159,7 @@ export const dict = {
|
||||
"zen.faq.a4.p3": "To cover costs, OpenCode adds only a small payment processing fee of $1.23 per $20 balance top-up.",
|
||||
"zen.faq.q5": "What about data and privacy?",
|
||||
"zen.faq.a5.beforeExceptions":
|
||||
"All Zen models are hosted in the US. Providers follow a zero-retention policy and do not use your data for model training, with the",
|
||||
"All Zen models are hosted in the US and EU. Providers follow a zero-retention policy and do not use your data for model training, with the",
|
||||
"zen.faq.a5.exceptionsLink": "following exceptions",
|
||||
"zen.faq.q6": "Can I set spend limits?",
|
||||
"zen.faq.a6": "Yes, you can set monthly spending limits in your account.",
|
||||
@@ -197,10 +192,10 @@ export const dict = {
|
||||
"zen.how.step2.link": "pay per request",
|
||||
"zen.how.step2.afterLink": "with zero markups",
|
||||
"zen.how.step3.title": "Auto-top up",
|
||||
"zen.how.step3.body": "when your balance reaches $5, we'll automatically add $20",
|
||||
"zen.how.step3.body": "optional; choose your balance threshold and top-up amount",
|
||||
"zen.privacy.title": "Your privacy is important to us",
|
||||
"zen.privacy.beforeExceptions":
|
||||
"All Zen models are hosted in the US. Providers follow a zero-retention policy and do not use your data for model training, with the",
|
||||
"All Zen models are hosted in the US and EU. Providers follow a zero-retention policy and do not use your data for model training, with the",
|
||||
"zen.privacy.exceptionsLink": "following exceptions",
|
||||
|
||||
"go.title": "OpenCode Go | Low cost coding models for everyone",
|
||||
@@ -373,7 +368,7 @@ export const dict = {
|
||||
"Simply start with an internal trial with your team. OpenCode by default does not store your code or context data, making it easy to get started. Then contact us to discuss pricing and implementation options.",
|
||||
"enterprise.faq.q3": "How does enterprise pricing work?",
|
||||
"enterprise.faq.a3":
|
||||
"We offer per-seat enterprise pricing. If you have your own LLM gateway, we do not charge for tokens used. For further details, contact us for a custom quote based on your organization's needs.",
|
||||
"If you have your own LLM gateway, we do not charge for tokens used. For further details, contact us for a custom quote based on your organization's needs.",
|
||||
"enterprise.faq.q4": "Is my data secure with OpenCode Enterprise?",
|
||||
"enterprise.faq.a4":
|
||||
"Yes. OpenCode does not store your code or context data. All processing happens locally or through direct API calls to your AI provider. With central config and SSO integration, your data remains secure within your organization's infrastructure.",
|
||||
|
||||
@@ -70,12 +70,8 @@ export const dict = {
|
||||
"home.what.title": "¿Qué es OpenCode?",
|
||||
"home.what.body":
|
||||
"OpenCode es un agente de código abierto que te ayuda a escribir código en tu terminal, IDE o escritorio.",
|
||||
"home.what.lsp.title": "LSP habilitado",
|
||||
"home.what.lsp.body": "Carga automáticamente los LSPs correctos para el LLM",
|
||||
"home.what.multiSession.title": "Multi-sesión",
|
||||
"home.what.multiSession.body": "Inicia múltiples agentes en paralelo en el mismo proyecto",
|
||||
"home.what.shareLinks.title": "Compartir enlaces",
|
||||
"home.what.shareLinks.body": "Comparte un enlace a cualquier sesión para referencia o depuración",
|
||||
"home.what.copilot.title": "GitHub Copilot",
|
||||
"home.what.copilot.body": "Inicia sesión con GitHub para usar tu cuenta de Copilot",
|
||||
"home.what.chatgptPlus.title": "ChatGPT Plus/Pro",
|
||||
@@ -116,8 +112,7 @@ export const dict = {
|
||||
"home.faq.a3.p4.beforeLocal": "Incluso puedes conectar tus",
|
||||
"home.faq.a3.p4.localLink": "modelos locales",
|
||||
"home.faq.q4": "¿Puedo usar mis suscripciones de IA existentes con OpenCode?",
|
||||
"home.faq.a4.p1":
|
||||
"Sí, OpenCode soporta planes de suscripción de los principales proveedores. Puedes usar tus suscripciones de Claude Pro/Max, ChatGPT Plus/Pro o GitHub Copilot.",
|
||||
"home.faq.a4.p1": "Sí, puedes usar tus suscripciones de ChatGPT Plus/Pro o GitHub Copilot.",
|
||||
"home.faq.q5": "¿Solo puedo usar OpenCode en la terminal?",
|
||||
"home.faq.a5.beforeDesktop": "¡Ya no! OpenCode ahora está disponible como una aplicación para tu",
|
||||
"home.faq.a5.desktop": "escritorio",
|
||||
@@ -167,7 +162,7 @@ export const dict = {
|
||||
"Para cubrir costos, OpenCode añade solo una pequeña tarifa de procesamiento de pagos de $1.23 por cada recarga de saldo de $20.",
|
||||
"zen.faq.q5": "¿Qué hay sobre datos y privacidad?",
|
||||
"zen.faq.a5.beforeExceptions":
|
||||
"Todos los modelos Zen están alojados en EE. UU. Los proveedores siguen una política de cero retención y no usan tus datos para entrenamiento de modelos, con las",
|
||||
"Todos los modelos Zen están alojados en EE. UU. y la UE Los proveedores siguen una política de cero retención y no usan tus datos para entrenamiento de modelos, con las",
|
||||
"zen.faq.a5.exceptionsLink": "siguientes excepciones",
|
||||
"zen.faq.q6": "¿Puedo establecer límites de gasto?",
|
||||
"zen.faq.a6": "Sí, puedes establecer límites de gasto mensuales en tu cuenta.",
|
||||
@@ -200,10 +195,10 @@ export const dict = {
|
||||
"zen.how.step2.link": "paga por solicitud",
|
||||
"zen.how.step2.afterLink": "con cero recargos",
|
||||
"zen.how.step3.title": "Auto-recarga",
|
||||
"zen.how.step3.body": "cuando tu saldo alcance $5 añadiremos automáticamente $20",
|
||||
"zen.how.step3.body": "activa la recarga automática opcional y elige el umbral de saldo y el importe de la recarga",
|
||||
"zen.privacy.title": "Tu privacidad es importante para nosotros",
|
||||
"zen.privacy.beforeExceptions":
|
||||
"Todos los modelos Zen están alojados en EE. UU. Los proveedores siguen una política de cero retención y no usan tus datos para entrenamiento de modelos, con las",
|
||||
"Todos los modelos Zen están alojados en EE. UU. y la UE Los proveedores siguen una política de cero retención y no usan tus datos para entrenamiento de modelos, con las",
|
||||
"zen.privacy.exceptionsLink": "siguientes excepciones",
|
||||
|
||||
"go.title": "OpenCode Go | Modelos de programación de bajo coste para todos",
|
||||
@@ -379,7 +374,7 @@ export const dict = {
|
||||
"Simplemente empieza con una prueba interna con tu equipo. OpenCode por defecto no almacena tu código ni datos de contexto, haciendo fácil empezar. Luego contáctanos para discutir precios y opciones de implementación.",
|
||||
"enterprise.faq.q3": "¿Cómo funciona el precio para empresas?",
|
||||
"enterprise.faq.a3":
|
||||
"Ofrecemos precios empresariales por asiento. Si tienes tu propia pasarela de LLM, no cobramos por los tokens usados. Para más detalles, contáctanos para una cotización personalizada basada en las necesidades de tu organización.",
|
||||
"Si tienes tu propia pasarela de LLM, no cobramos por los tokens usados. Para más detalles, contáctanos para una cotización personalizada basada en las necesidades de tu organización.",
|
||||
"enterprise.faq.q4": "¿Están mis datos seguros con OpenCode Enterprise?",
|
||||
"enterprise.faq.a4":
|
||||
"Sí. OpenCode no almacena tu código ni datos de contexto. Todo el procesamiento ocurre localmente o a través de llamadas directas a la API de tu proveedor de IA. Con configuración central y integración SSO, tus datos permanecen seguros dentro de la infraestructura de tu organización.",
|
||||
|
||||
@@ -70,12 +70,8 @@ export const dict = {
|
||||
"home.what.title": "Qu'est-ce que OpenCode ?",
|
||||
"home.what.body":
|
||||
"OpenCode est un agent open source qui vous aide à écrire du code dans votre terminal, IDE ou desktop.",
|
||||
"home.what.lsp.title": "LSP activé",
|
||||
"home.what.lsp.body": "Charge automatiquement les bons LSP pour le LLM",
|
||||
"home.what.multiSession.title": "Multi-session",
|
||||
"home.what.multiSession.body": "Lancez plusieurs agents en parallèle sur le même projet",
|
||||
"home.what.shareLinks.title": "Liens de partage",
|
||||
"home.what.shareLinks.body": "Partagez un lien vers n'importe quelle session pour référence ou debug",
|
||||
"home.what.copilot.title": "GitHub Copilot",
|
||||
"home.what.copilot.body": "Connectez-vous avec GitHub pour utiliser votre compte Copilot",
|
||||
"home.what.chatgptPlus.title": "ChatGPT Plus/Pro",
|
||||
@@ -115,8 +111,7 @@ export const dict = {
|
||||
"home.faq.a3.p4.beforeLocal": "Vous pouvez même connecter vos",
|
||||
"home.faq.a3.p4.localLink": "modèles locaux",
|
||||
"home.faq.q4": "Puis-je utiliser mes abonnements IA existants avec OpenCode ?",
|
||||
"home.faq.a4.p1":
|
||||
"Oui, OpenCode prend en charge les abonnements des principaux fournisseurs. Vous pouvez utiliser Claude Pro/Max, ChatGPT Plus/Pro ou GitHub Copilot.",
|
||||
"home.faq.a4.p1": "Oui, vous pouvez utiliser vos abonnements ChatGPT Plus/Pro ou GitHub Copilot.",
|
||||
"home.faq.q5": "Puis-je utiliser OpenCode uniquement dans le terminal ?",
|
||||
"home.faq.a5.beforeDesktop": "Plus maintenant ! OpenCode est désormais disponible en application pour",
|
||||
"home.faq.a5.desktop": "desktop",
|
||||
@@ -166,7 +161,7 @@ export const dict = {
|
||||
"Pour couvrir les coûts, OpenCode ajoute uniquement de petits frais de traitement de paiement de 1,23 $ par recharge de 20 $.",
|
||||
"zen.faq.q5": "Et pour les données et la confidentialité ?",
|
||||
"zen.faq.a5.beforeExceptions":
|
||||
"Tous les modèles Zen sont hébergés aux États-Unis. Les fournisseurs appliquent une politique de rétention zéro et n'utilisent pas vos données pour l'entraînement des modèles, avec les",
|
||||
"Tous les modèles Zen sont hébergés aux États-Unis et dans l'UE. Les fournisseurs appliquent une politique de rétention zéro et n'utilisent pas vos données pour l'entraînement des modèles, avec les",
|
||||
"zen.faq.a5.exceptionsLink": "exceptions suivantes",
|
||||
"zen.faq.q6": "Puis-je définir des limites de dépense ?",
|
||||
"zen.faq.a6": "Oui, vous pouvez définir des limites de dépense mensuelles dans votre compte.",
|
||||
@@ -202,10 +197,11 @@ export const dict = {
|
||||
"zen.how.step2.link": "payez par requête",
|
||||
"zen.how.step2.afterLink": "sans marge",
|
||||
"zen.how.step3.title": "Recharge automatique",
|
||||
"zen.how.step3.body": "lorsque votre solde atteint 5 $, nous ajouterons automatiquement 20 $",
|
||||
"zen.how.step3.body":
|
||||
"activez la recharge automatique facultative et choisissez le seuil de solde et le montant de la recharge",
|
||||
"zen.privacy.title": "Votre vie privée est importante pour nous",
|
||||
"zen.privacy.beforeExceptions":
|
||||
"Tous les modèles Zen sont hébergés aux États-Unis. Les fournisseurs suivent une politique de rétention zéro et n'utilisent pas vos données pour l'entraînement des modèles, avec les",
|
||||
"Tous les modèles Zen sont hébergés aux États-Unis et dans l'UE. Les fournisseurs suivent une politique de rétention zéro et n'utilisent pas vos données pour l'entraînement des modèles, avec les",
|
||||
"zen.privacy.exceptionsLink": "exceptions suivantes",
|
||||
|
||||
"go.title": "OpenCode Go | Modèles de code à faible coût pour tous",
|
||||
@@ -382,7 +378,7 @@ export const dict = {
|
||||
"Commencez simplement par un essai interne avec votre équipe. Par défaut, OpenCode ne stocke pas votre code ni vos données de contexte, ce qui facilite la prise en main. Ensuite, contactez-nous pour discuter des tarifs et des options de mise en œuvre.",
|
||||
"enterprise.faq.q3": "Comment fonctionne la tarification entreprise ?",
|
||||
"enterprise.faq.a3":
|
||||
"Nous proposons une tarification entreprise par siège. Si vous avez votre propre passerelle LLM, nous ne facturons pas les tokens utilisés. Pour plus de détails, contactez-nous pour un devis sur mesure en fonction des besoins de votre organisation.",
|
||||
"Si vous avez votre propre passerelle LLM, nous ne facturons pas les tokens utilisés. Pour plus de détails, contactez-nous pour un devis sur mesure en fonction des besoins de votre organisation.",
|
||||
"enterprise.faq.q4": "Mes données sont-elles sécurisées avec OpenCode Enterprise ?",
|
||||
"enterprise.faq.a4":
|
||||
"Oui. OpenCode ne stocke pas votre code ni vos données de contexte. Tout le traitement se fait localement ou via des appels API directs vers votre fournisseur d'IA. Avec une configuration centralisée et une intégration SSO, vos données restent sécurisées au sein de l'infrastructure de votre organisation.",
|
||||
|
||||
@@ -69,12 +69,8 @@ export const dict = {
|
||||
|
||||
"home.what.title": "Che cos'è OpenCode?",
|
||||
"home.what.body": "OpenCode è un agente open source che ti aiuta a scrivere codice nel terminale, IDE o desktop.",
|
||||
"home.what.lsp.title": "LSP abilitato",
|
||||
"home.what.lsp.body": "Carica automaticamente gli LSP giusti per il LLM",
|
||||
"home.what.multiSession.title": "Multi-session",
|
||||
"home.what.multiSession.body": "Avvia più agenti in parallelo sullo stesso progetto",
|
||||
"home.what.shareLinks.title": "Link condivisi",
|
||||
"home.what.shareLinks.body": "Condividi un link a qualsiasi sessione per riferimento o debug",
|
||||
"home.what.copilot.title": "GitHub Copilot",
|
||||
"home.what.copilot.body": "Accedi con GitHub per usare il tuo account Copilot",
|
||||
"home.what.chatgptPlus.title": "ChatGPT Plus/Pro",
|
||||
@@ -114,8 +110,7 @@ export const dict = {
|
||||
"home.faq.a3.p4.beforeLocal": "Puoi anche collegare i tuoi",
|
||||
"home.faq.a3.p4.localLink": "modelli locali",
|
||||
"home.faq.q4": "Posso usare i miei abbonamenti IA esistenti con OpenCode?",
|
||||
"home.faq.a4.p1":
|
||||
"Sì, OpenCode supporta gli abbonamenti dei principali provider. Puoi usare Claude Pro/Max, ChatGPT Plus/Pro o GitHub Copilot.",
|
||||
"home.faq.a4.p1": "Sì, puoi usare i tuoi abbonamenti ChatGPT Plus/Pro o GitHub Copilot.",
|
||||
"home.faq.q5": "Posso usare OpenCode solo nel terminale?",
|
||||
"home.faq.a5.beforeDesktop": "Non più! OpenCode ora è disponibile come app per",
|
||||
"home.faq.a5.desktop": "desktop",
|
||||
@@ -164,7 +159,7 @@ export const dict = {
|
||||
"Per coprire i costi, OpenCode aggiunge solo una piccola commissione di elaborazione del pagamento di $1.23 per ogni ricarica di saldo da $20.",
|
||||
"zen.faq.q5": "E per quanto riguarda dati e privacy?",
|
||||
"zen.faq.a5.beforeExceptions":
|
||||
"Tutti i modelli Zen sono ospitati negli Stati Uniti. I provider seguono una policy di zero-retention e non usano i tuoi dati per l'addestramento dei modelli, con le",
|
||||
"Tutti i modelli Zen sono ospitati negli Stati Uniti e nell'UE. I provider seguono una policy di zero-retention e non usano i tuoi dati per l'addestramento dei modelli, con le",
|
||||
"zen.faq.a5.exceptionsLink": "seguenti eccezioni",
|
||||
"zen.faq.q6": "Posso impostare limiti di spesa?",
|
||||
"zen.faq.a6": "Sì, puoi impostare limiti di spesa mensuali nel tuo account.",
|
||||
@@ -197,10 +192,11 @@ export const dict = {
|
||||
"zen.how.step2.link": "paga per richiesta",
|
||||
"zen.how.step2.afterLink": "senza ricarichi",
|
||||
"zen.how.step3.title": "Ricarica automatica",
|
||||
"zen.how.step3.body": "quando il tuo saldo raggiunge $5, aggiungeremo automaticamente $20",
|
||||
"zen.how.step3.body":
|
||||
"attiva la ricarica automatica opzionale e scegli la soglia del saldo e l'importo della ricarica",
|
||||
"zen.privacy.title": "La tua privacy è importante per noi",
|
||||
"zen.privacy.beforeExceptions":
|
||||
"Tutti i modelli Zen sono ospitati negli Stati Uniti. I provider seguono una policy di zero-retention e non usano i tuoi dati per l'addestramento dei modelli, con le",
|
||||
"Tutti i modelli Zen sono ospitati negli Stati Uniti e nell'UE. I provider seguono una policy di zero-retention e non usano i tuoi dati per l'addestramento dei modelli, con le",
|
||||
"zen.privacy.exceptionsLink": "seguenti eccezioni",
|
||||
|
||||
"go.title": "OpenCode Go | Modelli di coding a basso costo per tutti",
|
||||
@@ -375,7 +371,7 @@ export const dict = {
|
||||
"Inizia semplicemente con una prova interna con il tuo team. OpenCode per impostazione predefinita non archivia il tuo codice o dati di contesto, rendendo facile iniziare. Poi contattaci per discutere prezzi e opzioni di implementazione.",
|
||||
"enterprise.faq.q3": "Come funziona il prezzo enterprise?",
|
||||
"enterprise.faq.a3":
|
||||
"Offriamo prezzi enterprise per postazione. Se hai il tuo gateway LLM, non addebitiamo per i token usati. Per ulteriori dettagli, contattaci per un preventivo personalizzato basato sulle esigenze della tua organizzazione.",
|
||||
"Se hai il tuo gateway LLM, non addebitiamo per i token usati. Per ulteriori dettagli, contattaci per un preventivo personalizzato basato sulle esigenze della tua organizzazione.",
|
||||
"enterprise.faq.q4": "I miei dati sono sicuri con OpenCode Enterprise?",
|
||||
"enterprise.faq.a4":
|
||||
"Sì. OpenCode non archivia il tuo codice o dati di contesto. Tutto il trattamento avviene localmente o attraverso chiamate API dirette al tuo provider IA. Con configurazione centrale e integrazione SSO, i tuoi dati rimangono sicuri all'interno dell'infrastruttura della tua organizzazione.",
|
||||
|
||||
@@ -70,12 +70,8 @@ export const dict = {
|
||||
"home.what.title": "OpenCodeとは?",
|
||||
"home.what.body":
|
||||
"OpenCodeは、ターミナル、IDE、またはデスクトップでのコード作成を支援するオープンソースのエージェントです。",
|
||||
"home.what.lsp.title": "LSP対応",
|
||||
"home.what.lsp.body": "LLMに適したLSPを自動的に読み込みます",
|
||||
"home.what.multiSession.title": "マルチセッション",
|
||||
"home.what.multiSession.body": "同じプロジェクトで複数のエージェントを並行実行できます",
|
||||
"home.what.shareLinks.title": "共有リンク",
|
||||
"home.what.shareLinks.body": "参照やデバッグのために、任意のセッションへのリンクを共有できます",
|
||||
"home.what.copilot.title": "GitHub Copilot",
|
||||
"home.what.copilot.body": "GitHubでログインしてCopilotアカウントを利用できます",
|
||||
"home.what.chatgptPlus.title": "ChatGPT Plus/Pro",
|
||||
@@ -114,8 +110,7 @@ export const dict = {
|
||||
"home.faq.a3.p4.beforeLocal": "さらに、",
|
||||
"home.faq.a3.p4.localLink": "ローカルモデル",
|
||||
"home.faq.q4": "既存のAIサブスクリプションをOpenCodeで使えますか?",
|
||||
"home.faq.a4.p1":
|
||||
"はい、OpenCodeは主要プロバイダーのサブスクリプションプランに対応しています。Claude Pro/Max、ChatGPT Plus/Pro、GitHub Copilotのサブスクリプションを利用できます。",
|
||||
"home.faq.a4.p1": "はい、ChatGPT Plus/ProまたはGitHub Copilotのサブスクリプションを利用できます。",
|
||||
"home.faq.q5": "ターミナルだけで使えますか?",
|
||||
"home.faq.a5.beforeDesktop": "もう違います!OpenCodeは今は",
|
||||
"home.faq.a5.desktop": "デスクトップ",
|
||||
@@ -163,7 +158,7 @@ export const dict = {
|
||||
"zen.faq.a4.p3": "コストを賄うために、OpenCodeは$20の残高チャージあたり$1.23の小さな決済手数料のみを追加します。",
|
||||
"zen.faq.q5": "データとプライバシーは?",
|
||||
"zen.faq.a5.beforeExceptions":
|
||||
"Zenのモデルはすべて米国でホストされています。プロバイダーはゼロ保持ポリシーを守り、データをモデル学習に使用しません(",
|
||||
"Zenのモデルはすべて米国とEUでホストされています。プロバイダーはゼロ保持ポリシーを守り、データをモデル学習に使用しません(",
|
||||
"zen.faq.a5.exceptionsLink": "以下の例外",
|
||||
"zen.faq.q6": "支出上限を設定できますか?",
|
||||
"zen.faq.a6": "はい、アカウントで月次の支出上限を設定できます。",
|
||||
@@ -197,10 +192,10 @@ export const dict = {
|
||||
"zen.how.step2.link": "リクエストごとに支払う",
|
||||
"zen.how.step2.afterLink": "(マークアップなし)",
|
||||
"zen.how.step3.title": "自動チャージ",
|
||||
"zen.how.step3.body": "残高が$5に達すると、自動的に$20が追加されます",
|
||||
"zen.how.step3.body": "任意で自動チャージを有効にし、残高のしきい値とチャージ額を設定できます",
|
||||
"zen.privacy.title": "あなたのプライバシーは私たちにとって重要です",
|
||||
"zen.privacy.beforeExceptions":
|
||||
"すべてのZenモデルは米国でホストされています。プロバイダーはゼロ保持ポリシーに従い、モデルのトレーニングにデータを使用しません(",
|
||||
"すべてのZenモデルは米国とEUでホストされています。プロバイダーはゼロ保持ポリシーに従い、モデルのトレーニングにデータを使用しません(",
|
||||
"zen.privacy.exceptionsLink": "以下の例外",
|
||||
|
||||
"go.title": "OpenCode Go | すべての人のための低価格なコーディングモデル",
|
||||
@@ -373,7 +368,7 @@ export const dict = {
|
||||
"まずはチームでの社内トライアルから始めてください。OpenCodeはデフォルトでコードやコンテキストデータを保存しないため、簡単に始められます。その後、価格や導入オプションについてお問い合わせください。",
|
||||
"enterprise.faq.q3": "エンタープライズ価格の仕組みは?",
|
||||
"enterprise.faq.a3":
|
||||
"シート単位(ユーザー数)でのエンタープライズ価格を提供します。独自のLLMゲートウェイをお持ちの場合、使用トークンに対する課金はありません。詳細は、組織の要件に基づいた見積もりのためにお問い合わせください。",
|
||||
"独自のLLMゲートウェイをお持ちの場合、使用トークンに対する課金はありません。詳細は、組織の要件に基づいた見積もりのためにお問い合わせください。",
|
||||
"enterprise.faq.q4": "OpenCode Enterpriseでデータは安全ですか?",
|
||||
"enterprise.faq.a4":
|
||||
"はい。OpenCodeはコードやコンテキストデータを保存しません。すべての処理はローカル、またはAIプロバイダーへの直接API呼び出しを通じて行われます。集中設定とSSO統合により、データは組織のインフラ内で安全に保たれます。",
|
||||
|
||||
@@ -70,12 +70,8 @@ export const dict = {
|
||||
"home.what.title": "OpenCode란 무엇인가요?",
|
||||
"home.what.body":
|
||||
"OpenCode는 터미널, IDE, 또는 데스크톱에서 코드를 작성할 수 있도록 도와주는 오픈 소스 에이전트입니다.",
|
||||
"home.what.lsp.title": "LSP 지원",
|
||||
"home.what.lsp.body": "LLM에 적합한 LSP를 자동으로 로드합니다",
|
||||
"home.what.multiSession.title": "멀티 세션",
|
||||
"home.what.multiSession.body": "동일한 프로젝트에서 여러 에이전트를 병렬로 실행하세요",
|
||||
"home.what.shareLinks.title": "링크 공유",
|
||||
"home.what.shareLinks.body": "참조나 디버깅을 위해 세션 링크를 공유하세요",
|
||||
"home.what.copilot.title": "GitHub Copilot",
|
||||
"home.what.copilot.body": "GitHub로 로그인하여 Copilot 계정을 사용하세요",
|
||||
"home.what.chatgptPlus.title": "ChatGPT Plus/Pro",
|
||||
@@ -113,8 +109,7 @@ export const dict = {
|
||||
"home.faq.a3.p4.beforeLocal": "또한",
|
||||
"home.faq.a3.p4.localLink": "로컬 모델",
|
||||
"home.faq.q4": "기존 AI 구독을 OpenCode에서 사용할 수 있나요?",
|
||||
"home.faq.a4.p1":
|
||||
"네, OpenCode는 모든 주요 제공자의 구독 플랜을 지원합니다. Claude Pro/Max, ChatGPT Plus/Pro, 또는 GitHub Copilot 구독을 사용할 수 있습니다.",
|
||||
"home.faq.a4.p1": "네, ChatGPT Plus/Pro 또는 GitHub Copilot 구독을 사용할 수 있습니다.",
|
||||
"home.faq.q5": "OpenCode는 터미널에서만 사용할 수 있나요?",
|
||||
"home.faq.a5.beforeDesktop": "이제 아닙니다! OpenCode는 이제",
|
||||
"home.faq.a5.desktop": "데스크톱",
|
||||
@@ -161,7 +156,7 @@ export const dict = {
|
||||
"zen.faq.a4.p3": "비용을 충당하기 위해 OpenCode는 $20 잔액 충전 시 $1.23의 소액 결제 처리 수수료만 추가합니다.",
|
||||
"zen.faq.q5": "데이터와 프라이버시는 어떤가요?",
|
||||
"zen.faq.a5.beforeExceptions":
|
||||
"모든 Zen 모델은 미국에서 호스팅됩니다. 제공자들은 데이터 보존 금지(zero-retention) 정책을 따르며, 모델 학습에 귀하의 데이터를 사용하지 않습니다. 단,",
|
||||
"모든 Zen 모델은 미국과 EU에서 호스팅됩니다. 제공자들은 데이터 보존 금지(zero-retention) 정책을 따르며, 모델 학습에 귀하의 데이터를 사용하지 않습니다. 단,",
|
||||
"zen.faq.a5.exceptionsLink": "다음 예외",
|
||||
"zen.faq.q6": "지출 한도를 설정할 수 있나요?",
|
||||
"zen.faq.a6": "네, 계정에서 월간 지출 한도를 설정할 수 있습니다.",
|
||||
@@ -194,10 +189,10 @@ export const dict = {
|
||||
"zen.how.step2.link": "요청당 지불",
|
||||
"zen.how.step2.afterLink": "(마크업 0)",
|
||||
"zen.how.step3.title": "자동 충전",
|
||||
"zen.how.step3.body": "잔액이 $5에 도달하면 자동으로 $20가 충전됩니다",
|
||||
"zen.how.step3.body": "선택적으로 자동 충전을 켜고 잔액 기준과 충전 금액을 설정하세요",
|
||||
"zen.privacy.title": "귀하의 프라이버시는 우리에게 중요합니다",
|
||||
"zen.privacy.beforeExceptions":
|
||||
"모든 Zen 모델은 미국에서 호스팅됩니다. 제공자들은 데이터 보존 금지 정책을 따르며 모델 학습에 데이터를 사용하지 않습니다. 단,",
|
||||
"모든 Zen 모델은 미국과 EU에서 호스팅됩니다. 제공자들은 데이터 보존 금지 정책을 따르며 모델 학습에 데이터를 사용하지 않습니다. 단,",
|
||||
"zen.privacy.exceptionsLink": "다음 예외",
|
||||
|
||||
"go.title": "OpenCode Go | 모두를 위한 저비용 코딩 모델",
|
||||
@@ -366,7 +361,7 @@ export const dict = {
|
||||
"팀과 함께 내부 트라이얼로 간단히 시작해보세요. OpenCode는 기본적으로 코드나 컨텍스트 데이터를 저장하지 않아 시작하기 쉽습니다. 그 후 가격 및 구현 옵션에 대해 문의해주세요.",
|
||||
"enterprise.faq.q3": "엔터프라이즈 가격은 어떻게 되나요?",
|
||||
"enterprise.faq.a3":
|
||||
"좌석(seat) 당 엔터프라이즈 가격을 제공합니다. 자체 LLM 게이트웨이를 보유한 경우, 사용된 토큰에 대해 비용을 청구하지 않습니다. 자세한 내용은 조직의 요구사항에 따른 맞춤 견적을 위해 문의해주세요.",
|
||||
"자체 LLM 게이트웨이를 보유한 경우, 사용된 토큰에 대해 비용을 청구하지 않습니다. 자세한 내용은 조직의 요구사항에 따른 맞춤 견적을 위해 문의해주세요.",
|
||||
"enterprise.faq.q4": "OpenCode 엔터프라이즈에서 데이터는 안전한가요?",
|
||||
"enterprise.faq.a4":
|
||||
"네. OpenCode는 코드나 컨텍스트 데이터를 저장하지 않습니다. 모든 처리는 로컬에서 이루어지거나 AI 제공자에 대한 직접 API 호출을 통해 이루어집니다. 중앙 설정 및 SSO 통합을 통해 데이터는 조직의 인프라 내에서 안전하게 유지됩니다.",
|
||||
|
||||
@@ -70,12 +70,8 @@ export const dict = {
|
||||
|
||||
"home.what.title": "Hva er OpenCode?",
|
||||
"home.what.body": "OpenCode er en åpen kildekode-agent som hjelper deg å skrive kode i terminal, IDE eller desktop.",
|
||||
"home.what.lsp.title": "LSP aktivert",
|
||||
"home.what.lsp.body": "Laster automatisk de riktige LSP-ene for LLM-en",
|
||||
"home.what.multiSession.title": "Multi-sesjon",
|
||||
"home.what.multiSession.body": "Start flere agenter parallelt på samme prosjekt",
|
||||
"home.what.shareLinks.title": "Del lenker",
|
||||
"home.what.shareLinks.body": "Del en lenke til en sesjon for referanse eller feilsøking",
|
||||
"home.what.copilot.title": "GitHub Copilot",
|
||||
"home.what.copilot.body": "Logg inn med GitHub for å bruke Copilot-kontoen din",
|
||||
"home.what.chatgptPlus.title": "ChatGPT Plus/Pro",
|
||||
@@ -115,8 +111,7 @@ export const dict = {
|
||||
"home.faq.a3.p4.beforeLocal": "Du kan til og med koble til dine",
|
||||
"home.faq.a3.p4.localLink": "lokale modeller",
|
||||
"home.faq.q4": "Kan jeg bruke mine eksisterende AI-abonnementer med OpenCode?",
|
||||
"home.faq.a4.p1":
|
||||
"Ja, OpenCode støtter abonnementer fra alle store leverandører. Du kan bruke Claude Pro/Max, ChatGPT Plus/Pro eller GitHub Copilot-abonnementer.",
|
||||
"home.faq.a4.p1": "Ja, du kan bruke ChatGPT Plus/Pro- eller GitHub Copilot-abonnementene dine.",
|
||||
"home.faq.q5": "Kan jeg bare bruke OpenCode i terminalen?",
|
||||
"home.faq.a5.beforeDesktop": "Ikke lenger! OpenCode er nå tilgjengelig som en app for",
|
||||
"home.faq.a5.desktop": "desktop",
|
||||
@@ -165,7 +160,7 @@ export const dict = {
|
||||
"For å dekke kostnader legger OpenCode til bare et lite betalingsbehandlingsgebyr på $1.23 per $20 saldo-påfyll.",
|
||||
"zen.faq.q5": "Hva med data og personvern?",
|
||||
"zen.faq.a5.beforeExceptions":
|
||||
"Alle Zen-modeller hostes i USA. Leverandører følger en policy om null oppbevaring og bruker ikke dataene dine til modelltrening, med de",
|
||||
"Alle Zen-modeller hostes i USA og EU. Leverandører følger en policy om null oppbevaring og bruker ikke dataene dine til modelltrening, med de",
|
||||
"zen.faq.a5.exceptionsLink": "følgende unntakene",
|
||||
"zen.faq.q6": "Kan jeg sette utgiftsgrenser?",
|
||||
"zen.faq.a6": "Ja, du kan sette månedlige utgiftsgrenser i kontoen din.",
|
||||
@@ -198,10 +193,10 @@ export const dict = {
|
||||
"zen.how.step2.link": "betal per forespørsel",
|
||||
"zen.how.step2.afterLink": "uten påslag",
|
||||
"zen.how.step3.title": "Auto-påfyll",
|
||||
"zen.how.step3.body": "når saldoen din når $5, fyller vi automatisk på $20",
|
||||
"zen.how.step3.body": "aktiver valgfri automatisk påfylling og velg saldogrense og påfyllingsbeløp",
|
||||
"zen.privacy.title": "Personvernet ditt er viktig for oss",
|
||||
"zen.privacy.beforeExceptions":
|
||||
"Alle Zen-modeller hostes i USA. Leverandører følger en policy om null oppbevaring og bruker ikke dataene dine til modelltrening, med",
|
||||
"Alle Zen-modeller hostes i USA og EU. Leverandører følger en policy om null oppbevaring og bruker ikke dataene dine til modelltrening, med",
|
||||
"zen.privacy.exceptionsLink": "følgende unntak",
|
||||
|
||||
"go.title": "OpenCode Go | Rimelige kodemodeller for alle",
|
||||
@@ -376,7 +371,7 @@ export const dict = {
|
||||
"Start enkelt med en intern prøveperiode med teamet ditt. OpenCode lagrer som standard ikke koden din eller kontekstdata, noe som gjør det enkelt å komme i gang. Kontakt oss deretter for å diskutere priser og implementeringsalternativer.",
|
||||
"enterprise.faq.q3": "Hvordan fungerer enterprise-prising?",
|
||||
"enterprise.faq.a3":
|
||||
"Vi tilbyr enterprise-prising per sete. Har du din egen LLM-gateway, tar vi ikke betalt for brukte tokens. Kontakt oss for flere detaljer og et tilpasset tilbud basert på organisasjonens behov.",
|
||||
"Har du din egen LLM-gateway, tar vi ikke betalt for brukte tokens. Kontakt oss for flere detaljer og et tilpasset tilbud basert på organisasjonens behov.",
|
||||
"enterprise.faq.q4": "Er dataene mine sikre med OpenCode Enterprise?",
|
||||
"enterprise.faq.a4":
|
||||
"Ja. OpenCode lagrer ikke koden din eller kontekstdata. All behandling skjer lokalt eller gjennom direkte API-kall til AI-leverandøren din. Med sentral konfigurasjon og SSO-integrasjon forblir dataene dine sikre innenfor organisasjonens infrastruktur.",
|
||||
|
||||
@@ -69,12 +69,8 @@ export const dict = {
|
||||
"home.what.title": "Czym jest OpenCode?",
|
||||
"home.what.body":
|
||||
"OpenCode to open source'owy agent, który pomaga pisać kod w terminalu, IDE lub aplikacji desktopowej.",
|
||||
"home.what.lsp.title": "LSP włączone",
|
||||
"home.what.lsp.body": "Automatycznie ładuje odpowiednie LSP dla LLM",
|
||||
"home.what.multiSession.title": "Wielosesyjność",
|
||||
"home.what.multiSession.body": "Uruchom wiele agentów równolegle w tym samym projekcie",
|
||||
"home.what.shareLinks.title": "Udostępnianie linków",
|
||||
"home.what.shareLinks.body": "Udostępnij link do dowolnej sesji w celach referencyjnych lub do debugowania",
|
||||
"home.what.copilot.title": "GitHub Copilot",
|
||||
"home.what.copilot.body": "Zaloguj się przez GitHub, aby używać swojego konta Copilot",
|
||||
"home.what.chatgptPlus.title": "ChatGPT Plus/Pro",
|
||||
@@ -114,8 +110,7 @@ export const dict = {
|
||||
"home.faq.a3.p4.beforeLocal": "Możesz nawet podłączyć swoje",
|
||||
"home.faq.a3.p4.localLink": "lokalne modele",
|
||||
"home.faq.q4": "Czy mogę używać moich istniejących subskrypcji AI z OpenCode?",
|
||||
"home.faq.a4.p1":
|
||||
"Tak, OpenCode obsługuje plany subskrypcyjne od wszystkich głównych dostawców. Możesz używać swoich subskrypcji Claude Pro/Max, ChatGPT Plus/Pro lub GitHub Copilot.",
|
||||
"home.faq.a4.p1": "Tak, możesz używać swoich subskrypcji ChatGPT Plus/Pro lub GitHub Copilot.",
|
||||
"home.faq.q5": "Czy mogę używać OpenCode tylko w terminalu?",
|
||||
"home.faq.a5.beforeDesktop": "Już nie! OpenCode jest teraz dostępny jako aplikacja na",
|
||||
"home.faq.a5.desktop": "pulpit (desktop)",
|
||||
@@ -165,7 +160,7 @@ export const dict = {
|
||||
"Aby pokryć koszty, OpenCode dolicza jedynie niewielką opłatę za przetwarzanie płatności w wysokości $1.23 przy każdym doładowaniu salda o $20.",
|
||||
"zen.faq.q5": "A co z danymi i prywatnością?",
|
||||
"zen.faq.a5.beforeExceptions":
|
||||
"Wszystkie modele Zen są hostowane w USA. Dostawcy stosują politykę zerowej retencji i nie używają Twoich danych do trenowania modeli, z",
|
||||
"Wszystkie modele Zen są hostowane w USA i UE. Dostawcy stosują politykę zerowej retencji i nie używają Twoich danych do trenowania modeli, z",
|
||||
"zen.faq.a5.exceptionsLink": "następującymi wyjątkami",
|
||||
"zen.faq.q6": "Czy mogę ustawić limity wydatków?",
|
||||
"zen.faq.a6": "Tak, możesz ustawić miesięczne limity wydatków na swoim koncie.",
|
||||
@@ -198,10 +193,10 @@ export const dict = {
|
||||
"zen.how.step2.link": "płać za żądanie",
|
||||
"zen.how.step2.afterLink": "bez marży",
|
||||
"zen.how.step3.title": "Automatyczne doładowanie",
|
||||
"zen.how.step3.body": "gdy Twoje saldo osiągnie 5$, automatycznie dodamy 20$",
|
||||
"zen.how.step3.body": "włącz opcjonalne automatyczne doładowanie i wybierz próg salda oraz kwotę doładowania",
|
||||
"zen.privacy.title": "Twoja prywatność jest dla nas ważna",
|
||||
"zen.privacy.beforeExceptions":
|
||||
"Wszystkie modele Zen są hostowane w USA. Dostawcy stosują politykę zerowej retencji i nie wykorzystują Twoich danych do trenowania modeli, z",
|
||||
"Wszystkie modele Zen są hostowane w USA i UE. Dostawcy stosują politykę zerowej retencji i nie wykorzystują Twoich danych do trenowania modeli, z",
|
||||
"zen.privacy.exceptionsLink": "następującymi wyjątkami",
|
||||
|
||||
"go.title": "OpenCode Go | Niskokosztowe modele do kodowania dla każdego",
|
||||
@@ -377,7 +372,7 @@ export const dict = {
|
||||
"Po prostu rozpocznij wewnętrzny okres próbny ze swoim zespołem. OpenCode domyślnie nie przechowuje Twojego kodu ani danych kontekstowych, co ułatwia start. Następnie skontaktuj się z nami, aby omówić opcje cenowe i wdrożeniowe.",
|
||||
"enterprise.faq.q3": "Jak działa cennik enterprise?",
|
||||
"enterprise.faq.a3":
|
||||
"Oferujemy cennik enterprise za stanowisko (per-seat). Jeśli masz własną bramę LLM, nie pobieramy opłat za wykorzystane tokeny. Aby uzyskać więcej szczegółów, skontaktuj się z nami w celu uzyskania wyceny dostosowanej do potrzeb Twojej organizacji.",
|
||||
"Jeśli masz własną bramę LLM, nie pobieramy opłat za wykorzystane tokeny. Aby uzyskać więcej szczegółów, skontaktuj się z nami w celu uzyskania wyceny dostosowanej do potrzeb Twojej organizacji.",
|
||||
"enterprise.faq.q4": "Czy moje dane są bezpieczne z OpenCode Enterprise?",
|
||||
"enterprise.faq.a4":
|
||||
"Tak. OpenCode nie przechowuje Twojego kodu ani danych kontekstowych. Całe przetwarzanie odbywa się lokalnie lub poprzez bezpośrednie wywołania API do Twojego dostawcy AI. Dzięki centralnej konfiguracji i integracji SSO, Twoje dane pozostają bezpieczne w infrastrukturze Twojej organizacji.",
|
||||
|
||||
@@ -70,12 +70,8 @@ export const dict = {
|
||||
"home.what.title": "Что такое OpenCode?",
|
||||
"home.what.body":
|
||||
"OpenCode — это агент с открытым исходным кодом, который помогает писать код в терминале, IDE или на десктопе.",
|
||||
"home.what.lsp.title": "Поддержка LSP",
|
||||
"home.what.lsp.body": "Автоматически загружает нужные LSP для LLM",
|
||||
"home.what.multiSession.title": "Мульти-сессии",
|
||||
"home.what.multiSession.body": "Запускайте несколько агентов параллельно в одном проекте",
|
||||
"home.what.shareLinks.title": "Общие ссылки",
|
||||
"home.what.shareLinks.body": "Делитесь ссылкой на любую сессию для справки или отладки",
|
||||
"home.what.copilot.title": "GitHub Copilot",
|
||||
"home.what.copilot.body": "Войдите через GitHub, чтобы использовать ваш аккаунт Copilot",
|
||||
"home.what.chatgptPlus.title": "ChatGPT Plus/Pro",
|
||||
@@ -116,8 +112,7 @@ export const dict = {
|
||||
"home.faq.a3.p4.beforeLocal": "Вы даже можете подключить ваши",
|
||||
"home.faq.a3.p4.localLink": "локальные модели",
|
||||
"home.faq.q4": "Могу ли я использовать мои существующие AI-подписки с OpenCode?",
|
||||
"home.faq.a4.p1":
|
||||
"Да, OpenCode поддерживает подписки всех основных провайдеров. Вы можете использовать ваши подписки Claude Pro/Max, ChatGPT Plus/Pro или GitHub Copilot.",
|
||||
"home.faq.a4.p1": "Да, вы можете использовать ваши подписки ChatGPT Plus/Pro или GitHub Copilot.",
|
||||
"home.faq.q5": "Можно ли использовать OpenCode только в терминале?",
|
||||
"home.faq.a5.beforeDesktop": "Больше нет! OpenCode теперь доступен как приложение для",
|
||||
"home.faq.a5.desktop": "десктопа",
|
||||
@@ -168,7 +163,7 @@ export const dict = {
|
||||
"Для покрытия расходов OpenCode добавляет лишь небольшую комиссию за обработку платежа в размере $1.23 при пополнении баланса на $20.",
|
||||
"zen.faq.q5": "Как насчет данных и приватности?",
|
||||
"zen.faq.a5.beforeExceptions":
|
||||
"Все модели Zen размещены в США. Провайдеры следуют политике нулевого хранения и не используют ваши данные для обучения моделей, за",
|
||||
"Все модели Zen размещены в США и ЕС. Провайдеры следуют политике нулевого хранения и не используют ваши данные для обучения моделей, за",
|
||||
"zen.faq.a5.exceptionsLink": "следующими исключениями",
|
||||
"zen.faq.q6": "Могу ли я установить лимиты расходов?",
|
||||
"zen.faq.a6": "Да, вы можете установить ежемесячные лимиты расходов в своем аккаунте.",
|
||||
@@ -201,10 +196,10 @@ export const dict = {
|
||||
"zen.how.step2.link": "оплата за запрос",
|
||||
"zen.how.step2.afterLink": "с нулевой наценкой",
|
||||
"zen.how.step3.title": "Автопополнение",
|
||||
"zen.how.step3.body": "когда ваш баланс достигнет $5, мы автоматически добавим $20",
|
||||
"zen.how.step3.body": "при желании включите автопополнение и выберите порог баланса и сумму пополнения",
|
||||
"zen.privacy.title": "Ваша приватность важна для нас",
|
||||
"zen.privacy.beforeExceptions":
|
||||
"Все модели Zen размещены в США. Провайдеры следуют политике нулевого хранения и не используют ваши данные для обучения моделей, за",
|
||||
"Все модели Zen размещены в США и ЕС. Провайдеры следуют политике нулевого хранения и не используют ваши данные для обучения моделей, за",
|
||||
"zen.privacy.exceptionsLink": "следующими исключениями",
|
||||
|
||||
"go.title": "OpenCode Go | Недорогие модели для кодинга для всех",
|
||||
@@ -380,7 +375,7 @@ export const dict = {
|
||||
"Просто начните с внутреннего триала с вашей командой. OpenCode по умолчанию не хранит ваш код или контекстные данные, поэтому начать легко. Затем свяжитесь с нами, чтобы обсудить цены и варианты внедрения.",
|
||||
"enterprise.faq.q3": "Как работает корпоративное ценообразование?",
|
||||
"enterprise.faq.a3":
|
||||
"Мы предлагаем модель ценообразования за рабочее место (per-seat). Если у вас есть собственный LLM-шлюз, мы не взимаем плату за использованные токены. Для получения подробной информации свяжитесь с нами для индивидуального расчета на основе потребностей вашей организации.",
|
||||
"Если у вас есть собственный LLM-шлюз, мы не взимаем плату за использованные токены. Для получения подробной информации свяжитесь с нами для индивидуального расчета на основе потребностей вашей организации.",
|
||||
"enterprise.faq.q4": "Безопасны ли мои данные с OpenCode Enterprise?",
|
||||
"enterprise.faq.a4":
|
||||
"Да. OpenCode не хранит ваш код или контекстные данные. Вся обработка происходит локально или через прямые вызовы API к вашему AI-провайдеру. Благодаря централизованной конфигурации и интеграции SSO ваши данные остаются защищенными внутри инфраструктуры вашей организации.",
|
||||
|
||||
@@ -68,12 +68,8 @@ export const dict = {
|
||||
|
||||
"home.what.title": "OpenCode คืออะไร?",
|
||||
"home.what.body": "OpenCode คือเอเจนต์โอเพนซอร์สที่ช่วยคุณเขียนโค้ดในเทอร์มินัล, IDE หรือเดสก์ท็อป",
|
||||
"home.what.lsp.title": "รองรับ LSP",
|
||||
"home.what.lsp.body": "โหลด LSP ที่เหมาะสมสำหรับ LLM โดยอัตโนมัติ",
|
||||
"home.what.multiSession.title": "หลายเซสชัน",
|
||||
"home.what.multiSession.body": "เริ่มเอเจนต์หลายตัวทำงานคู่ขนานกันในโปรเจกต์เดียวกัน",
|
||||
"home.what.shareLinks.title": "แชร์ลิงก์",
|
||||
"home.what.shareLinks.body": "แชร์ลิงก์ไปยังเซสชันใดก็ได้เพื่อการอ้างอิงหรือ Debug",
|
||||
"home.what.copilot.title": "GitHub Copilot",
|
||||
"home.what.copilot.body": "เข้าสู่ระบบด้วย GitHub เพื่อใช้บัญชี Copilot ของคุณ",
|
||||
"home.what.chatgptPlus.title": "ChatGPT Plus/Pro",
|
||||
@@ -112,8 +108,7 @@ export const dict = {
|
||||
"home.faq.a3.p4.beforeLocal": "คุณยังสามารถเชื่อมต่อกับ",
|
||||
"home.faq.a3.p4.localLink": "โมเดล Local ของคุณ",
|
||||
"home.faq.q4": "ฉันสามารถใช้การสมัครสมาชิก AI ที่มีอยู่กับ OpenCode ได้หรือไม่?",
|
||||
"home.faq.a4.p1":
|
||||
"ได้ OpenCode รองรับแผนการสมัครสมาชิกจากผู้ให้บริการหลักทั้งหมด คุณสามารถใช้การสมัครสมาชิก Claude Pro/Max, ChatGPT Plus/Pro หรือ GitHub Copilot ของคุณได้",
|
||||
"home.faq.a4.p1": "ได้ คุณสามารถใช้การสมัครสมาชิก ChatGPT Plus/Pro หรือ GitHub Copilot ของคุณได้",
|
||||
"home.faq.q5": "ฉันใช้ OpenCode ได้เฉพาะในเทอร์มินัลใช่หรือไม่?",
|
||||
"home.faq.a5.beforeDesktop": "ไม่อีกต่อไป! OpenCode มีแอปสำหรับ",
|
||||
"home.faq.a5.desktop": "เดสก์ท็อป",
|
||||
@@ -163,7 +158,7 @@ export const dict = {
|
||||
"เพื่อครอบคลุมต้นทุน OpenCode คิดค่าธรรมเนียมการประมวลผลการชำระเงินเพียงเล็กน้อย $1.23 ต่อการเติมเงิน $20",
|
||||
"zen.faq.q5": "แล้วเรื่องข้อมูลและความเป็นส่วนตัวล่ะ?",
|
||||
"zen.faq.a5.beforeExceptions":
|
||||
"โมเดล Zen ทั้งหมดโฮสต์ในสหรัฐอเมริกา ผู้ให้บริการปฏิบัติตามนโยบายไม่เก็บรักษาข้อมูล (zero-retention policy) และไม่ใช้ข้อมูลของคุณสำหรับการฝึกโมเดล โดยมี",
|
||||
"โมเดล Zen ทั้งหมดโฮสต์ในสหรัฐอเมริกาและสหภาพยุโรป ผู้ให้บริการปฏิบัติตามนโยบายไม่เก็บรักษาข้อมูล (zero-retention policy) และไม่ใช้ข้อมูลของคุณสำหรับการฝึกโมเดล โดยมี",
|
||||
"zen.faq.a5.exceptionsLink": "ข้อยกเว้นดังนี้",
|
||||
"zen.faq.q6": "ฉันสามารถตั้งวงเงินการใช้จ่ายได้หรือไม่?",
|
||||
"zen.faq.a6": "ได้ คุณสามารถตั้งวงเงินการใช้จ่ายรายเดือนได้ในบัญชีของคุณ",
|
||||
@@ -196,10 +191,10 @@ export const dict = {
|
||||
"zen.how.step2.link": "จ่ายตามคำขอ (pay per request)",
|
||||
"zen.how.step2.afterLink": "โดยไม่มีการบวกเพิ่ม",
|
||||
"zen.how.step3.title": "เติมเงินอัตโนมัติ",
|
||||
"zen.how.step3.body": "เมื่อยอดเงินของคุณเหลือ $5 เราจะเติมเงิน $20 ให้โดยอัตโนมัติ",
|
||||
"zen.how.step3.body": "เลือกเปิดการเติมเงินอัตโนมัติ แล้วกำหนดเกณฑ์ยอดเงินและจำนวนเงินที่จะเติม",
|
||||
"zen.privacy.title": "ความเป็นส่วนตัวของคุณสำคัญสำหรับเรา",
|
||||
"zen.privacy.beforeExceptions":
|
||||
"โมเดล Zen ทั้งหมดโฮสต์ในสหรัฐอเมริกา ผู้ให้บริการปฏิบัติตามนโยบายไม่เก็บรักษาข้อมูล (zero-retention policy) และไม่ใช้ข้อมูลของคุณสำหรับการฝึกโมเดล โดยมี",
|
||||
"โมเดล Zen ทั้งหมดโฮสต์ในสหรัฐอเมริกาและสหภาพยุโรป ผู้ให้บริการปฏิบัติตามนโยบายไม่เก็บรักษาข้อมูล (zero-retention policy) และไม่ใช้ข้อมูลของคุณสำหรับการฝึกโมเดล โดยมี",
|
||||
"zen.privacy.exceptionsLink": "ข้อยกเว้นดังนี้",
|
||||
|
||||
"go.title": "OpenCode Go | โมเดลเขียนโค้ดราคาประหยัดสำหรับทุกคน",
|
||||
@@ -372,7 +367,7 @@ export const dict = {
|
||||
"เพียงเริ่มจากการทดลองใช้งานภายในกับทีมของคุณ โดยค่าเริ่มต้น OpenCode ไม่จัดเก็บโค้ดหรือข้อมูลบริบทของคุณ ทำให้เริ่มต้นได้ง่าย จากนั้นติดต่อเราเพื่อพูดคุยเรื่องราคาและตัวเลือกการติดตั้งใช้งาน",
|
||||
"enterprise.faq.q3": "ราคาสำหรับองค์กรคิดอย่างไร?",
|
||||
"enterprise.faq.a3":
|
||||
"เราเสนอราคาแบบต่อที่นั่ง (per-seat) หากคุณมี LLM gateway ของคุณเอง เราจะไม่คิดค่าบริการตามโทเค็นที่ใช้ สำหรับรายละเอียดเพิ่มเติม โปรดติดต่อเราเพื่อขอใบเสนอราคาตามความต้องการขององค์กรของคุณ",
|
||||
"หากคุณมี LLM gateway ของคุณเอง เราจะไม่คิดค่าบริการตามโทเค็นที่ใช้ สำหรับรายละเอียดเพิ่มเติม โปรดติดต่อเราเพื่อขอใบเสนอราคาตามความต้องการขององค์กรของคุณ",
|
||||
"enterprise.faq.q4": "ข้อมูลของฉันปลอดภัยกับ OpenCode Enterprise หรือไม่?",
|
||||
"enterprise.faq.a4":
|
||||
"ใช่ OpenCode ไม่จัดเก็บโค้ดหรือข้อมูลบริบทของคุณ การประมวลผลทั้งหมดเกิดขึ้นในเครื่องหรือผ่านการเรียก API โดยตรงไปยังผู้ให้บริการ AI ของคุณ ด้วยการตั้งค่าแบบศูนย์กลางและการผสานรวม SSO ข้อมูลของคุณจะยังคงปลอดภัยอยู่ภายในโครงสร้างพื้นฐานขององค์กร",
|
||||
|
||||
@@ -70,12 +70,8 @@ export const dict = {
|
||||
"home.what.title": "OpenCode nedir?",
|
||||
"home.what.body":
|
||||
"OpenCode, terminalinizde, IDE'nizde veya masaüstünde kod yazmanıza yardım eden açık kaynaklı bir ajandır.",
|
||||
"home.what.lsp.title": "LSP etkin",
|
||||
"home.what.lsp.body": "LLM için doğru LSP'leri otomatik olarak yükler",
|
||||
"home.what.multiSession.title": "Çoklu oturum",
|
||||
"home.what.multiSession.body": "Aynı projede birden fazla ajanı paralel çalıştırın",
|
||||
"home.what.shareLinks.title": "Paylaşım bağlantıları",
|
||||
"home.what.shareLinks.body": "Referans veya hata ayıklama için herhangi bir oturumu bağlantı olarak paylaşın",
|
||||
"home.what.copilot.title": "GitHub Copilot",
|
||||
"home.what.copilot.body": "Copilot hesabınızı kullanmak için GitHub ile giriş yapın",
|
||||
"home.what.chatgptPlus.title": "ChatGPT Plus/Pro",
|
||||
@@ -113,8 +109,7 @@ export const dict = {
|
||||
"home.faq.a3.p4.beforeLocal": "Hatta",
|
||||
"home.faq.a3.p4.localLink": "yerel modellerinizi bağlayabilirsiniz",
|
||||
"home.faq.q4": "Mevcut AI aboneliklerimi OpenCode ile kullanabilir miyim?",
|
||||
"home.faq.a4.p1":
|
||||
"Evet. OpenCode tüm büyük sağlayıcıların aboneliklerini destekler. Claude Pro/Max, ChatGPT Plus/Pro veya GitHub Copilot kullanabilirsiniz.",
|
||||
"home.faq.a4.p1": "Evet, ChatGPT Plus/Pro veya GitHub Copilot aboneliklerinizi kullanabilirsiniz.",
|
||||
"home.faq.q5": "OpenCode'u sadece terminalde mi kullanabilirim?",
|
||||
"home.faq.a5.beforeDesktop": "Artık hayır! OpenCode artık sizin bu cihazlarınıza",
|
||||
"home.faq.a5.desktop": "masaüstü",
|
||||
@@ -164,7 +159,7 @@ export const dict = {
|
||||
"Maliyetleri karşılamak için OpenCode, $20 bakiye yüklemesi başına yalnızca $1.23 tutarında küçük bir ödeme işleme ücreti ekler.",
|
||||
"zen.faq.q5": "Veri ve gizlilik ne olacak?",
|
||||
"zen.faq.a5.beforeExceptions":
|
||||
"Tüm Zen modelleri ABD'de barındırılır. Sağlayıcılar sıfır-retention politikasını uygular ve verilerinizi model eğitimi için kullanmaz; şu",
|
||||
"Tüm Zen modelleri ABD'de ve AB'de barındırılır. Sağlayıcılar sıfır-retention politikasını uygular ve verilerinizi model eğitimi için kullanmaz; şu",
|
||||
"zen.faq.a5.exceptionsLink": "istisnalarla",
|
||||
"zen.faq.q6": "Harcama limitleri ayarlayabilir miyim?",
|
||||
"zen.faq.a6": "Evet, hesabınızda aylık harcama limitleri ayarlayabilirsiniz.",
|
||||
@@ -199,10 +194,10 @@ export const dict = {
|
||||
"zen.how.step2.link": "istek başına ödeme",
|
||||
"zen.how.step2.afterLink": "sıfır işaretlemeyle",
|
||||
"zen.how.step3.title": "Otomatik yükleme",
|
||||
"zen.how.step3.body": "bakiyeniz 5$'a ulaştığında otomatik olarak 20$ ekleyeceğiz",
|
||||
"zen.how.step3.body": "isteğe bağlı otomatik yüklemeyi etkinleştirin, bakiye eşiğini ve yükleme tutarını seçin",
|
||||
"zen.privacy.title": "Gizliliğiniz bizim için önemlidir",
|
||||
"zen.privacy.beforeExceptions":
|
||||
"Tüm Zen modelleri ABD'de barındırılmaktadır. Sağlayıcılar sıfır saklama politikası izler ve verilerinizi model eğitimi için kullanmaz; şu",
|
||||
"Tüm Zen modelleri ABD'de ve AB'de barındırılmaktadır. Sağlayıcılar sıfır saklama politikası izler ve verilerinizi model eğitimi için kullanmaz; şu",
|
||||
"zen.privacy.exceptionsLink": "aşağıdaki istisnalar",
|
||||
|
||||
"go.title": "OpenCode Go | Herkes için düşük maliyetli kodlama modelleri",
|
||||
@@ -379,7 +374,7 @@ export const dict = {
|
||||
"Ekibinizle dahili bir deneme ile başlayın. OpenCode varsayılan olarak kodunuzu veya bağlam verilerinizi saklamaz, bu da başlamayı kolaylaştırır. Ardından fiyatlandırma ve uygulama seçeneklerini görüşmek için bize ulaşın.",
|
||||
"enterprise.faq.q3": "Kurumsal fiyatlandırma nasıl çalışır?",
|
||||
"enterprise.faq.a3":
|
||||
"Kullanıcı başı (per-seat) kurumsal fiyatlandırma sunuyoruz. Kendi LLM geçidiniz varsa, kullanılan tokenlar için ücret almıyoruz. Daha fazla bilgi için, kurumunuzun ihtiyaçlarına göre özel bir teklif için bize ulaşın.",
|
||||
"Kendi LLM geçidiniz varsa, kullanılan tokenlar için ücret almıyoruz. Daha fazla bilgi için, kurumunuzun ihtiyaçlarına göre özel bir teklif için bize ulaşın.",
|
||||
"enterprise.faq.q4": "OpenCode Enterprise ile verilerim güvende mi?",
|
||||
"enterprise.faq.a4":
|
||||
"Evet. OpenCode kodunuzu veya bağlam verilerinizi saklamaz. Tüm işleme yerel olarak ya da AI sağlayıcınıza doğrudan API çağrıları ile gerçekleştirilir. Merkezileştirilmiş konfigürasyon ve SSO entegrasyonu ile verileriniz kurumunuzun altyapısı içinde güvende kalır.",
|
||||
|
||||
@@ -68,12 +68,8 @@ export const dict = {
|
||||
|
||||
"home.what.title": "Що таке OpenCode?",
|
||||
"home.what.body": "OpenCode — це відкритий агент, який допомагає писати код у терміналі, IDE або на десктопі.",
|
||||
"home.what.lsp.title": "LSP увімкнено",
|
||||
"home.what.lsp.body": "Автоматично завантажує потрібні LSP для LLM",
|
||||
"home.what.multiSession.title": "Багатосесійність",
|
||||
"home.what.multiSession.body": "Запускайте кількох агентів паралельно в одному проекті",
|
||||
"home.what.shareLinks.title": "Посилання для обміну",
|
||||
"home.what.shareLinks.body": "Діліться посиланням на будь-яку сесію для обговорення або налагодження",
|
||||
"home.what.copilot.title": "GitHub Copilot",
|
||||
"home.what.copilot.body": "Увійдіть через GitHub, щоб використовувати свій обліковий запис Copilot",
|
||||
"home.what.chatgptPlus.title": "ChatGPT Plus/Pro",
|
||||
@@ -114,8 +110,7 @@ export const dict = {
|
||||
"home.faq.a3.p4.beforeLocal": "Ви навіть можете підключити свої",
|
||||
"home.faq.a3.p4.localLink": "локальні моделі",
|
||||
"home.faq.q4": "Чи можу я використовувати свої наявні AI-підписки з OpenCode?",
|
||||
"home.faq.a4.p1":
|
||||
"Так, OpenCode підтримує підписки всіх основних провайдерів. Ви можете використовувати Claude Pro/Max, ChatGPT Plus/Pro або GitHub Copilot.",
|
||||
"home.faq.a4.p1": "Так, ви можете використовувати підписки ChatGPT Plus/Pro або GitHub Copilot.",
|
||||
"home.faq.q5": "Чи можна використовувати OpenCode лише в терміналі?",
|
||||
"home.faq.a5.beforeDesktop": "Вже ні! OpenCode тепер доступний як застосунок для",
|
||||
"home.faq.a5.desktop": "десктопа",
|
||||
@@ -163,7 +158,7 @@ export const dict = {
|
||||
"Щоб покрити витрати, OpenCode додає лише невелику комісію за обробку платежу в розмірі $1.23 за кожне поповнення балансу $20.",
|
||||
"zen.faq.q5": "А як щодо даних та конфіденційності?",
|
||||
"zen.faq.a5.beforeExceptions":
|
||||
"Усі моделі Zen розміщені в США. Провайдери дотримуються політики нульового зберігання та не використовують ваші дані для навчання моделей, за",
|
||||
"Усі моделі Zen розміщені в США та ЄС. Провайдери дотримуються політики нульового зберігання та не використовують ваші дані для навчання моделей, за",
|
||||
"zen.faq.a5.exceptionsLink": "такими винятками",
|
||||
"zen.faq.q6": "Чи можна встановити ліміти витрат?",
|
||||
"zen.faq.a6": "Так, ви можете встановити місячні ліміти витрат в обліковому записі.",
|
||||
@@ -197,10 +192,10 @@ export const dict = {
|
||||
"zen.how.step2.link": "платіть за запит",
|
||||
"zen.how.step2.afterLink": "без націнок",
|
||||
"zen.how.step3.title": "Автоматичне поповнення",
|
||||
"zen.how.step3.body": "коли баланс досягає $5, ми автоматично додаємо $20",
|
||||
"zen.how.step3.body": "за бажанням увімкніть автопоповнення та виберіть поріг балансу й суму поповнення",
|
||||
"zen.privacy.title": "Ваша конфіденційність важлива для нас",
|
||||
"zen.privacy.beforeExceptions":
|
||||
"Усі моделі Zen розміщені в США. Провайдери дотримуються політики нульового зберігання та не використовують ваші дані для навчання моделей, за",
|
||||
"Усі моделі Zen розміщені в США та ЄС. Провайдери дотримуються політики нульового зберігання та не використовують ваші дані для навчання моделей, за",
|
||||
"zen.privacy.exceptionsLink": "такими винятками",
|
||||
|
||||
"go.title": "OpenCode Go | Недорогі моделі кодування для всіх",
|
||||
@@ -375,7 +370,7 @@ export const dict = {
|
||||
"Почніть із внутрішнього тестування з командою. OpenCode за замовчуванням не зберігає код. Потім зв'яжіться з нами для обговорення цін.",
|
||||
"enterprise.faq.q3": "Як працює ціноутворення enterprise?",
|
||||
"enterprise.faq.a3":
|
||||
"Ми пропонуємо ціну за робоче місце. Якщо у вас власний LLM-шлюз, ми не стягуємо плату за токени.",
|
||||
"Якщо у вас власний LLM-шлюз, ми не стягуємо плату за токени. Зв'яжіться з нами, щоб отримати індивідуальну пропозицію для вашої організації.",
|
||||
"enterprise.faq.q4": "Чи безпечні мої дані з OpenCode Enterprise?",
|
||||
"enterprise.faq.a4":
|
||||
"Так. OpenCode не зберігає ваш код або контекст. Вся обробка відбувається локально або через прямі API-виклики.",
|
||||
|
||||
@@ -69,12 +69,8 @@ export const dict = {
|
||||
|
||||
"home.what.title": "什么是 OpenCode?",
|
||||
"home.what.body": "OpenCode 是一个开源代理,帮助您在终端、IDE 或桌面端编写代码。",
|
||||
"home.what.lsp.title": "支持 LSP",
|
||||
"home.what.lsp.body": "为 LLM 自动加载合适的 LSP",
|
||||
"home.what.multiSession.title": "多会话",
|
||||
"home.what.multiSession.body": "在同一个项目中并行启动多个代理",
|
||||
"home.what.shareLinks.title": "分享链接",
|
||||
"home.what.shareLinks.body": "分享任意会话链接以供参考或调试",
|
||||
"home.what.copilot.title": "GitHub Copilot",
|
||||
"home.what.copilot.body": "使用 GitHub 登录以使用您的 Copilot 账户",
|
||||
"home.what.chatgptPlus.title": "ChatGPT Plus/Pro",
|
||||
@@ -110,8 +106,7 @@ export const dict = {
|
||||
"home.faq.a3.p4.beforeLocal": "您甚至可以连接您的",
|
||||
"home.faq.a3.p4.localLink": "本地模型",
|
||||
"home.faq.q4": "我可以使用现有的 AI 订阅吗?",
|
||||
"home.faq.a4.p1":
|
||||
"可以,OpenCode 支持所有主流提供商的订阅计划。您可以使用您的 Claude Pro/Max, ChatGPT Plus/Pro, 或 GitHub Copilot 订阅。",
|
||||
"home.faq.a4.p1": "可以,您可以使用您的 ChatGPT Plus/Pro 或 GitHub Copilot 订阅。",
|
||||
"home.faq.q5": "OpenCode 只能在终端使用吗?",
|
||||
"home.faq.a5.beforeDesktop": "不再是了!OpenCode 现在也提供",
|
||||
"home.faq.a5.desktop": "桌面端应用",
|
||||
@@ -156,7 +151,7 @@ export const dict = {
|
||||
"zen.faq.a4.p2.accountLink": "账户中设置每月支出限额",
|
||||
"zen.faq.a4.p3": "为覆盖成本,OpenCode 仅收取少量支付处理费,每充值 $20 收取 $1.23。",
|
||||
"zen.faq.q5": "数据和隐私如何?",
|
||||
"zen.faq.a5.beforeExceptions": "所有 Zen 模型均托管在美国。提供商遵循零留存政策,不使用您的数据进行模型训练,",
|
||||
"zen.faq.a5.beforeExceptions": "所有 Zen 模型均托管在美国和欧盟。提供商遵循零留存政策,不使用您的数据进行模型训练,",
|
||||
"zen.faq.a5.exceptionsLink": "以下例外情况除外",
|
||||
"zen.faq.q6": "我可以设置支出限额吗?",
|
||||
"zen.faq.a6": "可以,您可以在账户中设置每月支出限额。",
|
||||
@@ -188,9 +183,9 @@ export const dict = {
|
||||
"zen.how.step2.link": "按请求付费",
|
||||
"zen.how.step2.afterLink": "零加价",
|
||||
"zen.how.step3.title": "自动充值",
|
||||
"zen.how.step3.body": "当您的余额低于 $5 时,我们将自动充值 $20",
|
||||
"zen.how.step3.body": "按需开启自动充值,并设置余额阈值和充值金额",
|
||||
"zen.privacy.title": "您的隐私对我们很重要",
|
||||
"zen.privacy.beforeExceptions": "所有 Zen 模型均托管在美国。提供商遵循零留存政策,不使用您的数据进行模型训练,",
|
||||
"zen.privacy.beforeExceptions": "所有 Zen 模型均托管在美国和欧盟。提供商遵循零留存政策,不使用您的数据进行模型训练,",
|
||||
"zen.privacy.exceptionsLink": "以下例外情况除外",
|
||||
|
||||
"go.title": "OpenCode Go | 人人可用的低成本编程模型",
|
||||
@@ -357,7 +352,7 @@ export const dict = {
|
||||
"只需从您的团队内部试用开始即可。OpenCode 默认不存储您的代码或上下文数据,使得入门非常容易。然后联系我们讨论定价和实施选项。",
|
||||
"enterprise.faq.q3": "企业版定价如何运作?",
|
||||
"enterprise.faq.a3":
|
||||
"我们提供按席位计费的企业定价。如果您拥有自己的 LLM 网关,我们不收取 token 使用费。如需了解更多详情,请联系我们获取基于您组织需求的定制报价。",
|
||||
"如果您拥有自己的 LLM 网关,我们不收取 token 使用费。如需了解更多详情,请联系我们获取基于您组织需求的定制报价。",
|
||||
"enterprise.faq.q4": "OpenCode 企业版安全吗?",
|
||||
"enterprise.faq.a4":
|
||||
"是的。OpenCode 不存储您的代码或上下文数据。所有处理均在本地进行,或通过直接 API 调用您的 AI 提供商。通过集中配置和 SSO 集成,您的数据始终保留在您组织的基础设施内。",
|
||||
|
||||
@@ -69,12 +69,8 @@ export const dict = {
|
||||
|
||||
"home.what.title": "什麼是 OpenCode?",
|
||||
"home.what.body": "OpenCode 是一個開源代理,幫助你在終端、IDE 或桌面端編寫程式碼。",
|
||||
"home.what.lsp.title": "支援 LSP",
|
||||
"home.what.lsp.body": "為 LLM 自動載入合適的 LSP",
|
||||
"home.what.multiSession.title": "多工作階段",
|
||||
"home.what.multiSession.body": "在同一專案中平行啟動多個代理",
|
||||
"home.what.shareLinks.title": "分享連結",
|
||||
"home.what.shareLinks.body": "將任意階段的連結分享給他人供參考或除錯",
|
||||
"home.what.copilot.title": "GitHub Copilot",
|
||||
"home.what.copilot.body": "使用 GitHub 登入以使用你的 Copilot 帳號",
|
||||
"home.what.chatgptPlus.title": "ChatGPT Plus/Pro",
|
||||
@@ -111,8 +107,7 @@ export const dict = {
|
||||
"home.faq.a3.p4.beforeLocal": "你還可以連接你的",
|
||||
"home.faq.a3.p4.localLink": "本地模型",
|
||||
"home.faq.q4": "可以使用我現有的 AI 訂閱嗎?",
|
||||
"home.faq.a4.p1":
|
||||
"可以。OpenCode 支援主流供應商的訂閱方案,包括 Claude Pro/Max、ChatGPT Plus/Pro 與 GitHub Copilot。",
|
||||
"home.faq.a4.p1": "可以,你可以使用 ChatGPT Plus/Pro 或 GitHub Copilot 訂閱。",
|
||||
"home.faq.q5": "OpenCode 只能在終端中使用嗎?",
|
||||
"home.faq.a5.beforeDesktop": "不再是了!OpenCode 現在也提供",
|
||||
"home.faq.a5.desktop": "桌面端",
|
||||
@@ -155,7 +150,8 @@ export const dict = {
|
||||
"zen.faq.a4.p2.accountLink": "帳戶中設定每月支出上限",
|
||||
"zen.faq.a4.p3": "為了覆蓋成本,OpenCode 只會收取很小的支付處理費:每次儲值 $20 會額外收取 $1.23。",
|
||||
"zen.faq.q5": "資料與隱私如何?",
|
||||
"zen.faq.a5.beforeExceptions": "所有 Zen 模型都託管在美國。供應商遵循零留存政策,不會將你的資料用於模型訓練,但有",
|
||||
"zen.faq.a5.beforeExceptions":
|
||||
"所有 Zen 模型都託管在美國和歐盟。供應商遵循零留存政策,不會將你的資料用於模型訓練,但有",
|
||||
"zen.faq.a5.exceptionsLink": "以下例外",
|
||||
"zen.faq.q6": "我可以設定支出上限嗎?",
|
||||
"zen.faq.a6": "可以,你可以在帳戶中設定每月支出上限。",
|
||||
@@ -187,9 +183,10 @@ export const dict = {
|
||||
"zen.how.step2.link": "按請求付費",
|
||||
"zen.how.step2.afterLink": "零加價",
|
||||
"zen.how.step3.title": "自動儲值",
|
||||
"zen.how.step3.body": "當你的餘額達到 $5 時,我們會自動儲值 $20",
|
||||
"zen.how.step3.body": "視需要啟用自動儲值,並設定餘額門檻和儲值金額",
|
||||
"zen.privacy.title": "你的隱私對我們很重要",
|
||||
"zen.privacy.beforeExceptions": "所有 Zen 模型均在美國託管。供應商遵循零留存政策,不會將你的資料用於模型訓練,並且有",
|
||||
"zen.privacy.beforeExceptions":
|
||||
"所有 Zen 模型均在美國和歐盟託管。供應商遵循零留存政策,不會將你的資料用於模型訓練,並且有",
|
||||
"zen.privacy.exceptionsLink": "以下例外情況",
|
||||
|
||||
"go.title": "OpenCode Go | 低成本全民編碼模型",
|
||||
@@ -355,7 +352,7 @@ export const dict = {
|
||||
"只要先以團隊的內部試用開始。OpenCode 預設不會儲存你的程式碼或上下文資料,所以上手非常容易。之後聯絡我們,討論定價與完整實作方案。",
|
||||
"enterprise.faq.q3": "企業定價是如何進行的?",
|
||||
"enterprise.faq.a3":
|
||||
"我們提供按席位的企業定價。如果你有自己的 LLM 閘道器,我們不會對使用的 token 另外收費。更多詳情,請聯絡我們以獲得依據組織需求的客製報價。",
|
||||
"如果你有自己的 LLM 閘道器,我們不會對使用的 token 另外收費。更多詳情,請聯絡我們以獲得依據組織需求的客製報價。",
|
||||
"enterprise.faq.q4": "我的資料在 OpenCode Enterprise 中是安全的嗎?",
|
||||
"enterprise.faq.a4":
|
||||
"是的。OpenCode 不會儲存你的程式碼或上下文資料。所有處理都會在本地或透過直接呼叫你的 AI 供應商 API 完成。透過中央化設定與 SSO 整合,你的資料會安全保留在組織的基礎設施內部。",
|
||||
|
||||
@@ -184,24 +184,12 @@ export default function Home() {
|
||||
<p>{i18n.t("home.what.body")}</p>
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
<span>[*]</span>
|
||||
<div>
|
||||
<strong>{i18n.t("home.what.lsp.title")}</strong> {i18n.t("home.what.lsp.body")}
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<span>[*]</span>
|
||||
<div>
|
||||
<strong>{i18n.t("home.what.multiSession.title")}</strong> {i18n.t("home.what.multiSession.body")}
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<span>[*]</span>
|
||||
<div>
|
||||
<strong>{i18n.t("home.what.shareLinks.title")}</strong> {i18n.t("home.what.shareLinks.body")}
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<span>[*]</span>
|
||||
<div>
|
||||
|
||||
@@ -476,14 +476,14 @@ function normalizeExperimental(
|
||||
)
|
||||
if (value !== undefined) result.todo = value
|
||||
}
|
||||
if (own(experimental, "precompute_compaction")) {
|
||||
if (own(experimental, "background_compaction")) {
|
||||
const value = decodeEncoded(
|
||||
ConfigExperimental.Info.fields.precompute_compaction,
|
||||
experimental.precompute_compaction,
|
||||
["experimental", "precompute_compaction"],
|
||||
ConfigExperimental.Info.fields.background_compaction,
|
||||
experimental.background_compaction,
|
||||
["experimental", "background_compaction"],
|
||||
diagnostics,
|
||||
)
|
||||
if (value !== undefined) result.precompute_compaction = value
|
||||
if (value !== undefined) result.background_compaction = value
|
||||
}
|
||||
if (own(experimental, "subagent_depth")) {
|
||||
const value = decodeEncoded(
|
||||
|
||||
@@ -13,7 +13,7 @@ export const Plugin = define({
|
||||
const compaction = yield* SessionCompaction.Service
|
||||
const loaded = yield* ConfigEntryObserver.observe(config, ctx.event, compaction.reload())
|
||||
yield* compaction.transform((editor) => {
|
||||
editor.configure({ precompute: Config.latest(loaded.entries, "experimental")?.precompute_compaction === true })
|
||||
editor.configure({ precompute: Config.latest(loaded.entries, "experimental")?.background_compaction === true })
|
||||
for (const entry of loaded.entries) {
|
||||
if (entry.type !== "document" || !entry.info.compaction) continue
|
||||
editor.configure({
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -14,7 +14,7 @@ const decodeADCFile = Schema.decodeUnknownOption(
|
||||
Schema.fromJsonString(Schema.Struct({ quota_project_id: Schema.optional(Schema.String) })),
|
||||
)
|
||||
|
||||
function resolveProject(options: Record<string, any>) {
|
||||
function resolveProject(options: Record<string, unknown>) {
|
||||
// models.dev advertises GOOGLE_VERTEX_PROJECT for Vertex, while Google SDKs
|
||||
// and ADC examples commonly use the broader Google Cloud project aliases.
|
||||
const project =
|
||||
@@ -26,7 +26,7 @@ function resolveProject(options: Record<string, any>) {
|
||||
return typeof project === "string" ? project : undefined
|
||||
}
|
||||
|
||||
function resolveLocation(options: Record<string, any>) {
|
||||
function resolveLocation(options: Record<string, unknown>) {
|
||||
const location =
|
||||
options.location ??
|
||||
process.env.GOOGLE_VERTEX_LOCATION ??
|
||||
@@ -203,10 +203,11 @@ export const GoogleVertexPlugin = define({
|
||||
const location = resolveLocation(settings) ?? "global"
|
||||
for (const model of models.list(item.provider.id)) {
|
||||
if (typeof model.settings?.baseURL !== "string") continue
|
||||
const baseURL = replaceVertexVars(model.settings.baseURL, project, location)
|
||||
models.update(item.provider.id, model.id, (draft) => {
|
||||
draft.settings = {
|
||||
...draft.settings,
|
||||
baseURL: replaceVertexVars(String(draft.settings?.baseURL), project, location),
|
||||
baseURL,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ const device = (app: App.Info) =>
|
||||
),
|
||||
),
|
||||
),
|
||||
refresh: (value) => refresh(deviceMethodID, Credential.OAuth.make({ ...value, methodID: deviceMethodID }), app),
|
||||
refresh: (value) => refresh(deviceMethodID, value, app),
|
||||
}) satisfies IntegrationOAuthMethodRegistration
|
||||
|
||||
export const XAIPlugin = define({
|
||||
|
||||
@@ -1106,7 +1106,8 @@ const calculateCeiling = (limit: SessionContext.Loaded["model"]["limit"], buffer
|
||||
// all, only a provider rejection can limit the request.
|
||||
const window = limit.input || limit.context
|
||||
if (window <= 0) return Number.POSITIVE_INFINITY
|
||||
if (buffer !== undefined) return window - buffer
|
||||
// A buffer that leaves no room, such as one set for a larger model, is ignored.
|
||||
if (buffer !== undefined && buffer < window) return window - buffer
|
||||
return window - Math.max(Math.floor(window * RESERVE_SHARE), window >= 2 * RESERVE_MIN ? RESERVE_MIN : 0)
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ import { InstructionEntry } from "./instruction-entry.js"
|
||||
import { Slug } from "../util/slug.js"
|
||||
import { FSUtil } from "@opencode/util/fs-util"
|
||||
import { Money } from "@opencode/schema/money"
|
||||
import type { TokenUsage } from "@opencode/schema/token-usage"
|
||||
import { Worktree } from "@opencode/schema/worktree"
|
||||
import { Project } from "@opencode/schema/project"
|
||||
import { AbsolutePath, RelativePath } from "../schema.js"
|
||||
@@ -36,12 +37,7 @@ export class SessionAlreadyProjected extends Error {}
|
||||
|
||||
type Usage = {
|
||||
cost: number
|
||||
tokens: {
|
||||
input: number
|
||||
output: number
|
||||
reasoning: number
|
||||
cache: { read: number; write: number }
|
||||
}
|
||||
tokens: TokenUsage.Info
|
||||
}
|
||||
|
||||
const ForkBatchSize = 500
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export * as SessionStats from "./stats.js"
|
||||
|
||||
import { DateTime, Effect, Option, Schema } from "effect"
|
||||
import { DateTime, Effect, Option, Schema, type Types } from "effect"
|
||||
import { and, eq, gte, inArray, lt, sql } from "drizzle-orm"
|
||||
import { Model } from "@opencode/schema/model"
|
||||
import { Money } from "@opencode/schema/money"
|
||||
@@ -22,12 +22,7 @@ type Input = {
|
||||
readonly tools?: ToolMode
|
||||
}
|
||||
|
||||
type Tokens = {
|
||||
input: number
|
||||
output: number
|
||||
reasoning: number
|
||||
cache: { read: number; write: number }
|
||||
}
|
||||
type Tokens = Types.DeepMutable<TokenUsage.Info>
|
||||
|
||||
type MessageRow = {
|
||||
sessionID: string
|
||||
@@ -375,7 +370,7 @@ function emptyTokens(): Tokens {
|
||||
return { input: 0, output: 0, reasoning: 0, cache: { read: 0, write: 0 } }
|
||||
}
|
||||
|
||||
function addTokens(target: Tokens, source: Tokens) {
|
||||
function addTokens(target: Tokens, source: TokenUsage.Info) {
|
||||
target.input += source.input
|
||||
target.output += source.output
|
||||
target.reasoning += source.reasoning
|
||||
|
||||
@@ -525,7 +525,7 @@ describe("ConfigNormalize", () => {
|
||||
experimental: {
|
||||
portable_shell_scanner: true,
|
||||
todo: true,
|
||||
precompute_compaction: true,
|
||||
background_compaction: true,
|
||||
subagent_depth: 0,
|
||||
location_idle_timeout: "2 hours",
|
||||
policies: [{ action: "provider.use", resource: "custom", effect: "allow" }],
|
||||
@@ -535,7 +535,7 @@ describe("ConfigNormalize", () => {
|
||||
experimental: {
|
||||
portable_shell_scanner: true,
|
||||
todo: true,
|
||||
precompute_compaction: true,
|
||||
background_compaction: true,
|
||||
subagent_depth: 0,
|
||||
location_idle_timeout: "7200000 millis",
|
||||
},
|
||||
|
||||
@@ -340,6 +340,15 @@ it.effect("auto compaction estimates current content against the buffered prompt
|
||||
expect(yield* due(input(83_999, outputLimited))).toBe(false)
|
||||
expect(yield* due(input(84_000, outputLimited))).toBe(true)
|
||||
|
||||
// A buffer that leaves the model no room, such as one set for a larger model, falls back to the default reserve.
|
||||
yield* Effect.scoped(
|
||||
Effect.gen(function* () {
|
||||
yield* compaction.transform((editor) => editor.configure({ buffer: 100_000 }))
|
||||
expect(yield* due(input(60_000, contextLimited))).toBe(false)
|
||||
expect(yield* due(input(84_000, contextLimited))).toBe(true)
|
||||
}),
|
||||
)
|
||||
|
||||
const assistant = input(89_000, contextLimited).messages[0]
|
||||
const tool = SessionMessage.AssistantTool.make({
|
||||
type: "tool",
|
||||
|
||||
@@ -150,7 +150,7 @@ const page = `<!doctype html>
|
||||
</header>
|
||||
<nav>
|
||||
<a href="https://opencode.ai">Home</a>
|
||||
<a href="https://opencode.ai/docs">Docs</a>
|
||||
<a href="https://opencode.ai/v2/docs">Docs</a>
|
||||
<a href="https://github.com/anomalyco/opencode">GitHub</a>
|
||||
<a href="https://opencode.ai/discord">Discord</a>
|
||||
</nav>
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { app, type BrowserWindow } from "electron"
|
||||
import { mkdir, writeFile } from "node:fs/promises"
|
||||
import { app, contentTracing, screen, type BrowserWindow } from "electron"
|
||||
import { Schema } from "effect"
|
||||
import { mkdir, readFile, writeFile } from "node:fs/promises"
|
||||
import path from "node:path"
|
||||
import { writeHeapSnapshot } from "node:v8"
|
||||
import { getHeapSpaceStatistics, getHeapStatistics, writeHeapSnapshot } from "node:v8"
|
||||
import type { MainSetup } from "../sdk/main"
|
||||
import { HeapSnapshots } from "./contract"
|
||||
import type definition from "./index"
|
||||
import { summarize, traceConfig } from "./memory-infra"
|
||||
import { captureServer } from "./server-heap"
|
||||
|
||||
/** A desktop process the manifest lists: the file written, or why there is none. */
|
||||
@@ -16,6 +18,38 @@ type Snapshot = { readonly process: "main" | "window"; readonly pid: number; rea
|
||||
/** The last capture; the next one starts after it settles. */
|
||||
type Queue = { tail: Promise<unknown> }
|
||||
|
||||
/** What a window's page holds, read from inside it. */
|
||||
const PageStats = Schema.Struct({
|
||||
elements: Schema.Number,
|
||||
images: Schema.Struct({ count: Schema.Number, decodedMiB: Schema.Number }),
|
||||
canvases: Schema.Struct({ count: Schema.Number, MiB: Schema.Number }),
|
||||
svgUses: Schema.Number,
|
||||
devicePixelRatio: Schema.Number,
|
||||
viewport: Schema.Struct({ width: Schema.Number, height: Schema.Number }),
|
||||
jsHeap: Schema.optional(
|
||||
Schema.Struct({ usedJSHeapSize: Schema.Number, totalJSHeapSize: Schema.Number, jsHeapSizeLimit: Schema.Number }),
|
||||
),
|
||||
})
|
||||
|
||||
const decodePageStats = Schema.decodeUnknownPromise(PageStats)
|
||||
|
||||
// Runs in the app window. Pixel sizes estimate decoded memory at 4 bytes per pixel.
|
||||
const pageStatsScript = `(() => {
|
||||
const mib = (bytes) => Math.round(bytes / 1048576 * 10) / 10
|
||||
const images = [...document.images]
|
||||
const canvases = [...document.querySelectorAll("canvas")]
|
||||
const memory = performance.memory
|
||||
return {
|
||||
elements: document.getElementsByTagName("*").length,
|
||||
images: { count: images.length, decodedMiB: mib(images.reduce((t, i) => t + i.naturalWidth * i.naturalHeight * 4, 0)) },
|
||||
canvases: { count: canvases.length, MiB: mib(canvases.reduce((t, c) => t + c.width * c.height * 4, 0)) },
|
||||
svgUses: document.getElementsByTagName("use").length,
|
||||
devicePixelRatio: window.devicePixelRatio,
|
||||
viewport: { width: innerWidth, height: innerHeight },
|
||||
jsHeap: memory && { usedJSHeapSize: memory.usedJSHeapSize, totalJSHeapSize: memory.totalJSHeapSize, jsHeapSizeLimit: memory.jsHeapSizeLimit },
|
||||
}
|
||||
})()`
|
||||
|
||||
const setup: MainSetup<typeof definition> = (ctx) => {
|
||||
const queue: Queue = { tail: Promise.resolve() }
|
||||
|
||||
@@ -29,15 +63,28 @@ const setup: MainSetup<typeof definition> = (ctx) => {
|
||||
await mkdir(directory, { recursive: true, mode: 0o700 })
|
||||
ctx.log.write("info", "capturing heap snapshots", { directory })
|
||||
|
||||
// Measurements first: writing a heap snapshot raises the memory of the process it serializes.
|
||||
const before = {
|
||||
metrics: app.getAppMetrics(),
|
||||
mainMemory: process.memoryUsage(),
|
||||
mainHeap: getHeapStatistics(),
|
||||
mainHeapSpaces: getHeapSpaceStatistics(),
|
||||
system: process.getSystemMemoryInfo(),
|
||||
}
|
||||
|
||||
const native = await recordNative(directory)
|
||||
const windows = ctx.windows.list()
|
||||
const pages = await Promise.all(windows.map((window) => describeWindow(window)))
|
||||
|
||||
// The server is another process, so it serializes its heap while the windows do. Windows go one at a time: a
|
||||
// snapshot can double a process's memory, and a leaking app may not have room for every window at once. Main goes
|
||||
// last: writing its own heap blocks the loop that receives the others.
|
||||
const [serverSnapshot, windows] = await Promise.all([
|
||||
const [serverSnapshot, windowSnapshots] = await Promise.all([
|
||||
captureServer(ctx.serverEndpoints.get("sidecar"), directory, ctx.scope.signal),
|
||||
(async () => {
|
||||
const list: Snapshot[] = []
|
||||
|
||||
for (const window of ctx.windows.list()) list.push(await captureWindow(window, directory))
|
||||
for (const window of windows) list.push(await captureWindow(window, directory))
|
||||
|
||||
return list
|
||||
})(),
|
||||
@@ -50,34 +97,43 @@ const setup: MainSetup<typeof definition> = (ctx) => {
|
||||
(error: Error): Snapshot => ({ process: "main", pid: process.pid, error: error.message }),
|
||||
)
|
||||
|
||||
const snapshots = [serverSnapshot, ...windows, main]
|
||||
const snapshots = [serverSnapshot, ...windowSnapshots, main]
|
||||
const gpu = await app.getGPUInfo("basic").catch((error: Error) => ({ error: error.message }))
|
||||
|
||||
// One readable answer to "where is the memory", per process, in MiB.
|
||||
await write(directory, "memory.json", {
|
||||
unit: "MiB",
|
||||
native: "summary" in native ? native.summary : native,
|
||||
server: "error" in serverSnapshot || !serverSnapshot.memory ? undefined : mibs(serverSnapshot.memory),
|
||||
pages,
|
||||
note: "native: Chromium's memory-infra dump per process, before the heap snapshots. Some allocators overlap: cc, skia, gpu and web_cache report memory that malloc, discardable or shared_memory also count. pages: what each app window's page held. server: the server's process.memoryUsage().",
|
||||
})
|
||||
await write(directory, "gpu.json", gpu)
|
||||
// Written last, so a script can wait for it.
|
||||
await writeFile(
|
||||
path.join(directory, "manifest.json"),
|
||||
JSON.stringify(
|
||||
{
|
||||
created: new Date().toISOString(),
|
||||
app: {
|
||||
name: app.getName(),
|
||||
version: app.getVersion(),
|
||||
packaged: app.isPackaged,
|
||||
platform: process.platform,
|
||||
arch: process.arch,
|
||||
versions: process.versions,
|
||||
},
|
||||
snapshots,
|
||||
// Per-process memory as the OS sees it: a process that grows while its heap does not leaks native memory.
|
||||
metrics: app.getAppMetrics(),
|
||||
metricsMemoryUnit: "KiB",
|
||||
mainMemory: process.memoryUsage(),
|
||||
},
|
||||
null,
|
||||
2,
|
||||
),
|
||||
{ mode: 0o600 },
|
||||
)
|
||||
const complete = snapshots.every((snapshot) => !("error" in snapshot))
|
||||
await write(directory, "manifest.json", {
|
||||
created: new Date().toISOString(),
|
||||
app: {
|
||||
name: app.getName(),
|
||||
version: app.getVersion(),
|
||||
packaged: app.isPackaged,
|
||||
uptimeSeconds: process.uptime(),
|
||||
platform: process.platform,
|
||||
arch: process.arch,
|
||||
versions: process.versions,
|
||||
},
|
||||
files: {
|
||||
"memory.json": "Where the memory is, per process, in MiB. Start here.",
|
||||
"memory-infra.json": "Chromium's raw memory dump trace. Open it in https://ui.perfetto.dev.",
|
||||
"gpu.json": "The GPU and driver.",
|
||||
"*.heapsnapshot": "Heap snapshots. Open them in the Memory panel of Chrome DevTools.",
|
||||
},
|
||||
snapshots,
|
||||
// Per-process memory as the OS sees it: a process that grows while its heap does not leaks native memory.
|
||||
metricsMemoryUnit: "KiB",
|
||||
before,
|
||||
after: { metrics: app.getAppMetrics(), mainMemory: process.memoryUsage() },
|
||||
})
|
||||
const complete = snapshots.every((snapshot) => !("error" in snapshot)) && !("error" in native)
|
||||
ctx.log.write(complete ? "info" : "warn", "heap snapshots captured", { directory, complete })
|
||||
|
||||
return { directory, complete }
|
||||
@@ -94,6 +150,44 @@ const setup: MainSetup<typeof definition> = (ctx) => {
|
||||
})
|
||||
}
|
||||
|
||||
// Chromium's own breakdown of every process's memory: what a heap snapshot cannot show (images, layout, compositor
|
||||
// layers, GPU). Fails when something else is tracing, such as DevTools recording a performance profile.
|
||||
async function recordNative(directory: string) {
|
||||
const file = path.join(directory, "memory-infra.json")
|
||||
|
||||
return (
|
||||
contentTracing
|
||||
.startRecording(traceConfig)
|
||||
// The first detailed dump arrives within a periodic interval of starting.
|
||||
.then(() => new Promise((resolve) => setTimeout(resolve, 2_500)))
|
||||
.then(() => contentTracing.stopRecording(file))
|
||||
.then(async () => ({ file: path.basename(file), summary: summarize(await readFile(file, "utf8")) }))
|
||||
.catch((error: Error) => ({ error: error.message }))
|
||||
)
|
||||
}
|
||||
|
||||
async function describeWindow(window: BrowserWindow) {
|
||||
const contents = window.webContents
|
||||
|
||||
// A hung or busy renderer never answers, and the snapshots wait for this step, so give up after a few seconds.
|
||||
const page = await Promise.race([
|
||||
contents.executeJavaScript(pageStatsScript).then(decodePageStats),
|
||||
new Promise<never>((_, reject) =>
|
||||
setTimeout(() => reject(new Error("The window did not answer within 3 seconds.")), 3_000),
|
||||
),
|
||||
]).catch((error: Error) => ({ error: error.message }))
|
||||
|
||||
return {
|
||||
window: window.id,
|
||||
pid: contents.getOSProcessId(),
|
||||
title: window.getTitle(),
|
||||
contentSize: window.getContentSize(),
|
||||
scaleFactor: screen.getDisplayMatching(window.getBounds()).scaleFactor,
|
||||
zoomFactor: contents.getZoomFactor(),
|
||||
page,
|
||||
}
|
||||
}
|
||||
|
||||
function captureWindow(window: BrowserWindow, directory: string) {
|
||||
const contents = window.webContents
|
||||
const pid = contents.getOSProcessId()
|
||||
@@ -105,4 +199,12 @@ function captureWindow(window: BrowserWindow, directory: string) {
|
||||
)
|
||||
}
|
||||
|
||||
function write<Value>(directory: string, file: string, value: Value) {
|
||||
return writeFile(path.join(directory, file), JSON.stringify(value, null, 2), { mode: 0o600 })
|
||||
}
|
||||
|
||||
function mibs(bytes: Readonly<Record<string, number>>) {
|
||||
return Object.fromEntries(Object.entries(bytes).map(([key, value]) => [key, Math.round((value / 1048576) * 10) / 10]))
|
||||
}
|
||||
|
||||
export default setup
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
import { expect, test } from "bun:test"
|
||||
import { summarize } from "./memory-infra"
|
||||
|
||||
const hex = (mib: number) => Math.round(mib * 1024 * 1024).toString(16)
|
||||
|
||||
const size = (mib: number) => ({ type: "scalar", units: "bytes", value: hex(mib) })
|
||||
|
||||
// Shaped like Electron's trace: totals and allocators arrive in separate events per dump id, the browser splits its
|
||||
// allocators over two events, and shared `global/…` entries carry no attrs.
|
||||
const trace = {
|
||||
traceEvents: [
|
||||
{ pid: 10, ph: "M", name: "process_name", args: { name: "Renderer" } },
|
||||
{ pid: 10, ph: "M", name: "process_labels", args: { labels: "OpenCode" } },
|
||||
{ pid: 20, ph: "M", name: "process_name", args: { name: "Browser" } },
|
||||
{ pid: 10, ph: "X", name: "unrelated", args: { anything: [1, 2] } },
|
||||
// An earlier dump that a later one supersedes.
|
||||
{ pid: 10, ph: "v", id: "0x0", args: { dumps: { process_totals: { private_footprint_bytes: hex(100) } } } },
|
||||
{ pid: 10, ph: "v", id: "0x0", args: { dumps: { allocators: { malloc: { attrs: { size: size(90) } } } } } },
|
||||
{ pid: 10, ph: "v", id: "0x1", args: { dumps: { process_totals: { private_footprint_bytes: hex(900) } } } },
|
||||
{
|
||||
pid: 10,
|
||||
ph: "v",
|
||||
id: "0x1",
|
||||
args: {
|
||||
dumps: {
|
||||
allocators: {
|
||||
// Effective size wins over size: memory shared with another allocator is counted once.
|
||||
cc: { attrs: { size: size(500), effective_size: size(400) } },
|
||||
"cc/tile_memory": { attrs: { effective_size: size(400) } },
|
||||
partition_alloc: { attrs: { size: size(300) } },
|
||||
"partition_alloc/partitions/layout": { attrs: { size: size(250) } },
|
||||
"partition_alloc/partitions/layout/deeper": { attrs: { size: size(250) } },
|
||||
"partition_alloc/partitions/tiny": { attrs: { size: size(0.5) } },
|
||||
"shared_memory/ABC": { attrs: { size: size(5) } },
|
||||
"global/123": {},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{ pid: 20, ph: "v", id: "0x1", args: { dumps: { process_totals: { private_footprint_bytes: hex(200) } } } },
|
||||
{ pid: 20, ph: "v", id: "0x1", args: { dumps: { allocators: { malloc: { attrs: { size: size(50) } } } } } },
|
||||
{ pid: 20, ph: "v", id: "0x1", args: { dumps: { allocators: { v8: { attrs: { size: size(30) } } } } } },
|
||||
// The recording stopped while the next dump was arriving: only the renderer reported, so 0x1 stays the answer.
|
||||
{ pid: 10, ph: "v", id: "0x2", args: { dumps: { process_totals: { private_footprint_bytes: hex(950) } } } },
|
||||
{ pid: 10, ph: "v", id: "0x2", args: { dumps: { allocators: { malloc: { attrs: { size: size(950) } } } } } },
|
||||
{ pid: 20, ph: "v", id: "0x2", args: { dumps: { process_totals: { private_footprint_bytes: hex(210) } } } },
|
||||
],
|
||||
}
|
||||
|
||||
test("summarizes each process's latest complete dump, largest first", () => {
|
||||
expect(summarize(JSON.stringify(trace))).toEqual([
|
||||
{
|
||||
pid: 10,
|
||||
name: "Renderer",
|
||||
labels: "OpenCode",
|
||||
totals: { privateFootprint: 900, resident: undefined },
|
||||
allocators: { cc: 400, partition_alloc: 300 },
|
||||
detail: { "cc/tile_memory": 400, "partition_alloc/partitions/layout": 250 },
|
||||
},
|
||||
{
|
||||
pid: 20,
|
||||
name: "Browser",
|
||||
labels: undefined,
|
||||
totals: { privateFootprint: 200, resident: undefined },
|
||||
allocators: { malloc: 50, v8: 30 },
|
||||
detail: {},
|
||||
},
|
||||
])
|
||||
})
|
||||
|
||||
test("falls back to the latest dump with allocators when no dump reached every process", () => {
|
||||
const partial = {
|
||||
traceEvents: [
|
||||
{ pid: 10, ph: "v", id: "0x0", args: { dumps: { allocators: { malloc: { attrs: { size: size(10) } } } } } },
|
||||
{ pid: 20, ph: "v", id: "0x0", args: { dumps: { process_totals: { private_footprint_bytes: hex(20) } } } },
|
||||
],
|
||||
}
|
||||
|
||||
expect(
|
||||
summarize(JSON.stringify(partial)).map((item) => [item.pid, item.totals.privateFootprint, item.allocators]),
|
||||
).toEqual([
|
||||
[20, 20, {}],
|
||||
[10, undefined, { malloc: 10 }],
|
||||
])
|
||||
})
|
||||
|
||||
test("a trace without memory dumps summarizes to nothing", () => {
|
||||
expect(summarize(JSON.stringify({ traceEvents: [{ pid: 1, ph: "M", name: "process_name" }] }))).toEqual([])
|
||||
})
|
||||
@@ -0,0 +1,159 @@
|
||||
import { Option, Schema } from "effect"
|
||||
|
||||
/** The trace config that makes Chromium dump every process's memory, broken down by allocator. */
|
||||
export const traceConfig = {
|
||||
included_categories: ["disabled-by-default-memory-infra"],
|
||||
excluded_categories: ["*"],
|
||||
memory_dump_config: { triggers: [{ mode: "detailed", periodic_interval_ms: 1000 }] },
|
||||
}
|
||||
|
||||
/** One Chromium process in the summary. Sizes are MiB. */
|
||||
export type ProcessMemory = {
|
||||
readonly pid: number
|
||||
/** Chromium's name for the process, e.g. `Browser`, `Renderer`, `GPU Process`. */
|
||||
readonly name?: string
|
||||
/** What the process shows, as Chromium labels it. */
|
||||
readonly labels?: string
|
||||
/** What the OS charges the process: Chromium's private footprint and resident set. */
|
||||
readonly totals: { readonly privateFootprint?: number; readonly resident?: number }
|
||||
/**
|
||||
* Each allocator's effective size (shared memory counted once, with its owner), largest first: `malloc`, `partition_alloc`, `blink_gc`, `v8`, `skia`, `cc`, `gpu`,
|
||||
* `discardable`, `web_cache`, `font_caches`… Some overlap: `cc`, `skia`, `gpu` and `web_cache` report memory that
|
||||
* `malloc`, `discardable` or `shared_memory` also count.
|
||||
*/
|
||||
readonly allocators: Readonly<Record<string, number>>
|
||||
/** Every sub-allocator of at least 1 MiB, up to three levels deep, e.g. `partition_alloc/partitions/layout`. */
|
||||
readonly detail: Readonly<Record<string, number>>
|
||||
}
|
||||
|
||||
const Size = Schema.Struct({ value: Schema.String })
|
||||
|
||||
const Event = Schema.Struct({
|
||||
pid: Schema.Number,
|
||||
ph: Schema.String,
|
||||
id: Schema.optional(Schema.String),
|
||||
name: Schema.optional(Schema.String),
|
||||
args: Schema.optional(
|
||||
Schema.Struct({
|
||||
name: Schema.optional(Schema.String),
|
||||
labels: Schema.optional(Schema.String),
|
||||
dumps: Schema.optional(
|
||||
Schema.Struct({
|
||||
process_totals: Schema.optional(
|
||||
Schema.Struct({
|
||||
private_footprint_bytes: Schema.optional(Schema.String),
|
||||
resident_set_bytes: Schema.optional(Schema.String),
|
||||
}),
|
||||
),
|
||||
allocators: Schema.optional(
|
||||
Schema.Record(
|
||||
Schema.String,
|
||||
Schema.Struct({
|
||||
// Shared `global/…` entries carry only a guid.
|
||||
attrs: Schema.optional(
|
||||
Schema.Struct({ size: Schema.optional(Size), effective_size: Schema.optional(Size) }),
|
||||
),
|
||||
}),
|
||||
),
|
||||
),
|
||||
}),
|
||||
),
|
||||
}),
|
||||
),
|
||||
})
|
||||
|
||||
// Electron writes `{ traceEvents: [...] }`; events of other shapes are skipped one by one.
|
||||
const decodeTrace = Schema.decodeUnknownSync(
|
||||
Schema.fromJsonString(Schema.Struct({ traceEvents: Schema.Array(Schema.Unknown) })),
|
||||
)
|
||||
|
||||
const decodeEvent = Schema.decodeUnknownOption(Event)
|
||||
|
||||
/**
|
||||
* Summarizes a memory-infra trace: for each process, the last detailed dump's totals and allocator sizes.
|
||||
*
|
||||
* @param json - The trace file's text, as `contentTracing.stopRecording` wrote it.
|
||||
* @returns One entry per process that dumped, largest private footprint first.
|
||||
*/
|
||||
export function summarize(json: string): ProcessMemory[] {
|
||||
const events = decodeTrace(json).traceEvents.flatMap((value) => Option.toArray(decodeEvent(value)))
|
||||
|
||||
const names = new Map(
|
||||
events.flatMap((event) =>
|
||||
event.ph === "M" && event.name === "process_name" ? [[event.pid, event.args?.name]] : [],
|
||||
),
|
||||
)
|
||||
|
||||
const labels = new Map(
|
||||
events.flatMap((event) =>
|
||||
event.ph === "M" && event.name === "process_labels" ? [[event.pid, event.args?.labels]] : [],
|
||||
),
|
||||
)
|
||||
|
||||
// Each periodic dump shares an id across processes, and a process reports its totals and its allocators in separate
|
||||
// events (the browser in two). Stopping the recording can cut into the last dump, so use the latest one every
|
||||
// process reported both for, else the latest with any allocators.
|
||||
const dumps = events.flatMap((event) =>
|
||||
event.ph === "v" && event.args?.dumps ? [{ ...event, dumps: event.args.dumps }] : [],
|
||||
)
|
||||
|
||||
const pids = [...new Set(dumps.map((event) => event.pid))]
|
||||
|
||||
const complete = [...new Set(dumps.map((event) => event.id))].findLast((id) =>
|
||||
pids.every((pid) => {
|
||||
const own = dumps.filter((event) => event.id === id && event.pid === pid)
|
||||
|
||||
return own.some((event) => event.dumps.allocators) && own.some((event) => event.dumps.process_totals)
|
||||
}),
|
||||
)
|
||||
|
||||
const latest = complete ?? dumps.findLast((event) => event.dumps.allocators)?.id
|
||||
const current = dumps.filter((event) => event.id === latest)
|
||||
|
||||
return [...new Set(current.map((event) => event.pid))]
|
||||
.map((pid): ProcessMemory => {
|
||||
const own = current.filter((event) => event.pid === pid)
|
||||
|
||||
// Effective size counts memory shared between allocators once, with its owner.
|
||||
const sizes = own.flatMap((event) =>
|
||||
Object.entries(event.dumps.allocators ?? {}).flatMap(([key, value]) => {
|
||||
const size = value.attrs?.effective_size ?? value.attrs?.size
|
||||
|
||||
return size ? [[key, mib(parseInt(size.value, 16))] as const] : []
|
||||
}),
|
||||
)
|
||||
|
||||
const totals = own.find((event) => event.dumps.process_totals)?.dumps.process_totals
|
||||
|
||||
return {
|
||||
pid,
|
||||
name: names.get(pid),
|
||||
labels: labels.get(pid),
|
||||
totals: {
|
||||
privateFootprint: hexMib(totals?.private_footprint_bytes),
|
||||
resident: hexMib(totals?.resident_set_bytes),
|
||||
},
|
||||
allocators: Object.fromEntries(
|
||||
sizes.filter(([key, size]) => !key.includes("/") && size > 0).sort((a, b) => b[1] - a[1]),
|
||||
),
|
||||
detail: Object.fromEntries(
|
||||
sizes
|
||||
// `global/<guid>` and `shared_memory/<guid>` name buffers by id, which says nothing on its own.
|
||||
.filter(
|
||||
([key, size]) =>
|
||||
key.includes("/") && key.split("/").length <= 3 && size >= 1 && !/^(global|shared_memory)\//.test(key),
|
||||
)
|
||||
.sort((a, b) => b[1] - a[1]),
|
||||
),
|
||||
}
|
||||
})
|
||||
.sort((a, b) => (b.totals.privateFootprint ?? 0) - (a.totals.privateFootprint ?? 0))
|
||||
}
|
||||
|
||||
function hexMib(value: string | undefined) {
|
||||
return value === undefined ? undefined : mib(parseInt(value, 16))
|
||||
}
|
||||
|
||||
function mib(bytes: number) {
|
||||
return Math.round((bytes / 1024 / 1024) * 10) / 10
|
||||
}
|
||||
@@ -10,6 +10,7 @@ beforeAll(() => GlobalRegistrator.unregister())
|
||||
afterAll(() => GlobalRegistrator.register())
|
||||
|
||||
test("asks the server to write into the folder, and records where an older server wrote instead", async () => {
|
||||
const memory = { rss: 5, heapTotal: 4, heapUsed: 3, external: 2, arrayBuffers: 1 }
|
||||
const directory = path.join(os.tmpdir(), "opencode-heap-capture")
|
||||
const requests: string[] = []
|
||||
|
||||
@@ -24,7 +25,10 @@ test("asks the server to write into the folder, and records where an older serve
|
||||
// The first answer is a current server's; the second is one that predates `directory` and used its log folder.
|
||||
const folder = requests.length === 1 ? (url.searchParams.get("directory") ?? "") : path.join(os.tmpdir(), "log")
|
||||
|
||||
return Response.json({ path: path.join(folder, "heap-42-1.heapsnapshot"), pid: 42 })
|
||||
const snapshot = { path: path.join(folder, "heap-42-1.heapsnapshot"), pid: 42 }
|
||||
|
||||
// An older server also leaves out its memory.
|
||||
return Response.json(requests.length === 1 ? { ...snapshot, memory } : snapshot)
|
||||
},
|
||||
})
|
||||
|
||||
@@ -33,7 +37,7 @@ test("asks the server to write into the folder, and records where an older serve
|
||||
const old = await captureServer(endpoint, directory, AbortSignal.timeout(10_000))
|
||||
|
||||
expect({ current, old, requests }).toEqual({
|
||||
current: { process: "server", pid: 42, file: "heap-42-1.heapsnapshot" },
|
||||
current: { process: "server", pid: 42, file: "heap-42-1.heapsnapshot", memory },
|
||||
old: { process: "server", pid: 42, path: path.join(os.tmpdir(), "log", "heap-42-1.heapsnapshot") },
|
||||
requests: [
|
||||
`POST /api/debug/heap-dump ${directory} Basic secret`,
|
||||
|
||||
@@ -3,16 +3,21 @@ import { Predicate } from "effect"
|
||||
import path from "node:path"
|
||||
import type { ServerEndpoint } from "../sdk/main"
|
||||
|
||||
type Memory = Readonly<Record<"rss" | "heapTotal" | "heapUsed" | "external" | "arrayBuffers", number>>
|
||||
|
||||
/**
|
||||
* What the manifest records about the desktop server's snapshot.
|
||||
* - `file`: the server wrote it into the folder.
|
||||
* - `path`: the server wrote it elsewhere, because it predates choosing a directory and used its log directory.
|
||||
* Snapshots are large, so it is not moved or copied.
|
||||
* - `error`: nothing was captured.
|
||||
*
|
||||
* `memory` is the server's `process.memoryUsage()` in bytes just before the snapshot; servers released before it was
|
||||
* added leave it out.
|
||||
*/
|
||||
export type ServerSnapshot =
|
||||
| { readonly process: "server"; readonly pid: number; readonly file: string }
|
||||
| { readonly process: "server"; readonly pid: number; readonly path: string }
|
||||
| { readonly process: "server"; readonly pid: number; readonly file: string; readonly memory?: Memory }
|
||||
| { readonly process: "server"; readonly pid: number; readonly path: string; readonly memory?: Memory }
|
||||
| { readonly process: "server"; readonly error: string }
|
||||
|
||||
/**
|
||||
@@ -36,8 +41,8 @@ export async function captureServer(
|
||||
(snapshot): ServerSnapshot =>
|
||||
// The server joins the directory and file name, so the same join recognizes a snapshot it wrote there.
|
||||
path.join(directory, path.basename(snapshot.path)) === snapshot.path
|
||||
? { process: "server", pid: snapshot.pid, file: path.basename(snapshot.path) }
|
||||
: { process: "server", pid: snapshot.pid, path: snapshot.path },
|
||||
? { process: "server", pid: snapshot.pid, file: path.basename(snapshot.path), memory: snapshot.memory }
|
||||
: { process: "server", pid: snapshot.pid, path: snapshot.path, memory: snapshot.memory },
|
||||
(error: Error): ServerSnapshot => ({
|
||||
process: "server",
|
||||
error: unsupported(error)
|
||||
|
||||
@@ -13673,9 +13673,72 @@
|
||||
},
|
||||
"pid": {
|
||||
"type": "integer"
|
||||
},
|
||||
"memory": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"rss": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"enum": ["Infinity", "-Infinity", "NaN"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"heapTotal": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"enum": ["Infinity", "-Infinity", "NaN"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"heapUsed": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"enum": ["Infinity", "-Infinity", "NaN"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"external": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"enum": ["Infinity", "-Infinity", "NaN"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"arrayBuffers": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"enum": ["Infinity", "-Infinity", "NaN"]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": ["rss", "heapTotal", "heapUsed", "external", "arrayBuffers"],
|
||||
"additionalProperties": false,
|
||||
"description": "The server process's memory in bytes, read just before the snapshot (Node's process.memoryUsage()). rss covers native memory the snapshot cannot show."
|
||||
}
|
||||
},
|
||||
"required": ["path", "pid"],
|
||||
"required": ["path", "pid", "memory"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
@@ -15004,7 +15067,7 @@
|
||||
"todo": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"precompute_compaction": {
|
||||
"background_compaction": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"subagent_depth": {
|
||||
|
||||
@@ -16,7 +16,20 @@ export const DebugGroup = HttpApiGroup.make("server.debug")
|
||||
}),
|
||||
),
|
||||
}),
|
||||
success: Schema.Struct({ path: Schema.String, pid: Schema.Int }),
|
||||
success: Schema.Struct({
|
||||
path: Schema.String,
|
||||
pid: Schema.Int,
|
||||
memory: Schema.Struct({
|
||||
rss: Schema.Number,
|
||||
heapTotal: Schema.Number,
|
||||
heapUsed: Schema.Number,
|
||||
external: Schema.Number,
|
||||
arrayBuffers: Schema.Number,
|
||||
}).annotate({
|
||||
description:
|
||||
"The server process's memory in bytes, read just before the snapshot (Node's process.memoryUsage()). rss covers native memory the snapshot cannot show.",
|
||||
}),
|
||||
}),
|
||||
error: [InvalidRequestError, UnknownError],
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
|
||||
@@ -11,9 +11,9 @@ export class Info extends Schema.Class<Info>("ConfigExperimental.Info")({
|
||||
todo: Schema.Boolean.pipe(optional).annotate({
|
||||
description: "Enable the experimental todowrite tool. Defaults to false.",
|
||||
}),
|
||||
precompute_compaction: Schema.Boolean.pipe(optional).annotate({
|
||||
background_compaction: Schema.Boolean.pipe(optional).annotate({
|
||||
description:
|
||||
"Summarize the conversation in the background as it nears the compaction threshold, so automatic compaction does not wait for the summary. Background summaries that are never used still cost tokens. Defaults to false.",
|
||||
"Enable experimental background compaction: summarize the conversation in the background as it nears the compaction threshold, so automatic compaction does not wait for the summary. Background summaries that are never used still cost tokens. Defaults to false.",
|
||||
}),
|
||||
subagent_depth: NonNegativeInt.pipe(optional).annotate({
|
||||
description: "Maximum subagent nesting depth. Defaults to 1.",
|
||||
|
||||
@@ -2,7 +2,7 @@ export * as PromptInput from "./prompt-input.js"
|
||||
|
||||
import { Schema } from "effect"
|
||||
import { AgentAttachment, PromptMention } from "./prompt.js"
|
||||
import { optional, statics } from "./schema.js"
|
||||
import { optional } from "./schema.js"
|
||||
import { Skill } from "./skill.js"
|
||||
|
||||
export interface FileAttachment extends Schema.Schema.Type<typeof FileAttachment> {}
|
||||
@@ -11,13 +11,7 @@ export const FileAttachment = Schema.Struct({
|
||||
name: Schema.String.pipe(optional),
|
||||
description: Schema.String.pipe(optional),
|
||||
mention: PromptMention.pipe(optional),
|
||||
})
|
||||
.annotate({ identifier: "PromptInput.FileAttachment" })
|
||||
.pipe(
|
||||
statics((schema) => ({
|
||||
create: (input: FileAttachment) => schema.make(input),
|
||||
})),
|
||||
)
|
||||
}).annotate({ identifier: "PromptInput.FileAttachment" })
|
||||
|
||||
export interface Prompt extends Schema.Schema.Type<typeof Prompt> {}
|
||||
export interface SkillAttachment extends Schema.Schema.Type<typeof SkillAttachment> {}
|
||||
|
||||
@@ -26,15 +26,6 @@ import { Project } from "./project.js"
|
||||
import { SessionFork } from "./session-fork.js"
|
||||
import { Permission } from "./permission.js"
|
||||
|
||||
export const Source = Schema.Struct({
|
||||
start: NonNegativeInt,
|
||||
end: NonNegativeInt,
|
||||
text: Schema.String,
|
||||
}).annotate({
|
||||
identifier: "Session.Event.Source",
|
||||
})
|
||||
export interface Source extends Schema.Schema.Type<typeof Source> {}
|
||||
|
||||
const Base = {
|
||||
sessionID: SessionID,
|
||||
}
|
||||
|
||||
@@ -5,12 +5,8 @@ import { statics } from "./schema.js"
|
||||
export const SessionID = Schema.String.check(Schema.isStartingWith("ses")).pipe(
|
||||
Schema.brand("SessionID"),
|
||||
Schema.annotate({ identifier: "Session.ID" }),
|
||||
statics((schema) => {
|
||||
const create = () => schema.make("ses_" + descending())
|
||||
return {
|
||||
create,
|
||||
descending: (id?: string) => (id === undefined ? create() : schema.make(id)),
|
||||
}
|
||||
}),
|
||||
statics((schema) => ({
|
||||
create: () => schema.make("ses_" + descending()),
|
||||
})),
|
||||
)
|
||||
export type SessionID = typeof SessionID.Type
|
||||
|
||||
@@ -9,7 +9,6 @@ import { Project } from "./project.js"
|
||||
import { Prompt } from "./prompt.js"
|
||||
import { DateTimeUtcFromMillis, PositiveInt, RelativePath, statics } from "./schema.js"
|
||||
import { ascending } from "./identifier.js"
|
||||
import { Event } from "./event.js"
|
||||
import { Shell as ShellSchema } from "./shell.js"
|
||||
import { FinishReason } from "./llm.js"
|
||||
import { SessionError } from "./session-error.js"
|
||||
@@ -24,7 +23,7 @@ export const ID = Schema.String.check(Schema.isStartingWith("msg_")).pipe(
|
||||
Schema.annotate({ identifier: "Session.Message.ID" }),
|
||||
statics((schema) => ({
|
||||
create: () => schema.make("msg_" + ascending()),
|
||||
fromEvent: (eventID: Event.ID) => schema.make(eventID.replace(/^evt_/, "msg_")),
|
||||
fromEvent: (eventID: string) => schema.make(eventID.replace(/^evt_/, "msg_")),
|
||||
})),
|
||||
)
|
||||
export type ID = typeof ID.Type
|
||||
|
||||
@@ -50,7 +50,11 @@ it.live(
|
||||
const responses = yield* Effect.all([api.dump(), api.dump()], { concurrency: "unbounded" })
|
||||
expect(responses.map((response) => response.status)).toEqual([200, 200])
|
||||
const results = yield* Effect.promise(() =>
|
||||
Promise.all(responses.map((response): Promise<{ path: string; pid: number }> => response.json())),
|
||||
Promise.all(
|
||||
responses.map(
|
||||
(response): Promise<{ path: string; pid: number; memory: Record<string, number> }> => response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
expect(new Set(results.map((result) => result.path)).size).toBe(2)
|
||||
expect((yield* Effect.promise(() => fs.readdir(api.log))).toSorted()).toEqual(
|
||||
@@ -58,6 +62,15 @@ it.live(
|
||||
)
|
||||
for (const result of results) {
|
||||
expect(result.pid).toBe(process.pid)
|
||||
// Read before the snapshot: the process's footprint beyond the heap the file holds.
|
||||
expect(Object.keys(result.memory).toSorted()).toEqual([
|
||||
"arrayBuffers",
|
||||
"external",
|
||||
"heapTotal",
|
||||
"heapUsed",
|
||||
"rss",
|
||||
])
|
||||
expect(result.memory.rss).toBeGreaterThan(result.memory.heapUsed)
|
||||
expect(path.dirname(result.path)).toBe(api.log)
|
||||
expect(path.basename(result.path)).toStartWith(`heap-${process.pid}-`)
|
||||
if (process.platform !== "win32")
|
||||
|
||||
@@ -10,7 +10,7 @@ export type HeaderLink = { href: string; label: string }
|
||||
export const githubLink = {
|
||||
href: "https://github.com/anomalyco/opencode",
|
||||
apiHref: "https://api.github.com/repos/anomalyco/opencode",
|
||||
fallbackStars: "208K",
|
||||
fallbackStars: "220K",
|
||||
}
|
||||
export const themePreferences = ["dark", "light", "system"] as const
|
||||
export const themeStorageKey = "opencode:stats-theme"
|
||||
@@ -28,6 +28,7 @@ export const getGitHubStars = query(async () => {
|
||||
headers: {
|
||||
Accept: "application/vnd.github+json",
|
||||
"X-GitHub-Api-Version": "2022-11-28",
|
||||
"User-Agent": "opencode-stats",
|
||||
},
|
||||
})
|
||||
.then((response) => (response.ok ? response.json() : undefined))
|
||||
|
||||
@@ -1156,7 +1156,7 @@ function App() {
|
||||
name: "docs.open",
|
||||
title: "Open docs",
|
||||
run: () => {
|
||||
openUrl("https://opencode.ai/docs").catch(() => {})
|
||||
openUrl("https://opencode.ai/v2/docs").catch(() => {})
|
||||
dialog.clear()
|
||||
},
|
||||
category: "System",
|
||||
|
||||
@@ -7,9 +7,10 @@ import path from "node:path"
|
||||
const lock = Semaphore.makeUnsafe(1)
|
||||
|
||||
/**
|
||||
* Writes a V8 heap snapshot of this process into `directory` and returns once the file is complete.
|
||||
* Blocks the event loop while the heap serializes. The file can contain secrets, so it is created
|
||||
* owner-only before the runtime writes into it.
|
||||
* Writes a V8 heap snapshot of this process into `directory` and returns once the file is complete, with the
|
||||
* process's memory just before the snapshot: the snapshot holds only the garbage-collected heap, and writing it
|
||||
* raises the process's memory. Blocks the event loop while the heap serializes. The file can contain secrets, so it
|
||||
* is created owner-only before the runtime writes into it.
|
||||
*/
|
||||
export const write = Effect.fn("HeapSnapshot.write")(
|
||||
function* (directory: string) {
|
||||
@@ -21,10 +22,21 @@ export const write = Effect.fn("HeapSnapshot.write")(
|
||||
const handle = await open(file, "wx", 0o600)
|
||||
await handle.close()
|
||||
})
|
||||
yield* Effect.logInfo("writing heap snapshot", { path: file })
|
||||
const memory = yield* Effect.sync(() => process.memoryUsage())
|
||||
yield* Effect.logInfo("writing heap snapshot", { path: file, rss: memory.rss, heapUsed: memory.heapUsed })
|
||||
yield* Effect.try(() => v8.writeHeapSnapshot(file))
|
||||
yield* Effect.logInfo("heap snapshot written", { path: file })
|
||||
return { path: file, pid: process.pid }
|
||||
return {
|
||||
path: file,
|
||||
pid: process.pid,
|
||||
memory: {
|
||||
rss: memory.rss,
|
||||
heapTotal: memory.heapTotal,
|
||||
heapUsed: memory.heapUsed,
|
||||
external: memory.external,
|
||||
arrayBuffers: memory.arrayBuffers,
|
||||
},
|
||||
}
|
||||
},
|
||||
(effect) => lock.withPermit(effect),
|
||||
)
|
||||
|
||||
@@ -132,7 +132,7 @@ require("codecompanion").setup({
|
||||
chat = {
|
||||
adapter = {
|
||||
name = "opencode",
|
||||
model = "claude-sonnet-4",
|
||||
model = "claude-sonnet-5-5",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -36,7 +36,7 @@ look at these below.
|
||||
|
||||
Subagents are specialized assistants that primary agents can invoke for specific tasks. You can also manually invoke them by **@ mentioning** them in your messages.
|
||||
|
||||
OpenCode comes with three built-in subagents, **General**, **Explore**, and **Scout**. We'll look at this below.
|
||||
OpenCode comes with two built-in subagents, **General** and **Explore**. We'll look at this below.
|
||||
|
||||
---
|
||||
|
||||
@@ -62,11 +62,13 @@ A restricted agent designed for planning and analysis. This agent is useful when
|
||||
|
||||
By default, Plan:
|
||||
|
||||
- Denies file edits, writes, and patches outside its plan directory, `~/.opencode/plan/`. These are refused without prompting.
|
||||
- Denies file edits, writes, and patches except Markdown plan files in `.opencode/plans/` and the `plans/` directory under OpenCode's data directory. These other edits are refused without prompting.
|
||||
- Allows the `question` tool, so it can ask you clarifying questions.
|
||||
- Does not restrict shell commands. They follow your [permission](/docs/permissions) config.
|
||||
- Does not restrict the `bash` tool. Commands follow your [permission](/docs/permissions) config.
|
||||
|
||||
Plan's defaults are applied before your top-level `permission` config, and the last matching rule wins. A global rule such as `"edit": "allow"` or `"*": "allow"` therefore also applies to Plan. To keep Plan read-only, or to require approval for its shell commands, set its permissions directly:
|
||||
With `OPENCODE_EXPERIMENTAL_PLAN_MODE` enabled, Plan saves its plan to `.opencode/plans/` for Git projects, or to the `plans/` directory under OpenCode's data directory otherwise.
|
||||
|
||||
Plan's defaults are applied before your top-level `permission` config, and the last matching rule wins. A global rule such as `"edit": "allow"` or `"*": "allow"` therefore also applies to Plan. To deny all file edits and require approval for its commands, set its permissions directly:
|
||||
|
||||
```json title="opencode.json"
|
||||
{
|
||||
@@ -77,11 +79,8 @@ Plan's defaults are applied before your top-level `permission` config, and the l
|
||||
"agent": {
|
||||
"plan": {
|
||||
"permission": {
|
||||
"edit": {
|
||||
"*": "deny",
|
||||
"~/.opencode/plan/*": "allow"
|
||||
},
|
||||
"shell": "ask"
|
||||
"edit": "deny",
|
||||
"bash": "ask"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,7 +93,7 @@ Plan's defaults are applied before your top-level `permission` config, and the l
|
||||
|
||||
_Mode_: `subagent`
|
||||
|
||||
A general-purpose agent for researching complex questions and executing multi-step tasks. Has full tool access, so it can make file changes when needed. Use this to run multiple units of work in parallel.
|
||||
A general-purpose agent for researching complex questions and executing multi-step tasks. Has full tool access except `todowrite`, so it can make file changes when needed. Use this to run multiple units of work in parallel.
|
||||
|
||||
---
|
||||
|
||||
@@ -106,14 +105,6 @@ A fast, read-only agent for exploring codebases. Cannot modify files. Use this w
|
||||
|
||||
---
|
||||
|
||||
### Use scout
|
||||
|
||||
_Mode_: `subagent`
|
||||
|
||||
A read-only agent for external docs and dependency research. Use this when you need to clone a dependency repository into OpenCode's managed cache, inspect library source, or cross-reference local code against upstream implementations without modifying your workspace.
|
||||
|
||||
---
|
||||
|
||||
### Use compaction
|
||||
|
||||
_Mode_: `primary`
|
||||
@@ -177,25 +168,25 @@ Configure agents in your `opencode.json` config file:
|
||||
"agent": {
|
||||
"build": {
|
||||
"mode": "primary",
|
||||
"model": "anthropic/claude-sonnet-4-20250514",
|
||||
"model": "anthropic/claude-sonnet-5-5",
|
||||
"prompt": "{file:./prompts/build.txt}",
|
||||
"permission": {
|
||||
"edit": "allow",
|
||||
"shell": "allow"
|
||||
"bash": "allow"
|
||||
}
|
||||
},
|
||||
"plan": {
|
||||
"mode": "primary",
|
||||
"model": "anthropic/claude-haiku-4-20250514",
|
||||
"model": "anthropic/claude-haiku-5-5",
|
||||
"permission": {
|
||||
"edit": "deny",
|
||||
"shell": "deny"
|
||||
"bash": "deny"
|
||||
}
|
||||
},
|
||||
"code-reviewer": {
|
||||
"description": "Reviews code for best practices and potential issues",
|
||||
"mode": "subagent",
|
||||
"model": "anthropic/claude-sonnet-4-20250514",
|
||||
"model": "anthropic/claude-sonnet-5-5",
|
||||
"prompt": "You are a code reviewer. Focus on security, performance, and maintainability.",
|
||||
"permission": {
|
||||
"edit": "deny"
|
||||
@@ -218,11 +209,11 @@ You can also define agents using markdown files. Place them in:
|
||||
---
|
||||
description: Reviews code for quality and best practices
|
||||
mode: subagent
|
||||
model: anthropic/claude-sonnet-4-20250514
|
||||
model: anthropic/claude-sonnet-5-5
|
||||
temperature: 0.1
|
||||
permission:
|
||||
edit: deny
|
||||
shell: deny
|
||||
bash: deny
|
||||
---
|
||||
|
||||
You are in code review mode. Focus on:
|
||||
@@ -382,13 +373,13 @@ If you don’t specify a model, primary agents use the [model globally configure
|
||||
{
|
||||
"agent": {
|
||||
"plan": {
|
||||
"model": "anthropic/claude-haiku-4-20250514"
|
||||
"model": "anthropic/claude-haiku-5-5"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The model ID in your OpenCode config uses the format `provider/model-id`. For example, if you're using [OpenCode Zen](https://opencode.ai/v2/docs/console/), you would use `opencode/gpt-5.1-codex` for GPT 5.1 Codex.
|
||||
The model ID in your OpenCode config uses the format `provider/model-id`. For example, if you're using [OpenCode Zen](https://opencode.ai/v2/docs/console/), you would use `opencode/gpt-6.1-sol` for GPT-6.1 Sol.
|
||||
|
||||
---
|
||||
|
||||
@@ -403,13 +394,13 @@ Allows you to control which tools are available in this agent. You can enable or
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"tools": {
|
||||
"write": true,
|
||||
"shell": true
|
||||
"bash": true
|
||||
},
|
||||
"agent": {
|
||||
"plan": {
|
||||
"tools": {
|
||||
"write": false,
|
||||
"shell": false
|
||||
"bash": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -458,8 +449,9 @@ The available permission keys are:
|
||||
| `glob` | `glob` |
|
||||
| `grep` | `grep` |
|
||||
| `list` | `list` |
|
||||
| `shell` | `shell` |
|
||||
| `bash` | `bash` |
|
||||
| `task` | `task` |
|
||||
| `todowrite` | `todowrite` |
|
||||
| `external_directory` | Any tool that reads or writes files outside the project worktree |
|
||||
| `webfetch` | `webfetch` |
|
||||
| `websearch` | `websearch` |
|
||||
@@ -468,7 +460,7 @@ The available permission keys are:
|
||||
| `question` | `question` |
|
||||
| `doom_loop` | Recovery prompts when an agent appears stuck |
|
||||
|
||||
`read`, `edit`, `glob`, `grep`, `list`, `shell`, `task`, `external_directory`, `lsp`, and `skill` accept either a shorthand action (`"allow" | "ask" | "deny"`) or an object of glob/pattern → action for fine-grained control. The remaining keys accept the shorthand action only.
|
||||
`read`, `edit`, `glob`, `grep`, `list`, `bash`, `task`, `external_directory`, `lsp`, and `skill` accept either a shorthand action (`"allow" | "ask" | "deny"`) or an object of glob/pattern → action for fine-grained control. The remaining keys accept the shorthand action only.
|
||||
|
||||
:::note
|
||||
Permission keys are matched as wildcard patterns against the underlying tool name, so the same syntax works for built-ins, custom tools, and MCP tools — for example `"mymcp_*": "deny"` denies every tool from an MCP server, and `"mymcp_search": "ask"` targets a single one.
|
||||
@@ -509,7 +501,7 @@ description: Code review without edits
|
||||
mode: subagent
|
||||
permission:
|
||||
edit: deny
|
||||
shell:
|
||||
bash:
|
||||
"*": ask
|
||||
"git diff": allow
|
||||
"git log*": allow
|
||||
@@ -520,7 +512,7 @@ permission:
|
||||
Only analyze code and suggest changes.
|
||||
```
|
||||
|
||||
You can set permissions for specific shell commands.
|
||||
You can set permissions for specific bash commands.
|
||||
|
||||
```json title="opencode.json" {7}
|
||||
{
|
||||
@@ -528,7 +520,7 @@ You can set permissions for specific shell commands.
|
||||
"agent": {
|
||||
"build": {
|
||||
"permission": {
|
||||
"shell": {
|
||||
"bash": {
|
||||
"git push": "ask",
|
||||
"grep *": "allow"
|
||||
}
|
||||
@@ -546,7 +538,7 @@ This can take a glob pattern.
|
||||
"agent": {
|
||||
"build": {
|
||||
"permission": {
|
||||
"shell": {
|
||||
"bash": {
|
||||
"git *": "ask"
|
||||
}
|
||||
}
|
||||
@@ -564,7 +556,7 @@ Since the last matching rule takes precedence, put the `*` wildcard first and sp
|
||||
"agent": {
|
||||
"build": {
|
||||
"permission": {
|
||||
"shell": {
|
||||
"bash": {
|
||||
"*": "ask",
|
||||
"git status *": "allow"
|
||||
}
|
||||
@@ -702,7 +694,7 @@ For example, with OpenAI's reasoning models, you can control the reasoning effor
|
||||
"agent": {
|
||||
"deep-thinker": {
|
||||
"description": "Agent that uses high reasoning effort for complex problems",
|
||||
"model": "openai/gpt-5",
|
||||
"model": "openai/gpt-6.1-sol",
|
||||
"reasoningEffort": "high",
|
||||
"textVerbosity": "low"
|
||||
}
|
||||
@@ -722,7 +714,7 @@ Run `opencode models` to see a list of the available models.
|
||||
|
||||
Create a new agent by adding a markdown file to `.opencode/agents/` for the project or `~/.config/opencode/agents/` globally. The file name becomes the agent name, and the frontmatter configures its description, mode, model, and permissions. See [Markdown](#markdown) above for the file format.
|
||||
|
||||
Run `opencode debug agents` to list the agents that OpenCode has loaded.
|
||||
You can also run `opencode agent create` to create an agent interactively. Run `opencode agent list` to list the agents that OpenCode has loaded.
|
||||
|
||||
---
|
||||
|
||||
@@ -733,7 +725,7 @@ Here are some common use cases for different agents.
|
||||
- **Build agent**: Full development work with all tools enabled
|
||||
- **Plan agent**: Analysis and planning without making changes
|
||||
- **Review agent**: Code review with read-only access plus documentation tools
|
||||
- **Debug agent**: Focused on investigation with shell and read tools enabled
|
||||
- **Debug agent**: Focused on investigation with bash and read tools enabled
|
||||
- **Docs agent**: Documentation writing with file operations but no system commands
|
||||
|
||||
---
|
||||
@@ -755,7 +747,7 @@ Do you have an agent you'd like to share? [Submit a PR](https://github.com/anoma
|
||||
description: Writes and maintains project documentation
|
||||
mode: subagent
|
||||
permission:
|
||||
shell: deny
|
||||
bash: deny
|
||||
---
|
||||
|
||||
You are a technical writer. Create clear, comprehensive documentation.
|
||||
|
||||
@@ -132,7 +132,7 @@ require("codecompanion").setup({
|
||||
chat = {
|
||||
adapter = {
|
||||
name = "opencode",
|
||||
model = "claude-sonnet-4",
|
||||
model = "claude-sonnet-5-5",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -61,7 +61,7 @@ _الوضع_: `primary`
|
||||
افتراضيا، يتم ضبط كل ما يلي على `ask`:
|
||||
|
||||
- `file edits`: جميع عمليات الكتابة والتصحيح (patches) والتحرير
|
||||
- `shell`: جميع أوامر shell
|
||||
- `bash`: جميع أوامر bash
|
||||
|
||||
يفيد هذا الوكيل عندما تريد من LLM تحليل الشفرة أو اقتراح تغييرات أو إنشاء خطط بدون إجراء أي تعديلات فعلية على قاعدة الشفرة.
|
||||
|
||||
@@ -151,12 +151,12 @@ _الوضع_: `primary`
|
||||
"agent": {
|
||||
"build": {
|
||||
"mode": "primary",
|
||||
"model": "anthropic/claude-sonnet-4-20250514",
|
||||
"model": "anthropic/claude-sonnet-5-5",
|
||||
"prompt": "{file:./prompts/build.txt}",
|
||||
"tools": {
|
||||
"write": true,
|
||||
"edit": true,
|
||||
"shell": true
|
||||
"bash": true
|
||||
}
|
||||
},
|
||||
"plan": {
|
||||
@@ -165,13 +165,13 @@ _الوضع_: `primary`
|
||||
"tools": {
|
||||
"write": false,
|
||||
"edit": false,
|
||||
"shell": false
|
||||
"bash": false
|
||||
}
|
||||
},
|
||||
"code-reviewer": {
|
||||
"description": "Reviews code for best practices and potential issues",
|
||||
"mode": "subagent",
|
||||
"model": "anthropic/claude-sonnet-4-20250514",
|
||||
"model": "anthropic/claude-sonnet-5-5",
|
||||
"prompt": "You are a code reviewer. Focus on security, performance, and maintainability.",
|
||||
"tools": {
|
||||
"write": false,
|
||||
@@ -195,12 +195,12 @@ _الوضع_: `primary`
|
||||
---
|
||||
description: Reviews code for quality and best practices
|
||||
mode: subagent
|
||||
model: anthropic/claude-sonnet-4-20250514
|
||||
model: anthropic/claude-sonnet-5-5
|
||||
temperature: 0.1
|
||||
tools:
|
||||
write: false
|
||||
edit: false
|
||||
shell: false
|
||||
bash: false
|
||||
---
|
||||
|
||||
You are in code review mode. Focus on:
|
||||
@@ -366,7 +366,7 @@ Provide constructive feedback without making direct changes.
|
||||
}
|
||||
```
|
||||
|
||||
يستخدم معرّف النموذج في إعدادات OpenCode الصيغة `provider/model-id`. على سبيل المثال، إذا كنت تستخدم [OpenCode Zen](https://opencode.ai/v2/docs/console/)، فستستخدم `opencode/gpt-5.1-codex` لـ GPT 5.1 Codex.
|
||||
يستخدم معرّف النموذج في إعدادات OpenCode الصيغة `provider/model-id`. على سبيل المثال، إذا كنت تستخدم [OpenCode Zen](https://opencode.ai/v2/docs/console/)، فستستخدم `opencode/gpt-6.1-sol` لـ GPT-6.1 Sol.
|
||||
|
||||
---
|
||||
|
||||
@@ -379,13 +379,13 @@ Provide constructive feedback without making direct changes.
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"tools": {
|
||||
"write": true,
|
||||
"shell": true
|
||||
"bash": true
|
||||
},
|
||||
"agent": {
|
||||
"plan": {
|
||||
"tools": {
|
||||
"write": false,
|
||||
"shell": false
|
||||
"bash": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -419,7 +419,7 @@ Provide constructive feedback without making direct changes.
|
||||
|
||||
### الأذونات
|
||||
|
||||
يمكنك تهيئة الأذونات لإدارة الإجراءات التي يستطيع الوكيل تنفيذها. حاليا، يمكن تهيئة أذونات أدوات `edit` و `shell` و `webfetch` إلى:
|
||||
يمكنك تهيئة الأذونات لإدارة الإجراءات التي يستطيع الوكيل تنفيذها. حاليا، يمكن تهيئة أذونات أدوات `edit` و `bash` و `webfetch` إلى:
|
||||
|
||||
- `"ask"` — طلب الموافقة قبل تشغيل الأداة
|
||||
- `"allow"` — السماح بكل العمليات بدون موافقة
|
||||
@@ -460,7 +460,7 @@ description: Code review without edits
|
||||
mode: subagent
|
||||
permission:
|
||||
edit: deny
|
||||
shell:
|
||||
bash:
|
||||
"*": ask
|
||||
"git diff": allow
|
||||
"git log*": allow
|
||||
@@ -471,7 +471,7 @@ permission:
|
||||
Only analyze code and suggest changes.
|
||||
```
|
||||
|
||||
يمكنك ضبط الأذونات لأوامر shell محددة.
|
||||
يمكنك ضبط الأذونات لأوامر bash محددة.
|
||||
|
||||
```json title="opencode.json" {7}
|
||||
{
|
||||
@@ -479,7 +479,7 @@ Only analyze code and suggest changes.
|
||||
"agent": {
|
||||
"build": {
|
||||
"permission": {
|
||||
"shell": {
|
||||
"bash": {
|
||||
"git push": "ask",
|
||||
"grep *": "allow"
|
||||
}
|
||||
@@ -497,7 +497,7 @@ Only analyze code and suggest changes.
|
||||
"agent": {
|
||||
"build": {
|
||||
"permission": {
|
||||
"shell": {
|
||||
"bash": {
|
||||
"git *": "ask"
|
||||
}
|
||||
}
|
||||
@@ -515,7 +515,7 @@ Only analyze code and suggest changes.
|
||||
"agent": {
|
||||
"build": {
|
||||
"permission": {
|
||||
"shell": {
|
||||
"bash": {
|
||||
"*": "ask",
|
||||
"git status *": "allow"
|
||||
}
|
||||
@@ -653,7 +653,7 @@ Only analyze code and suggest changes.
|
||||
"agent": {
|
||||
"deep-thinker": {
|
||||
"description": "Agent that uses high reasoning effort for complex problems",
|
||||
"model": "openai/gpt-5",
|
||||
"model": "openai/gpt-6.1-sol",
|
||||
"reasoningEffort": "high",
|
||||
"textVerbosity": "low"
|
||||
}
|
||||
@@ -673,7 +673,7 @@ Only analyze code and suggest changes.
|
||||
|
||||
أنشئ وكيلا جديدا بإضافة ملف Markdown إلى `.opencode/agents/` للمشروع أو إلى `~/.config/opencode/agents/` على المستوى العام. يصبح اسم الملف اسم الوكيل، وتضبط الواجهة الأمامية (frontmatter) وصفه ووضعه ونموذجه وصلاحياته. راجع [Markdown](#markdown) أعلاه لمعرفة تنسيق الملف.
|
||||
|
||||
شغّل `opencode debug agents` لعرض الوكلاء الذين حمّلهم OpenCode.
|
||||
شغّل `opencode agent list` لعرض الوكلاء الذين حمّلهم OpenCode.
|
||||
|
||||
---
|
||||
|
||||
@@ -684,7 +684,7 @@ Only analyze code and suggest changes.
|
||||
- **Build agent**: أعمال تطوير كاملة مع تفعيل جميع الأدوات
|
||||
- **Plan agent**: تحليل وتخطيط بدون إجراء تغييرات
|
||||
- **Review agent**: مراجعة الشفرة مع وصول للقراءة فقط بالإضافة إلى أدوات التوثيق
|
||||
- **Debug agent**: يركز على التحقيق مع تفعيل أدوات shell والقراءة
|
||||
- **Debug agent**: يركز على التحقيق مع تفعيل أدوات bash والقراءة
|
||||
- **Docs agent**: كتابة التوثيق مع عمليات الملفات بدون أوامر النظام
|
||||
|
||||
---
|
||||
@@ -706,7 +706,7 @@ Only analyze code and suggest changes.
|
||||
description: Writes and maintains project documentation
|
||||
mode: subagent
|
||||
tools:
|
||||
shell: false
|
||||
bash: false
|
||||
---
|
||||
|
||||
You are a technical writer. Create clear, comprehensive documentation.
|
||||
|
||||
@@ -23,7 +23,7 @@ description: أنشئ أوامر مخصصة للمهام المتكررة.
|
||||
---
|
||||
description: Run tests with coverage
|
||||
agent: build
|
||||
model: anthropic/claude-3-5-sonnet-20241022
|
||||
model: anthropic/claude-sonnet-5-5
|
||||
---
|
||||
|
||||
Run the full test suite with coverage report and show any failures.
|
||||
@@ -61,7 +61,7 @@ Focus on the failing tests and suggest fixes.
|
||||
// يظهر هذا كوصف في TUI
|
||||
"description": "Run tests with coverage",
|
||||
"agent": "build",
|
||||
"model": "anthropic/claude-3-5-sonnet-20241022"
|
||||
"model": "anthropic/claude-sonnet-5-5"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -86,7 +86,7 @@ Focus on the failing tests and suggest fixes.
|
||||
---
|
||||
description: Run tests with coverage
|
||||
agent: build
|
||||
model: anthropic/claude-3-5-sonnet-20241022
|
||||
model: anthropic/claude-sonnet-5-5
|
||||
---
|
||||
|
||||
Run the full test suite with coverage report and show any failures.
|
||||
@@ -301,7 +301,7 @@ Check for performance issues and suggest improvements.
|
||||
{
|
||||
"command": {
|
||||
"analyze": {
|
||||
"model": "anthropic/claude-3-5-sonnet-20241022"
|
||||
"model": "anthropic/claude-sonnet-5-5"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ description: استخدام ملف إعدادات OpenCode بصيغة JSON.
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
// إعدادات السمة
|
||||
"theme": "opencode",
|
||||
"model": "anthropic/claude-sonnet-4-5",
|
||||
"model": "anthropic/claude-sonnet-5-5",
|
||||
"autoupdate": true,
|
||||
}
|
||||
```
|
||||
@@ -34,7 +34,7 @@ description: استخدام ملف إعدادات OpenCode بصيغة JSON.
|
||||
|
||||
تُدمَج ملفات الإعدادات معًا ولا تُستبدَل. يتم جمع الإعدادات من مواقع الإعدادات التالية. تتجاوز الإعدادات اللاحقة الإعدادات السابقة فقط عند تعارض المفاتيح. أما الإعدادات غير المتعارضة فتبقى محفوظة من جميع الملفات.
|
||||
|
||||
على سبيل المثال، إذا كان الإعداد العام يضبط `theme: "opencode"` و`autoupdate: true`، وكان إعداد المشروع يضبط `model: "anthropic/claude-sonnet-4-5"`، فستتضمن الإعدادات النهائية الخيارات الثلاثة جميعها.
|
||||
على سبيل المثال، إذا كان الإعداد العام يضبط `theme: "opencode"` و`autoupdate: true`، وكان إعداد المشروع يضبط `model: "anthropic/claude-sonnet-5-5"`، فستتضمن الإعدادات النهائية الخيارات الثلاثة جميعها.
|
||||
|
||||
---
|
||||
|
||||
@@ -216,7 +216,7 @@ opencode run "Hello world"
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"tools": {
|
||||
"write": false,
|
||||
"shell": false
|
||||
"bash": false
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -233,8 +233,8 @@ opencode run "Hello world"
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"provider": {},
|
||||
"model": "anthropic/claude-sonnet-4-5",
|
||||
"small_model": "anthropic/claude-haiku-4-5"
|
||||
"model": "anthropic/claude-sonnet-5-5",
|
||||
"small_model": "anthropic/claude-haiku-5-5"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -323,7 +323,7 @@ opencode run "Hello world"
|
||||
"agent": {
|
||||
"code-reviewer": {
|
||||
"description": "Reviews code for best practices and potential issues",
|
||||
"model": "anthropic/claude-sonnet-4-5",
|
||||
"model": "anthropic/claude-sonnet-5-5",
|
||||
"prompt": "You are a code reviewer. Focus on security, performance, and maintainability.",
|
||||
"tools": {
|
||||
// تعطيل أدوات تعديل الملفات لوكيل المراجعة فقط
|
||||
@@ -368,7 +368,7 @@ opencode run "Hello world"
|
||||
"template": "Run the full test suite with coverage report and show any failures.\nFocus on the failing tests and suggest fixes.",
|
||||
"description": "Run tests with coverage",
|
||||
"agent": "build",
|
||||
"model": "anthropic/claude-haiku-4-5",
|
||||
"model": "anthropic/claude-haiku-5-5",
|
||||
},
|
||||
"component": {
|
||||
"template": "Create a new React component named $ARGUMENTS with TypeScript support.\nInclude proper typing and basic structure.",
|
||||
@@ -443,14 +443,14 @@ opencode run "Hello world"
|
||||
|
||||
افتراضيًا يسمح opencode **بجميع العمليات** دون الحاجة إلى موافقة صريحة. يمكنك تغيير ذلك عبر الخيار `permission`.
|
||||
|
||||
على سبيل المثال، لضمان أن أداتي `edit` و`shell` تتطلبان موافقة المستخدم:
|
||||
على سبيل المثال، لضمان أن أداتي `edit` و`bash` تتطلبان موافقة المستخدم:
|
||||
|
||||
```json title="opencode.json"
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"permission": {
|
||||
"edit": "ask",
|
||||
"shell": "ask"
|
||||
"bash": "ask"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -3,7 +3,7 @@ title: الأدوات المخصصة
|
||||
description: أنشئ أدوات يمكن لـ LLM استدعاؤها في opencode.
|
||||
---
|
||||
|
||||
الأدوات المخصصة هي دوال تنشئها يمكن لـ LLM استدعاؤها أثناء المحادثات. تعمل جنبا إلى جنب مع [الأدوات المدمجة](/docs/tools) في opencode مثل `read` و`write` و`shell`.
|
||||
الأدوات المخصصة هي دوال تنشئها يمكن لـ LLM استدعاؤها أثناء المحادثات. تعمل جنبا إلى جنب مع [الأدوات المدمجة](/docs/tools) في opencode مثل `read` و`write` و`bash`.
|
||||
|
||||
---
|
||||
|
||||
@@ -83,13 +83,13 @@ export const multiply = tool({
|
||||
|
||||
تُصنّف الأدوات المخصصة حسب اسم الأداة. إذا استخدمت أداة مخصصة نفس اسم أداة مدمجة، فإن الأداة المخصصة تأخذ الأولوية.
|
||||
|
||||
على سبيل المثال، يستبدل هذا الملف أداة `shell` المدمجة:
|
||||
على سبيل المثال، يستبدل هذا الملف أداة `bash` المدمجة:
|
||||
|
||||
```ts title=".opencode/tools/shell.ts"
|
||||
```ts title=".opencode/tools/bash.ts"
|
||||
import { tool } from "@opencode-ai/plugin"
|
||||
|
||||
export default tool({
|
||||
description: "Restricted shell wrapper",
|
||||
description: "Restricted bash wrapper",
|
||||
args: {
|
||||
command: tool.schema.string(),
|
||||
},
|
||||
|
||||
@@ -57,18 +57,18 @@ opencode github install
|
||||
permissions:
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 1
|
||||
persist-credentials: false
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 1
|
||||
persist-credentials: false
|
||||
|
||||
- name: Run OpenCode
|
||||
- name: Run OpenCode
|
||||
uses: anomalyco/opencode/github@latest
|
||||
env:
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
with:
|
||||
model: anthropic/claude-sonnet-4-20250514
|
||||
model: anthropic/claude-sonnet-5-5
|
||||
# github_token: xxxx
|
||||
```
|
||||
|
||||
@@ -142,7 +142,7 @@ jobs:
|
||||
env:
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
with:
|
||||
model: anthropic/claude-sonnet-4-20250514
|
||||
model: anthropic/claude-sonnet-5-5
|
||||
prompt: |
|
||||
Review the codebase for any TODO comments and create a summary.
|
||||
If you find issues worth addressing, open an issue to track them.
|
||||
@@ -180,7 +180,7 @@ jobs:
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
model: anthropic/claude-sonnet-4-20250514
|
||||
model: anthropic/claude-sonnet-5-5
|
||||
use_github_token: true
|
||||
prompt: |
|
||||
Review this pull request:
|
||||
@@ -236,7 +236,7 @@ jobs:
|
||||
env:
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
with:
|
||||
model: anthropic/claude-sonnet-4-20250514
|
||||
model: anthropic/claude-sonnet-5-5
|
||||
prompt: |
|
||||
Review this issue. If there's a clear fix or relevant docs:
|
||||
- Provide documentation links
|
||||
@@ -255,7 +255,7 @@ jobs:
|
||||
```yaml title=".github/workflows/opencode.yml"
|
||||
- uses: anomalyco/opencode/github@latest
|
||||
with:
|
||||
model: anthropic/claude-sonnet-4-5
|
||||
model: anthropic/claude-sonnet-5-5
|
||||
prompt: |
|
||||
Review this pull request:
|
||||
- Check for code quality issues
|
||||
|
||||
@@ -57,7 +57,7 @@ description: تهيئة مزوّد LLM والنموذج.
|
||||
}
|
||||
```
|
||||
|
||||
المعرّف الكامل هنا يكون بالشكل `provider_id/model_id`. على سبيل المثال، إذا كنت تستخدم [OpenCode Zen](https://opencode.ai/v2/docs/console/) فستستخدم `opencode/gpt-5.1-codex` لنموذج GPT 5.1 Codex.
|
||||
المعرّف الكامل هنا يكون بالشكل `provider_id/model_id`. على سبيل المثال، إذا كنت تستخدم [OpenCode Zen](https://opencode.ai/v2/docs/console/) فستستخدم `opencode/gpt-6.1-sol` لنموذج GPT-6.1 Sol.
|
||||
|
||||
إذا كنت قد هيّأت [مزوّداً مخصّصاً](/docs/providers#custom)، فإن `provider_id` هو المفتاح الموجود ضمن قسم `provider` في إعداداتك، و`model_id` هو المفتاح الموجود ضمن `provider.models`.
|
||||
|
||||
@@ -73,7 +73,7 @@ description: تهيئة مزوّد LLM والنموذج.
|
||||
"provider": {
|
||||
"openai": {
|
||||
"models": {
|
||||
"gpt-5": {
|
||||
"gpt-6.1-sol": {
|
||||
"options": {
|
||||
"reasoningEffort": "high",
|
||||
"textVerbosity": "low",
|
||||
@@ -85,7 +85,7 @@ description: تهيئة مزوّد LLM والنموذج.
|
||||
},
|
||||
"anthropic": {
|
||||
"models": {
|
||||
"claude-sonnet-4-5-20250929": {
|
||||
"claude-sonnet-5-5": {
|
||||
"options": {
|
||||
"thinking": {
|
||||
"type": "enabled",
|
||||
@@ -99,7 +99,7 @@ description: تهيئة مزوّد LLM والنموذج.
|
||||
}
|
||||
```
|
||||
|
||||
هنا نقوم بضبط إعدادات عامة لنموذجين مدمجين: `gpt-5` عند الوصول إليه عبر مزوّد `openai`، و`claude-sonnet-4-20250514` عند الوصول إليه عبر مزوّد `anthropic`.
|
||||
هنا نقوم بضبط إعدادات عامة لنموذجين مدمجين: `gpt-6.1-sol` عند الوصول إليه عبر مزوّد `openai`، و`claude-sonnet-5-5` عند الوصول إليه عبر مزوّد `anthropic`.
|
||||
يمكن العثور على أسماء المزوّدين والنماذج المدمجة على [Models.dev](https://models.dev).
|
||||
|
||||
يمكنك أيضاً ضبط هذه الخيارات لأي وكلاء تستخدمهم. تتجاوز إعدادات الوكيل أي خيارات عامة هنا. [اعرف المزيد](/docs/agents/#additional).
|
||||
@@ -112,7 +112,7 @@ description: تهيئة مزوّد LLM والنموذج.
|
||||
"provider": {
|
||||
"opencode": {
|
||||
"models": {
|
||||
"gpt-5": {
|
||||
"gpt-6.1-sol": {
|
||||
"variants": {
|
||||
"high": {
|
||||
"reasoningEffort": "high",
|
||||
@@ -177,7 +177,7 @@ description: تهيئة مزوّد LLM والنموذج.
|
||||
"provider": {
|
||||
"openai": {
|
||||
"models": {
|
||||
"gpt-5": {
|
||||
"gpt-6.1-sol": {
|
||||
"variants": {
|
||||
"thinking": {
|
||||
"reasoningEffort": "high",
|
||||
@@ -211,7 +211,7 @@ description: تهيئة مزوّد LLM والنموذج.
|
||||
```json title="opencode.json"
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"model": "anthropic/claude-sonnet-4-20250514"
|
||||
"model": "anthropic/claude-sonnet-5-5"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ description: تحكّم في الإجراءات التي تتطلب موافقة
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"permission": {
|
||||
"*": "ask",
|
||||
"shell": "allow",
|
||||
"bash": "allow",
|
||||
"edit": "deny"
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,7 @@ description: تحكّم في الإجراءات التي تتطلب موافقة
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"permission": {
|
||||
"shell": {
|
||||
"bash": {
|
||||
"*": "ask",
|
||||
"git *": "allow",
|
||||
"npm *": "allow",
|
||||
@@ -88,7 +88,7 @@ description: تحكّم في الإجراءات التي تتطلب موافقة
|
||||
|
||||
### الأدلة الخارجية
|
||||
|
||||
استخدم `external_directory` للسماح باستدعاءات الأدوات التي تلمس مسارات خارج دليل العمل الذي بدأ منه OpenCode. ينطبق ذلك على أي أداة تأخذ مسارًا كمدخل (مثل `read` و`edit` و`glob` و`grep` والعديد من أوامر `shell`).
|
||||
استخدم `external_directory` للسماح باستدعاءات الأدوات التي تلمس مسارات خارج دليل العمل الذي بدأ منه OpenCode. ينطبق ذلك على أي أداة تأخذ مسارًا كمدخل (مثل `read` و`edit` و`glob` و`grep` والعديد من أوامر `bash`).
|
||||
|
||||
توسيع المنزل (مثل `~/...`) يؤثر فقط على طريقة كتابة النمط. لا يجعل ذلك المسار الخارجي جزءًا من مساحة العمل الحالية، لذا يجب السماح بالمسارات خارج دليل العمل عبر `external_directory` أيضًا.
|
||||
|
||||
@@ -121,7 +121,7 @@ description: تحكّم في الإجراءات التي تتطلب موافقة
|
||||
}
|
||||
```
|
||||
|
||||
اجعل القائمة مقتصرة على المسارات الموثوقة، ثم أضِف طبقات إضافية من قواعد `allow` أو `deny` حسب الحاجة لأدوات أخرى (مثل `shell`).
|
||||
اجعل القائمة مقتصرة على المسارات الموثوقة، ثم أضِف طبقات إضافية من قواعد `allow` أو `deny` حسب الحاجة لأدوات أخرى (مثل `bash`).
|
||||
|
||||
---
|
||||
|
||||
@@ -133,7 +133,7 @@ description: تحكّم في الإجراءات التي تتطلب موافقة
|
||||
- `edit` — جميع تعديلات الملفات (يشمل `edit` و`write` و`patch`)
|
||||
- `glob` — مطابقة أسماء الملفات (يطابق نمط الـ glob)
|
||||
- `grep` — البحث في المحتوى (يطابق نمط regex)
|
||||
- `shell` — تشغيل أوامر shell (يطابق الأوامر المُحلَّلة مثل `git status --porcelain`)
|
||||
- `bash` — تشغيل أوامر shell (يطابق الأوامر المُحلَّلة مثل `git status --porcelain`)
|
||||
- `task` — تشغيل وكلاء فرعيين (يطابق نوع الوكيل الفرعي)
|
||||
- `skill` — تحميل مهارة (يطابق اسم المهارة)
|
||||
- `lsp` — تشغيل استعلامات LSP (حاليًا دون قواعد دقيقة)
|
||||
@@ -175,7 +175,7 @@ description: تحكّم في الإجراءات التي تتطلب موافقة
|
||||
- `always` — الموافقة على الطلبات المستقبلية المطابقة للأنماط المقترحة (لباقي جلسة OpenCode الحالية)
|
||||
- `reject` — رفض الطلب
|
||||
|
||||
مجموعة الأنماط التي ستوافق عليها `always` تُوفَّر من الأداة نفسها (على سبيل المثال، موافقات `shell` عادةً ما تُدرج بادئة أمر آمنة في القائمة البيضاء مثل `git status*`).
|
||||
مجموعة الأنماط التي ستوافق عليها `always` تُوفَّر من الأداة نفسها (على سبيل المثال، موافقات `bash` عادةً ما تُدرج بادئة أمر آمنة في القائمة البيضاء مثل `git status*`).
|
||||
|
||||
---
|
||||
|
||||
@@ -191,7 +191,7 @@ description: تحكّم في الإجراءات التي تتطلب موافقة
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"permission": {
|
||||
"shell": {
|
||||
"bash": {
|
||||
"*": "ask",
|
||||
"git *": "allow",
|
||||
"git commit *": "deny",
|
||||
@@ -202,7 +202,7 @@ description: تحكّم في الإجراءات التي تتطلب موافقة
|
||||
"agent": {
|
||||
"build": {
|
||||
"permission": {
|
||||
"shell": {
|
||||
"bash": {
|
||||
"*": "ask",
|
||||
"git *": "allow",
|
||||
"git commit *": "ask",
|
||||
@@ -223,7 +223,7 @@ description: Code review without edits
|
||||
mode: subagent
|
||||
permission:
|
||||
edit: deny
|
||||
shell: ask
|
||||
bash: ask
|
||||
webfetch: deny
|
||||
---
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ import { escape } from "shescape"
|
||||
export const MyPlugin = async (ctx) => {
|
||||
return {
|
||||
"tool.execute.before": async (input, output) => {
|
||||
if (input.tool === "shell") {
|
||||
if (input.tool === "bash") {
|
||||
output.args.command = escape(output.args.command)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -557,7 +557,7 @@ OpenCode Go هي خطة اشتراك منخفضة التكلفة توفّر وص
|
||||
"provider": {
|
||||
"cloudflare-ai-gateway": {
|
||||
"models": {
|
||||
"openai/gpt-4o": {},
|
||||
"openai/gpt-6.1-sol": {},
|
||||
"anthropic/claude-sonnet-4": {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ const opencode = await createOpencode({
|
||||
hostname: "127.0.0.1",
|
||||
port: 4096,
|
||||
config: {
|
||||
model: "anthropic/claude-3-5-sonnet-20241022",
|
||||
model: "anthropic/claude-sonnet-5-5",
|
||||
},
|
||||
})
|
||||
|
||||
@@ -333,7 +333,7 @@ const sessions = await client.session.list()
|
||||
const result = await client.session.prompt({
|
||||
path: { id: session.id },
|
||||
body: {
|
||||
model: { providerID: "anthropic", modelID: "claude-3-5-sonnet-20241022" },
|
||||
model: { providerID: "anthropic", modelID: "claude-sonnet-5-5" },
|
||||
parts: [{ type: "text", text: "Hello!" }],
|
||||
},
|
||||
})
|
||||
|
||||
@@ -18,7 +18,7 @@ description: إدارة الأدوات التي يمكن لـ LLM استخدام
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"permission": {
|
||||
"edit": "deny",
|
||||
"shell": "ask",
|
||||
"bash": "ask",
|
||||
"webfetch": "allow"
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ description: إدارة الأدوات التي يمكن لـ LLM استخدام
|
||||
|
||||
---
|
||||
|
||||
### shell
|
||||
### bash
|
||||
|
||||
نفذ أوامر shell في بيئة مشروعك.
|
||||
|
||||
@@ -53,7 +53,7 @@ description: إدارة الأدوات التي يمكن لـ LLM استخدام
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"permission": {
|
||||
"shell": "allow"
|
||||
"bash": "allow"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -222,8 +222,8 @@ description: المشكلات الشائعة وكيفية حلها.
|
||||
|
||||
أمثلة:
|
||||
|
||||
- `openai/gpt-4.1`
|
||||
- `openrouter/google/gemini-2.5-flash`
|
||||
- `openai/gpt-6.1-sol`
|
||||
- `openrouter/google/gemini-3.8-flash`
|
||||
- `opencode/kimi-k2`
|
||||
|
||||
لمعرفة النماذج التي لديك صلاحية الوصول إليها، شغّل `opencode models`
|
||||
|
||||
@@ -132,7 +132,7 @@ require("codecompanion").setup({
|
||||
chat = {
|
||||
adapter = {
|
||||
name = "opencode",
|
||||
model = "claude-sonnet-4",
|
||||
model = "claude-sonnet-5-5",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -61,7 +61,7 @@ Ograničeni agent dizajniran za planiranje i analizu. Koristimo sistem dozvola k
|
||||
Prema zadanim postavkama, sve sljedeće je postavljeno na `ask`:
|
||||
|
||||
- `file edits`: Sva upisivanja, zakrpe i uređivanja
|
||||
- `shell`: Sve shell komande
|
||||
- `bash`: Sve bash komande
|
||||
|
||||
Ovaj agent je koristan kada želite da LLM analizira kod, predloži promjene ili kreira planove bez stvarnih modifikacija vaše baze koda.
|
||||
|
||||
@@ -151,12 +151,12 @@ Konfigurirajte agente u svom konfiguracijskom fajlu `opencode.json`:
|
||||
"agent": {
|
||||
"build": {
|
||||
"mode": "primary",
|
||||
"model": "anthropic/claude-sonnet-4-20250514",
|
||||
"model": "anthropic/claude-sonnet-5-5",
|
||||
"prompt": "{file:./prompts/build.txt}",
|
||||
"tools": {
|
||||
"write": true,
|
||||
"edit": true,
|
||||
"shell": true
|
||||
"bash": true
|
||||
}
|
||||
},
|
||||
"plan": {
|
||||
@@ -165,13 +165,13 @@ Konfigurirajte agente u svom konfiguracijskom fajlu `opencode.json`:
|
||||
"tools": {
|
||||
"write": false,
|
||||
"edit": false,
|
||||
"shell": false
|
||||
"bash": false
|
||||
}
|
||||
},
|
||||
"code-reviewer": {
|
||||
"description": "Reviews code for best practices and potential issues",
|
||||
"mode": "subagent",
|
||||
"model": "anthropic/claude-sonnet-4-20250514",
|
||||
"model": "anthropic/claude-sonnet-5-5",
|
||||
"prompt": "You are a code reviewer. Focus on security, performance, and maintainability.",
|
||||
"tools": {
|
||||
"write": false,
|
||||
@@ -195,12 +195,12 @@ Također možete definirati agente koristeći markdown datoteke. Stavite ih u:
|
||||
---
|
||||
description: Reviews code for quality and best practices
|
||||
mode: subagent
|
||||
model: anthropic/claude-sonnet-4-20250514
|
||||
model: anthropic/claude-sonnet-5-5
|
||||
temperature: 0.1
|
||||
tools:
|
||||
write: false
|
||||
edit: false
|
||||
shell: false
|
||||
bash: false
|
||||
---
|
||||
|
||||
You are in code review mode. Focus on:
|
||||
@@ -366,7 +366,7 @@ Ako ne navedete model, primarni agenti koriste [model globalno konfiguriran](/do
|
||||
}
|
||||
```
|
||||
|
||||
ID modela u vašoj OpenCode konfiguraciji koristi format `provider/model-id`. Na primjer, ako koristite [OpenCode Zen](https://opencode.ai/v2/docs/console/), koristili biste `opencode/gpt-5.1-codex` za GPT 5.1 Codex.
|
||||
ID modela u vašoj OpenCode konfiguraciji koristi format `provider/model-id`. Na primjer, ako koristite [OpenCode Zen](https://opencode.ai/v2/docs/console/), koristili biste `opencode/gpt-6.1-sol` za GPT-6.1 Sol.
|
||||
|
||||
---
|
||||
|
||||
@@ -379,13 +379,13 @@ Kontrolirajte koji su alati dostupni u ovom agentu koristeći konfiguraciju `too
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"tools": {
|
||||
"write": true,
|
||||
"shell": true
|
||||
"bash": true
|
||||
},
|
||||
"agent": {
|
||||
"plan": {
|
||||
"tools": {
|
||||
"write": false,
|
||||
"shell": false
|
||||
"bash": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -419,7 +419,7 @@ Također možete koristiti zamjenske znakove za kontrolu više alata odjednom. N
|
||||
|
||||
### Dozvole
|
||||
|
||||
Možete konfigurirati dozvole za upravljanje radnjama koje agent može poduzeti. Trenutno se dozvole za alate `edit`, `shell` i `webfetch` mogu konfigurirati na:
|
||||
Možete konfigurirati dozvole za upravljanje radnjama koje agent može poduzeti. Trenutno se dozvole za alate `edit`, `bash` i `webfetch` mogu konfigurirati na:
|
||||
|
||||
- `"ask"` — Zatražite odobrenje prije pokretanja alata
|
||||
- `"allow"` — Dozvoli sve operacije bez odobrenja
|
||||
@@ -460,7 +460,7 @@ description: Code review without edits
|
||||
mode: subagent
|
||||
permission:
|
||||
edit: deny
|
||||
shell:
|
||||
bash:
|
||||
"*": ask
|
||||
"git diff": allow
|
||||
"git log*": allow
|
||||
@@ -471,7 +471,7 @@ permission:
|
||||
Only analyze code and suggest changes.
|
||||
```
|
||||
|
||||
Možete postaviti dozvole za određene shell komande.
|
||||
Možete postaviti dozvole za određene bash komande.
|
||||
|
||||
```json title="opencode.json" {7}
|
||||
{
|
||||
@@ -479,7 +479,7 @@ Možete postaviti dozvole za određene shell komande.
|
||||
"agent": {
|
||||
"build": {
|
||||
"permission": {
|
||||
"shell": {
|
||||
"bash": {
|
||||
"git push": "ask",
|
||||
"grep *": "allow"
|
||||
}
|
||||
@@ -497,7 +497,7 @@ Ovo može koristiti glob uzorak.
|
||||
"agent": {
|
||||
"build": {
|
||||
"permission": {
|
||||
"shell": {
|
||||
"bash": {
|
||||
"git *": "ask"
|
||||
}
|
||||
}
|
||||
@@ -515,7 +515,7 @@ Budući da posljednje podudarno pravilo ima prednost, prvo postavite zamjenski z
|
||||
"agent": {
|
||||
"build": {
|
||||
"permission": {
|
||||
"shell": {
|
||||
"bash": {
|
||||
"*": "ask",
|
||||
"git status *": "allow"
|
||||
}
|
||||
@@ -653,7 +653,7 @@ Na primjer, sa OpenAI-jevim modelima rezonovanja, možete kontrolisati napor ras
|
||||
"agent": {
|
||||
"deep-thinker": {
|
||||
"description": "Agent that uses high reasoning effort for complex problems",
|
||||
"model": "openai/gpt-5",
|
||||
"model": "openai/gpt-6.1-sol",
|
||||
"reasoningEffort": "high",
|
||||
"textVerbosity": "low"
|
||||
}
|
||||
@@ -673,7 +673,7 @@ Pokrenite `opencode models` da vidite listu dostupnih modela.
|
||||
|
||||
Novog agenta kreirate dodavanjem markdown datoteke u `.opencode/agents/` za projekat ili u `~/.config/opencode/agents/` globalno. Naziv datoteke postaje naziv agenta, a frontmatter konfiguriše njegov opis, način rada, model i dozvole. Format datoteke pogledajte u odjeljku [Markdown](#markdown) iznad.
|
||||
|
||||
Pokrenite `opencode debug agents` da biste vidjeli listu agenata koje je OpenCode učitao.
|
||||
Pokrenite `opencode agent list` da biste vidjeli listu agenata koje je OpenCode učitao.
|
||||
|
||||
---
|
||||
|
||||
@@ -684,7 +684,7 @@ Evo nekoliko uobičajenih slučajeva upotrebe različitih agenata.
|
||||
- **Build agent**: Potpuni razvojni rad sa svim omogućenim alatima
|
||||
- **Plan agent**: Analiza i planiranje bez unošenja promjena
|
||||
- **Review agent**: Code review sa pristupom samo za čitanje plus alati za dokumentaciju
|
||||
- **Debug agent**: Fokusiran na istragu sa omogućenim shell i alatima za čitanje
|
||||
- **Debug agent**: Fokusiran na istragu sa omogućenim bash i alatima za čitanje
|
||||
- **Docs agent**: Pisanje dokumentacije sa operacijama datoteka, ali bez sistemskih naredbi
|
||||
|
||||
---
|
||||
@@ -706,7 +706,7 @@ Imate li agenta kojeg biste željeli podijeliti? [Pošalji PR](https://github.co
|
||||
description: Writes and maintains project documentation
|
||||
mode: subagent
|
||||
tools:
|
||||
shell: false
|
||||
bash: false
|
||||
---
|
||||
|
||||
You are a technical writer. Create clear, comprehensive documentation.
|
||||
|
||||
@@ -22,7 +22,7 @@ Kreiraj `.opencode/commands/test.md`:
|
||||
---
|
||||
description: Run tests with coverage
|
||||
agent: build
|
||||
model: anthropic/claude-3-5-sonnet-20241022
|
||||
model: anthropic/claude-sonnet-5-5
|
||||
---
|
||||
|
||||
Run the full test suite with coverage report and show any failures.
|
||||
@@ -59,7 +59,7 @@ Koristite opciju `command` u svom OpenCode [config](/docs/config):
|
||||
// This is shown as the description in the TUI
|
||||
"description": "Run tests with coverage",
|
||||
"agent": "build",
|
||||
"model": "anthropic/claude-3-5-sonnet-20241022"
|
||||
"model": "anthropic/claude-sonnet-5-5"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,7 +84,7 @@ Također možete definirati komande koristeći markdown datoteke. Stavite ih u:
|
||||
---
|
||||
description: Run tests with coverage
|
||||
agent: build
|
||||
model: anthropic/claude-3-5-sonnet-20241022
|
||||
model: anthropic/claude-sonnet-5-5
|
||||
---
|
||||
|
||||
Run the full test suite with coverage report and show any failures.
|
||||
@@ -297,7 +297,7 @@ Koristite `model` konfiguraciju da nadjačate zadani model za ovu naredbu.
|
||||
{
|
||||
"command": {
|
||||
"analyze": {
|
||||
"model": "anthropic/claude-3-5-sonnet-20241022"
|
||||
"model": "anthropic/claude-sonnet-5-5"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ OpenCode podržava i **JSON** i **JSONC** (JSON sa komentarima) formate.
|
||||
```jsonc title="opencode.jsonc"
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"model": "anthropic/claude-sonnet-4-5",
|
||||
"model": "anthropic/claude-sonnet-5-5",
|
||||
"autoupdate": true,
|
||||
"server": {
|
||||
"port": 4096,
|
||||
@@ -34,7 +34,7 @@ Konfiguracijski fajlovi se **spajaju**, ne zamjenjuju.
|
||||
|
||||
Konfiguracijski fajlovi se spajaju, ne zamjenjuju. Kombiniraju se postavke sa sljedećih konfiguracijskih lokacija. Kasnije konfiguracije poništavaju prethodne samo za konfliktne ključeve. Nekonfliktne postavke iz svih konfiguracija su sačuvane.
|
||||
|
||||
Na primjer, ako vaša globalna konfiguracija postavlja `autoupdate: true`, a vaša projektna konfiguracija postavlja `model: "anthropic/claude-sonnet-4-5"`, konačna konfiguracija će uključivati obje postavke.
|
||||
Na primjer, ako vaša globalna konfiguracija postavlja `autoupdate: true`, a vaša projektna konfiguracija postavlja `model: "anthropic/claude-sonnet-5-5"`, konačna konfiguracija će uključivati obje postavke.
|
||||
|
||||
---
|
||||
|
||||
@@ -216,7 +216,7 @@ Možete upravljati alatima koje LLM može koristiti putem opcije `tools`.
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"tools": {
|
||||
"write": false,
|
||||
"shell": false
|
||||
"bash": false
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -233,8 +233,8 @@ Možete konfigurirati dobavljače i modele koje želite koristiti u svojoj OpenC
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"provider": {},
|
||||
"model": "anthropic/claude-sonnet-4-5",
|
||||
"small_model": "anthropic/claude-haiku-4-5"
|
||||
"model": "anthropic/claude-sonnet-5-5",
|
||||
"small_model": "anthropic/claude-haiku-5-5"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -323,7 +323,7 @@ Možete konfigurirati specijalizirane agente za određene zadatke putem opcije `
|
||||
"agent": {
|
||||
"code-reviewer": {
|
||||
"description": "Reviews code for best practices and potential issues",
|
||||
"model": "anthropic/claude-sonnet-4-5",
|
||||
"model": "anthropic/claude-sonnet-5-5",
|
||||
"prompt": "You are a code reviewer. Focus on security, performance, and maintainability.",
|
||||
"tools": {
|
||||
// Disable file modification tools for review-only agent
|
||||
@@ -368,7 +368,7 @@ Možete konfigurirati prilagođene naredbe za ponavljanje zadataka putem opcije
|
||||
"template": "Run the full test suite with coverage report and show any failures.\nFocus on the failing tests and suggest fixes.",
|
||||
"description": "Run tests with coverage",
|
||||
"agent": "build",
|
||||
"model": "anthropic/claude-haiku-4-5",
|
||||
"model": "anthropic/claude-haiku-5-5",
|
||||
},
|
||||
"component": {
|
||||
"template": "Create a new React component named $ARGUMENTS with TypeScript support.\nInclude proper typing and basic structure.",
|
||||
@@ -443,14 +443,14 @@ Možete konfigurirati formatere koda putem opcije `formatter`.
|
||||
|
||||
Prema zadanim postavkama, OpenCode **dopušta sve operacije** bez potrebe za eksplicitnim dopuštenjem. Ovo možete promijeniti koristeći opciju `permission`.
|
||||
|
||||
Na primjer, da osigurate da alati `edit` i `shell` zahtijevaju odobrenje korisnika:
|
||||
Na primjer, da osigurate da alati `edit` i `bash` zahtijevaju odobrenje korisnika:
|
||||
|
||||
```json title="opencode.json"
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"permission": {
|
||||
"edit": "ask",
|
||||
"shell": "ask"
|
||||
"bash": "ask"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Prilagođeni alati
|
||||
description: Kreirajte alate koje LLM može pozvati u otvorenom kodu.
|
||||
---
|
||||
|
||||
Prilagođeni alati su funkcije koje kreirate i koje LLM može pozvati tokom razgovora. Oni rade zajedno sa [ugrađenim opencode](/docs/tools) alatima kao što su `read`, `write` i `shell`.
|
||||
Prilagođeni alati su funkcije koje kreirate i koje LLM može pozvati tokom razgovora. Oni rade zajedno sa [ugrađenim opencode](/docs/tools) alatima kao što su `read`, `write` i `bash`.
|
||||
|
||||
---
|
||||
|
||||
@@ -83,13 +83,13 @@ Ovo stvara dva alata: `math_add` i `math_multiply`.
|
||||
|
||||
Prilagođeni alati su prepoznati po imenu. Ako prilagođeni alat koristi isto ime kao ugrađeni alat, prilagođeni alat ima prednost.
|
||||
|
||||
Na primjer, ova datoteka zamjenjuje ugrađeni `shell` alat:
|
||||
Na primjer, ova datoteka zamjenjuje ugrađeni `bash` alat:
|
||||
|
||||
```ts title=".opencode/tools/shell.ts"
|
||||
```ts title=".opencode/tools/bash.ts"
|
||||
import { tool } from "@opencode-ai/plugin"
|
||||
|
||||
export default tool({
|
||||
description: "Restricted shell wrapper",
|
||||
description: "Restricted bash wrapper",
|
||||
args: {
|
||||
command: tool.schema.string(),
|
||||
},
|
||||
|
||||
@@ -37,36 +37,36 @@ Ili ga možete postaviti ručno.
|
||||
Dodajte sljedeći fajl toka posla u `.github/workflows/opencode.yml` u svoj repo. Obavezno postavite odgovarajuće `model` i potrebne API ključeve u `env`.
|
||||
|
||||
```yml title=".github/workflows/opencode.yml" {24,26}
|
||||
name: opencode
|
||||
name: opencode
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request_review_comment:
|
||||
types: [created]
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request_review_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
opencode:
|
||||
if: |
|
||||
contains(github.event.comment.body, '/oc') ||
|
||||
contains(github.event.comment.body, '/opencode')
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 1
|
||||
persist-credentials: false
|
||||
jobs:
|
||||
opencode:
|
||||
if: |
|
||||
contains(github.event.comment.body, '/oc') ||
|
||||
contains(github.event.comment.body, '/opencode')
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 1
|
||||
persist-credentials: false
|
||||
|
||||
- name: Run OpenCode
|
||||
uses: anomalyco/opencode/github@latest
|
||||
env:
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
with:
|
||||
model: anthropic/claude-sonnet-4-20250514
|
||||
# github_token: xxxx
|
||||
- name: Run OpenCode
|
||||
uses: anomalyco/opencode/github@latest
|
||||
env:
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
with:
|
||||
model: anthropic/claude-sonnet-5-5
|
||||
# github_token: xxxx
|
||||
```
|
||||
|
||||
3. **Sačuvaj API ključeve u tajne**
|
||||
@@ -136,7 +136,7 @@ jobs:
|
||||
env:
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
with:
|
||||
model: anthropic/claude-sonnet-4-20250514
|
||||
model: anthropic/claude-sonnet-5-5
|
||||
prompt: |
|
||||
Review the codebase for any TODO comments and create a summary.
|
||||
If you find issues worth addressing, open an issue to track them.
|
||||
@@ -174,7 +174,7 @@ jobs:
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
model: anthropic/claude-sonnet-4-20250514
|
||||
model: anthropic/claude-sonnet-5-5
|
||||
use_github_token: true
|
||||
prompt: |
|
||||
Review this pull request:
|
||||
@@ -230,7 +230,7 @@ jobs:
|
||||
env:
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
with:
|
||||
model: anthropic/claude-sonnet-4-20250514
|
||||
model: anthropic/claude-sonnet-5-5
|
||||
prompt: |
|
||||
Review this issue. If there's a clear fix or relevant docs:
|
||||
- Provide documentation links
|
||||
@@ -249,7 +249,7 @@ Zaobiđite zadani prompt da biste prilagodili ponašanje OpenCode za vaš tok po
|
||||
```yaml title=".github/workflows/opencode.yml"
|
||||
- uses: anomalyco/opencode/github@latest
|
||||
with:
|
||||
model: anthropic/claude-sonnet-4-5
|
||||
model: anthropic/claude-sonnet-5-5
|
||||
prompt: |
|
||||
Review this pull request:
|
||||
- Check for code quality issues
|
||||
|
||||
@@ -53,7 +53,7 @@ OpenCode config.
|
||||
}
|
||||
```
|
||||
|
||||
Ovdje je puni ID `provider_id/model_id`. Na primjer, ako koristite [OpenCode Zen](https://opencode.ai/v2/docs/console/), koristili biste `opencode/gpt-5.1-codex` za GPT 5.1 Codex.
|
||||
Ovdje je puni ID `provider_id/model_id`. Na primjer, ako koristite [OpenCode Zen](https://opencode.ai/v2/docs/console/), koristili biste `opencode/gpt-6.1-sol` za GPT-6.1 Sol.
|
||||
Ako ste konfigurirali [prilagođenog provajdera](/docs/providers#custom), `provider_id` je ključ iz `provider` dijela vaše konfiguracije, a `model_id` je ključ iz `provider.models`.
|
||||
|
||||
---
|
||||
@@ -68,7 +68,7 @@ Možete globalno konfigurirati opcije modela kroz config.
|
||||
"provider": {
|
||||
"openai": {
|
||||
"models": {
|
||||
"gpt-5": {
|
||||
"gpt-6.1-sol": {
|
||||
"options": {
|
||||
"reasoningEffort": "high",
|
||||
"textVerbosity": "low",
|
||||
@@ -80,7 +80,7 @@ Možete globalno konfigurirati opcije modela kroz config.
|
||||
},
|
||||
"anthropic": {
|
||||
"models": {
|
||||
"claude-sonnet-4-5-20250929": {
|
||||
"claude-sonnet-5-5": {
|
||||
"options": {
|
||||
"thinking": {
|
||||
"type": "enabled",
|
||||
@@ -94,7 +94,7 @@ Možete globalno konfigurirati opcije modela kroz config.
|
||||
}
|
||||
```
|
||||
|
||||
Ovdje konfiguriramo globalne postavke za dva ugrađena modela: `gpt-5` kada se pristupa preko `openai` provajdera i `claude-sonnet-4-20250514` kada se pristupa preko `anthropic` provajdera.
|
||||
Ovdje konfiguriramo globalne postavke za dva ugrađena modela: `gpt-6.1-sol` kada se pristupa preko `openai` provajdera i `claude-sonnet-5-5` kada se pristupa preko `anthropic` provajdera.
|
||||
Ugrađeni dobavljač i nazivi modela mogu se naći na [Models.dev](https://models.dev).
|
||||
Također možete konfigurirati ove opcije za sve agente koje koristite. Konfiguracija agenta poništava sve globalne opcije ovdje. [Saznajte više](/docs/agents/#additional).
|
||||
Također možete definirati prilagođene varijante koje proširuju ugrađene. Varijante vam omogućavaju da konfigurirate različite postavke za isti model bez stvaranja duplih unosa:
|
||||
@@ -105,7 +105,7 @@ Također možete definirati prilagođene varijante koje proširuju ugrađene. Va
|
||||
"provider": {
|
||||
"opencode": {
|
||||
"models": {
|
||||
"gpt-5": {
|
||||
"gpt-6.1-sol": {
|
||||
"variants": {
|
||||
"high": {
|
||||
"reasoningEffort": "high",
|
||||
@@ -163,7 +163,7 @@ Možete nadjačati postojeće varijante ili dodati svoje:
|
||||
"provider": {
|
||||
"openai": {
|
||||
"models": {
|
||||
"gpt-5": {
|
||||
"gpt-6.1-sol": {
|
||||
"variants": {
|
||||
"thinking": {
|
||||
"reasoningEffort": "high",
|
||||
@@ -194,7 +194,7 @@ Kada se OpenCode pokrene, on provjerava modele u sljedećem prioritetnom redosli
|
||||
```json title="opencode.json"
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"model": "anthropic/claude-sonnet-4-20250514"
|
||||
"model": "anthropic/claude-sonnet-5-5"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ Dozvole možete postaviti globalno (sa `*`) i nadjačati određene alate.
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"permission": {
|
||||
"*": "ask",
|
||||
"shell": "allow",
|
||||
"bash": "allow",
|
||||
"edit": "deny"
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,7 @@ Za većinu dozvola, možete koristiti objekt za primjenu različitih radnji na o
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"permission": {
|
||||
"shell": {
|
||||
"bash": {
|
||||
"*": "ask",
|
||||
"git *": "allow",
|
||||
"npm *": "allow",
|
||||
@@ -87,7 +87,7 @@ Možete koristiti `~` ili `$HOME` na početku obrasca da referencirate svoj poč
|
||||
|
||||
### Vanjski direktoriji
|
||||
|
||||
Koristite `external_directory` da dozvolite pozive alata koji dodiruju putanje izvan radnog direktorija gdje je OpenCode pokrenut. Ovo se odnosi na bilo koji alat koji uzima putanju kao ulaz (na primjer `read`, `edit`, `glob`, `grep` i mnoge `shell` komande).
|
||||
Koristite `external_directory` da dozvolite pozive alata koji dodiruju putanje izvan radnog direktorija gdje je OpenCode pokrenut. Ovo se odnosi na bilo koji alat koji uzima putanju kao ulaz (na primjer `read`, `edit`, `glob`, `grep` i mnoge `bash` komande).
|
||||
Proširenje kuće (poput `~/...`) utiče samo na način na koji je obrazac napisan. Ne čini vanjsku stazu dijelom trenutnog radnog prostora, tako da staze izvan radnog direktorija i dalje moraju biti dozvoljene preko `external_directory`.
|
||||
Na primjer, ovo omogućava pristup svemu pod `~/projects/personal/`:
|
||||
|
||||
@@ -118,7 +118,7 @@ Svaki direktorij koji je ovdje dozvoljen nasljeđuje iste zadane postavke kao tr
|
||||
}
|
||||
```
|
||||
|
||||
Držite ovu listu fokusiranom na pouzdane putanje, a dodatna allow/deny pravila dodajte po potrebi za druge alate (npr. `shell`).
|
||||
Držite ovu listu fokusiranom na pouzdane putanje, a dodatna allow/deny pravila dodajte po potrebi za druge alate (npr. `bash`).
|
||||
|
||||
## Dostupne dozvole
|
||||
|
||||
@@ -128,7 +128,7 @@ Dozvole OpenCode su označene imenom alata, plus nekoliko sigurnosnih mjera:
|
||||
- `edit` — sve izmjene fajlova (pokriva `edit`, `write`, `patch`)
|
||||
- `glob` — globbiranje fajla (odgovara glob uzorku)
|
||||
- `grep` — pretraga sadržaja (podudara se sa regularnim izrazom)
|
||||
- `shell` — izvođenje komandi ljuske (podudara se s raščlanjenim komandama kao što je `git status --porcelain`)
|
||||
- `bash` — izvođenje komandi ljuske (podudara se s raščlanjenim komandama kao što je `git status --porcelain`)
|
||||
- `task` — pokretanje subagenta (odgovara tipu podagenta)
|
||||
- `skill` — učitavanje vještine (odgovara nazivu vještine)
|
||||
- `lsp` — pokretanje LSP upita (trenutno negranularno)
|
||||
@@ -169,7 +169,7 @@ Kada OpenCode zatraži odobrenje, korisničko sučelje nudi tri ishoda:
|
||||
- `once` — odobri samo ovaj zahtjev
|
||||
- `always` — odobri buduće zahtjeve koji odgovaraju predloženim obrascima (za ostatak trenutne OpenCode sesije)
|
||||
- `reject` — odbiti zahtjev
|
||||
Skup obrazaca koje bi `always` odobrio pruža alat (na primjer, shell odobrenja obično stavljaju na bijelu listu sigurni prefiks komande kao što je `git status*`).
|
||||
Skup obrazaca koje bi `always` odobrio pruža alat (na primjer, bash odobrenja obično stavljaju na bijelu listu sigurni prefiks komande kao što je `git status*`).
|
||||
|
||||
---
|
||||
|
||||
@@ -184,7 +184,7 @@ Pogledajte gornji odjeljak [Granularna pravila (sintaksa objekata)](#granular-ru
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"permission": {
|
||||
"shell": {
|
||||
"bash": {
|
||||
"*": "ask",
|
||||
"git *": "allow",
|
||||
"git commit *": "deny",
|
||||
@@ -195,7 +195,7 @@ Pogledajte gornji odjeljak [Granularna pravila (sintaksa objekata)](#granular-ru
|
||||
"agent": {
|
||||
"build": {
|
||||
"permission": {
|
||||
"shell": {
|
||||
"bash": {
|
||||
"*": "ask",
|
||||
"git *": "allow",
|
||||
"git commit *": "ask",
|
||||
@@ -216,7 +216,7 @@ description: Code review without edits
|
||||
mode: subagent
|
||||
permission:
|
||||
edit: deny
|
||||
shell: ask
|
||||
bash: ask
|
||||
webfetch: deny
|
||||
---
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user