derivation_rollback
Roll back to a specified step in a derivation, deleting all subsequent steps. Continue from that point to explore alternative paths.
Instructions
回滾到指定步驟
═══════════════════════════════════════════════════════════════════════
⚡ 這是「跳回某一步」的核心工具!
═══════════════════════════════════════════════════════════════════════
保留指定步驟及之前的所有步驟,刪除之後的步驟。
回滾後可以從該步驟繼續推導(走不同的路徑)。
Args:
to_step: 回滾到的步驟編號(1-based,該步驟會保留)
0 = 清空所有步驟,從頭開始
Returns:
回滾結果,包含:
- 刪除了哪些步驟
- 當前的表達式
- 新的步驟數
Example:
# 假設有 16 步,發現第 11 步開始走錯方向
derivation_rollback(to_step=10)
→ {
"success": True,
"rolled_back_to": 10,
"deleted_count": 6,
"deleted_steps": [11, 12, 13, 14, 15, 16],
"current_expression": "CL_int*(1 - f_b)",
"message": "Rolled back to step 10. Deleted 6 step(s)."
}
# 現在可以從步驟 10 的表達式繼續,走不同的推導路徑
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_step | Yes | ||
| session_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||