printHamrpassStatus emits the status + how-to block (the no-args path).
()
| 298 | return m, m.activateHamrpass(key) |
| 299 | } |
| 300 | |
| 301 | // printHamrpassStatus emits the status + how-to block (the no-args path). |
| 302 | func (m *Model) printHamrpassStatus() { |
| 303 | hp, ok := m.cfg.Models["hamrpass"] |
| 304 | status := "unset" |
| 305 | // ResolvedKey, not the raw field: a `${VAR}` reference with the var unset |
| 306 | // dials out keyless everywhere else, so reporting the literal reference as |
| 307 | // "set" would contradict the 401s the user is about to see. |
| 308 | if ok && strings.TrimSpace(hp.ResolvedKey()) != "" { |
| 309 | status = "set" |
| 310 | } |
| 311 | url, llmName := "https://codehamr.com", "hamrpass" |
| 312 | if ok { |
| 313 | url, llmName = hp.URL, hp.LLM |
| 314 | } |
| 315 | m.appendLine(styleHamr.Render("hamrpass") + styleDim.Render(" · prepaid pass for the hosted codehamr endpoint")) |
| 316 | m.appendLine(styleDim.Render(fmt.Sprintf(" status : %s", status))) |
| 317 | m.appendLine(styleDim.Render(fmt.Sprintf(" endpoint : %s", url))) |
| 318 | m.appendLine(styleDim.Render(fmt.Sprintf(" llm : %s", llmName))) |
| 319 | m.appendLine("") |
| 320 | m.appendLine("A hamrpass is a prepaid pot of budget for our hosted, agent") |
| 321 | m.appendLine("tuned model. No subscription, no expiry, no rate limits. The") |
| 322 | m.appendLine("pass simply runs out when the budget is spent. Top up at") |
| 323 | m.appendLine("https://codehamr.com.") |
| 324 | m.appendLine("") |
| 325 | m.appendLine(styleDim.Render("To activate:")) |
| 326 | m.appendLine(styleDim.Render(" /hamrpass <your key> paste here, switches active profile")) |
| 327 | m.appendLine(styleDim.Render(" or edit .codehamr/config.yaml set models.hamrpass.key directly")) |
| 328 | m.appendLine("") |
| 329 | m.appendLine(styleDim.Render("Once set, the remaining pass percentage appears in the status bar.")) |
| 330 | } |
| 331 |
no test coverage detected