diff --git a/website/docs/developer-guide/plugins/index.md b/website/docs/developer-guide/plugins/index.md index 850070ad1d187..39c95269b6b4b 100644 --- a/website/docs/developer-guide/plugins/index.md +++ b/website/docs/developer-guide/plugins/index.md @@ -1204,7 +1204,7 @@ def register(ctx): ### Dispatch tools from slash commands -Slash command handlers that need to orchestrate tools (spawn a subagent via `delegate_task`, call `file_edit`, etc.) should use `ctx.dispatch_tool()` instead of reaching into framework internals. The parent-agent context (workspace hints, spinner, model inheritance) is wired up automatically. +Slash command handlers that need to orchestrate tools (spawn a subagent via `delegate_task`, call `write_file`, etc.) should use `ctx.dispatch_tool()` instead of reaching into framework internals. The parent-agent context (workspace hints, spinner, model inheritance) is wired up automatically. ```python def register(ctx): @@ -1229,7 +1229,7 @@ def register(ctx): | Parameter | Type | Description | |-----------|------|-------------| -| `name` | `str` | Tool name as registered in the tool registry (e.g. `"delegate_task"`, `"file_edit"`) | +| `name` | `str` | Tool name as registered in the tool registry (e.g. `"delegate_task"`, `"write_file"`) | | `args` | `dict` | Tool arguments, same shape the model would send | | `parent_agent` | `Agent \| None` | Optional override. When omitted, resolves from the current CLI agent (or degrades gracefully in gateway mode) | diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/plugins/index.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/plugins/index.md index 91759dbf554e2..9f8f63a74f6f8 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/plugins/index.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/plugins/index.md @@ -732,7 +732,7 @@ def register(ctx): ### 从斜杠命令分发工具 -需要编排工具的斜杠命令处理器(生成子代理 `delegate_task`、调用 `file_edit` 等)应使用 `ctx.dispatch_tool()`,而非深入框架内部。父代理上下文(工作区提示、spinner、模型继承)会自动连接。 +需要编排工具的斜杠命令处理器(生成子代理 `delegate_task`、调用 `write_file` 等)应使用 `ctx.dispatch_tool()`,而非深入框架内部。父代理上下文(工作区提示、spinner、模型继承)会自动连接。 ```python def register(ctx): @@ -757,7 +757,7 @@ def register(ctx): | 参数 | 类型 | 描述 | |-----------|------|-------------| -| `name` | `str` | 工具注册表中的工具名称(例如 `"delegate_task"`、`"file_edit"`) | +| `name` | `str` | 工具注册表中的工具名称(例如 `"delegate_task"`、`"write_file"`) | | `args` | `dict` | 工具参数,与模型发送的格式相同 | | `parent_agent` | `Agent \| None` | 可选覆盖。省略时从当前 CLI 代理解析(网关模式下优雅降级) |