MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / VisibleToolResultIDs

Function VisibleToolResultIDs

agent/loop.go:1113–1128  ·  view source on GitHub ↗
(messages []map[string]any)

Source from the content-addressed store, hash-verified

1111 }
1112
1113 boundary := n - 4
1114 breakpoints := mapset.NewSet[int]()
1115 for point := range state.CacheBreakPoints.Iter() {
1116 if point >= 0 && point < boundary {
1117 breakpoints.Add(point)
1118 }
1119 }
1120 const maxHistoryBreakpoints = 2
1121 if breakpoints.Cardinality() < maxHistoryBreakpoints {
1122 candidates := []int{}
1123 if n >= 12 {
1124 candidates = append(candidates, max(n/3, 2))
1125 }
1126 if n >= 18 {
1127 candidates = append(candidates, max((2*n)/3, (n/3)+5))
1128 }
1129 for _, candidate := range candidates {
1130 if breakpoints.Cardinality() >= maxHistoryBreakpoints {
1131 break

Callers 2

queryLoopMethod · 0.85

Calls 1

contentBlocksFunction · 0.70

Tested by 1