Multiple packages had their own private truncate implementations: - channels/telegram.go: truncateString (byte-based, no "...") - channels/dingtalk.go: truncateStringDingTalk (byte-based, no "...") - voice/transcriber.go: truncateText (byte-based, with "...") All three are functionally equivalent to the existing utils.Truncate, which already handles rune-safe truncation and appends "..." correctly. Replace all private copies with utils.Truncate and delete the dead code. |
||
|---|---|---|
| .. | ||
| agent | ||
| bus | ||
| channels | ||
| config | ||
| cron | ||
| heartbeat | ||
| logger | ||
| providers | ||
| session | ||
| skills | ||
| tools | ||
| utils | ||
| voice | ||