mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-21 16:14:45 +00:00
fix(docs): locale translations for nav elements and headings
This commit is contained in:
@@ -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 工作階段中被記住
|
||||
|
||||
Reference in New Issue
Block a user