fix(docs): locale translations

This commit is contained in:
Adam
2026-02-10 07:11:13 -06:00
parent 19ad7ad809
commit 4c4e30cd71
351 changed files with 3744 additions and 3765 deletions

View File

@@ -1,6 +1,6 @@
---
title: 命令
description: 為重複任務創建自定命令。
description: 为重复任务创建自定命令。
---
自定义命令允许您指定在 TUI 中执行该命令时要运行的提示。
@@ -13,7 +13,7 @@ description: 為重複任務創建自定義命令。
---
## 建命令文件
## 建命令文件
在`commands/`目录中创建markdown文件来定义自定义命令。
@@ -32,7 +32,7 @@ Focus on the failing tests and suggest fixes.
frontmatter 定义命令属性。内容成为模板。
鍵入 `/` 後跟命令名來使用命令。
鍵入 `/` 後跟命令名來使用命令。
```bash frame="none"
"/test"
@@ -75,7 +75,7 @@ frontmatter 定义命令属性。内容成为模板。
---
### 降價
### Markdown
您还可以使用 Markdown 文件定义命令。将它们放入:
@@ -104,7 +104,7 @@ Markdown 文件名成为命令名。例如,`test.md` 让
## 提示配置
自定義命令的提示支持幾特殊的佔位符和語法。
自定義命令的提示支持幾特殊的佔位符和語法。
---
@@ -129,11 +129,11 @@ Include proper typing and basic structure.
`$ARGUMENTS` 将替换为 `Button`。
可以使用位置參數訪問各個參數:
可以使用位置參數访问各个參數:
- `$1` - 第一參數
- `$2` - 第二參數
- `$3` - 第三參數
- `$1` - 第一參數
- `$2` - 第二參數
- `$3` - 第三參數
- 等等...
例如:
@@ -153,7 +153,7 @@ with the following content: $3
/create-file config.json src "{ \"key\": \"value\" }"
```
取代了:
取代了:
- `$1` 与 `config.json`
- `$2` 与 `src`
@@ -165,7 +165,7 @@ with the following content: $3
使用 _!`command`_ 将 [bash命令](/docs/tui#bash-commands) 输出注入到提示符中。
例如,要建分析測試覆率的自定義命令:
例如,要建分析測試覆率的自定義命令:
```md title=".opencode/commands/analyze-coverage.md"
---
@@ -191,13 +191,13 @@ Recent git commits:
Review these changes and suggest any improvements.
```
命令在項目的根目中運行,其輸出成提示的一部分。
命令在項目的根目中運行,其輸出成提示的一部分。
---
### 文件參考
使用 `@` 後跟文件名文件包含在命令中。
使用 `@` 後跟文件名文件包含在命令中。
```md title=".opencode/commands/review-component.md"
---
@@ -208,13 +208,13 @@ Review the component in @src/components/Button.tsx.
Check for performance issues and suggest improvements.
```
文件內容會自動包含在提示中。
文件內容会自动包含在提示中。
---
## 選項
讓我詳細看看配置選項。
讓我詳細看看配置選項。
---
@@ -232,7 +232,7 @@ Check for performance issues and suggest improvements.
}
```
是一**必需的**配置選項。
是一**必需的**配置選項。
---
@@ -270,14 +270,14 @@ Check for performance issues and suggest improvements.
}
```
是一**可選**配置選項。如果未指定,默認為您當前的代理。
是一**可選**配置選項。如果未指定,默認为您当前的代理。
---
### 子任
### 子任
使用`subtask`布尔值强制命令触发[子代理](/docs/agents/#subagents)调用。
如果您希望命令不污染您的主要上下文並且將**強制**代理充子代理,那麼非常有用,
如果您希望命令不污染您的主要上下文并且将**強制**代理充子代理,那麼非常有用,
即使`mode`在[代理人](/docs/agents)配置上设置为`primary`。
```json title="opencode.json"
@@ -290,7 +290,7 @@ Check for performance issues and suggest improvements.
}
```
是一**可選**配置選項。
是一**可選**配置選項。
---
@@ -308,7 +308,7 @@ Check for performance issues and suggest improvements.
}
```
是一**可選**配置選項。
是一**可選**配置選項。
---
@@ -317,7 +317,7 @@ Check for performance issues and suggest improvements.
opencode包含`/init`、`/undo`、`/redo`、`/share`、`/help`等内置命令;【了解更多](/docs/tui#commands)。
:::note
自定義命令可以覆蓋內置命令。
自定義命令可以覆盖内置命令。
:::
如果您定義同名的自定義命令,它將覆蓋內置命令。
如果您定義同名的自定義命令,它将覆盖内置命令。