chore(telegram): resolve the state-store test conflict and drop dead clamp helper
Rebased onto main, which now carries an equivalent STATE_STORE_TOKEN isolation guard in state_store_client_test.go from an independent baseline repair. The two changes were the same fix expressed twice, so main's wording is kept and this branch's duplicate is dropped -- the file is now identical to main and no longer appears in the diff. That leaves one commit, touching only internal/channels/telegram/live.go. Removing clampToOneMessage, which this change orphaned: all three of its call sites were replaced with clampToRunes directly, and `unused` flagged it. Dead code left behind by a rewrite does not ship.
This commit is contained in:
1 parent
8dd8841a7a
commit
9bbce39df2
1 file changed
-8
@@ -725,14 +725,6 @@ func (l *liveReply) toolBlock() string {
|
||||
return clampToRunes(l.toolLines[len(l.toolLines)-1], liveToolMaxRunes)
|
||||
}
|
||||
|
||||
// clampToOneMessage cuts s to the tail that fits in a single Telegram
|
||||
// message, marking the cut with a leading ellipsis. Counting runes rather
|
||||
// than bytes matches how Telegram measures the limit and keeps the cut off a
|
||||
// character boundary.
|
||||
func clampToOneMessage(s string) string {
|
||||
return clampToRunes(s, liveBodyMaxRunes)
|
||||
}
|
||||
|
||||
// clampToRunes cuts s to its last maxRunes runes, marking the cut with a
|
||||
// leading ellipsis.
|
||||
func clampToRunes(s string, maxRunes int) string {
|
||||
|
||||
Reference in new issue
Block a user