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,13 +1,13 @@
---
title: 定制工具
description: 建法學碩士可以在opencode中調用的工具。
description: 建法學碩士可以在opencode中用的工具。
---
自定义工具是您创建的函数LLM 可以在对话期间调用。它们与 opencode 的[内置工具](/docs/tools) 一起工作,例如 `read`、`write` 和 `bash`。
---
## 建工具
## 建工具
工具定义为 **TypeScript** 或 **JavaScript** 文件。但是,工具定义调用可以使用 **任何语言** 编写的脚本 - TypeScript 或 JavaScript 仅用于工具定义本身。
@@ -15,7 +15,7 @@ description: 創建法學碩士可以在opencode中調用的工具。
### 地點
它們可以定義
它們可以定義
- 通过将它们放在项目的 `.opencode/tools/` 目录中来本地进行。
- 或者在全局范围内,将它们放在 `~/.config/opencode/tools/` 中。
@@ -45,9 +45,9 @@ export default tool({
---
#### 每文件多工具
#### 每文件多工具
可以從單文件導出多工具。每導出都會成為**一單獨的工具**,名稱為**`<filename>_<exportname>`**
可以從單文件導出多工具。每導出都会成为**一單獨的工具**,名称为**`<filename>_<exportname>`**
```ts title=".opencode/tools/math.ts"
import { tool } from "@opencode-ai/plugin"
@@ -110,7 +110,7 @@ export default {
### 情境
工具接收有關當前會話的上下文:
工具接收有關当前会话的上下文:
```ts title=".opencode/tools/project.ts" {8}
import { tool } from "@opencode-ai/plugin"
@@ -147,7 +147,7 @@ b = int(sys.argv[2])
print(a + b)
```
然後創建調用它的工具定義:
然後创建调用它的工具定義:
```ts title=".opencode/tools/python-add.ts" {10}
import { tool } from "@opencode-ai/plugin"