@@ -5,6 +5,7 @@ import (
55 "os"
66 "strconv"
77 "strings"
8+ "testing"
89)
910
1011type (
@@ -62,8 +63,10 @@ func GetModelNameFromContext(ctx context.Context) string {
6263// markdown description when CRUSH_SHORT_TOOL_DESCRIPTIONS is set, significantly
6364// reducing token usage. Otherwise returns the full description.
6465func FirstLineDescription(content []byte) string {
65− if v, _ := strconv.ParseBool(os.Getenv("CRUSH_SHORT_TOOL_DESCRIPTIONS")); !v {
66− return strings.TrimSpace(string(content))
66+ if !testing.Testing() {
67+ if v, _ := strconv.ParseBool(os.Getenv("CRUSH_SHORT_TOOL_DESCRIPTIONS")); !v {
68+ return strings.TrimSpace(string(content))
69+ }
6770 }
6871 for line := range strings.SplitSeq(string(content), "\n") {
6972 line = strings.TrimSpace(line)