renderToolCallsDiffMarkdownSection renders the engine-level tool calls diff as markdown. It includes a full tool type table and a bash commands breakdown.
(run1ID, run2ID int64, diff *ToolCallsDiff)
| 732 | // renderToolCallsDiffMarkdownSection renders the engine-level tool calls diff as markdown. |
| 733 | // It includes a full tool type table and a bash commands breakdown. |
| 734 | func renderToolCallsDiffMarkdownSection(run1ID, run2ID int64, diff *ToolCallsDiff) { |
| 735 | if diff == nil { |
| 736 | return |
| 737 | } |
| 738 | |
| 739 | fmt.Fprintln(os.Stdout, "#### Tool Call Breakdown") |
| 740 | fmt.Fprintln(os.Stdout) |
| 741 | |
| 742 | if len(diff.AllTools) > 0 { |
| 743 | fmt.Fprintf(os.Stdout, "| Tool | Run #%d | Run #%d | Change |\n", run1ID, run2ID) |
| 744 | fmt.Fprintln(os.Stdout, "|------|---------|---------|--------|") |
| 745 | for _, entry := range diff.AllTools { |
| 746 | change := entry.CallCountChange |
| 747 | if change == "" { |
| 748 | change = "—" |
| 749 | } |
| 750 | fmt.Fprintf(os.Stdout, "| `%s` | %d | %d | %s |\n", entry.Name, entry.Run1CallCount, entry.Run2CallCount, change) |
| 751 | } |
| 752 | fmt.Fprintln(os.Stdout) |
| 753 | } |
| 754 | |
| 755 | if diff.BashDiff != nil { |
| 756 | renderBashCommandsDiffMarkdownSection(run1ID, run2ID, diff.BashDiff) |
| 757 | } |
| 758 | } |
| 759 | |
| 760 | // renderBashCommandsDiffMarkdownSection renders the bash commands diff sub-section as markdown. |
| 761 | func renderBashCommandsDiffMarkdownSection(run1ID, run2ID int64, diff *BashCommandsDiff) { |
no test coverage detected