MCPcopy Create free account
hub / github.com/docker/docker-agent / refreshCommands

Method refreshCommands

pkg/leantui/update.go:657–669  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

655}
656
657func (m *model) refreshCommands(ctx context.Context) {
658 cmds := builtinCommands()
659 for name, c := range m.app.CurrentAgentCommands(ctx) {
660 if m.disabledCommands[name] {
661 continue
662 }
663 cmds = append(cmds, command{name: name, desc: c.DisplayText(), kind: cmdAgent})
664 }
665 for _, sk := range m.app.CurrentAgentSkills() {
666 cmds = append(cmds, command{name: sk.Name, desc: sk.Description, kind: cmdAgent})
667 }
668 m.ac.setCommands(cmds)
669}
670
671func (m *model) handleConfirmKey(k key) {
672 if k.typ == keyEsc {

Callers 3

handleSlashMethod · 0.95
applyTeamInfoMethod · 0.95
RunFunction · 0.80

Calls 5

builtinCommandsFunction · 0.85
DisplayTextMethod · 0.80
CurrentAgentSkillsMethod · 0.80
setCommandsMethod · 0.80
CurrentAgentCommandsMethod · 0.45

Tested by

no test coverage detected