Merge pull request #2428 from deepseek-harness/fix/run-code-description-contract

让 run_code 的模型面说明点名必填的 description 参数
This commit is contained in:
Tianyi Cui
2026-08-13 11:17:48 +08:00
committed by GitHub
24 changed files with 77 additions and 48 deletions

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/tool-catalog.md
tool-catalog.md: ea89508500ec6e73e6e56c4e5d0ac2c35897b342
tool-catalog.zh.md: 076cc63151e3b9ee8b3828ded65df9ebf09c9430
tool-catalog.md: 3d73ed1ef5346f620808e9d6b04299291ba1ed4c
tool-catalog.zh.md: 90573928a24630e802d98441bc0e340baf582b23

View File

@@ -116,7 +116,7 @@ ask_user_question pauses the tool call until the active UI provider returns a hu
### `run_code`
Execute a TypeScript program against the available tools. Write the BODY of an async function (erasable syntax only; top-level `await` and `return` work) and call tools as `await tools.name(args)` per the declarations in the system prompt. Only what you print or return comes back — curate it.
Execute a TypeScript program against the available tools. Takes two required arguments: `code`, the BODY of an async function (erasable syntax only; top-level `await` and `return` work), and `description`, a short summary of what the program does. Call tools as `await tools.name(args)` per the declarations in the system prompt. Only what you print or return comes back — curate it.
```json
{

View File

@@ -118,7 +118,7 @@ ask_user_question 会暂停工具调用,直到当前 UI 提供方返回人类
### `run_code`
针对可用工具执行 TypeScript 程序。请编写异步函数的**函数体**(仅使用可擦除语法;支持顶层 `await``return`,并根据系统提示词中的声明,以 `await tools.name(args)` 形式调用工具。只有打印或返回的内容会传回,请谨慎筛选。
针对可用工具执行 TypeScript 程序。接受两个必填参数:`code`,即异步函数的**函数体**(仅使用可擦除语法;支持顶层 `await``return`;以及 `description`,简要说明该程序做什么。请根据系统提示词中的声明,以 `await tools.name(args)` 形式调用工具。只有打印或返回的内容会传回,请谨慎筛选。
```json
{