MCPcopy Index your code
hub / github.com/codehamr/codehamr / activateHamrpass

Method activateHamrpass

internal/tui/slash.go:334–343  ·  view source on GitHub ↗

activateHamrpass writes the key onto the hamrpass profile (seeding the entry if the user removed it from config.yaml), switches active, rebuilds the client, and runs the shared confirmation (probe path, since hamrpass now has a key).

(key string)

Source from the content-addressed store, hash-verified

332// activateHamrpass writes the key onto the hamrpass profile (seeding the entry
333// if the user removed it from config.yaml), switches active, rebuilds the
334// client, and runs the shared confirmation (probe path, since hamrpass now has
335// a key).
336func (m *Model) activateHamrpass(key string) tea.Cmd {
337 hp := m.cfg.EnsureHamrpass()
338 hp.Key = key
339 if err := m.cfg.SetActive("hamrpass"); err != nil {
340 m.appendLine(styleError.Render("⚠ " + err.Error()))
341 return nil
342 }
343 m.rebuildClient()
344 return m.confirmActive("hamrpass")
345}

Callers 1

cmdHamrpassMethod · 0.95

Calls 6

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

Tested by

no test coverage detected