MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / visibleWindow

Method visibleWindow

internal/cli/tool_menu.go:126–140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

124}
125
126func (s pickerStep) visibleWindow() ([]string, int) {
127 out := s.filtered()
128 if s.visibleLimit <= 0 || len(out) <= s.visibleLimit {
129 return out, 0
130 }
131 start := s.cursor - s.visibleLimit + 1
132 if start < 0 {
133 start = 0
134 }
135 end := start + s.visibleLimit
136 if end > len(out) {
137 end = len(out)
138 }
139 return out[start:end], start
140}
141
142func (s pickerStep) filtered() []string {
143 if s.filter == "" {

Callers 2

viewMethod · 0.95
visibleMethod · 0.95

Calls 1

filteredMethod · 0.95

Tested by

no test coverage detected