@yeaft/webchat-agent 1.0.242 → 1.0.243
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.0.
|
|
1
|
+
{"version":"1.0.243"}
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ You have just entered **planning mode** for the topic below. Your job is to thin
|
|
|
17
17
|
|
|
18
18
|
1. Write a short prose plan: problem, approach, risks.
|
|
19
19
|
2. Call `TodoWrite` with the ordered steps. Mark exactly one item as `in_progress`.
|
|
20
|
-
3.
|
|
20
|
+
3. If the first-step tools and arguments are already known, emit `TodoWrite` and those independent tool calls in the same assistant response. Otherwise wait only for a result that genuinely determines the next action.
|
|
21
21
|
|
|
22
22
|
If the first step is to ask the user a blocking question, ask it and stop. Otherwise keep moving.
|
|
23
23
|
|
|
@@ -40,6 +40,6 @@ If the first step is to ask the user a blocking question, ask it and stop. Other
|
|
|
40
40
|
|
|
41
41
|
1. 写一段简短计划:问题、方案、风险。
|
|
42
42
|
2. 调用 `TodoWrite` 写入有序步骤,并且只能把一个条目标记为 `in_progress`。
|
|
43
|
-
3.
|
|
43
|
+
3. 如果第一步所需的工具和参数已经确定,应在同一个 assistant response 中发出 `TodoWrite` 和这些彼此独立的工具调用;否则只在确实需要某个结果来决定下一动作时等待。
|
|
44
44
|
|
|
45
45
|
如果第一步是向用户询问阻塞问题,那就提问并停下。否则继续推进。
|
|
@@ -61,6 +61,14 @@ How to use it:
|
|
|
61
61
|
- `content` is the imperative form (e.g. "Run tests"); `activeForm` is
|
|
62
62
|
the present-continuous form shown during execution (e.g. "Running
|
|
63
63
|
tests").
|
|
64
|
+
- Avoid an intermediate `TodoWrite`-only model round when the next work tool
|
|
65
|
+
and its arguments are already known. Emit `TodoWrite` and those independent
|
|
66
|
+
work tool calls in the same assistant response.
|
|
67
|
+
- This is batching, not speculative progress: mark work completed only after
|
|
68
|
+
evidence, and keep calls separate when a pending result can change the next
|
|
69
|
+
action, its arguments, or its safety. A standalone `TodoWrite` remains valid
|
|
70
|
+
when no work tool should follow, including final completion or a blocking
|
|
71
|
+
user question.
|
|
64
72
|
|
|
65
73
|
Do **not** use TodoWrite for single trivial edits, single command runs,
|
|
66
74
|
or pure conversational/question turns — the checklist becomes noise.
|
|
@@ -125,6 +133,11 @@ or pure conversational/question turns — the checklist becomes noise.
|
|
|
125
133
|
- 任何时刻最多只能有 **一个** `"in_progress"`。
|
|
126
134
|
- `content` 是命令式(如 "Run tests");`activeForm` 是执行中展示的进行
|
|
127
135
|
时(如 "Running tests")。
|
|
136
|
+
- 如果下一项工作所用的工具和参数已经确定,不要让中间状态的 `TodoWrite` 单独占一个
|
|
137
|
+
模型回合;应在同一个 assistant response 中发出 `TodoWrite` 和这些彼此独立的工作工具调用。
|
|
138
|
+
- 这是合批,不是提前宣告进度:只有已有证据时才能把工作标记为完成。如果待返回结果可能改变
|
|
139
|
+
下一动作、参数或安全性,就必须分开调用。没有工作工具应继续执行时(包括记录最终完成态或
|
|
140
|
+
询问阻塞问题),`TodoWrite` 仍可单独调用。
|
|
128
141
|
|
|
129
142
|
**不要**为单条琐碎修改、单次命令执行、纯对话/问题使用 TodoWrite——清单
|
|
130
143
|
反而成了噪音。
|
|
@@ -46,7 +46,7 @@ export default defineTool({
|
|
|
46
46
|
This tool returns a planning instruction. Use it to land a structured plan, then keep working in the same turn. The expected flow is:
|
|
47
47
|
1. Produce a short prose plan (problem, approach, risks).
|
|
48
48
|
2. Call \`TodoWrite\` with the ordered steps. Mark the first concrete step "in_progress", the rest "pending".
|
|
49
|
-
3.
|
|
49
|
+
3. When the first-step tools and arguments are already known, emit \`TodoWrite\` and those independent tool calls in the same assistant response. Wait only when a result genuinely determines the next action.
|
|
50
50
|
|
|
51
51
|
WHEN TO USE:
|
|
52
52
|
- Multi-step implementation (3+ steps), refactor, or open-ended investigation.
|
|
@@ -65,7 +65,7 @@ The tool takes the topic plus optional guiding fields (stuckAt, userProblem, exp
|
|
|
65
65
|
此工具返回规划指令。用它产出一份结构化计划,然后在同一个 turn 中继续工作。预期流程是:
|
|
66
66
|
1. 产出简短文字计划(问题、方法、风险)。
|
|
67
67
|
2. 调用 TodoWrite 写出有序步骤。将第一个具体步骤标记为 "in_progress",其余标记为 "pending"。
|
|
68
|
-
3.
|
|
68
|
+
3. 如果第一步所需的工具和参数已经确定,应在同一个 assistant response 中发出 TodoWrite 和这些彼此独立的工具调用;只有某个结果确实决定下一动作时才等待。
|
|
69
69
|
|
|
70
70
|
何时使用:
|
|
71
71
|
- 多步骤实现(3+ 步)、重构或开放式调查。
|
|
@@ -172,7 +172,10 @@ The tool takes the topic plus optional guiding fields (stuckAt, userProblem, exp
|
|
|
172
172
|
lines.push('</guiding-context>');
|
|
173
173
|
}
|
|
174
174
|
lines.push('');
|
|
175
|
-
|
|
175
|
+
const nextInstruction = String(language).toLowerCase().startsWith('zh')
|
|
176
|
+
? '下一步:产出计划并调用 `TodoWrite`。如果第一步的工具和参数已经确定,在同一个 assistant response 中一并发出这些彼此独立的工具调用。只有第一步必须询问用户时才在计划后停下。'
|
|
177
|
+
: 'Next: produce the plan and call `TodoWrite`. If the first-step tools and arguments are already known, emit those independent tool calls in the same assistant response. Stop after the plan only when the first step must ask the user.';
|
|
178
|
+
lines.push(nextInstruction);
|
|
176
179
|
|
|
177
180
|
return lines.join('\n');
|
|
178
181
|
},
|
|
@@ -39,6 +39,11 @@ HOW TO USE:
|
|
|
39
39
|
- AT MOST one item may be "in_progress" at any time.
|
|
40
40
|
- \`content\` is the imperative form ("Run tests"); \`activeForm\` is the present-continuous shown during execution ("Running tests").
|
|
41
41
|
|
|
42
|
+
BATCH WITH WORK:
|
|
43
|
+
- Avoid an intermediate TodoWrite-only model round when the next work tool and its arguments are already known. Emit TodoWrite and those independent work tool calls in the same assistant response.
|
|
44
|
+
- This is batching, not speculative progress: mark work completed only after evidence. Keep calls separate when a pending result can change the next action, its arguments, or its safety.
|
|
45
|
+
- A standalone TodoWrite remains valid when no work tool should follow, including final completion or a blocking user question.
|
|
46
|
+
|
|
42
47
|
WHEN NOT TO USE:
|
|
43
48
|
- Single trivial change, single command run, pure conversation/question.`,
|
|
44
49
|
zh: `用 checklist 跟踪多步骤任务进度,用户可以实时看到勾选。
|
|
@@ -54,6 +59,11 @@ WHEN NOT TO USE:
|
|
|
54
59
|
- 任何时候最多只能有一个 "in_progress"。
|
|
55
60
|
- content 是祈使形式(如 "Run tests");activeForm 是执行时显示的进行时态(如 "Running tests")。
|
|
56
61
|
|
|
62
|
+
和工作工具合批:
|
|
63
|
+
- 如果下一项工作所用的工具和参数已经确定,不要让中间状态的 TodoWrite 单独占一个模型回合;应在同一个 assistant response 中发出 TodoWrite 和这些彼此独立的工作工具调用。
|
|
64
|
+
- 这是合批,不是提前宣告进度:只有已有证据时才能把工作标记为完成。如果待返回结果可能改变下一动作、参数或安全性,就必须分开调用。
|
|
65
|
+
- 没有工作工具应继续执行时(包括记录最终完成态或询问阻塞问题),TodoWrite 仍可单独调用。
|
|
66
|
+
|
|
57
67
|
何时不使用:
|
|
58
68
|
- 单个琐碎改动、单个命令执行、纯对话/提问。`
|
|
59
69
|
},
|