chore: fix go fmt formatting issues after rebase

Apply go fmt to files that had formatting inconsistencies
(alignment, indentation) after rebasing onto refactor/channel-system.
This commit is contained in:
Hoshina
2026-02-27 17:35:50 +08:00
parent 42ee9ab1e3
commit d429dcdd76
5 changed files with 33 additions and 18 deletions
+3 -3
View File
@@ -5,8 +5,8 @@ import (
"unicode"
)
// SanitizeMessage removes Unicode control characters, format characters (RTL overrides,
// zero-width characters), and other non-graphic characters that could confuse an LLM
// SanitizeMessage removes Unicode control characters, format characters (RTL overrides,
// zero-width characters), and other non-graphic characters that could confuse an LLM
// or cause display issues in the agent UI.
func SanitizeMessageContent(input string) string {
var sb strings.Builder
@@ -16,7 +16,7 @@ func SanitizeMessageContent(input string) string {
for _, r := range input {
// unicode.IsGraphic returns true if the rune is a Unicode graphic character.
// This includes letters, marks, numbers, punctuation, and symbols.
// It excludes control characters (Cc), format characters (Cf),
// It excludes control characters (Cc), format characters (Cf),
// surrogates (Cs), and private use (Co).
if unicode.IsGraphic(r) || r == '\n' || r == '\r' || r == '\t' {
sb.WriteRune(r)