(text)
| 14 | |
| 15 | const STEP_RE = /\*\*【([A-Z]+)】([^*]+?)\*\*/g; |
| 16 | function extractLastStep(text) { |
| 17 | let last = null, m; |
| 18 | STEP_RE.lastIndex = 0; |
| 19 | while ((m = STEP_RE.exec(text)) !== null) last = { type: m[1], title: m[2].trim() }; |
| 20 | return last; |
| 21 | } |
| 22 | function classifyCall(name, args) { |
| 23 | const rawPath = args.path || args.file_path || args.target_file || args.notebook_path || ""; |
| 24 | const anchor = typeof args.anchor === "string" ? args.anchor : undefined; |