MCPcopy Index your code
hub / github.com/coder/coder / findContextLimitValue

Function findContextLimitValue

coderd/x/chatd/chatloop/chatloop.go:2032–2046  ·  view source on GitHub ↗
(value any)

Source from the content-addressed store, hash-verified

2030}
2031
2032func findContextLimitValue(value any) (int64, bool) {
2033 var (
2034 limit int64
2035 found bool
2036 )
2037
2038 collectContextLimitValues(value, func(candidate int64) {
2039 if !found || candidate > limit {
2040 limit = candidate
2041 found = true
2042 }
2043 })
2044
2045 return limit, found
2046}
2047
2048func collectContextLimitValues(value any, onValue func(int64)) {
2049 switch typed := value.(type) {

Callers 2

extractContextLimitFunction · 0.85

Calls 1

Tested by 1