(step: NextStep)
| 74 | } |
| 75 | |
| 76 | function formatNextStepForMcp(step: NextStep): string { |
| 77 | if (!step.tool) { |
| 78 | return resolveLabel(step); |
| 79 | } |
| 80 | |
| 81 | const paramEntries = Object.entries(step.params ?? {}); |
| 82 | if (paramEntries.length === 0) { |
| 83 | return `${step.tool}()`; |
| 84 | } |
| 85 | |
| 86 | const paramsStr = paramEntries |
| 87 | .map(([key, value]) => `${key}: ${formatMcpValue(value)}`) |
| 88 | .join(', '); |
| 89 | |
| 90 | return `${step.tool}({ ${paramsStr} })`; |
| 91 | } |
| 92 | |
| 93 | export function formatNextStep(step: NextStep, options: FormatNextStepOptions): string { |
| 94 | const formatted = |
no test coverage detected