#18497 · @amosbird · opened Mar 21, 2026 at 7:19 AM UTC · last updated Mar 21, 2026 at 7:30 AM UTC

feat(tui): add sidebar_position config option

tuifeat
56
+1605439 files

Score breakdown

Impact

7.0

Clarity

9.0

Urgency

3.0

Ease Of Review

8.0

Guidelines

8.0

Readiness

8.0

Size

3.0

Trust

5.0

Traction

2.0

Summary

This PR introduces a sidebar_position configuration option for the TUI, allowing users to move the sidebar to the left. It implements this new feature using CSS flex-direction and includes schema updates and unit tests.

Open in GitHub

Description

Issue for this PR

Closes #16349 (TUI portion)

Type of change

  • [ ] Bug fix
  • [x] New feature
  • [ ] Refactor / code improvement
  • [x] Documentation

What does this PR do?

Adds a sidebar_position option to tui.json config so users can move the TUI sidebar to the left side of the screen.

The implementation uses row-reverse flex direction on the main layout container when sidebar_position is set to "left". This cleanly swaps the sidebar without restructuring the component tree. The narrow-screen overlay mode also flips its alignment accordingly (flex-start vs flex-end).

Schema: Added sidebar_position: z.enum(["right", "left"]).optional() to TuiOptions in tui-schema.ts. No extra wiring needed — it flows through useTuiConfig() automatically.

Usage in tui.json:

{
  "sidebar_position": "left"
}

Omitting the option or setting "right" preserves the current default behavior.

How did you verify your code works?

  • bun typecheck passes in packages/opencode (only pre-existing error in dialog-provider.tsx remains)
  • bun test test/config/tui.test.ts — 22 tests pass, including 2 new tests for sidebar_position config loading
  • Manually tested both "left" and "right" (and omitted) values in the TUI

Screenshots / recordings

N/A — terminal UI change, verified manually.

Checklist

  • [x] I have tested my changes locally
  • [x] I have not included unrelated changes in this PR

Linked Issues

#16349 [FEATURE]: Add option to swap left/right panel layout

View issue

Comments

No comments.

Changed Files

packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

+32
@@ -161,6 +161,7 @@ export function Session() {
const [showGenericToolOutput, setShowGenericToolOutput] = kv.signal("generic_tool_output_visibility", false)
const wide = createMemo(() => dimensions().width > 120)
const sidebarLeft = createMemo(() => tuiConfig?.sidebar_position === "left")
const sidebarVisible = createMemo(() => {
if (session()?.parentID) return false
if (sidebarOpen()) return true
@@ -1045,7 +1046,7 @@ export function Session() {
tui: tuiConfig,
}}
>
<box flexDirection="row">
<box flexDirection={sidebarLeft() ? "row-reverse" : "row"}>
<box flexGrow={1} paddingBottom={1} paddingTop={1} paddingLeft={2} paddingRight={2} gap={1}>
<Show when={session()}>
<Show when={showHeader() && (!sidebarVisible() || !wide())}>
@@ -1204,7 +1205,7 @@ export function Session() {
left={0}
right={0}
bottom={0}
alignItems="flex-end"
alignItems={sidebarLeft() ? "flex-start" : "flex-end"}
backgroundColor={RGBA.fromInts(0, 0, 0, 70)}
>
<Sidebar sessionID={route.sessionI

packages/opencode/src/config/tui-schema.ts

+40
@@ -22,6 +22,10 @@ export const TuiOptions = z.object({
.enum(["auto", "stacked"])
.optional()
.describe("Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column"),
sidebar_position: z
.enum(["right", "left"])
.optional()
.describe("Control sidebar position: 'right' (default) or 'left'"),
})
export const TuiInfo = z

packages/opencode/test/config/tui.test.ts

+320
@@ -401,6 +401,38 @@ test("does not derive tui path from OPENCODE_CONFIG", async () => {
})
})
test("sidebar_position is available through tui config", async () => {
await using tmp = await tmpdir({
init: async (dir) => {
await Bun.write(path.join(dir, "tui.json"), JSON.stringify({ sidebar_position: "left" }))
},
})
await Instance.provide({
directory: tmp.path,
fn: async () => {
const config = await TuiConfig.get()
expect(config.sidebar_position).toBe("left")
},
})
})
test("sidebar_position defaults to undefined when not set", async () => {
await using tmp = await tmpdir({
init: async (dir) => {
await Bun.write(path.join(dir, "tui.json"), JSON.stringify({ theme: "test" }))
},
})
await Instance.provide({
directory: tmp.path,
fn: async () => {
const config = await TuiConfig.get()
expect(config.sidebar_position).toBeUndefined()
},
})
})
test("applies env and file substitutions in tui.json", async () => {
const original = process.env.TUI_THEME_TEST
process.env.TUI_THEME_TEST = "env-theme"

packages/web/src/content/docs/ar/config.mdx

+21
@@ -163,7 +163,8 @@ opencode run "Hello world"
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
}
```

packages/web/src/content/docs/ar/tui.mdx

+189
@@ -352,25 +352,34 @@ How is auth handled in @packages/functions/src/api/index.ts?
## الإعداد
يمكنك تخصيص سلوك واجهة TUI عبر ملف إعدادات OpenCode.
يمكنك تخصيص سلوك واجهة TUI عبر `tui.json` (أو `tui.jsonc`).
```json title="opencode.json"
```json title="tui.json"
{
"$schema": "https://opencode.ai/config.json",
"tui": {
"scroll_speed": 3,
"scroll_acceleration": {
"enabled": true
}
}
"$schema": "https://opencode.ai/tui.json",
"theme": "opencode",
"keybinds": {
"leader": "ctrl+x"
},
"scroll_speed": 3,
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto",
"sidebar_position": "left"
}
```
هذا منفصل عن `opencode.json`، الذي يقوم بتكوين سلوك الخادم/وقت التشغيل.
### الخيارات
- `theme` - يحدد سمة واجهة المستخدم. [تعرف على المزيد](/docs/themes).
- `keybinds` - يخصص اختصارات لوحة المفاتيح. [تعرف على المزيد](/docs/keybinds).
- `scroll_acceleration` - فعّل تسارع التمرير على نمط macOS لتمرير سلس وطبيعي. عند تفعيله، تزداد سرعة التمرير مع إيماءات التمرير السريعة وتبقى دقيقة للحركات الأبطأ. **يتقدّم هذا الإعداد على `scroll_speed` ويستبدله عند تفعيله.**
- `scroll_speed` - يتحكم في سرعة تمرير واجهة

packages/web/src/content/docs/bs/config.mdx

+21
@@ -166,7 +166,8 @@ Koristite namjenski `tui.json` (ili `tui.jsonc`) fajl za postavke specifične za
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```

packages/web/src/content/docs/bs/tui.mdx

+31
@@ -371,7 +371,8 @@ Možete prilagoditi TUI ponašanje putem `tui.json` (ili `tui.jsonc`).
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```
@@ -384,6 +385,7 @@ Ovo je odvojeno od `opencode.json`, koji konfiguriše ponašanje servera/izvrša
- `scroll_acceleration.enabled` - ​​Omogućite ubrzanje pomicanja u macOS stilu za glatko, prirodno pomicanje. Kada je omogućeno, brzina pomicanja se povećava brzim pokretima pomicanja i ostaje precizna za sporije pokrete. **Ova postavka ima prednost nad `scroll_speed` i nadjačava je kada je omogućena.**
- `scroll_speed` - ​​Kontrolira koliko brzo TUI skroluje kada se koriste komande za pomeranje (minimum: `0.001`, podržava decimalne vrijednosti). Podrazumevano je `3`. **Napomena: Ovo se zanemaruje ako je `scroll_acceleration.enabled` postavljeno na `true`.**
- `diff_style` - Kontrolira prikazivanje razlike. `"auto"` se prilagođava širini terminala, `"stacked"` uvijek prikazuje raspored u jednoj koloni.
- `sidebar_position` - Kontrolira poziciju bočne trake. `"right"` (zadano) drži bočnu traku desno, `"left"` je premješta lijevo.
Koristite `OPENCODE_T

packages/web/src/content/docs/config.mdx

+21
@@ -170,7 +170,8 @@ Use a dedicated `tui.json` (or `tui.jsonc`) file for TUI-specific settings.
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```

packages/web/src/content/docs/da/config.mdx

+21
@@ -165,7 +165,8 @@ Du kan konfigurere TUI-specifikke indstillinger gennem indstillingen `tui`.
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
}
```

packages/web/src/content/docs/da/tui.mdx

+31
@@ -365,7 +365,8 @@ Du kan tilpasse TUI-adfærd gennem `tui.json` (eller `tui.jsonc`).
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```
@@ -378,6 +379,7 @@ Dette er adskilt fra `opencode.json`, som konfigurerer server-/kørselstidsadfæ
- `scroll_acceleration.enabled` - Aktiver rulleacceleration i macOS-stil for jævn, naturlig rulning. Når aktiveret, øger rullehastigheden med hurtige rullebevægelser og forbliver præcis for langsommere bevægelser. **Denne indstilling har forrang over `scroll_speed` og tilsidesætter den, når den er aktiveret.**
- `scroll_speed` - Styrer hvor hurtigt TUI ruller, når du bruger rullekommandoer (minimum: `0.001`, understøtter decimalværdier). Standard er `3`. **Bemærk: Dette ignoreres hvis `scroll_acceleration.enabled` er sat til `true`.**
- `diff_style` - Styrer diff-gengivelse. `"auto"` tilpasser sig terminalbredde, `"stacked"` viser altid et enkeltkolonne-layout.
- `sidebar_position` - Styrer sidebjælkens placering. `"right"` (standard) holder sidebjælken til højre, `"left"` flytter den til venstre.
Brug `OPENCODE_TUI_CONFIG` til at indlæse en brugerdefi

packages/web/src/content/docs/de/config.mdx

+21
@@ -164,7 +164,8 @@ Sie können TUI-spezifische Einstellungen über die Option `tui` konfigurieren.
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
}
```

packages/web/src/content/docs/de/tui.mdx

+31
@@ -368,7 +368,8 @@ Du kannst das Verhalten der TUI ueber die Datei `tui.json` (oder `tui.jsonc`) an
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```
@@ -381,6 +382,7 @@ Dies ist getrennt von `opencode.json`, welche das Server-/Runtime-Verhalten konf
- `scroll_acceleration.enabled` - Aktiviert Scroll-Beschleunigung im macOS-Stil fuer weiches, natuerliches Scrollen. Wenn aktiviert, erhoeht sich die Scroll-Geschwindigkeit bei schnellen Gesten und bleibt praezise bei langsamen Bewegungen. **Diese Einstellung hat Vorrang vor `scroll_speed` und ueberschreibt es, wenn aktiviert.**
- `scroll_speed` - Steuert, wie schnell die TUI scrollt (Minimum: `0.001`, unterstuetzt Dezimalwerte). Standard ist `3`. **Hinweis: Wird ignoriert, wenn `scroll_acceleration.enabled` auf `true` gesetzt ist.**
- `diff_style` - Steuert die Diff-Darstellung. `"auto"` passt sich der Terminalbreite an, `"stacked"` zeigt immer ein einspaltiges Layout.
- `sidebar_position` - Steuert die Position der Seitenleiste. `"right"` (Standard) hält die Seitenleiste rechts, `"left"` verschiebt sie nach links.
Verwende `OPENCODE_

packages/web/src/content/docs/es/config.mdx

+21
@@ -164,7 +164,8 @@ Puede configurar ajustes específicos de TUI a través de la opción `tui`.
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
}
```

packages/web/src/content/docs/es/tui.mdx

+31
@@ -368,7 +368,8 @@ Puede personalizar el comportamiento de TUI a través de `tui.json` (o `tui.json
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```
@@ -381,6 +382,7 @@ Esto es independiente de `opencode.json`, que configura el comportamiento del se
- `scroll_acceleration.enabled`: habilite la aceleración de desplazamiento estilo macOS para un desplazamiento suave y natural. Cuando está habilitado, la velocidad de desplazamiento aumenta con gestos de desplazamiento rápido y se mantiene precisa para movimientos más lentos. **Esta configuración tiene prioridad sobre `scroll_speed` y la anula cuando está habilitada.**
- `scroll_speed`: controla la rapidez con la que se desplaza el TUI cuando se utilizan comandos de desplazamiento (mínimo: `0.001`, admite valores decimales). El valor predeterminado es `3`. **Nota: Esto se ignora si `scroll_acceleration.enabled` está configurado en `true`.**
- `diff_style`: controla la representación de diferencias. `"auto"` se adapta al ancho del terminal, `"stacked"` siempre muestra un diseño de una sola columna.
- `sidebar_position`: controla la posició

packages/web/src/content/docs/fr/config.mdx

+21
@@ -167,7 +167,8 @@ Utilisez un fichier dédié `tui.json` (ou `tui.jsonc`) pour les paramètres sp
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```

packages/web/src/content/docs/fr/tui.mdx

+31
@@ -368,7 +368,8 @@ Vous pouvez personnaliser le comportement de TUI via `tui.json` (ou `tui.jsonc`)
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```
@@ -381,6 +382,7 @@ Ceci est séparé de `opencode.json`, qui configure le comportement du serveur/d
- `scroll_acceleration.enabled` - Activez l'accélération de défilement de style macOS pour un défilement fluide et naturel. Lorsqu'elle est activée, la vitesse de défilement augmente avec les gestes de défilement rapides et reste précise pour les mouvements plus lents. **Ce paramètre est prioritaire sur `scroll_speed` et le remplace lorsqu'il est activé.**
- `scroll_speed` - Contrôle la vitesse de défilement du TUI lors de l'utilisation des commandes de défilement (minimum : `0.001`, prend en charge les valeurs décimales). La valeur par défaut est `3`. **Remarque : Ceci est ignoré si `scroll_acceleration.enabled` est défini sur `true`.**
- `diff_style` - Contrôle le rendu différentiel. `"auto"` s'adapte à la largeur du terminal, `"stacked"` affiche toujours une seule colonne.
- `sidebar_position` - Contrôle la position de la barre latérale.

packages/web/src/content/docs/it/config.mdx

+21
@@ -166,7 +166,8 @@ Usa un file dedicato `tui.json` (o `tui.jsonc`) per le impostazioni specifiche d
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```

packages/web/src/content/docs/it/tui.mdx

+31
@@ -365,7 +365,8 @@ Puoi personalizzare il comportamento della TUI tramite `tui.json` (o `tui.jsonc`
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```
@@ -378,6 +379,7 @@ Questo è separato da `opencode.json`, che configura il comportamento di server/
- `scroll_acceleration.enabled` - Abilita l'accelerazione di scroll in stile macOS per uno scorrimento fluido e naturale. Quando abilitata, la velocità aumenta con gesture rapide e resta precisa con movimenti lenti. **Questa impostazione ha precedenza su `scroll_speed` e lo sovrascrive quando attiva.**
- `scroll_speed` - Controlla la velocità di scorrimento della TUI quando usi i comandi di scroll (minimo: `0.001`, supporta valori decimali). Default: `3`. **Nota: viene ignorata se `scroll_acceleration.enabled` è impostato a `true`.**
- `diff_style` - Controlla il rendering delle diff. `"auto"` si adatta alla larghezza del terminale, `"stacked"` mostra sempre un layout a colonna singola.
- `sidebar_position` - Controlla la posizione della barra laterale. `"right"` (predefinito) mantiene la barra laterale a destra, `"left"` la sposta a sinis

packages/web/src/content/docs/ja/config.mdx

+21
@@ -169,7 +169,8 @@ TUI 固有の設定には、専用の `tui.json` (または `tui.jsonc`) ファ
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```

packages/web/src/content/docs/ja/tui.mdx

+31
@@ -362,7 +362,8 @@ VS Code などの一部のエディターは、`--wait` フラグを使用して
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```
@@ -375,6 +376,7 @@ VS Code などの一部のエディターは、`--wait` フラグを使用して
- `scroll_acceleration.enabled` - macOS スタイルのスクロールアクセラレーションを有効にして、スムーズで自然なスクロールを実現します。有効にすると、高速スクロールジェスチャではスクロール速度が向上し、ゆっくりとした動きでは正確なままになります。 **この設定は `scroll_speed` よりも優先され、有効になっている場合は上書きされます。**
- `scroll_speed` - スクロールコマンドを使用するときに TUI がスクロールする速度を制御します (最小: `0.001`、小数をサポート)。デフォルトは `3` です。 **注: `scroll_acceleration.enabled``true` に設定されている場合、これは無視されます。**
- `diff_style` - 差分レンダリングを制御します。 `"auto"` はターミナルの幅に適応し、`"stacked"` は常に 1 列のレイアウトを表示します。
- `sidebar_position` - サイドバーの位置を制御します。`"right"`(デフォルト)はサイドバーを右側に、`"left"` は左側に移動します。
カスタム TUI 設定パスをロードするには、`OPENCODE_TUI_CONFIG` を使用します。

packages/web/src/content/docs/ko/config.mdx

+21
@@ -166,7 +166,8 @@ TUI 관련 설정에는 전용 `tui.json` (또는 `tui.jsonc`) 파일을 사용
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```

packages/web/src/content/docs/ko/tui.mdx

+31
@@ -364,7 +364,8 @@ VS Code와 같은 일부 편집기는 `--wait` 플래그와 함께 시작해야
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```
@@ -377,6 +378,7 @@ VS Code와 같은 일부 편집기는 `--wait` 플래그와 함께 시작해야
- `scroll_acceleration.enabled` - 부드럽고 자연스러운 스크롤을 위해 macOS 스타일의 스크롤 가속을 활성화합니다. 활성화하면 빠른 스크롤 제스처로 스크롤 속도가 증가하고 느린 움직임에서는 정밀하게 유지됩니다. **이 설정은 `scroll_speed`보다 우선하며 활성화 시 이를 덮어씁니다.**
- `scroll_speed` - 스크롤 명령을 사용할 때 TUI 스크롤 속도를 제어합니다 (최소: `0.001`, 소수점 값 지원). 기본값은 `3`입니다. **참고: `scroll_acceleration.enabled``true`로 설정되면 무시됩니다.**
- `diff_style` - diff 렌더링 방식을 제어합니다. `"auto"`는 터미널 너비에 적응하고, `"stacked"`는 항상 단일 열 레이아웃을 표시합니다.
- `sidebar_position` - 사이드바 위치를 제어합니다. `"right"` (기본값)는 사이드바를 오른쪽에, `"left"`는 왼쪽으로 이동합니다.
`OPENCODE_TUI_CONFIG`를 사용하여 사용자 정의 TUI 설정 경로를 로드할 수 있습니다.

packages/web/src/content/docs/nb/config.mdx

+21
@@ -165,7 +165,8 @@ Du kan konfigurere TUI-spesifikke innstillinger gjennom alternativet `tui`.
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
}
```

packages/web/src/content/docs/nb/tui.mdx

+31
@@ -368,7 +368,8 @@ Du kan tilpasse TUI-oppførselen gjennom `tui.json` (eller `tui.jsonc`).
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```
@@ -381,6 +382,7 @@ Dette er atskilt fra `opencode.json`, som konfigurerer server-/kjøretidsoppfør
- `scroll_acceleration.enabled` - Aktiver rulleakselerasjon i macOS-stil for jevn, naturlig rulling. Når aktivert, øker rullehastigheten med raske rullebevegelser og forblir presis for langsommere bevegelser. **Denne innstillingen har forrang over `scroll_speed` og overstyrer den når den er aktivert.**
- `scroll_speed` - Styrer hvor raskt TUI ruller når du bruker rullekommandoer (minimum: `0.001`, støtter desimalverdier). Standard er `3`. **Merk: Dette ignoreres hvis `scroll_acceleration.enabled` er satt til `true`.**
- `diff_style` - Kontrollerer diff-gjengivelse. `"auto"` tilpasser seg terminalbredden, `"stacked"` viser alltid en enkeltkolonneoppsett.
- `sidebar_position` - Kontrollerer sidefeltet-plassering. `"right"` (standard) holder sidefeltet til høyre, `"left"` flytter det til venstre.
Bruk `OPENCODE_TUI_CONFIG` for å laste en egendefiner

packages/web/src/content/docs/pl/config.mdx

+21
@@ -163,7 +163,8 @@ Użyj dedykowanego pliku `tui.json` (lub `tui.jsonc`) dla ustawień specyficznyc
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```

packages/web/src/content/docs/pl/tui.mdx

+31
@@ -368,7 +368,8 @@ Możesz dostosować zachowanie TUI za pomocą pliku `tui.json` (lub `tui.jsonc`)
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```
@@ -381,6 +382,7 @@ Jest to oddzielny plik od `opencode.json`, który konfiguruje zachowanie serwera
- `scroll_acceleration.enabled` — Włącz przyspieszenie przewijania w stylu macOS, aby zapewnić płynne, naturalne przewijanie. Po włączeniu prędkość przewijania wzrasta wraz z szybkimi gestami przewijania i pozostaje precyzyjna w przypadku wolniejszych ruchów. **To ustawienie ma pierwszeństwo przed `scroll_speed` i zastępuje je, gdy jest włączone.**
- `scroll_speed` - Kontroluje szybkość przewijania TUI podczas korzystania z poleceń przewijania (minimum: `0.001`, obsługuje wartości dziesiętne). Wartość domyślna to `3`. **Uwaga: jest to ignorowane, jeśli `scroll_acceleration.enabled` jest ustawione na `true`.**
- `diff_style` - Steruje renderowaniem różnic. `"auto"` dostosowuje się do szerokości terminala, `"stacked"` zawsze pokazuje układ jednokolumnowy.
- `sidebar_position` - Steruje pozycją paska bocznego. `"right"` (domyślnie) utrzymuje pas

packages/web/src/content/docs/pt-br/config.mdx

+21
@@ -167,7 +167,8 @@ Use um arquivo `tui.json` (ou `tui.jsonc`) dedicado para configurações especí
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```

packages/web/src/content/docs/pt-br/tui.mdx

+31
@@ -365,7 +365,8 @@ Você pode personalizar o comportamento do TUI através de `tui.json` (ou `tui.j
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```
@@ -378,6 +379,7 @@ Isso é separado do `opencode.json`, que configura o comportamento do servidor/r
- `scroll_acceleration.enabled` - Ative a aceleração de rolagem no estilo macOS para uma rolagem suave e natural. Quando ativado, a velocidade de rolagem aumenta com gestos de rolagem rápidos e permanece precisa para movimentos mais lentos. **Esta configuração tem precedência sobre `scroll_speed` e a substitui quando ativada.**
- `scroll_speed` - Controla quão rápido o TUI rola ao usar comandos de rolagem (mínimo: `0.001`, suporta valores decimais). O padrão é `3`. **Nota: Isso é ignorado se `scroll_acceleration.enabled` estiver definido como `true`.**
- `diff_style` - Controla a renderização de diffs. `"auto"` se adapta à largura do terminal, `"stacked"` sempre mostra um layout de coluna única.
- `sidebar_position` - Controla a posição da barra lateral. `"right"` (padrão) mantém a barra lateral à direita, `"left"` move para a esquerda.
U

packages/web/src/content/docs/ru/config.mdx

+21
@@ -166,7 +166,8 @@ opencode run "Hello world"
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```

packages/web/src/content/docs/ru/tui.mdx

+31
@@ -368,7 +368,8 @@ How is auth handled in @packages/functions/src/api/index.ts?
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```
@@ -381,6 +382,7 @@ How is auth handled in @packages/functions/src/api/index.ts?
- `scroll_acceleration.enabled` — включите ускорение прокрутки в стиле macOS для плавной и естественной прокрутки. Если этот параметр включен, скорость прокрутки увеличивается при быстрой прокрутке и остается точной при более медленных движениях. **Этот параметр имеет приоритет над `scroll_speed` и переопределяет его, если он включен.**
- `scroll_speed` — контролирует скорость прокрутки TUI при использовании команд прокрутки (минимум: `0.001`, поддерживает десятичные значения). По умолчанию `3`. **Примечание. Это игнорируется, если для `scroll_acceleration.enabled` установлено значение `true`.**
- `diff_style` — Управляет отображением различий. `"auto"` адаптируется к ширине терминала, `"stacked"` всегда показывает одноколоночный макет.
- `sidebar_position` — Управляет расположением боковой панели. `"right"` (по умолчанию) размещает панель справа, `"left"` перемещает её влево.

packages/web/src/content/docs/th/config.mdx

+21
@@ -170,7 +170,8 @@ opencode run "Hello world"
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```

packages/web/src/content/docs/th/tui.mdx

+31
@@ -368,7 +368,8 @@ How is auth handled in @packages/functions/src/api/index.ts?
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```
@@ -381,6 +382,7 @@ How is auth handled in @packages/functions/src/api/index.ts?
- `scroll_acceleration.enabled` - ​​เปิดใช้งานการเร่งความเร็วการเลื่อนแบบ macOS เพื่อการเลื่อนที่ราบรื่นและเป็นธรรมชาติ เมื่อเปิดใช้งาน ความเร็วในการเลื่อนจะเพิ่มขึ้นตามท่าทางการเลื่อนอย่างรวดเร็ว และคงความแม่นยำไว้สำหรับการเคลื่อนไหวที่ช้าลง **การตั้งค่านี้มีความสำคัญมากกว่า `scroll_speed` และแทนที่เมื่อเปิดใช้งาน**
- `scroll_speed` - ​​ควบคุมความเร็วของการเลื่อน TUI เมื่อใช้คำสั่งการเลื่อน (ขั้นต่ำ: `0.001` รองรับค่าทศนิยม) ค่าเริ่มต้นเป็น `3` **หมายเหตุ: สิ่งนี้จะถูกละเว้นหากตั้งค่า `scroll_acceleration.enabled` เป็น `true`.**
- `diff_style` - ควบคุมการเรนเดอร์ diff `"auto"` ปรับให้เข้ากับความกว้างของ terminal `"stacked"` จะแสดงคอลัมน์เดียวเสมอ
- `sidebar_position` - ควบคุมตำแหน่งแถบด้านข้าง `"right"` (ค่าเริ่มต้น) วางแถบด้านข้างทางขวา `"left"` ย้ายไปทางซ้าย
ใช้ `OPENCODE_TUI_CONFIG` เพื่อโหลดเส้นทางการกำหนดค่า TUI แบบกำหนดเอง

packages/web/src/content/docs/tr/config.mdx

+21
@@ -164,7 +164,8 @@ TUI'ye özgü ayarları `tui` seçeneği aracılığıyla yapılandırabilirsini
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
}
```

packages/web/src/content/docs/tr/tui.mdx

+31
@@ -366,7 +366,8 @@ TUI davranışını `tui.json` (veya `tui.jsonc`) aracılığıyla özelleştire
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```
@@ -379,6 +380,7 @@ Bu, sunucu/çalışma zamanı davranışını yapılandıran `opencode.json` dos
- `scroll_acceleration.enabled` - Pürüzsüz, doğal kaydırma için macOS tarzı kaydırma ivmesini etkinleştirin. Etkinleştirildiğinde, kaydırma hızı hızlı kaydırma hareketleriyle artar ve daha yavaş hareketler için hassas kalır. **Bu ayar `scroll_speed` ayarından önceliklidir ve etkinleştirildiğinde onu geçersiz kılar.**
- `scroll_speed` - Kaydırma komutlarını kullanırken TUI'nin ne kadar hızlı kaydırılacağını kontrol eder (minimum: `0.001`, ondalık değerleri destekler). Varsayılan değer `3`'tür. **Not: `scroll_acceleration.enabled` `true` olarak ayarlanmışsa bu yok sayılır.**
- `diff_style` - Fark (diff) oluşturmayı kontrol eder. `"auto"` terminal genişliğine uyum sağlar, `"stacked"` her zaman tek sütunlu bir düzen gösterir.
- `sidebar_position` - Kenar çubuğu konumunu kontrol eder. `"right"` (varsayılan) kenar çubuğunu sağda tutar, `"left"` sola taşır.
Özel

packages/web/src/content/docs/tui.mdx

+31
@@ -368,7 +368,8 @@ You can customize TUI behavior through `tui.json` (or `tui.jsonc`).
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```
@@ -381,6 +382,7 @@ This is separate from `opencode.json`, which configures server/runtime behavior.
- `scroll_acceleration.enabled` - Enable macOS-style scroll acceleration for smooth, natural scrolling. When enabled, scroll speed increases with rapid scrolling gestures and stays precise for slower movements. **This setting takes precedence over `scroll_speed` and overrides it when enabled.**
- `scroll_speed` - Controls how fast the TUI scrolls when using scroll commands (minimum: `0.001`, supports decimal values). Defaults to `3`. **Note: This is ignored if `scroll_acceleration.enabled` is set to `true`.**
- `diff_style` - Controls diff rendering. `"auto"` adapts to terminal width, `"stacked"` always shows a single-column layout.
- `sidebar_position` - Controls sidebar placement. `"right"` (default) keeps the sidebar on the right, `"left"` moves it to the left side.
Use `OPENCODE_TUI_CONFIG` to load a custom TUI config path.

packages/web/src/content/docs/zh-cn/config.mdx

+21
@@ -161,7 +161,8 @@ opencode run "Hello world"
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
}
```

packages/web/src/content/docs/zh-cn/tui.mdx

+199
@@ -352,24 +352,34 @@ How is auth handled in @packages/functions/src/api/index.ts?
## 配置
您可以通过 OpenCode 配置文件自定义 TUI 行为。
您可以通过 `tui.json`(或 `tui.jsonc`)自定义 TUI 行为。
```json title="opencode.json"
```json title="tui.json"
{
"$schema": "https://opencode.ai/config.json",
"tui": {
"scroll_speed": 3,
"scroll_acceleration": {
"enabled": true
}
}
"$schema": "https://opencode.ai/tui.json",
"theme": "opencode",
"keybinds": {
"leader": "ctrl+x"
},
"scroll_speed": 3,
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto",
"sidebar_position": "left"
}
```
此文件独立于 `opencode.json`,后者用于配置服务器/运行时行为。
### 选项
- `theme` - 设置 UI 主题。[了解更多](/docs/themes)。
- `keybinds` - 自定义键盘快捷键。[了解更多](/docs/keybinds)。
- `scroll_acceleration` - 启用 macOS 风格的滚动加速,实现平滑、自然的滚动体验。启用后,快速滚动时速度会增加,慢速移动时保持精确。**此设置优先于 `scroll_speed`,启用时会覆盖它。**
- `scroll_speed` - 控制使用滚动命令时 TUI 的滚动速度(最小值:`1`)。默认为 `3`**注意:如果 `scroll_acceleration.enabled` 设置为 `true`,则此设置会被忽略。**
- `diff_style` - 控制差异渲染方式。`"auto"` 根据终端宽度自适应,`"stacked"` 始终显示单列。
- `sidebar_position` - 控制侧边栏位置。`"right"`(默认)将侧边栏放在右侧,`"left"` 将其移到左侧。
---

packages/web/src/content/docs/zh-tw/config.mdx

+21
@@ -161,7 +161,8 @@ opencode run "Hello world"
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
}
```

packages/web/src/content/docs/zh-tw/tui.mdx

+31
@@ -365,7 +365,8 @@ How is auth handled in @packages/functions/src/api/index.ts?
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto"
"diff_style": "auto",
"sidebar_position": "left"
}
```
@@ -378,6 +379,7 @@ How is auth handled in @packages/functions/src/api/index.ts?
- `scroll_acceleration.enabled` - 啟用 macOS 風格的捲動加速,實現平滑、自然的捲動體驗。啟用後,快速捲動時速度會增加,慢速移動時保持精確。**此設定優先於 `scroll_speed`,啟用時會覆蓋它。**
- `scroll_speed` - 控制使用捲動指令時 TUI 的捲動速度(最小值:`0.001`,支援小數值)。預設為 `3`**注意:如果 `scroll_acceleration.enabled` 設定為 `true`,則此設定會被忽略。**
- `diff_style` - 控制差異呈現方式。`"auto"` 根據終端機寬度自適應,`"stacked"` 始終顯示單列。
- `sidebar_position` - 控制側邊欄位置。`"right"`(預設)將側邊欄放在右側,`"left"` 將其移到左側。
使用 `OPENCODE_TUI_CONFIG` 載入自訂 TUI 設定路徑。