fix(docs): locale translations for nav elements and headings

This commit is contained in:
Adam
2026-02-11 18:51:27 -06:00
parent 8eea53a41e
commit aea68c386a
484 changed files with 12718 additions and 11212 deletions

View File

@@ -1,13 +1,13 @@
---
title: TUI
description: 使用 OpenCode terminal 用戶介面。
description: 使用 OpenCode 終端機使用者介面。
---
import { Tabs, TabItem } from "@astrojs/starlight/components"
OpenCode 提供了一個交互式 terminal 介面或 TUI供您與 LLM 一起處理項目
OpenCode 提供了一個互動式終端機介面或 TUI供您與 LLM 一起處理專案
行 OpenCode 會啟動當前目錄的 TUI。
行 OpenCode 會啟動當前目錄的 TUI。
```bash
opencode
@@ -19,7 +19,7 @@ opencode
opencode /path/to/project
```
進入 TUI 後,您可以通過消息進行提示。
進入 TUI 後,您可以透過訊息進行提示。
```text
Give me a quick summary of the codebase.
@@ -27,51 +27,51 @@ Give me a quick summary of the codebase.
---
## 文件參考
## 檔案參考
您可以使用 `@` 在息中引用文件。這會在當前工作目錄中進行模糊文件搜索
您可以使用 `@` 在息中引用檔案。這會在當前工作目錄中進行模糊檔案搜尋
:::tip
您還可以使用 `@` 來引用息中的文件
您還可以使用 `@` 來引用息中的檔案
:::
```text "@packages/functions/src/api/index.ts"
How is auth handled in @packages/functions/src/api/index.ts?
```
文件的內容會自動添加到對話中。
檔案的內容會自動添加到對話中。
---
## Bash
## Bash
以 `!` 開始一條息以行 shell 令。
以 `!` 開始一條息以行 shell 令。
```bash frame="none"
!ls -la
```
令的輸出將作為工具結果添加到對話中。
令的輸出將作為工具結果添加到對話中。
---
##
##
使用 OpenCode TUI 時,您可以入 `/` 後跟令名稱來快速執行操作。例如:
使用 OpenCode TUI 時,您可以入 `/` 後跟令名稱來快速執行操作。例如:
```bash frame="none"
/help
```
Most commands also have keybind using `ctrl+x` as the leader key, where `ctrl+x` is the default leader key. [了解更多](/docs/keybinds)。
大多數指令也有使用 `ctrl+x` 作為 Leader 鍵的按鍵綁定,其中 `ctrl+x` 是預設的 Leader 鍵。 [了解更多](/docs/keybinds)。
以下是所有可用的斜杠命令:
以下是所有可用的斜線指令:
---
### connect
供商添加到 OpenCode。允許您從可用的供商中進行選擇並添加其 API 鑰。
將供商添加到 OpenCode。允許您從可用的供商中進行選擇並添加其 API 鑰。
```bash frame="none"
/connect
@@ -81,7 +81,7 @@ Most commands also have keybind using `ctrl+x` as the leader key, where `ctrl+x`
### compact
壓縮當前會話。 _別名_`/summarize`
壓縮當前工作階段。 _別名_`/summarize`
```bash frame="none"
/compact
@@ -93,7 +93,7 @@ Most commands also have keybind using `ctrl+x` as the leader key, where `ctrl+x`
### details
切換工具執行詳細信息
切換工具執行詳細資訊
```bash frame="none"
/details
@@ -105,7 +105,7 @@ Most commands also have keybind using `ctrl+x` as the leader key, where `ctrl+x`
### editor
打開外部編輯器來撰寫息。使用 `EDITOR` 環境變中設的編輯器。 [了解更多](#editor-setup)。
打開外部編輯器來撰寫息。使用 `EDITOR` 環境變中設的編輯器。 [了解更多](#editor-setup)。
```bash frame="none"
/editor
@@ -129,7 +129,7 @@ Most commands also have keybind using `ctrl+x` as the leader key, where `ctrl+x`
### export
將當前對話導出到 Markdown 並在默認編輯器中打開。使用 `EDITOR` 環境變中設的編輯器。 [了解更多](#editor-setup)。
將當前對話導出到 Markdown 並在預設編輯器中打開。使用 `EDITOR` 環境變中設的編輯器。 [了解更多](#editor-setup)。
```bash frame="none"
/export
@@ -141,7 +141,7 @@ Most commands also have keybind using `ctrl+x` as the leader key, where `ctrl+x`
### help
顯示幫助對話框
顯示說明對話方塊
```bash frame="none"
/help
@@ -153,7 +153,7 @@ Most commands also have keybind using `ctrl+x` as the leader key, where `ctrl+x`
### init
建或更新`AGENTS.md` 文件。 [了解更多](/docs/rules)。
或更新 `AGENTS.md` 檔案。 [了解更多](/docs/rules)。
```bash frame="none"
/init
@@ -165,7 +165,7 @@ Most commands also have keybind using `ctrl+x` as the leader key, where `ctrl+x`
### models
列出可用型
列出可用型。
```bash frame="none"
/models
@@ -177,7 +177,7 @@ Most commands also have keybind using `ctrl+x` as the leader key, where `ctrl+x`
### new
開始新的會話。 _別名_`/clear`
開始新的工作階段。 _別名_`/clear`
```bash frame="none"
/new
@@ -189,14 +189,14 @@ Most commands also have keybind using `ctrl+x` as the leader key, where `ctrl+x`
### redo
重做之前撤消的消息。僅在使用`/undo`後可用。
重做之前撤銷的訊息。僅在使用 `/undo` 後可用。
:::tip
任何文件更改也將被恢復。
任何檔案變更也將被恢復。
:::
在內部,這使用 Git 來管理文件更改。所以你的項目**需要
是一個 Git 儲庫**。
在內部,這使用 Git 來管理檔案變更。所以你的專案**需要
是一個 Git 儲庫**。
```bash frame="none"
/redo
@@ -208,7 +208,7 @@ Most commands also have keybind using `ctrl+x` as the leader key, where `ctrl+x`
### sessions
列出會話並在會話之間切換。 _別名_`/resume`、`/continue`
列出工作階段並在工作階段之間切換。 _別名_`/resume`、`/continue`
```bash frame="none"
/sessions
@@ -220,7 +220,7 @@ Most commands also have keybind using `ctrl+x` as the leader key, where `ctrl+x`
### share
享當前會話。 [了解更多](/docs/share)。
享當前工作階段。 [了解更多](/docs/share)。
```bash frame="none"
/share
@@ -244,10 +244,10 @@ Most commands also have keybind using `ctrl+x` as the leader key, where `ctrl+x`
### thinking
切換對話中思/推理塊的可見性。啟用後,您可以看到支擴展思的模型的推理過程。
切換對話中思/推理塊的可見性。啟用後,您可以看到支擴展思的模型的推理過程。
:::note
令僅控制是否**顯示** - 它不啟用或禁用模型的推理功能。要切換實際推理功能,請使用 `ctrl+t` 循環切換模型變體。
令僅控制是否**顯示** - 它不啟用或禁用模型的推理功能。要切換實際推理功能,請使用 `ctrl+t` 循環切換模型變體。
:::
```bash frame="none"
@@ -258,14 +258,14 @@ Most commands also have keybind using `ctrl+x` as the leader key, where `ctrl+x`
### undo
對話中的最後一條息。刪除最近的用戶消息、所有後續應以及任何文件更改
對話中的最後一條息。刪除最近的使用者訊息、所有後續應以及任何檔案變更
:::tip
所做的任何文件更改也將被恢復。
所做的任何檔案變更也將被恢復。
:::
在內部,這使用 Git 來管理文件更改。所以你的項目**需要
是一個 Git 儲庫**。
在內部,這使用 Git 來管理檔案變更。所以你的專案**需要
是一個 Git 儲庫**。
```bash frame="none"
/undo
@@ -277,7 +277,7 @@ Most commands also have keybind using `ctrl+x` as the leader key, where `ctrl+x`
### unshare
取消享當前會話。 [了解更多](/docs/share#un-sharing)。
取消享當前工作階段。 [了解更多](/docs/share#un-sharing)。
```bash frame="none"
/unshare
@@ -285,9 +285,9 @@ Most commands also have keybind using `ctrl+x` as the leader key, where `ctrl+x`
---
## 編輯器設
## 編輯器設
`/editor` 和`/export` 令都使用`EDITOR` 環境變中指定的編輯器。
`/editor` 和 `/export` 令都使用 `EDITOR` 環境變中指定的編輯器。
<Tabs>
<TabItem label="Linux/macOS">
@@ -346,16 +346,16 @@ Most commands also have keybind using `ctrl+x` as the leader key, where `ctrl+x`
- `subl` - Sublime Text
:::note
某些編輯器(例如 VS Code需要以 `--wait` 標啟動。
某些編輯器(例如 VS Code需要以 `--wait` 標啟動。
:::
某些編輯器需要命令參數才能在阻止模式下行。 `--wait` 標使編輯器進程阻塞直到關閉。
某些編輯器需要命令參數才能在阻止模式下行。 `--wait` 標使編輯器處理程序阻塞直到關閉。
---
## 配置
您可以過 OpenCode 配置文件自定義 TUI 行為。
您可以過 OpenCode 設定檔自定義 TUI 行為。
```json title="opencode.json"
{
@@ -371,20 +371,20 @@ Most commands also have keybind using `ctrl+x` as the leader key, where `ctrl+x`
### 選項
- `scroll_acceleration` - 啟用 macOS 風格的動加速,實現平滑、自然的動。啟用後,動速度會隨著快速動手勢而增加,並在較慢的移動時保持精確。 **此設優先於`scroll_speed`,並在啟用時覆它。 **
- `scroll_speed` - 控制使用滾動命令時 TUI 動的速度(最小值:`1`)。默認為`3`。 **注意:如果`scroll_acceleration.enabled` 設置為`true`,則忽略此設置。 **
- `scroll_acceleration` - 啟用 macOS 風格的動加速,實現平滑、自然的動。啟用後,動速度會隨著快速動手勢而增加,並在較慢的移動時保持精確。 **此設優先於 `scroll_speed`,並在啟用時覆它。**
- `scroll_speed` - 控制使用捲動指令時 TUI 動的速度(最小值:`1`)。預設為 `3`。 **注意:如果 `scroll_acceleration.enabled` 設定為 `true`,則忽略此設定。**
---
## 定制化
## 自定義
您可以使用命令選項板(`ctrl+x h` 或`/help`)自定義 TUI 視圖的各個方面。這些設在重新啟動後仍然存在。
您可以使用指令面板(`ctrl+x h` 或 `/help`)自定義 TUI 視圖的各個方面。這些設在重新啟動後仍然存在。
---
#### 用戶名顯示
#### 使用者名稱顯示
切換您的用戶名是否出現在聊天息中。過以下方式訪問
切換您的使用者名稱是否出現在聊天息中。過以下方式存取
- 令面板:搜索“用戶名”或“隱藏用戶名”
- 該設會自動保留並在 TUI 會話中被記住
- 令面板:搜尋「使用者名稱」或「隱藏使用者名稱」
- 該設會自動保留並在 TUI 工作階段中被記住