@saber2pr/ai-agent 0.0.51 → 0.0.52
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.
- package/lib/core/agent-graph.js +8 -0
- package/package.json +1 -1
package/lib/core/agent-graph.js
CHANGED
|
@@ -408,6 +408,14 @@ class McpGraphAgent {
|
|
|
408
408
|
// 1. 构建当前的系统提示词模板
|
|
409
409
|
const systemPromptTemplate = `你是一个代码专家。工作目录:${this.targetDir}。
|
|
410
410
|
|
|
411
|
+
# 🧠 思考要求 (Mandatory Thinking Process)
|
|
412
|
+
在进行任何输出或调用工具之前,你**必须**先进行深度的逻辑思考。请将你的思考过程包裹在 <think> 标签内。
|
|
413
|
+
你的思考应包含:
|
|
414
|
+
1. **当前状态分析**:目前任务进展到哪一步了?
|
|
415
|
+
2. **逻辑推导**:基于已知信息,下一步应该做什么?为什么?
|
|
416
|
+
3. **工具选择建议**:如果需要调用工具,预期通过该工具获得什么结果?
|
|
417
|
+
4. **风险/边界评估**:有哪些潜在的代码缺陷或执行风险需要注意?
|
|
418
|
+
|
|
411
419
|
# 🛠️ 工具调用规范
|
|
412
420
|
1. Arguments 必须是纯粹的 JSON 对象,严禁将其作为字符串放入引号中。
|
|
413
421
|
2. 严禁对 JSON 内容进行二次转义。
|