MCPcopy Create free account
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 m.appendLine(styleDim.Render("Once set, the remaining pass percentage appears in the status bar."))
333}
334
335// activateHamrpass writes the key onto the hamrpass profile (seeding the entry
336// if the user removed it from config.yaml), switches active, rebuilds the
337// client, and runs the shared confirmation (probe path, since hamrpass now has
338// a key).
339func (m *Model) activateHamrpass(key string) tea.Cmd {
340 hp := m.cfg.EnsureHamrpass()
341 hp.Key = key
342 if err := m.cfg.SetActive("hamrpass"); err != nil {
343 m.appendLine(styleError.Render("⚠ " + err.Error()))
344 return nil
345 }
346 m.rebuildClient()

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