TestSlashClearWipesTerminalScrollback: tea.ClearScreen (\x1b[2J) clears only the visible region; the saved-lines buffer needs the DECSED 3 sequence from eraseScrollback. /clear must emit both, or prior lines stay scrollable above the reset banner.
(t *testing.T)
| 855 | // eraseScrollback. /clear must emit both, or prior lines stay scrollable above |
| 856 | // the reset banner. |
| 857 | func TestSlashClearWipesTerminalScrollback(t *testing.T) { |
| 858 | m := newTestModel(t, func(http.ResponseWriter, *http.Request) {}) |
| 859 | _, cmd := m.runSlash("/clear") |
| 860 | if !cmdYieldsClearScreen(cmd) { |
| 861 | t.Error("/clear must wipe the visible viewport via tea.ClearScreen") |
| 862 | } |
| 863 | if !cmdYieldsScrollbackErase(cmd) { |
| 864 | t.Error("/clear must also emit eraseScrollback (\\x1b[3J) - otherwise old replies stay scrollable above the reset banner") |
| 865 | } |
| 866 | } |
| 867 | |
| 868 | // TestArgPopoverReloadsCfgOnEntry: the arg popover builds its list from |
| 869 | // m.cfg.Models. Without the cmd→arg reload in refreshSuggest, the first |
nothing calls this directly
no test coverage detected