(s string, n int)
| 194 | } |
| 195 | |
| 196 | func truncate(s string, n int) string { |
| 197 | if len(s) <= n { |
| 198 | return s |
| 199 | } |
| 200 | return s[:n] + "…" |
| 201 | } |
| 202 | |
| 203 | // extractWritePath pulls the path out of a write_file tool input so the |
| 204 | // approval prompt can name the target file. Returns "" on any parse |