MCPcopy
hub / github.com/docker/docker-agent / commandCategories

Method commandCategories

pkg/tui/tui.go:512–533  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

510}
511
512func (m *appModel) commandCategories() []commands.Category {
513 categories := m.buildCommandCategories(m.ctx(), m)
514 if len(m.disabledCommands) == 0 {
515 return categories
516 }
517 filtered := make([]commands.Category, 0, len(categories))
518 for _, cat := range categories {
519 items := make([]commands.Item, 0, len(cat.Commands))
520 for _, item := range cat.Commands {
521 if m.disabledCommands[item.SlashCommand] {
522 continue
523 }
524 items = append(items, item)
525 }
526 if len(items) == 0 {
527 continue
528 }
529 cat.Commands = items
530 filtered = append(filtered, cat)
531 }
532 return filtered
533}
534
535// chatPageOpts returns the chat.PageOption slice derived from the current
536// appModel configuration (e.g. lean mode).

Callers 4

chatPageOptsMethod · 0.95
editorOptsMethod · 0.95
handleKeyPressMethod · 0.95

Calls

no outgoing calls