MCPcopy Index your code
hub / github.com/docker/docker-agent / GetLayers

Method GetLayers

pkg/tui/components/completion/completion.go:362–377  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

360}
361
362func (c *manager) GetLayers() []*lipgloss.Layer {
363 if !c.visible {
364 return nil
365 }
366
367 view := c.View()
368 viewHeight := lipgloss.Height(view)
369
370 // Use actual editor height if set, otherwise fall back to reasonable default
371 editorHeight := cmp.Or(c.editorBottom, 4)
372 yPos := max(c.height-viewHeight-editorHeight-1, 0)
373
374 return []*lipgloss.Layer{
375 lipgloss.NewLayer(view).X(styles.AppPadding).Y(yPos),
376 }
377}
378
379// notifySelectionChanged sends a SelectionChangedMsg with the currently selected item's value
380func (c *manager) notifySelectionChanged() tea.Cmd {

Callers

nothing calls this directly

Calls 2

ViewMethod · 0.95
HeightMethod · 0.45

Tested by

no test coverage detected