(String content, int maxLength)
| 719 | } |
| 720 | |
| 721 | private String preview(String content, int maxLength) { |
| 722 | if (content == null) { |
| 723 | return ""; |
| 724 | } |
| 725 | String normalized = content.replace("\r\n", "\n").replace('\r', '\n'); |
| 726 | if (normalized.length() <= maxLength) { |
| 727 | return normalized; |
| 728 | } |
| 729 | return normalized.substring(0, maxLength) + "..."; |
| 730 | } |
| 731 | |
| 732 | /** |
| 733 | * 流式输出渲染器,将 reasoning_content 与 content 分区展示。 |
no outgoing calls
no test coverage detected