From 2e8767df512b4ab2245c7477f1f18ad6ae690c27 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Thu, 9 Apr 2026 12:49:19 -0400 Subject: [PATCH] fix(tools): modernize string split --- internal/agent/tools/tools.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/agent/tools/tools.go b/internal/agent/tools/tools.go index 88e70008110e23b7f9c6afa125ef6daaa306cb35..41adf7583904ad529a7e93fff9b44cb8aaaf8ffa 100644 --- a/internal/agent/tools/tools.go +++ b/internal/agent/tools/tools.go @@ -60,8 +60,8 @@ func GetModelNameFromContext(ctx context.Context) string { // markdown description. This extracts just the concise summary line, // significantly reducing token usage while preserving essential tool context. func FirstLineDescription(content []byte) string { - lines := strings.Split(string(content), "\n") - for _, line := range lines { + lines := strings.SplitSeq(string(content), "\n") + for line := range lines { line = strings.TrimSpace(line) if line != "" { return line