TestCtrlLClearsPromptNotScrollback: Ctrl+L matches Claude Code: it clears the typed input and forces a terminal redraw, but conversation scrollback stays. /clear is the only way to wipe history.
(t *testing.T)
| 1483 | m := newTestModel(t, func(http.ResponseWriter, *http.Request) {}) |
| 1484 | msg := m.errorMessage(llm.Event{Err: cloud.ErrUnauthorized}) |
| 1485 | if !strings.Contains(msg, "key rejected") { |
| 1486 | t.Fatalf("401 error should say 'key rejected': %q", msg) |
| 1487 | } |
| 1488 | if !strings.Contains(msg, "models."+m.cfg.Active+".key") { |
| 1489 | t.Fatalf("401 error should name the active profile's key path: %q", msg) |
| 1490 | } |
| 1491 | } |
| 1492 | |
| 1493 | // TestErrorMessageBudgetExhausted: 402 produces the depleted hint pointing |
| 1494 | // users at the top-up page rather than a stack-trace style wrap. |
| 1495 | func TestErrorMessageBudgetExhausted(t *testing.T) { |
| 1496 | m := newTestModel(t, func(http.ResponseWriter, *http.Request) {}) |
| 1497 | msg := m.errorMessage(llm.Event{Err: cloud.ErrBudgetExhausted}) |
| 1498 | if !strings.Contains(msg, "depleted") { |
| 1499 | t.Fatalf("402 error should mention 'depleted': %q", msg) |
| 1500 | } |
| 1501 | if !strings.Contains(msg, "codehamr.com") { |
| 1502 | t.Fatalf("402 error should point at the top-up page: %q", msg) |
| 1503 | } |
| 1504 | } |
| 1505 |
nothing calls this directly
no test coverage detected