diff options
| author | Adam <[email protected]> | 2026-02-11 18:51:27 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2026-02-11 18:51:50 -0600 |
| commit | aea68c386a4f64cf718c3eeee9dffec8409ee6b0 (patch) | |
| tree | bdf06cb3372c6c48c97c43b41e53e514888a52b3 /packages/web/src/content/docs/zh-cn | |
| parent | 8eea53a41e92257d1a4ad6653d0d2930465bf34a (diff) | |
| download | opencode-aea68c386a4f64cf718c3eeee9dffec8409ee6b0.tar.gz opencode-aea68c386a4f64cf718c3eeee9dffec8409ee6b0.zip | |
fix(docs): locale translations for nav elements and headings
Diffstat (limited to 'packages/web/src/content/docs/zh-cn')
32 files changed, 369 insertions, 369 deletions
diff --git a/packages/web/src/content/docs/zh-cn/acp.mdx b/packages/web/src/content/docs/zh-cn/acp.mdx index 14f898148..47e0f3e05 100644 --- a/packages/web/src/content/docs/zh-cn/acp.mdx +++ b/packages/web/src/content/docs/zh-cn/acp.mdx @@ -69,7 +69,7 @@ ACP 是一种开放协议,用于标准化代码编辑器和 AI 编码代理之 ### JetBrains IDE -根据 [docs](https://www.jetbrains.com/help/ai-assistant/acp.html) 添加到你的 [JetBrains IDE](https://www.jetbrains.com/) `acp.json`: +根据 [文档](https://www.jetbrains.com/help/ai-assistant/acp.html) 添加到你的 [JetBrains IDE](https://www.jetbrains.com/) `acp.json`: ```json title="acp.json" { diff --git a/packages/web/src/content/docs/zh-cn/agents.mdx b/packages/web/src/content/docs/zh-cn/agents.mdx index c22ccb934..a94296f45 100644 --- a/packages/web/src/content/docs/zh-cn/agents.mdx +++ b/packages/web/src/content/docs/zh-cn/agents.mdx @@ -1,5 +1,5 @@ --- -title: Agents +title: 代理 description: 配置和使用专门的代理。 --- @@ -19,22 +19,22 @@ OpenCode 有两种类型的代理;主代理和子代理。 --- -### Primary 代理 +### 主代理 -Primary 代理是与您直接交互的主要助手。您可以使用 **Tab** 键或您配置的 `switch_agent` 键绑定循环浏览它们。这些代理处理您的主要对话。工具访问是通过权限配置的 - 例如,“Build”启用了所有工具,而“Plan”则受到限制。 +主代理 (Primary) 是与您直接交互的主要助手。您可以使用 **Tab** 键或您配置的 `switch_agent` 键绑定循环浏览它们。这些代理处理您的主要对话。工具访问是通过权限配置的 - 例如,“Build”启用了所有工具,而“Plan”则受到限制。 :::tip -您可以在会话期间使用 **Tab** 键在 Primary 代理之间进行切换。 +您可以在会话期间使用 **Tab** 键在主代理之间进行切换。 ::: -OpenCode 附带两个内置的 Primary 代理:**Build** 和 **Plan**。 +OpenCode 附带两个内置的主代理:**Build** 和 **Plan**。 看看下面这些。 --- -### Subagents (子代理) +### 子代理 -Subagents (子代理) 是 Primary 代理可以调用来执行特定任务的专业助手。您还可以通过在消息中 **@提及** 它们来手动调用它们。 +子代理 (Subagents) 是主代理可以调用来执行特定任务的专业助手。您还可以通过在消息中 **@提及** 它们来手动调用它们。 OpenCode 附带两个内置子代理:**General** 和 **Explore**。我们将在下面看看这个。 @@ -110,10 +110,10 @@ _模式_:`primary` ## 用法 -1. 对于 Primary 代理,请在会话期间使用 **Tab** 键循环浏览它们。您还可以使用配置的 `switch_agent` 键绑定。 +1. 对于主代理,请在会话期间使用 **Tab** 键循环浏览它们。您还可以使用配置的 `switch_agent` 键绑定。 2. 可以调用子代理: - - **自动**由 Primary 代理根据其描述执行专门任务。 + - **自动**由主代理根据其描述执行专门任务。 - 通过在消息中 **@提及** 子代理手动进行。例如。 ```txt frame="none" @@ -346,7 +346,7 @@ Markdown 文件名成为代理名称。例如,`review.md` 创建 `review` 代� 使用 `model` 配置此代理的模型。对于使用针对不同任务优化的不同模型很有帮助。例如,更快的规划模型、更强大的实施模型。 :::tip -如果您不指定模型,Primary 代理将使用 [全局配置的模型](/docs/config#models),而子代理将使用调用子代理的 Primary 代理的模型。 +如果您不指定模型,主代理将使用 [全局配置的模型](/docs/config#models),而子代理将使用调用子代理的主代理的模型。 ::: ```json title="opencode.json" diff --git a/packages/web/src/content/docs/zh-cn/cli.mdx b/packages/web/src/content/docs/zh-cn/cli.mdx index 532285dde..6d2ea032d 100644 --- a/packages/web/src/content/docs/zh-cn/cli.mdx +++ b/packages/web/src/content/docs/zh-cn/cli.mdx @@ -27,22 +27,22 @@ opencode run "Explain how closures work in JavaScript" opencode [project] ``` -#### Flags +#### 标志 -| Flag | Short | Description | -| ------------ | ----- | --------------------------------------------------------- | -| `--continue` | `-c` | 继续上一个会话 | -| `--session` | `-s` | 继续的会话 ID | -| `--fork` | | 继续时分叉会话(与 `--continue` 或 `--session` 一起使用) | -| `--prompt` | | 使用的提示 | -| `--model` | `-m` | 使用的模型 (provider/model) | -| `--agent` | | 使用的代理 | -| `--port` | | 监听端口 | -| `--hostname` | | 监听的主机名 | +| 标志 | 简写 | 描述 | +| ------------ | ---- | --------------------------------------------------------- | +| `--continue` | `-c` | 继续上一个会话 | +| `--session` | `-s` | 继续的会话 ID | +| `--fork` | | 继续时分叉会话(与 `--continue` 或 `--session` 一起使用) | +| `--prompt` | | 使用的提示 | +| `--model` | `-m` | 使用的模型 (provider/model) | +| `--agent` | | 使用的代理 | +| `--port` | | 监听端口 | +| `--hostname` | | 监听的主机名 | --- -## Commands +## 命令 opencode CLI 还具有以下命令。 @@ -76,12 +76,12 @@ opencode web --port 4096 --hostname 0.0.0.0 opencode attach http://10.20.30.40:4096 ``` -#### Flags +#### 标志 -| Flag | Short | Description | -| ----------- | ----- | ------------------- | -| `--dir` | | 启动 TUI 的工作目录 | -| `--session` | `-s` | 继续的会话 ID | +| 标志 | 简写 | 描述 | +| ----------- | ---- | ------------------- | +| `--dir` | | 启动 TUI 的工作目录 | +| `--session` | `-s` | 继续的会话 ID | --- @@ -185,9 +185,9 @@ opencode github install opencode github run ``` -##### Flags +#### 标志 -| Flag | Description | +| 标志 | 描述 | | --------- | ------------------------------ | | `--event` | 用于运行代理的 GitHub 模拟事件 | | `--token` | GitHub 个人访问 Token | @@ -294,9 +294,9 @@ opencode models [provider] opencode models anthropic ``` -#### Flags +#### 标志 -| Flag | Description | +| 标志 | 描述 | | ----------- | ---------------------------------------- | | `--refresh` | 从 models.dev 刷新模型缓存 | | `--verbose` | 使用更详细的模型输出(包括成本等元数据) | @@ -333,22 +333,22 @@ opencode serve opencode run --attach http://localhost:4096 "Explain async/await in JavaScript" ``` -#### Flags +#### 标志 -| Flag | Short | Description | -| ------------ | ----- | --------------------------------------------------------------- | -| `--command` | | 要运行的命令,使用消息作为参数 | -| `--continue` | `-c` | 继续上一个会话 | -| `--session` | `-s` | 继续的会话 ID | -| `--fork` | | 继续时分叉会话(与 `--continue` 或 `--session` 一起使用) | -| `--share` | | 分享会话 | -| `--model` | `-m` | 使用的模型 (provider/model) | -| `--agent` | | 使用的代理 | -| `--file` | `-f` | 要附加到消息的文件 | -| `--format` | | 格式:default(格式化)或 json(原始 JSON 事件) | -| `--title` | | 会话标题(如果未提供值,则使用截断的提示) | -| `--attach` | | 连接到正在运行的 opencode 服务器(例如,http://localhost:4096) | -| `--port` | | 本地服务器的端口(默认为随机端口) | +| 标志 | 简写 | 描述 | +| ------------ | ---- | --------------------------------------------------------------- | +| `--command` | | 要运行的命令,使用消息作为参数 | +| `--continue` | `-c` | 继续上一个会话 | +| `--session` | `-s` | 继续的会话 ID | +| `--fork` | | 继续时分叉会话(与 `--continue` 或 `--session` 一起使用) | +| `--share` | | 分享会话 | +| `--model` | `-m` | 使用的模型 (provider/model) | +| `--agent` | | 使用的代理 | +| `--file` | `-f` | 要附加到消息的文件 | +| `--format` | | 格式:default(格式化)或 json(原始 JSON 事件) | +| `--title` | | 会话标题(如果未提供值,则使用截断的提示) | +| `--attach` | | 连接到正在运行的 opencode 服务器(例如,http://localhost:4096) | +| `--port` | | 本地服务器的端口(默认为随机端口) | --- @@ -362,9 +362,9 @@ opencode serve 这将启动一个 HTTP 服务器,该服务器提供对 opencode 功能的 API 访问,无需 TUI 界面。设置 `OPENCODE_SERVER_PASSWORD` 以启用 HTTP 基本身份验证(用户名默认为 `opencode`)。 -#### Flags +#### 标志 -| Flag | Description | +| 标志 | 描述 | | ------------ | ------------------------ | | `--port` | 监听端口 | | `--hostname` | 监听的主机名 | @@ -391,12 +391,12 @@ opencode session [command] opencode session list ``` -##### Flags +##### 标志 -| Flag | Short | Description | -| ------------- | ----- | ------------------------------ | -| `--max-count` | `-n` | 限制为最近的 N 个会话 | -| `--format` | | 输出格式:table 或 json(table) | +| 标志 | 简写 | 描述 | +| ------------- | ---- | ------------------------------ | +| `--max-count` | `-n` | 限制为最近的 N 个会话 | +| `--format` | | 输出格式:table 或 json(table) | --- @@ -408,9 +408,9 @@ opencode session list opencode stats ``` -#### Flags +#### 标志 -| Flag | Description | +| 标志 | 描述 | | ----------- | -------------------------------------------------------- | | `--days` | 显示过去 N 天(所有时间)的统计数据 | | `--tools` | 显示工具数量(全部) | @@ -458,9 +458,9 @@ opencode web 这将启动 HTTP 服务器并打开 Web 浏览器以通过 Web 界面访问 opencode。设置 `OPENCODE_SERVER_PASSWORD` 以启用 HTTP 基本身份验证(用户名默认为 `opencode`)。 -#### Flags +#### 标志 -| Flag | Description | +| 标志 | 描述 | | ------------ | ------------------------ | | `--port` | 监听端口 | | `--hostname` | 监听的主机名 | @@ -479,9 +479,9 @@ opencode acp 此命令启动一个 ACP 服务器,该服务器使用 nd-JSON 通过 stdin/stdout 进行通信。 -#### Flags +#### 标志 -| Flag | Description | +| 标志 | 描述 | | ------------ | ------------ | | `--cwd` | 工作目录 | | `--port` | 监听端口 | @@ -497,14 +497,14 @@ opencode acp opencode uninstall ``` -#### Flags +#### 标志 -| Flag | Short | Description | -| --------------- | ----- | ---------------------------- | -| `--keep-config` | `-c` | 保留配置文件 | -| `--keep-data` | `-d` | 保留会话数据和快照 | -| `--dry-run` | | 显示将删除的内容但不实际删除 | -| `--force` | `-f` | 跳过确认提示 | +| 标志 | 简写 | 描述 | +| --------------- | ---- | ---------------------------- | +| `--keep-config` | `-c` | 保留配置文件 | +| `--keep-data` | `-d` | 保留会话数据和快照 | +| `--dry-run` | | 显示将删除的内容但不实际删除 | +| `--force` | `-f` | 跳过确认提示 | --- @@ -528,32 +528,32 @@ opencode upgrade opencode upgrade v0.1.48 ``` -#### Flags +#### 标志 -| Flag | Short | Description | -| ---------- | ----- | ------------------------------------------ | -| `--method` | `-m` | 使用的安装方法;curl, npm, pnpm, bun, brew | +| 标志 | 简写 | 描述 | +| ---------- | ---- | ------------------------------------------ | +| `--method` | `-m` | 使用的安装方法;curl, npm, pnpm, bun, brew | --- -## Global Flags +## 全局标志 opencode CLI 接受以下全局标志。 -| Flag | Short | Description | -| -------------- | ----- | ----------------------------------- | -| `--help` | `-h` | 显示帮助 | -| `--version` | `-v` | 打印版本号 | -| `--print-logs` | | 将日志打印到 stderr | -| `--log-level` | | 日志级别 (DEBUG, INFO, WARN, ERROR) | +| 标志 | 简写 | 描述 | +| -------------- | ---- | ----------------------------------- | +| `--help` | `-h` | 显示帮助 | +| `--version` | `-v` | 打印版本号 | +| `--print-logs` | | 将日志打印到 stderr | +| `--log-level` | | 日志级别 (DEBUG, INFO, WARN, ERROR) | --- -## Environment variables +## 环境变量 可以使用环境变量配置 opencode。 -| Variable | Type | Description | +| 变量 | 类型 | 描述 | | ------------------------------------- | ------- | ----------------------------------------- | | `OPENCODE_AUTO_SHARE` | boolean | 自动共享会话 | | `OPENCODE_GIT_BASH_PATH` | string | Windows 上 Git Bash 可执行文件的路径 | @@ -582,11 +582,11 @@ opencode CLI 接受以下全局标志。 --- -### Experimental +### 实验性功能 这些环境变量启用可能会更改或删除的实验性功能。 -| Variable | Type | Description | +| 变量 | 类型 | 描述 | | ----------------------------------------------- | ------- | ----------------------------------- | | `OPENCODE_EXPERIMENTAL` | boolean | 启用所有实验性功能 | | `OPENCODE_EXPERIMENTAL_ICON_DISCOVERY` | boolean | 启用图标发现 | diff --git a/packages/web/src/content/docs/zh-cn/commands.mdx b/packages/web/src/content/docs/zh-cn/commands.mdx index 5c04f638f..548b681b0 100644 --- a/packages/web/src/content/docs/zh-cn/commands.mdx +++ b/packages/web/src/content/docs/zh-cn/commands.mdx @@ -1,5 +1,5 @@ --- -title: Commands +title: 命令 description: 为重复任务创建自定义命令。 --- @@ -108,7 +108,7 @@ Markdown 文件名成为命令名。例如,`test.md` 让 --- -### Arguments +### 参数 使用 `$ARGUMENTS` 占位符将参数提交给命令。 @@ -161,7 +161,7 @@ with the following content: $3 --- -### Shell Output +### Shell 输出 使用 _!`command`_ 将 [bash 命令](/docs/tui#bash-commands) 输出注入到提示符中。 @@ -195,7 +195,7 @@ Review these changes and suggest any improvements. --- -### File Reference +### 文件引用 使用 `@` 后跟文件名将文件包含在命令中。 diff --git a/packages/web/src/content/docs/zh-cn/config.mdx b/packages/web/src/content/docs/zh-cn/config.mdx index 93b6c0366..e07e4601f 100644 --- a/packages/web/src/content/docs/zh-cn/config.mdx +++ b/packages/web/src/content/docs/zh-cn/config.mdx @@ -56,7 +56,7 @@ opencode 支持 **JSON** 和 **JSONC**(带注释的 JSON)格式。 --- -### Remote +### 远程 组织可以通过 `.well-known/opencode` 端点提供默认配置。当您向支持的提供商进行身份验证时,会自动获取该信息。 @@ -92,7 +92,7 @@ opencode 支持 **JSON** 和 **JSONC**(带注释的 JSON)格式。 --- -### Global +### 全局 将全局 opencode 配置放在 `~/.config/opencode/opencode.json` 中。使用全局配置来实现用户范围的首选项,例如主题、提供商或按键绑定。 @@ -100,7 +100,7 @@ opencode 支持 **JSON** 和 **JSONC**(带注释的 JSON)格式。 --- -### Per Project +### 项目级 在项目根目录中添加 `opencode.json`。项目配置在标准配置文件中具有最高优先级 - 它覆盖全局配置和远程配置。 @@ -114,7 +114,7 @@ opencode 支持 **JSON** 和 **JSONC**(带注释的 JSON)格式。 --- -### Custom Path +### 自定义路径 使用 `OPENCODE_CONFIG` 环境变量指定自定义配置文件路径。 @@ -127,7 +127,7 @@ opencode run "Hello world" --- -### Custom Directory +### 自定义目录 使用 `OPENCODE_CONFIG_DIR` 环境变量指定自定义配置目录。将在该目录中搜索代理、命令、模式和插件,就像标准 `.opencode` 目录一样,并且应该遵循相同的结构。 @@ -175,7 +175,7 @@ opencode run "Hello world" --- -### Server +### 服务器 您可以通过 `opencode serve` 选项为 `opencode web` 和 `server` 命令配置服务器设置。 @@ -204,7 +204,7 @@ opencode run "Hello world" --- -### Tools +### 工具 您可以通过 `tools` 选项管理 LLM 可以使用的工具。 @@ -222,7 +222,7 @@ opencode run "Hello world" --- -### Models +### 模型 您可以通过 `provider`、`model` 和 `small_model` 选项来配置要在 opencode 配置中使用的提供商和模型。 @@ -295,7 +295,7 @@ Bearer Tokens (`AWS_BEARER_TOKEN_BEDROCK` 或 `/connect`) 优先于基于配置� --- -### Theme +### 主题 您可以通过 opencode 配置中的 `theme` 选项配置要使用的主题。 @@ -310,7 +310,7 @@ Bearer Tokens (`AWS_BEARER_TOKEN_BEDROCK` 或 `/connect`) 优先于基于配置� --- -### Agents +### 代理 您可以通过 `agent` 选项为特定任务配置专用代理。 @@ -336,7 +336,7 @@ Bearer Tokens (`AWS_BEARER_TOKEN_BEDROCK` 或 `/connect`) 优先于基于配置� --- -### Default Agent +### 默认代理 您可以使用 `default_agent` 选项设置默认代理。当没有明确指定时,这将确定使用哪个代理。 @@ -353,7 +353,7 @@ Bearer Tokens (`AWS_BEARER_TOKEN_BEDROCK` 或 `/connect`) 优先于基于配置� --- -### Share +### 分享 您可以通过 `share` 选项配置 [分享](/docs/share) 功能。 @@ -374,7 +374,7 @@ Bearer Tokens (`AWS_BEARER_TOKEN_BEDROCK` 或 `/connect`) 优先于基于配置� --- -### Command +### 命令 您可以通过 `command` 选项为重复任务配置自定义命令。 @@ -400,7 +400,7 @@ Bearer Tokens (`AWS_BEARER_TOKEN_BEDROCK` 或 `/connect`) 优先于基于配置� --- -### Keybinds +### 快捷键 您可以通过 `keybinds` 选项自定义您的按键绑定。 @@ -415,7 +415,7 @@ Bearer Tokens (`AWS_BEARER_TOKEN_BEDROCK` 或 `/connect`) 优先于基于配置� --- -### Autoupdate +### 自动更新 opencode 将在启动时自动下载任何新的更新。您可以使用 `autoupdate` 选项禁用此功能。 @@ -431,7 +431,7 @@ opencode 将在启动时自动下载任何新的更新。您可以使用 `autoup --- -### Formatters +### 格式化程序 您可以通过 `formatter` 选项配置代码格式化程序。 @@ -457,7 +457,7 @@ opencode 将在启动时自动下载任何新的更新。您可以使用 `autoup --- -### Permissions +### 权限 默认情况下,opencode **允许所有操作**,无需明确批准。您可以使用 `permission` 选项更改此设置。 @@ -477,7 +477,7 @@ opencode 将在启动时自动下载任何新的更新。您可以使用 `autoup --- -### Compaction +### 压缩 您可以通过 `compaction` 选项控制上下文压缩行为。 @@ -496,7 +496,7 @@ opencode 将在启动时自动下载任何新的更新。您可以使用 `autoup --- -### Watcher +### 观察器 您可以通过 `watcher` 选项配置文件观察器忽略模式。 @@ -513,7 +513,7 @@ opencode 将在启动时自动下载任何新的更新。您可以使用 `autoup --- -### MCP Servers +### MCP 服务器 您可以通过 `mcp` 选项配置要使用的 MCP 服务器。 @@ -528,7 +528,7 @@ opencode 将在启动时自动下载任何新的更新。您可以使用 `autoup --- -### Plugins +### 插件 [Plugins](/docs/plugins) 使用自定义工具、挂钩和集成扩展 opencode。 @@ -545,7 +545,7 @@ opencode 将在启动时自动下载任何新的更新。您可以使用 `autoup --- -### Instructions +### 指令 您可以通过 `instructions` 选项配置您正在使用的模型的说明。 @@ -560,7 +560,7 @@ opencode 将在启动时自动下载任何新的更新。您可以使用 `autoup --- -### Disabled Providers +### 禁用提供商 您可以通过 `disabled_providers` 选项禁用自动加载的提供商。当您想要阻止加载某些提供商(即使其凭据可用)时,这非常有用。 @@ -583,7 +583,7 @@ opencode 将在启动时自动下载任何新的更新。您可以使用 `autoup --- -### Enabled Providers +### 启用提供商 您可以通过 `enabled_providers` 选项指定允许的提供商列表。设置后,仅启用指定的提供商,所有其他提供商将被忽略。 @@ -604,7 +604,7 @@ opencode 将在启动时自动下载任何新的更新。您可以使用 `autoup --- -### Experimental +### 实验性功能 `experimental` 键包含正在积极开发的选项。 @@ -621,13 +621,13 @@ opencode 将在启动时自动下载任何新的更新。您可以使用 `autoup --- -## Variables +## 变量 您可以在配置文件中使用变量替换来引用环境变量和文件内容。 --- -### Env Vars +### 环境变量 使用 `{env:VARIABLE_NAME}` 替换环境变量: @@ -650,7 +650,7 @@ opencode 将在启动时自动下载任何新的更新。您可以使用 `autoup --- -### Files +### 文件 使用 `{file:path/to/file}` 替换文件的内容: diff --git a/packages/web/src/content/docs/zh-cn/custom-tools.mdx b/packages/web/src/content/docs/zh-cn/custom-tools.mdx index 503b1e1df..211df7c01 100644 --- a/packages/web/src/content/docs/zh-cn/custom-tools.mdx +++ b/packages/web/src/content/docs/zh-cn/custom-tools.mdx @@ -13,7 +13,7 @@ description: 创建 LLM 可以在 opencode 中调用的工具。 --- -### Location +### 位置 它们可以定义为: @@ -22,7 +22,7 @@ description: 创建 LLM 可以在 opencode 中调用的工具。 --- -### Structure +### 结构 创建工具最简单的方法是使用 `tool()` 帮助程序,它提供类型安全和验证。 @@ -79,7 +79,7 @@ export const multiply = tool({ --- -### Arguments +### 参数 您可以使用 `tool.schema`(即 [Zod](https://zod.dev))来定义参数类型。 @@ -108,7 +108,7 @@ export default { --- -### Context +### 上下文 工具接收有关当前会话的上下文: diff --git a/packages/web/src/content/docs/zh-cn/ecosystem.mdx b/packages/web/src/content/docs/zh-cn/ecosystem.mdx index 92639f08d..25689beb1 100644 --- a/packages/web/src/content/docs/zh-cn/ecosystem.mdx +++ b/packages/web/src/content/docs/zh-cn/ecosystem.mdx @@ -1,5 +1,5 @@ --- -title: Ecosystem +title: 生态系统 description: 使用 opencode 构建的项目和集成。 --- @@ -13,44 +13,44 @@ description: 使用 opencode 构建的项目和集成。 --- -## Plugins +## 插件 -| 名称 | 描述 | -| --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -| [opencode-daytona](https://github.com/jamesmurdza/daytona/blob/main/guides/typescript/opencode/README.md) | 在隔离的 Daytona 沙箱中自动运行 opencode 会话,并使用 git 同步和实时预览 | -| [opencode-helicone-session](https://github.com/H2Shami/opencode-helicone-session) | 自动注入 Helicone 会话标头以进行请求包 | -| [opencode-type-inject](https://github.com/nick-vi/opencode-type-inject) | 使用查找工具将 TypeScript/Svelte 类型自动注入到文件读取中 | -| [opencode-openai-codex-auth](https://github.com/numman-ali/opencode-openai-codex-auth) | 使用您的 ChatGPT Plus 或 Pro 订阅而不是 API 积分 | -| [opencode-gemini-auth](https://github.com/jenslys/opencode-gemini-auth) | 使用您现有的 Gemini 计划而不是 API 密钥 | -| [opencode-antigravity-auth](https://github.com/NoeFabris/opencode-antigravity-auth) | 使用 Antigravity 的免费模型代替 API | -| [opencode-devcontainers](https://github.com/athal7/opencode-devcontainers) | 具有浅克隆和自动分配端口的多分支开发容器隔离 | -| [opencode-google-antigravity-auth](https://github.com/shekohex/opencode-google-antigravity-auth) | Google Antigravity OAuth 插件,支持 Google 搜索和更强大的 API 处理 | -| [opencode-dynamic-context-pruning](https://github.com/Tarquinen/opencode-dynamic-context-pruning) | 通过修剪过时的工具输出来优化 token 使用 | -| [opencode-websearch-cited](https://github.com/ghoulr/opencode-websearch-cited.git) | 为具有 Google 接地风格的受支持增加本机网络搜索支持 | -| [opencode-pty](https://github.com/shekohex/opencode-pty.git) | 使 AI 代理能够在 PTY 中运行后台进程,末端发送其交互输入。 | -| [opencode-shell-strategy](https://github.com/JRedeker/opencode-shell-strategy) | Non-interactive shell command instructions - prevent TTY-dependent operations from hanging | -| [opencode-wakatime](https://github.com/angristan/opencode-wakatime) | 使用 Wakatime 跟踪 opencode 使用情况 | -| [opencode-md-table-formatter](https://github.com/franlol/opencode-md-table-formatter/tree/main) | 清理 LLM 生成的 markdown 表 | -| [opencode-morph-fast-apply](https://github.com/JRedeker/opencode-morph-fast-apply) | 使用 Morph Fast Apply API 和取消编辑标记将代码编辑速度提高 10 倍 | -| [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode) | 后台代理、预构建的 LSP/AST/MCP 工具、精选代理、兼容 Claude Code | -| [opencode-notificator](https://github.com/panta82/opencode-notificator) | opencode 会话的桌面通知和声音警报 | -| [opencode-notifier](https://github.com/mohak34/opencode-notifier) | 针对权限、完成和错误事件的桌面通知和声音警报 | -| [opencode-zellij-namer](https://github.com/24601/opencode-zellij-namer) | 基于 opencode 上下文的 AI 支持的自动 Zellij 会话命名 | -| [opencode-skillful](https://github.com/zenobi-us/opencode-skillful) | 允许 opencode 代理通过技能发现和注入失败延迟加载提示 | -| [opencode-supermemory](https://github.com/supermemoryai/opencode-supermemory) | 使用 Supermemory 跨会话持久内存 | -| [@plannotator/opencode](https://github.com/backnotprop/plannotator/tree/main/apps/opencode-plugin) | 具有视觉注释和私人/离线共享的交互式计划审查 | -| [@openspoon/subtask2](https://github.com/spoons-and-mirrors/subtask2) | 将 opencode/命令扩展为具有精细流程控制的强大编排系统 | -| [opencode-scheduler](https://github.com/different-ai/opencode-scheduler) | 使用带 cron 语法的 launchd (Mac) 或 systemd (Linux) 安排重复作业 | -| [micode](https://github.com/vtemian/micode) | 塑造头脑风暴 → 计划 → 实施具有会议连续性的工作流程 | -| [octto](https://github.com/vtemian/octto) | 用于通过多问题形式进行 AI 头脑风暴的交互式浏览器 UI | -| [opencode-background-agents](https://github.com/kdcokenny/opencode-background-agents) | 具有异步委托和上下文持久性的 Claude Code 风格后台代理 | -| [opencode-notify](https://github.com/kdcokenny/opencode-notify) | opencode 的本机操作系统通知 – 了解任务何时完成 | -| [opencode-workspace](https://github.com/kdcokenny/opencode-workspace) | 一堆多代理编排工具 – 16个,组件一次安装 | -| [opencode-worktree](https://github.com/kdcokenny/opencode-worktree) | opencode 的零难度 git 工作树 | +| 名称 | 描述 | +| --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | +| [opencode-daytona](https://github.com/jamesmurdza/daytona/blob/main/guides/typescript/opencode/README.md) | 在隔离的 Daytona 沙箱中自动运行 opencode 会话,并使用 git 同步和实时预览 | +| [opencode-helicone-session](https://github.com/H2Shami/opencode-helicone-session) | 自动注入 Helicone 会话标头以进行请求包 | +| [opencode-type-inject](https://github.com/nick-vi/opencode-type-inject) | 使用查找工具将 TypeScript/Svelte 类型自动注入到文件读取中 | +| [opencode-openai-codex-auth](https://github.com/numman-ali/opencode-openai-codex-auth) | 使用您的 ChatGPT Plus 或 Pro 订阅而不是 API 积分 | +| [opencode-gemini-auth](https://github.com/jenslys/opencode-gemini-auth) | 使用您现有的 Gemini 计划而不是 API 密钥 | +| [opencode-antigravity-auth](https://github.com/NoeFabris/opencode-antigravity-auth) | 使用 Antigravity 的免费模型代替 API | +| [opencode-devcontainers](https://github.com/athal7/opencode-devcontainers) | 具有浅克隆和自动分配端口的多分支开发容器隔离 | +| [opencode-google-antigravity-auth](https://github.com/shekohex/opencode-google-antigravity-auth) | Google Antigravity OAuth 插件,支持 Google 搜索和更强大的 API 处理 | +| [opencode-dynamic-context-pruning](https://github.com/Tarquinen/opencode-dynamic-context-pruning) | 通过修剪过时的工具输出来优化 token 使用 | +| [opencode-websearch-cited](https://github.com/ghoulr/opencode-websearch-cited.git) | 为具有 Google 接地风格的受支持增加本机网络搜索支持 | +| [opencode-pty](https://github.com/shekohex/opencode-pty.git) | 使 AI 代理能够在 PTY 中运行后台进程,末端发送其交互输入。 | +| [opencode-shell-strategy](https://github.com/JRedeker/opencode-shell-strategy) | 非交互式 shell 命令指令 - 防止依赖 TTY 的操作挂起 | +| [opencode-wakatime](https://github.com/angristan/opencode-wakatime) | 使用 Wakatime 跟踪 opencode 使用情况 | +| [opencode-md-table-formatter](https://github.com/franlol/opencode-md-table-formatter/tree/main) | 清理 LLM 生成的 markdown 表 | +| [opencode-morph-fast-apply](https://github.com/JRedeker/opencode-morph-fast-apply) | 使用 Morph Fast Apply API 和取消编辑标记将代码编辑速度提高 10 倍 | +| [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode) | 后台代理、预构建的 LSP/AST/MCP 工具、精选代理、兼容 Claude Code | +| [opencode-notificator](https://github.com/panta82/opencode-notificator) | opencode 会话的桌面通知和声音警报 | +| [opencode-notifier](https://github.com/mohak34/opencode-notifier) | 针对权限、完成和错误事件的桌面通知和声音警报 | +| [opencode-zellij-namer](https://github.com/24601/opencode-zellij-namer) | 基于 opencode 上下文的 AI 支持的自动 Zellij 会话命名 | +| [opencode-skillful](https://github.com/zenobi-us/opencode-skillful) | 允许 opencode 代理通过技能发现和注入失败延迟加载提示 | +| [opencode-supermemory](https://github.com/supermemoryai/opencode-supermemory) | 使用 Supermemory 跨会话持久内存 | +| [@plannotator/opencode](https://github.com/backnotprop/plannotator/tree/main/apps/opencode-plugin) | 具有视觉注释和私人/离线共享的交互式计划审查 | +| [@openspoon/subtask2](https://github.com/spoons-and-mirrors/subtask2) | 将 opencode/命令扩展为具有精细流程控制的强大编排系统 | +| [opencode-scheduler](https://github.com/different-ai/opencode-scheduler) | 使用带 cron 语法的 launchd (Mac) 或 systemd (Linux) 安排重复作业 | +| [micode](https://github.com/vtemian/micode) | 塑造头脑风暴 → 计划 → 实施具有会议连续性的工作流程 | +| [octto](https://github.com/vtemian/octto) | 用于通过多问题形式进行 AI 头脑风暴的交互式浏览器 UI | +| [opencode-background-agents](https://github.com/kdcokenny/opencode-background-agents) | 具有异步委托和上下文持久性的 Claude Code 风格后台代理 | +| [opencode-notify](https://github.com/kdcokenny/opencode-notify) | opencode 的本机操作系统通知 – 了解任务何时完成 | +| [opencode-workspace](https://github.com/kdcokenny/opencode-workspace) | 一堆多代理编排工具 – 16个,组件一次安装 | +| [opencode-worktree](https://github.com/kdcokenny/opencode-worktree) | opencode 的零难度 git 工作树 | --- -## Projects +## 项目 | 名称 | 描述 | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------- | @@ -68,7 +68,7 @@ description: 使用 opencode 构建的项目和集成。 --- -## Agents +## 代理 | 名称 | 描述 | | ----------------------------------------------------------------- | ---------------------------------------- | diff --git a/packages/web/src/content/docs/zh-cn/enterprise.mdx b/packages/web/src/content/docs/zh-cn/enterprise.mdx index 9970dd4f1..d4ababa2d 100644 --- a/packages/web/src/content/docs/zh-cn/enterprise.mdx +++ b/packages/web/src/content/docs/zh-cn/enterprise.mdx @@ -1,18 +1,18 @@ --- -title: Enterprise +title: 企业版 description: 在您的组织中安全地使用 opencode。 --- import config from "../../../../config.mjs" export const email = `mailto:${config.email}` -opencode Enterprise 适用于希望确保其代码和数据永远不会离开其基础设施的组织。它可以通过使用与 SSO 和内部 AI 网关集成的集中方式配置来实现此目的。 +opencode 企业版适用于希望确保其代码和数据永远不会离开其基础设施的组织。它可以通过使用与 SSO 和内部 AI 网关集成的集中方式配置来实现此目的。 :::note opencode 不存储您的任何代码或上下文数据。 ::: -要开始使用 opencode Enterprise: +要开始使用 opencode 企业版: 1. 与您的团队进行内部试用。 2. **<a href={email}>联系我们</a>** 讨论定价和实施选项。 @@ -72,7 +72,7 @@ opencode 是开源的,不存储您的任何代码或上下文数据,因此� --- -### Central Config +### 中央配置 我们可以将 opencode 设置为您的整个组织使用单一的中央配置。 @@ -80,7 +80,7 @@ opencode 是开源的,不存储您的任何代码或上下文数据,因此� --- -### SSO Integration +### SSO 集成 通过中央配置,opencode 可以与您组织的 SSO 提供商集成以进行身份验证。 @@ -88,7 +88,7 @@ opencode 是开源的,不存储您的任何代码或上下文数据,因此� --- -### Internal AI Gateway +### 内部 AI 网关 通过中央配置,opencode 还可以配置为仅使用您的内部 AI 网关。 @@ -96,7 +96,7 @@ opencode 是开源的,不存储您的任何代码或上下文数据,因此� --- -### Self-hosting +### 自托管 虽然我们建议禁用共享页面以确保您的数据永远不会离开您的组织,我们还可以帮助您在您的基础设施上自行托管它们。 @@ -104,17 +104,17 @@ opencode 是开源的,不存储您的任何代码或上下文数据,因此� --- -## FAQ +## 常见问题 <details> -<summary>什么是 opencode Enterprise?</summary> +<summary>什么是 opencode 企业版?</summary> -opencode Enterprise 适用于希望确保其代码和数据永远不会离开其基础设施的组织。它可以通过使用与 SSO 和内部 AI 网关集成的集中方式配置来实现此目的。 +opencode 企业版适用于希望确保其代码和数据永远不会离开其基础设施的组织。它可以通过使用与 SSO 和内部 AI 网关集成的集中方式配置来实现此目的。 </details> <details> -<summary>如何开始使用 opencode Enterprise?</summary> +<summary>如何开始使用 opencode 企业版?</summary> 与您的团队进行内部实验即可。opencode 默认情况下不存储您的代码或上下文数据,可以轻松上手。 @@ -130,7 +130,7 @@ opencode Enterprise 适用于希望确保其代码和数据永远不会离开其 </details> <details> -<summary>opencode Enterprise 保证我的数据安全吗?</summary> +<summary>opencode 企业版保证我的数据安全吗?</summary> 是的。opencode 不存储您的代码或上下文数据。所有处理都在本地进行或通过直接 API 调用您的 AI 提供商。通过中央配置和 SSO 集成,您的数据在组织的基础架构中保持安全。 diff --git a/packages/web/src/content/docs/zh-cn/formatters.mdx b/packages/web/src/content/docs/zh-cn/formatters.mdx index 25d5e2777..8e080d85f 100644 --- a/packages/web/src/content/docs/zh-cn/formatters.mdx +++ b/packages/web/src/content/docs/zh-cn/formatters.mdx @@ -7,11 +7,11 @@ description: opencode 使用特定于语言的格式化程序。 --- -## Built-in +## 内置 opencode 附带了多个适用于流行语言和框架的内置格式化程序。下面是格式化程序、支持的文件扩展名以及所需的命令或配置选项的列表。 -| Formatter | Extensions | Requirements | +| 格式化程序 | 扩展名 | 要求 | | -------------------- | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | | gofmt | .go | `gofmt` command available | | mix | .ex, .exs, .eex, .heex, .leex, .neex, .sface | `mix` command available | @@ -67,7 +67,7 @@ opencode 附带了多个适用于流行语言和框架的内置格式化程序� 每个格式化程序配置支持以下内容: -| Property | Type | Description | +| 属性 | 类型 | 描述 | | ------------- | -------- | ---------------------------------- | | `disabled` | boolean | 将其设置为 `true` 以禁用格式化程序 | | `command` | string[] | 格式化运行的命令 | diff --git a/packages/web/src/content/docs/zh-cn/github.mdx b/packages/web/src/content/docs/zh-cn/github.mdx index 4e63ace80..b9b80d0dd 100644 --- a/packages/web/src/content/docs/zh-cn/github.mdx +++ b/packages/web/src/content/docs/zh-cn/github.mdx @@ -7,7 +7,7 @@ opencode 与您的 GitHub 工作流程集成。在评论中提及 `/opencode` � --- -## Features +## 功能 - **Triage issues**: 要求 opencode 调查问题并向您解释。 - **Fix and implement**: 要求 opencode 修复问题或实施功能。将在一个新的分支中工作并提交包含所有更改的 PR。 @@ -27,7 +27,7 @@ opencode github install --- -### Manual Setup +### 手动设置 或者您可以手动设置。 @@ -79,7 +79,7 @@ opencode github install --- -## Configuration +## 配置 - `model`:与 opencode 一起使用的模型。采用 `provider/model` 格式。这是 **必需的**。 - `agent`:要使用的代理。必须是一级代理。如果未找到,则从配置回退到 `default_agent` 或 `"build"`。 @@ -101,11 +101,11 @@ opencode github install --- -## Supported Events +## 支持的事件 opencode 可以由以下 GitHub 事件触发: -| Event Type | Triggered By | Details | +| 事件类型 | 触发方式 | 详情 | | ----------------------------- | ---------------------------- | --------------------------------------------------------------------------------------- | | `issue_comment` | 对问题或 PR 发表评论 | 在评论中提及 `/opencode` 或 `/oc`。 opencode 读取上下文并可以创建分支、打开 PR 或回复。 | | `pull_request_review_comment` | 对 PR 中的特定代码行进行评论 | 在检查代码时提及 `/opencode` 或 `/oc`。 opencode 接收文件路径、行号和 diff 上下文。 | @@ -114,7 +114,7 @@ opencode 可以由以下 GitHub 事件触发: | `schedule` | 基于 Cron 的计划 | 按计划运行 opencode。需要 `prompt` 输入。输出进入日志和 PR(没有可评论的问题)。 | | `workflow_dispatch` | 从 GitHub UI 手动触发 | 通过“操作”选项卡触发 opencode。需要 `prompt` 输入。输出进入日志和 PR。 | -### Schedule Example +### 计划示例 按计划运行 opencode 以执行自动化任务: @@ -154,7 +154,7 @@ jobs: --- -### Pull Request Example +### Pull Request 示例 或更新 PR 时自动审核: @@ -195,7 +195,7 @@ jobs: --- -### Issue Triage Example +### Issue 分类示例 自动分类新问题。此示例过滤超过 30 天的账户以减少垃圾邮件: @@ -250,7 +250,7 @@ jobs: --- -## Custom Prompt +## 自定义提示 覆盖默认提示,为您的工作流程自定义 opencode 的行为。 diff --git a/packages/web/src/content/docs/zh-cn/gitlab.mdx b/packages/web/src/content/docs/zh-cn/gitlab.mdx index c63369f8d..e9c474e62 100644 --- a/packages/web/src/content/docs/zh-cn/gitlab.mdx +++ b/packages/web/src/content/docs/zh-cn/gitlab.mdx @@ -17,7 +17,7 @@ opencode 在常规 GitLab 管道中工作。您可以将其构建为管道 [CI � --- -### Features +### 功能 - **Use custom configuration per job**: 使用自定义配置目录配置 opencode,例如 `./config/#custom-directory` 以启用或禁用 opencode 调用的功能。 - **Authentication**: Uses OIDC for secure authentication @@ -25,7 +25,7 @@ opencode 在常规 GitLab 管道中工作。您可以将其构建为管道 [CI � --- -### Setup +### 设置 1. 将 opencode 身份验证 JSON 作为文件类型 CI 环境变量存储在 **Settings** > **CI/CD** > **Variables** 下。确保将它们标记为“隐藏和隐藏”。 2. 将以下内容添加到您的 `.gitlab-ci.yml` 文件中。 @@ -51,7 +51,7 @@ opencode 与您的 GitLab 工作流程集成。 --- -### Features +### 功能 - **Triage issues**: 要求 opencode 调查问题并向您解释。 - **Fix and implement**: 要求 opencode 修复问题或实施功能。 @@ -60,7 +60,7 @@ opencode 与您的 GitLab 工作流程集成。 --- -### Setup +### 设置 opencode 在您的 GitLab CI/CD 管道中运行,您需要进行以下设置: @@ -156,7 +156,7 @@ opencode 在您的 GitLab CI/CD 管道中运行,您需要进行以下设置: --- -### Examples +### 示例 以下是如何在 GitLab 中使用 opencode 的一些示例。 diff --git a/packages/web/src/content/docs/zh-cn/ide.mdx b/packages/web/src/content/docs/zh-cn/ide.mdx index 64999cc23..fb3a92bec 100644 --- a/packages/web/src/content/docs/zh-cn/ide.mdx +++ b/packages/web/src/content/docs/zh-cn/ide.mdx @@ -28,7 +28,7 @@ opencode 与 VS Code、Cursor 或任何支持终端的 IDE 集成。只需在终 --- -### Manual Installation +### 手动安装 在扩展市场中搜索 **opencode**,然后单击 **Install**。 diff --git a/packages/web/src/content/docs/zh-cn/index.mdx b/packages/web/src/content/docs/zh-cn/index.mdx index ad1389bc2..bc7122137 100644 --- a/packages/web/src/content/docs/zh-cn/index.mdx +++ b/packages/web/src/content/docs/zh-cn/index.mdx @@ -1,5 +1,5 @@ --- -title: Introduction +title: 介绍 description: 开始使用 opencode。 --- @@ -15,7 +15,7 @@ export const console = config.console --- -#### Prerequisites +#### 先决条件 要在终端中使用 opencode,您需要: @@ -89,17 +89,17 @@ curl -fsSL https://opencode.ai/install | bash #### Windows -:::tip[Recommended: 使用 WSL] +:::tip[推荐:使用 WSL] 为了在 Windows 上获得最佳体验,我们建议使用 [Windows Subsystem for Linux (WSL)](/docs/windows-wsl)。它提供了更好的性能并与 opencode 的功能完全兼容。 ::: -- **Using Chocolatey** +- **使用 Chocolatey** ```bash choco install opencode ``` -- **Using Scoop** +- **使用 Scoop** ```bash scoop install opencode @@ -111,7 +111,7 @@ curl -fsSL https://opencode.ai/install | bash npm install -g opencode-ai ``` -- **Using Mise** +- **使用 Mise** ```bash mise use -g github:anomalyco/opencode @@ -157,7 +157,7 @@ curl -fsSL https://opencode.ai/install | bash --- -## Initialization +## 初始化 现在您已经配置了提供商,您可以导航到一个项目 你想继续工作。 @@ -197,7 +197,7 @@ opencode --- -### Asking Questions +### 提问 您可以要求 opencode 向您解释代码库。 @@ -213,13 +213,13 @@ How is authentication handled in @packages/functions/src/api/index.ts --- -### Adding Features +### 添加功能 您可以要求 opencode 向您的项目添加新功能。但是我们首先建议要求它制定一个计划。 -1. **Create a plan** +1. **创建计划** - opencode 有一个 _Plan Mode_,该模式禁止其进行更改和 + opencode 有一个 _计划模式_,该模式禁止其进行更改和 相反,建议 _如何_ 实现该功能。 使用 **Tab** 键切换到它。您会在右下角有一个指示符。 @@ -244,7 +244,7 @@ How is authentication handled in @packages/functions/src/api/index.ts 想。 ::: -2. **Iterate on the plan** +2. **迭代计划** 一旦它为您提供了计划,您就可以提供反馈或添加更多详细信息。 @@ -260,9 +260,9 @@ How is authentication handled in @packages/functions/src/api/index.ts opencode 可以扫描您提供的任何图像并将其添加到提示中。您可以 通过将图像拖放到终端中来完成此操作。 -3. **Build the feature** +3. **构建功能** - 一旦您对计划感到满意,请切换回 _Build Mode_ + 一旦您对计划感到满意,请切换回 _构建模式_ 再次按 **Tab** 键。 ```bash frame="none" @@ -277,7 +277,7 @@ How is authentication handled in @packages/functions/src/api/index.ts --- -### Making Changes +### 进行更改 对于更直接的更改,您可以要求 opencode 直接构建它 无需先审查计划。 diff --git a/packages/web/src/content/docs/zh-cn/keybinds.mdx b/packages/web/src/content/docs/zh-cn/keybinds.mdx index fb1188676..0ecd7c9bf 100644 --- a/packages/web/src/content/docs/zh-cn/keybinds.mdx +++ b/packages/web/src/content/docs/zh-cn/keybinds.mdx @@ -1,5 +1,5 @@ --- -title: Keybinds +title: 快捷键 description: 自定义您的按键绑定。 --- @@ -105,7 +105,7 @@ opencode 有一个按键绑定列表,您可以通过 opencode 配置进行自� --- -## Leader key +## Leader 键 opencode 对大多数按键绑定使用 `leader` 键。这可以避免终端中的冲突。 @@ -115,7 +115,7 @@ opencode 对大多数按键绑定使用 `leader` 键。这可以避免终端中� --- -## Disable keybind +## 禁用按键绑定 您可以通过将按键添加到您的配置中并使用值“none”来禁用按键绑定。 @@ -130,11 +130,11 @@ opencode 对大多数按键绑定使用 `leader` 键。这可以避免终端中� --- -## Desktop prompt shortcuts +## 桌面提示快捷键 opencode 桌面应用程序提示输入支持常见的 Readline/Emacs 风格的文本编辑快捷方式。这些是内置的,目前无法通过 `opencode.json` 进行配置。 -| Shortcut | Action | +| 快捷键 | 动作 | | -------- | ------------------------- | | `ctrl+a` | 移至当前行起点 | | `ctrl+e` | 移至当前行尾 | diff --git a/packages/web/src/content/docs/zh-cn/lsp.mdx b/packages/web/src/content/docs/zh-cn/lsp.mdx index 184c8be98..cc81810cc 100644 --- a/packages/web/src/content/docs/zh-cn/lsp.mdx +++ b/packages/web/src/content/docs/zh-cn/lsp.mdx @@ -1,5 +1,5 @@ --- -title: LSP Servers +title: LSP 服务器 description: opencode 与您的 LSP 服务器集成。 --- @@ -7,11 +7,11 @@ opencode 与您的语言服务器协议 (LSP) 集成,以帮助 LLM 与您的� --- -## Built-in +## 内置 opencode 附带了多种适用于流行语言的内置 LSP 服务器: -| LSP Server | Extensions | Requirements | +| LSP 服务器 | 扩展名 | 要求 | | ------------------ | ------------------------------------------------------------------- | ------------------------------------------------ | | astro | .astro | Astro 项目自动安装 | | bash | .sh, .bash, .zsh, .ksh | 自动安装 bash-language-server | @@ -63,7 +63,7 @@ opencode 附带了多种适用于流行语言的内置 LSP 服务器: --- -## Configure +## 配置 您可以通过 opencode 配置中的 `lsp` 部分自定义 LSP 服务器。 @@ -76,7 +76,7 @@ opencode 附带了多种适用于流行语言的内置 LSP 服务器: 每个 LSP 服务器支持以下功能: -| Property | Type | Description | +| 属性 | 类型 | 描述 | | ---------------- | -------- | ----------------------------------- | | `disabled` | boolean | 将其设置为 `true` 以禁用 LSP 服务器 | | `command` | string[] | 启动 LSP 服务器的命令 | @@ -88,7 +88,7 @@ opencode 附带了多种适用于流行语言的内置 LSP 服务器: --- -### Environment Variables +### 环境变量 启动 LSP 服务器时使用 `env` 参数设置环境变量: @@ -107,7 +107,7 @@ opencode 附带了多种适用于流行语言的内置 LSP 服务器: --- -### Initialization Options +### 初始化选项 使用 `initialization` 属性将初始化选项传递给 LSP 服务器。这些是在 LSP `initialize` 请求发送期间的服务器特定设置: @@ -132,7 +132,7 @@ opencode 附带了多种适用于流行语言的内置 LSP 服务器: --- -### Disabling LSP servers +### 禁用 LSP 服务器 要全局禁用 **所有** LSP 服务,将 `lsp` 设置为 `false`: @@ -158,7 +158,7 @@ opencode 附带了多种适用于流行语言的内置 LSP 服务器: --- -### Custom LSP servers +### 自定义 LSP 服务器 您可以通过指定命令和文件扩展名来添加自定义 LSP 服务器: @@ -176,7 +176,7 @@ opencode 附带了多种适用于流行语言的内置 LSP 服务器: --- -## Additional Information +## 其他信息 ### PHP Intelephense diff --git a/packages/web/src/content/docs/zh-cn/mcp-servers.mdx b/packages/web/src/content/docs/zh-cn/mcp-servers.mdx index e884a76d8..eb0015638 100644 --- a/packages/web/src/content/docs/zh-cn/mcp-servers.mdx +++ b/packages/web/src/content/docs/zh-cn/mcp-servers.mdx @@ -1,5 +1,5 @@ --- -title: MCP服务器 +title: MCP 服务器 description: 添加本地和远程MCP工具。 --- @@ -9,7 +9,7 @@ description: 添加本地和远程MCP工具。 --- -#### 注意事項 +#### 注意事项 当您使用 MCP 服务器时,它会添加到上下文中。如果您有很多工具,这会很快增加。因此,我们建议您选择使用哪些 MCP 服务器。 @@ -21,7 +21,7 @@ MCP服务器会添加到您的上下文中,因此您需要小心启用哪些� --- -## 使能夠 +## 启用 您可以在`mcp`下的[opencode配置](https://opencode.ai/docs/config/)中定义MCP服务器。为每个MCP添加唯一的名称。当提示LLM时,您可以通过名称引用该MCP。 @@ -44,7 +44,7 @@ MCP服务器会添加到您的上下文中,因此您需要小心启用哪些� --- -### 覆盖遠程默認值 +### 覆盖远程默认值 组织可以通过其 `.well-known/opencode` 端点提供默认的 MCP 服务器。这些服务器可能默认被禁用,允许用户选择他们需要的服务器。 @@ -67,7 +67,7 @@ MCP服务器会添加到您的上下文中,因此您需要小心启用哪些� --- -## 当地的 +## 本地 使用`type`将本地MCP服务器添加到MCP对像中的`"local"`。 @@ -112,11 +112,11 @@ use the mcp_everything tool to add the number 3 and 4 --- -#### 選項 +#### 选项 以下是配置本地 MCP 服务器的所有选项。 -| 選項 | 類型 | 必填 | 描述 | +| 选项 | 类型 | 必填 | 描述 | | ------------- | ------ | ---- | -------------------------------------------------------------- | | `type` | 字符串 | 是 | MCP 服务器连接类型,必须是`"local"`。 | | `command` | 数据库 | 是 | 运行 MCP 服务器的命令和参数。 | @@ -126,7 +126,7 @@ use the mcp_everything tool to add the number 3 and 4 --- -## 偏僻的 +## 远程 通过将`type`设置为ZZPH1Z添加远程MCP服务器。 @@ -150,9 +150,9 @@ use the mcp_everything tool to add the number 3 and 4 --- -#### 選項 +#### 选项 -| 選項 | 類型 | 必填 | 描述 | +| 选项 | 类型 | 必填 | 描述 | | ---------- | ------ | ---- | -------------------------------------------------------------- | | `headers` | 字符串 | 是 | MCP 服务器连接类型,必须是`type`。 | | `"remote"` | 字符串 | 是 | 远程 MCP 服务器的 URL。 | @@ -163,7 +163,7 @@ use the mcp_everything tool to add the number 3 and 4 --- -## 開放認證 +## OAuth opencode自动处理远程MCP服务器的OAuth身份验证。当服务器需要身份验证时,opencode将: @@ -173,7 +173,7 @@ opencode自动处理远程MCP服务器的OAuth身份验证。当服务器需要� --- -### 自动的 +### 自动 对于大多数支持 OAuth 的 MCP 配置服务器,不需要特殊配置。只需远程服务器: @@ -193,7 +193,7 @@ opencode自动处理远程MCP服务器的OAuth身份验证。当服务器需要� --- -### 預登記 +### 预注册 如果您有来自MCP服务器强大的客户端,则可以配置它们: @@ -216,7 +216,7 @@ opencode自动处理远程MCP服务器的OAuth身份验证。当服务器需要� --- -### 正在驗證 +### 身份验证 您可以手动觸發身份验证或管理憑據。 @@ -266,14 +266,14 @@ opencode mcp logout my-oauth-server #### OAuth 选项 -| 選項 | 類型 | 描述 | +| 选项 | 类型 | 描述 | | -------------- | --------------- | --------------------------------------------------- | | `false` | 对象 \| `oauth` | OAuth 配置对象,或 `false` 以取消 OAuth 自动检测。 | | `clientId` | 字符串 | OAuth 客户端 ID。如果未提供,将尝试动态客户端注册。 | | `clientSecret` | 字符串 | OAuth客户端密钥(如果需要授权服务器)。 | | `scope` | 字符串 | 授权期间请求的 OAuth 范围。 | -#### 偵錯 +#### 调试 如果远程MCP服务器无法进行身份验证,您可以通过以下方式诊断问题: @@ -295,7 +295,7 @@ opencode mcp debug my-oauth-server --- -### 全球的 +### 全局 这意味著您可以全局启用或禁用它們。 diff --git a/packages/web/src/content/docs/zh-cn/models.mdx b/packages/web/src/content/docs/zh-cn/models.mdx index d9376a431..1a9b5b4c0 100644 --- a/packages/web/src/content/docs/zh-cn/models.mdx +++ b/packages/web/src/content/docs/zh-cn/models.mdx @@ -25,7 +25,7 @@ opencode 使用 [AI SDK](https://ai-sdk.dev/) 和 [Models.dev](https://models.de --- -## 推薦模型 +## 推荐模型 那裡有很多模型,每週都会有新模型問世。 @@ -46,7 +46,7 @@ opencode 使用 [AI SDK](https://ai-sdk.dev/) 和 [Models.dev](https://models.de --- -## 设置默認值 +## 设置默认值 要将其中之一设置为默認模型,您可以在您的 打開代碼配置。 @@ -135,11 +135,11 @@ opencode 使用 [AI SDK](https://ai-sdk.dev/) 和 [Models.dev](https://models.de --- -## 變體 +## 变体 许多模型支持具有不同配置的多种变体。opencode附带了流行建设的内置默认变体。 -### 内置變體 +### 内置变体 opencode 附带了许多重大的默认变体: @@ -168,7 +168,7 @@ opencode 附带了许多重大的默认变体: 该列表并不全面。許多其他提供商也有内置的默認值。 ::: -### 定制變體 +### 自定义变体 您可以覆盖現有變體或添加您自己的變體: @@ -195,13 +195,13 @@ opencode 附带了许多重大的默认变体: } ``` -### 循環變體 +### 循环变体 使用按键绑定`variant_cycle`在变体之间快速切换。 [了解更多](/docs/keybinds)。 --- -## 加載模型 +## 加载模型 当opencode启动时,它会按以下优先顺序检查模型: diff --git a/packages/web/src/content/docs/zh-cn/modes.mdx b/packages/web/src/content/docs/zh-cn/modes.mdx index 1c9091d63..f4c2c78fd 100644 --- a/packages/web/src/content/docs/zh-cn/modes.mdx +++ b/packages/web/src/content/docs/zh-cn/modes.mdx @@ -10,26 +10,26 @@ description: 不同的模式適用于不同的用例。 opencode 中的模式允许自定义不同的示例行为、工具和提示。 -它具有两种内置模式:**構建**和**計劃**。您可以定制 +它具有两种内置模式:**构建**和**计划**。您可以定制 这些或通过 opencode 配置配置您自己的。 您可以在会话期間在模式之間切換或在配置文件中配置它們。 --- -## 內建 +## 内置 opencode 有两种内置模式。 --- -### 建造 +### 构建 構建是启用所有工具的**默認**模式。这是開發工作的標準模式,您需要完全访问文件操作和系統命令。 --- -### 計劃 +### 计划 专为規劃和分析而設計的受限模式。在計劃模式下,默認情况下禁用以下工具: @@ -42,7 +42,7 @@ opencode 有两种内置模式。 --- -## 交換 +## 切换 您可以在会话期间使用 _Tab_ 键在模式之间切换。或者您配置的 `switch_mode` 键绑定。 @@ -132,7 +132,7 @@ Markdown 文件名成为模式名称(例如,`review.md` 创建`review` 模� --- -### 溫度 +### 温度 使用`temperature`配置控制AI响应的随机性和创造。较低的值使响应更加集中和确定,而较高的值则增加创造力和可变性。 @@ -177,7 +177,7 @@ Markdown 文件名成为模式名称(例如,`review.md` 创建`review` 模� --- -### 迅速的 +### 提示词 使用 `prompt` 配置为模式指定自定义系统提示文件。提示文件应包含特定于该模式用途的指令。 @@ -241,7 +241,7 @@ Markdown 文件名成为模式名称(例如,`review.md` 创建`review` 模� --- -## 自定義模式 +## 自定义模式 您可以通过将自定義模式添加到配置來创建自己的自定義模式。以下是使用这两种方法的示例: @@ -322,8 +322,8 @@ Priorities: 以下是不同模式的一些常見用例。 -- **構建模式**:启用所有工具的完整開發工作 -- **計劃模式**:分析和計劃,無需更改 +- **构建模式**:启用所有工具的完整開發工作 +- **计划模式**:分析和計劃,無需更改 - **审阅模式**:使用只讀访问权限和文档工具進行代碼审阅 - **调试模式**:专注于启用bash和读取工具的调查 - **文档模式**:使用文件操作但不使用系統命令的文档編寫 diff --git a/packages/web/src/content/docs/zh-cn/network.mdx b/packages/web/src/content/docs/zh-cn/network.mdx index 3cb6f4810..f64d099c6 100644 --- a/packages/web/src/content/docs/zh-cn/network.mdx +++ b/packages/web/src/content/docs/zh-cn/network.mdx @@ -1,5 +1,5 @@ --- -title: 網絡 +title: 网络 description: 配置代理和自定義證書。 --- @@ -7,7 +7,7 @@ opencode支持企业网络环境的标准代理环境变量和自定义证书。 --- -## 代理人 +## 代理 opencode 尊重标准代理环境变量。 @@ -30,7 +30,7 @@ TUI 与本地 HTTP 服务器通信。您必须绕过此连接的代理以防止� --- -### 認證 +### 认证 如果您的代理需要基本身份验证,请在 URL 中包含凭据。 @@ -46,7 +46,7 @@ export HTTPS_PROXY=http://username:[email protected]:8080 --- -## 定制證書 +## 自定义证书 如果您的企业使用自定义 CA 进行 HTTPS 连接,请配置 opencode 以信任它们。 diff --git a/packages/web/src/content/docs/zh-cn/permissions.mdx b/packages/web/src/content/docs/zh-cn/permissions.mdx index 65f7d4dee..47f7ef95d 100644 --- a/packages/web/src/content/docs/zh-cn/permissions.mdx +++ b/packages/web/src/content/docs/zh-cn/permissions.mdx @@ -9,7 +9,7 @@ opencode 使用`permission` 配置来决定给定的操作是否应自动运行� --- -## 行動 +## 动作 每个权限规则解析为以下之一: @@ -45,7 +45,7 @@ opencode 使用`permission` 配置来决定给定的操作是否应自动运行� --- -## 粒度规则(对象語法) +## 粒度规则(对象语法) 对于大多數权限,您可以使用对像根據工具輸入应用不同的操作。 @@ -169,7 +169,7 @@ opencode权限由工具名称和一些安全防护措施决定: --- -## “問”的作用是什麼 +## “询问”的作用是什么 当 opencode 提示批准时,UI 会提供清晰的结果: @@ -181,7 +181,7 @@ opencode权限由工具名称和一些安全防护措施决定: --- -## 代理商 +## 代理 您可以覆盖每个代理的权限。代理权限与全局配置合并,代理规则优先。 [了解更多](/docs/agents#permissions)关于代理权限。 diff --git a/packages/web/src/content/docs/zh-cn/plugins.mdx b/packages/web/src/content/docs/zh-cn/plugins.mdx index c45d86f55..3a4a80753 100644 --- a/packages/web/src/content/docs/zh-cn/plugins.mdx +++ b/packages/web/src/content/docs/zh-cn/plugins.mdx @@ -15,7 +15,7 @@ description: 编写您自己的插件来扩展 opencode。 --- -### 從本地文件 +### 从本地文件 将 JavaScript 或 TypeScript 文件放置在插件目录中。 @@ -51,7 +51,7 @@ description: 编写您自己的插件来扩展 opencode。 --- -### 加載顺序 +### 加载顺序 插件從所有源加載,所有掛鉤按顺序運行。加載顺序为: @@ -71,7 +71,7 @@ description: 编写您自己的插件来扩展 opencode。 --- -### 依賴關係 +### 依赖关系 本地插件和自定义工具可以使用外部 npm 包。将 `package.json` 添加到您的配置目录,其中包含您需要的依赖项。 @@ -101,7 +101,7 @@ export const MyPlugin = async (ctx) => { --- -### 基本結構 +### 基本结构 ```js title=".opencode/plugins/example.js" export const MyPlugin = async ({ project, client, $, directory, worktree }) => { @@ -139,7 +139,7 @@ export const MyPlugin: Plugin = async ({ project, client, $, directory, worktree --- -### 活动 +### 事件 插件可以訂閱事件,如下面的示例部分所示。以下是可用的不同事件的列表。 @@ -152,11 +152,11 @@ export const MyPlugin: Plugin = async ({ project, client, $, directory, worktree - `file.edited` - `file.watcher.updated` -#### 安装活动 +#### 安装事件 - `installation.updated` -#### LSP活动 +#### LSP 事件 - `lsp.client.diagnostics` - `lsp.updated` @@ -173,11 +173,11 @@ export const MyPlugin: Plugin = async ({ project, client, $, directory, worktree - `permission.asked` - `permission.replied` -#### 服務器事件 +#### 服务器事件 - `server.connected` -#### 会话活动 +#### 会话事件 - `session.created` - `session.compacted` @@ -188,11 +188,11 @@ export const MyPlugin: Plugin = async ({ project, client, $, directory, worktree - `session.status` - `session.updated` -#### 都都活动 +#### 待办事项事件 - `todo.updated` -#### 殼牌活动 +#### Shell 事件 - `shell.env` @@ -201,7 +201,7 @@ export const MyPlugin: Plugin = async ({ project, client, $, directory, worktree - `tool.execute.after` - `tool.execute.before` -#### TUI 活动 +#### TUI 事件 - `tui.prompt.append` - `tui.command.execute` @@ -215,7 +215,7 @@ export const MyPlugin: Plugin = async ({ project, client, $, directory, worktree --- -### 發送通知 +### 发送通知 当某些事件發生時發送通知: @@ -258,7 +258,7 @@ export const EnvProtection = async ({ project, client, $, directory, worktree }) --- -### 注入環境變量 +### 注入环境变量 将环境变量注入所有shell执行(AI工具和用户终端): @@ -275,7 +275,7 @@ export const InjectEnvPlugin = async () => { --- -### 定制工具 +### 自定义工具 插件还可以向 opencode 添加自定义工具: @@ -310,7 +310,7 @@ export const CustomToolsPlugin: Plugin = async (ctx) => { --- -### 記錄 +### 日志 使用 `client.app.log()` 而不是 `console.log` 进行成型日志记录: @@ -331,7 +331,7 @@ export const MyPlugin = async ({ client }) => { --- -### 壓實鉤 +### 压缩钩子 自定義壓縮会话時包含的上下文: diff --git a/packages/web/src/content/docs/zh-cn/providers.mdx b/packages/web/src/content/docs/zh-cn/providers.mdx index 64d7438e6..b9b35d619 100644 --- a/packages/web/src/content/docs/zh-cn/providers.mdx +++ b/packages/web/src/content/docs/zh-cn/providers.mdx @@ -28,7 +28,7 @@ opencode 使用 [AI SDK](https://ai-sdk.dev/) 和 [Models.dev](https://models.de --- -#### 基本網址 +#### 基本网址 您可以通过设置 `baseURL` 选项来自定义任何提供商的基本 URL。这在使用代理服务或自定义端点时非常有用。 @@ -47,7 +47,7 @@ opencode 使用 [AI SDK](https://ai-sdk.dev/) 和 [Models.dev](https://models.de --- -## opencode 一代 +## OpenCode Zen OpenCode Zen 是opencode团队提供的模型列表,这些模型已被 经测试和验证可与opencode良好配合。 [了解更多](/docs/zen)。 @@ -94,7 +94,7 @@ OpenCode Zen 是opencode团队提供的模型列表,这些模型已被 --- -### 302.艾伊 +### 302.AI 1. Head over to the [302.AI console](https://302.ai/), create an account, and generate an API key. @@ -121,7 +121,7 @@ OpenCode Zen 是opencode团队提供的模型列表,这些模型已被 --- -### 亞馬遜基岩 +### Amazon Bedrock 相当于 Amazon Bedrock 与 opencode 结合使用: @@ -251,7 +251,7 @@ OpenCode Zen 是opencode团队提供的模型列表,这些模型已被 --- -### 人择 +### Anthropic 1. 注册后,执行`/connect`命令并选择Anthropic。 @@ -289,7 +289,7 @@ Using your Claude Pro/Max subscription in opencode is not officially supported b --- -### 天蓝色 OpenAI +### Azure OpenAI :::note 如果遇到“抱歉,但我无法协助该请求”错误,请尝试将 Azure 资源中的内容筛选器从 **DefaultV2** 更改为 **Default**。 @@ -387,7 +387,7 @@ Using your Claude Pro/Max subscription in opencode is not officially supported b --- -### 巴吉度獵犬 +### Baseten 1. Head over to the [Baseten](https://app.baseten.co/), create an account, and generate an API key. @@ -414,7 +414,7 @@ Using your Claude Pro/Max subscription in opencode is not officially supported b --- -### 大腦 +### Cerebras 1. Head over to the [Cerebras console](https://inference.cerebras.ai/), create an account, and generate an API key. @@ -441,7 +441,7 @@ Using your Claude Pro/Max subscription in opencode is not officially supported b --- -### Cloudflare AI闸道器 +### Cloudflare AI Gateway Cloudflare AI Gateway lets you access models from OpenAI, Anthropic, Workers AI, and more through a unified endpoint. With [Unified Billing](https://developers.cloudflare.com/ai-gateway/features/unified-billing/) you don't need separate API keys for each provider. @@ -499,7 +499,7 @@ Cloudflare AI Gateway lets you access models from OpenAI, Anthropic, Workers AI, --- -### 皮質 +### Cortecs 1. Head over to the [Cortecs console](https://cortecs.ai/), create an account, and generate an API key. @@ -526,7 +526,7 @@ Cloudflare AI Gateway lets you access models from OpenAI, Anthropic, Workers AI, --- -### 深度搜索 +### DeepSeek 1. Head over to the [DeepSeek console](https://platform.deepseek.com/), create an account, and click **Create new API key**. @@ -553,7 +553,7 @@ Cloudflare AI Gateway lets you access models from OpenAI, Anthropic, Workers AI, --- -### 深層基礎設施 +### Deep Infra 1. Head over to the [Deep Infra dashboard](https://deepinfra.com/dash), create an account, and generate an API key. @@ -580,7 +580,7 @@ Cloudflare AI Gateway lets you access models from OpenAI, Anthropic, Workers AI, --- -### 韌體 +### Firmware 1. Head over to the [Firmware dashboard](https://app.firmware.ai/signup), create an account, and generate an API key. @@ -607,7 +607,7 @@ Cloudflare AI Gateway lets you access models from OpenAI, Anthropic, Workers AI, --- -### 煙花人工智慧 +### Fireworks AI 1. Head over to the [Fireworks AI console](https://app.fireworks.ai/), create an account, and click **Create API Key**. @@ -634,7 +634,7 @@ Cloudflare AI Gateway lets you access models from OpenAI, Anthropic, Workers AI, --- -### GitLab 二人组 +### GitLab Duo GitLab Duo 通过 GitLab 的人工代理提供具有本机工具呼叫功能的人工智慧代理聊天。 @@ -820,7 +820,7 @@ Some models need to be manually enabled in your [GitHub Copilot settings](https: --- -### 谷歌顶点人工智能 +### Google Vertex AI Google Vertex AI 与 opencode 结合使用: @@ -864,7 +864,7 @@ The `global` region improves availability and reduces errors at no extra cost. U --- -### 格羅克 +### Groq 1. Head over to the [Groq console](https://console.groq.com/), click **Create API Key**, and copy the key. @@ -891,7 +891,7 @@ The `global` region improves availability and reduces errors at no extra cost. U --- -### 抱臉 +### Hugging Face [Hugging Face Inference Providers](https://huggingface.co/docs/inference-providers) provides access to open models supported by 17+ providers. @@ -920,7 +920,7 @@ The `global` region improves availability and reduces errors at no extra cost. U --- -### 螺旋錐 +### Helicone [Helicone](https://helicone.ai) is an LLM observability platform that provides logging, monitoring, and analytics for your AI applications. The Helicone AI Gateway routes your requests to the appropriate provider automatically based on the model. @@ -1033,7 +1033,7 @@ See the [Helicone Header Directory](https://docs.helicone.ai/helicone-headers/he --- -### 呼叫.cpp +### llama.cpp You can configure opencode to use local models through [llama.cpp's](https://github.com/ggml-org/llama.cpp) llama-server utility @@ -1071,7 +1071,7 @@ You can configure opencode to use local models through [llama.cpp's](https://git --- -### IO网路 +### IO.NET IO.NET提供了17种针对各种例子进行优化的模型: @@ -1100,7 +1100,7 @@ IO.NET提供了17种针对各种例子进行优化的模型: --- -### LM工作室 +### LM Studio 您可以通过使用本地模型来使用 LM Studio 配置opencode。 @@ -1134,7 +1134,7 @@ IO.NET提供了17种针对各种例子进行优化的模型: --- -### 登月人工智慧 +### Moonshot AI 要使用 Moonshot AI 中的 Kimi K2: @@ -1163,7 +1163,7 @@ IO.NET提供了17种针对各种例子进行优化的模型: --- -### 最小最大 +### MiniMax 1. Head over to the [MiniMax API Console](https://platform.minimax.io/login), create an account, and generate an API key. @@ -1190,7 +1190,7 @@ IO.NET提供了17种针对各种例子进行优化的模型: --- -### Nebius 代币工厂 +### Nebius Token Factory 1. Head over to the [Nebius Token Factory console](https://tokenfactory.nebius.com/), create an account, and click **Add Key**. @@ -1217,7 +1217,7 @@ IO.NET提供了17种针对各种例子进行优化的模型: --- -### 成为 +### Ollama 您可以使用 Ollama 配置 opencode 本地模型。 @@ -1259,7 +1259,7 @@ Ollama can automatically configure itself for opencode. See the [Ollama integrat --- -### 奧拉馬雲 +### Ollama Cloud 相当于 Ollama Cloud 与 opencode 一起使用: @@ -1298,7 +1298,7 @@ Ollama can automatically configure itself for opencode. See the [Ollama integrat --- -### 开放人工智能 +### OpenAI We recommend signing up for [ChatGPT Plus or Pro](https://chatgpt.com/pricing). @@ -1331,7 +1331,7 @@ We recommend signing up for [ChatGPT Plus or Pro](https://chatgpt.com/pricing). --- -### opencode 一代 +### OpenCode Zen OpenCode Zen 是 opencode 团队提供的经过测试和验证的模型列表。 [了解更多](/docs/zen)。 @@ -1360,7 +1360,7 @@ OpenCode Zen 是 opencode 团队提供的经过测试和验证的模型列表。 --- -### 開放路由器 +### OpenRouter 1. Head over to the [OpenRouter dashboard](https://openrouter.ai/settings/keys), click **Create API Key**, and copy the key. @@ -1424,7 +1424,7 @@ OpenCode Zen 是 opencode 团队提供的经过测试和验证的模型列表。 --- -### SAP人工智慧核心 +### SAP AI Core SAP AI Core跨统一平台提供对OpenAI、Anthropic、Google、Amazon、Meta、Mistral和AI21的40多个模型的访问。 @@ -1479,7 +1479,7 @@ SAP AI Core跨统一平台提供对OpenAI、Anthropic、Google、Amazon、Meta� --- -### OVHcloud AI 端点 +### OVHcloud AI Endpoints 1. Head over to the [OVHcloud panel](https://ovh.com/manager). Navigate to the `Public Cloud` section, `AI & Machine Learning` > `AI Endpoints` and in `API Keys` tab, click **Create a new API key**. @@ -1506,7 +1506,7 @@ SAP AI Core跨统一平台提供对OpenAI、Anthropic、Google、Amazon、Meta� --- -### 斯卡威 +### Scaleway To use [Scaleway Generative APIs](https://www.scaleway.com/en/docs/generative-apis/) with Opencode: @@ -1535,7 +1535,7 @@ To use [Scaleway Generative APIs](https://www.scaleway.com/en/docs/generative-ap --- -### 一起人工智慧 +### Together AI 1. Head over to the [Together AI console](https://api.together.ai), create an account, and click **Add Key**. @@ -1562,7 +1562,7 @@ To use [Scaleway Generative APIs](https://www.scaleway.com/en/docs/generative-ap --- -### 威尼斯人工智慧 +### Venice AI 1. Head over to the [Venice AI console](https://venice.ai), create an account, and generate an API key. @@ -1589,7 +1589,7 @@ To use [Scaleway Generative APIs](https://www.scaleway.com/en/docs/generative-ap --- -### Vercel人工智慧闸道器 +### Vercel AI Gateway Vercel AI Gateway 可以让您跨统一端点访问来自 OpenAI、Anthropic、Google、xAI 等的模型。模型按标价提供,不加价。 @@ -1645,7 +1645,7 @@ Vercel AI Gateway 可以让您跨统一端点访问来自 OpenAI、Anthropic、G --- -### 人工智慧 +### xAI 1. Head over to the [xAI console](https://console.x.ai/), create an account, and generate an API key. @@ -1672,7 +1672,7 @@ Vercel AI Gateway 可以让您跨统一端点访问来自 OpenAI、Anthropic、G --- -### 扎艾 +### Z.AI 1. Head over to the [Z.AI API console](https://z.ai/manage-apikey/apikey-list), create an account, and click **Create a new API key**. @@ -1701,7 +1701,7 @@ Vercel AI Gateway 可以让您跨统一端点访问来自 OpenAI、Anthropic、G --- -### 多路復用器 +### ZenMux 1. Head over to the [ZenMux dashboard](https://zenmux.ai/settings/keys), click **Create API Key**, and copy the key. @@ -1743,7 +1743,7 @@ Vercel AI Gateway 可以让您跨统一端点访问来自 OpenAI、Anthropic、G --- -## 定製提供商 +## 自定义提供商 要添加 `/connect` 命令中未列出的任何 **OpenAI 兼容**提供商: diff --git a/packages/web/src/content/docs/zh-cn/rules.mdx b/packages/web/src/content/docs/zh-cn/rules.mdx index 5331e7fae..c9135c299 100644 --- a/packages/web/src/content/docs/zh-cn/rules.mdx +++ b/packages/web/src/content/docs/zh-cn/rules.mdx @@ -52,15 +52,15 @@ This is an SST v3 monorepo with TypeScript. The project uses bun workspaces for --- -## 類型 +## 类型 opencode 还支持从多个位置读取 `AGENTS.md` 文件。这有不同的目的。 -### 专案 +### 项目 将 `AGENTS.md` 放置在项目根目录中以获取特定于项目的规则。这些仅适用于您在此目录或子目录中工作时。 -### 全球的 +### 全局 您还可以在 `~/.config/opencode/AGENTS.md` 文件中包含全局规则。这适用于所有opencode会话。 @@ -84,7 +84,7 @@ export OPENCODE_DISABLE_CLAUDE_CODE_SKILLS=1 # Disable only .claude/skills --- -## 优先級 +## 优先级 当opencode启动时,它会按以下顺序查找规则文件: @@ -96,7 +96,7 @@ export OPENCODE_DISABLE_CLAUDE_CODE_SKILLS=1 # Disable only .claude/skills --- -## 定制說明 +## 自定义指令 您可以在 `opencode.json` 或全局 `~/.config/opencode/opencode.json` 中指定自定义指令文件。这允许您和您的团队重用现有规则,而不必将它们复制到 AGENTS.md。 diff --git a/packages/web/src/content/docs/zh-cn/sdk.mdx b/packages/web/src/content/docs/zh-cn/sdk.mdx index 515fec988..0a8f63fa1 100644 --- a/packages/web/src/content/docs/zh-cn/sdk.mdx +++ b/packages/web/src/content/docs/zh-cn/sdk.mdx @@ -1,5 +1,5 @@ --- -title: 軟體開發工具包 +title: SDK description: opencode 服务器的类型不同于安全 JS 客户端。 --- @@ -23,7 +23,7 @@ npm install @opencode-ai/sdk --- -## 建立客戶端 +## 创建客户端 创建opencode的示例项: @@ -35,9 +35,9 @@ const { client } = await createOpencode() 这会同時启动服务器和客戶端 -#### 選項 +#### 选项 -| 選項 | 型別 | 描述 | 默认 | +| 选项 | 型别 | 描述 | 默认 | | ---------- | ------------- | ------------------------------ | ----------- | | `hostname` | `string` | 服务器主机名 | `127.0.0.1` | | `port` | `number` | 服务器埠 | `4096` | @@ -67,7 +67,7 @@ console.log(`Server running at ${opencode.server.url}`) opencode.server.close() ``` -## 仅限客戶 +## 仅限客户端 如果您已经有 opencode 的正在执行示例项,则可以创建一个客户端示例项来连线到它: @@ -79,9 +79,9 @@ const client = createOpencodeClient({ }) ``` -#### 選項 +#### 选项 -| 選項 | 型別 | 描述 | 默认 | +| 选项 | 型别 | 描述 | 默认 | | --------------- | ---------- | ---------------------------- | ----------------------- | | `baseUrl` | `string` | 服务器的 URL | `http://localhost:4096` | | `fetch` | `function` | 习俗获取实现 | `globalThis.fetch` | @@ -91,7 +91,7 @@ const client = createOpencodeClient({ --- -## 型別 +## 类型 SDK 包括所有 API 型以外的 TypeScript 定义。直接汇入其中: @@ -117,13 +117,13 @@ try { --- -## 蜜蜂 +## API SDK跨越型别安全客户端公开所有服务器API。 --- -### 全球的 +### 全局 | 方法 | 描述 | 回应 | | ----------------- | ------------------------ | ------------------------------------ | @@ -167,7 +167,7 @@ const agents = await client.app.agents() --- -### 专案 +### 项目 | 方法 | 描述 | 回应 | | ------------------- | ------------ | ------------------------------------------ | @@ -188,7 +188,7 @@ const currentProject = await client.project.current() --- -### 小路 +### 路径 | 方法 | 描述 | 回应 | | ------------ | ------------ | ---------------------------------------- | @@ -353,7 +353,7 @@ await client.tui.showToast({ --- -### 授權 +### 授权 | 方法 | 描述 | 回应 | | ------------------- | ---------------- | --------- | @@ -372,7 +372,7 @@ await client.auth.set({ --- -### 活动 +### 事件 | 方法 | 描述 | 回应 | | ------------------- | ------------------ | ------------------ | diff --git a/packages/web/src/content/docs/zh-cn/server.mdx b/packages/web/src/content/docs/zh-cn/server.mdx index c687b4b77..27604021a 100644 --- a/packages/web/src/content/docs/zh-cn/server.mdx +++ b/packages/web/src/content/docs/zh-cn/server.mdx @@ -16,9 +16,9 @@ The `opencode serve` command runs a headless HTTP server that exposes an OpenAPI opencode serve [--port <number>] [--hostname <string>] [--cors <origin>] ``` -#### 選項 +#### 选项 -| 旗幟 | 描述 | 默认 | +| 标志 | 描述 | 默认 | | --------------- | ----------------------------------- | ---------------- | | `--port` | 监听音频 | `4096` | | `--hostname` | 监听的主机名 | `127.0.0.1` | @@ -34,7 +34,7 @@ opencode serve --cors http://localhost:5173 --cors https://app.example.com --- -### 驗證 +### 验证 Set `OPENCODE_SERVER_PASSWORD` to protect the server with HTTP basic auth. The username defaults to `opencode`, or set `OPENCODE_SERVER_USERNAME` to override it. This applies to both `opencode serve` and `opencode web`. @@ -81,13 +81,13 @@ http://<hostname>:<port>/doc --- -## 蜜蜂 +## API opencode服务器公开以下API。 --- -### 全球的 +### 全局 | 方法 | 路徑 | 描述 | 回应 | | ----- | ---------------- | ------------------------ | ------------------------------------ | @@ -96,7 +96,7 @@ opencode服务器公开以下API。 --- -### 专案 +### 项目 | 方法 | 路徑 | 描述 | 回应 | | ----- | ------------------ | ------------ | ------------------------------------------ | @@ -238,7 +238,7 @@ opencode服务器公开以下API。 --- -### 記錄 +### 日志 | 方法 | 路徑 | 描述 | 回应 | | ------ | ------------------------------------------- | ------ | -------------------- | @@ -264,7 +264,7 @@ opencode服务器公开以下API。 --- -### 授權 +### 授权 | 方法 | 路徑 | 描述 | 回应 | | ----- | ----------- | ------------------------------------------ | --------- | @@ -280,7 +280,7 @@ opencode服务器公开以下API。 --- -### 文件 +### 文档 | 方法 | 路徑 | 描述 | 回应 | | ----- | ------ | --------------- | ------------------------- | diff --git a/packages/web/src/content/docs/zh-cn/share.mdx b/packages/web/src/content/docs/zh-cn/share.mdx index 5559de913..e73eac373 100644 --- a/packages/web/src/content/docs/zh-cn/share.mdx +++ b/packages/web/src/content/docs/zh-cn/share.mdx @@ -63,7 +63,7 @@ opencode 支持清晰控制对话共享方式的共享模式: --- -### 殘疾人 +### 已禁用 您可以通过将 [config file](/docs/config) 中的 `share` 选项设置为 `"disabled"` 来完全禁用共享: diff --git a/packages/web/src/content/docs/zh-cn/skills.mdx b/packages/web/src/content/docs/zh-cn/skills.mdx index b5bd59c26..f5c588d1e 100644 --- a/packages/web/src/content/docs/zh-cn/skills.mdx +++ b/packages/web/src/content/docs/zh-cn/skills.mdx @@ -22,7 +22,7 @@ opencode 搜索这些位置: --- -## 瞭解發現 +## 了解发现 对于专案本地路径, opencode 从当前工作目录向上走,直到到达 git 工作树。 It loads any matching `skills/*/SKILL.md` in `.opencode/` and any matching `.claude/skills/*/SKILL.md` or `.agents/skills/*/SKILL.md` along the way. @@ -31,7 +31,7 @@ Global definitions are also loaded from `~/.config/opencode/skills/*/SKILL.md`, --- -## 寫前言 +## 编写 Frontmatter 每个 `SKILL.md` 必须以 YAML frontmatter 。 仅識別这些欄位: @@ -46,7 +46,7 @@ Global definitions are also loaded from `~/.config/opencode/skills/*/SKILL.md`, --- -## 驗證姓名 +## 验证名称 `name` 必须: @@ -64,7 +64,7 @@ Global definitions are also loaded from `~/.config/opencode/skills/*/SKILL.md`, --- -## 遵循長度规则 +## 遵循长度规则 `description` 必须是 1-1024 个字元。 保持足夠具體,以便代理能夠正确选择。 @@ -100,7 +100,7 @@ Ask clarifying questions if the target versioning scheme is unclear. --- -## 識別工具說明 +## 识别工具说明 opencode 列出了 `skill` 工具描述中的可用技能。 每个条目都包含技能名称和描述: @@ -212,7 +212,7 @@ tools: --- -## 解決載入問題 +## 解决加载问题 如果某項技能沒有显示: diff --git a/packages/web/src/content/docs/zh-cn/themes.mdx b/packages/web/src/content/docs/zh-cn/themes.mdx index 41c17729b..2f28f15d5 100644 --- a/packages/web/src/content/docs/zh-cn/themes.mdx +++ b/packages/web/src/content/docs/zh-cn/themes.mdx @@ -21,7 +21,7 @@ By default, opencode uses our own `opencode` theme. --- -## 內建主题 +## 内置主题 opencode 带有几个内建主题。 @@ -43,7 +43,7 @@ opencode 带有几个内建主题。 --- -## 系統主题 +## 系统主题 `system` 主题旨在自动适应您的最终方案。与使用固定颜色的传统主题不同,_system_ 主题: @@ -72,13 +72,13 @@ opencode 带有几个内建主题。 --- -## 自定義主题 +## 自定义主题 opencode 支持灵活的基于 JSON 的主题系统,允许用户轻松创建和自定义主题。 --- -### 等級制度 +### 优先级 主题按以下顺序從多个目录載入,其中后面的目录覆盖前面的目录: @@ -91,7 +91,7 @@ opencode 支持灵活的基于 JSON 的主题系统,允许用户轻松创建� --- -### 建立主题 +### 创建主题 要创建自定义主题,请在主题目录中创建 JSON 档案。 @@ -123,7 +123,7 @@ vim .opencode/themes/my-theme.json --- -### 顏色定義 +### 颜色定义 `defs` 部分是可选的,它允许您定义可在主题中引用的可重用颜色。 diff --git a/packages/web/src/content/docs/zh-cn/troubleshooting.mdx b/packages/web/src/content/docs/zh-cn/troubleshooting.mdx index a46a263dd..b658f6938 100644 --- a/packages/web/src/content/docs/zh-cn/troubleshooting.mdx +++ b/packages/web/src/content/docs/zh-cn/troubleshooting.mdx @@ -7,7 +7,7 @@ description: 常見問題以及如何解決它們。 --- -## 紀錄 +## 日志 日誌文件寫入: @@ -20,7 +20,7 @@ You can set the log level with the `--log-level` command-line option to get more --- -## 貯存 +## 存储 opencode程序将会话数据和其他应用程序数据存储在磁碟上: @@ -169,7 +169,7 @@ opencode 桌面仅在以下情况下显示系统通知: --- -## 尋求幫助 +## 寻求帮助 如果您遇到 opencode 问题: @@ -189,7 +189,7 @@ opencode 桌面仅在以下情况下显示系统通知: --- -## 常見問題 +## 常见问题 以下是一些常見問題以及解決方法。 diff --git a/packages/web/src/content/docs/zh-cn/tui.mdx b/packages/web/src/content/docs/zh-cn/tui.mdx index 05203c464..e1beb9abf 100644 --- a/packages/web/src/content/docs/zh-cn/tui.mdx +++ b/packages/web/src/content/docs/zh-cn/tui.mdx @@ -27,7 +27,7 @@ Give me a quick summary of the codebase. --- -## 文件參考 +## 文件引用 您可以使用 `@` 在消息中引用文件。这会在当前工作目录中進行模糊文件搜索。 @@ -43,7 +43,7 @@ How is auth handled in @packages/functions/src/api/index.ts? --- -## bash 命令 +## Bash 命令 以`!`开始一条消息以执行shell命令。 @@ -115,7 +115,7 @@ How is auth handled in @packages/functions/src/api/index.ts? --- -### 出口 +### 退出 退出opencode。 _别名_:`/quit`、`/q` @@ -127,7 +127,7 @@ How is auth handled in @packages/functions/src/api/index.ts? --- -### 出口 +### 导出 将当前对话汇出到 Markdown 并在默认编辑器中开启。使用 `EDITOR` 环境变数中设定的编辑器。 [了解更多](#editor-setup)。 @@ -376,7 +376,7 @@ Create or update `AGENTS.md` file. [Learn more](/docs/rules). --- -## 定製化 +## 自定义 您可以使用命令选项板(`ctrl+x h` 或 `/help`)自定义 TUI 查看的各个方面。这些设置在重新启动后仍然存在。 diff --git a/packages/web/src/content/docs/zh-cn/web.mdx b/packages/web/src/content/docs/zh-cn/web.mdx index 6daac5122..efb55aaab 100644 --- a/packages/web/src/content/docs/zh-cn/web.mdx +++ b/packages/web/src/content/docs/zh-cn/web.mdx @@ -31,7 +31,7 @@ For the best experience, run `opencode web` from [WSL](/docs/windows-wsl) rather 您可以使用命令列标志或在[config file](/docs/config).conf 中配置Web服务器。 -### 港口 +### 端口 默认情况下,opencode 选择一个可用的端口。您可以指定一个端口: @@ -90,7 +90,7 @@ The username defaults to `opencode` but can be changed with `OPENCODE_SERVER_USE --- -## 使用網路介面 +## 使用网络界面 启动后,网路界面将提供对您的 opencode 会话的访问。 diff --git a/packages/web/src/content/docs/zh-cn/zen.mdx b/packages/web/src/content/docs/zh-cn/zen.mdx index 63874410f..1a2e77aab 100644 --- a/packages/web/src/content/docs/zh-cn/zen.mdx +++ b/packages/web/src/content/docs/zh-cn/zen.mdx @@ -58,7 +58,7 @@ OpenCode Zen 的工作方式与 opencode 中的任何其他功能相同。 --- -## 端點 +## 端点 您还可以通过以下 API 端点访问我们的模型。 @@ -110,7 +110,7 @@ https://opencode.ai/zen/v1/models --- -## 定價 +## 定价 我们支持即用即付模式。以下是**每 100 万Tokens的价格**。 @@ -186,7 +186,7 @@ https://opencode.ai/zen/v1/models --- -## 隱私 +## 隐私 我们所有的模型都在美国託管。我们的提供商遵循零保留政策,不会将您的数据用于模型训练,但以下情况除外: @@ -199,7 +199,7 @@ https://opencode.ai/zen/v1/models --- -## 对于團隊 +## 对于团队 Zen 对团队也很有效。您可以参与第三方、角色、策划 您的團隊使用的模型等等。 |
