(t *testing.T)
| 839 | } |
| 840 | |
| 841 | func TestSlashClearResetsHistory(t *testing.T) { |
| 842 | m := newTestModel(t, func(http.ResponseWriter, *http.Request) {}) |
| 843 | m.history = append(m.history, |
| 844 | chmctx.Message{Role: chmctx.RoleUser, Content: "hi"}, |
| 845 | chmctx.Message{Role: chmctx.RoleAssistant, Content: "hey"}, |
| 846 | ) |
| 847 | m2, _ := m.runSlash("/clear") |
| 848 | if len(m2.(Model).history) != 0 { |
| 849 | t.Fatal("/clear must drop history") |
| 850 | } |
| 851 | } |
| 852 | |
| 853 | // TestSlashClearWipesTerminalScrollback: tea.ClearScreen (\x1b[2J) clears only |
| 854 | // the visible region; the saved-lines buffer needs the DECSED 3 sequence from |
nothing calls this directly
no test coverage detected