truncatePlannerOutput keeps Plan-First diagnostics bounded so a runaway planner can't flood the logs.
(s string, n int)
| 154 | // truncatePlannerOutput keeps Plan-First diagnostics bounded so a |
| 155 | // runaway planner can't flood the logs. |
| 156 | func truncatePlannerOutput(s string, n int) string { |
| 157 | r := []rune(s) |
| 158 | if len(r) <= n { |
| 159 | return s |
| 160 | } |
| 161 | return string(r[:n]) + "..." |
| 162 | } |
| 163 | |
| 164 | // renderPlanPreview pretty-prints the planner's JSON output for the |
| 165 | // /plan preview (dry-run) mode. Falls back to the raw JSON when |
no outgoing calls
no test coverage detected