MCPcopy Create free account
hub / github.com/codehamr/codehamr / cmdModel

Method cmdModel

internal/tui/slash.go:141–152  ·  view source on GitHub ↗

--- handlers --------------------------------------------------------------- cmdModel: `/models` lists, `/models ` sets. Cycling is Tab/Shift+Tab in the popover, no separate "next" command.

(args []string)

Source from the content-addressed store, hash-verified

139// cmdModel: `/models` lists, `/models <name>` sets. Cycling is Tab/Shift+Tab
140// in the popover, no separate "next" command.
141func (m Model) cmdModel(args []string) (tea.Model, tea.Cmd) {
142 if len(args) == 0 {
143 m.printModelList()
144 return m, nil
145 }
146 if err := m.cfg.SetActive(args[0]); err != nil {
147 m.appendLine(styleError.Render("⚠ " + err.Error()))
148 return m, nil
149 }
150 m.rebuildClient()
151 return m, m.confirmActive(args[0])
152}
153
154// printModelList writes the "▸ active, name, llm @ url" rollup to scroll.
155func (m *Model) printModelList() {

Callers

nothing calls this directly

Calls 6

printModelListMethod · 0.95
appendLineMethod · 0.95
rebuildClientMethod · 0.95
confirmActiveMethod · 0.95
SetActiveMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected