diff --git a/internal/llm/provider/anthropic.go b/internal/llm/provider/anthropic.go index fbbede590b85c9ac51b3b0c058afb7b7a8ec26bc..c65a2e95cf1077dbd1b71320501a7e63d693971f 100644 --- a/internal/llm/provider/anthropic.go +++ b/internal/llm/provider/anthropic.go @@ -21,10 +21,8 @@ import ( "github.com/charmbracelet/crush/internal/message" ) -var ( - // Pre-compiled regex for parsing context limit errors. - contextLimitRegex = regexp.MustCompile(`input length and ` + "`max_tokens`" + ` exceed context limit: (\d+) \+ (\d+) > (\d+)`) -) +// Pre-compiled regex for parsing context limit errors. +var contextLimitRegex = regexp.MustCompile(`input length and ` + "`max_tokens`" + ` exceed context limit: (\d+) \+ (\d+) > (\d+)`) type anthropicClient struct { providerOptions providerClientOptions diff --git a/internal/tui/exp/list/filterable_group.go b/internal/tui/exp/list/filterable_group.go index 91350917bdcece7fc33c6c5069aa30db74c109fc..68c833f2d0933ecae9d78c0beb28f19287abffed 100644 --- a/internal/tui/exp/list/filterable_group.go +++ b/internal/tui/exp/list/filterable_group.go @@ -15,11 +15,9 @@ import ( "github.com/sahilm/fuzzy" ) -var ( - // Pre-compiled regex for checking if a string is alphanumeric. - // Note: This is duplicated from filterable.go to avoid circular dependencies. - alphanumericRegexGroup = regexp.MustCompile(`^[a-zA-Z0-9]*$`) -) +// Pre-compiled regex for checking if a string is alphanumeric. +// Note: This is duplicated from filterable.go to avoid circular dependencies. +var alphanumericRegexGroup = regexp.MustCompile(`^[a-zA-Z0-9]*$`) type FilterableGroupList[T FilterableItem] interface { GroupedList[T]