Files
Memoh/internal/channel/adapters/common/logging.go
T
BBQ a246b79a4f refactor: restructure channel gateway and chat module architecture
- Refactor channel adapters (feishu, telegram, local) with enhanced descriptor and config
- Restructure channel manager, service, types, and outbound messaging
- Simplify chat module by removing normalize.go and chat.go, consolidating into resolver and types
- Update router channel handlers and tests
- Sync swagger documentation
2026-02-06 23:47:12 +08:00

18 lines
388 B
Go

// Package common provides shared utilities for channel adapters.
package common
import "strings"
// SummarizeText returns a truncated preview of the text, limited to 120 characters.
func SummarizeText(text string) string {
value := strings.TrimSpace(text)
if value == "" {
return ""
}
const limit = 120
if len(value) <= limit {
return value
}
return value[:limit] + "..."
}